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: 

Imp: event to occur immediately on checking checkbox: points assured

Former Member
0 Kudos

hi all,

I am working on a module pool prog . There is a single screen 0900 on which i have a checkbox 'CHK' and two input fields 'IP1' and 'IP2'.

I have a requirement where i need an event to occur immediately on checking the checkbox on screen without the press of any key.

Also i have a separate requirement where i need that the data entered into IP1 is immediately copied to IP2 without pressing enter or any other key.

Points assured

thanks in advance

1 ACCEPTED SOLUTION

Former Member
0 Kudos

You open your screen using the screen painter - and assign a Function Code to your checkbox. ( say U attach fcode "CLIK" to it.)

(You can attach it from Mod groups/ Fucntion tabs of your screen painter also - in case your dont want to open the graphical editor)

So when the user clicks on the Checkbox , the PAI of the screen will automatically be invoked with function code 'CLIK'.

9 REPLIES 9

Former Member
0 Kudos

call function

SWE_EVET_CREATE

0 Kudos

thanks sreejith for your reply but i am not able to figure out how to use this function module..

can you please send some sample code as to how to use this.

thanks

Former Member
0 Kudos

You open your screen using the screen painter - and assign a Function Code to your checkbox. ( say U attach fcode "CLIK" to it.)

(You can attach it from Mod groups/ Fucntion tabs of your screen painter also - in case your dont want to open the graphical editor)

So when the user clicks on the Checkbox , the PAI of the screen will automatically be invoked with function code 'CLIK'.

0 Kudos

i've awarded the points..

thanks SKC that solved half of my problem regarding that check box.

Could you please provide some help for the other half i.e. I have two input fields on a screen and the requirement is such that when i enter anything into input field 1 it should immediately be copied to field 2 also without pressing any key .

more points assured

thanks in advance

0 Kudos

Punnit,

You are using simple textboxes of the screen painter right ? So when you are typing something in Textbox1, SAP has not provided any event for tracking the same. When you complete the typing and press enter or any other key then only processing starts. You can check it ur self - turn ur debugger on and type something in any textbox of any program - u ll see the debugger is not getting activated - it does when you press a button or double click or something like that.

So you will have to atleat press an ENTER process ur codes. the conventional way is to handle it using a CHAIN ENDCHAIN statement. You can refer to the HELP for the same.

or you can handle it simply in the PAI under the FCODE for enter , effect will be the same.

0 Kudos

well SKC cud u plz tell what exactly is the syntax for copying the contents of input field1 to input field2.

thanks

0 Kudos

U have defined it in the Screen Painter, Say its name is T1 and the second one is T2.

In your main prog , declare them as data ( if you have referenced a data element or table field - keep the type as same).

so syntax is

Data : T1 type char20,

T2 type char20.

then go to the Flow Logic tab, u ll find PBO and PAI events of the screen. Create the PAI module and inside it u can wtite

T2 = T1, may be u ll be having a few conditions on which value of t2 will take value of t1 -- u can put those logic there.

For further helps, open any standard program say SE38 itslef and click on the screen number and see the codes. U ll understand by urself.

OK ?

0 Kudos

well SKC when i am doing INPUT2 = INPUT1, it is simply showing the text 'INPUT1' in the input field2 and INPUT1 is blank. Also when i enter any data into input1 input2 doesnt change..

please help

thanks

0 Kudos

well there was some other problem due to which i was not getting the required result. Now i have resolve that and my problem is solved.

thanks

i'll reward the points