Application Development and Automation 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: 
Read only

Cursor setting in Screen fields

Former Member
0 Likes
1,532

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
831

Help me----


it's urgent........

-subha

3 REPLIES 3
Read only

Former Member
0 Likes
832

Help me----


it's urgent........

-subha

Read only

0 Likes
831

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

Read only

0 Likes
831

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