Home ABAP Tutorials Dynamic Programming Introduction to Field Symbols
Introduction to Field Symbols PDF Print E-mail
User Rating: / 2
PoorBest 
ABAP Tutorials - Dynamic Programming
Written by Varun Verma   
Sunday, 17 August 2008 06:57

In ABAP, field symbols are equivalent to de-referenced pointers in C++. They act like place holders or symbolic names for other fields. They do not occupy any space in memory but they point to a memory area that contains contents. So they act like pointers in C++ (for e.g int *a).

A field symbol can point to any data object in ABAP. Field symbols are very useful because they provide great flexibility while programming in ABAP. They are very useful especially in dynamic programming. However, sometimes they do result in many runtime errors also if not handled properly.

PS: The real equivalent of pointers in ABAP are reference variables. Reference variables contains memory addresses.

Declaring field symbols

Field symbols are declared like this: FIELD-SYMBOLS : <fs> TYPE [any type structure or internal table]

The above example shows that a field symbol is typed to a predefined data  type in ABAP. You can also have untyped field symbols like this: FIELD-SYMBOLS : <fs> TYPE ANY.

To see the usage of field symbols in programming, refer to the Example Codes section.

Comments
Add New Search
sreenivas  - Sreenivasa Reddy   |address121.242.117.56 |2009-07-20 05:57:15
introduction is good
Write comment
Name:
Email:
 
Title:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
 
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):s
:!::?::idea::arrow:
 

3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

Last Updated ( Monday, 18 August 2008 18:29 )
 

Advertisement

 

Google Search

Advertisement