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.
Showing results for 
Search instead for 
Did you mean: 

Problem with date field with Oracle external database

Former Member
0 Kudos

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.




Active Contributor
0 Kudos

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

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

0 Kudos


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.