<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Difference between GET REFERENCE and TYPE REF + CREATE DATA in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-get-reference-and-type-ref-create-data/m-p/10342090#M1837379</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts, &lt;/P&gt;&lt;P&gt;Currently I have got a issue, say a class method defined a exporting parameter with type "TYPE REF TO DATA", and in the implementation of method, I declare a local variable with a specific data type( e.g. data lv_str type string ), and then use statement "GET REFERENCE" to return this local variable's reference to the exporting parameter;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but when I call the method, this exporting parameter get nothing, and after some debugging, i found the parameter's content is "FREED STACK:{......}";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but if I change the code within the method implementation like this, declare a local reference, and use statement "CREATE DATA"( e.g. DATA lr_str type ref to string. CREATE DATA lr_str. ), and then give the local reference value to the exporting parameter, it works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also write a Z-program to show this issue:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;REPORT &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ztest_get_reference&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;CLASS &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;lcl_test_ref &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;DEFINITION&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;PUBLIC SECTION&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;TYPES&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;BEGIN OF &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ty_bas_data&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f1 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;string&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f2 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;string&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;END OF &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ty_bas_data&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;TYPES&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;BEGIN OF &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ty_ref&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;index TYPE i&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ref_data &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;TYPE REF TO data&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;END OF &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ty_ref&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;CLASS-METHODS &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;test_get_ref_to&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RETURNING &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;VALUE&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;rs_ref&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ty_ref&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;CLASS-METHODS &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;test_create_ref&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RETURNING &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;VALUE&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;rs_ref&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ty_ref&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;ENDCLASS&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;CLASS &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;lcl_test_ref &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;IMPLEMENTATION&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;METHOD &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;test_get_ref_to&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;DATA&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ls_data &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ty_bas_data&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rs_ref&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: 'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ref_data &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;REF &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;#&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;( &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ls_data &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;).&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;ENDMETHOD&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;METHOD &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;test_create_ref&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;DATA&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;lr_data &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;TYPE REF TO &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ty_bas_data&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;CREATE DATA &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;lr_data&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rs_ref&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: 'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ref_data &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;lr_data&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;ENDMETHOD&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;ENDCLASS&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;START-OF-SELECTION&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;DATA&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;: &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ls_data1 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;lcl_test_ref&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: 'Courier New';"&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ty_ref&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ls_data2 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;lcl_test_ref&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;=&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ty_ref&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; ls_data1 &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;lcl_test_ref&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: 'Courier New';"&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;test_get_ref_to&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;( ).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; ls_data2 &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;lcl_test_ref&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: 'Courier New';"&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;test_create_ref&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;( ).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;IF &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ls_data1&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: 'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ref_data &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;IS BOUND&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;WRITE&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;/ &lt;/SPAN&gt;&lt;SPAN style="color: #4da619; font-size: 10pt; font-family: 'Courier New';"&gt;'Return with statement: GET REFERENCE is bound'&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;ELSE&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;WRITE&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;/ &lt;/SPAN&gt;&lt;SPAN style="color: #4da619; font-size: 10pt; font-family: 'Courier New';"&gt;'Return with statement: GET REFERENCE is NOT bound'&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;ENDIF&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;IF &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ls_data2&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: 'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ref_data &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;IS BOUND&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;WRITE&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;/ &lt;/SPAN&gt;&lt;SPAN style="color: #4da619; font-size: 10pt; font-family: 'Courier New';"&gt;'Return with statement: CREATE DATA is bound'&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;ELSE&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;WRITE&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;/ &lt;/SPAN&gt;&lt;SPAN style="color: #4da619; font-size: 10pt; font-family: 'Courier New';"&gt;'Return with statement: CREATE DATA is NOT bound'&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;ENDIF&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &lt;/SPAN&gt;running this program and you can get the result like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/467836" /&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt; I just wander what the difference between these two ways of data reference, any body have any ideal about this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Jun 2014 02:42:12 GMT</pubDate>
    <dc:creator>ray_lv</dc:creator>
    <dc:date>2014-06-05T02:42:12Z</dc:date>
    <item>
      <title>Difference between GET REFERENCE and TYPE REF + CREATE DATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-get-reference-and-type-ref-create-data/m-p/10342090#M1837379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts, &lt;/P&gt;&lt;P&gt;Currently I have got a issue, say a class method defined a exporting parameter with type "TYPE REF TO DATA", and in the implementation of method, I declare a local variable with a specific data type( e.g. data lv_str type string ), and then use statement "GET REFERENCE" to return this local variable's reference to the exporting parameter;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but when I call the method, this exporting parameter get nothing, and after some debugging, i found the parameter's content is "FREED STACK:{......}";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but if I change the code within the method implementation like this, declare a local reference, and use statement "CREATE DATA"( e.g. DATA lr_str type ref to string. CREATE DATA lr_str. ), and then give the local reference value to the exporting parameter, it works fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also write a Z-program to show this issue:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;REPORT &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ztest_get_reference&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;CLASS &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;lcl_test_ref &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;DEFINITION&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;PUBLIC SECTION&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;TYPES&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;BEGIN OF &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ty_bas_data&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f1 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;string&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f2 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;string&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;END OF &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ty_bas_data&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;TYPES&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;BEGIN OF &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ty_ref&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;index TYPE i&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ref_data &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;TYPE REF TO data&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;END OF &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ty_ref&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;CLASS-METHODS &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;test_get_ref_to&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RETURNING &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;VALUE&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;rs_ref&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ty_ref&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;CLASS-METHODS &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;test_create_ref&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RETURNING &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;VALUE&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;rs_ref&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ty_ref&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;ENDCLASS&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;CLASS &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;lcl_test_ref &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;IMPLEMENTATION&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;METHOD &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;test_get_ref_to&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;DATA&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ls_data &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ty_bas_data&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rs_ref&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: 'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ref_data &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;REF &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;#&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;( &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ls_data &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;).&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;ENDMETHOD&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;METHOD &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;test_create_ref&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;DATA&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;lr_data &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;TYPE REF TO &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ty_bas_data&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;CREATE DATA &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;lr_data&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rs_ref&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: 'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ref_data &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;lr_data&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;ENDMETHOD&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;ENDCLASS&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;START-OF-SELECTION&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;DATA&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;: &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ls_data1 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;lcl_test_ref&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: 'Courier New';"&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ty_ref&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ls_data2 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;TYPE &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;lcl_test_ref&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;=&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ty_ref&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; ls_data1 &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;lcl_test_ref&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: 'Courier New';"&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;test_get_ref_to&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;( ).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; ls_data2 &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;lcl_test_ref&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: 'Courier New';"&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;test_create_ref&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;( ).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;IF &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ls_data1&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: 'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ref_data &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;IS BOUND&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;WRITE&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;/ &lt;/SPAN&gt;&lt;SPAN style="color: #4da619; font-size: 10pt; font-family: 'Courier New';"&gt;'Return with statement: GET REFERENCE is bound'&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;ELSE&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;WRITE&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;/ &lt;/SPAN&gt;&lt;SPAN style="color: #4da619; font-size: 10pt; font-family: 'Courier New';"&gt;'Return with statement: GET REFERENCE is NOT bound'&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;ENDIF&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;IF &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ls_data2&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 10pt; font-family: 'Courier New';"&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;ref_data &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;IS BOUND&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;WRITE&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;/ &lt;/SPAN&gt;&lt;SPAN style="color: #4da619; font-size: 10pt; font-family: 'Courier New';"&gt;'Return with statement: CREATE DATA is bound'&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;ELSE&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;WRITE&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;: &lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-size: 10pt; font-family: 'Courier New';"&gt;/ &lt;/SPAN&gt;&lt;SPAN style="color: #4da619; font-size: 10pt; font-family: 'Courier New';"&gt;'Return with statement: CREATE DATA is NOT bound'&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Tahoma;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #010101; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: 'Courier New';"&gt;ENDIF&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-family: 'Courier New'; font-size: 10pt;"&gt; &lt;SPAN style="font-size: 10pt;"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;&amp;nbsp; &lt;/SPAN&gt;running this program and you can get the result like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/467836" /&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: 'Courier New';"&gt; &lt;/SPAN&gt; I just wander what the difference between these two ways of data reference, any body have any ideal about this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2014 02:42:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-get-reference-and-type-ref-create-data/m-p/10342090#M1837379</guid>
      <dc:creator>ray_lv</dc:creator>
      <dc:date>2014-06-05T02:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between GET REFERENCE and TYPE REF + CREATE DATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-get-reference-and-type-ref-create-data/m-p/10342091#M1837380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Both behavior can be found in keyword documentation.&lt;/P&gt;&lt;P&gt;First case documentation says:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;If you place a reference to a local field in a &lt;A href="http://help.sap.com/saphelp_nw70/helpdata/en/9f/db974f35c111d1829f0000e829fbfe/content.htm"&gt;procedure&lt;/A&gt; in a global reference variable, the reference will become invalid when you leave the procedure. You cannot then &lt;A href="http://help.sap.com/saphelp_nw70/helpdata/en/16/0dce0a0cf711d3b9360000e8353423/content.htm"&gt;dereference&lt;/A&gt; the reference variable.&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Second case documentation says:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;The &lt;SPAN class="qtext"&gt;CREATE DATA&lt;/SPAN&gt; statement creates an &lt;A class="grey" title="Glossary Entry"&gt;anonymous data object&lt;/A&gt; and assigns the reference to the data object of the &lt;SPAN class="qtext"&gt;dref&lt;/SPAN&gt; reference variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; By default, the data object is created in the &lt;A class="grey" title="Glossary Entry"&gt; internal session&lt;/A&gt; of the current program and remains there for as long as it is required. If it is no longer referenced by reference variables, it is deleted by the &lt;A class="grey" title="Glossary Entry"&gt;garbage collector&lt;/A&gt;.&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2014 05:02:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-get-reference-and-type-ref-create-data/m-p/10342091#M1837380</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-06-05T05:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between GET REFERENCE and TYPE REF + CREATE DATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-get-reference-and-type-ref-create-data/m-p/10342092#M1837381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wonderful explanation! it makes me get more clear understanding about data reference in ABAP; thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2014 06:00:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-between-get-reference-and-type-ref-create-data/m-p/10342092#M1837381</guid>
      <dc:creator>ray_lv</dc:creator>
      <dc:date>2014-06-05T06:00:24Z</dc:date>
    </item>
  </channel>
</rss>

