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

Submit in background

Former Member
0 Likes
265

Hi ;

I am running a report in background.

Now, in this report I am passing some data using 'SUBMIT' into another program say P2.

Now I want the output from P2.

Someone please tell me how to achieve this.

Regards

Abhishek

1 REPLY 1
Read only

ferry_lianto
Active Contributor
0 Likes
242

Hi,

Please check this.


SUBMIT (P_PROG) USING SELECTION-SET P_VAR 
                EXPORTING LIST TO MEMORY AND RETURN.

CALL FUNCTION 'LIST_FROM_MEMORY'
  TABLES
    LISTOBJECT = LISTOBJECT
  EXCEPTIONS
    NOT_FOUND = 1
    OTHERS = 2.

IF SY-SUBRC <> 0.
  WRITE 'Error in list_from_memory.'.
ENDIF.

CALL FUNCTION 'LIST_TO_ASCI'
  TABLES
    LISTASCI = ASCITAB
    LISTOBJECT = LISTOBJECT.

Regards,

Ferry Lianto