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

Import Parameters For BAPI_OBJCL_CREATE

Former Member
0 Likes
1,101

Hi all,

          i want to create classification for Material .i'm using BAPI_OBJCL_CREATE to assign Classification for Material . I have created material using BAPI_MATERIAL_SAVEDATA. when i entered Classification Char in BAPI_OBJCL_CREATE  it return message Assignment is created but when i check in MM03 the values not populated .Is it need to call the BAPI_ TRANSACTION_COMMIT after execute this BAPI?.What are the Import Parameters for Creating Classification using this BAPI?

Thanks

Vignesh

1 ACCEPTED SOLUTION
Read only

Former Member
637

Hi Vicky,

Sometimes BAPI doesnt give error even when the values are not acceptable to Material master Classification view.

Please try creating The classification with the same values in transaction MM01/MM02.

If it accepts, then there is a problem with the way you are passing the values.

CALL FUNCTION 'BAPI_OBJCL_CREATE'
           
EXPORTING
              objectkeynew    = lv_object
              objecttablenew  = lv_obtable
              classnumnew     = lv_class
              classtypenew    = lv_klart
           
TABLES
              allocvaluesnum  = lt_classnum
              allocvalueschar = lt_classval
             
return          = lt_return1_temp.

In Lv_object put the material number, in lv_obtable put "MARA"

put appropriate class and klart values.

important point : you have to put ATNAM IN BOTH lt_classnum-CHARACT and lt_classval-CHARACT.

and value of characteristic in lt_classval-value_char.

Let me know if this helps.

Thanks

gaurav guglani

1 REPLY 1
Read only

Former Member
638

Hi Vicky,

Sometimes BAPI doesnt give error even when the values are not acceptable to Material master Classification view.

Please try creating The classification with the same values in transaction MM01/MM02.

If it accepts, then there is a problem with the way you are passing the values.

CALL FUNCTION 'BAPI_OBJCL_CREATE'
           
EXPORTING
              objectkeynew    = lv_object
              objecttablenew  = lv_obtable
              classnumnew     = lv_class
              classtypenew    = lv_klart
           
TABLES
              allocvaluesnum  = lt_classnum
              allocvalueschar = lt_classval
             
return          = lt_return1_temp.

In Lv_object put the material number, in lv_obtable put "MARA"

put appropriate class and klart values.

important point : you have to put ATNAM IN BOTH lt_classnum-CHARACT and lt_classval-CHARACT.

and value of characteristic in lt_classval-value_char.

Let me know if this helps.

Thanks

gaurav guglani