cancel
Showing results for 
Search instead for 
Did you mean: 

Need Mapping Logic

Former Member
0 Kudos

I have one mapping requirment as follows.

From Source Structure :

There are Fields Payment Type , Agg Rev Share & carrierREV sHARE.

Here i need to write logic for :

If Payment Type = CC , Agg Rev share = 0 & carrierREV sHARE = 0

then pass the value to target else i need to throw expection when .Agg Rev share & carrierREV sHARE values are greater than 0.

Please guide me friends

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi renu,

You need to use ifThenElse funtcion twice.

1st ifThenElse:

Concat Agg Rev Share & carrierREV sHARE and check whether they are greater than constant 00.

Output of the greater will be given to the if part of function.

For Then part, you have to use 2nd ifThenElse and for else part keep the UDF you have for exception.

2ndifThenElse:

First compare Payment Type against constant CC (use equalS function) and output of this is given to if part of ifThenElse.

Then part will be the actual value of source you want to give to target and else part will be the UDF of exception.

-Supriya.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

u can go for UDF.

Chk this:

/people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping

Thanks

Amit

Former Member
0 Kudos

I have a udf. I need logic only for IF - ELSE .

How to bring implement this IF Logic for both Agg REv share and Carrier rev share when its value is greater than 0.

Former Member
0 Kudos

Hi Renu,

You can first concat the values of Agg REv share and Carrier Rev.

After concatenation, you can compare that value against constant 00 and check whether its greater or not.

The output of the greater can be used as per your requirement .

-Supriya.

Former Member
0 Kudos

Could you please give the flow diagram ...

Former Member
0 Kudos

Hi,

put var1 and var2 type int.

execution type: all values of a context

if (var1[0]>0 && var2[0]>0)

throw exception (put ur logic of throwing exception)

else

result.addValue("");

Thanks

Amit

Former Member
0 Kudos

My expection logic will send email hence i am not able to merge my code with your logic.

Kindly send the flow diagram for If - Else

Former Member
0 Kudos

Hi,

Field1

-


equalS(Text)

Constant(0)

-


And -


IfThenElse----


Target

Field2

-


equlaS(Text)

Constant(0)

Mapping of "then" and "else":

do ur normal logic----


Then

UDF(throw exception)----


else

Thanks

Amit