Application Development and Automation 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: 
Read only

BAPI_PO_Change with custom fields

DarcyMorse
Participant
0 Likes
1,669

I have search the internet on how to update custom fields in EKKO thru ABAP.

I am trying to use BAPI_PO_CHANGE with the table Extensionin following a couple examples I found on the internet. 

If I don't have any fields marked in the BAPI_TE_MEPOHEADERX line but have the PO number filled in, the 2 fields that I am trying to update aren't changed or deleted.  I would expect this.

If I put an X in for 1 of the 2 fields I am trying to update, both fields are cleared out.   I tried filling out all fields in the BAPI_TE_MEPOHEADER line, and only filling in the date field.  It made no difference.  The data consistently disappears.

The first concern I have is there are some numeric fields (data type INT4) in CI_EKKODB even though I am not trying to update them.

The second concern is that I am trying to update the date (data type DATUM) and time (data type UZEIT).

Any ideas of what I should be looking at next, or do I need to use a different method, because there are numeric fields in CI_EKKODB?

5 REPLIES 5
Read only

Former Member
0 Likes
1,244

Hi ,

Which version of R/3 you are using? Check the below note which might be useful or at least may give you some idea based on the correction SAP has done.

936786 - BAPI_PO_CHANGE: Customer data is not transferred


Not sure how you have populated the extension table. But it is always better to use character fields in CI* structure.

R





Read only

0 Likes
1,244

Thanks for the reply Rudra.  SAP_APPL is Release 617 SP 6, so it looks like this note wouldn't apply.  However, it describes the problem exactly. 

Read only

0 Likes
1,244

I can't change the CI* structure that has the numeric fields.  Is there a different route I should be going with this?

Read only

0 Likes
1,244

Hi Darcy,

By default, the "Enhancement Category" for CI* structures are set as "Not classified". Please change it first from Extras->Enhancment Category first("Can be enhanced"). Then it should allow you to change the fields.

Or else, there are implicit enhancment route which would off course requires more work to do and you end up implementing the BADI ME_BAPI_PO_CUST. But not recommended as SAP is doing the job for you and you don't have to worry if a new field is added in future.

R

Read only

0 Likes
1,244

This note is obsolete for you, but supply you with a good place to put a breakpoint during execution.


Hint: Look at Enhancment (SMOD) SAPL2012 and/or BAdI (SE18) ES_WRF_POHF_CUST_ENHANCEMENT for process adaptation.


Regards,

Raymond