on 04-16-2024 12:41 PM
Hi All,
I want to add multiple components in production order in CO02 tcode. for this i am using BAPI_ALM_ORDER_MAINTAIN in exit (ZXCO1U11). But not able to do so as it is giving below error:
Purchasing organization 1000 not responsible for plant
Error during processing of BAPI methods.
kindly let me know how to solve the error.
wa_method-refnumber = '000001'.
wa_method-objecttype = 'COMPONENT'.
wa_method-method = 'CREATE'.
wa_method-objectkey = '000001138317'.
APPEND wa_method to it_method.
CLEAR wa_method.
wa_method-refnumber = '000000'.
wa_method-method = 'SAVE'.
wa_method-objectkey = '000001138317'.
APPEND wa_method to it_method.
CLEAR wa_method.
*wa_header-orderid = i_caufvd-aufnr.
*wa_header-planplant = wa_data-werks.
*wa_header-plant = wa_data-werks.
*APPEND wa_header to itab_header.
ls_components-material = wa_data-component.
ls_components-plant = wa_data-werks.
ls_components-stge_loc = '1001'.
ls_components-batch = wa_data-charg.
ls_components-item_cat = 'N'.
ls_components-activity = wa_operations-counter.
ls_components-backflush = wa_data-bf.
APPEND ls_components to itab_components.
CLEAR ls_components.
CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
* EXPORTING
* IV_MMSRV_EXTERNAL_MAINTENACE = 'X'
TABLES
it_methods = it_method
IT_HEADER = itab_header
* IT_HEADER_UP =
* IT_HEADER_SRV =
* IT_HEADER_SRV_UP =
* IT_USERSTATUS =
* IT_PARTNER =
* IT_PARTNER_UP =
* IT_OPERATION =
* IT_OPERATION_UP =
* IT_RELATION =
* IT_RELATION_UP =
IT_COMPONENT = itab_components
* IT_COMPONENT_UP =
* IT_OBJECTLIST =
* IT_OBJECTLIST_UP =
* IT_OLIST_RELATION =
* IT_TEXT =
* IT_TEXT_LINES =
* IT_SRULE =
* IT_SRULE_UP =
* IT_TASKLISTS =
* EXTENSION_IN =
RETURN = itab_return
* ET_NUMBERS =
* IT_REFORDER_ITEM =
* IT_REFORDER_ITEM_UP =
* IT_REFORDER_SERNO_OLIST_INS =
* IT_REFORDER_SERNO_OLIST_DEL =
* IT_PRT =
* IT_PRT_UP =
* IT_REFORDER_OPERATION =
* IT_SERVICEOUTLINE =
* IT_SERVICEOUTLINE_UP =
* IT_SERVICELINES =
* IT_SERVICELINES_UP =
* IT_SERVICELIMIT =
* IT_SERVICELIMIT_UP =
* IT_SERVICECONTRACTLIMITS =
* IT_SERVICECONTRACTLIMITS_UP =
* ET_NOTIFICATION_NUMBERS =
* IT_PERMIT =
* IT_PERMIT_UP =
* IT_PERMIT_ISSUE =
* IT_ESTIMATED_COSTS =
* IT_ADDITIONAL_TEXT =
.
IF line_exists( itab_return[ type = 'E' ] ).
RETURN.
ENDIF.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
* IMPORTING
* RETURN =
.
Hello,
A new API is given by SAP which allows to change production Order component. The new API allows to change one or more components of a given Production Order. The API CO_SE_PRODORD_CMP_CHANGE uses a Function Module CO_ XT_COMPONENTS_CHANGE. Below standard fields that are contained in IT_COMPONENTS can be changed.
Material, Plant, Storage location, Batch, Quantity, UOM,Requirement date, Operation internal counter.
Please check SAP note: 3281435-New Production Order API-Change component.
Br
Shailesh Mishra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
9 | |
6 | |
6 | |
5 | |
5 | |
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.