Skip to Content
1
Jan 30, 2014 at 09:01 AM

SAP PI UDF to compare values in context if equal or different

1741 Views

Hi Team,

Good day!

I need to create a mapping to compare values in a context if they are the same or different.

If the values in a particular context are the same, the output should be true.

Otherwise, if the values in a particular context are different, it should result as false.

e.g.

Input are

-------------------------------

1300

1300

1300

---- context change ---
1322

1322

1300

---- context change ---

1311

1311

1300

--------------------------------

the output should be

-------------------------------

true

---- context change ---
false

---- context change ---

false

--------------------------------

Is there a way to implement this logic using SAP PI standard functions in message mapping?

or do I need to create a user defined function for such?

If user defined function is required, could help me with the java code (just the start of the code)?

Thanks,

Carlo