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: 

BADI / User Exits triggering after clicking SAVE button in ME21N

Former Member
0 Kudos

Hello Sir/Madam,

I have gone through the posted links to find list of user exits and finally understood EXIT_SAPMM06E_017 / BADI ME_PROCESS_PO_CUST triggers after clicking on SAVE button on ME21N screen. But , when I put break-point in either of the cases it triggers even before saving. Hence please if anyone knows the exit/ badi which triggers after SAVE please help.

I have to check if Tax Code (EKPO-MWSKZ) is maintained against a material, if not maintained throw error message to user before saving a PO.

Thank You.

3 REPLIES 3

Former Member
0 Kudos

Hi Richard,

Yes BADI 'ME_PROCESS_PO_CUST' will triggered if any value of PO is changed. But if you want on save there is "POST" method in same BADI which can be utilized.

Best Regards,

Akanksha.

Former Member
0 Kudos

Hi,

Use the below exit : EXIT_SAPMM06E_012 of enhancement : MM06E005

The parameter TEKPO contains the line item data entered on the screen, Hence you need to loop at it and perform your validations.

Hope this helps

Regards

Shiva

0 Kudos

Thank you both for the replies. You both are right.

@Shiv,

But , when i want to output a message using the EXIT , it does not display on the screen but it does enter the code in debug mode.

My Code :

Loop at it_tekpo into wa_tekpo.

if wa_tekpo-mwskz is initial.

message '*****' type 'I'.

endif.

endloop.

@Akansha,

I am not aware of the classes coding so if u could kindly guide me through , extraction of item level value for Tax Code and validate it, it will be great help.

Again, Thank you both for the help.