‎2008 Aug 18 2:34 PM
HI friends,
I posted the stock in some batch, now i want to assign classification(charectorstics) to that posted batch,
plz if u know any FM or BAPI to do this, help me out by sending some sample coding.
Thanks,
Gururaj
‎2008 Aug 18 2:50 PM
Am not sure, whether you want to assign all the characteristics to a material or change some of the characteristics. Am sending you both the function modules; Try out
BAPI_OBJCL_CREATE and
BAPI_OBJCL_CHANGE
For updation:
CALL FUNCTION 'BAPI_OBJCL_GETDETAIL'
EXPORTING
objectkey = Full material number
objecttable = 'MARA'
classnum = class name
classtype = '023'
unvaluated_chars = c_true
TABLES
allocvaluesnum = lt_num
allocvalueschar = lt_char
allocvaluescurr = lt_curr
return = lt_ret.
Now modify the required characteristics in thelt_num, lt_char, lt_curr and call the below function module to update it
CALL FUNCTION 'BAPI_OBJCL_CHANGE'
EXPORTING
objectkey = Full material number
objecttable = MARA
classnum = class name
classtype = '023'
TABLES
allocvaluesnumnew = lt_num
allocvaluescharnew = lt_char
allocvaluescurrnew = lt_curr
return = lt_ret.
If it is successful in updation callthe below FM
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
Regards,
Kiran Bobbala
‎2008 Aug 18 2:56 PM
Hello
1. For creating - BAPI_OBJCL_CREATE
2. For change - BAPI_OBJCL_CHANGE
‎2008 Oct 11 8:06 AM