Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Triggering User command automatically

former_member203501
Active Contributor
0 Likes
871

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
653

Hi ,

Check this link ..

http://wiki.sdn.sap.com/wiki/display/ABAP/PassingdatafromoneABAPprogramto+another

4 REPLIES 4
Read only

Former Member
0 Likes
654

Hi ,

Check this link ..

http://wiki.sdn.sap.com/wiki/display/ABAP/PassingdatafromoneABAPprogramto+another

Read only

Former Member
0 Likes
653

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

Read only

Former Member
0 Likes
653

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.

Read only

former_member203501
Active Contributor
0 Likes
653

Thanks all for ur support.