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

Difference in structure declaration

Former Member
0 Likes
773

Hi ,

Can anyone tell me the difference between the declaration of structure.

1. Referring to the domain level.

Ex :Types : Begin of St,

matnr type matnr,

posnr type posnr,

Types: end of st.

2. Referring to the table field.

Ex. Types: Begin of St,

matnr type Mara - matnr,

posnr type Vbeln - posnr,

Types: end of St.

Please let me know about the difference between the above mentioned delcarations.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
717

Hi,

While declaring the structure:

using table fields - You get the field labels & search help for that partcular field

using domains - You do not get field labels

3 REPLIES 3
Read only

Former Member
0 Likes
718

Hi,

While declaring the structure:

using table fields - You get the field labels & search help for that partcular field

using domains - You do not get field labels

Read only

Former Member
0 Likes
717

Hello!

MARA-MATNR refers to the table-field name. The data element assigned to MARA-MATNR is assigned to the variable declared in the structure. If MARA-MATNR is of type MATNR1 for example, then the structure field will have data type MATNR1. It is similar to creating a structure field name of type MATNR1.

Regards,

Janani

Read only

MarcinPciak
Active Contributor
0 Likes
717

1) Typing using data element . This means that the field "inherits" all semantics and functionality this data element provides i.e field label (short, medium, long text) - they are used i.e. in ALV, input/search help which was attached to that data element, once you change its definition all fields in all the reports which refer to it will get change too

2) Typing using table field . This means that field "inherits" all semantics of data element which used for that field (namely the above metioned) + can provide check if field is set in table as so called check field (input is available based on check table entires).

This is just one level higher that the first one. All i all table field also uses data element to describe its sematics.

So there is no really significant difference b/w those two. Only input help may act differently.

Regards

Marcin