<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: hotspot in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/hotspot/m-p/1015918#M80009</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks vinod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Aug 2005 15:23:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2005-08-18T15:23:24Z</dc:date>
    <item>
      <title>hotspot</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hotspot/m-p/1015916#M80007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi guys&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i explain my spec. an ALV report will be generated.&lt;/P&gt;&lt;P&gt;in that report i put a hotspot on one field(eg. Sales document no) to call an another pop up screen. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; i cant do that ie.) put a hotspot. how to do that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bye vetri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2005 15:04:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hotspot/m-p/1015916#M80007</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-18T15:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: hotspot</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hotspot/m-p/1015917#M80008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do this using events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="37950"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Vinod&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2005 15:13:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hotspot/m-p/1015917#M80008</guid>
      <dc:creator>Vinod_Chandran</dc:creator>
      <dc:date>2005-08-18T15:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: hotspot</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hotspot/m-p/1015918#M80009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks vinod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2005 15:23:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hotspot/m-p/1015918#M80009</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-18T15:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: hotspot</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hotspot/m-p/1015919#M80010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kindly assign points if the answer was helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2005 15:28:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hotspot/m-p/1015919#M80010</guid>
      <dc:creator>Vinod_Chandran</dc:creator>
      <dc:date>2005-08-18T15:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: hotspot</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hotspot/m-p/1015920#M80011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vetri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To put a hotspot in a ALV report you need to set this up in your field catalog HOTSOPT = 'X' (see my attached program in the WRITE_FIELDCAT routine).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To call another pop up screen refer to the PROCESS_USER_COMMANDS routine. In my code I perform a CALL TRANSACTION, you can put your CALL SCREEN here instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you find this useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* This program is an example of how the ALV Display works.
* It will display Customer Data.
* This report will also show how to display an ALV report with different
* colored lines and icons

REPORT zpat.

************************************************************************
* Include Programs
************************************************************************
INCLUDE &amp;lt;icon&amp;gt;.

************************************************************************
* Database Tables
************************************************************************
TABLES: kna1.                  "Customer Master

************************************************************************
* Types
************************************************************************
TYPE-POOLS: kkblo.

************************************************************************
* Structures
************************************************************************
* Structure to hold the Color Information
DATA: BEGIN OF st_color,
        color(3) TYPE c,
      END OF st_color.

* Structure to hold the Icon Information
DATA: BEGIN OF st_icon,
        icon(4) TYPE c,
      END OF st_icon.

* ALV Field Catalog Structure
DATA: st_fieldcat   TYPE slis_fieldcat_alv.

* ALV Layout Structure
DATA: st_layout     TYPE slis_layout_alv.

************************************************************************
* Internal Tables
************************************************************************
* Output Table
DATA: BEGIN OF tbl_kna1 OCCURS 0.
        INCLUDE STRUCTURE st_icon.   "Icon Structure
        INCLUDE STRUCTURE kna1.      "Customer Master Structure
        INCLUDE STRUCTURE st_color.  "Color Structure
DATA: END OF tbl_kna1.

* ALV Field Catalog Table
DATA: tbl_fieldcat  TYPE slis_t_fieldcat_alv.

************************************************************************
* Variables
************************************************************************
DATA: fieldname(30) TYPE c,
      g_repid       LIKE sy-repid.

************************************************************************
* Start of Selection
************************************************************************
START-OF-SELECTION.

  g_repid = sy-repid.

  PERFORM get_data.

************************************************************************
* End of Selection
************************************************************************
END-OF-SELECTION.

  PERFORM do_fancy_stuff.
  PERFORM get_layout.
  PERFORM get_fieldcat.
  PERFORM create_report.


*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  CREATE_REPORT
*&amp;amp;---------------------------------------------------------------------*
*       Learn to read the subroutine name!
*----------------------------------------------------------------------*
FORM create_report.

  CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
            i_interface_check       = ' '
            i_callback_program      = g_repid
            i_callback_user_command = 'PROCESS_USER_COMMANDS'
            it_fieldcat             = tbl_fieldcat
            i_default               = 'X'
            i_save                  = ' '
            is_layout               = st_layout
       TABLES
            t_outtab                = tbl_kna1
       EXCEPTIONS
            program_error           = 1
            OTHERS                  = 2.
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

