2007 Apr 18 10:23 AM
i have req:: a field is there its a charactor field:::
my req is that the user should enter 1234... or abcd... but he should not
write ''' in the field examp
1> ab''12
2> ''''
3> 12''3
for all other special charactor i can able to control but for ' i could
not able to do any thing...
so how can i Do that
2007 Apr 18 10:37 AM
Use the Quotes sysmbol that you see below the escape key in the key board.
if v_staring ca `'`.
endif.
Use the Quotes sysmbol that you see below the escape key in the key board.
if v_staring ca `'`.
endif.
2007 Apr 18 10:25 AM
Hi,
You can use the string comparison pattersn like
CP or CS or CA for this
regards,
Anji
2007 Apr 18 10:29 AM
Hi Anji/ Navaneeth,
I tried that way...its saying ' text literal ' ' ' is longer than 255 characters'.
Regards,
Sujatha.
2007 Apr 18 10:31 AM
Hi,
I thin u shud write :
Write : 'Text Literal ''''(4 quotes) is longer than 255 characters'.
Hope this shud solve ur issue.
Regards,
Himanshu
2007 Apr 18 10:26 AM
hi,
declare variable:
constants: c_quote type c value ''''.
then check string using ca, cs.
regards,
Navneeth.K
2007 Apr 18 10:30 AM
Hi Sujatha,
Use CA string operation to check for the characters in a string.
DATA V_STRING TYPE STRING.
IF V_STRING CA '"''.
WRITE:/ 'STRING CONTAINS SINGLE QUOTES'.
ENDIF.
Thanks,
Vinay
2007 Apr 18 10:35 AM
Hi Sujatha,
just put this code and check
data: v_str type string.
constants: c_quote type c value ''''.
concatenate 'Navneeth' c_quote 'SAP' into v_str.
if v_str ca c_quote.
write 'Successfull'.
endif.
hope it solves your problem
regards,
Navneeth.K
2007 Apr 18 10:37 AM
Use the Quotes sysmbol that you see below the escape key in the key board.
if v_staring ca `'`.
endif.
2007 Apr 18 10:56 AM
Hi Sujatha,
Did the above code sample solve your purpose.
regards,
Navneeth.K
2007 Apr 18 11:07 AM
Hi,
Ya,Ravikanth's post has solved my issue.
Anyway thanks to u all for ur responses.
Regards,
Sujatha.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |