Skip to Content
0
Former Member
Sep 11, 2007 at 07:35 AM

Problem Mapping FTP to IDoc

18 Views

Hi well i have following incoming structure:

<?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_EPOSYS xmlns:ns0="http://XXX">
   <EPORecordSet>
      <EPOFileHeader>
         <BDKDNR>0000007531</BDKDNR>
         <BDART>T</BDART>
         <TEXT>Bestellung</TEXT>
      </EPOFileHeader>
      <EPOFileHeader>
         <BDKDNR>0000007531</BDKDNR>
         <BDART>T</BDART>
         <TEXT/>
      </EPOFileHeader>
      <EPOFileHeader>
         <BDKDNR>0000007531</BDKDNR>
         <BDART>T</BDART>
         <TEXT>4510</TEXT>
      </EPOFileHeader>
      <EPOFilePos>
         <BDKDNR>0000007531</BDKDNR>
         <BDART>S</BDART>
         <BDIDENT>000000000050504200</BDIDENT>
         <BDMENGE>0000002</BDMENGE>
      </EPOFilePos>
   </EPORecordSet>
</ns0:MT_EPOSYS>

this one should be mapped into IDoc Structure:

      
<ZBC11_EPOSYS_HEADER SEGMENT="">
         <KUNNR>0000007531</KUNNR> [ = BDKDNR]
         <BDART>T</BDART> [= BDART]
         <DATA>1</DATA> [ = TEXT]
         <ZBC11_EPOSYS_POSITION SEGMENT="">
            <BDKDNR>0000007531</BDKDNR>
            <BDART>S</BDART>
            <MATNR>000000000050504200</MATNR>
            <MENGE>0000002</MENGE>
         </ZBC11_EPOSYS_POSITION>
      </ZBC11_EPOSYS_HEADER>
   </IDOC>
</ZBC11_EPOSYS>

where it should be mapped to the fields in the brackets [].

Incoming occurence (File):

<EPOFileHeader> occurence should be 1...9

and <EPOFilePos> has occurence 0..9999999

Target Structure Occurence:

<ZBC11_EPOSYS_HEADER SEGMENT> 1..9

one level down:

<ZBC11_EPOSYS_POSITION SEGMENT=""> 1..9999999

so that there should be no problem to map several Header data and FilePos-Data to the IDoc structure.

Problem is that XI only takes one header and map all the FilePos-data right. But how to configure the mapping that the Header of the IDocs takes more than one incoming header and following FilePos-Data?!

Can somebody help me?!

br Jens