Tuesday 31 May 2016

Field symbols


  • Field symbols are pointers in C.
  • They are used to store the address of variable.
  • Used to increase the performance .
  • Syntax :
                 Field symbols :  <fs> [typing].
  • Assigning  is the keyword to assign the field symbol to variable.

Ex :

Steps :

  1. Go to transaction code SE38.
  2. Enter the program name Z or Y<program name>
  3. Select attribute type as Executable program.
  4. Click on Save.

Source Code


REPORT  ZFIELDSYMBOL3.

DATA IT_MAKT TYPE  TABLE OF MAKT.

FIELD-SYMBOLS <FS> TYPE MAKT.


SELECT-OPTIONS S_MATNR FOR <FS>-MATNR.

SELECT FROM MAKT INTO TABLE IT_MAKT WHERE MATNR IN S_MATNR.


LOOP AT IT_MAKT ASSIGNING <FS>.


WRITE / <FS>-MATNR <FS>-SPRAS <FS>-MAKTX.
ENDLOOP.



Input


Output



No comments:

Post a Comment