on 02-13-2008 9:15 AM
Hi Experts,
Is there any way to setup a validation to loop over qualified links and check if a specific field has a value (not being NULL)?
For example I have the following qualified links of qualified table Location Data for a Main Table Record (Material), with two fields Plant and Purchasing Group. Plant is Non-Qualifier and Purchasing Group is Qualifier and a lookup field into the table Purchasing Group.
Plant: 3100
Purchasing Group: NULL
Plant: 2100
Purchasing Group: 12
..
I want to set up a validation to loop over all qualified links and check wether Purchasing Group is set. If one of them is not set I want to display a warning on record save.
Anybody know if this is supported?
Thanks,
Ingo
Hi Ingo,
I am assuming the following requirement:
You want to throw a validation error when your qualifier(Purchasing Group) is NULL.
If this the case then we can have a validation as described below for the qualified link.
Step1. In Data Manager select Main Table as Current table and go to Validations Tab.
Step2. Create a validation expression by Using Function IS_NOT_NULL() and then Go to Fields drop down and select the Qualified Table --> Qualifier (Purchasing Group).
Suppose if your Qualified table is "Test" and Qualifier is "Purchasing Group" then the expression will look like IS_NOT_NULL(Test.Purchasing Group).
The other properties like "Error Message", "Automatic Execution" will vary as per your requirement
Try this out and let me know.
Thanks and Regards,
Sagar Sonje
Mark Helpful Answers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sagar,
Thanks for your suggestion!
I'm creating a validation with the expression
IS_NOT_NULL(Location.Purchasing Groups.[Record]) (it's a lookup table)
Assume you have two qualified links for the material. When you are validating with the expression above it just checks if the Purchasing Group of the first link is NOT NULL.
What I want to do is to check whether in any of all the qualified links Purchasing Group is not set.
Try it out.
Ingo
The solution that Sagar gave works only for versions PRIOR to MDM SP06 Patch 0. Here is a brief extract from the MDM SP06 Release notes.
Starting with MDM 5.5 SP6 Patch 0, the IS_NOT_NULL() function requires that all the
qualifier values for a qualified field have NULL values in order to return the value FALSE.
In the past, the value FALSE was returned if any of the qualifier values for a field had
NULL values. This change in behavior means that users can now use IS_NULL() to test
whether some of the qualifier values of a qualified field are NULL. They can also use
IS_NOT_NULL() to test whether all the qualifier values of a qualified field are NULL.
This document is available on [marketplace|https://websmp106.sap-ag.de/~sapidb/011000358700001124542007E]
Thanks
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.