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: 

BAPI_ALM_ORDER_MAINTAIN update AUFK custom fields

Former Member
0 Kudos

Dear all,

I'm trying to find a solution to update custom fields from AUFK.
I already checked all posts without success.

Here you have my procedure:

  1. I created my custom fields in CI_AUKF structure
  2. I created append structure in IBAPI_CAUFVD_UPDATE
  3. I implemented my badi IBAPI_ALM_ORD_MODIFY with the following code, I checked with debug and all information is correctly filled.
  4. Then I implemented my abap code in program to call BAPI "BAPI_ALM_ORDER_MAINTAIN":

Unfortunately I'm not able to update my Z custom fields. I don't know why !

With this code in program I have the following error:

Sorry for French print screens but I'm not able to have all customizing in EN to create production order.


Thank you for your precious help !

5 REPLIES 5

amy_king
Active Contributor
0 Kudos

Hi Melissa,

One of your error messages indicates a problem with the methods. I'm comparing your code to my own calls to the same BAPI, though we don't have customer fields appended to AUFK so I'm not using the extension_in parameter. A difference I notice is in your SAVE method, try clearing the REFNUMBER field instead of passing a value. My own code looks like this...

ls_method-objectkey = orderid.
ls_method-objecttype = if_eams_bo_const=>gc_bapi_ord_obj_type-empty.
ls_method-method = if_eams_bo_const=>gc_bapi_ord_method-save.
CLEAR ls_method-refnumber.
APPEND ls_method TO lt_methods.

Cheers,
Amy

Former Member
0 Kudos

Hi Amy !

Thank you for your reply !

I tried to comment refnumber in SAVE method but unfortunately the issue is the same. I have same errors.


I tried some modifications on methods without success. This is the reason I'm looking for an example of code updating custom fields in AUFK.

matt
Active Contributor
0 Kudos

Can I just comment that tables with header lines have been obsolete for several years and are not best programming practice. Always use a separately defined work area.

Former Member
0 Kudos

Hi Matthew, Thank you for your comment, This is a copy paste from a topic just to test the BAPI. For the moment I really want to find a solution to update these customs fields. Thank you.

MariaJoãoRocha
Contributor
0 Kudos

Hello,

I'm facing same problem. Z fields on AUFK not updated with BAPI_ALM_ORDER_MAINTAIN.

I've seen other posts here on scn: the implementation of badi: IBAPI_ALM_ORD_MODIFY and enhance structure IBAPI_CAUFVD_UPDATE.

SAP provides note https://launchpad.support.sap.com/#/notes/2915541,sap_appl 618., and other notes...

it is really necessary to implement BADI IBAPI_ALM_ORD_MODIFY? and enhance IBAPI_CAUFVD_UPDATE?

ea-appl 605.

Thanks.

Regards,