<?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 Help needed regarding ALV in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-needed-regarding-alv/m-p/4211087#M1006244</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 am very new to ABAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got a requirement to modify already existing program like , I need to display 5 columns in the ALV Grid basing on a condition i.e., there will be a checkbox on the selection screen. When the cehckbox is checked, hten i should display the 5 columns o n the ALV Grid. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The existing program has a code which is calling the ALV_GRID_DISPLAY function module and  the parameters passed are the program and then the structure in se11. The structure contains 30 fields and in the  ALV grid , all the 30 fields are displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, I need to write the code to add my 5  fields to the already existing ALV Grid display. &lt;/P&gt;&lt;P&gt;when i asked my frnds, they told me to add the 5 fields in the structure taht the program is already using. But , there is a problem. Even though the checkbox is not checked, the empty 5 columns are displayed on the grid as they are already added in the structure. But, we want the 5 columns only when the checkbox on the selction screen is checked. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me out in provding me the code. The program is not using any fieldcatalog. Do i need to addit?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i proceedfurther? I am already stuck with it. Please help me out as it  is a v urgent requirement.&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;Mohan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Julius Bussche on Jul 19, 2008 8:43 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 19 Jul 2008 16:42:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-19T16:42:39Z</dc:date>
    <item>
      <title>Help needed regarding ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-needed-regarding-alv/m-p/4211087#M1006244</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 am very new to ABAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got a requirement to modify already existing program like , I need to display 5 columns in the ALV Grid basing on a condition i.e., there will be a checkbox on the selection screen. When the cehckbox is checked, hten i should display the 5 columns o n the ALV Grid. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The existing program has a code which is calling the ALV_GRID_DISPLAY function module and  the parameters passed are the program and then the structure in se11. The structure contains 30 fields and in the  ALV grid , all the 30 fields are displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, I need to write the code to add my 5  fields to the already existing ALV Grid display. &lt;/P&gt;&lt;P&gt;when i asked my frnds, they told me to add the 5 fields in the structure taht the program is already using. But , there is a problem. Even though the checkbox is not checked, the empty 5 columns are displayed on the grid as they are already added in the structure. But, we want the 5 columns only when the checkbox on the selction screen is checked. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me out in provding me the code. The program is not using any fieldcatalog. Do i need to addit?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i proceedfurther? I am already stuck with it. Please help me out as it  is a v urgent requirement.&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;Mohan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Julius Bussche on Jul 19, 2008 8:43 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Jul 2008 16:42:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-needed-regarding-alv/m-p/4211087#M1006244</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-19T16:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help needed regarding ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-needed-regarding-alv/m-p/4211088#M1006245</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;Follow these steps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Add ur 5 fields in the structure (in DDIC level)&lt;/P&gt;&lt;P&gt;2. Instead of passing the structure name directly to the FM REUSE_ALV_GRID_DISPLAY pass it to FM REUSE_ALV_FIELDCATALOG_MERGE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            I_STRUCTURE_NAME     = &amp;lt; ur structure name&amp;gt;&lt;/P&gt;&lt;P&gt;       CHANGING&lt;/P&gt;&lt;P&gt;            ct_fieldcat        = fieldcat[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. As in ur case if the check box is checked only then u need to display ur 5 fields..so to do that u need to modify the filed v=catalog table returned by the above FM like:&lt;/P&gt;&lt;P&gt;if check_box = 'X'.&lt;/P&gt;&lt;P&gt;loop at fieldcat into w_cat.&lt;/P&gt;&lt;P&gt; if w_cat-fieldname = 'MYFLD1' or&lt;/P&gt;&lt;P&gt;   w_cat-fieldname = 'MYFLD2' or&lt;/P&gt;&lt;P&gt;   w_cat-fieldname = 'MYFLD3' or&lt;/P&gt;&lt;P&gt;   w_cat-fieldname = 'MYFLD4' or&lt;/P&gt;&lt;P&gt;   w_cat-fieldname = 'MYFLD5'.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;w_cat-no_out = 'X'.&lt;/P&gt;&lt;P&gt;modify fieldcat from w_cat transporting no_out index sy-tabix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. pass this field catalog table to Fm REUSE_ALV_GRID_DISPLAY instead of the structure name.&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;&lt;STRONG&gt;I_STRUCTURE_NAME     = &amp;lt;&amp;lt; Comment out this parameter&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;         I_CALLBACK_PROGRAM                = g_REPID&lt;/P&gt;&lt;P&gt;         iS_LAYOUT   = is_layout&lt;/P&gt;&lt;P&gt;         it_SORT     = It_SORT&lt;/P&gt;&lt;P&gt;         &lt;STRONG&gt;it_fieldcat = fieldcat[]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;         I_SAVE                            = 'A' "&lt;/P&gt;&lt;P&gt;         IS_VARIANT                        = VARIANT&lt;/P&gt;&lt;P&gt;       I_CALLBACK_TOP_OF_PAGE            = 'TOP_OF_PAGE'&lt;/P&gt;&lt;P&gt;       I_GRID_TITLE                      = 'Special ALV'&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            t_outtab    = t_daten.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Hope it will solve ur problem&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;JOy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Jul 2008 18:39:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-needed-regarding-alv/m-p/4211088#M1006245</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-19T18:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: Help needed regarding ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-needed-regarding-alv/m-p/4211089#M1006246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Welcome to SDN!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I edited your subject title. Please see [the rules|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rules&lt;EM&gt;of&lt;/EM&gt;Engagement] for the reason why I did this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Julius&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Jul 2008 20:46:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-needed-regarding-alv/m-p/4211089#M1006246</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-19T20:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: Help needed regarding ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-needed-regarding-alv/m-p/4211090#M1006247</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;If you want to  display only few coloumns, then you have to append your field catlog without using &lt;/P&gt;&lt;P&gt;FM 'REUSE_ALV_FIELDCATLOG_MERGE'.&lt;/P&gt;&lt;P&gt;Since your fieldcatlog is just like a internal table, so you can append it according to your needs. you&lt;/P&gt;&lt;P&gt; have to individualy specify what are your coloumn names, what are their position etc.. once you have&lt;/P&gt;&lt;P&gt; appended it, then pass it in your FM 'REUSE_ALV_GRID_DISPLAY'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Jul 2008 04:08:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-needed-regarding-alv/m-p/4211090#M1006247</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-20T04:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: Help needed regarding ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-needed-regarding-alv/m-p/4211091#M1006248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I thank everybody for helping me out in this regard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will definitely try it out and get back if i have any other queries.&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;Mohan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Jul 2008 08:53:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-needed-regarding-alv/m-p/4211091#M1006248</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-20T08:53:21Z</dc:date>
    </item>
  </channel>
</rss>

