Skip to Content
0
Former Member
Jul 11, 2007 at 10:20 AM

Syntax error in 4.6C

44 Views

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