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

Responding to double click in dialog programming

Former Member
0 Likes
3,168

Hi All,

I have a screen which has a text field. Whenever I double click on the value io the text field, It should go to another transaction and the value in the text field should be passed to the next transaction. How do I go about this?

Will reward points if helpful..........

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,868

hi,

for that text box which u have designed in screen give F.code and activate and in flow logic in PAI module

data: ok_code like sy-ucomm.

case sy-ucomm.

when 'TEXTBOX'. // textbox be F.code for text box

SET PARAMETER ID: 'CAR' FIELD carrid,

CALL TRANSACTION 'MM01' .

in the above statement car is the value in the text box to be set for field carrid in the MM01 transaction.

if helpful reward some points.

with regards,

Suresh Aluri.

10 REPLIES 10
Read only

Former Member
0 Likes
1,868

HI,

are you trying to say whenever a value has been given in a text field and after pressing "Enter" , it should take you to next transaction.If so ,try this..

MODULE screen_9001 INPUT.

check lv_saveok = 'next '.

CASE lv_saveok.

WHEN 'next'.

call transaction "XXX".

ENDCASE.

ENDMODULE. " screen_9001 INPUT

or if u want to take to next transaction jus by clicknig on value in text field ,follow lik this.

MODULE screen_9001 INPUT.

check sy-ucomm = 'PBF2'.

CASE sy-ucomm.

WHEN 'PBF2'.

call transaction "XXX".

ENDCASE.

ENDMODULE. " screen_9001 INPUT

Reward points if this helps you

Siva

Message was edited by:

SivaKumar

Read only

Former Member
0 Likes
1,868

Please refer to following link.

*********************************************************

goto the screen what you had developed and then double click on the field and you can see the attributes of the field in that, click on the tab Display, in that you can find a check box with Description RESPONDS TO DOUBLE-CLICK , checkt he check the box and activate it .

in the PF-status which you are creating for the screen, click on the function keys

menu bar , then in the 'Recommended function key settings for the KEY F2 give the function code as 'PICK'.

in the PAI event , for the module user command write the following code

CASE sy-ucomm.

WHEN 'PICK'.

call screen '1001'..

ENDCASE.

Regards

vasu

Read only

Former Member
0 Likes
1,868

Hi Sushma

you can do by

1. At your GUI . in Function Keys : Example 'F2' entry 'DCLICK'.

2. in your program when you click (double click), sy-ucomm = 'DCLICK' and use syntax : Get cursor 'FieldXX' value v1 to get value from FieldXX to variable v1 .

3. if sy-ucomm = 'DCLICK' .

call screen 0200.

a = v1.

endif.

Regards

Wiboon

Read only

Former Member
0 Likes
1,868

Hi sushma,

check the checkbox "Responds to double click' in the attributes. it will be there in the display tab.

After checking that, put a function code for that text field and in the PAI , call the new transaction

that will do.

hope u undestood this. if u still have any queries, revert back to me

Regards,

Prasant

*reward if useful

Read only

Former Member
0 Likes
1,869

hi,

for that text box which u have designed in screen give F.code and activate and in flow logic in PAI module

data: ok_code like sy-ucomm.

case sy-ucomm.

when 'TEXTBOX'. // textbox be F.code for text box

SET PARAMETER ID: 'CAR' FIELD carrid,

CALL TRANSACTION 'MM01' .

in the above statement car is the value in the text box to be set for field carrid in the MM01 transaction.

if helpful reward some points.

with regards,

Suresh Aluri.

Read only

0 Likes
1,868

Im unable to assign FCT code to the text field....In the properties window of the text field, the FCT code field is disabled....

Read only

0 Likes
1,868

Sushma,

U've to assign funciton code to the F2 key in the GUI Status and not to the attributes of the field in the layout of the screen.

1.double click on the status(SE41)

2.Open the Function keys node

3.Find the F2 key under the heading "Recommended Function Key Settings"

4. remove the "<...>" and assign a function code of ur choice,say "PICK"

Message was edited by:

Rajesh

Read only

sushant_singh
Participant
0 Likes
1,868

u need to use following code :

case ok_code.

when 'PICK'.

free memory id 'ZFIELD'.

export <FIELD> to memory id 'ZFIELD'.

CALL TRANSACTION 'ZTXN'.

endcase.

this code should be placed inside a module called as :

field <fld> MODULE <mod> AT CURSOR-SELECTION.

and in the PBO of the called program you have to use :

import <FIELD> FROM memory id 'ZFIELD'.

FREE MEMORY ID 'ZFIELD'.

REWARD POINTS IF HELPFUL.

Read only

0 Likes
1,868

remember to assign F2 to function code 'PICK'

Read only

0 Likes
1,868

Thanks for your answer.