Announcement:
wanna exchange links? contact me at sapchatroom@gmail.com.
Posted by
Admin at
Reply from avikg on Jun 2 at 11:00 AM HI Terry, I was executing this code snippet, however what I found is <FS1> is holding the first value of the structure. It looks good. But I would like to ask silly question as how we are assigning <OUTPUT_STRUC>. And how we will attach them in the tab separated excel sheet. FIELD-SYMBOLS <FS1> TYPE ANY. FIELD-SYMBOLS: <FS2> TYPE ANY, <OUTPUT_STRUC> type any. DATA LD_INDEX TYPE I. LD_INDEX = 1. LOOP AT <fs_table> ASSIGNING <fs_line>. DO . ASSIGN COMPONENT LD_INDEX OF STRUCTURE <FS_LINE> TO <FS1>. CHECK SY-SUBRC = 0. >>>>ASSIGN COMPONENT LD_INDEX OF STRUCTURE <OUTPUT_STRUC> TO <FS2>. WRITE <FS1> TO <FS2>. ADD 1 TO LD_INDEX. ENDDO. APPEND st_attachment TO t_attachment. CLEAR st_attachment. ENDLOOP. At second ASSIGN statement I found runtime error. Regards, Avik
| | | ---------------Original Message--------------- From: Terry Barker Sent: Friday, June 01, 2012 6:20 PM Subject: How to Attach Dynamic Internal Table As Attachment in Mail Do something like this: FIELD-SYMBOLS <FS1> TYPE ANY. FIELD-SYMBOLS <FS2> TYPE ANY. DATA LD_INDEX TYPE I. LD_INDEX = 1. DO. ASSIGN COMPONENT LD_INDEX OF STRUCTURE <FS_LINE> TO <FS1>. CHECK SY-SUBRC = 0. ASSIGN COMPONENT LD_INDEX OF STRUCTURE <OUTPUT_STRUC> TO <FS2>. WRITE <FS1> TO <FS2>. ADD 1 TO LD_INDEX. ENDDO. | | Reply to this email to post your response. __.____._ | _.____.__ |