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

Abnormal behaviour in the selection screen

former_member220801
Participant
0 Likes
839

In my selection screen, there are 1 mandatory text input, 1 optional text input, 1 radiobutton group containing 2 radiobutton(ra and rb)(a user-command is binded to it).

I have binded different search help to the optional text input which depends on the selection of the radiobutton group.

i.e. radio button A -> search help 1

radio button B -> search help 2

But when I left the mandatory text input unfilled, and then try to change the radiobutton value from A to B. An error 'Make an entry to all required fields' is prompt. Later when I try to trigger the search help, search help 1 instead of search help 2 is prompted (but in the screen, radio button B is selected). When I set a breakdown to the routine 'AT SELECTION-SCREEN ON VALUE-REQUEST FOR text_input2', I found that the ra = 'X' even though radio button B is selected.

Does anyone know how to fix/get rid of this abnormal behaviour? Thanks a lot!

1 ACCEPTED SOLUTION
Read only

naimesh_patel
Active Contributor
0 Likes
803

Hello,

Make your mandatory filed as optional fileds means remove the obligatory attached to that field.

And in start-of-selection, put check on that field.

Start-of-selection.

if par1 is initial.

message s001 with 'please enter value in Par1'.

leave list-processing.

endif.

Regards,

Naimesh

In my selection screen, there are 1 mandatory text input, 1 optional text input, 1 radiobutton group containing 2 radiobutton(ra and rb)(a user-command is binded to it).

I have binded different search help to the optional text input which depends on the selection of the radiobutton group.

i.e. radio button A -> search help 1

radio button B -> search help 2

But when I left the mandatory text input unfilled, and then try to change the radiobutton value from A to B. An error 'Make an entry to all required fields' is prompt. Later when I try to trigger the search help, search help 1 instead of search help 2 is prompted (but in the screen, radio button B is selected). When I set a breakdown to the routine 'AT SELECTION-SCREEN ON VALUE-REQUEST FOR text_input2', I found that the ra = 'X' even though radio button B is selected.

Does anyone know how to fix/get rid of this abnormal behaviour? Thanks a lot!

4 REPLIES 4
Read only

naimesh_patel
Active Contributor
0 Likes
804

Hello,

Make your mandatory filed as optional fileds means remove the obligatory attached to that field.

And in start-of-selection, put check on that field.

Start-of-selection.

if par1 is initial.

message s001 with 'please enter value in Par1'.

leave list-processing.

endif.

Regards,

Naimesh

Read only

0 Likes
803

But how about if I still wanna to set the field obligatory? Because the advantage of setting the field obligatory is to let the users know which field is mandatory during input. Thanks!

Read only

0 Likes
803

Hello,

Ya that is very much true. But the event for mandatory field checking triggers first. SO, IF you have at least on mandatory field and if you try to save even the VARIANT, system will prompt you the message.

SO, better to remove the obligaotry in this type of scenarioes or put the some default value.

Regards,

Naimesh

Read only

0 Likes
803

Try this,

Double click on your selection screen, and go to the layout in the screen painter. Now for the mandatory field, check the properties, change it from mandatory to recommended.

Save and activate.

Now handle the field validation in either AT selection screen or start of selection (preferrably at selection screen.

By checking the recommended button, you still get the mandatory icon on the screen, but the SAP standard check is removed.

Hope it helps.