‎2007 Apr 04 3:34 AM
I am using BAPI_MATERIAL_SAVEDATA to create material. However I also need to create the classification view but i think it is not included in the bapi. I try to use BAPI_OBJCL_CHANGE to create the classification view what I am passing is
OBJECTKEY 000000000000072532 (material number)
OBJECTTABLE MARA
CLASSNUM COSTCENTER (class number to be used)
CLASSTYPE 001
STATUS 1
STANDARDCLASS
CHANGENUMBER
KEYDATE 04/03/2007
NO_DEFAULT_VALUES
I need to enter the value of the cost center. My question is where will I put the value of the cost center in this bapi? Is it in the changenumber? If this is not the right bapi to use, then please let me know what is the best FM or bapi to use.
Thanks.
‎2007 Apr 04 3:54 AM
Katchak,
Try with below FM.
CALL FUNCTION 'BAPI_OBJCL_CREATE'
EXPORTING
objectkeynew = gs_classification-objectkeynew "material number ex:FG1701234567890123
objecttablenew = gs_classification-objecttablenew " ex:MARA
classnumnew = gs_classification-classnumnew "Class number ex:Material
classtypenew = gs_classification-classtypenew " class type ex:001
STATUS = '1'
STANDARDCLASS =
CHANGENUMBER =
KEYDATE = SY-DATUM
NO_DEFAULT_VALUES = ' '
IMPORTING
CLASSIF_STATUS =
TABLES
ALLOCVALUESNUM =
allocvalueschar = allocvalueschar " table with actual character and value , set instance allocvalueschar-instance = '001'.
ALLOCVALUESCURR =
return = return.
Don't forget to reward if useful....
‎2007 Apr 04 3:54 AM
Katchak,
Try with below FM.
CALL FUNCTION 'BAPI_OBJCL_CREATE'
EXPORTING
objectkeynew = gs_classification-objectkeynew "material number ex:FG1701234567890123
objecttablenew = gs_classification-objecttablenew " ex:MARA
classnumnew = gs_classification-classnumnew "Class number ex:Material
classtypenew = gs_classification-classtypenew " class type ex:001
STATUS = '1'
STANDARDCLASS =
CHANGENUMBER =
KEYDATE = SY-DATUM
NO_DEFAULT_VALUES = ' '
IMPORTING
CLASSIF_STATUS =
TABLES
ALLOCVALUESNUM =
allocvalueschar = allocvalueschar " table with actual character and value , set instance allocvalueschar-instance = '001'.
ALLOCVALUESCURR =
return = return.
Don't forget to reward if useful....