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

reg: set cursor field problem.

Former Member
0 Likes
774

hello guyz,

In module pool programmming, I need to vaildate entries made by the user in the PAI block. Once the entry is valid, I need to move the cursor to the next input field.

Is it possible to set the cursor field in the PAI block. Could you please help me out in this issue because as for as I know the set cursor field works only in PBO.

thanks,

karthikeyan

6 REPLIES 6
Read only

Former Member
0 Likes
710

Hi,

Write it in the PBO module of the next screen.. For Each an Every Action on the Screen... first PAI and PBO is triggered.. So it is approprite to do it in PBO Only..

Thanks,

Mahesh

Message was edited by:

I Can Solve It

Read only

0 Likes
710

thanks for your replies..

I'm not able to understand ur solution...I've only one screen...do I've to create a similar second screen to wrtie it in the PBO..

Read only

0 Likes
710

No dont create another screen..

For validation you might be using chain .. endchain..

let us say i have a material field and quantity field... i want to validate materil and set the cursor in quantity field.

chain

field : material module validate_material

endchain.

module validate_material.

select single * from mara where matnr = material

if sy-subrc eq 0.

set cursor field quantity.

endif.

endmodule.

Read only

0 Likes
710

thanks a lot...

as u suggested i wrote it in the PBO...

it works fine..but my cursor is already in the quantity field when the screen is displayed...

What can I do to have the cursor in the material field initally and then based on validation has to move to quantity field..

I appreciate ur help..

Read only

0 Likes
710

HI,

Take a flag filed initially it will be empty.. when validating.. if value is correct then set the flag to X and in ur PBO check for this flag variable and set the cursor accordingly.

if v_flag eq 'X'.

set cursor field ..

endif.

Thansk

Mahesh

Read only

Former Member
0 Likes
710

You can also use set cursor in PAI. Make sure you input the field in quotes as follows.

SET CURSOR FIELD 'T_TEST-NAME'