SAP Tutorials Blog


 


"The following example shows a selection of declaration options with data reference 

"variables with static types. The static types can be complete or generic (but 

"only data can be used). 

"Note that the variables do not yet point to a data object. At this stage, 

"initial reference variables contain null references. 

DATA num type i.


DATA: ref_a TYPE REF TO i,                 "Complete data type

      ref_b TYPE REF TO zdemo_abap_carr,   "Complete data type

      ref_c LIKE REF TO num,

      ref_d TYPE REF TO data,              "Generic data type

      ref_e LIKE ref_a,                    "Referring to an existing data reference variable

      ref_f TYPE TABLE OF REF TO i,        "Reference table, complete data type

      ref_g TYPE TABLE OF REF TO data.     "Reference table, generic data type                 


Serkan AKKAVAK

Computer Engineer BSc

Head of SAP & Software Department

Contact : serkurumsal@yandex.com