‎2007 Jul 11 11:20 AM
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
‎2007 Jul 11 1:59 PM
hi ,
just check once in where condition r u specified correctly i mean to say is it ls_wherecond /lt_wherecond .
‎2007 Jul 11 2:09 PM
Hi Pattan,
I am sorry, I did not get you. Could you please be a bit more clear?
Indrajit
‎2007 Jul 11 2:09 PM