Skip to Content

Problem in insert command in Native SQL

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 22, 2009 at 12:26 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 23, 2009 at 05:33 AM

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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.