Application Development 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: 

Syntax error when executing code, why?

0 Kudos
622

Hello community!

I am doing an exercise on internal tables, and when writing the following code I have a syntax error.

The syntax error that it generates is the following: "USING" expected, not "READ TABLE HOLIDAY WITH".

could someone guide me?

thanks!

TYPES:

BEGIN OF ty_reg,

id(3) type n,

text(20) type c,

END OF ty_reg.

DATA:

day TYPE STANDARD TABLE OF ty_reg WITH HEADER LINE,

holiday TYPE STANDARD TABLE OF ty_reg WITH HEADER LINE.

SORT: day BY id, holiday BY id.

LOOP AT day

READ TABLE holiday WITH KEY id = day-id INTO day BINARY SEARCH.

IF sy-subrc EQ 0.

day-text = holiday-text.

MODIFY day INDEX sy-tabix.

ENDIF.

ENDLOOP.

4 REPLIES 4

Ryan-Crosby
Active Contributor
543

You have a typo of holyday that should be holiday

Sandra_Rossi
Active Contributor
543

Pay attention around the place. Statements must all end with a dot.

abhawsinghka-1
Explorer
0 Kudos
543

Hi Juan,

Please add a dot after the statement 'LOOP AT day'

RichB
Participant
0 Kudos
543

No period after "Loop at day"