‎2007 Nov 26 9:16 AM
Hi
Why we need to put two quotes ' ' to get a single displayed quote.
‎2007 Nov 26 9:41 AM
Hi Jeyashree,
Generally single quote is used to mark start and end of literal. If you want to display single quote in a string then it is considered as end of the literal and gives you error too. To avoid this ambiguity, we convey the system as double quotes followed by a single a quote is a single quote in a literal.
Thanks,
Vinay
‎2007 Nov 26 9:18 AM
hi
whatever u give in double quotes, it ll come as like as it is. that is considered as a string.
regards
karthik
‎2007 Nov 26 9:20 AM
OTHERWISE ABAP WILL TREAT THAT STRING IS END WITH THAT....
FOR EXAMPLE....
'JEYA'SHREE'.
IN THE ABOVE STRING...ABAP TREAT THAT STRING ALREADY ENDED WITH 'JEYA'....
TO AVOID THIS....'JEYA''SHREE'.
‎2007 Nov 26 9:38 AM
Try to execute
write : ''''.
we will get a single quote as an output.
‎2007 Nov 26 9:21 AM
string funcation used for quotes.
string literal,char num. all give quotes ' '
write 'hello' .-> hard code.
‎2007 Nov 26 9:23 AM
HI
IN ABAP LANGUAGE '' SINGLE QUOTE MEANS IT WILL DISPLAY A STRING SAME AS IN C WE USE " "
IF YOU WRITE ' ' THEN ABAP TREATS THAT TOTAL CHARACTERS INTO THE STRING FORMAT
IF YOU DON'T GIVE 2 AND IF YOU GIVE OBNLY ONE QUOTE THEN ABAP TREATS IT AS AN ERROR MESSAGE
‎2007 Nov 26 9:41 AM
Hi Jeyashree,
Generally single quote is used to mark start and end of literal. If you want to display single quote in a string then it is considered as end of the literal and gives you error too. To avoid this ambiguity, we convey the system as double quotes followed by a single a quote is a single quote in a literal.
Thanks,
Vinay