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 classification characteristics

Former Member
0 Kudos

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.

13 REPLIES 13

sreeramkumar_madisetty
Active Contributor
0 Kudos

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

Former Member
0 Kudos

use the bapi

"BAPI_OBJCL_CREATE" i hope it will work

Former Member
0 Kudos

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.

0 Kudos

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

0 Kudos

Hi

Try the BAPI: BAPI_OBJCL_GETOBJECTS.

Regards,

Sreeram

0 Kudos

Hello

Material number will be with leading zeros and '+' sign do not need.

In your case: object key 00000000007122201409FM0004

0 Kudos

Hi,

How to copy images pls let me know so that I can show my problem.

Pls help me.

0 Kudos

Hello

I don't know how to copy images

But you may to tell about problem.

0 Kudos

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.

0 Kudos

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.

Former Member
0 Kudos

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.

0 Kudos

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

0 Kudos

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