09-15-2009 11:15 AM
Hi Experts,
I want to display Class classification characteristics using material number, batch, class and class type.
I am using BAPI 'BAPI_CLASS_GET_CHARACTERISTICS' but I am unable to fetch characteristics values.
Please help me.
09-15-2009 11:20 AM
Hi
Try the FM: CLA1_CREATE_CLFMAS.
Use the BAPI : BAPI_OBJCL_GETDETAIL
Regards,
Sreeram
Edited by: Sreeram Kumar Madisetty on Sep 15, 2009 12:43 PM
09-15-2009 11:29 AM
09-15-2009 11:30 AM
Hello
CALL FUNCTION 'BAPI_OBJCL_GETDETAIL'
EXPORTING
objectkey = object " material number + batch number
objecttable = 'MCH1'
classnum = 'TARA'
classtype = '023'
TABLES
allocvaluesnum = numtab
allocvalueschar = chatab
allocvaluescurr = curtab
return = rettab.
09-15-2009 11:48 AM
Hi Dzed Maroz,
Actually my material number is 71222014 an
batch is 09FM0004
So I used OBJECT KEY as 71222014+09FM0004 but I am getting error like 'Enter Batch Number'.
Pls help me
09-15-2009 11:55 AM
09-15-2009 11:56 AM
Hello
Material number will be with leading zeros and '+' sign do not need.
In your case: object key 00000000007122201409FM0004
09-15-2009 11:59 AM
Hi,
How to copy images pls let me know so that I can show my problem.
Pls help me.
09-15-2009 12:04 PM
Hello
I don't know how to copy images
But you may to tell about problem.
09-15-2009 12:06 PM
Hi Dzed Maroz ,
It is not working. I have used objectkey as 00000000007122201409FM0004
and object table as MCH1
and classnum as TARA
and classtype as 022.
But i am getting error as object 00000000007122201409FM0004 does not exist as RETURN statement.
Pls help me.
09-15-2009 12:16 PM
Hello
I am sorry.
Classnum TARA - it is from my programm. In your system must be another classnum.
For get classnum:
1. Goto table MCH1 with material number and batch number.
2. Get fiels CUOBJ_BM
3. Goto table KSSK with MCH1-CUOBJ_BM (with leading zeros, like 000000000001323418)
4. You will have classtype (022 or 023) and CLINT.
5. Goto table KLAH with CLINT = KSSK-CLINT and KLART = KSSK-KLART
6. You will have classnum in field CLASS.
09-15-2009 1:10 PM
Hi ,
for Displaying class go to CL03 , Enter Class & Class type to see characteristics.
Check this code ....
{ CALL FUNCTION 'BAPI_CLASS_GET_CHARACTERISTICS'
EXPORTING
CLASSNUM = IT_MATMAS-CLASS
CLASSTYPE = IT_MATMAS-KLART
KEY_DATE = SY-DATUM
WITH_VALUES = 'X'
TABLES
CHARACTERISTICS = IT_CHARACTER
CHAR_VALUES = IT_CHAR_VALUE.
LOOP AT IT_CHARACTER.
IT_CHAR-CHARACT = IT_CHARACTER-NAME_CHAR.
IT_CHAR-CHARACT_DESCR = 'Expiration date, shelf life' .
IT_NUM-CHARACT = IT_CHARACTER-NAME_CHAR.
IT_NUM-CHARACT_DESCR = 'Expiration date, shelf life' .
IT_CURR-CHARACT = IT_CHARACTER-NAME_CHAR.
IT_CURR-CHARACT_DESCR = 'Expiration date, shelf life' .
APPEND IT_CHAR TO IT_CHAR.
CLEAR IT_CHAR.
APPEND IT_NUM TO IT_NUM.
CLEAR IT_NUM.
APPEND IT_CURR TO IT_CURR .
CLEAR IT_CURR.
endloop.
P_MATNR(18) = IT_MATMAS-MATNR.
CALL FUNCTION 'BAPI_OBJCL_CREATE'
EXPORTING
OBJECTKEYNEW = P_MATNR
OBJECTTABLENEW = 'MARA'
CLASSNUMNEW = IT_MATMAS-CLASS
CLASSTYPENEW = IT_MATMAS-KLART
STATUS = '1'
KEYDATE = SY-DATUM
TABLES
ALLOCVALUESNUM = IT_NUM
ALLOCVALUESCHAR = IT_CHAR
ALLOCVALUESCURR = IT_CURR
RETURN = IT_RETURN2. }
Regards
ABG.
09-15-2009 2:01 PM
Hi,
I have litle doubt,
Class characteristic values varies depending on material number and batch ? or for the particular class and class type there is same characteristic values ?
pls help me
09-15-2009 2:07 PM
Use FM: CLAF_CLASSIFICATION_OF_OBJECTS
Here Object = Material concatenatred with batch.
This will give all characteristics and their values.
If not maintained, then its blank.
~Pranu