Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

(problem)create classification view using "BAPI_OBJCL_CREATE"

Former Member
0 Likes
619

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.

================================================================================================================

1 REPLY 1
Read only

Former Member
0 Likes
368

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