Skip to Content
0
Former Member
May 15, 2007 at 02:46 PM

VC : Update Equipment with new configuration number

214 Views

Hi,

I am trying to update an existing equipment with a new configuration number (cuobj).

I used try to use 'BAPI_EQUI_CHANGE' to achieve this but apparently they didn't work even though i've received no exceptions. (no luck either with EQUIPMENT_MODIFY)

For 'BAPI_EQUI_CHANGE' i used following code :

data : v_equipment like BAPI_ITOB_PARMS-EQUIPMENT,

v_datageneral like BAPI_ITOB,

v_datageneralx like BAPI_ITOBX,

v_dataspec like BAPI_ITOB_EQ_ONLY,

v_dataspecx type BAPI_ITOB_EQ_ONLYX,

return type BAPIRET2.

CALL FUNCTION 'BAPI_EQUI_GETDETAIL'

EXPORTING

EQUIPMENT = v_equipment

IMPORTING

DATA_GENERAL_EXP = v_datageneral

DATA_SPECIFIC_EXP = v_dataspec

return = return.

IF return is initial.

v_dataspec-READ_CUOBJ = newcuobj.

v_dataspecx-READ_CUOBJ = 'X'.

CALL FUNCTION 'BAPI_EQUI_CHANGE'

EXPORTING

EQUIPMENT = v_equipment

DATA_GENERAL = v_datageneral

DATA_GENERALX = v_datageneralx

DATA_SPECIFIC = v_dataspec

DATA_SPECIFICX = v_dataspecx

IMPORTING

RETURN = return.

IF return is initial.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

ENDIF.

ENDIF.

thanks for your help.