12-05-2017 2:09 PM
Hi
I do have one peculiar requirement.
I need to check the language of that string, based on the logic I need to do other things.
could anybody let me know how to find the language of the string(note: it's not standard text, it's just a string)
best regards
Venu
12-05-2017 2:57 PM
You could look for CJK (Chinese, Japanese, Korean) characters in the string (4E00–9FEA?)
12-05-2017 3:33 PM
To break it down into the details. You would need to define a subroutine and call it from the Sapscript(you pass the string and change a var that indicates if its English or not, you can find examples online like so). In it, you check to see if it's English or not, I would use Regex .
Something like this (I'm not infront of SAP system, son this is an unchecked code regex is based on this😞
FIND REGEX ‘[^\x00-\x7F]+’ IN lv_string.
IF sy-subrc EQ 0.
"Not English
ELSE.
"English
ENDIF.