10-02-2006 6:19 PM
Hello,
Thanks for everyone who replied my questions about hotspots initially.
However, I still have one more question about it and is really hoping for your help.
In the program I am writing now, I wrote the report at the end-of-selection event and then wrote the hotspot screen at the at line-selection event like this:
AT LINE-SELECTION.
WRITE / 'New list AT-LINE-SELECTION'.
SKIP.
WRITE 'This is also a hotspot:'.
WRITE icon_list AS ICON HOTSPOT.
However, what happened then was that regardless of where I click on the report screen, even for the report header, the "hotspot" screen will show up.
Is there anyway to avoid it so that the hotspot only shows up whenever I need it too? Thanks a lot!
Regards,
Anyi
10-02-2006 6:52 PM
Just check this code and award points if found helpful
AT LINE-SELECTION.
IF SY-LSIND = 1.
PERFORM GET_ILV_VALUES.
WRITE:/ 'HEADER LIST'.
WRITE:/ SY-ULINE.
WRITE:/1(10) 'MATERIAL NO.', 15(30) 'MATL DESCRIPTION'.
WRITE:/ SY-ULINE.
PERFORM WRITE_ILV_VALUES.
ENDIF.
END-OF-SELECTION.
*&---------------------------------------------------------------------*
*& Form GET_VALUES
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM GET_VALUES .
SELECT WERKS
NAME1
LAND1
INTO TABLE ITAB1
FROM T001W
WHERE WERKS IN S_WERKS.
ENDFORM. " GET_VALUES
*&---------------------------------------------------------------------*
*& Form WRITE_VALUES
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM WRITE_VALUES .
WRITE:/ 'BASIC LIST'.
WRITE:/ SY-ULINE.
WRITE:/1(10) 'PLANT NO.', 15(15) 'PLANT NAME', 35(10) 'COUNTRY'.
WRITE:/ SY-ULINE.
LOOP AT ITAB1.
WRITE:/1(10) ITAB1-WERKS HOTSPOT ON,
15(15) ITAB1-NAME1,
35(10) ITAB1-LAND1.
HIDE ITAB1-WERKS.
ENDLOOP.
ENDFORM. " WRITE_VALUES
*&---------------------------------------------------------------------*
*& Form GET_ILV_VALUES
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM GET_ILV_VALUES .
SELECT A~MATNR
B~MAKTX
C~WERKS INTO TABLE ITAB2
FROM MARC AS A INNER JOIN
MAKT AS B
ON A~MATNR = B~MATNR
INNER JOIN T001W AS C
ON C~WERKS = A~WERKS
WHERE A~WERKS = ITAB1-WERKS.
ENDFORM. " GET_ILV_VALUES
*&---------------------------------------------------------------------*
*& Form WRITE_ILV_VALUES
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM WRITE_ILV_VALUES .
LOOP AT ITAB2.
WRITE:/1(10) ITAB2-MATNR,
15(30) ITAB2-MAKTX.
ENDLOOP.
ENDFORM.
10-02-2006 6:23 PM
Try:
FORMAT HOTSPOT ON
or
FORMAT HOTSPOT ON
before or after the field.
Rob
10-02-2006 6:29 PM
Hello Rob,
Thanks for the reply.
However, that is exactly what I did on the report and it does not seem to work....
Any other suggestion?
Thanks a lot!
Regards,
Anyi
10-02-2006 6:25 PM
You can use the GET CURSOR event.. just do an F1 & you will be able to figure out the ysntax..
~Suresh
10-02-2006 6:30 PM
Hi,
Try to use the HIDE statement..
Example..
DATA: v_hide.
v_hide = 'X'.
WRITE: / 'NOT A HOT SPOT'.
CLEAR: v_hide.
WRITE: / 'HOT SPOT' AS ICON HOTSPOT.
v_hide = 'X'.
HIDE v_hide.
WRITE: / 'NOT A HOT SPOT'.
CLEAR: v_hide.
AT LINE-SELECTION.
IF NOT v_hide IS INITIAL.
WRITE: / 'HOT SPOT SELECTED'.
clear v_hide.
ENDIF.
Thanks,
Naren
10-02-2006 6:35 PM
Hi Anyi,
You can try something like this.
REPORT ZZTEST.
DATA: square TYPE i,
cube TYPE i.
START-OF-SELECTION.
FORMAT HOTSPOT.
DO 10 TIMES.
square = sy-index ** 2.
cube = sy-index ** 3.
WRITE / sy-index.
HIDE: square, cube.
ENDDO.
AT LINE-SELECTION.
WRITE: square, cube.
Also you can check demo programs <b>demo_list_hide</b> and <b>demo_list_get_cursor</b>.
Hope this will help.
Regards,
Ferry Lianto
10-02-2006 6:52 PM
Just check this code and award points if found helpful
AT LINE-SELECTION.
IF SY-LSIND = 1.
PERFORM GET_ILV_VALUES.
WRITE:/ 'HEADER LIST'.
WRITE:/ SY-ULINE.
WRITE:/1(10) 'MATERIAL NO.', 15(30) 'MATL DESCRIPTION'.
WRITE:/ SY-ULINE.
PERFORM WRITE_ILV_VALUES.
ENDIF.
END-OF-SELECTION.
*&---------------------------------------------------------------------*
*& Form GET_VALUES
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM GET_VALUES .
SELECT WERKS
NAME1
LAND1
INTO TABLE ITAB1
FROM T001W
WHERE WERKS IN S_WERKS.
ENDFORM. " GET_VALUES
*&---------------------------------------------------------------------*
*& Form WRITE_VALUES
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM WRITE_VALUES .
WRITE:/ 'BASIC LIST'.
WRITE:/ SY-ULINE.
WRITE:/1(10) 'PLANT NO.', 15(15) 'PLANT NAME', 35(10) 'COUNTRY'.
WRITE:/ SY-ULINE.
LOOP AT ITAB1.
WRITE:/1(10) ITAB1-WERKS HOTSPOT ON,
15(15) ITAB1-NAME1,
35(10) ITAB1-LAND1.
HIDE ITAB1-WERKS.
ENDLOOP.
ENDFORM. " WRITE_VALUES
*&---------------------------------------------------------------------*
*& Form GET_ILV_VALUES
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM GET_ILV_VALUES .
SELECT A~MATNR
B~MAKTX
C~WERKS INTO TABLE ITAB2
FROM MARC AS A INNER JOIN
MAKT AS B
ON A~MATNR = B~MATNR
INNER JOIN T001W AS C
ON C~WERKS = A~WERKS
WHERE A~WERKS = ITAB1-WERKS.
ENDFORM. " GET_ILV_VALUES
*&---------------------------------------------------------------------*
*& Form WRITE_ILV_VALUES
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM WRITE_ILV_VALUES .
LOOP AT ITAB2.
WRITE:/1(10) ITAB2-MATNR,
15(30) ITAB2-MAKTX.
ENDLOOP.
ENDFORM.