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: 

Custom fields with BAPI_PO_CHANGE ( extensionin structure ??)

Former Member
0 Kudos

I need to change a custom field of PO using the BAPI_PO_CHANGE. The z field is zz_field is a header field and I need to modify this field value to ‘ABCD’.

I tried using this BAPI in SE37 but I am not able to get the desired results.

Any pointers on how do I use extensionin structure ?

Rgds,

Ajay.

5 REPLIES 5

Former Member
0 Kudos

Hi,

Check this..

Add the 'z' field to BAPI_TE_MEPOHEADER.

DATA: EXTENSIONIN LIKE TABLE OF BAPIPAREX

WITH HEADER LINE.

DATA: S_EXTENSION LIKE BAPI_TE_MEPOHEADER.

S_EXTENSION-ZZ_FIELD = 'ABC'.

EXTENSIONIN-STRUCTURE = 'BAPI_TE_MEPOHEADER'

EXTENSIONIN-VALUEPART1 = S_EXTENSION.

APPEND EXTENSIONIN.

When you do it through SE37 you have to count the number of characters in the structure BAPI_TE_MEPOHEADER and place the value accordingly...

Thanks,

Naren

Thanks,

Naren

0 Kudos

Didn't get the following point

"Add the 'z' field to BAPI_TE_MEPOHEADER"

I am trying to do it using SE37 so cannot do

"

DATA: EXTENSIONIN LIKE TABLE OF BAPIPAREX

WITH HEADER LINE.

DATA: S_EXTENSION LIKE BAPI_TE_MEPOHEADER.

S_EXTENSION-ZZ_FIELD = 'ABC'."

Is there a way this can be achieved using SE37 first so that POC is ready and then I code for the same ?

Rgds,

Ajay

Message was edited by: Ajay Sharma

Former Member
0 Kudos

Hi,

I believe you cannot test the BAPI for modifying the custom fields with out adding the same to the structure BAPI_TE_MEPOHEADER.

Thanks,

Naren

Former Member
0 Kudos

I have an issue where there is a customer field create in BAPI_TE_MEPOHEADER that has the data type WERT15. This is a currency field and I can not figure out how to update it when E1BPPAREX-VALUEPART1 is a CHAR field. If you pass the value in CHAR format you get an SQL error on the update to EKKO.

Former Member
0 Kudos

Hi Paul,

Similar error i am also facing.

Kindly let me know if you have got the solution.

thanks

Suganya