‎2007 Jun 29 2:33 AM
Hi,everyone:
Now I need to insert 60 sap-tables into A table not in sap DB ,according to a formula.so i need to use dynamic native sql, but i find it can not work.
a test example as follow: just as native sql in sap server.
TABLES mara.
DATA: l_matnr LIKE mara-matnr.
DATA: string(1000).
CONCATENATE 'SELECT matnr FROM MARA INTO :L_MATNR WHERE MATNR ='
'''27101921000'''
INTO string
SEPARATED BY space.
EXEC SQL.
:STRING
ENDEXEC.
WRITE: l_matnr.
system return :
SQL error "-104" occurred when executing EXEC SQL.
I wonder the right use of dynamic native sql .
Message was edited by:
Leibnitz.Pan
‎2007 Jun 29 2:39 AM
‎2007 Jun 29 3:14 AM