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: 

ERROR IN BAPI BAPI_ALM_ORDER_MAINTAIN

0 Kudos

Hi,

I used BAPI BAPI_ALM_ORDER_MAINTAIN to change operation of production order but I unable to make changes due to error of purchase requisition and error number is 184. I just share screen shot of error which come while I want to change operation control key.

please suggest me if anyone has solution of this particular problem/error.

thanks in advance.

4 REPLIES 4

deependra_shekhawat3
Contributor
0 Kudos

Hi Deepak,

is your production order technically complete ?? or there could be issue like PR is released.

please elaborate more like what you are passing to BAPI.

0 Kudos

Hi Deependra,

there is the part of my source code in which parameters what I passed into BAPI and the purpose to change control key of specific operation.

Production order is not technically complete but released.

DATA: IT_METHOD LIKE BAPI_ALM_ORDER_METHOD OCCURS 0 WITH HEADER LINE,
      IT_OPERATION LIKE BAPI_ALM_ORDER_OPERATION OCCURS 0 WITH HEADER LINE,
      IT_OPERATION_UP LIKE BAPI_ALM_ORDER_OPERATION_UP OCCURS 0 WITH HEADER LINE,
      I_RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE.


DATA : REFNO TYPE N LENGTH 6 VALUE '000001'.


  IT_METHOD-REFNUMBER = REFNO.
  IT_METHOD-OBJECTTYPE = 'OPERATION'.
  IT_METHOD-METHOD = 'CHANGE'.
  IT_METHOD-OBJECTKEY = '0500000003590150'.
  APPEND IT_METHOD.
  CLEAR IT_METHOD.



  IT_METHOD-REFNUMBER = REFNO.
  IT_METHOD-OBJECTTYPE = SPACE.
  IT_METHOD-METHOD = 'SAVE'.
  IT_METHOD-OBJECTKEY = '050000000359'.
  APPEND IT_METHOD.

0 Kudos

That look good.

have you insert/add change value in operation table like it_operation and it_operation_up.

0 Kudos

yes, I inserted values into table it_operation and it_operation_up and values are as follows in which I just want to change control key and create purchase requisition and matl_group, pur_group and cost_element are also required to process following changes.

  it_operation-activity = '0150'.
  it_operation-control_key = 'ZCON'.
  it_operation-work_cntr = 'FMU'.
  it_operation-plant '3000'.
  it_operation-cost_element = '450850'.
  it_operation-pur_group = '020'.
  it_operation-matl_group = '026'.
  append it_operation.
  clear it_operation.



*  IT_OPERATION_UP-ACTIVITY = '0150'.
  it_operation_up-control_key = 'X'.
*  IT_OPERATION_UP-WORK_CNTR = 'FMU'.
*  IT_OPERATION_UP-PLANT =  '3000'.
  it_operation_up-cost_element = 'X'.
  it_operation_up-pur_group = 'X'.
  it_operation_up-matl_group = 'X'.
  append it_operation.
  clear it_operation.