on 12-07-2005 3:32 PM
Hi Guys,
Iam working on an interface which has a requirement in which we need to suppress the segment in the target XML file of the IDOC Structure, Based on the data coming from a particular field in the Source IDOC iam doing a java lookup, if the condition fails in the lookup it should suppress the segment in the target XML file of the IDOC.The occurance of the particular segment in the IDOC is 0 to 999999.
Kindly throw some light on the procedure in which this can be acheived.
Any sort of suggestions regarding this are appreciated.
Thanks in Advance.
Praveen.
Hi Praveen,
I had a similiar problem some weeks ago. Please provide a boader view on the mapping and special the case on that the segements should be created or not. Do you need to compare some value or do some other checks?? How is your current way to create the segments... - this you will have to enhance!
It's not that easy but it's possible!
Regards
Matt
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
May be it help you:
(not so trivial solution)
Try to create Advanced User-Defined function (in mapping designer) with at least 2 parameters. (first - this segment, second - particular field) (check "Cache entire queue" option)
something like this:
public void Suppress(String[] a, String[] b, ResultList result, Container container){
String segment = a[0];
for(int i=0; i < b.length; i++) {
String data = b<i>;
if(data != null and data.equals('race conditions')) {
result.addValue(segment);
break;
}else {
//ignore.
//note: for empty segment - result.addSuppress()
}
}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
If you want to do into mapping itself then just go through this blog it will definetely solve your issue.
/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
use node function 6 as listed out in blog.
Just make sure that target segment ocurence is 0 to1 or 0 to unbounded.
If you want that elemet should not be present in output then you have to go for conditional reciever.
Cheers
Regards
Piyush
Hi Praveen,
You should be able to do this in your mapping.
In your mapping you can use ifwithelse to decide wheather to map the target segment or not based on condition check. Apart from segment you need to suppress individual fields inside the segment as well.
Regards
Anand
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
You can do this using conditional reciever.
But you have to use to services having to reciver channel having same parameters.
based on condition you select message mapping which is going to execute.
Cheers.
Regards
Piyush
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.