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 for transaction ME21N at moment after save

former_member308319
Participant
0 Kudos
4,126

Hello guys, I need a BADI or UE for the transaction ME21N after to save a purchase order. I have a UE but i do not know if this working for me. EXIT_SAPMM06E_013
Thank you!

1 ACCEPTED SOLUTION

thanga_prakash
Active Contributor
0 Kudos
1,166

Try with IF_EX_ME_PROCESS_PO_CUST~CHECK method, this is called during Closing Check.

12 REPLIES 12

michael_kozlowski
Active Contributor
0 Kudos
1,166

Check BAdI ME_PROCESS_PO_CUST

0 Kudos
1,166

Thank you for your fast answer but.. which method of ME_PROCESS_PO_CUST?

0 Kudos
1,166

Perhaps the CLOSE method is appropriate for your needs? CLOSE method is invoked either directly after posting (POST method) or before the next document is opened (OPEN method).

0 Kudos
1,166

I did put a break point in this method but at moment to save.. is not happening nothing

0 Kudos
1,166

I tried in my system. Break point in CLOSE method reached right after pressing the save button.

0 Kudos
1,166

I am going try of new.. Thanks!

0 Kudos
1,166

No works for me in IF_EX_ME_PROCESS_PO_CUST~CLOSE method

raymond_giuseppi
Active Contributor
0 Kudos
1,166

Use ME_PROCESS_PO_CUST method POST.

(Method CLOSE is only intended for some "cleanup" , did you read BAdI definition?)

Depending on the exact requirement, call some FM either IN UPDATE TASK (if only some SQL statements as to insert data in a customer table) or IN BACKGROUND TASK (if some BAPI to execute or not allowed statement in a COMMIT step, so execute in another LUW after database update)

With any of the good old user-exits, you had to store the required data in global data (Z-top include) of the exit function group or in parameter of a form, and schedule this form with a PERFORM ON COMMIT to trigger following execution.

Regards,

Raymond

thanga_prakash
Active Contributor
0 Kudos
1,167

Try with IF_EX_ME_PROCESS_PO_CUST~CHECK method, this is called during Closing Check.

0 Kudos
1,166

But could also be triggered manually by user, then trigger once again during save, in this case insure to trigger your event only once at end of commit.

0 Kudos
1,166

Very very thanks bro, it's works for me

0 Kudos
1,166

You are always Welcome Cheers!!!