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 can I define global variable in user exit whic I can use anywhere.

Former Member
0 Kudos

Hi all,

How can I define global variable( Table ) which I can use when it come back to same user exit where I defined and stored some data.

What I mean is I want to define 1 global table.

In user exit when it comes I store some information. and again when it will come I will have that stored information so I can use it.

Thanks a lot in advance.

2 REPLIES 2

Former Member
0 Kudos

You can use EXPORT TO MEMORY ID and IMPORT FROM MEMORY ID Statement for this.

EXPORT T_ITAB FROM T_ITAB TO MEMORY ID 'ABC'.
IMPORT T_ITAB TO T_ITAB FROM MEMORY ID 'ABC.'

Former Member
0 Kudos

Hello,

the global table should be defined in the TOP include of the program where the user exits belongs to. Normally, there is an include provided for customer definitions. For example, in the sales document processing program SAPMV45A, you can define global variables and tables in the include MV45ATZZ.

Best regards

David