<?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 dynamic method call over RFC function module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-method-call-over-rfc-function-module/m-p/8633475#M1665116</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;this is my first post ever, so please be gentle with me &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/5.0.1/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have the following question:&lt;/P&gt;&lt;P&gt;i want to create a function module, which is RFC-able and all it should do is import the method name which i will call dynamically and the parameter table which is necessary to call the method with the correct parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;defining the method name as an importing parameter type string for the function module is possible, so whenever the user choses to e.g. press the button logon i will import the proper method name (e.g. LOGON).&lt;/P&gt;&lt;P&gt;2nd i need the parameters which is of type abap_parmbind_tab and here the system (in the SE37) cries that generic types are not allowed for RFC function modules and i have absoluteley no idea of how i can fix this matter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so in short: is it in general possible to create such a RFC function module which will call dynamically the method + the correct parameters via abap_parmbind_tab?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks a lot in advance,&lt;/P&gt;&lt;P&gt;dominik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Apr 2012 11:26:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-04-04T11:26:42Z</dc:date>
    <item>
      <title>dynamic method call over RFC function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-method-call-over-rfc-function-module/m-p/8633475#M1665116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;this is my first post ever, so please be gentle with me &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/5.0.1/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have the following question:&lt;/P&gt;&lt;P&gt;i want to create a function module, which is RFC-able and all it should do is import the method name which i will call dynamically and the parameter table which is necessary to call the method with the correct parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;defining the method name as an importing parameter type string for the function module is possible, so whenever the user choses to e.g. press the button logon i will import the proper method name (e.g. LOGON).&lt;/P&gt;&lt;P&gt;2nd i need the parameters which is of type abap_parmbind_tab and here the system (in the SE37) cries that generic types are not allowed for RFC function modules and i have absoluteley no idea of how i can fix this matter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so in short: is it in general possible to create such a RFC function module which will call dynamically the method + the correct parameters via abap_parmbind_tab?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks a lot in advance,&lt;/P&gt;&lt;P&gt;dominik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Apr 2012 11:26:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-method-call-over-rfc-function-module/m-p/8633475#M1665116</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-04-04T11:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic method call over RFC function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-method-call-over-rfc-function-module/m-p/8633476#M1665117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dominik,&lt;/P&gt;&lt;P&gt;I really liked your idea &lt;SPAN __jive_emoticon_name="wink" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/5.0.1/images/emoticons/wink.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think in your case it won't be possible to include abap_parmbind_tab type parameters.&lt;/P&gt;&lt;P&gt;VALUE of the type &lt;STRONG style="font-family: 'Courier New';"&gt;REF TO DATA. &lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;And references are not allowed in RFC FMs.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;What I think can be done.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;1) get the list of all the methods which are wrapping in the RFC FM.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;2) add all the parameter of all the method in you FM interface ( Nor referecne type )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;3) In the FM based on the FM name passed populate the local variables ABAP_PARMBIND_TAB and make the dynamic call &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;More on this here &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;&lt;A href="http://help.sap.com/saphelp_nw70/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm"&gt;http://help.sap.com/saphelp_nw70/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Apr 2012 12:20:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-method-call-over-rfc-function-module/m-p/8633476#M1665117</guid>
      <dc:creator>Private_Member_49934</dc:creator>
      <dc:date>2012-04-04T12:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic method call over RFC function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-method-call-over-rfc-function-module/m-p/8633477#M1665118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've done exactly what you required, and encountered the same problem. To resolve it I converted the value into hexadecimal before calling the RFC. Within the RFC, I convert the hex value back to whatever type the parameter requires.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Apr 2012 12:54:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-method-call-over-rfc-function-module/m-p/8633477#M1665118</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2012-04-04T12:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic method call over RFC function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-method-call-over-rfc-function-module/m-p/8633478#M1665119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was wrong. This is what you need: cl_abap_container_utilities=&amp;gt;fill_container_c&lt;/P&gt;&lt;P&gt;It returns a string, and then you have to convert that into a table of fixed length characters, so you can rebuild the string at the other end, and then use read_container_c to recover that data. Which could even be a structure or a table..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Apr 2012 13:59:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-method-call-over-rfc-function-module/m-p/8633478#M1665119</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2012-04-05T13:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic method call over RFC function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-method-call-over-rfc-function-module/m-p/8633479#M1665120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I think this is a problem every developer has to face when he/she tries to use dynamic elements with RFC!&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;Matthew Billingham wrote:&lt;/P&gt;&lt;P&gt;&amp;nbsp; ... you have to convert that into a &lt;SPAN style="color: #339966; text-decoration: underline;"&gt;&lt;EM&gt;&lt;STRONG&gt;table of fixed length characters&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;, so you can rebuild the string at the other end ...&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Imo defining the return table of "fixed length characters" will always be a problem - something i faced a few weeks back &lt;SPAN __jive_emoticon_name="sad" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/5.0.1/images/emoticons/sad.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Apr 2012 15:31:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-method-call-over-rfc-function-module/m-p/8633479#M1665120</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2012-04-05T15:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic method call over RFC function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-method-call-over-rfc-function-module/m-p/8633480#M1665121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not a problem. &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_macro_emoticon jive_emote" src="https://community.sap.com/5.0.1/images/emoticons/happy.gif"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;You've converted your data into a string. You cut the string into, say, 256 character portions, so it'll fit into a table of CHAR256. For the last slice, you record how many bytes of the field are actually used.&lt;/P&gt;&lt;P&gt;I.e. assume your string is 'abcdefghijklm', and your table is CHAR8. Then you end up with&lt;/P&gt;&lt;P&gt;abcdefgh&lt;/P&gt;&lt;P&gt;ijklm&lt;/P&gt;&lt;P&gt;To recover the string, you just need the table with these chars, and 5, so you get the length of the string right. This is pretty much the same as what's done for sending binary data as MIME.&lt;/P&gt;&lt;P&gt;Believe me, it works - I've done it! (I should say that using cl_abap_container_utilities was Otto Gold's idea.).&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Apr 2012 07:01:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-method-call-over-rfc-function-module/m-p/8633480#M1665121</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2012-04-06T07:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic method call over RFC function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-method-call-over-rfc-function-module/m-p/8633481#M1665122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;just wanted to finish my thread off. maybe it is helpful for others.&lt;/P&gt;&lt;P&gt;what we have done is following:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;created a RFC FM.&lt;/LI&gt;&lt;LI&gt;only purpose is to pass the import parameters through to another FM which is representing our 'Main' Function.&lt;/LI&gt;&lt;LI&gt;there we unwrap our import parameters and call the proper methods.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it may sound a little bit 'dirty' but a big advantage is that we do not have to deploy the RFC all the time whenever we change something in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i do not know how much performance we will lose with this - if you are interested i can set up some measurements (which i will be able to do in 2 weeks).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jun 2012 12:11:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-method-call-over-rfc-function-module/m-p/8633481#M1665122</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-06-04T12:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic method call over RFC function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-method-call-over-rfc-function-module/m-p/8633482#M1665123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A __default_attr="24079" __jive_macro_name="user" class="jive_macro jive_macro_user" href="https://community.sap.com/"&gt;&lt;/A&gt;, friends,&lt;/P&gt;&lt;P&gt;I am afraid that I must confirm the problem with the fixed length. I learnt the hard way (one of the tools I`ve built does not work over RFC at one of our customers despite the fact it worked just fine on my internal systems). I am researching the problem now and to me the XML option (CALL TRANSFORMATION ID) sounds like the best thing we can do.&lt;/P&gt;&lt;P&gt;I am sorry for misleading recommendation, Matt, the container operation thing is not safe.&lt;/P&gt;&lt;P&gt;Hope this helps other people too, I have seen tons of questions about the topic in last hours.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For further information about the XML option I recommend &lt;A __default_attr="19036" __jive_macro_name="user" class="jive_macro jive_macro_user" href="https://community.sap.com/"&gt;&lt;/A&gt; and the contribution and the feedback thread:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="active_link" href="https://answers.sap.com/thread/53916" title="http://scn.sap.com/thread/53916"&gt;http://scn.sap.com/thread/53916&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="active_link" href="https://answers.sap.com/docs/DOC-10106" title="http://scn.sap.com/docs/DOC-10106"&gt;http://scn.sap.com/docs/DOC-10106&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven`t tested it in production environment yet, but originally used the string container for "any structure" and some structures just didn`t work out.&lt;/P&gt;&lt;P&gt;Cheers Otto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2012 12:39:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-method-call-over-rfc-function-module/m-p/8633482#M1665123</guid>
      <dc:creator>OttoGold</dc:creator>
      <dc:date>2012-10-09T12:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic method call over RFC function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-method-call-over-rfc-function-module/m-p/8633483#M1665124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Dominik, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know its not nice to&amp;nbsp; re open a closed discussion. But,&amp;nbsp; since you are calling methods dynamically and your RFC is generic, how would you handle object instantiation?. Some objects might implement a singleton, others may not, would this not be an issue?. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please do correct me if I am getting wrong somewhere. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;Venkat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2012 17:25:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-method-call-over-rfc-function-module/m-p/8633483#M1665124</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-10-10T17:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic method call over RFC function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-method-call-over-rfc-function-module/m-p/8633484#M1665125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;only purpose is to pass the import parameters through to another FM which is representing our 'Main' Function.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ok , So I missed this point. So you would be creating another FM where the actual object instantiation and the method call would happen. This FM would be application specific I would assume. It would be more like "An Object - message interface".- Sort of theoretical OO programming,&amp;nbsp; where Objects listen and react to messages &lt;SPAN __jive_emoticon_name="grin" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/1031/images/emoticons/grin.gif"&gt;&lt;/SPAN&gt;.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;Venkat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2012 20:03:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-method-call-over-rfc-function-module/m-p/8633484#M1665125</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-10-10T20:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic method call over RFC function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-method-call-over-rfc-function-module/m-p/8633485#M1665126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So why doesn't it work at your customer? I've used the same technique with one of my clients and it is fine. I'm taking a standard table with records comprising flat fields. I don't know its structure until runttime, but need to pass the data to an RFC FM (along with the typing information).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've a container structure defined in the data dictionary:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;RECORD_NUMBER&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INT4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;COMPONENT_NUMBER&amp;nbsp;&amp;nbsp; INT4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;CHAR_REC_NUMBER&amp;nbsp;&amp;nbsp;&amp;nbsp; INT4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;CHAR_DATA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CHAR255&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;RECORD_LENGTH&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INT4&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Then I use this code where &amp;lt;t_data&amp;gt; is a generic table and &amp;lt;s_data&amp;gt; is type any, but is a non-deep structure:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;ls_container is type the container structure, and lt_container is a standard table of it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;SPAN class="L0S31"&gt;* Convert each line to a string, then convert into the container format&lt;BR /&gt;&amp;nbsp; &lt;SPAN class="L0S52"&gt;LOOP &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;AT &lt;/SPAN&gt;&amp;lt;t_data&amp;gt; &lt;SPAN class="L0S52"&gt;ASSIGNING &lt;/SPAN&gt;&amp;lt;s_data&amp;gt;.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ls_container&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;record_number &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;sy&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;tabix.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;DO.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ls_container&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;component_number &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;sy&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;index&lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;SPAN class="L0S31"&gt;&lt;SPAN class="L0S32"&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;ASSIGN &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;COMPONENT &lt;/SPAN&gt;ls_container&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;component_number &lt;SPAN class="L0S52"&gt;OF &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;STRUCTURE &lt;/SPAN&gt;&amp;lt;s_data&amp;gt; &lt;SPAN class="L0S52"&gt;TO &lt;/SPAN&gt;&amp;lt;field&amp;gt;.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;IF &lt;/SPAN&gt;sy&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;subrc &lt;SPAN class="L0S52"&gt;IS &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;NOT &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;INITIAL.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;EXIT.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;ENDIF.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cl_abap_container_utilities&lt;SPAN class="L0S70"&gt;=&amp;gt;&lt;/SPAN&gt;fill_container_c&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;EXPORTING &lt;/SPAN&gt;im_value &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&amp;lt;field&amp;gt; &lt;SPAN class="L0S52"&gt;IMPORTING &lt;/SPAN&gt;ex_container &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;l_converted &lt;SPAN class="L0S55"&gt;).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;DO.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ls_container&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;char_rec_number &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;sy&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;index.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; l_len &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;STRLEN&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;l_converted &lt;SPAN class="L0S55"&gt;).&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;IF &lt;/SPAN&gt;l_len &lt;SPAN class="L0S52"&gt;LT &lt;/SPAN&gt;c_container_width.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ls_container&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;record_length &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;l_len.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ls_container&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;char_data &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;l_converted.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;INSERT &lt;/SPAN&gt;ls_container &lt;SPAN class="L0S52"&gt;INTO &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TABLE &lt;/SPAN&gt;lt_container.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;EXIT.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;ENDIF.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ls_container&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;record_length &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;c_container_width.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ls_container&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;char_data &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;l_converted&lt;SPAN class="L0S55"&gt;(&lt;/SPAN&gt;c_container_width&lt;SPAN class="L0S55"&gt;).&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;INSERT &lt;/SPAN&gt;ls_container &lt;SPAN class="L0S52"&gt;INTO &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TABLE &lt;/SPAN&gt;lt_container.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; l_converted &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;l_converted+c_container_width.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;IF &lt;/SPAN&gt;l_converted &lt;SPAN class="L0S52"&gt;IS &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;INITIAL.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;EXIT.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;ENDIF.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;ENDDO.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;ENDDO.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; &lt;SPAN class="L0S52"&gt;ENDLOOP.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;SPAN class="L0S31"&gt;&lt;SPAN class="L0S52"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;&lt;SPAN class="L0S31"&gt;&lt;SPAN class="L0S52"&gt;At the receiving end, I decode it_data - which is my table of the container structure type. l_record is a string.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;&lt;SPAN class="L0S31"&gt;&lt;SPAN class="L0S52"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;SPAN class="L0S31"&gt;* Convert the data from the interface into the right format&lt;BR /&gt;&amp;nbsp; &lt;SPAN class="L0S52"&gt;sort &lt;/SPAN&gt;it_data &lt;SPAN class="L0S52"&gt;by &lt;/SPAN&gt;record_number component_number char_rec_number.&lt;BR /&gt;&amp;nbsp; &lt;SPAN class="L0S52"&gt;loop &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;at &lt;/SPAN&gt;it_data &lt;SPAN class="L0S52"&gt;into &lt;/SPAN&gt;ls_data.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;if &lt;/SPAN&gt;ls_data&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;record_length &lt;SPAN class="L0S52"&gt;gt &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;0.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;concatenate &lt;/SPAN&gt;l_record ls_data&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;char_data&lt;SPAN class="L0S55"&gt;(&lt;/SPAN&gt;ls_data&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;record_length&lt;SPAN class="L0S55"&gt;) &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;into &lt;/SPAN&gt;l_record.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;endif.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;at &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;end &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;of &lt;/SPAN&gt;component_number. &lt;SPAN class="L0S31"&gt;" New component&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;assign &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;component &lt;/SPAN&gt;ls_data&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;component_number &lt;SPAN class="L0S52"&gt;of &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;structure &lt;/SPAN&gt;&amp;lt;s_outdata&amp;gt; &lt;SPAN class="L0S52"&gt;to &lt;/SPAN&gt;&amp;lt;field&amp;gt;.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cl_abap_container_utilities&lt;SPAN class="L0S70"&gt;=&amp;gt;&lt;/SPAN&gt;read_container_c&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;exporting &lt;/SPAN&gt;im_container &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;l_record&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;importing &lt;/SPAN&gt;ex_value &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&amp;lt;field&amp;gt; &lt;SPAN class="L0S55"&gt;).&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;clear &lt;/SPAN&gt;l_record.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;endat.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;at &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;end &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;of &lt;/SPAN&gt;record_number.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;insert &lt;/SPAN&gt;&amp;lt;s_outdata&amp;gt; &lt;SPAN class="L0S52"&gt;into &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;table &lt;/SPAN&gt;&amp;lt;t_outdata&amp;gt;.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;endat.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &lt;SPAN class="L0S52"&gt;endloop.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S31"&gt;&lt;SPAN class="L0S52"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S31"&gt;&lt;SPAN class="L0S52"&gt;&amp;lt;t_outdata&amp;gt; is a table of the same structure as &amp;lt;t_data&amp;gt;. (likewise &amp;lt;s_outdata&amp;gt; and &amp;lt;s_data&amp;gt; ).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S31"&gt;&lt;SPAN class="L0S52"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2012 08:28:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-method-call-over-rfc-function-module/m-p/8633485#M1665126</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2012-10-19T08:28:08Z</dc:date>
    </item>
  </channel>
</rss>

