Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Validation .. Help Please


I have a situation where there are 2 fields..

Cost center Type

Site Name

Site name should be null(no value init) if the cost center type is 01 or 04 or 05 or 06 or 07 or 08 or 12.

So, in detail ...there should be a warning or error message when there is a value in Site name when cost center type is 01/04...

Please be advised that we should not write blank in the site name, the validation should not allow the entry thats clearing of site name if condition is satisfied..

Did any one faced a similar situation, does anyone know how to code it in validation tab, i tried sevral options but ended up with out result..




Hi John,

Is your Cost centre Type field is a lookup field or a text?

As i feel it will be defently a lookup field, then your validation code will be

IF( HAS_ANY_VALUES(Cost centre type [Record], 
Cost Centre Type [01],
Cost Centre Type [04],
Cost Centre Type [05],
Cost Centre Type [06],
Cost Centre Type [07],
Cost Centre Type [08],
Cost Centre Type [12]),IS_NULL(Site Name))

This will help you in validating the Site name is blank or not for the above cost centre types.

Note: Please select your lookup values from the Lookps menu in the validation expression editor.

Hope the above code will solve your problem

Let us know if you have any questions.



Edited by: sowseel pasumarthi on Jun 7, 2011 10:53 AM

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question