Skip to Content

Error in format date Oracle -> SAP

Hi Abapers,

I am facing the following issue: i have a date field in ORACLE database and in SAP a have the corresponding field as DocDate(8),

When i read the field to the internal table i receive 12-JUN-1. I get the same result even if the field in SAP is declared as DocDate TYPE date,


I tried something like


SELECT field1, field2, to_char(date1, 'YYYYMMDD') date1, field3, .... from table@remoteDB


and my questions are:


is this correct?


If yes how can avoid to write all the fields in the SQL statement: field1, field2, etc, etc getting the fields date correctly.

I have tables with many fields and it will become huge selects.


Thank you and best regards,


João Lages Fernandes



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Jul 18, 2014 at 06:12 PM

    Check function module convert to date

    RP_CALC_DATE_IN_INTERVAL

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 21, 2014 at 10:52 AM

    Hi Kabil,

    Thank you for your answers but i am afraid that solution des not apply to us.

    Any further solution?

    Thank you and best regards

    João Fernandes

    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.