Skip to Content
0

BAPI_ALM_ORDER_MAINTAIN update AUFK custom fields

Apr 10 at 02:16 PM

35

avatar image

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 !

2dk7i.png (40.2 kB)
rfgda.png (29.7 kB)
dquze.png (59.6 kB)
lvewr.png (66.9 kB)
wjmqa.png (17.6 kB)
10 |10000 characters needed characters left characters exceeded

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.

0

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.

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Amy King Apr 10 at 07:04 PM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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.

0