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

Help on Field String

Former Member
0 Likes
453

Hi Experts,

Could any one of give me some information on FIELD STRINGS, Please.

thnanks.

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
428

Not sure that I know what they are. I'm guessing they are like structures.

<i><b>Field Strings:</b>

Compatible:

Component by Component.

Non-Compatible Field Strings and Elementary Fields:

System first converts all the field strings concerned to type C fields and then performs the conversion between the two remaining elementary fields.

Field Strings with Internal Tables as Components:

Field strings which contain internal tables as components are convertible only if they are compatible.</i>

<i><b>structures</b>

A structure is a sequence of any other data types from the ABAP Dictionary, that is, data elements, structures, table types, or database tables. When you create a structure in the ABAP Dictionary, each component must have a name and a data type.

In an ABAP program, you can use the TYPE addition to refer directly to a structure.

If you define a local data type in a program by referring to a structure as follows:

TYPES <t> TYPE <structure>.

the construction blueprint of the structure is used to create a local structure <t> in the program. The predefined Dictionary data types of the domains used by the data elements in the structure are converted into the corresponding ABAP types. The semantic attributes of the data elements are used for the corresponding components of the structure in the program. The components of the local structure <t> have the same names as those of the structure in the ABAP Dictionary.

To ensure compatibility with previous releases, it is still possible to use the LIKE addition in an ABAP program to refer to a structure in the ABAP Dictionary (except in classes).</i>

Regards,

Rich Heilman

3 REPLIES 3
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
429

Not sure that I know what they are. I'm guessing they are like structures.

<i><b>Field Strings:</b>

Compatible:

Component by Component.

Non-Compatible Field Strings and Elementary Fields:

System first converts all the field strings concerned to type C fields and then performs the conversion between the two remaining elementary fields.

Field Strings with Internal Tables as Components:

Field strings which contain internal tables as components are convertible only if they are compatible.</i>

<i><b>structures</b>

A structure is a sequence of any other data types from the ABAP Dictionary, that is, data elements, structures, table types, or database tables. When you create a structure in the ABAP Dictionary, each component must have a name and a data type.

In an ABAP program, you can use the TYPE addition to refer directly to a structure.

If you define a local data type in a program by referring to a structure as follows:

TYPES <t> TYPE <structure>.

the construction blueprint of the structure is used to create a local structure <t> in the program. The predefined Dictionary data types of the domains used by the data elements in the structure are converted into the corresponding ABAP types. The semantic attributes of the data elements are used for the corresponding components of the structure in the program. The components of the local structure <t> have the same names as those of the structure in the ABAP Dictionary.

To ensure compatibility with previous releases, it is still possible to use the LIKE addition in an ABAP program to refer to a structure in the ABAP Dictionary (except in classes).</i>

Regards,

Rich Heilman

Read only

Former Member
0 Likes
428

Field String is sort of an older name for what most people now call a "structure" (defined within an ABAP program).


types: begin of field_string,
         fld1 type d,
         fld2 type c,
       end of field_string.

A structure defined in the Dictionary is only called "Structure" (not field string).

Regards,

James Gaddis

Read only

0 Likes
428

thnx for the help.