‎2009 Dec 02 10:22 AM
Hi All,
I have a requirement to get the alv list data of a report in another program, how can i do it?
I have to extract the data from report1 and i need to send the same to email attachment in report2.
Regards,
Venkat.
‎2009 Dec 02 10:36 AM
Hi ,
Check this link ..
http://wiki.sdn.sap.com/wiki/display/ABAP/PassingdatafromoneABAPprogramto+another
‎2009 Dec 02 10:36 AM
Hi ,
Check this link ..
http://wiki.sdn.sap.com/wiki/display/ABAP/PassingdatafromoneABAPprogramto+another
‎2009 Dec 02 10:44 AM
You can use
SUBMIT... AND RETURN
EXPORTING LIST TO MEMORY.
This statement stores the list in ABAP memory, allowing the calling program to access it once the called program has finished. You must use the AND RETURN addition in this case.
The function group SLST provides function modules for accessing the saved list,
LIST_FROM_MEMORY
WRITE_LIST
DISPLAY_LIST
‎2009 Dec 02 10:48 AM
You can submit 1st report from second one and export the list to memory.
SUBMIT YFIIN_DISHC_MAILREPORT EXPORTING LIST TO MEMORY AND RETURN.Now You can retrieve list from memory as follows
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
LISTOBJECT = lt_listobject
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.Now, you can convert the list to html page as follows.
CALL FUNCTION 'WWW_HTML_FROM_LISTOBJECT'
EXPORTING
REPORT_NAME = 'YFIIN_DISHC_MAILREPORT'
* TEMPLATE_NAME = 'WEBREPORTING_REPORT'
* CHARSET =
TABLES
HTML = lt_html
LISTOBJECT = lt_listobject
* LISTICONS =
.Now you can attach this html page in your mail and send.
‎2009 Dec 02 11:23 AM