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: 

types declaration

Former Member
0 Kudos
90

hi,

Please see the following declaration,

TYPES :BEGIN OF WA_ADMN_MAS.

TYPES :SEL TYPE CROSS-TYPE.

INCLUDE STRUCTURE ZTRST_ADMN_MAS.

TYPES :END OF WA_ADMN_MAS.

why did they write TYPES :SEL TYPE CROSS-TYPE.

what is the use of the statement.

please revert backas soon as possible

Thanks & regards,

Kirthi

1 ACCEPTED SOLUTION

Former Member
0 Kudos
65

Hi

Because it added a new field, not included in dictionary structure (or table) ZTRST_ADMN_MAS, in the type defination.

When the INCLUDE STRUCTURE is used to declare a structure, the first statament has to end with a point, so or you write:

TYPES : BEGIN OF WA_ADMN_MAS.
TYPES : SEL TYPE CROSS-TYPE.
                INCLUDE STRUCTURE ZTRST_ADMN_MAS.
TYPES : END OF WA_ADMN_MAS.

or

TYPES : BEGIN OF WA_ADMN_MAS,
                SEL TYPE CROSS-TYPE.
                INCLUDE STRUCTURE ZTRST_ADMN_MAS.
TYPES : END OF WA_ADMN_MAS.

Max

3 REPLIES 3

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
65

What they are defining here is that the structure should have all fields of ZTRST_ADMN_MAS as well as another field call SEL. Most likely this SEL field is the selection handling field for maybe a table control or ALV grid.

Regards,

RIch HEilman

Former Member
0 Kudos
65

Hi Kirti,

TYPES :SEL TYPE CROSS-TYPE.

denotes declaring a variable which is of the type Field:<b>TYPE</b> from Table:<b>CROSS</b>. It is basically a Single-Character Indicator.

Reward if useful.

Thanks

Aneesh.

Former Member
0 Kudos
66

Hi

Because it added a new field, not included in dictionary structure (or table) ZTRST_ADMN_MAS, in the type defination.

When the INCLUDE STRUCTURE is used to declare a structure, the first statament has to end with a point, so or you write:

TYPES : BEGIN OF WA_ADMN_MAS.
TYPES : SEL TYPE CROSS-TYPE.
                INCLUDE STRUCTURE ZTRST_ADMN_MAS.
TYPES : END OF WA_ADMN_MAS.

or

TYPES : BEGIN OF WA_ADMN_MAS,
                SEL TYPE CROSS-TYPE.
                INCLUDE STRUCTURE ZTRST_ADMN_MAS.
TYPES : END OF WA_ADMN_MAS.

Max