on 11-23-2010 1:55 AM
Hi
I have the following piece of code written to have multiple occurances of a target segment A based on a value of LFIMG of E1EDL24 source and also block the occurance if POSNR = 900001
LFIMG ->UDF---> Segment A
and
POSNR = 9000001 block segment A
UDF:
int counter = Integer.parseInt(var1[0]);
for(int i=0; i<counter; i++)
{
result.addValue(" ");
}
The problem or an issue is after the mapping is done it puts SUPPRESS at the end after all the contexts, so if LFIMG is 2, 3, 2 respectively in differnt Item segments. THe SUPPRESS is the result of blocking the segment for POSNR= 900001
[]
[]
CC
[]
[]
[]
CC
[]
[]
CC
SUPPRESS
My task is to use the output of this segment occurance in UseOneAsMany function to make sure the field in this segment has same number of occurances as parent segment(segment A), but the last SUPPRESS is considered by UseOneAsMany as another context , and it says context of first and second queue doesnt match in the error.
So, is there anyway to remove the SUPPRESS from the queue.
> So, is there anyway to remove the SUPPRESS from the queue.
I don't know any standard way.
It can be done with another UDF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kalyan,
Try with the below UDF:
public void RemoveSuppress(String[] a,ResultList result,Container container){
for (int i=0; i<a.length;i++)
{
if (!a.equalsIgnoreCase(ResultList.SUPPRESS))
{
result.addValue(a);
}
}
Thanks,
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.