on 11-28-2016 12:13 PM
Hi there experts,
I facing some mapping and I cannot see the logic. Scenario is IDOC to Flat File, and I'm generating at target file as many lines as POSNR (positions) at the IDOC.
Thing is now they want to have more lines at some positions that have inside more values (some box code).
I need to have at the target file:
POS 001 BOX1
POS 001 BOX2
POS 001 BOX3
POS 002 BOX4
POS 003 BOX5
Thing is, to repeat the pos as many times as there are boxes at same context. Is there any UDF easy solution to this?
Cheers, and thanks a lot in advance
Edu
Hi Eduardo!
UDF:
public void multiplyQueues(String[] q1, String[] q2, ResultList result1, ResultList result2, Container container) throws StreamTransformationException{
for (int i=0; i<q1.length; i++)
for (int j=0; j<q2.length; j++)
if (!(q1[i].equals(ResultList.SUPPRESS) || q2[j].equals(ResultList.SUPPRESS))) {
result1.addValue(q1[i]);
result2.addValue(q2[j]);
}
else {
result1.addValue(ResultList.SUPPRESS);
result2.addValue(ResultList.SUPPRESS);
}
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.