Hi to all,
One of my object is to move data from SAP to native SQL in direct method.
I have created a database connection with username and password, while executing the program the connection obtained successfully.
Now what my problem is i am having data in my internal table ( local table called LT_FINAL ) , i looped the table and try to assign the values to SQL variables.
But its not taking the variable assignments.
Here the code what i write for your reff..
data kunnr type kna1-kunnr.
LOOP AT lt_final INTO lw_final.
kunnr = lw_final-kunnr .
DECLARE @v1 varchar(10);
SET @v1 = :KUNNR ; " this variable assignment not yet accepted
insert into [SAPIT].[DBO].[customer_details] ( KUNNR , name1 )
values ( @V1 , 'IUY') ;
CATCH cx_sy_native_sql_error INTO exc_ref.
error_text = exc_ref->get_text( ).
MESSAGE error_text TYPE 'E'.
help me to solve the issue.