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 to screen fields

Former Member
0 Kudos

Hi Techies,

I have been exploring as how to assign hotspot to screen field which is displayed.(Grayed). ( Dialog desgined via sreen painter )

There is a check boc saying "respond to double click", Is there a way to assign a funciton code for it

so that I can capture it in Sy-ucomm...

I appreciate ur help

Thanks for ur advice

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello,

Try the following

Select the field on which you need the double click action.

Check the checkbox - Respond to Double Click

In the PBO of the screen activate the PF status and in the 'Function Keys; section of the PF status, check the Recommended function key settings and for the key F2 assign the function code PICK.

In the PAI check SY-UCOMM = 'PICK' and perform what ever functionality you need here.

Hope this helps.

Thanks and Regards

Sachin

5 REPLIES 5

Former Member
0 Kudos

Hello,

Try the following

Select the field on which you need the double click action.

Check the checkbox - Respond to Double Click

In the PBO of the screen activate the PF status and in the 'Function Keys; section of the PF status, check the Recommended function key settings and for the key F2 assign the function code PICK.

In the PAI check SY-UCOMM = 'PICK' and perform what ever functionality you need here.

Hope this helps.

Thanks and Regards

Sachin

0 Kudos

Thanks Sachin.. I had to make hotspots to multiple fields which would lead to diff. screens.

I followed the same procedure as u mentioned...

In order to find out , on which field the click event was triggered, I used ' GET CURSOR FIELD_NAME'.

it solved the probs

Thanks

Matt

0 Kudos

I wasted 2 hours to find you reply.

This is what i really want.

But i have a question.

Why it works set 'PICK' to the function key 'F2'

Before use below source code

It works well


SET PF-STATUS 'XXXX'.

But after use 'PF-STATUS' it's not working

Can you explain it?

0 Kudos

Hello,

Thanks for the solution.

But I am displaying two fields in the module pool screen and I made hotspot for the fields and i need to display different message based on the user selection.

is it possible.

Regards,

Veera J

0 Kudos

Hi,

  1. Go to screen XXXX layout and In table control object 2x click on column that You want to make hotspot. My table gt_api_list-charg
  2. Go to attributes section and 'display" tab. Mark there "respond to double click" field.
  3. In PF status of screen XXXX when table control is placed on, in "Function Buttons" area find F2 button, and put there some function code. My was API_CHRG.
  4. Go to MODULE user_command_XXXX and put similar code

WHEN 'API_CHRG'.
       DATA: lv_line_no TYPE i.
       DATA: ls_api_list LIKE LINE OF gt_api_list.
       GET CURSOR LINE lv_line_no.
       IF sy-subrc = 0.
         READ TABLE gt_api_list INTO ls_api_list INDEX lv_line_no.
         IF sy-subrc = 0.
           SET PARAMETER ID: 'MAT' FIELD ls_api_list-matnr.
           SET PARAMETER ID: 'WRK' FIELD qals-werk.
           SET PARAMETER ID: 'CHA' FIELD ls_api_list-charg.
           CALL TRANSACTION 'MSC3N' AND SKIP FIRST SCREEN.
           CLEAR: ls_api_list.
         ENDIF.
       ENDIF.


Best regards

Wojciech Adamski