<?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 Re: If a  class method exporting a value with the generic type 'data'. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-a-class-method-exporting-a-value-with-the-generic-type-data/m-p/4331377#M1031953</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Black,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the data declaration Declare a data object with type ANY and then use this data object as the Type of importing Parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;field-symbols &amp;lt;v_data&amp;gt; type ANY.
method get_value importing lv_data like &amp;lt;v_data&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Aug 2008 06:39:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-08-27T06:39:48Z</dc:date>
    <item>
      <title>If a  class method exporting a value with the generic type 'data'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-a-class-method-exporting-a-value-with-the-generic-type-data/m-p/4331374#M1031950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then how can I get the information?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For exmple. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cl_my_clss-&amp;gt;get_value( exporting ev_data = .... ) . &lt;/P&gt;&lt;P&gt;ev_data is a type of data. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can not use DATA : lv_mine type data. because generic data should be used in formal parameter, however , if I use a field symbol, how to assign value with out knowing the data type? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Aug 2008 10:02:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-a-class-method-exporting-a-value-with-the-generic-type-data/m-p/4331374#M1031950</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-25T10:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: If a  class method exporting a value with the generic type 'data'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-a-class-method-exporting-a-value-with-the-generic-type-data/m-p/4331375#M1031951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Blake,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am a little confused about the requirement. Can you please elebroate the same so that better understanding can help me give you some precise solution...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kunjal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Aug 2008 10:36:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-a-class-method-exporting-a-value-with-the-generic-type-data/m-p/4331375#M1031951</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-25T10:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: If a  class method exporting a value with the generic type 'data'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-a-class-method-exporting-a-value-with-the-generic-type-data/m-p/4331376#M1031952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kunjal, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just want to know, for example there is a method called set_attribute: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set_attribute( importing type data ) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in my program where invoke the set_attribute &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also don't know the data type of my code. Because they are get from a table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which type I should use ? I can not use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : lv_data type data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because it can only be used as a formal parameter. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blake Le&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2008 06:30:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-a-class-method-exporting-a-value-with-the-generic-type-data/m-p/4331376#M1031952</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-27T06:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: If a  class method exporting a value with the generic type 'data'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-a-class-method-exporting-a-value-with-the-generic-type-data/m-p/4331377#M1031953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Black,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the data declaration Declare a data object with type ANY and then use this data object as the Type of importing Parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;field-symbols &amp;lt;v_data&amp;gt; type ANY.
method get_value importing lv_data like &amp;lt;v_data&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2008 06:39:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-a-class-method-exporting-a-value-with-the-generic-type-data/m-p/4331377#M1031953</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-27T06:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: If a  class method exporting a value with the generic type 'data'.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/if-a-class-method-exporting-a-value-with-the-generic-type-data/m-p/4331378#M1031954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Blake,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per my understanding,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are getting the data type from the database table....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You want to use the same data type....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lets say for example: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have a db table x with field y having data type Z. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you do is that, while declaring the data type for the attribute in the method use the reference as table_name-field_name(x-y).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use ANY. This will give you a chance to map any field type to this method....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Using ANY will limit the syntax that you can use within the method......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kunjal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2008 06:46:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/if-a-class-method-exporting-a-value-with-the-generic-type-data/m-p/4331378#M1031954</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-27T06:46:01Z</dc:date>
    </item>
  </channel>
</rss>

