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: 

access internal table or variable from another program

Former Member
0 Kudos

hi experts,

i am doing a submit program to RM06EANL. is there a way i can access one of the internal tables or variables that is populated inside the program RM06EANL and use it in my program? how can i do this?

please help me on this.

thanks..:-)

-march-

1 ACCEPTED SOLUTION

Former Member

Hi

It can read a variable of other program in this way:

(<PROGRAM NAME>)<VARIABLE>

It can use the field-symbols, so in your case:

FIELD-SYMBOLS: <ITAB> TYPE TABLE.

ASSIGN '(RM06EANL)ITAB[]' TO <ITAB>.

But I don't believe you can use this trick because after ending the submit statament the system should clear all memory used by called program.

Max

5 REPLIES 5

Former Member

Hi

It can read a variable of other program in this way:

(<PROGRAM NAME>)<VARIABLE>

It can use the field-symbols, so in your case:

FIELD-SYMBOLS: <ITAB> TYPE TABLE.

ASSIGN '(RM06EANL)ITAB[]' TO <ITAB>.

But I don't believe you can use this trick because after ending the submit statament the system should clear all memory used by called program.

Max

0 Kudos

hi max,

how will i use these in my codes?

i have tried but an error message appears "...type-incompatible"

please advise me on this.

thanks..:-)

Former Member
0 Kudos

Hi ,

Did you try Submit and Return or Submit exporting List to memory.

May be this is of help!

Regards,

Lalit

0 Kudos

hi lalit,

yes i have tried that but i can't still access the internal table from the submit program..

naimesh_patel
Active Contributor
0 Kudos

I don't think you can directly achieve it.

You can copy RM06EANL to ZRM06EANL.

Change program ZRM06EANL and put one export statement which can export your internal table to some memory id.

EXPORT ITAB TO MEMORY ID 'ZTEST123'.

In your main program:

- You need to Submit the ZRM06EANL program.

- Just after the SUMBIT ZRM06EANL AND RETURN statment, IMPORT the exported data.


SUBMIT ZRM06EANL AND RETURN.
IMPORT ITAB FROM MEMORY ID 'ZTEST123'.

Regards,

Naimesh Patel