‎2007 Mar 09 10:59 PM
Hi all,
Why does the system not give error when we write the program:
REPORT prog1.
WRITE "Hello World".
Should it now say " Use single quotes in place of double" or something like that?
Charles.
‎2007 Mar 10 9:46 AM
Hi Charles......
in ypur code u have written
REPORT prog1.
WRITE <b>"</b>Hello World".
so when ever the system encounters a double quote (") it treats the successive code as comment ,so your code is only
REPORT prog1.
WRITE
(Hello World". is treated as comment)
because the contents following the " character is interpreted as comment.
but every ABAP statement should end with a period.
so the system throws an error that the last statement is incomplete(Period missing).
if u write
WRITE 'Charles......'. "Hello World".
then <b>charles......</b> will be displayed and "Hello World". will be treated as comment.
Suresh......
‎2007 Mar 09 11:06 PM
Hi,
write it like this.
REPORT prog1.
WRITE:/ 'Hello World'.
Thanks
Pranati
Reward points if helpful
‎2007 Mar 09 11:09 PM
Hi
For me it is giving message
Last statement is not complete.(period missing.)
Thanks
Pranati
‎2007 Mar 10 8:54 AM
‎2007 Mar 10 9:04 AM
hi
the code that u have written gives an error even if u use 2 single quotes i.e.,
write: ''abc.''
it still gives an error complie the code again u will definitely get an error.
regards,
kiran kumar k
‎2007 Mar 10 9:07 AM
I guess there is nothing wrong it, have u checked the output?
did it give <b>'Hello World'</b> in single quotes...
It can treat the first and last Quotes("Hello World") as Syntax and the inner quotes as the output.. not sure ..guessing
‎2007 Mar 10 9:46 AM
Hi Charles......
in ypur code u have written
REPORT prog1.
WRITE <b>"</b>Hello World".
so when ever the system encounters a double quote (") it treats the successive code as comment ,so your code is only
REPORT prog1.
WRITE
(Hello World". is treated as comment)
because the contents following the " character is interpreted as comment.
but every ABAP statement should end with a period.
so the system throws an error that the last statement is incomplete(Period missing).
if u write
WRITE 'Charles......'. "Hello World".
then <b>charles......</b> will be displayed and "Hello World". will be treated as comment.
Suresh......
‎2007 Mar 10 9:52 AM
i am not sure what is your query ??
if you want to write hello world with quotes then
write : / '''Hello world'''.
other wise as per your coding it will give an error.
regards
shiba dutta