当前位置:网站首页>SAP smartforms text content manual wrap output

SAP smartforms text content manual wrap output

2022-06-11 02:06:00 DeveloperMrMeng

The effect is as follows , Line feed output of batch and piece number information ( Non wrap )

The implementation is as follows :

1. Use  CL_ABAP_CHAR_UTILITIES=>CR_LF  Splice newline

2.smartforms Define global variables

3. Add lines of code

DATA:
  LT_STRAM_LINES TYPE STANDARD TABLE OF STRING,
  LS_STRING      TYPE STRING,
  LT_TEXT        TYPE TLINE_T.

CLEAR GT_CHARGPID.

LS_STRING = GS_ITEM-CHARGPID.
APPEND LS_STRING TO LT_STRAM_LINES.

CALL FUNCTION 'CONVERT_STREAM_TO_ITF_TEXT'
  EXPORTING
    STREAM_LINES = LT_STRAM_LINES
    LF           = 'X'
  TABLES
    ITF_TEXT     = GT_CHARGPID.

4. Replace the field contents with dynamic text , The format of the dynamic text field is the default paragraph format set in the table style , If there are multiple formats , And the default format is the format with some settings such as line spacing , There may be multiple lines of content superimposed or some abnormal display effects

原网站

版权声明
本文为[DeveloperMrMeng]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/162/202206110049534475.html