cancel
Showing results for 
Search instead for 
Did you mean: 

Production order settlement CO_BI_AFPO_UPD end with error (Log not found in main memory)

dstjacques
Participant
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

dstjacques
Participant
0 Kudos

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

dstjacques
Participant
0 Kudos

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.


willianbozzi
Explorer
0 Kudos

Hi Daniel,

Were you able to get this issue solved?

If so, could you please share the solution? I am facing the same problem here.

Thank you!

Willian.