Application Development 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: 

Problem with setting cursor for field.

Former Member
0 Kudos

Hi,

I am working with enhancement where i need to check the percentage total for the billing plan if it exceeding 100 then i need to give an error message . Now i am able to code for this requirement .But in the following scenario

for a billing plan there is percentage divided is 50:40:10. if i change the billing percentage of 50 to 90. then system will display an error message and system is allowing the user to change the that percentage value alone( in this case cursor will be placed at percentage 90 first row all other fields will be in display mode) .But if i change the percentage of second row say from 40 to 60. The system is throwing an error message but the cursor is placed at the first row only.

I am using transaction VA01 .which is standard tcode.Now i have written the code in the include and i have created an implicit enhancement in LV60FF0F i have called that include in this implementation.

Please can any one help me in setting the cursor to the field where the billing percentage has been changed . Or give me some suggestion where i can display the all the fields in changed mode .

Advance thanks

Pavee.

4 REPLIES 4

Former Member
0 Kudos

Hi Praveen

I am not sure whether you are using the kep word "SET CURSOR" in your program based on the place where the error message is raised.

~Ranganath

Former Member
0 Kudos

Hi,

Use the GET CURSOR statment in the API event to get the cursor position

GET CURSOR FIELD FLD OFFSET OFF VALUE VAL LENGTH LEN.

Then use the SET CURSOR to set the cursor position

Regards

Sudheer

0 Kudos

Hi sudheer/ramesh,

this is code that i have written to give the error message .please can u guide me where do i need to put the get and set cursor field statement.so that get cursor should fetch the field in the row where the user as changed the value of percentage.

LOOP AT xfplt.

IF xfplt-fkarv EQ lC_fkarv.

lv_percent = lv_percent + xfplt-fproz.

ENDIF.

ENDLOOP.

*Check if it is 100%.

IF lv_percent NE lc_fproz.

*Message 'Down Payments do not match. Please correct percentage or dollar amounts'.

MESSAGE e189(yd01) .

ENDIF. "Percent

advance thanks

regards

Pave....

Former Member
0 Kudos

Praveen i checked it by making a new program, by default cursor goes to first field in case of any error ( if you want to do any arthmetic operation by using more than 1 input fields)

Aditya