Copyright 2020 - BV TallVision IT

You're in a tight spot somewhere, and you have some data that needs to be carried accross to some other bit of coding, which is called some time later. Can the system hang on to it for a while ? It's not the most elegant way, but it can be a way out: data can be exported to memory, or even the database if needed. The choice is yours. To export data to the database, a unique key is required, which will of course also need to be available at the receiving end of the export (the import).


data: ga_var type char20 value 'Cookies', gt_somestuff type standard table of char40. append 'Thisandthat' to gt_somestuff. append 'Such and such' to gt_somestuff. EXPORT ga_var gt_somestuff to memory id sy-uname.

In an object oriented environment this is no longer allowed, the assignment to variable names is required, which disconnects the name used in the export from the name used in the import, which is ideal of course.

EXPORT myvar = ga_var 
       mytabvar = gt_somestuff to memory id sy-uname.

The information is available for import, when the memory-ID is specified for the duration of the session. Also if this session involves e.g. a call transaction. It's good custom to put a bit of comment about the importing side when the export is coded, and the other way around !