cancel
Showing results for 
Search instead for 
Did you mean: 

Questions to a Mapping for IDOC-to-File Scenario

Former Member
0 Kudos

Hi all,

I want do develop a Message-Mapping for an IDOC-to-File Scenario. A SAP System sends an IDOC to the XI-System and the XI-System should make a mapping an send a XML-File to a FTP-Server. The Strukture of the target message is very easy:

<xdoc>

<Invoice>

@purno

<HeaderInfo>

<invno/>

<shipdate/>

<extvalue/>

</HeaderInfo>

<DetailInfo>

<LineItem>

@lineno

<vpartno/>

<descrip/>

<qtyord/>

<cost/>

<vendmemo/>

</LineItem>

</DetailInfo>

</Invoice>

</xdoc>

The source message is an IDOC. This IDOC can contain one or more positions (E1EDP01). Those different positions should be mapped into different LineItem's (see target structure) -> so in the target file one or more LineItems can appear.

Is it possible to implement this process with a common message-mapping or have I to implement a business process?

Thanks

with best regards

Christopher

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Christopher,

<i>Is it possible to implement this process with a common message-mapping or have I to implement a business process?</i> - This thing is possible with common message mapping......you dont need business proces for it.......in msg mapping after taking the source IDOC and target xml struc, map the E1EDP01 field to LineItem field.......just check the occurance of these nodes.....it should be 0..unbounded.........so as many E1EDP01 nodes will be there in idoc, that many LineItem nodes in target will be created.......

Thanks,

Rajeev Gupta

Former Member
0 Kudos

Ok, thank for this suggestion.

But there is another problem for me. Under the Element E1EDP01 there are three Elements (E1EDP19,E1EDP26,E1EDS01) which I need with several Segmentnumbers. In my mapping I have to look for different Qualifiers (QUALF). for example for QUALF=002. And from this segment (where QUALF=002) I need data from the element xy. Is that possible too?

I hope you will understand my problem

Thanks

Former Member
0 Kudos

Hi Christopher,

yes this is also possible.......for this, in mapping you will take target node, then you will take the QUALF field from source idoc, compare it with constant 002 by using equalS function of text functions, then send it to boolean function of if-then, then take it to target node........so depending on your QUALF node, you can send the req source field to target node.......

Thanks,

Rajeev Gupta

Former Member
0 Kudos

Thanks a lot ... I will try it in the next days

with best regards

Christopher

Answers (1)

Answers (1)

Former Member
0 Kudos

Use Node functions in the mapping.

So that U can map . In the target side is the Line item is 1 to unbounded then it is ok.

Other wise changed it to 1 - unbounded.