User Exit Not Triggered Unless Transaction Exited.

Question:
I have a user exit which is triggered on Purchase Order Save. (ME21N).
The problem is that the user exit does not get triggered again unless I get out of the transaction.
Any ideas?
Thanks.
Answer:
Hi,
From your question I feel that the User Exit is in SAVE DOCUMENT which happens in UPDATE TASK and so will happen only when you come out of Transaction by hitting SAVE Button.
I will explain this wrt SD.
There are 2 user Exits. SAVE DOCUMENT PREPARE & SAVE DOCUMENT
If u want to do something before saving the document u put the code in
SAVE DOCUMENT PREPARE
If you want to store Sales Order # for example in a ZTABLE then u put the code in SAVE DOCUMENT because the number will be known after
update has happened.
This is what is happening now. Since I don't have access to SAP I am not able to help beyond this.
Best Wishes
Jawahar
Answer:
Hi,
Place your code in FM EXIT_SAPMM06E_012 ( Check Customer-Specific Data Before Saving ) and see whether it works or not.
Best Wishes
Jawahar
Answer:
Thanks Jawahar.
The problem is not that the user exit does not get triggered.
It gets triggered and is working as desired. But everytime I have to get out of the transaction to create the PO. If I do not exit the transaction /nME21N it does not work.
Is there any buffer management problem here??
The exit I use is EXIT_SAPMM06E_013.

More Articles:

SAP/ABAP query - joining two text values - how do you?
SALES ORDER BDC NOT WORKING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!?
CONVERT DATE TO STRING?
Can't logon with minisap?
displaying static text in ALV report?
Help needed with ABAP debugger !?