cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping issue

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

markangelo_dihiansan
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi Raju,

Can you explain your requirement with more details?

Former Member
0 Kudos

hi Raju reddy,

This is not a valid one. To get clear about ur doubt please know about XML.

Thanks and Regards,

Vijay

Former Member
0 Kudos

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