11-30-2007 5:38 PM
Hi,
In the main program i have submitted a program and that program is running successfully and data is populated in to it_final, now i want to use this data populated internal table it_final in my main program.
Thanks,
Sudhakar.
11-30-2007 5:41 PM
Use can use Export / Import technique to achive this.
but make sure that memory ID is dynamic with username.
OR check this option when you are submitting report
EXPORTING LIST TO MEMORY
Thanks
Pavan
12-01-2007 7:40 AM
To be more explicit - use IMPORT/EXPORT TO/FROM MEMORY.
The memory id does not have to be username dynamic unless you are specifically using shared memory. In the given scenario this is unlikely; the standard form of the command uses memory specific to the logged on user.
matt
12-01-2007 10:10 AM
Hi,Mathew,
&----
*& Report ZMB51 *
*& *
&----
*& *
*& *
&----
REPORT ZMB51 .
DATA LIST_TAB TYPE TABLE OF ABAPLIST.
DATA: BEGIN OF olist OCCURS 0,
filler1(1500) TYPE c,
END OF olist.
submit <b>RM07DOCS</b> EXPORTING LIST TO MEMORY
AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
LISTOBJECT = LIST_TAB
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC = 0.
CALL FUNCTION 'LIST_TO_ASCI'
EXPORTING
LIST_INDEX = -1
TABLES
LISTASCI = oLIST
LISTOBJECT = LIST_TAB
EXCEPTIONS
EMPTY_LIST = 1
LIST_INDEX_INVALID = 2
OTHERS = 3.
*
BREAK-POINT.
write:/ sy-subrc.
ENDIF.
OLIST will contain the report output that you have executed but you need to tweak this internal table so that it can be used for further processing.The current example will get you MB51 output into OLIST,so change the program name to your program name at the SUBMIT statement and then try.
K.Kiran.