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: 

Copying customer fieds from reference document in ME21N

Former Member
0 Kudos

Hi all,

In a 4.7 Enterprise environment:

I have added some customer functionalities to ME21N (Purchase Order - PO), in some customer screens (using the BADI's ME_GUI_PO_CUST and BADI_ME_PROCESS_PO_CUST). Everything works well.

The problem is that when I want to create a PO with reference to another document (another PO, to simplify) the customer fields are not copied form the reference document.

How could I copy these fields too into the new document (without having to enter them by hand again)?

Thank you,

Bogdan

1 REPLY 1

Former Member
0 Kudos

Hi Bogdan,

I can see two ways of handling this:

1. If the new fields that you added to the customer screens are based on append strucutres of the EKKO, EKPO, etc. tables, then the data should copy automatically when one purchase order references another.

2. If you have already implemented the change and have not used append structures and don't want to change your solution, then you will have to do the coding yourself in the BADI's ME_GUI_PO_CUST and BADI_ME_PROCESS_PO_CUST. I would expect that in the INITIALISE or OPEN methods of BADI_ME_PROCESS_PO_CUST that you could include code to copy from the reference purchase order.

Hope that makes sense.

Cheers,

Brad