2 weeks ago
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 =
.
Hi,
Greetings,
1. I Understand that you want to change the Component details inthe Production order.
2. I see that you are using the BAPI- BAPI_ALM_ORDER_MAINTAIN
Kindly note this BAPI is not for Production order change this BAPI used to change maintenance or service orders and their sub-objects.
Also we dont have any BAPI to change the Components in the order, we need to try other options.
Br,
Dsk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
106 | |
12 | |
10 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.