[SAP PI] – Customize Idoc Source Message with XSLT Mapping into File

10 02 2011

In SDN Forum, i’ve found this question:

Hi Experts,

In one of the threads here i came across a statement on the advantages of the XSLT mapping over other mappings which says

‘File content conversion at receiver side can be avoided in case of text or html output’.

I have a Idoc to FIle scenario wherein I am currently using a combination of message mappping and a FCC at the recvr adapter.

Can i use XSLT mapping instead of the combination currently in use stated above? Also the file format expected is plain text format.

I believe the XSLT mapping would generate a file with XML tags which is what i do not want. Please advise.

However, i would like this to be explained with an example to make it more clear

Source Idoc:
<parent 1>
<child 1>ABCD</child 1>
<child 2>123</child 2>
<child 3 >@#$</child 3>
</parent 1>

Target file:
000ABCD123 00@#$

Can you suggest the mapping i would need to employ for this?

 

_________________________________________________________

This, can be the answer:

<xsl:stylesheet version=”1.0″ xmlns:xsl=”http://www.w3.org/1999/XSL/Transform”>

<xsl:template match=”/”>

<xsl:for-each select=”parent 1″>

<tr>
<td><xsl:value-of select=”child 1″/><xsl:value-of select=”child 2″/><xsl:value-of select=”child 3″/></td>
</tr>
</xsl:for-each>

</xsl:template>

</xsl:stylesheet>

Annunci

Azioni

Information

3 responses

31 08 2012
Precious

What a data of un-ambiguity and preserveness of precious
experience concerning unexpected feelings.

4 09 2012
our partner site

Hi, I log on to your blog daily. Your writing style is witty,
keep up the good work!

6 09 2012
Owen

Asking questions are genuinely pleasant thing if
you are not understanding something completely, however this paragraph gives nice understanding yet.

Rispondi

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...




%d blogger hanno fatto clic su Mi Piace per questo: