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

ALV Reporting

Former Member
0 Likes
651

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
617

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 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

5 REPLIES 5
Read only

Former Member
0 Likes
617

Moni,

search with term ALV hotspot in SDN.you will get your answer.

Amit.

Read only

Former Member
0 Likes
618

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.

Read only

Former Member
0 Likes
617

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

Read only

sachin_mathapati
Contributor
0 Likes
617

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.

Read only

Former Member
0 Likes
617

Thanks to all. Its been resolved