Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

dynamic native sql error

Former Member
0 Likes
443

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

2 REPLIES 2
Read only

Former Member
0 Likes
413

It's Seems no use for me

thanks a lot.