‎2006 Nov 28 3:41 AM
Hi, everybody...
I have a problem.
I am trying to create classification view for material master using "BAPI_OBJCL_CREATE".
In my two case
case:one
================================================================================================================
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.
================================================================================================================
one case is success... material number:FG1701234567890123 been create classification, but it class typ is 001
case:two...I try to create class type is 022, but it's fail.
================================================================================================================
CALL FUNCTION 'BAPI_OBJCL_CREATE'
EXPORTING
objectkeynew = gs_classification-objectkeynew "material number + plant + batch
"material number ex:FG1701234567890123
"plant ex:1000
"batch ex:I don't know..How do I can get it
objecttablenew = gs_classification-objecttablenew " ex:MCHA
classnumnew = gs_classification-classnumnew "Class number ex:MTEST_CLASS
classtypenew = gs_classification-classtypenew " class type ex:022
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.
================================================================================================================
‎2006 Nov 28 2:22 PM
Hello,
Please try to create a class first for a material-plant-batch as required by you manually.
After this step, check the key (Field:OBJEK) in table KSSK for the above manually created classification. Pick the OBJEK from the table KSSK and pass the key in the same pattern as that of the value from table KSSK.
for example in case of Document classification,
for Doc DRW-1234567890-00-000,
we have the key (OBJEK) as: <b>DRW1234567890 00000</b>
Hope this helps.
Best Regards, Murugesh AS