<?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: How to invoke method with EXPORTING ANY in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-invoke-method-with-exporting-any/m-p/9837010#M1784738</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;May be TYPE REF TO is your answer. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Arindam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Nov 2013 21:09:32 GMT</pubDate>
    <dc:creator>arindam_m</dc:creator>
    <dc:date>2013-11-18T21:09:32Z</dc:date>
    <item>
      <title>How to invoke method with EXPORTING ANY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-invoke-method-with-exporting-any/m-p/9837009#M1784737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Let me rephrase the below question:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How do we invoke any method that has an EXPORTING of type ANY or ANY TABLE?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we try to import the data into a generic variable, the activation fails with an error message (image attached).&lt;BR /&gt;data lo_row_content type data.&lt;BR /&gt;mo_context-&amp;gt;GET_ROW( importing es_row = lo_row_content ).&lt;/P&gt;&lt;P&gt;My thought was to get data into lo_row_content and then use RTTI to querry the type and cast it.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/326053" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But evidently that is not the right approach as the activation itself fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------I tried to post an update to my earlier discussion but&amp;nbsp; for some reason the update did not show up. Hence RE-posting-----------------------&lt;/P&gt;&lt;P&gt;Original post: &lt;A _jive_internal="true" href="https://answers.sap.com/thread/3456080"&gt;http://scn.sap.com/thread/3456080&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Nov 2013 18:27:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-invoke-method-with-exporting-any/m-p/9837009#M1784737</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-11-18T18:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to invoke method with EXPORTING ANY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-invoke-method-with-exporting-any/m-p/9837010#M1784738</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;May be TYPE REF TO is your answer. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Arindam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Nov 2013 21:09:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-invoke-method-with-exporting-any/m-p/9837010#M1784738</guid>
      <dc:creator>arindam_m</dc:creator>
      <dc:date>2013-11-18T21:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to invoke method with EXPORTING ANY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-invoke-method-with-exporting-any/m-p/9837011#M1784739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Roger,&lt;/P&gt;&lt;P&gt;Use field symbols as below&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS &amp;lt;lo_row_content&amp;gt; TYPE data.&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS &amp;lt;lo_row_content&amp;gt; TYPE&amp;nbsp; any.&lt;/P&gt;&lt;P&gt;and use this filed symbol in RTTI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we cannot define like &lt;/P&gt;&lt;P&gt;data lo_row_content type data&amp;nbsp;&amp;nbsp; in any programme except interface of programme&lt;/P&gt;&lt;P&gt;but we can define &lt;/P&gt;&lt;P&gt;data lo_row_content type ref to data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you define as above follow below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;assign lo_row_content-&amp;gt;* to &amp;lt;Field symbol type any&amp;gt;&lt;/P&gt;&lt;P&gt;and use &amp;lt;Field symbol type any&amp;gt; in rtti&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sreenivas.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Nov 2013 23:06:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-invoke-method-with-exporting-any/m-p/9837011#M1784739</guid>
      <dc:creator>former_member219762</dc:creator>
      <dc:date>2013-11-18T23:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to invoke method with EXPORTING ANY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-invoke-method-with-exporting-any/m-p/9837012#M1784740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I removed your original post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A method with an exporting type of &lt;STRONG&gt;any&lt;/STRONG&gt; or &lt;STRONG&gt;any table&lt;/STRONG&gt;, may be invoked - at least syntactically - with any structure/table with a concrete type. Type &lt;STRONG&gt;ANY &lt;/STRONG&gt;means anything that hasn't been defined as a table type. Type &lt;STRONG&gt;ANY TABLE&lt;/STRONG&gt; means anything that is an internal table - whether &lt;STRONG&gt;STANDARD&lt;/STRONG&gt;, &lt;STRONG&gt;HASHED &lt;/STRONG&gt;or &lt;STRONG&gt;SORTED&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Semantically, though, the method may be expecting to export something with constraint on the structure. For &lt;STRONG&gt;ANY&lt;/STRONG&gt;, it may require a non-deep structure for example. Presumably it is expecting a type that is the same that was used with SET_ROW or ADD_ROW.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Nov 2013 07:25:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-invoke-method-with-exporting-any/m-p/9837012#M1784740</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2013-11-19T07:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to invoke method with EXPORTING ANY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-invoke-method-with-exporting-any/m-p/9837013#M1784741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Roger,&lt;/P&gt;&lt;P&gt;it is not possible to create a generic variable in your scenario as adviced in some of the postings before, you need to know the correct type. That means that even if you would create a field-symbols with type any it will fail and as long a the importing value isn't a data refeference you cannot work with "type ref to". So we come to the reply of Matthew. &lt;/P&gt;&lt;P&gt;It really gives you the basics what you can expect and what should be looked at to understand what kind of data type you might need. At the end, if no corresponding method exists (i.e. SET_ROW etc.) from where you can get an idea about the expecting data type you need to debug or at least look inside the method. In your example you retrieve any type from a GET METHOD, so assuming that there is a SET METHOD you should get the data type. I have the feeling that a method GET_ROW is returning something like a SY-TABIX or ROW_ID or something similiar within the WD* name range?&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;regards, Sascha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Nov 2013 13:44:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-invoke-method-with-exporting-any/m-p/9837013#M1784741</guid>
      <dc:creator>sascha_reissig</dc:creator>
      <dc:date>2013-11-19T13:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to invoke method with EXPORTING ANY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-invoke-method-with-exporting-any/m-p/9837014#M1784742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sasha, Mathew, Sreenevasa and Arindam,&lt;/P&gt;&lt;P&gt;Thanks a lot for all your inputs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me highlight what I tried based on your responses. Then I'll add more information relevant to your inputs:&lt;/P&gt;&lt;P&gt;1. TYPE REF TO data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; data lo_row_content type ref to data. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mo_context-&amp;gt;GET_ROW( importing es_row = lo_row_content ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code got activated, but resulted in runtime error &lt;STRONG&gt;"Invalid operand type for the MOVE-CORRESPONDING statement."&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/327737" width="450" /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2. I tried ANY TABLE and it would not activate.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/327739" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;===========================================================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The debugger option is interesting and I could use help in that area. Is there a way to find the &lt;STRONG&gt;runtime data type&lt;/STRONG&gt; of object in es_row during runtime, using debugger, without actually invoking the method GET_ROW?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;During debugging, I see mo_context (the variable of type /PLMU/CL_FRW_G_CONTEXT_SINGLE) having the user input values within a variable called MR_DATA_BUFFER (which is not defined public). I'm just trying to figure a way to get those values out.&lt;/P&gt;&lt;P&gt; &lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/327764" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Related methods SET_ROW and ADD_ROW (images attached) do exist. But the variable IS_ROW is generic type. Quite understandably so, as the class should be able to handle values of various type of UIBB context during runtime. Again this is a FPM based MDG application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/327765" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/327766" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Nov 2013 12:52:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-invoke-method-with-exporting-any/m-p/9837014#M1784742</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-11-20T12:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to invoke method with EXPORTING ANY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-invoke-method-with-exporting-any/m-p/9837015#M1784743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Roger,&lt;/P&gt;&lt;P&gt;Use &lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;FIELD-SYMBOLS &amp;lt;lo_row_content&amp;gt; TYPE&amp;nbsp; any&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; not &lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;data lo_row_content type ref to data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;Sreenivas.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 12px; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Nov 2013 13:18:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-invoke-method-with-exporting-any/m-p/9837015#M1784743</guid>
      <dc:creator>former_member219762</dc:creator>
      <dc:date>2013-11-20T13:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to invoke method with EXPORTING ANY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-invoke-method-with-exporting-any/m-p/9837016#M1784744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 12.222222328186035px; background-color: #ffffff; color: #333333;"&gt;You're almost there. You just need to pass a structure which has the fields you are interested in - no field symbols, no "type any", no data references. Simply, if in the scenario where you did the debug, you'd had:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12.222222328186035px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;data: begin of my_data,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.222222328186035px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; matnr TYPE matnr,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.222222328186035px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mtart TYPE mtart,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.222222328186035px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end of my_data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12.222222328186035px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;mo_context-&amp;gt;GET_ROW( importing es_row = my_data ).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12.222222328186035px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Then, &lt;STRONG&gt;my_data-matnr&lt;/STRONG&gt; would contain &lt;STRONG&gt;$159 &lt;/STRONG&gt;and &lt;STRONG&gt;my_data-mtart&lt;/STRONG&gt; would contain &lt;STRONG&gt;FERT&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12.222222328186035px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;This is a common way that generic methods work. I use this technique frequently for my generic data handling classes.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12.222222328186035px; background-color: #ffffff; color: #333333;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Nov 2013 13:28:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-invoke-method-with-exporting-any/m-p/9837016#M1784744</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2013-11-20T13:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to invoke method with EXPORTING ANY</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-invoke-method-with-exporting-any/m-p/9837017#M1784745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a bunch Mathew,&lt;/P&gt;&lt;P&gt;that was spot on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/327866" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;R&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Nov 2013 14:10:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-invoke-method-with-exporting-any/m-p/9837017#M1784745</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-11-20T14:10:35Z</dc:date>
    </item>
  </channel>
</rss>

