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 field from PR to PO header EKKO-IHREZ

bernardo_lee
Explorer
0 Kudos
1,331

Hello,

I have a requirement to copy a reference field from a PR - table EBAN to the PO field EKKO-IHREZ.

Is there a field on EBAN that will transfer to EKKO-IHREZ when the PO is generated?

If not, is there ABAP code that can be used to accomplish this task?

Help is much appreciated.

Bernardo

4 REPLIES 4

JL23
Active Contributor
0 Kudos
247

the purchase requisition has no header table, the purchase requisition is so to say just items.

Standard functionality allows to combine x requisitions in a single PO.

If you do not restrict this standard functionality from which PR do you then want the value to flow in the PO header?

0 Kudos
247

Hi Jürgen,

In this case we are going to restrict the combination of requisitions into a single PO. It will be one PR to one PO.

Thank you.

raymond_giuseppi
Active Contributor
0 Kudos
247

AFAIK, EKKO-IHREZ is information provided by the vendor in their acknowledgment of your purchase order...

Why do you want to fill this field from purchase requisition, hopefully not to prevent an abapper from reading the purchase requisition when printing the order?

Nevertheless from an Abap point of view, look at BAdI ME_PROCESS_PO_CUST (executed in ME21N, ME22N and ME59N) use item methods to update header...

  • BAdI : ME_PROCESS_PO_CUST
  • Handled Method : PROCESS_ITEM
  • Called Methods : on im_item->get_data to get PR refrence, get_header to read header reference and on returned ref to header methods get_data and set_data on header to update it.

0 Kudos
247

Hi Raymond,

My apologies for the late response. We have a supplier sending us info on a text file to create a PR and from there we need to carry their reference ID to the PO EKKO-IHREZ.

I will try your ABAP suggestion and will let you know the results.

thank you,

Bernardo