Application Development 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: 

Problem in insert command in Native SQL

I066686
Participant
0 Kudos

Hi Experts,

I have to update one external oracle table by dbcon connection using function module.

I have made the connection but there is some problem in insert command while using variables instead of values

 
  EXEC SQL.
   insert into wfh_ood VALUES (1234567, '20-sep-2009', '21-sep-2009' , 05)
  ENDEXEC.

When i execute this query it is updating the table. If i use the variables instead of values

It is showing dump


EXEC SQL.
insert into wfh_ood VALUES (emp_no, start_date1, end_date1, status)
ENDEXEC.

in oracle table i have given all as Char except Emp_no as integer.

Experts help me in this issue.

with thanks and regards,

Kiruba.

2 REPLIES 2

Former Member
0 Kudos

Hi Kiruba,

In order to communicate with the rest of your program, you have to add ":" behind your variables like this :

EXEC SQL.
INSERT INTO wfh_ood VALUES (:emp_no, :start_date1, :end_date1, :status)
ENDEXEC.

(SQL code is not ABAP code...)

Best regards,

Samuel

I066686
Participant
0 Kudos

Thanks a lot.I could able to solve the problem.