<?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: Populate data inside table control in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/populate-data-inside-table-control/m-p/3173946#M755253</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can u give examples of the function: DYNSQL_GENERATE_WHERE_CLAUSE and is it we jus need to type in the codes into the function only?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Dec 2007 06:13:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-12-26T06:13:18Z</dc:date>
    <item>
      <title>Populate data inside table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populate-data-inside-table-control/m-p/3173944#M755251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,can someone help me with this problem...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a Reference Table Input help and I need to populate the values from the selected table names(selected from the input help) into the table control with the respective table fields displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer to this diagram if unclear: [http://img166.imageshack.us/img166/1066/tablecontrolwt4.png]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please give me sample codes. &lt;/P&gt;&lt;P&gt;thanks. &lt;/P&gt;&lt;P&gt;will reward marks if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Evonne Gow on Dec 26, 2007 3:11 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Dec 2007 02:10:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populate-data-inside-table-control/m-p/3173944#M755251</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-26T02:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: Populate data inside table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populate-data-inside-table-control/m-p/3173945#M755252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hai,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use CASE and ENDCASE stament for that Reference Table parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get the Ref.Table name into a variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now:&lt;/P&gt;&lt;P&gt;case reftabname.&lt;/P&gt;&lt;P&gt;when 'ZDM_A_CCO'.&lt;/P&gt;&lt;P&gt;  perform select_database_values using reftabname field1 field2 ..&lt;/P&gt;&lt;P&gt;                                                  changing it_tabc.&lt;/P&gt;&lt;P&gt;when 'ZDM_B_CCO'.&lt;/P&gt;&lt;P&gt;  perform select_database_values using reftabname field1 field2 ..&lt;/P&gt;&lt;P&gt;                                                  changing it_tabc.&lt;/P&gt;&lt;P&gt;endcase.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To build WHERE clause dynamically, use function module: &lt;STRONG&gt;DYNSQL_GENERATE_WHERE_CLAUSE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;under each WHEN statement using Subroutine  select_database_values  by passing the Table name and field names as parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CALL FUNCTION 'DYNSQL_GENERATE_WHERE_CLAUSE'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      fieldname_key_1              = 'AUART'&lt;/P&gt;&lt;P&gt;      fieldname_key_2              = 'VKORG'&lt;/P&gt;&lt;P&gt;      fieldname_value              = 'ERDAT'&lt;/P&gt;&lt;P&gt;      operator                     = '&amp;lt;='&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      where_clause                 = dyn_sql&lt;/P&gt;&lt;P&gt;      control_table                = ztvara&lt;/P&gt;&lt;P&gt;      all_values_key_1             = auart_all&lt;/P&gt;&lt;P&gt;      values_key_1                 = auart_teil&lt;/P&gt;&lt;P&gt;      all_values_key_2             = vkorg_all&lt;/P&gt;&lt;P&gt;      values_key_2                 = vkorg_teil&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      dynsql_too_large             = 1&lt;/P&gt;&lt;P&gt;      wrong_entry_in_control_table = 2&lt;/P&gt;&lt;P&gt;      key_values_inconsistent      = 3&lt;/P&gt;&lt;P&gt;      no_entry_found               = 4&lt;/P&gt;&lt;P&gt;      function_already_called      = 5.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Dec 2007 06:09:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populate-data-inside-table-control/m-p/3173945#M755252</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-26T06:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: Populate data inside table control</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/populate-data-inside-table-control/m-p/3173946#M755253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can u give examples of the function: DYNSQL_GENERATE_WHERE_CLAUSE and is it we jus need to type in the codes into the function only?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Dec 2007 06:13:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/populate-data-inside-table-control/m-p/3173946#M755253</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-12-26T06:13:18Z</dc:date>
    </item>
  </channel>
</rss>

