2010 Oct 11 4:21 PM
Hai All,
I have developed a module pool program, in which i have created a main screen and two sub screens.
Upon the list box value and clicking on 'ENTER' , we get the corresponding sub screen displayed.
and now i have to write change functionality where i enter the refernece number, and click on 'ENTER' then the details saved on the database for that refernece number will be displayed.
and i have a push button display in which i have to give the refernece number and click on 'ENTER' then the data must be dispalyed.
Problem:
So how can i use the same ENTER button for three functionalities?
My aaproach:
I have used 'DISPLAY' button to display the details instead of 'ENTER' button.
and 'CHANGE' button instead of 'ENTER' to dispaly values to change and save the record.
because i have used 'ENTER' to display the subscreen based on the list box value.
So How can I use the same enter for three different functionalities?
please suggest me a approach for this issue.
With Regards,
S.Asha.
2010 Oct 11 4:27 PM
Hi,
I would like to know if your all ENTER button you want, are in same main screen or different,
if on different screen then no problem of creating ENTER button,
if on the same screen, use set Cursor to set the focus on the button,
so that when user press ENTER, the button will execute.
THanks,
Anmol.
2010 Oct 12 6:26 AM
Hi S. Asha,
You can solve the listbox enter problem by assigning function code to listbox and
whenever user will interact with the listbox user command will be triggered and you
can handle this listbox event in PAI module of your screen.
And for another issue of capturing ENTER on refernece number and click you can use the
GET CURSOR COMMAND like GET CURSOR FIELD FLD OFFSET OFF VALUE VAL LENGTH LEN.
when user will enter value on any screen field and press ENTER PAI will be triggerd so
use this get cursor statement and give condition like the field from this statement is
your reference nummber fields and ok_code is Enter do your logic.
push button display you can very well handle by function code of the pushbutton.
Regards,
Pawan