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: 

Can't we use double clicking in a simple list report?

Former Member
0 Kudos

Hi,

I need to display further details for a list report (not an ALV list) by pressing a function key,double-clicking or selecting a menu item. I'm able to do so using the AT USER-COMMAND event by using a GUI status on the list. How to do so for double-clicking? By using the AT LINE-SELECTION event I'm not able to do so.

10 REPLIES 10

former_member195402
Active Contributor
0 Kudos

Hi,

could the command

WRITE ... HOTSPOT ON.

solve your problems?

Regards,

Klaus

0 Kudos

No.

What is the Function Code for double-click? If its '&IC1', it is not getting uploaded in SY-UCOMM.

0 Kudos

Saurabh,

You cannot handle this via sy-ucomm. The function code will be 'PICK'. You have to use the system variables sy-lsind(for the index of the list), sy-lisel(for the values of the line selected). Refer to the sample code and try..

0 Kudos

Yeah i saw the sample code and tried using sy-lsind in my code. It is working but sy-lsind starts from the value 1 and goes on increasing.How to get the record for the selected line in the list?

0 Kudos

The problem is resolved.I just selected sy-lsind as 1 and it is working.

0 Kudos

The values of the selected line will be stored in the system variable sy-lisel. Anyhow issue is resolved..Please close the thread

Edited by: SrikanthRS on Mar 23, 2011 8:28 AM

0 Kudos

Yeah I understood.

0 Kudos

hii,

Go through this link.

regrads,

Sri

Former Member
0 Kudos

Hi Saurabh,

You can use the doulble clicking functionality in the AT LINE-SELECTION event. Make sure that u have used the HIDE statement. Try Using the system variable sy-lsind in the AT LINE-SELECTION event.

Former Member
0 Kudos

Find below the simple example program with and without hotspot....

DATA : itab TYPE TABLE OF scarr, wa TYPE scarr,

itab1 TYPE TABLE OF sflight, wa1 TYPE sflight,

itab2 TYPE TABLE OF spfli, wa2 TYPE spfli.

TOP-OF-PAGE.

SKIP 2.

ULINE.

WRITE : / 'Program for Interactive List' COLOR 4.

NEW-LINE.

ULINE.

START-OF-SELECTION.

SELECT * FROM scarr INTO TABLE itab.

SKIP.

WRITE : / 'SCARR' COLOR 5.

SKIP.

LOOP AT itab INTO wa.

WRITE : / wa-carrid,wa-carrname.

HIDE: wa-carrid,wa-carrname.

ENDLOOP.

AT LINE-SELECTION.

CASE sy-lsind.

WHEN 1.

SKIP.

WRITE : / 'SFLIGHT' COLOR 6.

SKIP.

SELECT * FROM sflight INTO TABLE itab1 WHERE connid <> '0000'.

SORT itab1 BY paymentsum.

LOOP AT itab1 INTO wa1.

WRITE : / wa1-carrid HOTSPOT,wa1-connid,wa1-fldate,wa1-paymentsum.

HIDE: wa1-carrid,wa1-connid,wa1-fldate,wa1-paymentsum.

ENDLOOP.

WHEN 2.

SKIP.

WRITE : / 'SPFLI' COLOR 4.

SKIP.

SELECT * FROM spfli INTO TABLE itab2.

LOOP AT itab2 INTO wa2.

WRITE : / wa2-carrid,wa2-connid,wa2-cityfrom,wa2-cityto.

HIDE: wa2-carrid,wa2-connid,wa2-cityfrom,wa2-cityto.

ENDLOOP.

WHEN OTHERS.

MESSAGE 'List Complete' TYPE 'I'.

ENDCASE.