cancel
Showing results for 
Search instead for 
Did you mean: 

fill all required entry fields - One message for all required fields

Former Member
0 Kudos

Hi,

I've 10 required fields in my WDA. I am calling cl_wd_dynamic_tool=>check_mandatory_attr_on_view in WDMODIFYVIEW to validate the required fields. It displaying error message 'fill all required entry fields ' and high lightened the fields but the error message is multiple times. I need to display only one message because the empty fields are high lightened. It doesn't look good to see same message in more than one times.

May I know how to display only one message if more than one required fields not filled?

...Naddy

Accepted Solutions (1)

Accepted Solutions (1)

former_member197475
Active Contributor
0 Kudos

Hi Naddy,

Have you checked this 

Guess this will meet your requirement. It displays only one error message by checking on each context element.

BR,

RAM.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello,

Are there any enhancements for this requirements. Your valuable solutions are helpful.


Thanks.

Former Member
0 Kudos

I've decided to live with SAP Standard behaviour.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You could use the parameter DISPLAY_MESSAGES = ABAP_FALSE and then the utility method won't insert the error messages into the message manager. Instead they will only be returned via the MESSAGES exporting parameter. You can then do what you want with them. However each message entry can only be bound to one context element/attribute. Therefore if you only send one of the messages to the message manager, only one input field will be highlighted. You need all the messages to highlight all the incorrect fields.

You might consider placing your own Message Area UI Element on the screen:

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/04/b08841349e1909e10000000a155106/frameset.htm

This will override the standard Message Area. You can then set maxVisibleMessages and try to at least reduce the number of messages visible without scrolling.

Former Member
0 Kudos

Yes, Thomas!

I need all the messages to high lightened for all the incorrect fields but only one message. Iu2019ve seen those parameters (DISPLAY_MESSAGES = ABAP_FALSE). I donu2019t prefer to have u2018own message areau2019.

Shall I open OSS note for this so that they can include delete duplicate entries or something like? It does not make much sense to see multiple message for same issue. We are IT and we can tolerate but end user will get annoyed, you know.

u2026Naddy

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>Shall I open OSS note for this so that they can include delete duplicate entries or something like?

No. OSS is for bugs and what you describe is an enhancement request at best. You could perhaps instead put an entry into the Enhancement Request sticky thread here in the forum.

>It does not make much sense to see multiple message for same issue.

In your opinion perhaps, but this is how it is designed on purpose.

>We are IT and we can tolerate but end user will get annoyed, you know.

This is why you can create your own Message Area and control the number of visible messages. That way they won't see the additional messages.