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

Classification view

Former Member
0 Likes
395

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
354

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....

1 REPLY 1
Read only

Former Member
0 Likes
355

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....