cancel
Showing results for 
Search instead for 
Did you mean: 

How to highlight an UI Field which is mandatory

Former Member
0 Kudos

We have a requirement to highlight an UI field which is made mandatory through BADI / BRF rules.

I have implemented USMD_ACC_FLD_PROP_CUST_DEP_SET and tried to set the field attributes by using the attribute 'REQUIRED'

in the interface, but it is not highlighting the UI field which is made mandatory.


Is there any other way to highlight the mandatory UI fields?



Thanks in Advance



Accepted Solutions (1)

Accepted Solutions (1)

former_member219747
Participant
0 Kudos

Hi Madhu,

Go to the feeder class.

then to method- GET_DATA.

In this method in it's parameter list you have CT_FIELD_USAGE.

CT_FIELD_USAGE has line type FPMGB_S_FIELDUSAGE.

Now for the field you are looking to mandatory, set field mandatory of line type as 'X'.

Regards,

Mrityunjai

former_member219747
Participant
0 Kudos

Reference code-

In similar way set property mandatory to TRUE (X).

Regards,

Mrityunjai

Former Member
0 Kudos

Hi Mrityun,

Thanks for your guidance.

I tried the same and the UI field was marked mandatory with asterisk mark.

But it was not highlighted with red colour,As the standard would highlight the UI field.

Is there any way to highlight the mandatory UI field in red colour.

Screenshot for your reference

I wanna highlight the UI field in addition to Mandatory property.

Like the below screenshot (As in Std)

Warm Regards,

Madhu

former_member219747
Participant

Hi Madhu,

So you have marked your fields mandatory, but after this you will validate inputs to these fields, right?

For this implement badi USMD_RULE_SERVICE and you will get the expected behaviour.

Please check the below doc section 4 &5 for the same-

http://go.sap.com/documents/2015/07/d0d3a551-5b7c-0010-82c7-eda71af511fa.html

Regards,

Mrityunjai

Answers (0)