‎2006 Jan 26 5:49 PM
Hi,
In custom screen when i enter Customer number after pressing enter cursor should move into PO number field(like va01 screen). User inputs in PO number field & press enter cursor should jump to "PICKEDup field".
How can i set this? Is there is any properties available for this settings in Screen? Send me sample codes?
Thanks,
subashini
‎2006 Jan 26 6:37 PM
‎2006 Jan 26 6:37 PM
‎2006 Jan 26 6:41 PM
If you want the cursor to move after pressing enter, you have to add code in the OK-Code processing in the PAI. For example, in the PAI:
If SY-UCOMM = 'ENTE'. "(or whatever the Enter stands for. It could be a SPACE also.)
set cursor field PO_NUMBER.
endif.
Hope this helps,
Bhanu
‎2006 Jan 26 6:59 PM
Use the SET CURSOR statement and GET CURSOR statement. You will have to keep track of your cusor. In the PAI of the screen you will need to GET CURSOR and the PBO you will need to SET CURSOR. In this example, if the user keeps hitting ENTER, then cursor will jump thru the fields on by one, when it gets to the last field, it will jump to the top and so on.
data: cursorfield(20) type c.
module status_1500 output.
set pf-status 'STDCONSOLE'.
<b> set cursor field cursorfield.</b>
endmodule.
*
*
module user_command_1500 input.
case sy-ucomm.
when 'ENTER'.
* Scroll thru fields when user hits enter
<b>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>
ENDMODULE.
REgards,
Rich Heilman