<?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: ALV in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1849982#M360168</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We can set the GUI status of the screen in which ALV is displayed by using PF status in the PBO of the screen.Further,if you want to remove a few buttons on the tool bar of the ALV,then you can use the following example for the same by passing values for IT_TOOLBAR_EXCLUDING parameter in the set_table_for_first_display method.In the example below,the Subtotal and the filter button has been removed from the toolbar:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: alv type ref to cl_gui_alv_GRID,&lt;/P&gt;&lt;P&gt;      cont type ref to cl_gui_custom_container,&lt;/P&gt;&lt;P&gt;      itab_spfli type table of spfli,&lt;/P&gt;&lt;P&gt;      ok_code type sy-ucomm,&lt;/P&gt;&lt;P&gt;      itab_ui type UI_FUNCTIONS,&lt;/P&gt;&lt;P&gt;      wa_ui type UI_FUNC.&lt;/P&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;select * from spfli into table itab_spfli.&lt;/P&gt;&lt;P&gt;WA_ui = CL_GUI_ALV_GRID=&amp;gt;MC_MB_FILTER. "static no&lt;/P&gt;&lt;P&gt;APPEND WA_ui TO Itab_ui.&lt;/P&gt;&lt;P&gt;WA_ui = CL_GUI_ALV_GRID=&amp;gt;MC_MB_SUBTOT.&lt;/P&gt;&lt;P&gt;APPEND WA_ui TO Itab_ui.&lt;/P&gt;&lt;P&gt;call screen 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Module  STATUS_0100  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE STATUS_0100 OUTPUT.&lt;/P&gt;&lt;P&gt; seT PF-STATUS 'GUI'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; SET TITLEBAR 'xxx'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if cont is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE OBJECT cont&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          CONTAINER_NAME              = 'CONTAINER'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE OBJECT ALV&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    I_PARENT          = CONT.&lt;/P&gt;&lt;P&gt;CALL METHOD ALV-&amp;gt;SET_TABLE_FOR_FIRST_DISPLAY&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    I_STRUCTURE_NAME              = 'SPFLI'&lt;/P&gt;&lt;P&gt;    IT_TOOLBAR_EXCLUDING          =  itab_ui&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CHANGING&lt;/P&gt;&lt;P&gt;    IT_OUTTAB                     = itab_spfli&lt;/P&gt;&lt;P&gt;        .&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " STATUS_0100  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Module  USER_COMMAND_0100  INPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE USER_COMMAND_0100 INPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case ok_code.&lt;/P&gt;&lt;P&gt;when 'BACK'.&lt;/P&gt;&lt;P&gt;leave to screen 0.&lt;/P&gt;&lt;P&gt;when 'EXIT'.&lt;/P&gt;&lt;P&gt;leave to screen 0.&lt;/P&gt;&lt;P&gt;when 'SAVE'.&lt;/P&gt;&lt;P&gt;MODIFY spfli from table itab_spfli.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;FOR EVENTS IN ALV&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on requirements,we can use the various events available in cl_gui_alv_grid.&lt;/P&gt;&lt;P&gt;For example,we can choose a particular row in ALV and fetch all the details using the event get_selected_row.You can check all the events available for ALV :Use transaction se24 and display the class cl_gui_alv_grid -&amp;gt;events tab.&lt;/P&gt;&lt;P&gt;To use any event,in your program you should set handler for the event,define a local class for event definition and in the implementation,write the event handling method based on your logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR MORE INFO ON ALV,check this link.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/www.abap4.it/download/ALV.pdf" target="test_blank"&gt;www.abap4.it/download/ALV.pdf&lt;/A&gt; &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;Beejal&lt;/P&gt;&lt;P&gt;**PLEASE REWARD IF ANSWER HELPS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Jan 2007 10:41:53 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-25T10:41:53Z</dc:date>
    <item>
      <title>ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1849980#M360166</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;1)&lt;/P&gt;&lt;P&gt;is it possible to change parameter of alv o/p table in runtime if yes how.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) &lt;/P&gt;&lt;P&gt; can we set the on gui status in case of ALV or ALV grid if yes plz explane with a example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3)&lt;/P&gt;&lt;P&gt;  what r the event in alv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;deepak&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jan 2007 05:58:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1849980#M360166</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-25T05:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1849981#M360167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Deepak,&lt;/P&gt;&lt;P&gt;                   Go through the example BCALV_GRID* you will get all ur answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Events are something when you click something on ALV GRID .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gui status is possible with your own user defined tool bar .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please reward if useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jan 2007 09:58:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1849981#M360167</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-25T09:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1849982#M360168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We can set the GUI status of the screen in which ALV is displayed by using PF status in the PBO of the screen.Further,if you want to remove a few buttons on the tool bar of the ALV,then you can use the following example for the same by passing values for IT_TOOLBAR_EXCLUDING parameter in the set_table_for_first_display method.In the example below,the Subtotal and the filter button has been removed from the toolbar:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: alv type ref to cl_gui_alv_GRID,&lt;/P&gt;&lt;P&gt;      cont type ref to cl_gui_custom_container,&lt;/P&gt;&lt;P&gt;      itab_spfli type table of spfli,&lt;/P&gt;&lt;P&gt;      ok_code type sy-ucomm,&lt;/P&gt;&lt;P&gt;      itab_ui type UI_FUNCTIONS,&lt;/P&gt;&lt;P&gt;      wa_ui type UI_FUNC.&lt;/P&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;select * from spfli into table itab_spfli.&lt;/P&gt;&lt;P&gt;WA_ui = CL_GUI_ALV_GRID=&amp;gt;MC_MB_FILTER. "static no&lt;/P&gt;&lt;P&gt;APPEND WA_ui TO Itab_ui.&lt;/P&gt;&lt;P&gt;WA_ui = CL_GUI_ALV_GRID=&amp;gt;MC_MB_SUBTOT.&lt;/P&gt;&lt;P&gt;APPEND WA_ui TO Itab_ui.&lt;/P&gt;&lt;P&gt;call screen 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Module  STATUS_0100  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE STATUS_0100 OUTPUT.&lt;/P&gt;&lt;P&gt; seT PF-STATUS 'GUI'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; SET TITLEBAR 'xxx'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if cont is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE OBJECT cont&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          CONTAINER_NAME              = 'CONTAINER'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREATE OBJECT ALV&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    I_PARENT          = CONT.&lt;/P&gt;&lt;P&gt;CALL METHOD ALV-&amp;gt;SET_TABLE_FOR_FIRST_DISPLAY&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    I_STRUCTURE_NAME              = 'SPFLI'&lt;/P&gt;&lt;P&gt;    IT_TOOLBAR_EXCLUDING          =  itab_ui&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CHANGING&lt;/P&gt;&lt;P&gt;    IT_OUTTAB                     = itab_spfli&lt;/P&gt;&lt;P&gt;        .&lt;/P&gt;&lt;P&gt;IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDMODULE.                 " STATUS_0100  OUTPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp;      Module  USER_COMMAND_0100  INPUT&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;      text&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MODULE USER_COMMAND_0100 INPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case ok_code.&lt;/P&gt;&lt;P&gt;when 'BACK'.&lt;/P&gt;&lt;P&gt;leave to screen 0.&lt;/P&gt;&lt;P&gt;when 'EXIT'.&lt;/P&gt;&lt;P&gt;leave to screen 0.&lt;/P&gt;&lt;P&gt;when 'SAVE'.&lt;/P&gt;&lt;P&gt;MODIFY spfli from table itab_spfli.&lt;/P&gt;&lt;P&gt;ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endmodule.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;FOR EVENTS IN ALV&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on requirements,we can use the various events available in cl_gui_alv_grid.&lt;/P&gt;&lt;P&gt;For example,we can choose a particular row in ALV and fetch all the details using the event get_selected_row.You can check all the events available for ALV :Use transaction se24 and display the class cl_gui_alv_grid -&amp;gt;events tab.&lt;/P&gt;&lt;P&gt;To use any event,in your program you should set handler for the event,define a local class for event definition and in the implementation,write the event handling method based on your logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR MORE INFO ON ALV,check this link.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/www.abap4.it/download/ALV.pdf" target="test_blank"&gt;www.abap4.it/download/ALV.pdf&lt;/A&gt; &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;Beejal&lt;/P&gt;&lt;P&gt;**PLEASE REWARD IF ANSWER HELPS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jan 2007 10:41:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/1849982#M360168</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-25T10:41:53Z</dc:date>
    </item>
  </channel>
</rss>

