cancel
Showing results for 
Search instead for 
Did you mean: 

ESS personal data iVIew

Former Member
0 Kudos

Hi Gurus,

This is really need very quickly and immediate reward will be given.

My requirement is I want to make Title dropdown box field as Mandatory field on ESS personal data iVIew.

When user click on Review button if the user forgot to choose Mr, Ms, MRs, Jr,.....from the Title drop down list , the screen should not allow him to continue.

If he choose any one of them from the list it should all him to go to the next screen.

Please help me how to write the code to achieve this.

Regards

Peter

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

Setting the attribute of field as required will only add a * mark in front of it.

go to Web Dynpro > Web Dynpro Components > VcPerAddressXXDetail > Views > Detail View ... and double click on Detail View

In the Layout ... Select the required field that you want to make it as mandatory and in the properties(below) of that particular field,

set the STATE Property as required.

This will provide a * mark in red color in the detail screen.

You can also go through the links

1. <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/a%20simple%20input%20form%20with%20message%20and%20error%20service%20support.pdf">Link</a>

2.

Regards

Abhijith YS

Former Member
0 Kudos

Abijith,

Many thanks it is really helpful to start with some thing. But i did exactly what you suggested and the changes are not working for me.

The Title field will not have any effect, some reason the state required is not working for this specific UIElement. I am not sure why this changes are not reflecting. can we right code manully under that specific event, please advice?

regards

Peter.

former_member751941
Active Contributor
0 Kudos

Hi peter,

Follow the steps.

1> Create a Simple type(Say “s_type”)in local Dictionary

2> Go to the Enumeration tab. Add New Value and Description.

Value | Description

A | Mr

B | Ms

C | MRs

D | Jr

3> Save Meta Data.

4> Create a context attribute (salutation) in view and associate the created simple type s_type with it.

5> In implementation write

if(wdContext.currentContextElement().getSalutation() == null || wdContext.currentContextElement().getSalutation() .equals(""))

{

wdComponentAPI.getMessageManager().reportException("Please Enter Salutaion.",true);

}

http://help.sap.com/saphelp_nw04/helpdata/en/4a/8613e41629344194e4f40393740d51/frameset.htm

Regards,

Mithu