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

Mention the various databases integrities?

614


how to create module pool program using table controls based on selection criteria specified for sales document item in the first screen and item details in the second screen. plz mention the detail coding Tahnks, Rahul

3410


What does an exec sql statement do in abap?

540


How do you display a data in a detail list?

582


How do we assign dynamic views while creating material master and generating bdc? : abap bdc

628






What are the disadvantages of logical databases?

665


Explain pai and pbo.

713


What two statements are required in an abap program to output an icon using a written statement?

661


Differentiate between transparent tables, cluster tables and pooled tables

565


How to read files and process BDC's automatically ?

1535


WHAT ARE THE MANDATORY FIELDS TO BE FILLED FROM TABLES BAPIITEMIN, BAPIPARTNR, BAPIITEMEX, BAPICUCFG, BAPICUINS, BAPICUPRT, AND BAPICUVAL IN BAPI 'BAPI_QUOTATION_CREATEFROMDATA

2036


What are two methods of modifying sap standard tables? : abap data dictionary

672


What are the disadvantages of different types of bdc's?

618


Define structure in abap data dictionary?

611


How do you delete duplicate records from internal table?

744