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: 

Copy customer fields of a PR to the PO

0 Kudos

Hi guys,

I just have added a customer field to the purchase requisition document with the user exit MEREQ001, just as the documentation says.

The field is being used, editability is set (editable in ME51N and ME52N, non-editable in ME53N), the document can be saved - so to say everything is working just fine!

But now it comes: the customer field is not getting copied to the purchase order, if you are using the purchase requirement as template (for example with drag-and-drop in transaction ME21N). I thought a copy should take place automatically if the field names match in the CI_EBANDB and CI_EKPODB stuctures. Just like material and plant and so on...

Practically I would like to do the same as this guy http://scn.sap.com/thread/917114 . His thread was never really answered, though.

What is the best practice in this case? I hope you can help me out with this one.

Thanks a lot and cheers

Boldi

1 ACCEPTED SOLUTION

atul_mohanty
Active Contributor
0 Kudos

Hi Bertalan -

To my understanding, the custom fields won't copied from PR to PO.

You need write the population logic for the same. Check the function module EXIT_SAPMM06E_016 & EXIT_SAPMM06E_018.

Regarding drag and drop,

Check the class name

Class Name            : CL_GUI_PICTURE

Method                  : IF_DRAGDROP~ONDROP

Inside above method, you can create an implicit enhancement and send a flag through programming using function module global data. 

Now in EXIT_SAPMM06E_016 you can check the TEKPO tables for PR data and then u can write select query to get EBAN data and then populate.

Let us know, if it helps

6 REPLIES 6

atul_mohanty
Active Contributor
0 Kudos

Hi Bertalan -

To my understanding, the custom fields won't copied from PR to PO.

You need write the population logic for the same. Check the function module EXIT_SAPMM06E_016 & EXIT_SAPMM06E_018.

Regarding drag and drop,

Check the class name

Class Name            : CL_GUI_PICTURE

Method                  : IF_DRAGDROP~ONDROP

Inside above method, you can create an implicit enhancement and send a flag through programming using function module global data. 

Now in EXIT_SAPMM06E_016 you can check the TEKPO tables for PR data and then u can write select query to get EBAN data and then populate.

Let us know, if it helps

0 Kudos

Thanks Atul - I have coded the propagation logic within SAPMM06E - works okay.

Cheers Boldi

0 Kudos

Hi bertalan.boldizsar

May I know how you coded it.

Thanks.

raymond_giuseppi
Active Contributor
0 Kudos

You could manage fields copy in ME21N, ME22N or ME59N thru BAdI ME_PROCESS_PO_CUST, you could add your code in method PROCESS_ITEM (GET_DATA, read from EBAN, SET_DATA if values are different)

Regards,

Raymond

0 Kudos

Hi Raymond,

thank you. Unfortunately ME_PROCESS_PO_CUST is not active in the system yet, that's why I have implemented the logic in the Exit SAPMM06E

Cheers

Boldi

0 Kudos

May I know how you coded it in user exit.