cancel
Showing results for 
Search instead for 
Did you mean: 

Validation for Custom fields - MDG - BP data model (BP_SALES)

former_member206605
Active Contributor
0 Kudos

Hello All

Need guidance on the below issue we are facing -

1. Extended MDG data model ( Model - BP and entity - BP_SALES ) and there added a new custom

field 'Industry Code'. The domain of this field has a custom value table and created a search help

for this column of table.

2. Now after adding this filed in 'Sales area' UI of 'ERP customer' it is showing search help and

we can select data from there. But if user enters some wrong data ( not in custom table) and press enter then it is

not showing any error. But for existing standard fields like 'Account Assignment Group' it is

showing error as 'The Entered Value Is Not on the List of Valid Values'.

We want same feature for custom field also. Would like to know how to do that.

Kiran

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

If the values are available in the domain as fixed values or a check table, then the system will automatically enforce the existence check. Now, if you implement a search help without domain values, the existence check is not enforced. This is an excerpt from the documentation:

"The standard existence check does not take the search help into consideration. It checks only the contents of the check table or the fixed values of the domain of the data element. You can deactivate the standard existence check by setting the No Existence Check indicator."

You can enforce existence check in different ways:

  • Add fixed values/check table to the domain; this way, the search help provides a user with possible values and the domain values enforce the existence check
  • Enhance the feeder class to verify user input for the custom field.
  • Build a validation rule to make sure the value is valid.
former_member206605
Active Contributor
0 Kudos

Thanks Abdullah.

Let me check it and I will get back to you.

Kiran

0 Kudos

Abdullah,

For first option given by you

  • "Add fixed values/check table to the domain; this way, the search help provides a user with possible values and the domain values enforce the existence check"

If I add check table to domain ( without search help ) then in MDG UI no search help is shown i.e. no default search help from domain comes. ( If Fixed values is used then it works ). So seems it is required to use search help.

For point 3

  • "Build a validation rule to make sure the value is valid."

If I add validation rule to check from custom table then the message from BADI is always warning message ( though raise error mesage ). This is behaviour of MDG. So we cannot stop submssion.

For your second point

  • "Enhance the feeder class to verify user input for the custom field"

Can you please inform in which method of feeder class we can implement validation of custom filed and whether we can stop with error? SAP standard fileds are showing error message but cannot understand where this logic is implemented. Standard fields has check table in domain but it is adding search help in IF_FPM_GUIBB_FORM~GET_DEFINITION method of feeder class - CL_BS_CU_GUIBB_SALES_AREA.

markus_greutter
Participant
0 Kudos

Hello Anjan,

related to the validation rule:

BAdI USMD_RULE_SERVICE can be used. Method CHECK_ENTITY is called during each roundtrip. Exporting parameter ET_MESSAGE can be used to raise error messages.

Another way would be to create BRF+ rules using transaction USMD_RULE. There you can also create error messages.

Related to check  tables:

I had the same experience. No value help was shown. So we enhanced the feeder class and implemented an OVS help:

You need class implementing interface if_fpm_guibb_ovs. This could be the feeder itself or a specific one. This class must be registrated in the feeder. You make this in method GET_FIELD_DESCRIPTION (exporting parameter ev_ovs_classname.

Afterwards you just have to implement the phases you need. Check the corresponding FPM docu for this, eg. the FPM Cookbook.

I currently don't have acces to an MDG system but maybe you can put the field check into if_fpm_guibb_form~process_event for event IF_FPM_CONSTANTS=>GC_EVENT-CHECK.

Best regards,

Markus

former_member206605
Active Contributor
0 Kudos

Thanks Markus

We will get back to you once it is done.

Kiran / Anjan

Former Member
0 Kudos

hi Kiran

I have same requirement to override SAP standard domain value check message ''The Entered Value Is Not on the List of Valid Values' in floor plan manager of MDG.

If you have resolved issue please reply. Thank you.