ENDFORM.                               " CREATE_REPORT

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  GET_FIELDCAT
*&amp;amp;---------------------------------------------------------------------*
*       Build the Field Catalog
*----------------------------------------------------------------------*
FORM get_fieldcat.
* Here the field catalog is created. To display more fields simply
* 'uncomment' the additional lines and add the field name. Also note
* that the field catalog is much more powerful than this. You can
* intensify fields, change the colour, assign reference fields, etc.
* Look at type slis_fieldcat_alv for more options.
  PERFORM write_fieldcat USING 'ICON'  'TBL_KNA1' '    ' 'X' 1 '2' 'X'
                               ' '.
  PERFORM write_fieldcat USING 'KUNNR' 'TBL_KNA1' 'KNA1' 'X' 2 ' ' ' '
                               ' '.
  PERFORM write_fieldcat USING 'NAME1' 'TBL_KNA1' 'KNA1' ' ' 3 '10' ' '
                               'X'.
  PERFORM write_fieldcat USING 'STRAS' 'TBL_KNA1' 'KNA1' ' ' 4 ' ' ' '
                               ' '.
  PERFORM write_fieldcat USING 'TELF1' 'TBL_KNA1' 'KNA1' ' ' 5 ' ' ' '
                               ' '.
  PERFORM write_fieldcat USING 'ORT01' 'TBL_KNA1' 'KNA1' ' ' 6 ' ' ' '
                               ' '.
  PERFORM write_fieldcat USING 'PSTLZ' 'TBL_KNA1' 'KNA1' ' ' 7 ' ' ' '
                               ' '.
  PERFORM write_fieldcat USING 'SORTL' 'TBL_KNA1' 'KNA1' ' ' 8 ' ' ' '
                               ' '.
  PERFORM write_fieldcat USING 'ERNAM' 'TBL_KNA1' 'KNA1' ' ' 9 ' ' ' '
                               ' '.
  PERFORM write_fieldcat USING 'SPRAS' 'TBL_KNA1' 'KNA1' ' ' 10 ' ' ' '
                               ' '.
*  perform write_fieldcat using '     ' 'TBL_KNA1' 'KNA1' ' ' 10 ' '.
*  perform write_fieldcat using '     ' 'TBL_KNA1' 'KNA1' ' ' 11 ' '.
*  perform write_fieldcat using '     ' 'TBL_KNA1' 'KNA1' ' ' 12 ' '.

ENDFORM.                               " GET_FIELDCAT

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  WRITE_FIELDCAT
*&amp;amp;---------------------------------------------------------------------*
*       Write the Field Catalog data to the Field Catalog Table
*----------------------------------------------------------------------*
*      --&amp;gt;name   Field name
*      --&amp;gt;tab    Table name
*      --&amp;gt;st     Structure Name
*      --&amp;gt;key    Is this field a Key?
*      --&amp;gt;pos    Position Number
*      --&amp;gt;length Field Length
*      --&amp;gt;icon   Display as Icon
*      --&amp;gt;hot    Hotspot
*----------------------------------------------------------------------*
FORM write_fieldcat USING name tab st key pos length icon hot.

  st_fieldcat-fieldname   = name.
  st_fieldcat-tabname     = tab.
  st_fieldcat-ref_tabname = st.
  st_fieldcat-key         = key.
  st_fieldcat-col_pos     = pos.
  st_fieldcat-outputlen   = length.
  st_fieldcat-icon        = icon.
  st_fieldcat-hotspot     = hot.
  APPEND st_fieldcat TO tbl_fieldcat.
  CLEAR st_fieldcat.

ENDFORM.                               " WRITE_FIELDCAT

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  PROCESS_USER_COMMANDS
*&amp;amp;---------------------------------------------------------------------*
*       Interactive Reporting Commands
*----------------------------------------------------------------------*
FORM process_user_commands USING syst-ucomm LIKE syst-ucomm
                                 selfield TYPE slis_selfield.

* This subroutine is called when there is user interaction in the output
* In this case if the user double clicks the Customer Number then the
* program will call transaction XD03 and display the Customer Master
* Data

  CASE syst-ucomm.
    WHEN '&amp;amp;IC1'.
*  get cursor field fieldname.
      READ TABLE tbl_kna1 INDEX selfield-tabindex.
      SET PARAMETER ID 'KUN' FIELD tbl_kna1-kunnr.
      CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
  ENDCASE.

ENDFORM.                               " PROCESS_USER_COMMANDS

*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  GET_LAYOUT
*&amp;amp;---------------------------------------------------------------------*
*   set the layout of the ALV.
*   add color to the row?
*----------------------------------------------------------------------*
FORM get_layout.

  st_layout-info_fieldname    = 'COLOR'.
  st_layout-colwidth_optimize = 'X'.
  st_layout-get_selinfos      = 'X'.

ENDFORM.                    " GET_LAYOUT
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  get_data
*&amp;amp;---------------------------------------------------------------------*
*       Get some data to play with
*----------------------------------------------------------------------*
FORM get_data.

  SELECT * FROM kna1 INTO CORRESPONDING FIELDS OF TABLE tbl_kna1
         UP TO 30 ROWS.

