on 05-20-2008 5:22 AM
Hi experts,
I am doing a file to file scenario in which i have to change the queue context is it possible? for simple context change we use ResultList.CC in advance UDF but what to do if we want to add a queue cahnge .To dig more deep into the problem i am explaining my scenario.
my output structure is <GROUP> .....(1 to unbounded)
<Records>....(1 to unbounded)
field1
field2
..
..
..
field13
In one group there can be many records and there will be multiple Groups.Suppose in my udf i want to add a queue change to add some field in other group then how will i achive it ? please guide me with ur inputs
Regards,
Saurabh
The solution i got by appending as many space as the suprressed values
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
function myudf(String a[], ResultList result, Container container)
{
for(int i=0;i<a.length;i++)
{
if(!a<i>.equals(""))
result.addValue(a<i>);
else
result.addContextChange();
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
context object is a generic term used to make a reference to message heder fileds in the XML file (also vth XPATH). Context of an element is nothing but just the level (with reference to its parent node) where the XML tag appears in the given XML document.
Check this links for more info:
/people/sravya.talanki2/blog/2005/08/16/message-mapping-simplified--part-i
http://help.sap.com/saphelp_nw2004s/helpdata/en/d9/718e40496f6f1de10000000a1550b0/content.htm
/people/stefan.grube/blog/2005/12/30/test-user-defined-functions-for-the-xi-graphical-mapping-tool-in-developer-studio
/people/harrison.holland5/blog/2006/12/08/mapping-context-changes-in-xi
http://help.sap.com/saphelp_nw2004s/helpdata/en/4b/a20c4cfea96b498b1e1af3f32f0670/frameset.htm
/people/venkataramanan.parameswaran/blog/2007/02/06/is-there-a-possibility-to-access-xi-standard-functions-in-user-defined-functions-yes
Reward points if this helps
Regards
Pragathi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mario,
Thanks for ur quick reply,but when i used it i got the error" non-static method addContextChange() cannot be referenced from a static context ResultList.addContextChange();".please tell me if i have to do any other setting to use this code.Secondly hope u understand my requirement i have to add context change to move to diffrent queue not simple context change.
Please feel free to ask any question if u have not understood clearly .
Regards,
Saueabh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Saurabh,
to force a context change in UDF, use:
ResultList.addContextChange();
See also
http://help.sap.com/saphelp_nw04/helpdata/en/b1/83a09f668320419dbe00a741e0fe6a/content.htm
Regards Mario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.