- 表单打印自动换行,值的拼接 cl_abap_char_utilities=>cr_lf
- SMARTFORMS 设置
- 程序传值处理
- TYPES: BEGIN OF ty_c,
zm_zd TYPE char25,
END OF ty_c.
DATA: lt_ty1 TYPE TABLE OF ty_c,
lt_ty2 TYPE TABLE OF ty_c,
ls_ty LIKE LINE OF lt_ty1.
DATA: lv_delimiter1(1) VALUE ';',
lv_delimiter2(1) VALUE ','. - * 编辑表单数据
DATA: lw_ztcrm070 TYPE ztcrm070,
lt_ztcrm071 TYPE TABLE OF ztcrm071,
lw_ztcrm071 TYPE ztcrm071.
MOVE-CORRESPONDING ls_node_header TO lw_ztcrm070.
LOOP AT lt_search_result_items INTO ls_search_result_items.
MOVE-CORRESPONDING ls_search_result_items TO lw_ztcrm071.
CLEAR:lt_ty1[],lt_ty2[].
IF lv_delimiter1 CA lw_ztcrm071-zfresult .
SPLIT lw_ztcrm071-zfresult AT lv_delimiter1 INTO TABLE lt_ty1.
ENDIF.
IF lv_delimiter2 CA lw_ztcrm071-standard .
SPLIT lw_ztcrm071-standard AT lv_delimiter2 INTO TABLE lt_ty2.
ENDIF.
LOOP AT lt_ty1 INTO ls_ty.
IF sy-tabix EQ '1' AND ls_ty-zm_zd IS NOT INITIAL.
lw_ztcrm071-zfresult = sy-tabix && ':' && ls_ty-zm_zd.
ELSEIF sy-tabix NE '1' AND ls_ty-zm_zd IS NOT INITIAL..
lw_ztcrm071-zfresult = lw_ztcrm071-zfresult && cl_abap_char_utilities=>cr_lf && sy-tabix && ':' && ls_ty-zm_zd.
ENDIF.
ENDLOOP.
LOOP AT lt_ty2 INTO ls_ty.
IF sy-tabix EQ '1' AND ls_ty-zm_zd IS NOT INITIAL.
lw_ztcrm071-standard = ls_ty-zm_zd.
ELSEIF sy-tabix NE '1' AND ls_ty-zm_zd IS NOT INITIAL..
lw_ztcrm071-standard = lw_ztcrm071-standard && cl_abap_char_utilities=>cr_lf && ls_ty-zm_zd.
ENDIF.
ENDLOOP.
"ENDIF.
lw_ztcrm070-production_date = lw_ztcrm070-charg+2(8).
APPEND lw_ztcrm071 TO lt_ztcrm071.
ENDLOOP. - SMARTFORMS 代码处理
- DATA:
lt_stram_lines TYPE STANDARD TABLE OF string,
ls_string TYPE string,
lt_text TYPE tlinet.
CLEAR g_chargpid.
ls_string = wa_items-zfresult.
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 = g_chargpid.