2007 Jun 27 11:30 AM
How to move cursor in Table controll's fields after entering the values
2007 Jun 28 5:00 AM
Udaya,
For example, here is the exact code which is working in my system and has been for quite a while.
The screen flow logic.
PROCESS BEFORE OUTPUT.
MODULE STATUS_1500.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_1500.
The code for module status_1500.
************************************************************************
Module STATUS_1500 OUTPUT
************************************************************************
module status_1500 output.
set pf-status 'STDCONSOLE'.
set titlebar '1500_07'.
********************************************
<b> set cursor field cursorfield.</b>----
This is your requirement
********************************************
endmodule.
The PAI module USER_COMMAND_1500
************************************************************************
Module USER_COMMAND_1500 INPUT
************************************************************************
module user_command_1500 input.
case sy-ucomm.
when 'ENTER'.
<b>* Scroll thru fields when user hits enter
get cursor field cursorfield.
case cursorfield.
when 'P_TICNO'.
cursorfield = 'P_PERNR'.
when 'P_PERNR'.
cursorfield = 'P_WERKS'.
when 'P_WERKS'.
cursorfield = 'P_LGORT'.
when 'P_LGORT'.
cursorfield = 'P_AREAC'.
when 'P_AREAC'.
cursorfield = 'P_TICNO'.
endcase.</b>
......
endcase.
Here I'm using the same variable CURSORFIELD for setting/getting
Don't forget to reward if useful........
How to move cursor in Table controll's fields after entering the values
2007 Jun 27 12:34 PM
HI,
u can use GET cursor < cursor name> statement.
<cursor-name is field name>
Regadrs
suresh.d
2007 Jun 27 12:40 PM
2007 Jun 28 4:54 AM
Hi ...
there is Cursor position attitribute in the attitribute screen of the any screen which you had created ... there do F4 it will show the SCREEN fields ... so that the Cursor will automatically placed ...
so see in your screen attrubute there in the Othere attribute block .... where you can mention next screen NO . below that .
need no to write any code for it even for table control also .
Next Screen 100
<b>Cursor position</b>
Screen group
reward points if it is usefull....
Girish
2007 Jun 28 5:00 AM
Udaya,
For example, here is the exact code which is working in my system and has been for quite a while.
The screen flow logic.
PROCESS BEFORE OUTPUT.
MODULE STATUS_1500.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_1500.
The code for module status_1500.
************************************************************************
Module STATUS_1500 OUTPUT
************************************************************************
module status_1500 output.
set pf-status 'STDCONSOLE'.
set titlebar '1500_07'.
********************************************
<b> set cursor field cursorfield.</b>----
This is your requirement
********************************************
endmodule.
The PAI module USER_COMMAND_1500
************************************************************************
Module USER_COMMAND_1500 INPUT
************************************************************************
module user_command_1500 input.
case sy-ucomm.
when 'ENTER'.
<b>* Scroll thru fields when user hits enter
get cursor field cursorfield.
case cursorfield.
when 'P_TICNO'.
cursorfield = 'P_PERNR'.
when 'P_PERNR'.
cursorfield = 'P_WERKS'.
when 'P_WERKS'.
cursorfield = 'P_LGORT'.
when 'P_LGORT'.
cursorfield = 'P_AREAC'.
when 'P_AREAC'.
cursorfield = 'P_TICNO'.
endcase.</b>
......
endcase.
Here I'm using the same variable CURSORFIELD for setting/getting
Don't forget to reward if useful........
2007 Jun 28 5:15 AM
Hi,
In the PAI event while looping on the internal table
which is attched to the tb control .
Use chain end chain or field .
Make whatever validation u need and use.
SET CURSOR field "field name" of that column .
Hope this will help.
2007 Jun 28 11:09 AM