‎2006 Jun 20 1:45 PM
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
‎2006 Jun 21 10:10 AM
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
‎2006 Jun 21 10:53 AM
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.