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 in 4.6C

Former Member
0 Kudos
91

Hello All,

Consider the following piece of code.

FORM fill_itabs TABLES p_t_table

p_t_table_dummy.

  • Internal table to be used for dynamic where condition

DATA: lt_wherecond TYPE STANDARD TABLE OF ty_wherecond,

  • Structure for dynamic where condition

ls_wherecond TYPE ty_wherecond.

p_t_table_dummy[] = p_t_table[].

REFRESH lt_wherecond[].

CLEAR ls_wherecond.

ls_wherecond-data = 'kunnr = p_t_table_dummy-kunnr'.

APPEND ls_wherecond TO lt_wherecond.

SELECT kunnr INTO TABLE gt_kunnr

FROM kna1

FOR ALL ENTRIES IN p_t_table_dummy

WHERE (lt_wherecond).

ENDFORM.

This is working fine in Enterprise version, but when I am trying the same in Rel 4.6C, I am getting a syntax error at the Select statement which states,

"The WHERE condition does not refer to the FOR ALL ENTRIES table.-"

Could anyone please suggest how to avoid this error?

Regards

Indrajit

3 REPLIES 3

Former Member
0 Kudos
45

hi ,

just check once in where condition r u specified correctly i mean to say is it ls_wherecond /lt_wherecond .

0 Kudos
45

Hi Pattan,

I am sorry, I did not get you. Could you please be a bit more clear?

Indrajit

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
45

A dynamic WHERE clause used in a SELECT statement which uses FOR ALL ENTRIES may not be supported in 46c.

Regards,

Rich Heilman