<?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 Type Ref to DATA in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-ref-to-data/m-p/3006153#M710323</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have parameter in a method, which of "type ref to data".. while debugging I could see some values are getting populated inside that.. ( a structure/group of values )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now my question is simple,, how can access those values populated inside this variable ?..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Help me,, 4 points..&lt;/P&gt;&lt;P&gt;Thanks in Advance, Sudeep..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Nov 2007 09:18:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-07T09:18:21Z</dc:date>
    <item>
      <title>Type Ref to DATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-ref-to-data/m-p/3006153#M710323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have parameter in a method, which of "type ref to data".. while debugging I could see some values are getting populated inside that.. ( a structure/group of values )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now my question is simple,, how can access those values populated inside this variable ?..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Help me,, 4 points..&lt;/P&gt;&lt;P&gt;Thanks in Advance, Sudeep..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2007 09:18:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-ref-to-data/m-p/3006153#M710323</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-07T09:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: Type Ref to DATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-ref-to-data/m-p/3006154#M710324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look at the follow example. I hope it's usefull for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CLASS mar_test DEFINITION.

  PUBLIC SECTION.

"   Defining a method with a returning parameter
    METHODS get_value
            RETURNING value(r_data) TYPE REF TO data.

ENDCLASS.                    "mar_test DEFINITION

*----------------------------------------------------------------------*
*       CLASS mar_test IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS mar_test IMPLEMENTATION.

  METHOD get_value.

    FIELD-SYMBOLS &amp;lt;variable&amp;gt; TYPE ANY.

    DATA v_variable TYPE char2.
"   Here we're creating a new reference to Data v_variable
    CREATE DATA r_data LIKE v_variable.

"   Moving the reference to a field-symbols
    ASSIGN r_data-&amp;gt;* TO &amp;lt;variable&amp;gt;.

"   Manipulating the content of the reference through field-symbols &amp;lt;variable&amp;gt;
    MOVE 'AB' TO &amp;lt;variable&amp;gt;.

  ENDMETHOD.                    "get_value

ENDCLASS.                    "mar_test IMPLEMENTATION

DATA o_mar_test TYPE REF TO mar_test.
DATA v_variable TYPE char2.
DATA v_value TYPE REF TO data.

FIELD-SYMBOLS &amp;lt;variable&amp;gt; TYPE ANY.

START-OF-SELECTION.

  CREATE OBJECT o_mar_test.

" The method returns the reference of a data into v_value
  v_value = o_mar_test-&amp;gt;get_value( ).

" You can't access directly the Content of reference so, you must use
" dereferencing operator -&amp;gt;* to move values to a field-symbols
  ASSIGN v_value-&amp;gt;* TO &amp;lt;variable&amp;gt;.
" After make the dereferencing you can move the value of field-symbols to any Compatible Data
  MOVE &amp;lt;variable&amp;gt; TO v_variable.

" Now you can work with a Data that contains the value returned from method
  WRITE v_variable.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marcelo Ramos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Nov 2007 13:09:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-ref-to-data/m-p/3006154#M710324</guid>
      <dc:creator>marcelo_ramos1</dc:creator>
      <dc:date>2007-11-07T13:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: Type Ref to DATA</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/type-ref-to-data/m-p/3006155#M710325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data ref type ref to data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;field-symbols:&lt;/P&gt;&lt;P&gt;&amp;lt;fs_x&amp;gt; type any.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;create data ref type ....."your type here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;assign ref-&amp;gt;* to &amp;lt;fs_x&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************fs_x contains the dta pointed by ref.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Nov 2007 10:03:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/type-ref-to-data/m-p/3006155#M710325</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-22T10:03:26Z</dc:date>
    </item>
  </channel>
</rss>

