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

ALV using Object oriented programming concepts

Hi All,

I am unable to call a transaction after a hotspot click on a field.... I have used CALL METHOD w_grid->get_current_cell to get the cell info.....but this is not happening.... Can anyone plz tell me how to call a transaction on doing a hotspot click on a field?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 19, 2008 at 07:08 AM

    One reason why your code is not working is i think the method you are using is Protected. ie it can't be used outside the class.

    Try the following code.

    In the method definition define the method as follows.

    methods : HOTSPOT_CLICK

    FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID

    IMPORTING E_ROW_ID

    E_COLUMN_ID

    ES_ROW_NO.

    The E_ROW_ID E_COLUMN_ID ES_ROW_NO are the parameters returnned by the event HOT-SPOT click.

    Let us suppose I_MARA is your internal table using which you have displayed your ALV HRID.

    Now in the method Implementation part use the following code.

    METHOD HOTSPOT_CLICK.

    CLEAR : WA_MARA.

    READ TABLE I_MARA INDEX E_ROW_ID INTO WA_MARA.

    IF SY-SUBRC EQ 0.

    IF E_COLUMN_ID-FIELDNAME EQ C_MATNR.

    SET PARAMETER ID 'MAT' FIELD WA_MARA-MATNR.

    SET PARAMETER ID 'WRK' FIELD C_WERKS.

    CALL TRANSACTION 'MD04' AND SKIP FIRST SCREEN.

    ELSE.

    CALL SCREEN 0130 starting at 35 15.

    ENDIF.

    ENDIF.

    ENDMETHOD.

    At the call Transaction point you can call which ever Transaction you want.

    And aslo please check if you have registered the event HOTSPOT.

    Hope this code works.

    Thanks & regards,

    Y Gautham

    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.