New REF (reference) operator

light111New REF (reference) operator in ABAP

In stead of Get Reference , new REF operator can be used. 


Code Snippet:


DATA: lv_str TYPE string VALUE ‘ABCD’.
DATA: dref1 TYPE REF TO data.
DATA: dref2 TYPE REF TO data.

* Old Syntax
GET REFERENCE OF LV_STR INTO dref1.
* New Syntax
dref2 = REF #( LV_STR ).


Result:

2.jpg


 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s