We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

RE:[sap-dev] How to Attach Dynamic Internal Table As Attachment in Mail

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

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.
 
__.____._
Manage Settings | Unsubscribe | Create FAQ | Send Feedback
  
Copyright © 2012 Toolbox.com and message author.
Toolbox.com 4343 N. Scottsdale Road Suite 280, Scottsdale, AZ 85251
 
avikg  
 
Mark as helpful
View this online
Ask a new question
 
In the Spotlight
Toolbox.com for iPhone & Android: Ask Questions & Get Answers Anywhere. Download the Free App

_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language