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: 

User Exit Validation - Setting Cursor & Setting Screen on Error Message

Former Member
0 Kudos

Hi,

I have a validation logic in a User Exit and I want to set the Cursor on a Screen Filed if it gets an Error Message. set cursor field ... or set screen ... statements are not working. Please let mehave your suggestions.

Appreciate Your Help.

Thanks,

Kannan

Message was edited by:

Kannan SA

1 ACCEPTED SOLUTION

former_member191735
Active Contributor
0 Kudos

which user exit?

12 REPLIES 12

Former Member
0 Kudos

After calling the screen use set curosr field command.

Naveen.

0 Kudos

After calling the screen, I am setting the cursor to the screen field then I give Error Message. But it does not work. Do I have to modify the screen so as to keep the cursor at the field just got validated with Error Message?

Thanks,

Kannna

0 Kudos

If your UESR EXIT is in the part of the PAI, than SET CURSOR will not work. If your exit is in the PBO than that statment will work.

Regards,

Naimesh Patel

0 Kudos

Hi,

Actually this Validation happens inside a User Exit after saving the document. I think it is PAI.

0 Kudos

Hi Naimesh Patel ,

This User Exit is triggered after Saving the data. I need to set the sursor to a screen field in a subscreen.

Appreciate Your Help.

Thanks,

Kannan.

0 Kudos

If it is in the PAI than I don't think you will able to set the cursor there.

You can give the field name alos in the message. This is not the best solution, but we have to do something like this.

Regards,

Naimesh Patel

former_member191735
Active Contributor
0 Kudos

which user exit?

0 Kudos

It is : EXIT_SAPLAISA_001. I need to Validate the Asset data (AS01/AS02) before it is Saved.

Appreciate Your Help.

Kannan.

Message was edited by:

Kannan SA

0 Kudos

I tried to do the where used for the FM and I get the instance in the FM ASSET_MASTER_RECORD_UPDATE. It seems this FM is used at last while saving the data. So, I think there will not be any possibilty to put cursor back on the screen on specific field.

Regards,

Naimesh Patel

0 Kudos

Hi Naimesh Patel,

So, the User Exits in AS01/AS02 are not helpful for the screen field validation. Is it possible to implement Field Exit for this screen filed to have the validation at the PBO level to place the Cursor on Error Message?

How to create a Field Exit? Please provide me the process.

Appreciate Your Help.

Thanks,

Kannan.

0 Kudos

Yes you can achieve it witht the fieldexit.

If you are in 4.7 and up follow this

1. Run report RSMODPRF

2. Run on the selection screen

3. In list Field Exit > Create

4. Give your data element

5.System will generate the FM FIELD_EXIT_XXXXX

6. Activate it.

Start program again..RSMODPRF.. run it and in the list follow this step

7. Select your field exit and assign to your program and screen

8. Select again .. Field exit > Activate

If you are in version below 4.7

1. CMOD

2. Go to >Text enhancment > Field exit

then follow the same step from 3 to 6 onwards as given above.

Go to CMOD again...Go to >Text enhancment > Field exit

7. Select your field exit and assign to your program and screen

8. Select again .. Field exit > Activate

Regards,

Naimesh Patel

0 Kudos

Hi Naimesh Patel,

I am not clear what to do after the step 6. I have created a FM and activated it. How do I assign it to my program and screen. Actually the field I need to validate is in a Subscreen.

Appreciate Your Help.

Thanks,

Kannan.