cancel
Showing results for 
Search instead for 
Did you mean: 

Validation Expression for Checking Inverted commas

Former Member
0 Kudos

Hi Experts,

Can you please give me validation expression for checking inverted commas in the data.

Regards,

Rimpy Kaul

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Rimpy,

Please let me know if you are asking about writing expression in MDM Data Manager to check if inverted commas appear in the field value or not.

So you can write the expression to check if inverted comma exist in the value for field(say field name is Description) as follows:

HAS_ANY_CHARS(Description,34,34)

  • Description field can be selected from the list of fields being shown in MDM system.

  • This will return value 1 in case above expression is true and will return 0 in case above expression is false.

  • You can use above expression inside If or if then else functions in MDM and use it appropriately.

This should solve your problem. Please update this thread accordingly.

Thanks and Regards,

Ankush

Former Member
0 Kudos

Thanks Ankush,

Incorporated the validation expression. It's working fine.

Could you please share some document explaining the syntax of the functions used in Validations

Regards,

Rimpy Kaul

Former Member
0 Kudos

Hi Rimpy,

You can check the syntax in Data Manager Reference Guide.

This will explain in detail about all the variations you can use in the function.

You can see function name in Data Manager expression editor window and then search the same in reference guide.

Thanks and Regards,

Ankush

jj
Active Contributor
0 Kudos

 

DATA :

string(30) VALUE 'This " is a little sentence.'.

WRITE string.
SEARCH string FOR '"'.
WRITE: / 'X', sy-subrc UNDER 'SY-SUBRC',
sy
-fdpos UNDER 'SY-FDPOS' .

REPLACE ALL OCCURRENCES OF '"' IN string WITH '$'.
WRITE string.

Try something like this. Search or Replace option

Former Member
0 Kudos

Hi John,

I need the expression to be written in validation expression under Validation Tab in SAP MDM Data manager.

Thanks,

Rimpy Kaul

shanthi_kumar
Active Participant
0 Kudos

Hello Rimpy,

Copy the inverted commas from somewhere and place it in the validation Has any Char. It will work. Post us with your finidings.

Regards,

Thamizharasi N