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

not able to switch between fields which are mandatory

Former Member
0 Likes
791

Hi guys,

i build a new dynpro with three elements:

- 1 ddlb

- 2 fields which are obligatory

depending on the choice of the ddlb entry one field should be activated and the other not. But if i change the choice in the ddlb without typing anything the the activated field, it is not possible to activate the other field. I tried to deactivate it in PAI but is is not working. The second thing which i recognized is the fields in my ddlb get lost. Any idea?

thx,

Ming

Hi guys,

i build a new dynpro with three elements:

- 1 ddlb

- 2 fields which are obligatory

depending on the choice of the ddlb entry one field should be activated and the other not. But if i change the choice in the ddlb without typing anything the the activated field, it is not possible to activate the other field. I tried to deactivate it in PAI but is is not working. The second thing which i recognized is the fields in my ddlb get lost. Any idea?

thx,

Ming

5 REPLIES 5
Read only

Former Member
0 Likes
728

Hello Wei,

Instead of putting the field types as 'Obligatory' or 'mandatory' in the screen properties,please check the same by coding

since we have mandatory fields to be toggled.

So depending on the choice use loop at screen and activate/deactivate the field..and then during the processing do the check as

if field is initial.

Message 'Please enter field' type 'S'.

Leave to list-processing.

endif.

Pls check and revert

Regard

Byju

Read only

Former Member
0 Likes
728

Hey Wei-Ming Tchay,

For Your requirment dont give manditory options. Write the code in PAI for displaying the error message ( If the field is initial ) and put the condition to execute the code when the user press execute button only.

Just follow the following suggations.

At selection-screen.

if sy-ucomm eq 'ONLI'.

wite actual condition here.

endif.

Note : The function code ONLI is for execute button.

Regards,

Mahi.

Read only

Former Member
0 Likes
728

Hey Wei-Ming Tchay,

For Your requirment dont give manditory options. Write the code in PAI for displaying the error message ( If the field is initial ) and put the condition to execute the code when the user press execute button only.

Just follow the following suggations.

At selection-screen.

if sy-ucomm eq 'ONLI'.

wite actual condition here.

endif.

Note : The function code ONLI is for execute button.

Regards,

Mahi.

Read only

0 Likes
728

thx, this was my first idea. I read the documentation from SAP and there is no other way to do it.

Read only

Former Member
0 Likes
728

no other way as described