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: 

Hotspot Click is not working !!

Former Member
0 Kudos
1,145

Hi,

I have sucessfully implemented hotspot click using OOALV.

I still have an issue in one of the hotspot click feature.

I have a OOALV report where i have implemented hotspot click for Contract # as

when 'KONNR'.

if w_listdata-konnr <> ''.

lv_konn = w_listdata-konnr.

set parameter id 'VRT' field lv_konn.

CALL TRANSACTION 'ME33K' and skip first screen.

endif.

since ME33K transaction takes input of type 'EVRTN' ,i have taken a

temporary parameter called lv_konn declared it as type EVRTN.

But still the hotspot click is not working.

Can anyone suggest me how to reslove this issue.

Appreciate all the help.

1 ACCEPTED SOLUTION

mnicolai_77
Active Participant
0 Kudos
323

sorry,

now i understand why your hotspot not working.

in me33k there is a module called D0205_GET_PARAMETER that read the parameter that you set before in this way

> CHECK RM06E-EVRTN EQ SPACE. "4.0B TK

> CASE T160-BSTYP.

> WHEN BSTYP-KONT.

> GET PARAMETER ID 'CTR' FIELD RM06E-EVRTN.

> WHEN BSTYP-LFPL.

> GET PARAMETER ID 'SAG' FIELD RM06E-EVRTN.

> WHEN SPACE.

> GET PARAMETER ID 'VRT' FIELD RM06E-EVRTN.

> ENDCASE.

If you look in the table T160 with key TCODE = 'ME33K' the bstyp value is 'K' the value of the costants BSTYP-KONT so you have to modify your set paramenter in this way.

>set parameter id 'CTR' field lv_konn.

sorry.

Regards Marco

14 REPLIES 14

Former Member
0 Kudos
323

Hi Madan,

Try like this

CASE sy-ucomm.

WHEN '&IC1'.

CASE i_selfield-fieldname.

WHEN 'KONNR'.

Regards,

Satish

0 Kudos
323

Still the hotspot click is not working.

Please help to resolve this issue, its very urgent.

Appreciate all the help.

Madan

0 Kudos
323

Is atleast Hotspot is comming on that field?

Regards,

Satish

0 Kudos
323

yeah hotspot is enabled on that particular field and is coming in the output screen.

But the issue is when the user clicks on the field it takes the control to that particualr transaction and it waits for the user to enter the input manually..

0 Kudos
323

HI MAdan,

try to use SET PARAMETER ID statement.

it might be useful to send values to the transaction

Regards

SAB

0 Kudos
323

In FM

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

In Form

FORM user_command USING r_ucomm LIKE sy-ucomm rs_selfield TYPE slis_selfield.

-Check function code

CASE r_ucomm.

WHEN '&IC1'.

-Check field clicked on within ALVgrid report

IF rs_selfield-fieldname = 'KONNR'.

-Read data table, using index of row user clicked on

READ TABLE <Internal Tbale name> INTO <Work Area> INDEX rs_selfield-tabindex.

-Set parameter ID for transaction screen field

SET PARAMETER ID 'VRT' FIELD <Work Area-Filed nameLike w_listdata-konnr>.

-Execute transaction ME33K, and skip initial data entry screen

CALL TRANSACTION 'ME33K' AND SKIP FIRST SCREEN.

ENDIF.

ENDCASE

ENDFORM.

Use the follwoing Code and Let me know the status

Kanagaraja L

Former Member
0 Kudos
323

Hi Madan,

You have used the set parameter id.

When you are calling the transaction,you are skipping the first screen.

But you should use the get parameter for that fierld value or if the screen that you are skipping has

select-options then you need to use the memory id statement.

The syntax will be

select-options s_konn obligatory memory id VRT.

This will transport the value.

Reward if helpfull.

Thanks,

Kashyap

Former Member
0 Kudos
323

Hi Madan,

I will send a syntax for that check it once then ur problem is solved ok..

FORM usercommand USING ucomm LIKE sy-ucomm selfield TYPE slis_selfield.

CASE selfield-sel_tab_field.

WHEN 'GT_HEADERDAT-EBELN'.

code

endcase.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE = ' '

i_callback_program = sy-cprog

  • I_CALLBACK_PF_STATUS_SET = ' '

i_callback_user_command = 'USERCOMMAND'

  • I_STRUCTURE_NAME =

is_layout = wa_layout

it_fieldcat = gt_fieldcat

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

  • IT_SORT =

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_DEFAULT = 'X'

  • I_SAVE = ' '

  • IS_VARIANT =

it_events = gt_events

  • IT_EVENT_EXIT =

  • IS_PRINT =

  • IS_REPREP_ID =

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

t_outtab = gt_headerdat

EXCEPTIONS

program_error = 1

OTHERS = 2.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Award points if helpful.

Kiran Kumar.G.A

Have a Nice Day..

mnicolai_77
Active Participant
0 Kudos
323

HI,

to resolve your problem try this code:

after the method SET_TABLE_FOR_FIRST_DIPLAY register the hot spot event in this way.

> CALL METHOD grid1->set_table_for_first_display

> CHANGING

> it_fieldcatalog = fieldcat

> it_outtab = gt_outtab.

>

> CREATE OBJECT event_alv.

