cancel
Showing results for 
Search instead for 
Did you mean: 

concatenating the stings

Former Member
0 Kudos

Hi friends ,

This is a scenerio from idoc to file . I need to concatnate 3 fields from the same segment . I concatenate the fields and map to the target . What I found is in source payload the field combination mapping does not exist .

If I look at the fields say a,b,c , In this case a is initial , b has a value and c is initial .

If i concat b first , a and c in sequqnce then It works fine .

So , I tried to use a constant as firts field and did the concat but it fails .

Please suggest .

Regards

Chan

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Chan,

One simple solution for this problem is having a <b>MapWithDefault (with Empty string)</b> for every source field and the concatenating using Concat.

<b>

A -> MapWithDefault ->| |

B -> MapWithDefault ->| Concat | ->Target

C -> MapWithDefault ->| |</b>

Regards,

Ananth

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

Can you let us know what do you mean by Initial? Does it imply that the element has no value in the source or that the element has not occured in the source at all.

Also, when you say that the concatenetion fails, does it mply a mapping error or just that the concat is not giving result as expected?

Regards,

Bhavesh

Former Member
0 Kudos

Hi chan,

Yes, it happens like that (don't know why). It's better if you check that the field exists and has a value before you concatenate.

In case you have the field but is intial then you will get the concatenated value but if the field itself does not exist in the payload then you will not get a output.

Regards

Vijaya