cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping issue

former_member182412
Active Contributor
0 Kudos

Hi There,

i am doing IDOC to File scenario, there is "X" field occuurences 0 to 1 in IDOC, if X doesn't have value i must concat A and B value, if X have value i must Concat A, B and X value, this requirement how can i do the mapping which function must i use.

If X doesn't have value with in the idoc that field is not even existing.

Your help is appreciated.

Thanks

Praveen.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Simply make use of exists function.

If X exists then concat A,B & X else concat A & B and map it to target.

And another way is using mapByDefault function.

X->mapByDefault(blank constant)->Concat to A&B ->target.

Here, even if X doesn't come you wont get an error.

Regards

Soumen...

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Praveen,

My suggestion is you can use the function Exist function and if then else fuction required

X(exists function)-- A and B values are concat and again conact function(in this case X,A and B are concated)---

X(Not exists)-- A and B values are concat.

Thanks

Sateesh

Edited by: sateesh kumar .N on Jan 25, 2010 11:41 AM

Edited by: sateesh kumar .N on Jan 25, 2010 12:51 PM

Former Member
0 Kudos

Hi,

this requirement how can i do the mapping which function must i use.

You have to use exists and concat function.

Use exists to check the existance for "X".

concat(A and B) ..

then concat(above result, C)...

Use mapWithDefault before "C" to ensure that a blank value will be concated to A and B, when no value exists for "X".

Regards,

Swetha.

Shabarish_Nair
Active Contributor
0 Kudos

use the EXISTS function to check if the X field has come as part of the IDoc itself

else to check if X field is empty you can use the IF function and check for empty field using an empty constant function