cancel
Showing results for 
Search instead for 
Did you mean: 

flat file to idoc MATMAS05 - mapping

Former Member
0 Kudos

Hi,

I want to create 2 Idocs from one recordset.

Can any one tell me how do I map this Recordset to an Idoc?

Example source and target IDOC structures:

Source:-

<Recordset>

<SA010>

<IDENTS>1234</IDENTS>

<BEZ>Dummytxt</BEZ>

</SA010>

<SA088>

<IDENTS>1234</IDENTS>

<MARC1>010</ MARC1>

<MARC2>020</MARC2>

</SA088>

</Recordset>

Target:-

<MATMAS05>

<IDOC BEGIN="1">

<E1MARAM SEGMENT="1">

<MATNR>1234</MATNR>

<E1MARCM SEGMENT="2">

<WERKS>010</WERKS>

</E1MARCM>

</E1MARAM>

</IDOC>

</MATMAS05>

<MATMAS05>

<IDOC BEGIN="1">

<E1MARAM SEGMENT="1">

<MATNR>1234</MATNR>

<E1MARCM SEGMENT="2">

<WERKS>020</WERKS>

</E1MARCM>

</E1MARAM>

</IDOC>

</MATMAS05>

Thanks and Regards,

Eren

Accepted Solutions (1)

Accepted Solutions (1)

former_member192892
Active Contributor
0 Kudos

Ok Eren,

Sorry for late reply, had gone for dinner

Now in your mapping, right click on your IDOC topmost node and select duplicate subtree

Now for the 1st IDOC map WERKS from MARC1

and for 2nd IDOC map WERKS from MARC2

Please tell me if it works while you test your mapping

Answers (7)

Answers (7)

Former Member
0 Kudos

Hello Varun,

thank you. You solved my problem.

Former Member
0 Kudos

Hello Varun,

My flat structure:

<Recordset>

<b><SA010></b>

<i><IDENTS>1234</IDENTS>

<BEZ>Dummytxt</BEZ></i>

<b></SA010></b>

<b><SA088></b>

<IDENTS>1234</IDENTS>

<i><MARC1>010<>

<MARC2>020</MARC2></i>

<b></SA088></b>

</Recordset>

The MATNR field is <IDENTS>. I can pick the value from node <SA010> or <SA088>.

Thanks

former_member192892
Active Contributor
0 Kudos

Eren, I have a small doubt...

while populating the two IDOCS, where do you pick the MATNR field from??

More specifically, is this value populated in both the IDOCS from the same source node??

And if yes, which node is that

Thanks

Former Member
0 Kudos

Thanks for the quick answer,

I change the occurence to 0..unbounded .

How do I map the SA088 Elements to get 2 IDocs?

<SA088>

_____<IDENTS>1234</IDENTS>

_____<MARC1>010<>

_____<MARC2>020</MARC2>

</SA088>

Thanks and Regards,

Eren

Former Member
0 Kudos

Hi

if you want to create the two idoc at the receiver side then you have to put the occurence for the idoc as 0..unbounded .

Thanks

Rinku

Former Member
0 Kudos

Sarac,

Change the occurrence of Idoc to 1..unbounded and map Marc to Idoc. So you map for every occurrence of Marc you need to have an idoc.

Regards,

---Satish

Former Member
0 Kudos

Eren,

Check this weblog for changing the occurance attribute on the IDOC

<a href="/people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change:///people/michal.krawczyk2/blog/2005/12/04/xi-idoc-bundling--the-trick-with-the-occurance-change

After that you can map the <SA010> and <SA088> node to the IDOC node and that should give you two IDOCs.

regards,

-Hashim