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: 

How to find the superclass of material ?

former_member183990
Active Contributor
0 Kudos

Hello gurus,

if i have a sub class of a material , how to find the superclass of it?

Regards

S.Janagar

4 REPLIES 4

Former Member
0 Kudos

Hi,

Check that class properties in SE24.

former_member213275
Contributor
0 Kudos

HI

Check table "KLAH".

Srikanth.

former_member213275
Contributor
0 Kudos

Hi,

Please close the thread if it is answered.

Srikanth.

former_member183990
Active Contributor
0 Kudos

Solved in this way

*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     VALUE(SUBCLASS) TYPE  KLSCHL
*"  EXPORTING
*"     VALUE(CLASS) TYPE  KLASSE_D
*"  TABLES
*"      RETURN STRUCTURE  BAPIRET2 OPTIONAL
*"----------------------------------------------------------------------

  DATA: lv_clint TYPE clint,
        lv_clint1 TYPE clint.
  CLEAR: lv_clint,lv_clint1,class.
  FREE: return.
  SELECT SINGLE clint
                FROM swor
                INTO lv_clint
                WHERE kschl = subclass.
  IF lv_clint IS NOT INITIAL.
    SELECT DISTINCT clint FROM kssk
                    INTO lv_clint1
                    WHERE objek = lv_clint.
    ENDSELECT.
    IF lv_clint1 IS NOT INITIAL.
      SELECT SINGLE class
                FROM klah
               INTO class
               WHERE clint = lv_clint1.
    ENDIF.
    ELSE.
      CONCATENATE subclass 'Subclass not found' INTO return-message SEPARATED BY space.
      APPEND return.
      CLEAR return.
  ENDIF.

ENDFUNCTION.