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

Clearing Variable in SAPMV45A

Former Member
0 Likes
1,082

Am writing custom code in MV45AFZB for which I have declared a couple of variables in MV45AFZB.

Now after these variables are populated by program, if I click on CANCEL button on sales order screen, I get SAP Standard pop up box which says "Are you sure.....Data will be lost.... " on this pop up if we select "YES" and then if we come back to same transaction and switch on debugger we will see that variables defined in MV45AFZB still have data from previous run, how do I clear those, so that EVERY run of transaction finds those variable as INITIAL ?

1 ACCEPTED SOLUTION
Read only

Former Member
678

Hi,

If it is global variable..Use the below userexit to clear the variable..

INCLUDE MV45AFZA.

FORM USEREXIT_REFRESH_DOCUMENT.

Thanks,

Naren

1 REPLY 1
Read only

Former Member
679

Hi,

If it is global variable..Use the below userexit to clear the variable..

INCLUDE MV45AFZA.

FORM USEREXIT_REFRESH_DOCUMENT.

Thanks,

Naren