ENDFORM.                    " get_data
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  do_fancy_stuff
*&amp;amp;---------------------------------------------------------------------*
*       Do some fancy pants stuff for example changing the color of
*       lines and adding icons
*----------------------------------------------------------------------*
FORM do_fancy_stuff.

* Here we will demonstrate changing the color of ALV Record lines as
* well as displaying Icons
  LOOP AT tbl_kna1.
* All records where NAME1 begins with 'M', will be displayed in Bluish
* Green
    IF tbl_kna1-name1(1) EQ 'M'.
      tbl_kna1-color = 'C41'.  "Bluish Green
      MODIFY tbl_kna1 TRANSPORTING color.
    ENDIF.

* All records with no TELF1 will be displayed in White and have a
* Warning Icon
    IF tbl_kna1-telf1 IS INITIAL.
      tbl_kna1-color = 'C00'.  "White
      tbl_kna1-icon  = '@AH@'. "Warning Icon
      MODIFY tbl_kna1 TRANSPORTING icon color.
    ENDIF.
  ENDLOOP.

ENDFORM.                    " do_fancy_stuff
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Aug 2005 23:23:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hotspot/m-p/1015920#M80011</guid>
      <dc:creator>former_member221770</dc:creator>
      <dc:date>2005-08-18T23:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: hotspot</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hotspot/m-p/1015921#M80012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;U can assign the hotspot in the field catalog.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
fcat-hotspot = 'X'. (for the particular column)
FIELD-SYMBOLS : &amp;lt;lfs_fieldcat&amp;gt; TYPE lvc_s_fcat.

  LOOP AT p_fieldcat2 ASSIGNING &amp;lt;lfs_fieldcat&amp;gt;.

    CASE &amp;lt;lfs_fieldcat&amp;gt;-fieldname.
      WHEN 'BUKRS'.
        &amp;lt;lfs_fieldcat&amp;gt;-coltext = text-002

      WHEN 'EBELN'.
        &amp;lt;lfs_fieldcat&amp;gt;-coltext = text-023.
        &amp;lt;lfs_fieldcat&amp;gt;-hotspot = c_x.

*---------------------------------------------------------------------*
*       CLASS LCL_EVENT_RECEIVER DEFINITION
*---------------------------------------------------------------------*

CLASS LCL_EVENT_RECEIVER DEFINITION.
* Event receiver definitions for ALV actions
  PUBLIC SECTION.
    CLASS-METHODS:
      handle_hotspot_click
         for event HOTSPOT_CLICK of CL_GUI_ALV_GRID
            importing E_ROW_ID
                      E_COLUMN_ID
                      ES_ROW_NO.


ENDCLASS.

* Implementation
CLASS LCL_EVENT_RECEIVER IMPLEMENTATION.

  method handle_hotspot_click.
  PERFORM F9007_HANDLE_DOUBLE_CLICK USING E_ROW_id
                                          E_COLUMN_id
                                          ES_ROW_NO.
  endmethod.
ENDCLASS.
FORM f9007_handle_double_click USING    p_row
                                        p_column
                                        p_row_no.
  DATA: lw_details LIKE LINE OF i_details.
  CLEAR lw_details.
  READ TABLE i_details INDEX p_row INTO lw_details.
  CASE p_column.
    WHEN 'BELNR'.
      IF NOT lw_details-belnr IS INITIAL .
        SET PARAMETER ID 'BUK' FIELD lw_details-bukrs.
        SET PARAMETER ID 'BLN' FIELD lw_details-belnr.
        SET PARAMETER ID 'GJR' FIELD lw_details-gjahr.
        CALL TRANSACTION c_transaction_call_fb03 AND SKIP FIRST SCREEN .
      ENDIF.
    WHEN 'EBELN'.
      IF NOT lw_details-ebeln IS INITIAL .
        SET PARAMETER ID 'BES' FIELD lw_details-ebeln.
       CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN .
      ENDIF.
    WHEN OTHERS.
  ENDCASE.
ENDFORM.                    " F9007_HANDLE_DOUBLE_CLICK

In PBO,
SET HANDLER o_eventreceiver-&amp;gt;handle_hotspot_click  FOR o_alvgrid.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly reward points and close the thread.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2005 03:19:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hotspot/m-p/1015921#M80012</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-19T03:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: hotspot</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hotspot/m-p/1015922#M80013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there is a sample program for hotspot here:&lt;/P&gt;&lt;P&gt;&lt;A href="http://sap.ittoolbox.com/code/d.asp?d=3411&amp;amp;a=s" target="test_blank"&gt;http://sap.ittoolbox.com/code/d.asp?d=3411&amp;amp;a=s&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, search in se37 for popup*, and chose the popup u would like to use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anjali&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Aug 2005 03:44:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hotspot/m-p/1015922#M80013</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2005-08-19T03:44:48Z</dc:date>
    </item>
  </channel>
</rss>

