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

Error woth syntax-check

Former Member
0 Likes
991

Hii,

I am writing a program to demonstrate example of syntax-check.

This is my code

DATA: itab TYPE STANDARD TABLE OF string,

f(240),

g TYPE I,

h(72),

X(30).

APPEND 'HELLO WORLD.' TO ITAB.

SYNTAX-CHECK FOR itab MESSAGE f LINE g WORD h.

IF sy-subrc = 4.

MESSAGE I001.

ENDIF.

even though itab has the correct value HELLO WORLD.

Still sy-subrc is becoming 4 and giving error 'The last statement is not complete (period missing).'

I am not able to understand where the error is.Is there any example of syntax-check which I can refer.

2 REPLIES 2
Read only

Former Member
0 Likes
781
DATA: itab TYPE STANDARD TABLE OF string,
f(240),
g TYPE I,
h(72),
X(30).

APPEND 'HELLO WORLD' TO ITAB.  " Removed DOT from here..
SYNTAX-CHECK FOR itab MESSAGE f LINE g WORD h.

IF sy-subrc = 4.
MESSAGE I001.
ENDIF.
Read only

Former Member
0 Likes
781

Just press F1 on SYNTAX-CHECK and see the syntax. Error is there only.

You have to mention atleast one addition given in documentation.