cancel
Showing results for 
Search instead for 
Did you mean: 

SAP PI - Unparseable date: ""

Former Member
0 Kudos

Hello Experts,

I have some problem in PI mapping which I'm not able to solve.

I would like to convert a date using DateTran in PI mapping.

This date field could be empty in my incoming file.

In that was I have the error: "Unpareable date "".

I tried ot put default value using "MapwithDefault" but I still get the error.

How could I avoid this datetrans issue in my situation ?

Any help would be welcome

Thanks,

S.N

Accepted Solutions (1)

Accepted Solutions (1)

former_member184720
Active Contributor
0 Kudos

Just check for the length before the transform function.

i.e. If the length is > then do the transformation else send the blank value..

Former Member
0 Kudos

Hi Hareesh,

Thx for your help.

Length > to what ? My input date field size is  string 10.

I have to check if in input the size is > to zéro and then do transformation only ?

Else, map with blank ?

Is my understanding right ?

S.N


former_member184720
Active Contributor
0 Kudos

Yes.. Your understanding is right..

Instead of checking for >zero, you might want to check if the it is greater than >9(dd-mm-yyyy) based on your date format

Former Member
0 Kudos

It worked. ^^ !!

Thx a lot Hareesh for your valuable help.

S.N

Answers (1)

Answers (1)

Harish
Active Contributor
0 Kudos

Hi,

adding to Hareesh's reply, you can use the below logic before transformation

input --> map with default blank --> equals (blank) --> Not -> If without else --> map the input field and perform date transformation after then.

regards,

Harish

Former Member
0 Kudos

Hello Harish,

trying to understand logical flow

Sorry i'm new on PI.

Mapwithdefault input, with default  = blank.

Then, If input is not blank => Map with input field, Do the transformn, fill target field .

But in the case it is blank , how should i fill target field ?

Thx,

S.N


Harish
Active Contributor
0 Kudos

In case of Blank field you need to populate the default value. In this case you need to add the If then else in place of if without else and map the default value in else.

input --> map with default blank --> equals (blank) --> Not -> If with else --> map the input field and perform date transformation after then.


Else

map with default value.


regards,

Harish

Former Member
0 Kudos

It worked using conditions and control on input length.

Thx a lot Harish for the help.