what is the use of field symbol?

Answer Posted / anji yv

incase of any modifications in 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.

REPORT ZSAPN_FIELDSYMBOLS.

DATA : IT_MARA TYPE TABLE OF MARA.
DATA : WA_MARA TYPE MARA.
FIELD-SYMBOLS : <FS_MARA> TYPE MARA.
SELECT * FROM MARA
INTO TABLE IT_MARA UP TO 50 ROWS.

LOOP AT IT_MARA ASSIGNING <FS_MARA>.
IF <FS_MARA> IS ASSIGNED.
WRITE :/ <FS_MARA>-MATNR, <FS_MARA>-MTART, <FS_MARA>-MEINS.
ENDIF.
ENDLOOP.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define spool request?

666


In events, start-of-selection is a default event. When we have to use this event explicitly? Why?

579


How do you do bdc for a table control? : abap bdc

656


How collect statement is different from append?

537


how to capture the errors in bdc Call transaction method?

613






How to read 5th record from Hash Internal Table?

838


What are spa/gpa parameters (sap memory)?

725


What is the use of 'for all entries'?

604


How will you transfer data into a file in application server?

595


Can we create field without data element? If yes, how?

696


What is sql trace? : abap data dictionary

673


List the events in abap/4 language?

592


How we format the data before writing a statement in the report?

512


What are the types of the software component being deployed in the sap?

597


How are the date abd time field values stored in sap?

601