Skip to Content
author's profile photo Former Member
Former Member

Hotspot..again

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 02, 2006 at 05: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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 02, 2006 at 05:23 PM

    Try:

    FORMAT HOTSPOT ON
    
    or 
    
    FORMAT HOTSPOT ON

    before or after the field.

    Rob

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 02, 2006 at 05:25 PM

    You can use the GET CURSOR event.. just do an F1 & you will be able to figure out the ysntax..

    ~Suresh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 02, 2006 at 05: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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 02, 2006 at 05: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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.