2022 Dec 29 7:20 AM
Hi, so I want to try automatically apply the adopt text functionality in ME21N. But where do I apply it? Can it be limited to specific sales orgs?
2022 Dec 30 11:14 AM
walkerist
There are several ways to automatically apply the adopt text feature in ME21N.
1. Use the standard SAP function module EXIT_SAPMM06E_010. This function module is triggered after a purchase order is saved, and it will read the purchase order text and apply it to the next purchase order.
2. Create a user exit in the same program as ME21N. Within the user exit, call the function module EXIT_SAPMM06E_010.
3. Create a custom ABAP program that reads the purchase order text from the previous order and applies it to the new purchase order. This can be done through a combination of BAPI_PO_CHANGE and BAPI_PO_CREATE.
4. Use Business Add-Ins (BAdIs) to extend the standard ME21N program. Create a BAdI with a method that reads the purchase order text from the previous purchase order and applies it to the new purchase order.
2023 Jan 03 2:12 PM
Try to implement a BAdI such as ME_PROCESS_PO_CUST, in PROCESS_HEADER and PROCESS_ITEM (or CHECK) you can adopt the texts related to header or items (look for methods of IF_LONGTEXTS_MM such as GET_TYPES to get a list of available long texts types, look at FIXIE field to identify relevant types, and ADOPT_TEXT for your requirement)
NB: Insure also that your Customizing of copy rules for texts allows the adoption of such texts. - Purchase Order, Texts for Purchase Orders, Define Copying Rules for Header Texts & Define Copying Rules for Item Texts (the fixed indicator must not be equal to 'N')