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 to caputure SAVE event in User-Exit

Former Member
0 Kudos
198

Hi,

I want to capture each line items pricing details so I have written code in MV45AFZZ program, form USEREXIT_PRICING_PREPARE_TKOMP. And I want my code to be executed only when user clicks on SAVE button (again I don't want to write code in form USEREXIT_SAVE_DOCUMENT since it doesn't suit the requirement). I like to know how to capture the button user pressed.

Thanks in advance.

Regards,

Balaji Viswanath.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
106

based on the Okcode , just find out what is the Ok_code for the Save Button.

i think its <b>SY-UCOMM =SICH</b>

Regards

Peram

3 REPLIES 3

Former Member
0 Kudos
107

based on the Okcode , just find out what is the Ok_code for the Save Button.

i think its <b>SY-UCOMM =SICH</b>

Regards

Peram

0 Kudos
106

Hi Prabhu,

OK_CODE is not containing any value i.e. blank inside the user-exit.

Thanks,

Balaji Viswanath.

alejandro_bindi
Active Contributor
0 Kudos
106

Enclose all code inside this conditional:


IF sy-ucomm = 'SAVE'.
  " your code
ENDIF.

(check value of sy-ucomm when you save in debugging mode, maybe it's different from 'SAVE', it depends on the program).

Regards

Please reward points if helpful.