on 11-13-2006 12:13 PM
Hi!
I used the above mentioned HOWTO to convert IDOC-XML files to IDOC-Files. Everything works fine as long as I only send 1 IDOC-XML file.
Now we need to convert an IDOC list (collected by a BPM). A typical IDOC list looks like this:
<b><SHPMNT05>
+ <IDOC BEGIN="1"> (IDOC 1)
+ <IDOC BEGIN="1"> (IDOC 2)
+ <IDOC BEGIN="1"> (IDOC 3)
+ <IDOC BEGIN="1"> (IDOC 4)
</SHPMNT05></b>
Does anyone know how to configure the conversion from XML to file of such an IDOC list?
Thanks in advance!
Chris
Hi,
Just export the IDOC as an XSD, and change the occurence of the IDOC tag to minOccurs=0 and maxOccurs= unbounded and then use this XSD as your target message type in message mapping and use it for the inbound message interface as well.
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bhavesh,
thanks for your reply.
Your suggestion works if we just want to change a standard IDOC to an unbounded IDOC (= IDOC list).
In our actual case the problem is that the structure of the IDOC which should be converted from XML to file is read from the sending sap system:
<i>* Connection data to application system to get IDoc metadata
select single * from idxporsm59 into ls_idx1
where port = ls_edidc-sndpor
and client = ls_edidc-mandt.</i>
We would have the possibility to create a new idoc structure called Z_SHPMNT05 which is a SHPMNT.SHPMNT05 idoc with an unbounded "IDOC"-segment.
I just wanted to know if anybody knows a proper way to solve this problem without creating a Z_IDOC type.
Kind regards
Chris
Chris,
From what I understood of your requirement, you will be collecting mutliple IDoc's from SAP sytem in XI using a BPM and then you need to bundle them into a single File. Am i on the right track?
if yes, then irrespective of whether it is a standard or custom idoc, you will import this Idoc into Xi and use it as the Source Message type and Source Message Interafce ( to collect idoc's ) .
For the target File, just export this standard definiton as an XSD, change the occurence and then reimport the XSD and use this XSD as the target strcuutre so that you can map the N collected idocs in the BPM into a single file with multile IDOC elements ( as the XSD will act as the target)
Regards,
Bhavesh
Hi Bhavesh,
yes, you are absolutely right! I already created the source and target messages as you mentioned. This kind of target message (which is in fact a IDOC list) was already used in the past to send IDOC-XML lists (without conversion to IDOC file) to other customers.
Now if we use this message list as target file only the first IDOC of the IDOC list is converted and the following IDOCs are ignored. So the output is one single IDOC file which is converted properly.
I assume that the structure of the message used in the interface mapping is ignored and the only reference is the IDOC structure read from the sending system...;-(
Kind regards
Christian
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.