<?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: Dynamic Call Function/Class Method in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-call-function-class-method/m-p/6283838#M1388754</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;you can call a Method like this where the name of the method is concatenated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CONCATENATE 'SC_' me-&amp;gt;gf_scenario '_SAVE' INTO lf_method.
  CALL METHOD me-&amp;gt;(lf_method).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Than I can imagine to loop over a tabele with all the Method Call to be executes un there:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Loop at gt_meth_calls into ls_meth_call.
   ls_meth_call-object_instance-&amp;gt;(ls_meth_call-meth_name).
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The table should be structured such that the first component contains a reference to the instance and the second component will be the Method name to run.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Oct 2009 10:52:12 GMT</pubDate>
    <dc:creator>Timo_John1</dc:creator>
    <dc:date>2009-10-28T10:52:12Z</dc:date>
    <item>
      <title>Dynamic Call Function/Class Method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-call-function-class-method/m-p/6283836#M1388752</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;I have a requirement for which I need your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to Call a Method dynamically inside a program. how to do it? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My another quary is that how to call more than one class method dynamicaly in the program, one at a time, based on certain conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the requirements mentioned above feels awakward to me, but are they feasible. Eagerly waiting for a reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pulokesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Oct 2009 12:21:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-call-function-class-method/m-p/6283836#M1388752</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-26T12:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Call Function/Class Method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-call-function-class-method/m-p/6283837#M1388753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dynamic tokens are supported by ABAP &amp;amp; i think the req. mentioned by you are feasible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please refer to this [link|&lt;A class="jive_macro jive_macro_document" href="https://community.sap.com/" __jive_macro_name="document" modifiedtitle="true" __default_attr="18507"&gt;&lt;/A&gt;;jsessionid=(J2EE3414700)ID0610766550DB12900366814130486807End?rid=/library/uuid/b332e090-0201-0010-bdbd-b735e96fe0ae&amp;amp;overridelayout=true] for dynamic calling of FMs &amp;amp; Methods.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As to how you want to implement, thats another topic altogether &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Oct 2009 12:26:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-call-function-class-method/m-p/6283837#M1388753</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2009-10-26T12:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Call Function/Class Method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-call-function-class-method/m-p/6283838#M1388754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;you can call a Method like this where the name of the method is concatenated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CONCATENATE 'SC_' me-&amp;gt;gf_scenario '_SAVE' INTO lf_method.
  CALL METHOD me-&amp;gt;(lf_method).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Than I can imagine to loop over a tabele with all the Method Call to be executes un there:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
Loop at gt_meth_calls into ls_meth_call.
   ls_meth_call-object_instance-&amp;gt;(ls_meth_call-meth_name).
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The table should be structured such that the first component contains a reference to the instance and the second component will be the Method name to run.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2009 10:52:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-call-function-class-method/m-p/6283838#M1388754</guid>
      <dc:creator>Timo_John1</dc:creator>
      <dc:date>2009-10-28T10:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Call Function/Class Method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-call-function-class-method/m-p/6283839#M1388755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Timo and Suhas for your contributions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using your solutions in a different way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have myself figured out how to populate data to the parameter table which will be containing data and reference of the I/P and E/P components of the calling dynamic method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TRY.&lt;/P&gt;&lt;P&gt;  CALL METHOD&lt;/P&gt;&lt;P&gt;    (%p_class)=&amp;gt;(%p_method)&lt;/P&gt;&lt;P&gt;    PARAMETER-TABLE&lt;/P&gt;&lt;P&gt;    gi_par_tab.&lt;/P&gt;&lt;P&gt;CATCH .........&lt;/P&gt;&lt;P&gt;ENDTRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table vseomepara and field symbol usage logic will help how to populate data in the parameter table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pulokesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Oct 2009 11:17:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-call-function-class-method/m-p/6283839#M1388755</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-28T11:17:40Z</dc:date>
    </item>
  </channel>
</rss>

