03-22-2012 11:05 AM
Dear Experts,
I have a requirement to change the Equipment class and characteristics for the serial number in Tcode !Q02. I found a BAPI BAPI_OBJCL_CHANGE, in which the exporting parameter is :Classification Status and the Tables all the data are related to Characteristic. So will this BAPI create or change the Equipment Class(class type & class Desc.) Properties?
If not can anyone please suggest me a proper BAPI for the same.
Thank in advance.
03-22-2012 3:22 PM
First read SAP Knowledge Base Article 1664967 - Updating characteristics values on technical objects via BAPI_OBJCL_CHANGE x
Also check Note 922075 - BAPI_OBJCL_CHANGE - Char value assignments disappear
Regards,
Raymond
03-08-2015 6:56 AM
Hi,
I have used the BAPI BAPI_OBJCL_CHANGE, BAPI_TRANSACTION_COMMIT in sequence and got the classification updated. I have tried the following coding. Please try the same.
data : lt_val_num type TABLE OF BAPI1003_ALLOC_VALUES_NUM,
lt_val_char type TABLE OF BAPI1003_ALLOC_VALUES_CHAR,
lt_val_curr type TABLE OF BAPI1003_ALLOC_VALUES_CURR,
lt_return type TABLE OF BAPIRET2,
ls_val_char type BAPIRET2.
ls_val_char-CHARACT = 'KONDM'.
ls_val_char-VALUE_CHAR = '01'.
APPEND ls_val_char to lt_val_char.
ls_val_char-CHARACT = 'EXTWG'.
ls_val_char-VALUE_CHAR = '1001 COLORS'.
APPEND ls_val_char to lt_val_char.
CALL FUNCTION 'BAPI_OBJCL_CHANGE'
EXPORTING
objectkey = '000000000011049924'
objecttable = 'EQUI'
classnum = 'ZCOUP'
classtype = '002'
STATUS = '1'
TABLES
allocvaluesnumnew = lt_val_num
allocvaluescharnew = lt_val_char
allocvaluescurrnew = lt_val_Curr
RETURN = lt_ret.
read table lt_ret to ls_ret with key type = 'E'.
if sy-subrc ne 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
endif.
03-09-2015 4:24 AM