11-20-2007 5:11 AM
11-20-2007 5:15 AM
A field string is a type of variable, and is the equivalent of a structure in the DDIC but is defined within an ABAP/4 program. Like a structure, a field string is a series of fields grouped together under a common name. The difference lies mainly in where the definition resides. The term structure in R/3 applies only to a Data Dictionary object containing a collection of fields. The term field string applies to a collection of fields defined in an ABAP/4 program.
Two statements are usually used to define field strings in an ABAP/4 program:
data
tables
Syntax for Defining a Field String Using the DATA Statement
The following is the syntax for defining a field string using the data statement.
data: begin of fs1,
f1[(l)] [type t] [decimals d] [value 'xxx'],
f2[(l)] [type t] [decimals d] [value 'xxx'],
...
end of fs1.
or
data begin of fs1.
data f1[(l)] [type t] [decimals d] [value 'xxx'].
data f2[(l)] [type t] [decimals d] [value 'xxx'].
...
[include structure st1.]
data end of fs1.
or
data fs1 like fs2.
where:
fs1 is the field string name.
f1 and f2 are the fields (also called components) of the field string.
fs2 is the name of a previously defined field string, or is the name of a table or structure in the Data Dictionary.
(l) is the internal length specification.
t is the data type.
d is the number of decimal places (used only with type p).
'xxx' is a literal that supplies a default value.
st1 is the name of a structure or table in the Data Dictionary.
u can check these below links
Here is some links,go through them
http://searchsap.techtarget.com/tip/1,289483,sid21_gci790038,00.html?FromTaxonomy=%2Fpr%2F288525
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3860358411d1829f0000e829fbfe/content.htm
http://sap.ittoolbox.com/groups/technical-functional/SAP-R3-DEV/help-with-field-symbol-771081
Here is some links,go through them
http://searchsap.techtarget.com/tip/1,289483,sid21_gci790038,00.html?FromTaxonomy=%2Fpr%2F288525
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3860358411d1829f0000e829fbfe/content.htm
http://sap.ittoolbox.com/groups/technical-functional/SAP-R3-DEV/help-with-field-symbol-771081
Here is some links,go through them
http://searchsap.techtarget.com/tip/1,289483,sid21_gci790038,00.html?FromTaxonomy=%2Fpr%2F288525
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3860358411d1829f0000e829fbfe/content.htm
http://sap.ittoolbox.com/groups/technical-functional/SAP-R3-DEV/help-with-field-symbol-771081
This link is about general theory behind field symbols and data references:
http://help.sap.com/saphelp_46c/helpdata/en/fc/eb3860358411d1829f0000e829fbfe/frameset.htm
This link explains how to use field symbols for internal table operations:
http://help.sap.com/saphelp_46c/helpdata/en/fc/eb3860358411d1829f0000e829fbfe/frameset.htm
check these threads..
/people/rich.heilman2/blog/2006/03/07/using-field-symbols-in-loop-statements--performance-boost
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb35f8358411d1829f0000e829fbfe/content.htm
11-20-2007 5:25 AM
Hi
Field strings are a special form of dynamic string, which
have all the capabilities of a dynamic string, but may also
represent a defined part of a random file buffer or a
defined part of a dynamic string.
Field strings must always be declared using LOCAL.They may
be used in the same manner as a dynamic string variable, or
they can be bound to a file buffer for an open random-
access file or a dynamic string using a corresponding FIELD
statement. Each field string occupies sixteen bytes of
memory, and requires slightly more general overhead than a
regular dynamic string variable
The TABLES statement automatically defines a field string .
they are mainly used in screen painter.
<b>Reward if usefull</b>
11-20-2007 5:30 AM
Hi...
Field string is nothing but a variable with group of fields .
It is also called as Work area.
Eg:
Data : begin of wa_mat,
MATNR TYPE MARA-MATNR,
MTART TYPE MARA-MTART,
end of Wa_mat.
<b>REWARD IF HELPFUL.</b>
11-20-2007 5:34 AM
Hi Pavan,
Field string is nothing but the group of fields
You can call it as Structure also
example:
types: begin of x_str
kunnr type kunnr,
lifnr type lifnr,
name1 type name1,
land1 type land1,
end of x_str.
this stores one record at run time.
Field Strings:
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.
structures
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).
Hope ur problem is solved now..
<b>Reward points if useful..</b>
Thanks & Regards
ilesh 24x7
11-20-2007 5:37 AM
Hi,
Field String is nothing but dynamic internal table.
http://www.powerbasic.com/support/help/pbcc/field_strings.htm
Reward if helpful.
Regards,
Harini.S
08-28-2014 7:35 AM