<?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 do I create structures for RFC call parameters at runtime ? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-create-structures-for-rfc-call-parameters-at-runtime/m-p/1349757#M175542</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;As long as you have something in the DB to refer to you can create a structure dynamically at runtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE DATA var type (STR).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STR is the name of the structure in SE11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After that you can assigne values using fields symbols and ASSIGN COMPONENT xxx of STR XXX to &amp;lt;FS&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;Note : Please mark the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 May 2006 08:21:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-05-29T08:21:59Z</dc:date>
    <item>
      <title>How do I create structures for RFC call parameters at runtime ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-create-structures-for-rfc-call-parameters-at-runtime/m-p/1349756#M175541</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 RFC module that takes one table type and returns complex structure. Can I create these parameters at runtime and pass it to the function (looking at the signature of the RFC).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So that if the structure elements of the RFC changes in the other system, the module would still work on the parent system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mahidhar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2006 08:14:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-create-structures-for-rfc-call-parameters-at-runtime/m-p/1349756#M175541</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-29T08:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create structures for RFC call parameters at runtime ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-create-structures-for-rfc-call-parameters-at-runtime/m-p/1349757#M175542</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;As long as you have something in the DB to refer to you can create a structure dynamically at runtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE DATA var type (STR).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STR is the name of the structure in SE11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After that you can assigne values using fields symbols and ASSIGN COMPONENT xxx of STR XXX to &amp;lt;FS&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;P&gt;Note : Please mark the helpful answers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2006 08:21:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-create-structures-for-rfc-call-parameters-at-runtime/m-p/1349757#M175542</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-29T08:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create structures for RFC call parameters at runtime ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-create-structures-for-rfc-call-parameters-at-runtime/m-p/1349758#M175543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi madhikar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. &lt;/P&gt;&lt;P&gt;  For this purpose,&lt;/P&gt;&lt;P&gt;  in my program,&lt;/P&gt;&lt;P&gt;  there is an INDEPENDENT FORM &lt;/P&gt;&lt;P&gt;  whose inputs are &lt;/P&gt;&lt;P&gt;  TABLE NAME / STRUCTURE NAME&lt;/P&gt;&lt;P&gt;  and from those, it consructs dynamic table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Here is the program.&lt;/P&gt;&lt;P&gt;the dynamic table name will be &lt;/P&gt;&lt;P&gt;&amp;lt;DYNTABLE&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. U can use this program (FORM in this program)&lt;/P&gt;&lt;P&gt;to generate any kind of internal table&lt;/P&gt;&lt;P&gt;by specifying TABLE NAME .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT abc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="--------" /&gt;&lt;P&gt; COMPULSORY&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;dyntable&amp;gt; TYPE ANY TABLE.&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;dynline&amp;gt; TYPE ANY.&lt;/P&gt;&lt;P&gt;DATA: lt TYPE lvc_t_fcat.&lt;/P&gt;&lt;P&gt;DATA: ls TYPE lvc_s_fcat.&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;fld&amp;gt; TYPE ANY.&lt;/P&gt;&lt;P&gt;DATA : fldname(50) TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------" /&gt;&lt;P&gt;parameters : iname LIKE dd02l-tabname.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="---------" /&gt;&lt;P&gt; PERFORM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PERFORM mydyntable USING lt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BREAK-POINT.&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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;INDEPENDENT FORM&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM mydyntable USING ptabname.&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;*----&lt;/P&gt;&lt;HR originaltext="---------" /&gt;&lt;P&gt; Create Dyn Table From FC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;fs_data&amp;gt; TYPE REF TO data.&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;fs_1&amp;gt;.&lt;/P&gt;&lt;P&gt;FIELD-SYMBOLS: &amp;lt;fs_2&amp;gt; TYPE ANY TABLE.&lt;/P&gt;&lt;P&gt;DATA: lt_data TYPE REF TO data.&lt;/P&gt;&lt;P&gt;data : lt TYPE lvc_t_fcat .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : ddfields LIKE ddfield OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="--------------------------------------" /&gt;&lt;P&gt;CALL FUNCTION 'DD_NAMETAB_TO_DDFIELDS'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;tabname = iname&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;ddfields = ddfields.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="--------" /&gt;&lt;P&gt; CONSTRUCT FIELD LIST&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT ddfields.&lt;/P&gt;&lt;P&gt;ls-fieldname = ddfields-fieldname.&lt;/P&gt;&lt;P&gt;APPEND ls TO lt.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN lt_data TO &amp;lt;fs_data&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL METHOD cl_alv_table_create=&amp;gt;create_dynamic_table&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;it_fieldcatalog = lt&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;ep_table = &amp;lt;fs_data&amp;gt;&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;generate_subpool_dir_full = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2.&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;ENDIF.&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;HR originaltext="--------" /&gt;&lt;P&gt; Assign Dyn Table To Field Sumbol&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ASSIGN &amp;lt;fs_data&amp;gt;-&amp;gt;* TO &amp;lt;fs_1&amp;gt;.&lt;/P&gt;&lt;P&gt;ASSIGN &amp;lt;fs_1&amp;gt; TO &amp;lt;fs_2&amp;gt;.&lt;/P&gt;&lt;P&gt;ASSIGN &amp;lt;fs_1&amp;gt; TO &amp;lt;dyntable&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. "MYDYNTABLE&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2006 08:22:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-create-structures-for-rfc-call-parameters-at-runtime/m-p/1349758#M175543</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-29T08:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create structures for RFC call parameters at runtime ?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-create-structures-for-rfc-call-parameters-at-runtime/m-p/1349759#M175544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mahidhar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes, why not. Starting release 46C you can create structures dynamically, starting with 47 you can create tables.&lt;/P&gt;&lt;P&gt;Make sure that the structure is defined in your source system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sample:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;field-symbols: &lt;/P&gt;&lt;P&gt;  &amp;lt;any&amp;gt; type any,&lt;/P&gt;&lt;P&gt;  &amp;lt;anytab&amp;gt; type any table.&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;  l_ref type ref to data.&lt;/P&gt;&lt;P&gt;create data l_ref type ([strucname]).&lt;/P&gt;&lt;P&gt;assign l_ref-&amp;gt;* to &amp;lt;any&amp;gt;.&lt;/P&gt;&lt;P&gt;create data l_ref type table of ([strucname]).&lt;/P&gt;&lt;P&gt;assign l_ref-&amp;gt;* to &amp;lt;anytab&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now use &amp;lt;any&amp;gt; as the dynamically created structure and &amp;lt;anytab&amp;gt; as the dynamically created internal table.&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;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2006 08:29:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-do-i-create-structures-for-rfc-call-parameters-at-runtime/m-p/1349759#M175544</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2006-05-29T08:29:58Z</dc:date>
    </item>
  </channel>
</rss>

