Skip to Content
author's profile photo Former Member
Former Member

EVENTS IN ALV OOPS

HI GUYS,

CAN ANYONE PLS HELP ME OUT HANDLING EVENTS IN ALV(OOPS)....iS THERE ANY CLASS TO BE DEFINED ?????? PLS HELP IF ANYONE HAS THE CODE FOR THAT...........

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Posted on Apr 26, 2005 at 09:31 AM

    Check out the following document written by Serdar ÞÝMÞEKLER.

    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/an easy reference for alv grid control.pdf

    REgards

    Raja

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 26, 2005 at 09:51 AM

    Hi,

    See this link

    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/an easy reference for alv grid control.pdf

    See page no 28-32.

    U can get code samples form SDN itself.

    Thanks & Regards,

    Judith.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 26, 2005 at 09:56 AM

    Hi,

    Declare as below.

    CLASS LCL_EVENT_RECEIVER DEFINITION DEFERRED.

    DATA : O_ALVGRID TYPE REF TO CL_GUI_ALV_GRID ,

    O_DOCKINGCONTAINER TYPE REF TO CL_GUI_DOCKING_CONTAINER ,

    O_EVENTRECEIVER TYPE REF TO LCL_EVENT_RECEIVER.

    Then class definition should be as follows:

    CLASS LCL_EVENT_RECEIVER DEFINITION.

    • Event receiver definitions for ALV actions

    PUBLIC SECTION.

    CLASS-METHODS:

    • Row Double click for dirll down.

    HANDLE_DOUBLE_CLICK

    FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID

    IMPORTING E_ROW

    E_COLUMN

    ES_ROW_NO.

    ENDCLASS.

    Then implementation should be as follows:

    CLASS LCL_EVENT_RECEIVER IMPLEMENTATION.

    *&----


    *& Method handle_double_click

    *&----


    • This method is called when the user double clicks on a line to drill

    • down.

    • The following are exported from the ALV

    • LVC_S_ROW

    • LVC_S_COL

    • LVC_S_ROID

    *----


    METHOD HANDLE_DOUBLE_CLICK.

    • The double click drill down processing should be

    • coded in the form below.

    PERFORM F9007_HANDLE_DOUBLE_CLICK USING E_ROW

    E_COLUMN

    ES_ROW_NO.

    ENDMETHOD.

    ENDCLASS.

    &----


    *& Form F9007_HANDLE_DOUBLE_CLICK

    &----


    • This form is called when the user double clicks on a line to drill

    • down.

    ----


    • -->P_E_ROW_ID - Row ID text

    • -->P_E_COLUMN_ID - Column ID

    • -->P_ES_ROW_NO - Row number

    ----


    FORM f9007_handle_double_click USING p_row

    p_column

    p_row_no.

    DATA: lw_output LIKE LINE OF i_output.

    • Need to check that a subtotal or grand total line has *not been double-clicked, otherwise the report will *produce a short dump!

    check p_row+0(1) is initial.

    READ TABLE i_output INDEX p_row INTO lw_output.

    CASE p_column.

    WHEN 'KNUMA'.

    IF NOT lw_output-knuma IS INITIAL.

    SET PARAMETER ID 'VBO' FIELD lw_output-knuma.

    CALL TRANSACTION 'VBO3' AND SKIP FIRST SCREEN.

    ENDIF.

    ENDCASE.

    ENDFORM. " F9007_HANDLE_DOUBLE_CLICK

    In PBO of the screen,

    MODULE status_9001 OUTPUT.

    IF o_dockingcontainer IS INITIAL.

    ......

    SET HANDLER o_eventreceiver->handle_double_click FOR o_alvgrid.

    ENDMODULE. " STATUS_9001 OUTPUT

    In this I have mentioned double click event.

    Similarly you have to do for others.

    Regards,

    J.Jayanthi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 26, 2005 at 10:28 AM

    Hi Nagarjuna,

    Open SE38 and print <b>BCALV*</b> in the the program name field. Now press F4 to view all the programs related to OOPS. The list of programs involving OO Concepts in ABAP will be displayed. They are all the example programs provided by SAP. You can find the example programs in ALV too.

    Hope it solves your purpose.

    Regards,

    Vara

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 25, 2009 at 01:53 PM

    Hi Nagarjuna,

    Yes , you have to create local class for handling event.

    Refere following SAP standard prog for reference.

    BCALV_GRID_03

    Hope it will help you.

    Pratik Vora

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.