on 06-01-2007 5:03 PM
Mapping issues:
File to Multiple IDOC (propagation)
Each record in file creates N number of IDOCS
So no of records in file is less than number of IDOCS generated.
Problem: A particular field in source record needs to be replicated to the IDOCS it generated. Suppose the value in that field changed in second record ,the IDOCS spurned by it should reflect the changes.
Need help.
Thanks
Hi,
First of all you change the no. of occurrence of the IDoc from 1 to 1..unbounded using michal's weblog:
/people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change
Then you have to use the context functions in your mapping to get the output as you expected.
Also can you please give the source structure or the source payload so that anyone from SDN can help you.
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i have already chganged IDOC occurrence to unbounded by importing it as an XSD and changing occurrence.
Source file : 2 records
1)
Name
Age
Address : US
This gives 10 idocs.
2)
Name
Age
Address : UK
This gives 5 idocs
So the first 10 idocs should be populated with US
and 5 after that should have address as UK.
Thanks
To make it more clear ,we want correspondence b/w source record and target idocs.
if A source record ( Having Adddress as US) generates I,J,K Idocs then these IDOCS should have their address field populated as US
if B source record ( Having Adddress as UK) generates A,B,C Idocs then these IDOCS should have their address field populated as UK.
I hope problem is clear now?
Thanks
it does not give expected result.
Address(source) ->split by value -> Address(IDOC)
what this does is :suppose 10 idocs for first record and 5 IDOCS for second record ,then it populates first IDOC with US and second with UK.
BUT WHAT I WANT : <b>10 idocs with US and 5 after that with UK</b>.
Thanks
Hi,
Follow the steps
1. Define a UDF duplicateContent (with 2 parameters a and b and with the cache set to Context):
for (int i = 0; i < a.length ; i++){
for (int j = 0; j < Integer.parseInt(b[0]); j++){
result.addValue(a[0]);
}
}
2.Address-> SplitByValue \
duplicateContent ->removeContent -> IDoc
State -> Fix value /
FixValue :-
US=10
UK=5
Note--Splitbyvalue and Fixvalue are input to DUplicateContent UDF
3.Mapping for Address field in the Idoc
State \
duplicateContent -> SplitByValue -> Address(Idocs field)
State--> FixValue /
Note --State and Fixvalue is the input to the Duplicate content UDF
Regards,
Ashwin M
Reward if helfpul
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.