cancel
Showing results for 
Search instead for 
Did you mean: 

Validation to avoid special character in material & vendor no

Former Member
0 Kudos

Hi Experts,

We receive material & vendor creation request through E-portal. Once user send request on portal it gets recorde at its backend i.e MDM

Please guide me how to give validation in MDM to avoid special character '*' ',' '&' 'space' in material no. & incase of vendor code these same character & numeric code is not allowed.

Please guide in deatail step by step procedure.

Regards,

Gaurang

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Gaurang,

How to give validation in MDM to avoid special character '' ',' '&' 'space' in material no. & incase of vendor code these same character & numeric code is not allowed*

For this, you can write two validations one for Material number and other for Vendor Code and need to set both of these validations to Automatic Execution = Error

Expression for Material No as given below:

IF(FIND(Material No, "*") OR FIND(Material No, ",") OR FIND(Material No, "&") OR FIND(Material No, " ") , FALSE, TRUE)

Expression for Vendor Code as given below:

IF(FIND(Vendor Code, "*") OR FIND(Vendor Code, ",") OR FIND(Vendor Code, "&") OR FIND(Vendor Code, " ") , FALSE, TRUE)

So both above validations will fail if they find any Special character among Asterisk ("*"), Ampersand ("&"), Space (" ") and Comma (","). Kindly revert with result.

Regards,

Mandeep Saini

Former Member
0 Kudos

Hi Mandeep,

Your solution successfully worked in case of material no. Please guide me for vice versa validation condition. Like I want to allow only 3 sp. Character in matl. number i.e. Dot ( . ), dash(-), slash(/) No any other sp. character allowed. What should be validation in this case.

In case of vendor code we have validation HAS_ALL_CHARS(Vendor Number,u201D-u201D,u201DZu201D) by which it is only allowing for numeric & capital alfa-numeric number (u2018-u2019 allowing in code). Please guide me to give validation to stop numerical code.

Thanks & Regards,

Gaurang

Former Member
0 Kudos

Hi Gaurang,

Please guide me to give validation to stop numerical code.

HAS_ALL_CHARS(Vendor Code, "A", "z") OR FIND(Vendor Code, "-")

Above Validation allows only Characters no special chars except "-" and also no numeric numbers.

Regards,

Mandeep Saini

Answers (2)

Answers (2)

Former Member
0 Kudos

Validation to avoid special character in material & vendor no

former_member207367
Active Participant
0 Kudos

Hi Gaurang,

Material :

FIND(Material Number,'&','*') - Special characters Validation

IF(FIND(Material Number,","," ") - Validation on "," and "Space"

Vendor:

FIND(Vendor,'&','*') - Special characters Validation

IF(FIND(Material Number,","," ") - Validation on "," and "Space"

IF(HAS_ANY_CHARS(Vendor,0,9),FALSE,TRUE) - Validation for restricting Numeric Codes

Hope this helps you, and lets see if any workaround from experts.

Thanks

Sowseel

Edited by: sowseel pasumarthi on Jan 3, 2011 6:53 AM