我们如何连接动态工作区的字段?这个想法在下面的代码中:
LOOP AT lt_final INTO DATA(ls_final).
CONCATENATE ls_final-field1
ls_final-field2
ls_final-field3
ls_final-field4
ls_final-field5
INTO ls_attachment SEPARATED BY lc_tab. "lc_tab is horizontal tab
APPEND ls_attachment TO lt_attachment.
CLEAR: ls_attachment.
ENDLOOP.
(此代码将用于发送电子邮件附件。)现在,我的问题是,上面代码中的内部表是一个动态内部表,因此我不确定有多少字段以及字段名称。
如何连接字段?任何想法,请帮助..
LOOP AT <dynamic_table> INTO DATA(ls_final).
CONCATENATE ls_final-(?)
ls_final-(?)
ls_final-(?)
ls_final-(?)
ls_final-(?)
"or more fields insert here depending on dynamic table
INTO ls_attachment SEPARATED BY lc_tab. "lc_tab is horizontal tab
APPEND ls_attachment TO lt_attachment.
CLEAR: ls_attachment.
ENDLOOP.