‎2007 Dec 26 10:18 AM
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.
‎2007 Dec 26 10:23 AM
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
‎2007 Dec 26 10:25 AM
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.
‎2007 Dec 26 1:15 PM
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.