cancel
Showing results for 
Search instead for 
Did you mean: 

XSLT Mapping Issue: Generate-id() function not working properly in PI but works in XMLSPY

0 Kudos

Hello All,

We are using SAP Provided XSLT mapping as part of Store Connectivity 2.0. We have customized it to suit our needs. We are working on processing multiple PF Records(TransactionType = PF) for each InvoiceLine. We may have multiple Invoice Lines and for each Invoice Line we can have upto 3 PF records. We are trying to parse the XML to map the PF Records for each Invoice line into respective line items on the target side using generate-id function, but this function which is an XSLT1.0 function doesn’t work properly in PI. The same XSTL mapping is giving correct results in the XMLSpy but when we use it in PI, it doesn’t work and all PF records are getting mapped to the first Invoice Line.

Please help!!

Code used:

<xsl:variable name="PFRecord" select="generate-id(.)"/>

<ns0:for-each select="following-sibling::GMTLogTransactionLine[TransactionType='PF' and ((ProfileID='04' and PromptGroup='01' and TotalPromptGroup='01') or (ProfileID='98' and PromptGroup='02' and (TotalPromptGroup='01' or TotalPromptGroup='02')))][generate-id(preceding-sibling::GMTLogTransactionLine[TransactionType='I'][1]) = $PFRecord]"> <ns0:call-template name="RetailLineItemProfilePromptRecordTypePF"/>

</ns0:for-each>

Attachment has screenshots and explanations.

xml-input.jpgexpected-output-in-pi.jpg

Accepted Solutions (0)

Answers (0)