cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping of multiple segments of Idoc HRMD_A06 to flat file

Former Member
0 Kudos

Hi Experts,

I am doing an Idoc to file scenario. Idoc i am using is HRMD_A06, which is having around 38 segments, contains the hiring action details of multilpe employees (Infotypes 0000,0001,0002,0003,0302,1001).

When i have send the idoc , I am getting the file in the destination path, but having only one line which is having the the details of first employee.

As the segments are repeating my mapping is not proper. Can anyone please help me with some details for mapping Idoc to file, when the segments repeats in a single idoc.

Please also give me the details regarding the destination message interface.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Sanoj,

Export the IDOC definition to an XSD file (copy the xsd structure into an xsd file on ur desktop) and change the occurance of the IDOC segment as follows:

<xsd:elementname="IDOC"type="HRMD_A06"minOccurs="0"maxOccurs="unbounded"/>

Then import the IDOC again in the External Definition and then continue with Mapping.

Check the following blog as well.

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

Hope this helps.

Regards,

Lavita.

P.S. Do reward points if the information is useful.

Thanks!

Former Member
0 Kudos

Hi sanoj

When we import idoc from R3 its occurence is only one

then we send only one idoc

so we have to change occurence manually

so copy the xml format of the idoc on the desktop

and mention there " minoccurance = 0 maxOccurance = unbounded and again import through external defination.

and while doing mapping also change occurence unbouned

regards

venkat

Former Member
0 Kudos

Hi

Please go through below link,

/people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters

/people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters

Its very simple to do some changes in your existing mapping and some occurance changes.

Verify that if your file message structure has 0..Unbounded Occurance.

Use 0..Unbounded and map accordingly to target structure with 0...unbounded..

and test with sample xml in message mapping with multiple idocs data and see whther u get multiple records in target

Also if you need each sengment on new line with FCC then refer below links

/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion

Edited by: Swarup Sawant on Jan 24, 2008 10:09 AM

Edited by: Swarup Sawant on Jan 24, 2008 10:09 AM

Former Member
0 Kudos

Hi Sanoj

How To…Convert an IDoc-XML structure to a flat file and vice versa in XI 3.0:

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc...

Regards Mario