<?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 ALV in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/3377804#M811049</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;We have a requirement where in we need to have a 'PUSH BUTTON' on an ALV output.If we click that ,other ALV output needs to be displayed.Please let me know the feasibility for this??And can we go back from the second output to the first one where the push button is present.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Prathima&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Feb 2008 11:49:19 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-13T11:49:19Z</dc:date>
    <item>
      <title>ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/3377804#M811049</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;We have a requirement where in we need to have a 'PUSH BUTTON' on an ALV output.If we click that ,other ALV output needs to be displayed.Please let me know the feasibility for this??And can we go back from the second output to the first one where the push button is present.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Prathima&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Feb 2008 11:49:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/3377804#M811049</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-13T11:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/3377805#M811050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ya u can do this &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) define a pf-status for ur alv in which u can copy all std alv functions and user defined button&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) on user action a specific subroutine can be called where u can write the code for displaying anothe ALV....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Feb 2008 11:53:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/3377805#M811050</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-13T11:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: ALV</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/3377806#M811051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;----------------------------------------------------------------------

CLASS L_CL_EVENTS DEFINITION * 
----------------------------------------------------------------------

Class for inserting buttons on the toolbar * 
----------------------------------------------------------------------
CLASS l_cl_events DEFINITION.
PUBLIC SECTION.
METHODS:
toolbar FOR EVENT toolbar
OF cl_gui_alv_grid
IMPORTING e_object
e_interactive,
user_command FOR EVENT user_command
OF cl_gui_alv_grid
IMPORTING e_ucomm .
ENDCLASS. " L_CL_EVENTS DEFINITION

----------------------------------------------------------------------

CLASS L_CL_EVENTS IMPLEMENTATION * 
----------------------------------------------------------------------

Implementation of class L_CL_EVENTS * 
----------------------------------------------------------------------
CLASS l_cl_events IMPLEMENTATION.
METHOD toolbar.
PERFORM event_toolbar USING e_object.
ENDMETHOD. " TOOLBAR
METHOD user_command.
PERFORM event_ucomm USING e_ucomm.
ENDMETHOD. " USER_COMMAND
ENDCLASS. " L_CL_EVENTS IMPLEMENTATION
DATA:

To create instance for cl_gui_custom_container 
g_grid TYPE REF TO cl_gui_custom_container,

To create instance for cl_gui_alv_grid 
g_alv TYPE REF TO cl_gui_alv_grid,

To create instance for l_cl_events 
g_events TYPE REF TO l_cl_events,

To assign name for custom container 
g_container TYPE scrfname VALUE 'CONTAINER',

To assign layout 
g_fcatlayo TYPE lvc_s_layo.
----------------------------------------------------------------------

FORM EVENT_TOOLBAR * 
----------------------------------------------------------------------

Setting toolbar in the alv grid * 
----------------------------------------------------------------------

--&amp;gt;E_OBJECT TYPE REF TO CL_ALV_EVENT_TOOLBAR_SET * 
----------------------------------------------------------------------

FORM event_toolbar USING e_object
TYPE REF TO cl_alv_event_toolbar_set.

Local declaration for the button. 
DATA: ls_toolbar TYPE stb_button.

To add Approve button 
ls_toolbar-function = c_app_rej
ls_toolbar-butn_type = c_zero.
ls_toolbar-text = text-001.
APPEND ls_toolbar TO e_object-&amp;gt;mt_toolbar.


To add Reject button 
CLEAR ls_toolbar.
ls_toolbar-function = c_fcode_rej.
ls_toolbar-butn_type = c_zero.
ls_toolbar-text = text-013.
APPEND ls_toolbar TO e_object-&amp;gt;mt_toolbar.

ENDFORM. " EVENT_TOOLBAR
----------------------------------------------------------------------

FORM EVENT_UCOMM * 
----------------------------------------------------------------------

After Input in the ALV grid,if user select record and press * 
approve or reject then the record will get updated * 
----------------------------------------------------------------------

--&amp;gt; PR_ucomm type sy-ucomm * 
----------------------------------------------------------------------
FORM event_ucomm USING pr_ucomm LIKE sy-ucomm.
CASE pr_ucomm.

If e_ucomm contains 'APP' i.e.function code for Approve button 
WHEN c_fcode_approve. " To approve selected record
PERFORM app_timesheet USING c_approve_status.

If e_ucomm contains 'REJ' i.e. function code for Reject 
WHEN c_fcode_rej. " To reject selected record
PERFORM app_timesheet USING c_rej_status.
ENDCASE. " CASE E_UCOMM

ENDFORM. " EVENT_UCOMM&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Feb 13, 2008 4:25 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Feb 2008 11:54:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/alv/m-p/3377806#M811051</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-13T11:54:49Z</dc:date>
    </item>
  </channel>
</rss>

