Positive Pay Feature Output File

Hi All ,

I am working on AX 2012 R3.

for the positive pay feature at the moment I am getting XML file as an output file for the given XSLT input file.

Kindly suggest how to get CSV file as an output instead of XML.

Thanks

Hari

Isn’t it related to XSL for Positive Pay out file as CSV thread created yesterday?

What problem do you have with it? Are you looking for some introduction to developing in XSLT or do you have any particular problem with it?

Hi Martin,

Yes,it is related to same thread which you mentioned above.

I dont have any problem with it, somehow I have a requirement from my superior I need to get CSV file as an output instead of XML.

Please suggest any Idea.

Thanks
Hari

So I suggest we keep this discussion in a single thread only; duplicating it wouldn’t add any value.
If you say you don’t have any problem with it, why did you mention it here?

Hi Martin,

That thread was not created by me…it may be created by another user.

I am not aware of it that the same question is asked by another user,
I have asked this question today only…my Intention is not to duplicate the question.

Thanks
Hari

Lets make it straight what do you mean by problem here …(I said I dont have any problem with XML output file…)

I thought you created this thread because you had a problem with implementing the XSLT transformation to CSV, therefore I asked what it is, or whether you’re not familiar with XSLT at all and you’re looking for some introduction.
You forgot to mention what you needed from us, that’s why I asked. Maybe you should try once more to answer my questions…

I am not familiar with XSLT file.I have XSLT file which have taken from technet.microsoft.com/…/dn269119.aspx. It is giving the output as XML file…

Now I want XSLT file which can give CSV as an output or please suggest any other way to get CSV as an output file.

Hope It is clear…

Thanks
Hari

Hi Martin,

Have got my point or not?

Thanks
hari

XSLT (eXtensible Stylesheet Language Transformations) is programming language. If you need a new program written in this language, you’ll need a developer familiar with the language. If you’re the developer, you’ll have to learn basics of XSLT to be able to program in it.

Hi Martin,

I am sorry if I am causing inconvenience to you.

At the moment for the positive pay feature in AX, I am giving the input file XSLT file, which is giving the out put file as an xml.

The xslt file is below

<xsl:template match="/">
<xsl:apply-templates select="//s1:BankPositivePay"></xsl:apply-templates>
</xsl:template>
<xsl:template match="//s1:BankPositivePay">

<xsl:value-of select="’ '" />
<xsl:for-each select=“s1:BankAccountTable”>
<xsl:if test=“count(child::s1:BankChequeTable) >0”>

<xsl:value-of select=‘string(“Vendor ID,Vendor Name,Voided,Document Type,Check Date,Check Number,Check Amount,Checkbook ID,Vendor Class ID,Posted Date”)’/>
<xsl:value-of select="’ '" />

<xsl:for-each select=“s1:BankChequeTable”>
<xsl:value-of select=‘s1:RecipientAccountNum/text()’/>
<xsl:value-of select="’,’" />
<xsl:value-of select=‘s1:BankNegInstRecipientName/text()’/>
<xsl:value-of select="’,’" />
xsl:choose
<xsl:when test=‘s1:ChequeStatus/text()=normalize-space(“Void”) or s1:ChequeStatus/text()=normalize-space(“Rejected”) or s1:ChequeStatus/text()=normalize-space(“Cancelled”)’>
<xsl:value-of select=‘string(“Yes”)’/>
</xsl:when>
<xsl:when test=‘s1:ChequeStatus/text()=normalize-space(“Payment”)’>
<xsl:value-of select=‘string(“No”)’/>
</xsl:when>
xsl:otherwise
<xsl:value-of select=‘string(" ")’/>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="’,’" />
<xsl:value-of select=‘string(“Payment”)’/>
<xsl:value-of select="’,’" />
<xsl:value-of select=‘s1:TransDate/text()’/>
<xsl:value-of select="’,’" />
<xsl:value-of select=‘s1:ChequeNum/text()’/>
<xsl:value-of select="’,’" />
<xsl:value-of select=‘s1:AmountCur/text()’/>
<xsl:value-of select="’,’" />
<xsl:value-of select=‘string(“BOA-#1812”)’/>
<xsl:value-of select="’,’" />
xsl:choose
<xsl:when test=‘s1:RecipientType/text()=normalize-space(“Vend”)’>
<xsl:for-each select=“s1:VendTable”>
<xsl:value-of select=‘s1:VendGroup/text()’/>
</xsl:for-each>
</xsl:when>
xsl:otherwise
<xsl:for-each select=“s1:CustTable”>
<xsl:value-of select=‘s1:CustGroup/text()’/>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="’,’" />
<xsl:value-of select=‘s1:TransDate/text()’/>
<xsl:value-of select="’ '" />
</xsl:for-each>
</xsl:if>
</xsl:for-each>

</xsl:template>

<msxsl:script language=“C#” implements-prefix=“xslthelper”>

<![CDATA[ public string PadLeft(string value,int length,string paddingchar) { if(paddingchar!=String.Empty) { return value.PadLeft(length,(paddingchar.ToCharArray())[0]); } else { return value.PadLeft(length); } } Now I want to get the out put file as CSV file, for that do you have suggestions or can you help on modifying the same XSLT file to get it? Thanks Hari