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

Double-Click event for a push-button

Former Member
0 Likes
1,995

Hi,

I have a dialog program where I have suppose 2 screens. In the first screen I have a push button. When I click that push button the 2nd screen gets displayed. Now I want the second screen to get displayed on double-click of the push-button and not single click.

Please let me know how to achieve this. Where in the properties it needs to be modified that that the triggering action for the push-button is double-click instead of single click,

Thanks in advance,

Lalitha

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,497

A push button is triggered on a single click - if you want something that a double-click will work on, then a standard field can be used and the F2 / Select / Pick handled in your logic via sy-ucomm / your OK-code.

Jonathan

A push button is triggered on a single click - if you want something that a double-click will work on, then a standard field can be used and the F2 / Select / Pick handled in your logic via sy-ucomm / your OK-code.

Jonathan

8 REPLIES 8
Read only

Former Member
0 Likes
1,497

Hi,

You have to call your function like this:

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

...

I_CALLBACK_PROGRAM = z_variant-report

(or your program name, not sy-repid because this will

change during the use of ALV Grid)

I_CALLBACK_USER_COMMAND = 'USER_COMMAND2'

(or some other name)

...

then you define your form:

form user_command2 using r_ucomm like sy-ucomm

rs_selfield type slis_selfield.

case r_ucomm.

when '&IC1'. (doubleclick)

if rs_selfield-tabindex > 0 and

rs_selfield-sumindex le 0.

read table itab into wa index

rs_selfield-tabindex.

perform second_grid.

endif.

endcase.

then your form for the second grid:

form second_grid.

(here you can make your selections for the second grid

based on the row you selected into workarea wa from the

first grid, and then call REUSE_ALV_GRID_DISPLAY again,

with another field catalog, internal table etc...)

endform.

Regards,

Shiva

Read only

0 Likes
1,497

Hi Kumar,

My screens are in a dialog program. Not ALV grids.

Thanks & Regards,

Vishnu Priya

Read only

Former Member
0 Likes
1,498

A push button is triggered on a single click - if you want something that a double-click will work on, then a standard field can be used and the F2 / Select / Pick handled in your logic via sy-ucomm / your OK-code.

Jonathan

Read only

0 Likes
1,497

Hi Jonathan,

Thanks for your reply. Can you please elaborate what is a standard field. how do I create it on screen.

Thanks & Regards,

Vishnu Priya

Read only

0 Likes
1,497

I meant any input or output field - you can also make an output field look like a field label, if that's the appearance your want.

Jonathan

Read only

0 Likes
1,497

Create a Text field on your screen. In the field attributes panel, select an ICON. Minimize the field to the size of the Icon.

Also on the Attribute Panel, one of the tabs has an option to "React to Double Click", you want to Check this box.

In the GUI Status for this screen, in Function Keys, set the F2 to have an Function Code of PICK.

Then in your User Command routine code for OK_CODE/SY-UCOMM to call your 2nd screen when equal to 'PICK'..

Read only

Brijesh-Singh
Product and Topic Expert
Product and Topic Expert
0 Likes
1,497

hi,

Set the function Code to PICK for the text field to behave like a button is not working. Could you put some inputs on this how to get this working.

regards,

Brijesh

Read only

Former Member
0 Likes
1,497

I think push buttons work on single click , they don't on double click.