Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

syntax error for ABAP

Former Member
0 Likes
1,248

Hi expert,

      when I copy a program from a book to SE38, I got following errors:

   (1) for statement : WRITE: /, / ‘Date & Time Information’

        error message: field 'Date' is unknown.

        resolution: remove single quotation and add single quotation again in se38.

      

        question: why copied single quotation is not recognized by ABAP?

  (2) for statement:

WRITE: /, / ‘Login Information',

/ 'Logical SAP System: ', 30 sy-sysid,

/ 'Client: ', 30 sy-mandt,

/ 'user_name: ', 30 sy-uname

     error message: literals taken up more than one line are not permitted.

     question: please tell how to fix this syntax error?

Many Thanks,

Andy

8 REPLIES 8
Read only

matt
Active Contributor
0 Likes
1,020

When you copy from an e-book, the single quotation mark may not be the actual quotation mark you get when you type ' in your editor. The abap editor does not recognise it as quotation mark, so you get the messages you are experiencing.

The solution for 2 is exactly the same as your solution for 1. Replace all the apparent quotes with real ones.

The problem is with the e-book, not the editor. If code is in a book, it should be copy pasteable.

Read only

Former Member
0 Likes
1,020

When code block or preformatted style is not used on source code snippets while writing the book, applications like MS Word tend to become smartypants.

The wikipedia link on various quotation marks would also be a good read.

Read only

Former Member
0 Likes
1,020

if you check single quote in MS word its different from SAP's single quote. So that's why you are getting first error.

And For second just try to write all the thing in a single line and use all quote by own not copied .

Read only

Former Member
0 Likes
1,020

This message was moderated.

Read only

0 Likes
1,020

Dear, we should not ask for points , its against the rules of SCN

Read only

former_member209120
Active Contributor
0 Likes
1,020

Hi

Single Quotation Difference - Copied from Ms Word to ABAP Editor and Direct typing in ABAP Editor looks like this

 

Both are not same, so you are getting error.

Read only

Former Member
0 Likes
1,020

Hi everybody,

        Appreciate very much. but I can't assign point for you, because all buttons for 'correct answer'/'help answer' disappear.

Read only

0 Likes
1,020

Its Okay.. Your problem got resolved that is our positive invisible point. we are happy with that