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: 

Populating Vendor based on Custom Header Field in PO

0 Kudos

Hi,

I created a custom header field in a PO, whenever I enter data in it, the vendor should get populated based on it. Please suggest a solution. I created screen-exit to create custom screen and fields.

Thanks,

Shweta

1 REPLY 1

raymond_giuseppi
Active Contributor
0 Kudos

Did you look at method PROCESS_HEADER of BAdI ME_PROCESS_PO_CUST, methods GET_DATA and SET_DATA of parameter IM_HEADER should fulfill your requirement,

  • GET_DATA returned parameter RE_DATA contains stucture CI_EKKODB, so your customer appended fields.
  • SET_DATA allows change of vendor, but don't call this method if you don't actually change some value (preventing infinite loop)

Perform some search, there are multiple discussions and document on this BAdI.