01-25-2007 6:29 AM
Hi,
I have written the following query
SELECT (list) FROM (t_condtables-tabname)
INTO CORRESPONDING FIELDS OF TABLE <dyn_table>
FOR ALL ENTRIES IN itab_kschl
WHERE kschl = itab_kschl-kschl AND
(lt_table).
when I passing the dyanamic where clause as folows
lt_table means ( KAPPL = ' V ' and vkorg in s_vkorg and kschl in s_kschl )
I am getting the error in "IN" clause , Please suggest how to pass "IN" clause in the above senario as the sap understand IN clause as Fieldname in (o1,o2,o3) like but I have to pass as select option (Select options I have already declared)
thanks
01-25-2007 6:57 AM
Hi,
You cannot pass variables in the dynamic IN class. They have to be values.
Change like:
SELECT (list) FROM (t_condtables-tabname)
INTO CORRESPONDING FIELDS OF TABLE <dyn_table>
FOR ALL ENTRIES IN itab_kschl
WHERE kschl = itab_kschl-kschl AND
(lt_table) and
and vkorg in s_vkorg and kschl in s_kschl .
where (lt_table) = ( KAPPL = 'V' ).
Regards
Subramanian
01-25-2007 6:57 AM
Hi,
You cannot pass variables in the dynamic IN class. They have to be values.
Change like:
SELECT (list) FROM (t_condtables-tabname)
INTO CORRESPONDING FIELDS OF TABLE <dyn_table>
FOR ALL ENTRIES IN itab_kschl
WHERE kschl = itab_kschl-kschl AND
(lt_table) and
and vkorg in s_vkorg and kschl in s_kschl .
where (lt_table) = ( KAPPL = 'V' ).
Regards
Subramanian
01-25-2007 7:44 AM
Hi Bobby,
Try and use the following code.
SELECT (list) FROM (t_condtables-tabname)
INTO CORRESPONDING FIELDS OF TABLE <dyn_table>
FOR ALL ENTRIES IN itab_kschl
WHERE kschl = itab_kschl-kschl
AND KAPPL = ' V '
AND vkorg IN s_vkorg
AND kschl in s_kschl.
Regards,
Subhrangsu