>

> SET HANDLER event_alv->handle_hotspot FOR grid1.

so you have to create a little class where implement the code for calling ME33K transaction as it follows.

>----


>* CLASS LCL_event_alv DEFINITION

>----


>* ........ *

>----


>CLASS lcl_event_alv DEFINITION.

>

> PUBLIC SECTION.

>

> METHODS: handle_hotspot

> FOR EVENT hotspot_click

> OF cl_gui_alv_grid

> IMPORTING e_row_id.

>

>ENDCLASS. "LCL_event_alv DEFINITION

>

>

>&----


>*& Class (Implementation) LCL_EVENT_ALV

>&----


>* Text

>----


>CLASS lcl_event_alv IMPLEMENTATION.

>

> METHOD handle_hotspot.

>

>read table gt_outtab into gs_outtad index e_row_id-index

>set parameter id 'VRT' field gs_outtad-KONNR.

>CALL TRANSACTION 'ME33K' and skip first screen.

>

> ENDMETHOD. "handle_hotspot

>ENDCLASS. "lcl_event_alv IMPLEMENTATION

Regards

Marco

0 Kudos
323

Hi,

All are absolutely rite.

But my issue is a bit different.

I have a OOALV report where i have implemented hotspot click for Contract # as

when 'KONNR'.

if w_listdata-konnr ''.

lv_konn = w_listdata-konnr.

set parameter id 'VRT' field lv_konn.

CALL TRANSACTION 'ME33K' and skip first screen.

endif.

*since ME33K transaction takes input of type 'EVRTN' ,i have taken a

temporary parameter called lv_konn declared it as type EVRTN*.

But still the hotspot click is not working.

Can anyone suggest me how to reslove this issue.

Appreciate all the help.

0 Kudos
323

hi madan,

have you insert the set Handler command ?

>SET HANDLER event_alv->handle_hotspot FOR grid1.

if yes, try to change your local class definition and implementation in this way

>----


>CLASS lcl_event_alv DEFINITION.

>

> PUBLIC SECTION.

>

> METHODS: handle_hotspot

> FOR EVENT hotspot_click

> OF cl_gui_alv_grid

> IMPORTING e_row_id

> E_COLUMN_ID.

>

>ENDCLASS. "LCL_event_alv DEFINITION

>

>----


>CLASS lcl_event_alv IMPLEMENTATION.

>

> METHOD handle_hotspot.

>if E_COLUMN_ID-FIELDNAME = 'KONNR'

>read table gt_outtab into gs_outtad index e_row_id-index

>set parameter id 'VRT' field gs_outtad-KONNR.

>CALL TRANSACTION 'ME33K' and skip first screen.

>endif.

> ENDMETHOD. "handle_hotspot

>ENDCLASS. "lcl_event_alv IMPLEMENTATION

Regards

Marco

Edited by: nicolai marco on Jan 15, 2008 6:31 PM

0 Kudos
323

Hi Macro

Could u please provide me a working example of hotspot click using OOPS.

I have defined it this way but its not working,

**PBO

CREATE OBJECT g_event_alv.

SET HANDLER event_alv=>handle_hotspot_click FOR g_grid.

**PBO

and then have defined and implemented the class in the following way

CLASS lcl_eventhandler DEFINITION.

PUBLIC SECTION.

METHODS: handle_hotspot_click

FOR EVENT hotspot_click OF cl_gui_alv_grid

IMPORTING e_row_id.

ENDCLASS. "lcl_eventhandler DEFINITION

----


  • CLASS lcl_eventhandler IMPLEMENTATION

----


*

----


CLASS lcl_eventhandler IMPLEMENTATION.

METHOD: handle_hotspot_click.

READ TABLE gt_outtab INTO wa_outtab INDEX e_row_id-index.

SET PARAMETER ID 'MAT' FIELD wa_outtab-matnr.

SET PARAMETER ID 'WRK' FIELD wa_outtab-werks.

CALL TRANSACTION 'MMBE' AND SKIP FIRST SCREEN.

ENDMETHOD. "handle_hotspot_click

ENDCLASS. "lcl_eventhandler IMPLEMENTATION

PS I am new to OOPS, a working example will really help

Kind Regards

Sameer

mnicolai_77
Active Participant
0 Kudos
324

sorry,

now i understand why your hotspot not working.

in me33k there is a module called D0205_GET_PARAMETER that read the parameter that you set before in this way

> CHECK RM06E-EVRTN EQ SPACE. "4.0B TK

> CASE T160-BSTYP.

> WHEN BSTYP-KONT.

> GET PARAMETER ID 'CTR' FIELD RM06E-EVRTN.

> WHEN BSTYP-LFPL.

> GET PARAMETER ID 'SAG' FIELD RM06E-EVRTN.

> WHEN SPACE.

> GET PARAMETER ID 'VRT' FIELD RM06E-EVRTN.

> ENDCASE.

If you look in the table T160 with key TCODE = 'ME33K' the bstyp value is 'K' the value of the costants BSTYP-KONT so you have to modify your set paramenter in this way.

>set parameter id 'CTR' field lv_konn.

sorry.

Regards Marco

0 Kudos
323

Brilliant !!

The issue is resolved.

Thank you very much Marco.

Madan