cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple IDOCs of same type -> XI -> File (XML)

Former Member
0 Kudos

Hi All,

I am working on a scenario in which multiple IDOCs are pushed from R/3 to XI. I have created a BPM to merge these IDOCs as per the guide lines given on number of postings/weblogs like Pooja Pandey, Michael and even SAP Basis. But I failed to figure out what the problem is.

XI successfully delivers the IDOCs as XML in a file. But only first IDOC is delivered. The rest of IDOCs are missing. I read a lot about setting '0..unbounded' for IDOC tags but could not set it. While setting the occurences I compared my Message Mapping with BpmPatternCollectMerge in SAP Basis and set as follows.

Source:

Messages 1..1

Message1 1..1

ZUPFIN... 0..unbounded

IDOC 1..1

...and so on

Target:

Messages 1..1

Message1 1..1

ZUPFIN... 1..1

IDOC 1..1

... and so on

Any idea what is going wrong in this ?

Thanks a lot.

- Atul

Accepted Solutions (1)

Accepted Solutions (1)

justin_santhanam
Active Contributor
0 Kudos

Atul,

In your source message the ZUPFIN is 0..unbounded , in target the ZUPFIN is 1..1 , so u will get only one occurrence. Which segment u want to multiple times.

Best regards,

raj.

Former Member
0 Kudos

Hi Raj,

I tried to change the occurence to 1..unbounded but could not. I copied and pasted the xsd of this message and corrected it to be 1..unbounded. But when I did 'Import XML or xsd', it removed 'Messages and Message1 nodes. I have read somewhere to 'Export xsd' in 'Tools'. On what screen this menu is displayed ?

Thanks.

- Atul

justin_santhanam
Active Contributor
0 Kudos

Atul,

If you are using IDOC , then Double click on the IDOC , go to XSD tab, you can see the option of export to XSD file.

Best regards,

raj.

Former Member
0 Kudos

Raj,

I did that but now it gives following error...

<i>

Imported messages can only be used when the source and target messages have the frequency value 1 The source message has a frequency value of 0..unbounded. Change the frequency on the "Messages" tab page</i>

Thanks.

- Atul

moorthy
Active Contributor
0 Kudos

HI,

In Message Mapping -->Go to Messages Tab and make the occurence of the source as 0..unbounded

Hope ur interface mapping also in the similar lines.

Now, make sure that your target structure can hold multiple IDOCS. for that you need to have your parent of IDOC node should occur multiple times in that target structure..This blog may give some idea if you closely observe.

/people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-their-implementation-in-integration-processes-bpm-in-xi

Rgds,

moorthy

Former Member
0 Kudos

Hi Moorthy,

I have already set 0..unbounded in source and 1..1 in target, just as I mentioned earlier.

The blog which you mentioned shows 1:N mapping but not N:1 mapping.

Can you show any solution to the message in my previous posting ? I cannot change the xsd of target message.

Thanks.

- Atul

Former Member
0 Kudos

Experts,

Has any body idea, why it gives following error message when I try to import the target message after adding maxOccurs="unbounded" ?

"<i>Imported messages can only be used when the source and target messages have the frequency value 1 The source message has a frequency value of 0..unbounded. Change the frequency on the "Messages" tab page</i>"

Thanks.

- Atul

justin_santhanam
Active Contributor
0 Kudos

Atul,

Did u changed the occurrence of the IDOC as per Michals weblog. Coz even I did the same, its working perfectly.

Still I'm not clear with your scenario, can u please tell the exact scenario u want to do.

Best regards,

raj.

Former Member
0 Kudos

Which weblog ? Can you please post the link ?

Thanks.

- Atul

justin_santhanam
Active Contributor
0 Kudos

/people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change

Best regards,

raj.

Former Member
0 Kudos

Hi Raj,

Thanks for the link to the blog. How do I import the IDOC as 'External Definition', as mentioned in 4th step in the blog ?

Thanks.

- Atul

justin_santhanam
Active Contributor
0 Kudos

Ok,

Right click on the External Definition(under Interface Objects) and give any name.

Choose the category as XSD, Next to the file input field you can see the icon , select ur xsd from local system and save, activate it.

Best regards,

raj.

Former Member
0 Kudos

Hi Raj,

Thans for the answer. Being new to XI, I did not know where to create external definition. After creating the external definition, it worked fine.

Thanks.

- Atul

Answers (2)

Answers (2)

Former Member
0 Kudos

Hey

i m not sure if you have some other requirements too coz of which ur using BPM,but if ur using BPM just to bundle IDOC's,then you can easily do that without BPM

/people/stefan.grube/blog/2006/09/18/collecting-idocs-without-using-bpm

thanx

ahmad

moorthy
Active Contributor
0 Kudos

HI,

You are getting multiple IDOCs into BPM. But output you are getting one message right? IF so, your N:1 Mapping is not done correctly.

i.e your target message type should have occurence of 1..n and also the interface mapping. Closely obsever the N:1 mapping done in the BpmPatternCollectMerge.

Also go to SXMB_MONI->PE and check the Technical Details to make sure that, you are getting multiple IDOCs and you are executing the N:1 Transformation step correctly.

Also in the N:1 Mapping, check out the context you used. Make it root . Then test the mapping independently in the Integration Repository.

Hope it helps,

Regards,

Moorthy

Former Member
0 Kudos

Hi Moorthy,

I checked the mapping in BpmPatternCollectMerge. It is 0..unbounded in source and 1..1 in target.

As you have mentioned, I tested the mapping in IR. I duplicated 'Message1' node by 'duplicate subtree' option and then tested. The target contained only ONE IDOC. I did not populate the IDOC fields, though. Then I duplicated IDOC node on the source, but the result is the same. Before this test, I changed the occurence to 0..unbounded on target message.

- Atul