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

Relation between EQUZand KSSK

Former Member
0 Likes
2,134

Dear Experts,

Can any one help me in identify the relation between EQUZand KSSK table.

I have been told to use OBJEK FIELD. But OBJEK exist in only in KSSK , not in EQUZ.

Regards,

1 ACCEPTED SOLUTION
Read only

former_member438956
Active Participant
0 Likes
1,741

Hi Maverick44,

KSSK is a table for allocation of objects to class. Here the configuration details for the objects are saved. The objects can be either equipment, material or class. I guess ur req might be to get the classification details for a particular equipment. U can directly put equipment number in the Objek field and can fetch data from it.

Hope it clears u.

Regards,

Anil N.

6 REPLIES 6
Read only

Former Member
0 Likes
1,741

Hi,

Use DATBI in EQUZ table with DATUV in KSSK table. This is the only relation between these two tables.

Read only

former_member438956
Active Participant
0 Likes
1,742

Hi Maverick44,

KSSK is a table for allocation of objects to class. Here the configuration details for the objects are saved. The objects can be either equipment, material or class. I guess ur req might be to get the classification details for a particular equipment. U can directly put equipment number in the Objek field and can fetch data from it.

Hope it clears u.

Regards,

Anil N.

Read only

0 Likes
1,741

Thanks for ur reply Anil.

U r right. I want to get the classification details for a particular equipment. And as u said I was also thinking so but when I write select statement, it gives an error msg because I was using FOR ALL ENTRIES in my select statement.

Thanks again for ur replay.

Read only

0 Likes
1,741

Hi Maverick44,

I am not clear about ur requirement. but instead of using select query and fetching the details try to go with the below FM.

'CLAF_CLASSIFICATION_OF_OBJECTS'

U just specify the objek filed and class type to fetch ur relevant classification details.

Hope it helps u.

Regards,

Anil N.

Read only

0 Likes
1,741

Hi Maverick,

I have a piece of code which might be useful for you check it.


TYPES: BEGIN OF TY_TEXT ,
        ATINN  LIKE CABN-ATINN,        "Internal characteristic
        ATNAM  LIKE CABN-ATNAM,        "Characteristics Desc.
        ATWRT  LIKE AUSP-ATWRT,        "Characteristics Value
        ATBEZ  LIKE CABNT-ATBEZ,       "Characteristic Descriptions
        ATWRT1  LIKE AUSP-ATWRT,        "Characteristics Value
        ATBEZ1  LIKE CABNT-ATBEZ,       "Characteristic Descriptions
      END OF TY_TEXT.

DATA : IT_TEXT TYPE TABLE OF TY_TEXT, WA_TEXT  LIKE LINE OF IT_TEXT .

DATA: BEGIN OF T_TEMP OCCURS 0,
        CLASS LIKE KLAH-CLASS,         "Class number
        KLART LIKE KLAH-KLART,         "Class type
        CLINT LIKE KLAH-CLINT,         "Internal class number
      END OF T_TEMP.

* Get the classification details KSSK and KLAH.
    SELECT SINGLE S~CLASS S~KLART L~CLINT INTO
        (T_TEMP-CLASS, T_TEMP-KLART, T_TEMP-CLINT)
    FROM KSSK AS L INNER JOIN KLAH AS S ON S~CLINT EQ L~CLINT
    WHERE L~OBJEK EQ P_EQUNR .

    CLEAR :IT_TEXT[],WA_TEXT.

* retrieve characteristics info of a class
    SELECT * FROM KSML WHERE CLINT = T_TEMP-CLINT
                         AND KLART = T_TEMP-KLART.
* retrieve characteristics value info
      SELECT * FROM AUSP WHERE OBJEK = P_EQUNR 
                           AND ATINN = KSML-IMERK
                           AND KLART = KSML-KLART.
* retrieve characteristics info
        SELECT SINGLE * FROM CABN WHERE ATINN = AUSP-ATINN.
        MOVE CABN-ATNAM TO WA_TEXT-ATNAM. "Characteristics desc.
        MOVE AUSP-ATWRT TO WA_TEXT-ATWRT. "Characteristics Value
        MOVE CABN-ATINN TO WA_TEXT-ATINN.
        APPEND WA_TEXT TO IT_TEXT.
        CLEAR: WA_TEXT.
      ENDSELECT.                         "ausp
    ENDSELECT.

    DELETE IT_TEXT WHERE ATWRT IS INITIAL.

    LOOP AT IT_TEXT INTO WA_TEXT.
      SELECT SINGLE ATBEZ INTO WA_TEXT-ATBEZ FROM CABNT
      WHERE ATINN = WA_TEXT-ATINN AND SPRAS = 'EN' . "SY-LANGU.
      MODIFY IT_TEXT FROM WA_TEXT.
      CLEAR WA_TEXT.
    ENDLOOP.

Thanks & regards,

Dileep .C

Read only

Former Member
0 Likes
1,741

Hi,

Try with following.

EQUZ-DATBI = KSSK-DATUV

Thank you,

Sekhar.