‎2006 Nov 28 1:34 PM
Is there something wrong with this EXEC SQL Statement...
EXEC SQL PERFORMING sr_STORE_data.
select *
into :<FS_wt> @:c_db
from (lwt_source-PS_STRUCT)
where sb_effdt = :p_date
ENDEXEC.
‎2006 Nov 28 1:59 PM
Try this way...
EXEC SQL.
OPEN C1 FOR
SELECT A,B,C,D
FROM SAPTEST.XX1
ENDEXEC.
‎2006 Nov 28 2:31 PM
hi,
Check whether the table name can be passed dynamically by specifying it in parantheses.
check this sample code, it might help you,
**** A field-symbol to access that work area
assign NEW_LINE->* to <wa_it>.
*PERFORMING loop using <wa_it> changing itab_test
EXEC SQL.
open c for
SELECT
HOB_KH_IK as Ik, count(*) as ANZAHL,
AVG(ENTL_DATUM - HOB_AUFN_DAT) AS VWD,
SUM(KOSTEN_GESAMT/100) as KOSTEN
FROM BUSI.BW02_K_FALL
GROUP BY HOB_KH_IK
ENDEXEC.
DO.
EXEC SQL.
fetch next c into :<wa_it>
ENDEXEC.
IF sy-subrc <> 0.
EXIT.
ENDIF.
append <wa_it> to itab_test.
ENDDO.
EXEC SQL.
close c
ENDEXEC.
write: / 'OK ?'.
Regards,
Sailaja.
Message was edited by:
Sailaja Nalam
‎2006 Nov 28 2:35 PM
@: not allowed after INTO, use : before a variable.
Dynamic table assignment not allowd, use table name after FROM instead of a variable.
Regards
Sridhar