Skip to Content
author's profile photo Former Member
Former Member

Problem with date field with Oracle external database

Hi all,

i need to insert rows into Oracle external database. It's work fine with Native SQL instruction but i have a problem with date fields, the system goes back me an error.

My Oracle database is created like this :


ENT_No number(8) NOT NULL,

ENT_DenSoc varchar(80) NOT NULL,

TET_Code char(16) NOT NULL,

ENT_CodeSiret varchar(14) NULL,

ADR_Rue varchar(50) NULL,

ADR_ComplRue varchar(50) NULL,

ADR_Cedex varchar(10) NULL,

ADR_CodePostal varchar(16) NULL,

ADR_Ville varchar(32) NULL,

ADR_CodePays char(32) NOT NULL,

ENT_DtCessation date NULL,

GRE_No number(6) NULL,

DT_Mod date NOT NULL,

constraint PK_ENT_ENTITE primary key (ENT_No)


In my ABAP code, if i fill the field 'ENT_DtCessation4 with the value 'NULL', the system return the following error :

"con=1(SAPEXTST.WORLD): ORA-01858: a non-numeric

character was found where a numeric was expected"

I don't know why.

Thansk for your help.



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Nov 15, 2015 at 08:10 PM

    From error it seems that system is interpreting NULL as a string.

    You can try passing NULL without quotes(' ') OR pass '00000000'(in quotes).

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member


      thanks for your answer, unfortunately it don't work.

      I use the query :

      INSERT INTO ENT_ENTITE values (?,?,?,?,?,?,?,?,?,?,to_date(?,''yyyymmdd''),?,to_date(?,''yyyymmdd''))'.

      If if pass the value :

      ls_oracle_partner-ent_dtcessation = sy-datum.

      It work fine.

      If if pass the value :

      ls_oracle_partner-ent_dtcessation = 'NULL'.

      It don't work.

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.