‎2008 Dec 19 6:38 AM
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.
‎2008 Dec 19 6:45 AM
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.
‎2008 Dec 19 6:47 AM
Just press F1 on SYNTAX-CHECK and see the syntax. Error is there only.
You have to mention atleast one addition given in documentation.