Skip to Content
0

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

Nov 13, 2017 at 03:32 PM

48

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Daniel St-Jacques Nov 13, 2017 at 03:38 PM
0

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.


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

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.

0
Daniel St-Jacques May 02 at 01:54 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded