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: 

multi line export-import

Former Member
0 Kudos

hi,

im using user exit LMR1M004 to export some variables which are imported in user exit RGGBS000. It works fine wherever there is only one line item. However this import-export doesnt happen line by line. After all line items are exported the second user exit imports the values , so it loses the variables of first line item and fetches values of second line item for both lines.

How do i overcome this problem ?

Bye

1 ACCEPTED SOLUTION

former_member193382
Active Contributor
0 Kudos

Hi,

use internal table to hold the data.

Pass this internal table to a memory ID and export it.

Then import the same at the other end.

Check the sample code.

DATA : BEGIN OF ITABY OCCURS 0,

.......

......

END OF ITABY.

EXPORT ITABY TO MEMORY ID 'ABC'.

at other end use

DATA : BEGIN OF ITABY OCCURS 0,

.......

......

END OF ITABY.

IMPORT ITABY FROM MEMORY ID 'ABC.'

Let me know if you have any queries.

Regards,

Raj

3 REPLIES 3

former_member193382
Active Contributor
0 Kudos

Hi,

use internal table to hold the data.

Pass this internal table to a memory ID and export it.

Then import the same at the other end.

Check the sample code.

DATA : BEGIN OF ITABY OCCURS 0,

.......

......

END OF ITABY.

EXPORT ITABY TO MEMORY ID 'ABC'.

at other end use

DATA : BEGIN OF ITABY OCCURS 0,

.......

......

END OF ITABY.

IMPORT ITABY FROM MEMORY ID 'ABC.'

Let me know if you have any queries.

Regards,

Raj

0 Kudos

hi raj,

thnx for ur prompt response. However i dont have the internal table ready .....i mean my user exits exports lines one by one. So probably i need to store the lines in table and export once all lines are stored in table . That would require that the records in table should be static. I mean between calls to user exit it should remember the previous lines. How do i make my internal table static so that previous lines are remembered ?

Kindly help.

Bye

0 Kudos

Hi,

Declare a string variable in your internal table.

pass all the values to that string.

use LOOP statement. Also use append statement within LOOP.

Remaining syntax will remain same as mentioned in my previous reply.

Regards,

Raj