2013 Jul 11 7:09 PM
Good morning everyone,
I need to update a field in the classification of the material transaction msc2n, I used the function VB_BATCH_GET_DETAIL to read the ratings, there is some function of an update?
from already thank you.
2013 Jul 11 8:29 PM
Hi Lucas,
to create caracteristic :
CALL FUNCTION 'BAPI_CHARACT_CREATE'
EXPORTING
charactdetail = is_charactdetail
TABLES
charactdescr = it_charactdescr
charactvaluesnum = it_charactnum
return = it_return.
to create class (with caracteristic):
CALL FUNCTION 'BAPI_CLASS_CREATE'
EXPORTING
classnumnew = itg_data-classnum
classtypenew = '022'
classbasicdata = is_classdetail
TABLES
return = it_return
classdescriptions = it_libelle
classcharacteristics = it_charact.
to get the number link to the material number :
CALL FUNCTION 'BAPI_OBJCL_GET_KEY_OF_OBJECT'
EXPORTING
objectname = w_objectname
objecttable = w_nametable
classtype = w_classtype
create_missing_key = 'X'
IMPORTING
clobjectkeyout = w_key
TABLES
return = it_return.
Create the link between material & class
CALL FUNCTION 'BAPI_OBJCL_CREATE_KEY'
EXPORTING
clobjectkey_new = w_key
classnum_new = itg_data-classnum
status = '1'
TABLES
return = it_return.
I have a full set of this kind of program, if you need it ... just ask
regards
Fred
2013 Jul 11 9:42 PM
Hi Lucas,
You can see few BAPIs in the below link:
http://wiki.sdn.sap.com/wiki/display/ABAP/ECC+standard+Batch+Input+programs
Sample code in below link is for adding Allowed characteristics values.
If you need to only update a value you needn't fill and pass 'charactvaluesdescrnew' internal table.
Regards,
Nisha Vengal.