on 11-13-2017 3:32 PM
Hello everyone
We need to update the Production order header settlement. To do it, we have try to use the function CO_BI_AFPO_UPD.
Unfortunately, when calling the function, it is ending with an error message:
Log not found (in main memory).
Is anyone has succeed to use that functionÉ
How can we update production order header settlementÉ
Regards
Daniel
This post has been done twice by mistake,
If anyone know how to delete a post, please let me know.
For the solution, please see the post Solution
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry realized I made a mistake on the title. It is related to function IBAPI_ALM_ORDERSRULE
Here it is a peace of code used to test the function.
DATA: ls_cobl TYPE bapi_alm_order_cobl,
ls_cobl_up TYPE cobl_ibapi_update,
ls_caufvd TYPE caufvd,
ls_afvgd TYPE afvgd,
lt_ps_messages TYPE ps_messages.
SELECT SINGLE plnbez INTO @DATA(lv_matnr)
FROM afko
WHERE aufnr = '000000501483'. " Production order number
SELECT SINGLE objnp INTO @DATA(lv_objnp)
FROM afpo WHERE aufnr = '000000501483'
AND matnr = @lv_matnr.
SELECT SINGLE * INTO CORRESPONDING FIELDS OF ls_cobl
FROM cobrb
WHERE rec_objnr1 = lv_objnp.
ls_cobl-aqzif = 0. " Value to change
ls_cobl_up-aqzif = 'X'.
ls_caufvd-objnr = ls_cobl-objnr.
CALL FUNCTION 'IBAPI_ALM_ORDERSRULE_CHANGE'
EXPORTING
is_cobl = ls_cobl
is_cobl_up = ls_cobl_up
is_caufvd = ls_caufvd
* IS_AFVGD =
IMPORTING
et_messages = lt_ps_messages
EXCEPTIONS
error_changing_srule = 1
error_reading_srule = 2
mandatory_field_missing = 3
OTHERS = 4.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
COMMIT WORK AND WAIT.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.