Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Handle Event

Former Member
0 Likes
618

Hi,

I would know if exist a way like at line-selection to know wich event has been triggered.

I don't want to build a class only to handle event...

Is possible?

PS: I'm using ALVGRID

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
569

Usually when working with ALV Grid, we use event handlers to handle the events of the ALV Grid. I don't believe that there is any built in mechisum that would tell you at any given point which event is fired without being inside of the event handler(did that make sense? ). Any you can handle the events using a local class.

Regards,

Rich Heilman

Hi,

I would know if exist a way like at line-selection to know wich event has been triggered.

I don't want to build a class only to handle event...

Is possible?

PS: I'm using ALVGRID

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
570

Usually when working with ALV Grid, we use event handlers to handle the events of the ALV Grid. I don't believe that there is any built in mechisum that would tell you at any given point which event is fired without being inside of the event handler(did that make sense? ). Any you can handle the events using a local class.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
569

Hi ,

If you are using OO:

Please review SAP Test program : BCALV_EDIT_05

for doubleclick Event and event handler.

For ALV Grid :

The folloing events avialable:

Please check : SLIS_T_EVENT

You can define these events while calling the function module "REUSE_ALV_GRID_DISPLAY" by filling the table IT_EVENTS.

Lanka

Message was edited by: Lanka Murthy

Read only

Former Member
0 Likes
569

Hi,

Like AT-line selection you can use

DBLCLICK_ROW_COL events of the class CL_GUI_ALV_GRID.

thanks,

Pramod

Read only

Former Member
0 Likes
569

Hi,

you can handle that event in user_command event.

<b>at line-selection is equal to double click.</b>

so in user_command event form.

**-ALV list Display
  CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
      I_CALLBACK_PROGRAM       = SY-REPID
  <b>    I_CALLBACK_PF_STATUS_SET = 'PF_STATUS_SET'
      I_CALLBACK_USER_COMMAND  = 'USER_COMMAND'</b>
      IS_LAYOUT                = X_LAYOUT
      IT_FIELDCAT              = IT_FIELDCAT
      IT_EVENTS                = IT_EVENTS
    TABLES
      T_OUTTAB                 = IT_FINAL
    EXCEPTIONS
      PROGRAM_ERROR            = 1
      OTHERS                   = 2.
  IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

FORM PF_STATUS_SET USING    P_EXTAB TYPE SLIS_T_EXTAB.
  SET PF-STATUS 'STANDARD' EXCLUDING P_EXTAB.
ENDFORM.                    "PF_STATUS_SET
FORM USER_COMMAND1 USING UCOMM LIKE SY-UCOMM SELFIELD TYPE
                                                         SLIS_SELFIELD.
case UCOMM.
when '&IC1'.
"do what ever you want..


endcase.

endform.

the above things are must..

regards

vijay