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: 

text field to call screen - module pool.

rajesh_nayak2
Explorer
0 Kudos

Hi,

Can you please let me know how to call a screen( of the same application) on click of "text field"

Note: I tried using "responds to double click" , still its not triggering the PAI event. the error is " Choose a valid function"

Can some body please help me ...

Thanks,

Rajesh

3 REPLIES 3

arseni_gallardo
Active Participant
0 Kudos

Rajesh,

In your GUI Status you have to define an OkCode linked to function key F2.

Kind regards

madhu_vadlamani
Active Contributor
0 Kudos

Hi Rajesh,

Check the function code of also.

Regards,

Madhu.

Former Member
0 Kudos

Hi,

To do that, first you have to create a i/o field with text field attached to it. Display only this text field.

create gui status & assign the function code CS & function type 'S' to function key F2. This also assigns it to the mouse double-click.

now in PAI module assign a module to this field. check the below sample code.

I_check is a i/o field

flow logic.

PROCESS BEFORE OUTPUT.

MODULE STATUS_0100.

*

PROCESS AFTER INPUT.

MODULE USER_COMMAND_0100.

  • FIELD i_CHECK MODULE MOD1 AT CURSOR-SELECTION.

data:i_CHECK TYPE CHAR01,

TEXT1 TYPE CHAR5.

START-OF-SELECTION.

call SCREEN 100.

&----


*& Module STATUS_0100 OUTPUT

&----


  • text

----


module STATUS_0100 output.

SET PF-STATUS 'TEST'.

  • SET TITLEBAR 'xxx'.

endmodule. " STATUS_0100 OUTPUT

&----


*& Module USER_COMMAND_0100 INPUT

&----


  • text

----


module USER_COMMAND_0100 input.

"Do what ever u want.

CASE sy-ucomm.

WHEN 'TEST' .

LEAVE PROGRAM.

WHEN 'EXT' .

LEAVE PROGRAM.

WHEN OTHERS.

ENDCASE.

endmodule. " USER_COMMAND_0100 INPUT

let me know if you have any questions...

Regards,

S.Senthilkumar.

Edited by: senthil kumar on Sep 20, 2011 5:46 PM