on 04-01-2008 5:04 PM
The mapping is from flat to nested, i.e. flat file to FIDCC2 idoc. Each record has to go to 2 repeated IDoc segments, each one with different posting key. Right now, I have it working for each record to a segment(for one segment) by using splitByValue (value change). How can I repeat the creation of another but with slightly different constant.
Also, how do I add line numbers? I remember seeing a posting on this a while ago - cannot locate it.
Will be Rewarded WELL.
Thanks,
Pam
Can you post simple source strucrure and target structure to demonstrate your question ?
Thanks
Liang
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In this way, you need to create one or two UDFs, which map one to two:
Choose Queue Option
One parameter: a
You will need loop all values in the queue:
for (int i=0;i<=a.length;i++)
{
result.addValue(a<i>);
result.addValue(a<i>);
}
I am just giving you idea, not exact code.
And the code need to be modified if the node is child level, need to add context change.
Liang
Hi Liang,
About 10 minutes, I ended up writing the same code...I'll give you points anyway.
I have another requirment in the same area.
So the target segment field gets 40 and 50 values.
ex: 40, 10.00, act1
50, -10.00, act2
Now based on this 40/50 value, I need to map account number. Since account number is another field, how can I tell if I'm working on 40 or 50. How do I store a global value...any idea.
Thanks, Pam
Hi Liang,
About 10 minutes, I ended up writing the same code...I'll give you points anyway.
I have another requirment in the same area.
So the target segment field gets 40 and 50 values.
ex: 40, 10.00, act1
50, -10.00, act2
Now based on this 40/50 value, I need to map account number. Since account number is another field, how can I tell if I'm working on 40 or 50. How do I store a global value...any idea.
Thanks, Pam
Hi, Pam
Using the following example to store it as global variable
SetParameter from GloabalContainer:
container.getGlobalContainer ().setParameter ("COUNTER", "0");
GetParameter from GloabalContainer:
String myCounter = (String) container.getGlobalContainer().getParameter ("COUNTER");
When you map to your constant, store it in global variable, then you map other field, get current global variable, check its value, based on the value, you do proper mapping.
Hope it helps
Liang
Here I'm a little confused.
I duplicated my node for a 40 posting key segment and a 50 posting key segment. If I have several, it becomes,
40
50
40
50
and it working fine.
Now I move on to mapping account number, 40 get a act1 and 50 act2.
My question should have been how would I store the array
40
50
40
50
?
right.
very confusing.
Thanks, Pam
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
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.