Skip to Content
0

Selection Screen options loosing their focus when I enter wrong data in any of the parameters?

Jun 05, 2017 at 12:34 PM

65

avatar image
Former Member

Hi,

I am having three selection screen parameters: P_VBELN, P_WERKS & P_MATNR.

I am having validations on checking the data entered is existed or not. But, when any field data does not exist, the other two fields are loosing their focus. How to overcome this?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

5 Answers

Raymond Giuseppi
Jun 05, 2017 at 12:55 PM
2

....focus lost is not equivalent to input deactivated...

Define a SELECTION-SCREEN BEGIN/END OF BLOCK to wrap the three parameters and execute the check and raise error messages in a AT SELECTION-SCREEN ON BLOCK block

.

Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

The parameters are defined in SELECTION-SCREEN BEGIN/END OF BLOCK and error messages are raised using messages.. type 'E" when I enter wrong data that is not existed in database. The other two fields are loosing their focus which is non-editable. I would like to enter all the three parameters once again.

0

The check also MUST be in the ON BLOCK code, not in a ON field one.

1

Read Raymond's reply carefully. Raise your errors in a AT SELECTION-SCREEN ON BLOCK event.

1
avatar image
Former Member Jun 05, 2017 at 12:38 PM
0

Hi ,

Are using Error message for wrong data input.

If you are using error message system will stop with step.

Regards,

krishna.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Yes, I am using error messages for all the three fields.

0
avatar image
Former Member Jun 05, 2017 at 12:42 PM
0

Yes, I am using error messages for all the three fields.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

If you want to throw error after checking all three fields don't write error message for three fields individually.

write error message after checking all fields and use some flags.

Regards,

krishna.

0
Richard Harper Jun 05, 2017 at 12:45 PM
0

How do you mean 'the other two fields are loosing focus' ? Only one field can have focus at any one time. However, rephrasing what Krishna said if you are using message type 'E', then the erroneous field receives focus to enable you to modify it, with other fields on the screen being changed to display.

If you wish all three fields to have an input status when one of the fields is in error use CHAIN....ENDCHAIN in your PAI.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

CHAIN... ENDCHAIN are getting error as I am working in SE38 editor and not in SE51 (MPP).

0
Mangesh Parihar Jun 22, 2017 at 09:31 AM
0

Hi,

Use At Selection screen on event.

At Selection Screen On P_VBELN.
*Code For Validation.

At Selection Screen On P_WERKS.
*Code For Validation.

At Selection Screen On P_MATNR.
*Code For Validation.

This should work.

Regards,

Mangesh

Share
10 |10000 characters needed characters left characters exceeded