<?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: SAP Query. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query/m-p/5659263#M1287276</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;paste ur code&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Jun 2009 09:55:05 GMT</pubDate>
    <dc:creator>kesavadas_thekkillath</dc:creator>
    <dc:date>2009-06-10T09:55:05Z</dc:date>
    <item>
      <title>SAP Query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query/m-p/5659256#M1287269</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;My requirement is....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a query with few selection screen parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;say column1&lt;/P&gt;&lt;P&gt;      column2&lt;/P&gt;&lt;P&gt;      column3&lt;/P&gt;&lt;P&gt;      column4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if in column 1 some value is entered then only first column should be displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or if column1 and column2 is selected then only these two columns should be displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i achieve this.&lt;/P&gt;&lt;P&gt;Any help will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhanu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2009 08:02:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query/m-p/5659256#M1287269</guid>
      <dc:creator>former_member556412</dc:creator>
      <dc:date>2009-06-10T08:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query/m-p/5659257#M1287270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nand&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think you are refering to creation of a dynamic internal table. If yes, then after your field catalogue is created then:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Loop at the range at the selection screen or if requires, do the necessary validations/manipulation, and store values at another internal table. For example, we are looping here at the internal table so as to provide the headings at the respective columns dynamically. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT tb_dynamic_range.&lt;/P&gt;&lt;P&gt;    wa_fieldcat-col_pos		= lv_column_pos.&lt;/P&gt;&lt;P&gt;wa_fieldcat-fieldname		= tb_dynamic_range-&lt;/P&gt;&lt;P&gt;&amp;lt;Field; containing the name&amp;gt;.&lt;/P&gt;&lt;P&gt;    wa_fieldcat-seltext_l		= wa_fieldcat-seltext_m&lt;/P&gt;&lt;P&gt;                          		= wa_fieldcat-seltext_s&lt;/P&gt;&lt;P&gt;                          	= tb_dynamic_range-&lt;/P&gt;&lt;P&gt;&amp;lt;Field; containing the name&amp;gt;.&lt;/P&gt;&lt;P&gt;    wa_fieldcat-outputlen		= u201810u2019.&lt;/P&gt;&lt;P&gt;    APPEND wa_fieldcat TO tb_fieldcat.&lt;/P&gt;&lt;P&gt;    CLEAR wa_fieldcat.&lt;/P&gt;&lt;P&gt;    lv_column_pos = lv_column_pos + 1.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here, it has been considered that all the dynamic columns corresponding to one line item at tb_output can be shown at the last of all the rest columns.This can be changed if need persists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Generate the Dynamic internal table with the relevant fields prepared.&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		= tb_fields_for_it&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        ep_table			= gp_dyn_table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Assign a pointer to the Dynamic internal table&lt;/P&gt;&lt;P&gt;  ASSIGN gp_dyn_table-&amp;gt;* TO &amp;lt;gt_table&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  ASSIGN LOCAL COPY OF INITIAL LINE OF &amp;lt;gt_table&amp;gt; TO &amp;lt;fs_table&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Filling the dynamic table with the values obtained at the output table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  LOOP AT tb_output .&lt;/P&gt;&lt;P&gt;    lv_index = co_1.&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT lv_index OF STRUCTURE &amp;lt;fs_table&amp;gt; &lt;/P&gt;&lt;P&gt;TO &amp;lt;ls_field&amp;gt;.&lt;/P&gt;&lt;P&gt;    &amp;lt;ls_field&amp;gt; = tb_output-field1.&lt;/P&gt;&lt;P&gt;    ADD co_1 TO lv_index.&lt;/P&gt;&lt;P&gt;ASSIGN COMPONENT lv_index OF STRUCTURE &amp;lt;fs_table&amp;gt; &lt;/P&gt;&lt;P&gt;TO &amp;lt;ls_field&amp;gt;.&lt;/P&gt;&lt;P&gt;    &amp;lt;ls_field&amp;gt; = tb_output-field2.&lt;/P&gt;&lt;P&gt;    ADD co_1 TO lv_index.&lt;/P&gt;&lt;P&gt;And so on for the other remaining fieldsu2026u2026&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its a bit tedious, but will surely help you.&lt;/P&gt;&lt;P&gt;Harsh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2009 08:19:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query/m-p/5659257#M1287270</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-10T08:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query/m-p/5659258#M1287271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Plz use proper subjects for ur threads ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt; have a query with few selection screen parameters.&lt;SPAN __jive_macro_name="qoute"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; column1&lt;/P&gt;&lt;P&gt;column2&lt;/P&gt;&lt;P&gt;column3&lt;/P&gt;&lt;P&gt;column4&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How are these two related...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ur qn is not clear&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2009 08:23:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query/m-p/5659258#M1287271</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-06-10T08:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query/m-p/5659259#M1287272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a selection screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In which i have 4 parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        Column I ..................Input field &lt;/P&gt;&lt;P&gt;        Column II ...................Input field &lt;/P&gt;&lt;P&gt;        Column III ...................Input field &lt;/P&gt;&lt;P&gt;        Column IV ..................Input field &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Above 4 Columns should be displayed dynamically &lt;/P&gt;&lt;P&gt;Ex., If user enters Column I and Column II then the output should have only entered columns. &lt;/P&gt;&lt;P&gt;     &lt;/P&gt;&lt;P&gt;I hope its clear Now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Bhanu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2009 08:28:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query/m-p/5659259#M1287272</guid>
      <dc:creator>former_member556412</dc:creator>
      <dc:date>2009-06-10T08:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query/m-p/5659260#M1287273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check colomn1 is  initial.&lt;/P&gt;&lt;P&gt;check colomn2 is  initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then build ur logic.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2009 08:30:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query/m-p/5659260#M1287273</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-06-10T08:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query/m-p/5659261#M1287274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have done the same .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But not getting the expected result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhanu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2009 08:32:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query/m-p/5659261#M1287274</guid>
      <dc:creator>former_member556412</dc:creator>
      <dc:date>2009-06-10T08:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query/m-p/5659262#M1287275</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;You can either build your logic by checking for the column is initial and then writing the logic below it, or else you can do all you selections and finally while building your field catalogue just check is the parameter is initial. If yes then hide or restrict that column data from appearing in the output by using the parameter NO-OUT = 'X'. This would make sure that the coulmns where the value is not eneterd will not appear in the output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vikas.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2009 09:09:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query/m-p/5659262#M1287275</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-10T09:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query/m-p/5659263#M1287276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;paste ur code&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jun 2009 09:55:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query/m-p/5659263#M1287276</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2009-06-10T09:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: SAP Query.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query/m-p/5659264#M1287277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This requirement was getting much complex so have done it using Reports.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2009 05:12:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sap-query/m-p/5659264#M1287277</guid>
      <dc:creator>former_member556412</dc:creator>
      <dc:date>2009-06-17T05:12:12Z</dc:date>
    </item>
  </channel>
</rss>

