cancel
Showing results for 
Search instead for 
Did you mean: 

MDG-C Dynamically make custom field mandatory not working

0 Kudos

Hi,

We have custom fields in KNA1 table and added to the BP data model to bring them into Customer governance. The custom fields are marked mandatory/optional using Z table not the V_T077D.  Since its dynamic nature, extended the customer GENIL class CL_BS_GENIL_CUSTOMER - method GET_ATTRIBUTES_PROPERTIES to mark the custom fields mandatory on UI. Custom fields in Customer UI, are marked mandatory, however, if I don't enter any value in the custom field, and hit the check, system returns successful instead of asking the user to enter value in Mandatory field. Is am missing something. and possible F4 list does not have space value, all are with values. Your help is highly appreciated.

Field marked Mandatory:

Check returns successful:

Thanks, Rajiv

Accepted Solutions (1)

Accepted Solutions (1)

michael_theis
Active Contributor
0 Kudos

Hi Rajiv,

mentioned method sets only genIL attribute properties. Those are used for display options in the UI only. They do NOT include an actual check whether you've entered something or not!

Options:

1) You could use the generic web dynpro checks (see UIBB customizing, there's a flag for "check mandatory fields").

2) Implement specific validation as described by SAP note 2308424.

Recommendation:

Go for 2) although this means more effort. The benefit surely is that 2) is always executed in all places that shall check BP data (meaning: not only in SOM UI, but in DIF, data replication, and so on).

Cheers

Michael

Answers (1)

Answers (1)

former_member201266
Contributor
0 Kudos

Hi Rajiv,

It depends upon where these fields are added in MDG. If there are part of SU01 then they should be mandatory by default.

But in this case if think they are part of SU04 hence you have to change atleast one field value for that entity to be part of Validations. Its MDG default functionality is that only SU01 validations are there by default and SU04 will be called only upon changes to that entity.

The other way to achieve it through ACROSS Entity BADI.

And F4 values are to do with Data element or check table assigned, please check them once.

Thanks,

Cherry.