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

table name - urgent

Former Member
0 Likes
611

hi

i want to find the class and class type based on matnr ,batch and werks..

Please can amy one suggest me the table name from where i can get them

Hello,

Check this


  SELECT A~CUOBJ A~OBJEK A~KLART B~ATINN B~ATZHL B~ATWRT B~ATFLV
         B~ATAWE B~ATFLB B~ATAW1 C~CLINT D~CLASS
    INTO CORRESPONDING FIELDS OF TABLE G_T_OBJECTS
    FROM INOB AS A INNER JOIN AUSP AS B
      ON A~CUOBJ = B~OBJEK AND
         A~KLART = B~KLART
         INNER JOIN KSSK AS C
         ON B~OBJEK = C~OBJEK AND
            B~KLART = C~KLART
         INNER JOIN KLAH AS D
         ON C~CLINT = D~CLINT
   WHERE A~OBJEK IN S_MATNR AND
         A~OBTAB EQ 'MARA'  AND
         A~KLART IN S_KLART AND
         B~ADZHL EQ '0000'  AND
         C~LKENZ EQ ' '     AND
         D~CLASS IN S_CLASS.

Vasanth

3 REPLIES 3
Read only

Former Member
0 Likes
577

Hello,

Check this


  SELECT A~CUOBJ A~OBJEK A~KLART B~ATINN B~ATZHL B~ATWRT B~ATFLV
         B~ATAWE B~ATFLB B~ATAW1 C~CLINT D~CLASS
    INTO CORRESPONDING FIELDS OF TABLE G_T_OBJECTS
    FROM INOB AS A INNER JOIN AUSP AS B
      ON A~CUOBJ = B~OBJEK AND
         A~KLART = B~KLART
         INNER JOIN KSSK AS C
         ON B~OBJEK = C~OBJEK AND
            B~KLART = C~KLART
         INNER JOIN KLAH AS D
         ON C~CLINT = D~CLINT
   WHERE A~OBJEK IN S_MATNR AND
         A~OBTAB EQ 'MARA'  AND
         A~KLART IN S_KLART AND
         B~ADZHL EQ '0000'  AND
         C~LKENZ EQ ' '     AND
         D~CLASS IN S_CLASS.

Vasanth

Read only

Former Member
0 Likes
577

Hi Neha,

Material Class and class type exist in table KLAH.

Please refer to below code for more:

select single clint from kssk

into wf_clint

where objek = p_matnr and klart = '001'.

if sy-subrc = 0.

select single class from klah

into wf_class

where clint = wf_clint and klart = '001'.

select single kschl from swor into wf_desc

where clint = wf_clint and

spras = sy-langu.

endif.

I hope this helps.

Please reward if helpful.

Regards,

Amit Goyal

Read only

former_member491305
Active Contributor
0 Likes
577

Hi,

KSSK--?Table which is having assignment of classes to the object

KLAH-->Class Header Details:

TCLA-->Class types

CABN-->Characteristics

KSML--->Characteristics of a Class