on 10-03-2008 5:12 AM
Hi,
I have a main table called Business Partner. There is a field called Address which is
Lookup[Qualified Flat](multi-valued). Now, the lookup table is Addresses.
The Addresses table contains a field named Phone No. which is Text with 50. It is neither Unique field nor Display field.
Now, there is a validation which is being used as Phone No. validation in Business Partner[main table].
The logic is:
IF(IS_NOT_NULL(Address.Phone Number), LEFT(Address.Phone Number, 1) < > "" AND IF(FIND(Address.Phone Number, "-")>0, FIND(MID(Address.Phone Number, FIND(Address.Phone Number, "-")1, LEN(Address.Phone Number)), "-")=0,TRUE),TRUE)
Now, according to my understanding it means:
Phone Number is not null and if there is a phone number liked 1-45678900, then is valid phone number but also if Phone Number is not null then it is valid.
Please co-relate my understanding.
I need to know the meaning of all the Functions used in Validation Expression.
Just tell me the grammer of all functions used in SAP MDM Validation.
Regards
Kaushik Banerjee
Edited by: Kaushik Banerjee on Oct 3, 2008 6:21 AM
Edited by: Kaushik Banerjee on Oct 3, 2008 6:30 AM
Hi Kaushik,
I tried to understand the logic
IF(IS_NOT_NULL(Address.Phone Number), LEFT(Address.Phone Number, 1) ""+
It says that phone number should start with "+" sign
IF(FIND(Address.Phone Number, "-")>0, FIND(MID(Address.Phone Number, FIND(Address.Phone Number, "-")1, LEN(Address.Phone Number)), "-")=0,TRUE),TRUE)+
It first check whether there is "-" present in the value and if yes then after the "-" rest of the value should not contain and more "-" sign.
In summary it says that Phone number is Valid only:
1. It is not null
2. It starts with "+"
3. It should contain only one "-"
Regards,
Jitesh Talreja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kaushik,
Lets break the expression
1. IF(IS_NOT_NULL(Address.Phone Number) - Checks whether pnone number is null or not
2. LEFT(Address.Phone Number, 1) "+" - If phone number is not null then whether first character is + AND
3. IF(FIND(Address.Phone Number, "-")>0 {if - is present or not}, FIND(MID(Address.Phone Number, FIND(Address.Phone Number, "-")+1, LEN(Address.Phone Number)), "-")=0,TRUE) {After "-" with the help of MID it is checking from the character next to "-" till the end whether there is another "-"}
Example : +91200-123456789
IF(IS_NOT_NULL(Address.Phone Number) , LEFT(Address.Phone Number, 1) "" AND IF(FIND(Address.Phone Number, "-")>0 {TRUE and the value would be 7} , FIND(MID(Address.Phone Number, FIND(Address.Phone Number, "-")1{value =8} , LEN(Address.Phone Number)) {value=16} , "-")=0,TRUE),TRUE)
Regards,
Jitesh Talreja
Edited by: Jitesh Talreja on Oct 3, 2008 12:58 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
What I understood from the Expression:
IF(IS_NOT_NULL(Address.Phone Number), LEFT(Address.Phone Number, 1)" <> "+"
means Phone Number should not be null and
1st character of Address.Phone Number;
Checks that two fields or values are not equal to "+"
But you are right.
Let me check in detail and then I will give you the proper answer.
I will update the thread later.
Regards
Kaushik Banerjee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I got the link.
I will now see this logic.
http://help.sap.com/saphelp_mdm550/helpdata/en/43/e0615f82b40a2ee10000000a11466f/frameset.htm
Regards
Kaushik Banerjee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.