Application Development 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: 

How to use the internal table of the submitted program

Former Member
0 Kudos

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.

3 REPLIES 3

Former Member
0 Kudos

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

matt
Active Contributor
0 Kudos

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

0 Kudos

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.