<?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 table in smartforms? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-in-smartforms/m-p/10891182#M1889048</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a dynamic table in driver program and filled the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in the form designing, how to declare the dynamic tables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly assist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aj...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Feb 2015 09:14:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2015-02-27T09:14:52Z</dc:date>
    <item>
      <title>Dynamic table in smartforms?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-in-smartforms/m-p/10891182#M1889048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a dynamic table in driver program and filled the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in the form designing, how to declare the dynamic tables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly assist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Aj...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 09:14:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-in-smartforms/m-p/10891182#M1889048</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-02-27T09:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic table in smartforms?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-in-smartforms/m-p/10891183#M1889049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ajay,&lt;/P&gt;&lt;P&gt;Dynamic internal table, we can use in driver program, We can move the internal table value from driver program to smartform in the following way.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Using ABAP Memory&lt;/LI&gt;&lt;LI&gt;Using Structure&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Using ABAP Memory we can move it.&lt;OL&gt;&lt;LI&gt;Using IMPORT/EXPORT Statement, we can move the internal table, at the end we are suppose to show the value in the smartform table. In there, we have to mention the variable name in textfield (i.e. &amp;amp;FIELD1&amp;amp;) to show the&amp;nbsp; value in the smartform. &lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/654916" width="450" /&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;Using Tables section in Smartform, we can move it.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In order to create the structure, it is required to create the structure in SE11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Convert the Dynamic internal table to static internal table. Create the structure in SE11, use the same structure in both driver program and smartform and move the values to smartform.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;"Run the Loop&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;LOOP AT &amp;lt;dyn_table&amp;gt; INTO &amp;lt;fs_line&amp;gt;.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;"Assign the value&lt;/P&gt;
&lt;P&gt;ASSIGN COMPONENT 'BWART' OF STRUCTURE &amp;lt;fs_line&amp;gt; TO &amp;lt;fs_value&amp;gt;.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;"Check value is initialized&lt;/P&gt;
&lt;P&gt;IF &amp;lt;fs_value&amp;gt; IS ASSIGNED.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;"Assign to final work area&lt;/P&gt;
&lt;P&gt;&amp;nbsp; WA_FINAL-BWART = &amp;lt;FS_value&amp;gt;.&lt;/P&gt;
&lt;P&gt;ENDIF.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;"Append final internal table&lt;/P&gt;
&lt;P&gt;APPEND WA_FINAL TO IT_FINAL.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;"Clear WA&lt;/P&gt;
&lt;P&gt;CLEAR WA_FINAL.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;ENDLOOP.&lt;/P&gt;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope at the end, in both the cases, we are suppose to mention the structure field name in table text-field as shown in above screenshot. I recommend to create the structure and convert dynamic internal table to static internal table using the above code. &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;Rajkumar Narasimman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 11:57:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/dynamic-table-in-smartforms/m-p/10891183#M1889049</guid>
      <dc:creator>rajkumarnarasimman</dc:creator>
      <dc:date>2015-02-27T11:57:31Z</dc:date>
    </item>
  </channel>
</rss>

