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: 

How to automatically apply adopt text for ME21N?

walkerist
Participant
0 Kudos
866

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?

2 REPLIES 2

yogananda
Product and Topic Expert
Product and Topic Expert
0 Kudos
667

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.

raymond_giuseppi
Active Contributor
0 Kudos
667

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')