Update repository to reflect latest changes on PO.
This commit is contained in:
@@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- 22.12.2023 DEV-8311 SAP sends delivery advices to stores MAPPING: SOURCE
|
||||
- SAP ZFSHDLV TARGET - syspro internal Format -->
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
exclude-result-prefixes="xs">
|
||||
<xsl:output method="xml" omit-xml-declaration="no"
|
||||
indent="yes" />
|
||||
<xsl:strip-space elements="*" />
|
||||
|
||||
<xsl:template match="/XMLRECADV[XMLRECADVHEADER/DocumentSubType = 'RECADV_GI']" name="GOODS_RECEIPT">
|
||||
<xsl:variable name="Location"><xsl:value-of select="./XMLRECADVHEADER/UltimateConsignyGLN"/></xsl:variable>
|
||||
<xsl:variable name="Separator"><xsl:value-of select="'_'"/></xsl:variable>
|
||||
|
||||
<DELVRY07>
|
||||
<IDOC>
|
||||
<xsl:attribute name="BEGIN"><xsl:copy-of select="1"/> </xsl:attribute>
|
||||
<xsl:call-template name="EDI_DC40-8309">
|
||||
<xsl:with-param name="sendFromGLN">
|
||||
<xsl:value-of select="./XMLRECADVHEADER/SendFromGLN"/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="sendToGLN">
|
||||
<xsl:value-of select="./XMLRECADVHEADER/SendToGLN"/>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<E1EDL20 >
|
||||
<xsl:attribute name="SEGMENT"><xsl:copy-of select="1"/> </xsl:attribute>
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains(./XMLRECADVHEADER/ReferenceDocument,'_')">
|
||||
<!--<TRAID><xsl:value-of select="format-number(substring-before(./XMLRECADVHEADER/ReferenceDocument,$Separator),'0000000000')"/></TRAID>-->
|
||||
<VBELN><xsl:value-of select="format-number(substring-before(./XMLRECADVHEADER/ReferenceDocument,$Separator),'0000000000')"/></VBELN>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<!--<TRAID><xsl:value-of select="format-number(./XMLRECADVHEADER/ReferenceDocument,'0000000000')"/></TRAID>-->
|
||||
<VBELN><xsl:value-of select="format-number(./XMLRECADVHEADER/ReferenceDocument,'0000000000')"/></VBELN>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<E1EDL18>
|
||||
<xsl:attribute name="SEGMENT"><xsl:copy-of select="1"/> </xsl:attribute>
|
||||
<QUALF><xsl:call-template name="Qualifier-8309"/></QUALF>
|
||||
</E1EDL18>
|
||||
|
||||
<!-- Source has deep structure of SSCC-Group with Items / therefore using -->
|
||||
<!-- <xsl:for-each select="./*/XMLRECADVITEMS">
|
||||
<E1EDL24>
|
||||
<xsl:attribute name="SEGMENT"><xsl:copy-of select="1"/> </xsl:attribute>
|
||||
<POSNR><xsl:value-of select="position()"/></POSNR>
|
||||
<WERKS><xsl:value-of select="$Location"/></WERKS>
|
||||
<LIFIMG> <xsl:value-of select="OriginalQuantity"/></LIFIMG>
|
||||
<EAN11> <xsl:value-of select="./GTIN"/></EAN11>
|
||||
<POSEX> <xsl:value-of select="./PositionNumber"/></POSEX>
|
||||
</E1EDL24>
|
||||
</xsl:for-each> -->
|
||||
</E1EDL20>
|
||||
</IDOC>
|
||||
</DELVRY07>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="/XMLRECADV[XMLRECADVHEADER/DocumentSubType = 'RECADV_IBT']">
|
||||
<xsl:variable name="Location"><xsl:value-of select="./XMLRECADVHEADER/UltimateConsignyGLN"/></xsl:variable>
|
||||
<xsl:variable name="Separator"><xsl:value-of select="'_'"/></xsl:variable>
|
||||
|
||||
<DELVRY07>
|
||||
<IDOC>
|
||||
<xsl:attribute name="BEGIN"><xsl:copy-of select="1"/> </xsl:attribute>
|
||||
<xsl:call-template name="EDI_DC40-8309">
|
||||
<xsl:with-param name="sendFromGLN">
|
||||
<xsl:value-of select="./XMLRECADVHEADER/SendFromGLN"/>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="sendToGLN">
|
||||
<xsl:value-of select="./XMLRECADVHEADER/SendToGLN"/>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
<E1EDL20 >
|
||||
<xsl:attribute name="SEGMENT"><xsl:copy-of select="1"/> </xsl:attribute>
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains(./XMLRECADVHEADER/ReferenceDocument,'_')">
|
||||
<!--<TRAID><xsl:value-of select="substring-before(./XMLRECADVHEADER/ReferenceDocument,$Separator)"/></TRAID>-->
|
||||
<VBELN><xsl:value-of select="substring-before(./XMLRECADVHEADER/ReferenceDocument,$Separator)"/></VBELN>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<!--<TRAID><xsl:value-of select="./XMLRECADVHEADER/ReferenceDocument"/></TRAID>-->
|
||||
<VBELN><xsl:value-of select="./XMLRECADVHEADER/ReferenceDocument"/></VBELN>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<E1EDL18>
|
||||
<xsl:attribute name="SEGMENT"><xsl:copy-of select="1"/> </xsl:attribute>
|
||||
<QUALF><xsl:call-template name="Qualifier-8309"/></QUALF>
|
||||
</E1EDL18>
|
||||
<!-- Source has deep structure of SSCC-Group with Items / therefore using *-->
|
||||
<xsl:for-each select="./*/XMLRECADVITEMS">
|
||||
<!--<E1EDL24>
|
||||
<xsl:attribute name="SEGMENT"><xsl:copy-of select="1"/> </xsl:attribute>
|
||||
<POSNR><xsl:value-of select="position()"/></POSNR>
|
||||
<WERKS><xsl:value-of select="$Location"/></WERKS>
|
||||
<LIFIMG> <xsl:value-of select="OriginalQuantity"/></LIFIMG>
|
||||
<EAN11> <xsl:value-of select="./GTIN"/></EAN11>
|
||||
<POSEX> <xsl:value-of select="./PositionNumber"/></POSEX>
|
||||
</E1EDL24>-->
|
||||
</xsl:for-each>
|
||||
</E1EDL20>
|
||||
</IDOC>
|
||||
</DELVRY07>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:include href="./valueMaps.xsl" />
|
||||
</xsl:stylesheet>
|
||||
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet version="2.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<xsl:template name="DocumentType">
|
||||
<xsl:param name="DocumentType" />
|
||||
<xsl:choose>
|
||||
<xsl:when test="'DEV-8311'">
|
||||
<xsl:value-of select="'XMLDESADV'" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="' '" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
<xsl:template name="DocumentSubType">
|
||||
<xsl:param name="LFART" />
|
||||
<xsl:choose>
|
||||
<xsl:when test="$LFART = 'ZIL'">
|
||||
<xsl:value-of select="'DESADV_IBT'" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="'DESADV_GI'" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="QuantityQualifier">
|
||||
<xsl:param name="UoM" />
|
||||
<xsl:choose>
|
||||
<xsl:when test="$UoM = 'PCE'">
|
||||
<xsl:value-of select="'12'" />
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="'999'" />
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="EDI_DC40-8309">
|
||||
<xsl:param name="sendFromGLN" />
|
||||
<xsl:param name="sendToGLN" />
|
||||
<EDI_DC40>
|
||||
<xsl:attribute name="SEGMENT"><xsl:copy-of select="1"/> </xsl:attribute>
|
||||
<TABNAM>EDI_DC40</TABNAM>
|
||||
<MANDT>100</MANDT>
|
||||
<DIRECT>2</DIRECT>
|
||||
<OUTMOD></OUTMOD>
|
||||
<DOCNUM></DOCNUM>
|
||||
<IDOCTYP>DELVRY07</IDOCTYP>
|
||||
<MESTYP>WHSCON</MESTYP>
|
||||
<MESCOD>WE</MESCOD>
|
||||
<STDMES>DESADV</STDMES>
|
||||
<SNDPOR>SAPPO</SNDPOR> <!-- change to Syspro -->
|
||||
<SNDPRT>LS</SNDPRT>
|
||||
<SNDPRN>SYSPRO</SNDPRN>
|
||||
<RCVPOR>SAP</RCVPOR>
|
||||
<RCVPRT>LS</RCVPRT>
|
||||
<RCVPFC></RCVPFC>
|
||||
<RCVPRN>SAP</RCVPRN>
|
||||
<SNDLAD><xsl:value-of select="$sendFromGLN"/></SNDLAD>
|
||||
<RCVLAD><xsl:value-of select="$sendToGLN"/></RCVLAD>
|
||||
<CREDAT></CREDAT>
|
||||
<CRETIM></CRETIM>
|
||||
<SERIAL><xsl:value-of select="current-dateTime()"/></SERIAL>
|
||||
</EDI_DC40>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="Qualifier-8309">
|
||||
<xsl:value-of select="'PGI'" />
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
Reference in New Issue
Block a user