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: 

Update of custom field added in EKKO in EKKO_INCL_EEW_PS through BAPI_PO_CHANGE

There is custom field added in EKKO in include EKKO_INCL_EEW_PS and I have the requirement to update this field through BAPI_PO_CHANGE. Could someone suggest the EXTENSIONIN structure and its value that we need to pass in this case where the field is not in CI_EKKODB, but in EKKO_INCL_EEW_PS.

I see in debug it took some XML transformation, and KEY/DATA/DATAX as some structure, but I need help that what and how should we pass the EXTENSIONIN structure and its value part so we will able to update this custom field through BAPI_PO_CHANGE.

11 REPLIES 11

chaitanya285
Participant
0 Kudos

Hi,

You might check for the existing question and answers on this topic, for e.g. this one

Update EKKO custom fields with BAPI_PO_CHANGE

Probably you need to check for exit/enhancement to update the field which you need.

vijay_hariharan
Contributor
0 Kudos

Hello,
The below blog and this screen-shot bapi-po-enh.jpg should help you with where and how to use the BAPI EXTENSIONIN & EXTENSIONINX in BAPI_PO_CHANGE
https://blogs.sap.com/2014/06/24/bapi-extension-for-customer-added-fields/#:~:text=The%20naming%20co....

Regards,
Vijay

0 Kudos

This is when we add custom field in CI_EKKODB, but here in my case custom field is added in EKKO_INCL_EEW_PS.

0 Kudos

As mentioned by Raymond below.. You'll then need to create your own structure and assign it EXTENSIONIN.. Also handle it in the enhancement point MOVE_EXTENTIONIN_01 Enhancement Spot ES_SAPL2012.. You can check this Enhancement Point.. should have some examples of the how processing is done..

0 Kudos

I replied to him. I am assuming this has some potential as i checked in debug and able to save in EKKO on update in edit mode.

raymond_giuseppi
Active Contributor
0 Kudos

For CI_EKKODB (or EKPO) use of tructures BAPI_TE_MEPOHEADER and BAPI_TE_MEPOHEADERX in the EXTENSIONIN with Customer Exits of Enhancement SAPL2012 do the job.

For other structures, you have to create your own structures to pass in EXTENSIONIN and handle those yourself in Enhancement point MOVE_EXTENTIONIN_01 of Enhancement spot ES_SAPL2012

0 Kudos

I debugged and found in include L2012F06, if I update values of DATA and DATAX in edit mode for that custom field , values are successfully updated in EKKO table. In method GET_EXTENSION_DATA, Class is taking EXTENSIONIN structure as input as imt_parex[] ) and taking some XML transformation on it. This means BAPI itself has potential to update it, but could not able to find suitable entries that needed to pass through EXTENSIONIN.

0 Kudos

You could use the BAdI (ME_BAPI_PO_CUST, method EXTENSIONIN 'Convert BAPIPAREX to PO Entities Customer Data)' called at the end of the include to update the customer fields created outside CI_EKKODB (Indeed EKKO_INCL_EEW_PS is included in MEPOHEADER_DATA so in MEPOHEADER).

NB: You could, if really necessary, and at your own risk, use field ASSIGNs from the main program (BAPI 2012 function group) to bypass the interface limitation.

0 Kudos

Hi Experts, Has anyone worked on such senario....

0 Kudos

Then what would be the method to update custom fields which has been added from Extensibility Registry?

amitg1275
Explorer
0 Kudos

hi Annu

Did you find the solution for this ?

Thanks

Amit