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

Updating a table used in a calling program

mattnewell
Explorer
0 Likes
434

I am creating an internal version of the notification report program and would like to use a table created in the called program in the main program.

I generate the data in the called program and would like to "pass" the data into a holding table in the calling program.

For instance called program loads table i_hold_text, I would like to pass this to calling program ZRIPRSN00 table GT_HOLD_TEXT to use in the SAPScript. Ideas?

1 ACCEPTED SOLUTION
Read only

ThomasZloch
Active Contributor
0 Likes
417

Sounds like you should use ABAP memory here by using EXPORT ... TO MEMORY in the called program and IMPORT ... FROM MEMORY in the calling program. Have a look at the online help for these ABAP statements.

Cheers

Thomas

I am creating an internal version of the notification report program and would like to use a table created in the called program in the main program.

I generate the data in the called program and would like to "pass" the data into a holding table in the calling program.

For instance called program loads table i_hold_text, I would like to pass this to calling program ZRIPRSN00 table GT_HOLD_TEXT to use in the SAPScript. Ideas?

2 REPLIES 2
Read only

ThomasZloch
Active Contributor
0 Likes
418

Sounds like you should use ABAP memory here by using EXPORT ... TO MEMORY in the called program and IMPORT ... FROM MEMORY in the calling program. Have a look at the online help for these ABAP statements.

Cheers

Thomas

Read only

Former Member
0 Likes
417

You could use field-symbols.

like


DATA: l_text(18) VALUE '(SOURCE_PROGRAM_NAME)table_name[]'.
field-symbols <fs> type table.

Assign (ltext) to <fs>.
if sy-subrc eq 0.
"Do what you want with <fs>
endif.