cancel
Showing results for 
Search instead for 
Did you mean: 

help needed in Mapping

Former Member
0 Kudos

Dear Experts,

     I have a source field(Date) from Ecc and a target field (Date) of Database .

    I have mapped the field using TO_DATE function to the target field and its working fine.

    now in some cases the source field will be  empty then how can i mapp the target field?

     if i have to use exist function then how can i use it ?

Regards,

Anirban Das

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Empty is different than if the element doesn´t exist, behaviour is different.

So if you don´t know if the element is empty or if the element exist, I recommend link source element to exist function and the result (will be a boolean) link with an If function:

  1. if the element exist next step, use another IF, compare  source with initial value or empty and if it is true, map current date. if the source is not empty use TO_DATE function as you use before.
  2. In the other side of if function (source element doesn´t exist) you can use current date with the right format.
Former Member
0 Kudos

HI Alberto,

  Thanks for replying.

  

   In my case element cen be empty.

   I have mapped like this:

now if the field is empty then how to mapp?

rcsegovia
Active Participant
0 Kudos

Hi,

Use mapWithDefault fuction with required default date.

Regards,

Roberto

ambrish_mishra
Active Contributor
0 Kudos

Anirban,

Try ---->       if ENDDA mapWithDefault EQ blank, map blank

                   else do your logic....

Ambrish

Former Member
0 Kudos

Hi Ambrish,

    I am getting runtime exception in mapping-cant cast to boolean

  

Please correct me

markangelo_dihiansan
Active Contributor
0 Kudos

Hello Anirban,

Use the String function equals and not the boolean equals.

Regards,

Mark