Application Development and Automation 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: 
Read only

Get Cursor field problem

Former Member
0 Likes
1,675

Dear Guys,

I have made a screen that has some fields.

I enabled in PAI of that screen a code for taking the cursor position so to have double click event.

The double click works ok but the problem is that it works and on "enter" .

How can i prevent that .

I want to work only in double click ....

MODULE FIND_CURSOR INPUT.
*GET CURSOR FIELD ITAB_SAL-VBELN2 VALUE W_SEARCH.
  GET CURSOR FIELD FLD OFFSET OFF VALUE VAL LENGTH LEN.
  IF FLD = 'W_LIKP1' OR
     FLD = 'W_LIKP2' OR
     FLD = 'W_LIKP3' OR
     FLD = 'W_LIKP4' OR
     FLD = 'W_LIKP5'.
    IF VAL <> ''.
      SET PARAMETER ID 'VL' FIELD VAL.
      CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN.
    ENDIF.
  ENDIF.
  IF FLD = 'ITAB_SAL-VBELN2' OR
     FLD = 'ITAB_SAL-VBELN3' OR
     FLD = 'ITAB_SAL-VBELN4' OR
     FLD = 'ITAB_SAL-VBELN5'.
    IF VAL <> ''.
      SET PARAMETER ID 'VF' FIELD VAL.
      CALL TRANSACTION 'VF03' AND SKIP FIRST SCREEN.
    ENDIF.
  ENDIF.
  CLEAR FLD.
  CLEAR OFF.
  CLEAR VAL.
  CLEAR LEN .
ENDMODULE.                 " FIND_CURSOR  INPUT

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,035

Hi,

please check the content of field SY-UCOMM. This might be the field countaining the different action values (if there are differences between ENTER and DOUBLE-CLICK). Maybe you have to set a code first into that field if the event DOUBLE-CLICK occurs ...

Regards,

Klaus

3 REPLIES 3
Read only

former_member186741
Active Contributor
0 Likes
1,035

Ensure that the field assigned to the OK_CODE matches the code of the double-click. HAve a look at the screen definition to find out the ok_code variable name and then debug to find out what a double-click's code is and also what 'enter' is. You can then put a check in your PAI module to restrict it as you require.

Read only

0 Likes
1,035

HI !

I've checked it for 'ENTER' event, in this case SY-UCOMM is initial. e.g SY-UCOMM = ''.

You can check either is it same in case of double click.

One thing that I want to know about mouse double click. I hope you can write here for me.

Regards !

Read only

Former Member
0 Likes
1,036

Hi,

please check the content of field SY-UCOMM. This might be the field countaining the different action values (if there are differences between ENTER and DOUBLE-CLICK). Maybe you have to set a code first into that field if the event DOUBLE-CLICK occurs ...

Regards,

Klaus