05-29-2009 8:42 AM
how to delete or deactivate component from iw32 using functions module BAPI_ALM_ORDER_MAINTAIN (or) Is there any other Funcrions Module to delete component from iw32
05-30-2009 7:38 AM
i have founded out myself
&----
*& Report ZWW_BAPI
*&
&----
*&
*&
&----
REPORT ZWW_BAPI.
DATA t_meth TYPE TABLE OF bapi_alm_order_method.
**Internal table for Operation (BAPI)
DATA t_oper TYPE TABLE OF bapi_alm_order_operation.
DATA t_comp TYPE TABLE OF bapi_alm_order_component.
**Internal Table for Opertaions UP (BAPI)
DATA t_comp_up TYPE TABLE OF bapi_alm_order_component_up.
**Internal table for BAPI Return code
DATA t_ret TYPE TABLE OF bapiret2.
***WORK AREA DECLARATIONS
**Work Area for Hedaer
DATA:wa_header TYPE caufvdb,
wa_meth TYPE bapi_alm_order_method,
wa_op TYPE afvgb,
wa_comp TYPE resbb,
wa_comp1 TYPE bapi_alm_order_component,
wa_comp_up TYPE bapi_alm_order_component_up,
wa_oper TYPE bapi_alm_order_operation.
PARAMETERS:TEST.
****Fill Method Internal table
CLEAR wa_meth.
wa_meth-method = 'SAVE'.
*wa_meth-method = 'DELETE'.
APPEND wa_meth TO t_meth.
wa_meth-refnumber = sy-tabix.
wa_meth-objecttype = 'COMPONENT'.
wa_meth-method = 'DELETE'.
wa_meth-objectkey(12) = '000004471304'.
*wa_meth-objectkey+12(4) = '0010'.
*wa_meth-objectkey+16(4) = '0010'.
APPEND wa_meth TO t_meth.
**Component Internal table
wa_comp1-reserv_no = '0000653255'.
wa_comp1-res_item = '0003'.
wa_comp1-activity = '0010'.
*wa_comp1-item_number = '0010'.
*wa_comp1-special_stock = 'B'.
*wa_comp1-requirement_quantity = '15'.
*wa_comp1-stge_loc = '0001'.
*wa_comp1-backflush = 'X'.
APPEND wa_comp1 TO t_comp.
**Component Update Internal table
*wa_comp_up-special_stock = 'X'.
*wa_comp_up-backflush = 'X'.
*wa_comp_up-requirement_quantity = 'X'.
*wa_comp_up-stge_loc = 'X'.
*APPEND wa_comp_up TO t_comp_up.
**Call Bapi
BREAK-POINT.
CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
TABLES
it_methods = t_meth
it_component = t_comp
*it_component_up = t_comp_up
return = t_ret.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
05-30-2009 7:39 AM
04-10-2013 9:31 AM
SARATHI
I have implemented the code above and trying to delete the auto created reservation and I get the error msg below.
Item 0000: Deletion of components to be repaired not planned
Error during processing of BAPI methods
can you please assist me on how to go around this, because wen I do it manually using IW32 i can be able to delete the reservation.
Thanks,
Tumelo Modise