Skip to Content
avatar image
Former Member

BODS Conversion failed when converting date and/or time from character string

Hi Experts,

I am facing error while executing BODS Job. I Have SAP BO Data Service 4.2 SP9 is installed. My Workflow contains Abap Dataflow followed by Regular dataflow.

In ABAP dataflow Source is SAP ECC, in This ABAP DF target is .dat file.

A regular Datadlow is connected in that. My final target is SQL Server 2008.

Error is for one field. At ECC source my one field is "Time" data type. I am loading that in SQL server which is also having "Time" data type. But this mapping Throws an error.

but when i am passing null to that field it executes successfully.

Snapshot of error is attached.

Please give me valid input for solving error.


capture.jpg (84.4 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Feb 14, 2018 at 08:44 AM

    Hi Dirk,

    Thanks for your Reply.

    DS data type of that field is "Time".

    I have checked to_date function job executes with throwing warning.

    Warning = (14.2) 02-14-18 12:11:12 (W) (22404:29332) RUN-053006: |Data flow DF_Reservation_F|Transform Rename Cannot convert string <08:30:22> to date using format string <HH:MI:SS>.

    I have used below Expressions for that Field.

    1. cast(ABA_ReservationFact.BDZTP,'TIME') 2. to_date(ABA_ReservationFact.BDZTP,'HH:MI:SS') 3. cast(to_date(ABA_ReservationFact.BDZTP,'HH:MI:SS'),'TIME') 4. to_date(ABA_ReservationFact.BDZTP,'HH:MI:SS.ff')

    All above given Expressions are not working.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Arun Sasi

      Hi Arun,

      Thanks For Your reply.

      Yes, as you said, time form in SAP ECC its Time(6). But DS implicitly convert this into 8 characters i.e. (12:21:00).

      But the issue was different. Input data from SAP ECC was wrong. For some records it is passing "24:00:00" which is not allowed in DS. So I used "ifthenelse" as solution, replaced "24:00:00" as "00:00:00".

      Thanks again,

      Swapnil Thorat

  • Feb 14, 2018 at 08:18 AM

    What's the DS data type of that field? If it's varchar, its content is most probably not in the right format for an implicit conversion to the MS SQL Server time datatype. Us to_date built-in function with the right format parameter.

    Add comment
    10|10000 characters needed characters exceeded