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

Internal table in user exit

Former Member
0 Likes
1,514

Hi,

I am using user exit "MV45AFZZ" - Sales order, I have declaired one internal table in userexit_save_document_prepare and storing some data in it.

FORM userexit_save_document_prepare.

ENDFORM.

I wish to use the data from internal table declared in userexit_save_document_prepare in

FORM userexit_save_document.

ENDFORM.

Should i declare the internal table at some other place so that it can be accessed from other user exits.

1 ACCEPTED SOLUTION
Read only

naimesh_patel
Active Contributor
0 Likes
1,118

There is a TOP Include MV45ATZZ for the data declaration which can be used in the USER EXITs of the MV45AFZZ.

Declare your internal table in the MV45ATZZ include and than you can use them in the USEREXIT_SAVE_DOCUMENT_PREPARE and USEREXIT_SAVE_DOCUMENT.

REgards,

Naimesh Patel

Hi,

I am using user exit "MV45AFZZ" - Sales order, I have declaired one internal table in userexit_save_document_prepare and storing some data in it.

FORM userexit_save_document_prepare.

ENDFORM.

I wish to use the data from internal table declared in userexit_save_document_prepare in

FORM userexit_save_document.

ENDFORM.

Should i declare the internal table at some other place so that it can be accessed from other user exits.

5 REPLIES 5
Read only

Former Member
0 Likes
1,118

define that in MV45ATZZ

Read only

naimesh_patel
Active Contributor
0 Likes
1,119

There is a TOP Include MV45ATZZ for the data declaration which can be used in the USER EXITs of the MV45AFZZ.

Declare your internal table in the MV45ATZZ include and than you can use them in the USEREXIT_SAVE_DOCUMENT_PREPARE and USEREXIT_SAVE_DOCUMENT.

REgards,

Naimesh Patel

Read only

Former Member
0 Likes
1,118

Hi Ganesh,

You are asking if your internal table can be declared globally. I don't believe there is an area (an include program for example) in SAPMV45A that allows customers to declare their own global data. This would of course be the most straight-forward solution, but if we don't have this option, you can always do something like this:


FORM userexit_save_document_prepare.
  ...
  EXPORT my_itab TO MEMORY ID 'CUST_MEMORY'.
  ...
ENDFORM. 

And then this:


FORM userexit_save_document.
  ...
  IMPORT my_itab FORM MEMORY ID 'CUST_MEMORY'.
  ...
ENDFORM. 

Regards,

Jamie

Read only

0 Likes
1,118

you are incorrect, see MV45ATZZ

Read only

0 Likes
1,118

True enough. I stand corrected. Guess I'm slipping in my old age.

In cases where there is no include such as MV45ATZZ, the export/import would be an option.

Cheers,

Jamie