cancel
Showing results for 
Search instead for 
Did you mean: 

mapping every row to an idoc with same header

Former Member
0 Kudos

hi,

i have record:

recordset 1..1

-


Header 1..1

-


Row 0..unbounded

i want to map it to :

idoc 0...unbounded

-


Header 1..1

-


Row 1..1

i want every row in source will create an idoc. every idoc will have same header but different row.

can u please explain how do i do that?

thanks,

Tomer

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

1)Export the target Idoc

2)Change the occurance of Idoc to 0..unbounded

Check the Weblog for the same

Check the below thread

if u hv any queries let me know

Edited by: malini balasubramaniam on Sep 15, 2008 12:18 PM

former_member192295
Active Contributor
0 Kudos

Hi,

At receiver IDOC structure change 0..Unbound to 1...1. Now it will trigger each record as one IDOC.

Former Member
0 Kudos

Hi Use CreateIf: Use createIf () to create a tag in the target structure depending on the condition. Use createIf, if the nodes at the target side have to be created only after certain condition is true.

Here nodes InternalRequest and ExternalRequest are created depending on the value of Type attribute. InternalRequest node is created if value Type is u2018Internalu2019 and ExternalRequest node is created if value Type is u2018Externalu2019

Former Member
0 Kudos

i already changed the idoc to 1..N ( like i said idoc 0..unbounded)

i have problem to create the new idoc and create the row inside of it.how do i map the idoc node and the row node?

Former Member
0 Kudos

Hi,

Map row node with IDOC node. It will create an IDOC per row.

Now map header node with header node. Between the header nodes you have to create a User defined function commonlly named CopyPerValue:

public Void copyPerValue (String[] a, String []b, ResultList result, Container container){

for (int i=0; i<a.length; i++){

result.addValue(b[0]);

}

}

You have to map row with a. And header with b.

Regards,

Carlos

Former Member
0 Kudos

Sorry,

and finally map row with row and in the middle use SplitByValue.

Carlos

Former Member
0 Kudos

Hi tomer,

you have two posibilities:

The first one is by means of a BPM in order to do multimapping 1:N.

The other one is editing IDOC structure. You would need to export IDOC structure and then edit this structure. Initially IDOC is 1:1. You have to edit it and change cardinality to 1:N.

In both cases you would need to create a User defined function: CopyPerValue to copy the same header to every IDOC.

Regards,

Carlos