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: 

Field symbols

Former Member
0 Kudos
78

What are field symbols ? where u will use it?

1 ACCEPTED SOLUTION

former_member2382
Active Participant
0 Kudos
55

Hi,

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

http://searchsap.techtarget.com/loginMembersOnly/1,289498,sid21_gci920484,00.html?NextURL=http%3A//s...

reward if useful..and close this thread..

Regards,

Parvez

4 REPLIES 4

dani_mn
Active Contributor
0 Kudos
55

HI,

Field symbols are used to dynamically assign a variable value.

Like:

FIELD-SYMBOLS: <FS> TYPE ANY.

data: A(10) type c.

A = 'ddd'.

Assign A to <FS>.

Regards,

former_member2382
Active Participant
0 Kudos
56

Hi,

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

http://searchsap.techtarget.com/loginMembersOnly/1,289498,sid21_gci920484,00.html?NextURL=http%3A//s...

reward if useful..and close this thread..

Regards,

Parvez

Former Member
0 Kudos
55

Hi,

Field symbols offer functionlity similar to pointers in other programming languages. It does not occupy memory for the data object, it points to the object that has been assigned to the field symbol. You use the assign command to relate to the data object. After the assign operation you can work with field symbol in the same way as with the object itself.

You define the field symbol as: field-symbols <fs>.

Consider this:

field-symbol <fs>.

data field value 'X'.

asssign field to <fs>.

The field symbol <fs> now inherits all the properties from the assigned field, and you can work with the field symbol in the same way as with the field itself.

Take a look at the examples given here for working with field symbols:

http://www.sapgenie.com/abap/code/chap2401.txt

http://www.sapgenie.com/abap/code/chap2402.txt

http://www.sapgenie.com/abap/code/chap2403.txt

http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3860358411d1829f0000e829fbfe/content.htm

http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/field_sy.htm

http://searchsap.techtarget.com/tip/1,289483,sid21_gci920484,00.html

Simple program.

data : letter(10) .

field-symbols : <fs> type any.

assign letter to <fs> type 'X'.

write <fs>.

Simple program.

TYPES: BEGIN OF NAME,

NEXTNAME(10),

FIRSTNAME(10),

LASTNAME(10),

END OF NAME.

FIELD-SYMBOLS <F> TYPE NAME.

DATA: LINE(30).

LINE = 'JOHN SMITH SHRI'.

ASSIGN LINE TO <F> CASTING.

WRITE: / 'Lastname:', <F>-LASTNAME,

'Firstname:', <F>-FIRSTNAME,

'Nextname :', <F>-NEXTNAME.

Regards,

Priyanka.

Former Member
0 Kudos
55

answered