Application Development 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: 

HOTSPOT Issue

Former Member
0 Kudos

Hi,

I have Hot Spot enabled ALV grid report.

The following code needs help:

form user_command using r_ucomm like sy-ucomm

rs_selfield type slis_selfield.

case r_ucomm.

when 'BACK' or 'CANC' or 'EXIT'.

leave to screen 0.

boldwhen '&IC1'.

my Logic.

I have seen in debug that when I click the Hotspot field, my Sy-ucomm us blank. It should be '&IC1'.

Thus my hotspot is not working.

Any idea??

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos

You may change the returned r_ucomm value for hotspot click by using layout-f2code. Nevertheless you may check "&IC1" if you left f2code initiaL.

Especially use the parameter r_ucomm and not sy-ucomm which is usually initial.

Regards,

Raymond

5 REPLIES 5

former_member223537
Active Contributor
0 Kudos

Hi,

data : v_callback_subroutine TYPE slis_formname,
       v_callback_program LIKE sy-repid.

v_callback_program    = sy-repid.
v_callback_subroutine = 'USER_COMMAND'.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
     EXPORTING
          i_callback_program      = v_callback_program
          it_fieldcat             = it_fieldcat
          i_callback_user_command = v_callback_subroutine
     TABLES
          t_outtab                = it_data......


FORM user_command  USING p_ucomm    LIKE sy-ucomm
                         p_selfield TYPE slis_selfield.

case r_ucomm.
when 'BACK' or 'CANC' or 'EXIT'.
leave to screen 0.

when '&IC1'.
*my Logic.

Best regards,

Prashant

raymond_giuseppi
Active Contributor
0 Kudos

You may change the returned r_ucomm value for hotspot click by using layout-f2code. Nevertheless you may check "&IC1" if you left f2code initiaL.

Especially use the parameter r_ucomm and not sy-ucomm which is usually initial.

Regards,

Raymond

0 Kudos

Thanks Raymond,

I was inded using SY-UCOMM.

Problem solved. Thanks

former_member1245113
Active Contributor
0 Kudos

Hi,

I think the double click results in sy-ucomm = &IC1 as your hotspot is not captured in the debug, try implementing the

AT LINE SELECTION event and implement your logic there.

Hope this will serve your purpose

Regards

Ramchander Rao.K

Former Member
0 Kudos

Hi,

Please see this logic.

REPORT report1. 

DATA text TYPE c LENGTH 10. 

SELECTION-SCREEN BEGIN OF SCREEN 1100. 
  SELECT-OPTIONS: selcrit1 FOR text, 
                  selcrit2 FOR text. 
SELECTION-SCREEN END OF SCREEN 1100.

...

Calling program

REPORT report2. 

DATA: text       TYPE c LENGTH 10, 
      rspar_tab  TYPE TABLE OF rsparams, 
      rspar_line LIKE LINE OF rspar_tab, 
      range_tab  LIKE RANGE OF text, 
      range_line LIKE LINE OF range_tab. 

... 

rspar_line-selname = 'SELCRIT1'. 
rspar_line-kind    = 'S'. 
rspar_line-sign    = 'I'. 
rspar_line-option  = 'EQ'. 
rspar_line-low     = 'ABAP'. 
APPEND rspar_line TO rspar_tab. 

range_line-sign   = 'E'. 
range_line-option = 'EQ'. 
range_line-low    = 'H'. 
APPEND range_line TO range_tab. 

range_line-sign   = 'E'. 
range_line-option = 'EQ'. 
range_line-low    = 'K'. 
APPEND range_line TO range_tab. 

SUBMIT report1 USING SELECTION-SCREEN '1100' 
               WITH SELECTION-TABLE rspar_tab 
               WITH selcrit2 BETWEEN 'H' AND 'K' 
               WITH selcrit2 IN range_tab 
               AND RETURN.

This is there in SAP help just press F1 on stament SUBMIT.

I think this would be helpful.

Regards,

Raj Gupta