Application Development 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: 

Class Number

Former Member
0 Kudos

Hi all,

Is there a Function Module to get the class number(CLASS) given the material number.

Please let me know if this can be done.

Thanks & Regards

Mahesh

2 REPLIES 2

former_member214131
Active Contributor
0 Kudos

Hello,

Check BAPI: BAPI_OBJCL_GETCLASSES

Pass Material number for object key, 'MARA' for import table, '001' for classtype and you see the associated classes to the Material.

Also you can check the FuGr CLBPA for other related BAPIs.

Hope this helps.

Best Regards, Murugesh AS

Former Member
0 Kudos

Hi Mahesh,

Use BAPI :BAPI_OBJCL_GETCLASSES

See sample call for this FM.

CALL FUNCTION 'BAPI_OBJCL_GETCLASSES'

EXPORTING

objectkey_imp = 'TESTMATERIAL'

objecttable_imp = 'MARA'

classtype_imp = '001'

  • READ_VALUATIONS =

  • KEYDATE = SY-DATUM

  • LANGUAGE = SY-LANGU

tables

alloclist = lt_alloclist

  • ALLOCVALUESCHAR =

  • ALLOCVALUESCURR =

  • ALLOCVALUESNUM =

return = lt_return

In above function call, after passing values as mentioned, you will get the class number in lt_alloclist

Also you can get success or error msg in return table.

Hope it helps.

Regds,

Akshay bhagwat

Note: Pls reward points if it helps.