03-23-2011 6:29 AM
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.
03-23-2011 6:35 AM
Hi,
could the command
WRITE ... HOTSPOT ON.
solve your problems?
Regards,
Klaus
03-23-2011 6:51 AM
No.
What is the Function Code for double-click? If its '&IC1', it is not getting uploaded in SY-UCOMM.
03-23-2011 6:59 AM
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..
03-23-2011 7:15 AM
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?
03-23-2011 7:23 AM
The problem is resolved.I just selected sy-lsind as 1 and it is working.
03-23-2011 7:26 AM
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
03-23-2011 7:29 AM
03-23-2011 7:37 AM
03-23-2011 6:45 AM
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.
03-23-2011 6:50 AM
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.