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: 

what is field symbols in abap

Former Member
0 Kudos

hi

what is field symbols in abap in which scenario we can use filed symbols?

Moderator message : Search for available information, thread locked.

Edited by: Vinod Kumar on Dec 16, 2011 5:11 PM

4 REPLIES 4

Former Member
0 Kudos

Hai,

Generally, we use the explicit work area to process the internal table like appending & modifying records. We can reduce the time and improve the performance of the program by using the field-symbols. When we use the LOOP construct with the explicit work area, system need to engage the resources to put the required record in the work area, process it and move it back to the table if the needed. This additional processing time could be saved by using the field-symbol. By using the field-symbols we can save this additional time and improve the performance. Field-symbols are similar to dereferenced pointers in C. While using the field-symbol, system uses the same memory allocated to that particular field in the record instead of moving it to work area and processing

Edited by: Ravi.Seela on Dec 16, 2011 7:53 AM

Former Member

Hello friend,

Field Symbol is just like a pointer in C.

Directly its having reference to address of the variable.

We can use the field symbols mostely where we mostly need to update or append option to the data base.

See the example code.

<fs>-field1 = 'name'.

<fs>-field2 = 'Age'.

append <fs> to itab.

In the above case append is not needed since it will directly be appended to the internal table. Aslo field symbols can also be used in loops.

Also field symbol is of type any so we can process any type of data using it..

If you are not clear please let me know i will give you my code so that you will understand it much clear.

Thanks,

Sri Hari

Former Member
0 Kudos

Hi,

Field symbols are placeholders or symbolic names for other fields. They do not physically reserve space for a field, but point to its contents. A field symbol cam point to any data object. The data object to which a field symbol points is assigned to it after it has been declared in the program.

The below link provide total information regarding field symbols

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

Warm Regards,

PavanKumar.G

former_member226225
Contributor
0 Kudos

hi.

incase of any modifications in the internal table generally we loop the internal table to workarea and

we have to modify in the work area and we have to write the modify statement to modify the internal table.

if we use field symbols then automatic modification can be done with out writing modify statement.

Performance wise field symbols are much bettar than the normal work area.