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

Calling one program from another program

Former Member
0 Likes
541

Hi All,

I want to call one report program from another program which i will be creating. So please guide me regarding how is it possible to get the output of one program in the internal table in my own program, which i can use further . Inshort, how one can call one report program from another & store it's output in the inernal table or memory, so that it can be used further in the calling program.

Thanks & Regards,

Chetan.

3 REPLIES 3
Read only

Former Member
0 Likes
506

instead of creating report.. create a function module and call it in your report....

and you can pass the data via function module tables back to the calling report

Read only

Former Member
0 Likes
506

Hi Chetan ,

We can call an another from existing report using submit.Inorder to carry the details use Import and Export parameters to get the details from one program to another program.

If useful give points.

Read only

Former Member
0 Likes
506

Hi,

you can call one report program from another program by using Submit statement, refer the below syntax.

SUBMIT "your program name" EXPORTING LIST TO MEMORY WITH 'selection screen fileds of called program' = input field for called program AND RETURN.

which will uploads the list to memory.

then use the below function module to read that exported data.

  • Use the function module to get the data from memory.

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

LISTOBJECT = I_LIST.

*then use the below function module to convert raw data to *asci format

CALL FUNCTION 'LIST_TO_ASCI'

TABLES

LISTASCI = I_INITIAL

LISTOBJECT = I_LIST

EXCEPTIONS

EMPTY_LIST = 1

LIST_INDEX_INVALID = 2

OTHERS = 3.

IF SY-SUBRC NE '0'. "#EC *

MESSAGE E056."Unable to convert data.

ENDIF.

then call the function module to make list memory free.

CALL FUNCTION 'LIST_FREE_MEMORY'

TABLES

LISTOBJECT = I_LIST.

now you can make use of I_INITIAL internal table to find the report data.

Reward if useful.

Thanks,

Sreeram.