cancel
Showing results for 
Search instead for 
Did you mean: 

Single error message for Multiple mandatory fields

Former Member
0 Kudos

I have gone through the complete SDN with no luck.I have a requirement where I have to display only one message for all mandatory fields on the webdynpro view.

Please help me with your valuable suggestions.

Thanks,

Bhanu

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member184578
Active Contributor
0 Kudos

Hi,

If all of your input fields share the same context node, use the report_element_error_message( ) method which displays only one message for all the required fields.

you can check this doc for reference: http://scn.sap.com/docs/DOC-55951

Or you can simply use report_error_message( ) method if the fields are initial but the inputs will not be highlighted.

hope this helps,

Regards,

Kiran

Former Member
0 Kudos

Hello Kiran,

Thanks for your prompt reply. The above solution is restricted to one context element.

Say if I have multiple context elements and 'on save' , I have to validate all the mandatory fields in each context element; It throws multiple error messages (one for each context elements).

I am looking at one message for the complete context node.

Thanks,

Bhanu

former_member184578
Active Contributor
0 Kudos

Hi,

I have to validate all the mandatory fields in each context element; It throws multiple error messages (one for each context elements).

You meant context nodes? If not, No. It displays one Error message for all the attributes in Context Node.

If you have Multiple Context Nodes, then you need to call the report_element_error_message( ) for each context node and you get one error message per each node.

If yo want only one message for all the Nodes, its not possible. You can display one message for all nodes but as mentioned the Input fields will not be highlighted.

Regards,

Kiran

ramakrishnappa
Active Contributor
0 Kudos

Hi Bhanu,

There are no standard methods available to have a single message per context node i.e. single message for all instances of context elements inside the context node.

We can have one message per context element of context node but cannot have single message for many context elements.

You cannot highlight  the attributes of many context elements and link these to single message related to this.

If your requirement is to validate each row of a table  and identify the attributes and display error message?

The per line, you can have a message.

Regards,

Rama