2008 Jul 23 7:23 AM
Hi All,
Can anyone tell me that in alv whether we can create the row as hotspot. So that when we click on that something would happen.
Its urgent...
Thanks a ton in advance
2008 Jul 23 7:27 AM
hi,
Its possible. In field cat put HOTSPOT = 'X' on that particular field.
and under usercommand use that and write code for furhter process...
Code: Select all
TYPE-POOLS: slis.
2) Declare callback program and callback subroutine. SAP must know which subroutine of which program must be executed when clicking on a hotspot of an ALV grid :
Code: Select all
data : w_callback_subroutine TYPE slis_formname,
w_callback_program LIKE sy-repid.
3) Assign value to those two variables before calling ALV grid :
Code: Select all
w_callback_program = sy-repid.
w_callback_subroutine = 'USER_COMMAND'.
(or any other subroutine name but in upper case)
4) Define subroutine handling double-click :
Code: Select all
FORM user_command USING p_ucomm LIKE sy-ucomm
p_selfield TYPE slis_selfield.
CASE p_ucomm.
WHEN '&IC1'. " SAP standard code for double-clicking
SET PARAMETER ID 'XXX' FIELD p_selfield-value.
CALL TRANSACTION 'YYYY'.
ENDCASE.
ENDFORM.
hi,
Its possible. In field cat put HOTSPOT = 'X' on that particular field.
and under usercommand use that and write code for furhter process...
Code: Select all
TYPE-POOLS: slis.
2) Declare callback program and callback subroutine. SAP must know which subroutine of which program must be executed when clicking on a hotspot of an ALV grid :
Code: Select all
data : w_callback_subroutine TYPE slis_formname,
w_callback_program LIKE sy-repid.
3) Assign value to those two variables before calling ALV grid :
Code: Select all
w_callback_program = sy-repid.
w_callback_subroutine = 'USER_COMMAND'.
(or any other subroutine name but in upper case)
4) Define subroutine handling double-click :
Code: Select all
FORM user_command USING p_ucomm LIKE sy-ucomm
p_selfield TYPE slis_selfield.
CASE p_ucomm.
WHEN '&IC1'. " SAP standard code for double-clicking
SET PARAMETER ID 'XXX' FIELD p_selfield-value.
CALL TRANSACTION 'YYYY'.
ENDCASE.
ENDFORM.
2008 Jul 23 7:25 AM
Moni,
search with term ALV hotspot in SDN.you will get your answer.
Amit.
2008 Jul 23 7:27 AM
hi,
Its possible. In field cat put HOTSPOT = 'X' on that particular field.
and under usercommand use that and write code for furhter process...
Code: Select all
TYPE-POOLS: slis.
2) Declare callback program and callback subroutine. SAP must know which subroutine of which program must be executed when clicking on a hotspot of an ALV grid :
Code: Select all
data : w_callback_subroutine TYPE slis_formname,
w_callback_program LIKE sy-repid.
3) Assign value to those two variables before calling ALV grid :
Code: Select all
w_callback_program = sy-repid.
w_callback_subroutine = 'USER_COMMAND'.
(or any other subroutine name but in upper case)
4) Define subroutine handling double-click :
Code: Select all
FORM user_command USING p_ucomm LIKE sy-ucomm
p_selfield TYPE slis_selfield.
CASE p_ucomm.
WHEN '&IC1'. " SAP standard code for double-clicking
SET PARAMETER ID 'XXX' FIELD p_selfield-value.
CALL TRANSACTION 'YYYY'.
ENDCASE.
ENDFORM.
2008 Jul 23 7:28 AM
Moni,
I hope the following links will help you to solve your problem,
http://help.sap.com/saphelp_nw04/helpdata/en/ee/c8e080d52611d2b468006094192fe3/frameset.htm
Regards,
Harish
2008 Jul 23 7:29 AM
Yes you can create Hotspot in ALV.
While Preparing the Field catlog..set hotspot = 'X' for that field.
Eg :
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME =
i_internal_tabname = 'IT_QALS'
i_structure_name = 'QALS_D02'
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME =
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
CHANGING
ct_fieldcat = it_fieldcat
.
IF sy-subrc = 0.
LOOP AT it_fieldcat INTO wa_fieldcat.
CASE wa_fieldcat-fieldname .
WHEN 'PRUEFLOS'.
wa_fieldcat-col_pos = 1.
wa_fieldcat-hotspot = 'X'.
APPEND wa_fieldcat TO it_fcat.
2008 Jul 23 8:08 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |