Showing results for 
Search instead for 
Did you mean: 

Attach copy of purchase order when it's changed in ME22N

Active Participant
0 Kudos

When a change is made to a Purchase order, ME22N, a copy of the print version of the po is saved under the Attachment List in the po Services for Objects area.  This only works when we use the standard SAP processing routine, SAPFM06P, set up in the NACE transaction. 

We copied and modified this program and the copy of the po doesn't attach when we use the custom program. We found that the update is done in a call to FM RV_MESSAGE_UPDATE.  I have debugged the code and I can't find a difference between using the SAP program as a processing routine and using our custom version.  The update, as I mention in an answer below, is done in Include MM06EF0B_BUCHEN, FORM BUCHEN. 

So, any ideas as to why this won't work when using a custom processing routine? 

Points will be awarded and eternal gratitude given.  🙂 



Thank you for any help. 


Active Contributor
0 Kudos
Most likely triggered via a BADI implementation for definition 'ME_PROCESS_PO_CUST' when a PO is changed.
View Entire Topic
Active Participant
0 Kudos

After several days of research, I think the answer is that a document will only be created in the Attachment list in ME22N / ME23N if you are using a SAPScript form. The function module ME_PRINT_PO has a parameter, IX_FONAM, that is defined like TNAPR-FONAM, which is char 16 for SAPScript forms and not SMARTForms.  Hopefully, I will be able to get an official response from SAP confirming that is the case.