cancel
Showing results for 
Search instead for 
Did you mean: 

Manipulating queue using UDF?

Former Member
0 Kudos

Input to createIf is

false
====
false
====
true
true
====
true
false
====

*====*  stands for context change.

& it returns a result which looks like :

SUPPRESS
=========
SUPPRESS
=========
[]
[]
=========
[]
SUPPRESS
=========

*====*  stands for context change.

Now I want to manipulate this resut queue in such a way that I get following output :

[]
[]
=========
[]
SUPPRESS
=========
SUPPRESS
=========
SUPPRESS
=========

*====*  stands for context change.

How do I hadnle this queue manipulation in message mapping. Does UDF(All values of queue) have anything to offer?

Regards

Soumen

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Will work with out UDF. Use 3 fucntion in the same sequence :

1. Node function ' remove context" 2. Node function "Sort" in decending order to make the true value 1st 3. Node function "Format by Example to insert back the context in the same fashion as per your requirment.

Cheers

Sunil.

Former Member
0 Kudos

Hi Soumen

Yes, through UDF you can access and perform actions on all values of the whole queue at once.

You have to define logic writing java code on your own.

It would probably be easier to deal with true and false values.

Regards,

Giuseppe

Former Member
0 Kudos

Would appreciate if you could give me the code. I failed to understand how to write the logic for the same.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

You can see this link for help

http://wiki.sdn.sap.com/wiki/display/XI/UDFExecutionType-ContextandQueue.

Former Member
0 Kudos

Hi Soumen

Can you explain a bit more in detail how contexts should be created?

You need all suppress at the end of the queue, no matter the input order?

In this case, you can simply perform sorting before creatif. It's easier to do that on true and false.

Regards,

Giuseppe

Former Member
0 Kudos

Hi,

Can you please let know your exact requirement,i.e, in what cases you want SUPRESS, context change and [ ].

Depending on the requirement, you can do this using the standard functions or you might need to write a UDF for it.

Regards