cancel
Showing results for 
Search instead for 
Did you mean: 

IDOC mapping

inigo_sacramento
Participant
0 Kudos

Hi.

I wanto to do a simple thing (i thing this must be simple but i don't know how to do it with BPM).

I want to do a N:N mapping, from the XML file to IDOC.

In the BPM i must create as many IDOCS as rows i have on my XML file.

Which element do i have to use in the BPM in order to do some kind of loop that create one IDOC per row. this N number of IDOCs will be sent to R3 backend.

Thanks.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

You can use IDoc packaging concept.

1.Import XSD of IDOC.

3.Change max ocuurence Of IDOC node as maxOccurs

e.g <xsd: element name=”IDOC” type=”<Idoc type>” minOccurs=”1” maxOccurs=”unbounded” />

4. Import XSD to IR as External definition .

In mapping , map line item node (n occurence) to Idoc node of IDOC structure (as this is now N occurence).

Your adapter engine will take care of splitting message and sending multiple IDoc.

Hope it helps.

Regards,

satish

Former Member
0 Kudos

Hi,

I assume you have splitted the input XML in to n message. This should be done in the mapping.

Now in BPM use a Tranfrom in side a block . The output of this tranfrom should be the output of your 1:n map. Collect the output of Tranfromation in a multiline element(Assume XN) which should be of type of your interface mapping output.

Then add a next block to your BPM. Go to properties of the block. And

set the mode to for each.

Set the multiline element to XN

Set the current line to X(Which should be of type that interface mapping gives you as output).

Then inside the block do the tansformation for each X of XN to IDOC.

I hope this solves your query.

Thanks

Abinash

Former Member
0 Kudos

Are you getting multiple files...

if yes than you have to use BPM, otherwise you can avoid BPM, by using package concept as stated earlier.

Please refer to SAP note 814393 for details.

Regards,

satish

Former Member
0 Kudos

You need a Multi Map for this. In the Message Map open source and target Message types and select the occurances for target Message type as N(can occur multiple times).

Now you can map your source which has multiple lines in the XML file to the nodes of the IDOC which are repeating multiple times too.

thanks

Ashish

inigo_sacramento
Participant
0 Kudos

Thanks Ashish but i don't want to do that.

i want to create 1 IDOC per row of my XML file. If i have 10 rows of my XML file, i will get 10 IDOCS.

I think that in BPM i have to put a block or something like that in order to make this mapping. At the end, in the R3 i will have 10 IDOC.

for each row of the XML

create IDOC

end for

thanks