Skip to Content
0
Former Member
Feb 26, 2009 at 03:49 PM

using BAPI_ALM_ORDER_MAINTAIN to update info record of a production order

378 Views

Hi All,

Please let me know how the bapi BAPI_ALM_ORDER_MAINTAIN can be used to change the info record of a production order.

                      wa_method-refnumber     = '000001'.
                      wa_method-objecttype = 'OPERATION'.
                      wa_method-method     = 'CHANGE'.
                      wa_method-objectkey  = lv_objkey.
                      APPEND wa_method TO it_method.
                      CLEAR wa_method.

                      wa_method-refnumber     = '000001'.
                      wa_method-objecttype = ' '.
                      wa_method-method     = 'SAVE'.
                      wa_method-objectkey  = ' '.
                      APPEND wa_method TO it_method.
                      CLEAR wa_method.

                      wa_oper-info_rec  = ls_afvc-infnr.
                      APPEND ls_op_alm TO it_oper.

                      wa_oper_up-info_rec = 'X'.
                      APPEND wa_oper_up TO it_oper_up.

                      CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
                        TABLES
                          it_methods      = it_method
                          it_operation    = it_oper                           " it_header = it_header
                          it_operation_up = it_oper_up
                          return          = gt_alm_maint_return
                          et_numbers      = lt_numbers.

I am getting the below error

"Functional location or Equipment is required.

Please help me to solve this issue.