on 01-17-2013 11:35 AM
Hi,
I need help in doing mapping for the below requirement. Please help me on this.
JDBC Source :-
Row
Field1
Field2
Field3
Field4
Field5
Field6
Proxy Target structure:-
Header
Field1
Field2
Field3
Line
Field4
Field5
Field6
Getting multiple records from JDBC with Header data and line item data. Issue is if header value is for all line item headers should come once and line should repeat multiple times. same as if there is different header values coming from JDBC header should repeat n times and line item should repeat n times for particular under particular header. How I can do this ….
Regards
Raju
Hello,
Proxy Target structure:-
Header
Field1
Field2
Field3
Line
Field4
Field5
Field6
This is not possible with your current structure Header is 1..1. You could modify it such that the header is 0..unbounded e.g
<Root> 1..1
--<Header> 0..unbounded or 1..unbounded
----<Field1> 0..1 or 1..1
----<Field2> 0..1 or 1..1
----<Field3> 0..1 or 1..1
--------<Line> 0..unbounded or 1..unbounded
-----------<Field4> 0..1 or 1..1
-----------<Field5> 0..1 or 1..1
-----------<Field6> 0..1 or 1..1
Also keep in mind that a message split is not possible for adapters in the ABAP stack e.g Plain HTTP, Proxy. So changing the occurrence to 0..unbounded in message mapping will not work.
Hope this helps,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raju,
Can you explain your requirement with more details?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Raju reddy,
This is not a valid one. To get clear about ur doubt please know about XML.
Thanks and Regards,
Vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try as below
f1
f2 concat-->sortby key(concat o/p,f1)-->splitbyvalue(valuechange)-->collapse context-->o/pto f1
f3
f1
f2 concat-->sortby key(concat o/p,f4)-->o/p1
f3
f1
f2 concat-->sort-->split by value (value change)-->o/p2
f3
formatbyexample(o/p1,o/p2)-->map to Line field in target.
For Field4,5,6 above ,use above logic and use split value at the end.
Regards
Venkat
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.