Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet xmlns:b1e="urn:com.sap.b1i.sim:b1event" xmlns:b1ie="urn:com.sap.b1i.sim:b1ievent" xmlns:b1im="urn:com.sap.b1i.sim:b1imessage" xmlns:bfa="urn:com.sap.b1i.bizprocessor:bizatoms" xmlns:jdbc="urn:com.sap.b1i.adapter:jdbcadapter" xmlns:rfc="urn:sap-com:document:sap:rfc:functions" xmlns:sim="urn:com.sap.b1i.sim:entity" xmlns:utils2="com.sap.b1i.bpc_tools.Utilities" xmlns:vpf="urn:com.sap.b1i.vplatform:entity" xmlns:xci="urn:com.sap.b1i.xcellerator:intdoc" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" bfa:force="" vpf:force="" jdbc:force="" rfc:force="" b1ie:force="" b1e:force="" xci:force="" sim:force="" utils2:force="" b1im:force="">
- <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
- <xsl:param name="atom"/>
- <xsl:param name="sessionid"/>
- <xsl:variable name="msg" select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role='S']"/>
- <xsl:variable name="vpSender" select="/vpf:Msg/vpf:Header/vpf:Sender/@Id"/>
- <xsl:variable name="vpObject" select="/vpf:Msg/vpf:Header/vpf:Sender/@ObjId"/>
- <xsl:variable name="vpReceiver" select="/vpf:Msg/vpf:Header/vpf:ReceiverList/vpf:Receiver[./@handover='P']/@Id"/>
- <xsl:variable name="vpBackupFolder" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id='BackupFolder']/@value"/>
- <xsl:variable name="vpBRFSBO" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id='BRFSBO']/@value"/>
- <xsl:variable name="vpDefaultLevel" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id='DefaultLevel']/@value"/>
- <xsl:variable name="vpDEV_Pass" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id='DEV_Pass']/@value"/>
- <xsl:variable name="vpDEV_Port" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id='DEV_Port']/@value"/>
- <xsl:variable name="vpDEV_Url" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id='DEV_Url']/@value"/>
- <xsl:variable name="vpDEV_User" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id='DEV_User']/@value"/>
- <xsl:variable name="vpPRD_Pass" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id='PRD_Pass']/@value"/>
- <xsl:variable name="vpPRD_Port" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id='PRD_Port']/@value"/>
- <xsl:variable name="vpPRD_Url" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id='PRD_Url']/@value"/>
- <xsl:variable name="vpPRD_User" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id='PRD_User']/@value"/>
- <xsl:variable name="vpQA_Pass" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id='QA_Pass']/@value"/>
- <xsl:variable name="vpQA_Port" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id='QA_Port']/@value"/>
- <xsl:variable name="vpQA_Url" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id='QA_Url']/@value"/>
- <xsl:variable name="vpQA_User" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id='QA_User']/@value"/>
- <xsl:variable name="vpWS_CARREGAR_VENDSAS_MENSA" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id='WS_CARREGAR_VENDSAS_MENSA']/@value"/>
- <xsl:variable name="vpWS_COMPOSI_PRODU_LNR" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id='WS_COMPOSI_PRODU_LNR']/@value"/>
- <xsl:variable name="vpWS_COMPRA_TERCEIROS_LNR" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id='WS_COMPRA_TERCEIROS_LNR']/@value"/>
- <xsl:variable name="vpWS_MOVIMENTO_ESTOQUE_LNR" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id='WS_MOVIMENTO_ESTOQUE_LNR']/@value"/>
- <xsl:variable name="vpWS_RETIFIC_MATERIAL_LNR" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id='WS_RETIFIC_MATERIAL_LNR']/@value"/>
- <xsl:variable name="vpWS_CARREGAR_SALDOS_CONT" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id='WS_CARREGAR_SALDOS_CONT']/@value"/>
- <xsl:variable name="vpWS_CARREG_DADOS_VENDAS_BW" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id='WS_CARREG_DADOS_VENDAS_BW']/@value"/>
- <xsl:template match="/">
- <Msg xmlns="urn:com.sap.b1i.vplatform:entity">
- <xsl:copy-of select="/vpf:Msg/@*"/>
- <xsl:copy-of select="/vpf:Msg/vpf:Header"/>
- <Body>
- <xsl:copy-of select="/vpf:Msg/vpf:Body/*"/>
- <Payload Role="X" id="{$atom}">
- <xsl:call-template name="transform"/>
- </Payload>
- </Body>
- </Msg>
- </xsl:template>
- <xsl:template name="transform">
- <xsl:variable name="reclvl" select="$msg/Msg/Level"/>
- <xsl:variable name="lvl">
- 2
- <!--<xsl:choose>
- <xsl:when test="$reclvl">
- <xsl:value-of select="$reclvl"></xsl:value-of>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$vpDefaultLevel"></xsl:value-of>
- </xsl:otherwise>
- </xsl:choose>
- -->
- </xsl:variable>
- <xsl:variable name="url">
- <xsl:choose>
- <xsl:when test="$lvl = 1">
- <xsl:value-of select="$vpDEV_Url"/>
- </xsl:when>
- <xsl:when test="$lvl = 2">
- <xsl:value-of select="$vpQA_Url"/>
- </xsl:when>
- <xsl:when test="$lvl = 3">
- <xsl:value-of select="$vpPRD_Url"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$vpDEV_Url"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="port">
- <xsl:choose>
- <xsl:when test="$lvl = 1">
- <xsl:value-of select="$vpDEV_Port"/>
- </xsl:when>
- <xsl:when test="$lvl = 2">
- <xsl:value-of select="$vpQA_Port"/>
- </xsl:when>
- <xsl:when test="$lvl = 3">
- <xsl:value-of select="$vpPRD_Port"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$vpDEV_Port"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="user">
- <xsl:choose>
- <xsl:when test="$lvl = 1">
- <xsl:value-of select="$vpDEV_User"/>
- </xsl:when>
- <xsl:when test="$lvl = 2">
- <xsl:value-of select="$vpQA_User"/>
- </xsl:when>
- <xsl:when test="$lvl = 3">
- <xsl:value-of select="$vpPRD_User"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$vpDEV_User"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="pass">
- <xsl:choose>
- <xsl:when test="$lvl = 1">
- <xsl:value-of select="$vpDEV_Pass"/>
- </xsl:when>
- <xsl:when test="$lvl = 2">
- <xsl:value-of select="$vpQA_Pass"/>
- </xsl:when>
- <xsl:when test="$lvl = 3">
- <xsl:value-of select="$vpPRD_Pass"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$vpDEV_Pass"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <call xmlns="">
- <SOAPAction>http://sap.com/xi/WebService/soap1.1</SOAPAction>
- <connect serviceport="HTTP_Port">
- <destProtocol>http</destProtocol>
- <destHost>
- <xsl:value-of select="$url"/>
- </destHost>
- <destPort>
- <xsl:value-of select="$port"/>
- </destPort>
- <!--<destPath>
- /XISOAPAdapter/MessageServlet?senderParty=&senderService=BC_Business_One&receiverParty=&receiverService=&interface=<xsl:value-of select="$msg/Msg/type"></xsl:value-of>
- &interfaceNamespace=http%3A%2F%2Fwww.businessone.com.br%2F</destPath>
- -->
- <!--<destPath>
- /XISOAPAdapter/MessageServlet?senderParty=&senderService=BC_Business_One&receiverParty=&receiverService=&interface=<xsl:value-of select="$msg/Msg/type"></xsl:value-of>
- &interfaceNamespace=http%3A%2F%2Fwww.businessone.com.br%2F</destPath>
- -->
- <!--<destPath>/XISOAPAdapter/MessageServlet</destPath>
- -->
- <!--<query>
- senderParty=&senderService=BC_Business_One&receiverParty=&receiverService=&interface=<xsl:value-of select="$msg/Msg/type"/>
- &interfaceNamespace=http%3A%2F%2Fwww.businessone.com.br%2F</query>
- -->
- <destPath>
- /XISOAPAdapter/MessageServlet?senderParty=&senderService=BC_Business_One&receiverParty=&receiverService=&interface=<xsl:value-of select="$msg/Msg/type"/>
- &interfaceNamespace=http%3A%2F%2Fwww.businessone.com.br%2F
- </destPath>
- <proxyHost>proxy.perdigao.com.br</proxyHost>
- <proxyPort>80</proxyPort>
- <authentification>basic</authentification>
- <user>
- <xsl:value-of select="$user"/>
- </user>
- <!-- <password>brf@2016</password>
- -->
- <password>
- <xsl:value-of select="$pass"/>
- </password>
- <trustStoreURI/>
- <keyStoreURI/>
- </connect>
- <xsl:variable name="event" select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role='T']/Event/b1e:b1events/b1e:b1event"/>
- <xsl:variable name="bo" select="$msg/BOM/BO"/>
- <xsl:variable name="origem">
- <xsl:choose>
- <xsl:when test="$bo/BusinessPartners/row/U_BRF_MD_BPIDTF = 'CLI'">CLI</xsl:when>
- <xsl:when test="$bo/BusinessPartners/row/U_BRF_MD_BPIDTF = 'FOR'">FOR</xsl:when>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="tipo">
- <xsl:choose>
- <xsl:when test="$event/b1e:transactiontype = 'U'">A</xsl:when>
- <xsl:when test="$event/b1e:transactiontype = 'A'">I</xsl:when>
- <xsl:when test="$event/b1e:transactiontype = 'D'">E</xsl:when>
- </xsl:choose>
- </xsl:variable>
- <payload xmlns:bus="http://www.businessone.com.br/" operation="">
- <bus:MT_CARREGA_CLIENTE_FORNECEDOR>
- <I_FORNECEDOR/>
- <I_ZG001>
- <!--Zero or more repetitions:-->
- <item>
- <!--Optional:-->
- <ORIGEM>
- <xsl:value-of select="$origem"/>
- </ORIGEM>
- <!--Optional:-->
- <TIPO>
- <xsl:value-of select="$tipo"/>
- </TIPO>
- <!--Optional:-->
- <STATUS>X</STATUS>
- <!--Optional:-->
- <EXCLUIT/>
- <!--Optional:-->
- <PENDENCIA/>
- <!--Optional:-->
- <GRCONT/>
- <!--Optional:-->
- <CPOSTAL/>
- <!--Optional:-->
- <USR_GEFIL/>
- <!--Optional:-->
- <STATATEND>9</STATATEND>
- <!--Optional:-->
- <ID_USR>
- <xsl:value-of select="$event/b1e:userid"/>
- </ID_USR>
- </item>
- </I_ZG001>
- <xsl:choose>
- <xsl:when test="$bo/BusinessPartners/row/U_BRF_MD_BPIDTF = 'FOR'">
- <xsl:element name="I_ZG004">
- <!--Zero or more repetitions:-->
- <item>
- <!--Optional:-->
- <ORIGEM>
- <xsl:value-of select="$origem"/>
- </ORIGEM>
- <!--Optional:-->
- <TIPO>
- <xsl:value-of select="$tipo"/>
- </TIPO>
- <!--Optional:-->
- <SIGLA>
- <xsl:value-of select="$event/b1e:userid"/>
- </SIGLA>
- <!--Optional:-->
- <FONE>
- <xsl:value-of select="/vpf:Msg/vpf:Body/vpf:Payload[id='atom5']/jdbc:ResultSet/jdbc:Row/jdbc:PortNum"/>
- </FONE>
- <!--Optional:-->
- <BUKRS>
- <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_BUKRS"/>
- </BUKRS>
- <!--Optional:-->
- <EKORG>
- <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_PurOrg"/>
- </EKORG>
- <!--Optional:-->
- <KTOKK>
- <xsl:value-of select="$bo/BusinessPartners/row/GroupCode"/>
- </KTOKK>
- <!--Optional:-->
- <LIFNR>
- <xsl:choose>
- <xsl:when test="$event/b1e:transactiontype = 'U'">
- <xsl:value-of select="$bo/BusinessPartners/row/CardCode"/>
- </xsl:when>
- <xsl:otherwise/>
- </xsl:choose>
- </LIFNR>
- <!--Optional:-->
- <NAME1>
- <xsl:value-of select="substring($bo/BusinessPartners/row/AliasName,1,34)"/>
- </NAME1>
- <!--Optional:-->
- <NAME2>
- <xsl:value-of select="substring($bo/BusinessPartners/row/AliasName,35,69)"/>
- </NAME2>
- <!--Optional:-->
- <STRAS/>
- <!--Optional:-->
- <STRAS2/>
- <!--Optional:-->
- <ORT02/>
- <!--Optional:-->
- <PSTLZ>
- <xsl:value-of select="$bo/BusinessPartners/row/ZipCode"/>
- </PSTLZ>
- <!--Optional:-->
- <ORT01/>
- <!--Optional:-->
- <LAND1>
- <xsl:value-of select="$bo/BusinessPartners/row/Country"/>
- </LAND1>
- <!--Optional:-->
- <REGIO/>
- <!--Optional:-->
- <TELF1>
- <xsl:value-of select="$bo/BusinessPartners/row/Phone1"/>
- </TELF1>
- <!--Optional:-->
- <TELFX>
- <xsl:value-of select="$bo/BusinessPartners/row/Fax"/>
- </TELFX>
- <!--Optional:-->
- <EMAIL>
- <xsl:value-of select="$bo/BusinessPartners/row/EmailAddress"/>
- </EMAIL>
- <!--Optional:-->
- <STKZN/>
- <!--Optional:-->
- <STCD1>
- <xsl:value-of select="$bo/BusinessPartners/row/LicTradeNum"/>
- </STCD1>
- <!--Optional:-->
- <STCD2/>
- <!--Optional:-->
- <STCD3/>
- <!--Optional:-->
- <OBSER/>
- <!--Optional:-->
- <CAD_ERNAM/>
- <!--Optional:-->
- <CAD_NAME/>
- <!--Optional:-->
- <CAD_ERDAT/>
- <!--Optional:-->
- <CAD_HORA/>
- <!--Optional:-->
- <CAD_OBSER01/>
- <!--Optional:-->
- <CAD_OBSER02/>
- <!--Optional:-->
- <HOUSE_NUM1/>
- <!--Optional:-->
- <TXJCD/>
- <!--Optional:-->
- <ZWELS/>
- <!--Optional:-->
- <AKONT>
- <xsl:value-of select="$bo/BusinessPartners/row/DebPayAcct"/>
- </AKONT>
- <!--Optional:-->
- <FDGRV>
- <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_PlanGrp"/>
- </FDGRV>
- <!--Optional:-->
- <BRSCH/>
- <!--Optional:-->
- <INCO1>
- <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_INCO1"/>
- </INCO1>
- <!--Optional:-->
- <INCO2>
- <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_INCO2"/>
- </INCO2>
- <!--Optional:-->
- <ZTERMC/>
- <!--Optional:-->
- <ZTERME/>
- <!--Optional:-->
- <LNRZB/>
- <!--Optional:-->
- <HBKID/>
- <!--Optional:-->
- <INTAD/>
- <!--Optional:-->
- <WITHT/>
- <!--Optional:-->
- <WT_WITHCD/>
- <!--Optional:-->
- <WT_SUBJCT/>
- <!--Optional:-->
- <STCDT/>
- <!--Optional:-->
- <FITYP/>
- <!--Optional:-->
- <REGIOGROUP/>
- <!--Optional:-->
- <STCEG/>
- <!--Optional:-->
- <DT_EMISS_CR/>
- <!--Optional:-->
- <DT_VCTO_CR/>
- <!--Optional:-->
- <DT_EMISS_BALAD/>
- <!--Optional:-->
- <DT_VCTO_BALAD/>
- <!--Optional:-->
- <DTIQAMA/>
- <!--Optional:-->
- <SORT1>
- <xsl:choose>
- <xsl:when test="$event/b1e:transactiontype = 'A'">
- <xsl:value-of select="$bo/BusinessPartners/row/CardCode"/>
- </xsl:when>
- <xsl:otherwise/>
- </xsl:choose>
- </SORT1>
- <!--Optional:-->
- <ZDTNASC/>
- </item>
- </xsl:element>
- <I_ZG006>
- <!--Zero or more repetitions:-->
- <item>
- <!--Optional:-->
- <ORIGEM/>
- <!--Optional:-->
- <TIPO/>
- <!--Optional:-->
- <NAME1/>
- <!--Optional:-->
- <NAME2/>
- <!--Optional:-->
- <STKZN/>
- <!--Optional:-->
- <STCD1/>
- <!--Optional:-->
- <STCD2/>
- <!--Optional:-->
- <STCD3/>
- <!--Optional:-->
- <STRAS/>
- <!--Optional:-->
- <HOUSE_NUM1/>
- <!--Optional:-->
- <HOUSE_NUM2/>
- <!--Optional:-->
- <STRAS1/>
- <!--Optional:-->
- <ORT02/>
- <!--Optional:-->
- <PSTLZ/>
- <!--Optional:-->
- <ORT01/>
- <!--Optional:-->
- <LAND1/>
- <!--Optional:-->
- <REGIO/>
- <!--Optional:-->
- <PFACH/>
- <!--Optional:-->
- <TELF1/>
- <!--Optional:-->
- <TELFX/>
- <!--Optional:-->
- <EMAIL/>
- <!--Optional:-->
- <KUNNR/>
- <!--Optional:-->
- <BUKRS/>
- <!--Optional:-->
- <VKORG/>
- <!--Optional:-->
- <VTWEG/>
- <!--Optional:-->
- <SPART/>
- <!--Optional:-->
- <KTOKD/>
- <!--Optional:-->
- <NAMEV_CONT/>
- <!--Optional:-->
- <SOBNAME_CONT/>
- <!--Optional:-->
- <TELF_CONT/>
- <!--Optional:-->
- <EMAI_CONT/>
- <!--Optional:-->
- <SIGLA/>
- <!--Optional:-->
- <NAME_USER/>
- <!--Optional:-->
- <FONE/>
- <!--Optional:-->
- <OBSER/>
- <!--Optional:-->
- <CAD_ERNAM/>
- <!--Optional:-->
- <CAD_NAME/>
- <!--Optional:-->
- <CAD_ERSDA/>
- <!--Optional:-->
- <CAD_HORA/>
- <!--Optional:-->
- <CAD_OBSER01/>
- <!--Optional:-->
- <CAD_OBSER02/>
- <!--Optional:-->
- <ENVIOFIN/>
- <!--Optional:-->
- <CFOPC/>
- <!--Optional:-->
- <HBKID/>
- <!--Optional:-->
- <PAFKT/>
- <!--Optional:-->
- <STCEG/>
- <!--Optional:-->
- <XSUBT/>
- <!--Optional:-->
- <CNAE/>
- <!--Optional:-->
- <TIME_ZONE/>
- <!--Optional:-->
- <STCDT/>
- <!--Optional:-->
- <FITYP/>
- <!--Optional:-->
- <REGIOGROUP/>
- <!--Optional:-->
- <DT_EMIT_CR/>
- <!--Optional:-->
- <DT_EXP_CR/>
- <!--Optional:-->
- <REG_MUNICIPIO/>
- <!--Optional:-->
- <DT_EMIT_BALADYIA/>
- <!--Optional:-->
- <DT_EXP_BALADYIA/>
- <!--Optional:-->
- <DT_EXP_IQAMA/>
- <!--Optional:-->
- <SORT1/>
- <!--Optional:-->
- <NAME3/>
- <!--Optional:-->
- <NAME4/>
- <!--Optional:-->
- <DTNASC/>
- </item>
- </I_ZG006>
- </xsl:when>
- <xsl:when test="$bo/BusinessPartners/row/U_BRF_MD_BPIDTF = 'CLI'">
- <I_ZG006>
- <!--Zero or more repetitions:-->
- <item>
- <!--Optional:-->
- <ORIGEM>CLI</ORIGEM>
- <!--Optional:-->
- <TIPO>
- <xsl:value-of select="$tipo"/>
- </TIPO>
- <!--Optional:-->
- <NAME1>
- <xsl:value-of select="substring($bo/BusinessPartners/row/AliasName,1,34)"></xsl:value-of>
- </NAME1>
- <!--Optional:-->
- <NAME2>
- <xsl:value-of select="substring($bo/BusinessPartners/row/AliasName,35,69)"></xsl:value-of>
- </NAME2>
- <!--Optional:-->
- <STKZN/>
- <!--Optional:-->
- <STCD1>
- <xsl:value-of select="$bo/BusinessPartners/row/LicTradeNum"></xsl:value-of>
- </STCD1>
- <!--Optional:-->
- <STCD2/>
- <!--Optional:-->
- <STCD3/>
- <!--Optional:-->
- <STRAS/>
- <!--Optional:-->
- <HOUSE_NUM1/>
- <!--Optional:-->
- <HOUSE_NUM2/>
- <!--Optional:-->
- <STRAS1/>
- <!--Optional:-->
- <ORT02/>
- <!--Optional:-->
- <PSTLZ>
- <xsl:value-of select="$bo/BusinessPartners/row/ZipCode"></xsl:value-of>
- </PSTLZ>
- <!--Optional:-->
- <ORT01/>
- <!--Optional:-->
- <LAND1>
- <xsl:value-of select="$bo/BusinessPartners/row/Country"></xsl:value-of>
- </LAND1>
- <!--Optional:-->
- <REGIO/>
- <!--Optional:-->
- <PFACH/>
- <!--Optional:-->
- <TELF1>
- <xsl:value-of select="$bo/BusinessPartners/row/Phone1"></xsl:value-of>
- </TELF1>
- <!--Optional:-->
- <TELFX>
- <xsl:value-of select="$bo/BusinessPartners/row/Fax"></xsl:value-of>
- </TELFX>
- <!--Optional:-->
- <EMAIL>
- <xsl:value-of select="$bo/BusinessPartners/row/EmailAddress"></xsl:value-of>
- </EMAIL>
- <!--Optional:-->
- <KUNNR/>
- <!--Optional:-->
- <BUKRS>
- <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_BUKRS"></xsl:value-of>
- </BUKRS>
- <!--Optional:-->
- <VKORG>
- <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_SalOrg"></xsl:value-of>
- </VKORG>
- <!--Optional:-->
- <VTWEG>
- <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_CUST_Option"></xsl:value-of>-<xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_DistChan"></xsl:value-of>
- </VTWEG>
- <!--Optional:-->
- <SPART>
- <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_CUST_Option"></xsl:value-of>-<xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_Division"></xsl:value-of>
- </SPART>
- <!--Optional:-->
- <KTOKD>
- <xsl:value-of select="$bo/BusinessPartners/row/Properties">
- </KTOKD>
- <!--Optional:-->
- <NAMEV_CONT/>
- <!--Optional:-->
- <SOBNAME_CONT/>
- <!--Optional:-->
- <TELF_CONT/>
- <!--Optional:-->
- <EMAI_CONT/>
- <!--Optional:-->
- <SIGLA/>
- <!--Optional:-->
- <NAME_USER/>
- <!--Optional:-->
- <FONE/>
- <!--Optional:-->
- <OBSER/>
- <!--Optional:-->
- <CAD_ERNAM/>
- <!--Optional:-->
- <CAD_NAME/>
- <!--Optional:-->
- <CAD_ERSDA/>
- <!--Optional:-->
- <CAD_HORA/>
- <!--Optional:-->
- <CAD_OBSER01/>
- <!--Optional:-->
- <CAD_OBSER02/>
- <!--Optional:-->
- <ENVIOFIN/>
- <!--Optional:-->
- <CFOPC/>
- <!--Optional:-->
- <HBKID/>
- <!--Optional:-->
- <PAFKT/>
- <!--Optional:-->
- <STCEG/>
- <!--Optional:-->
- <XSUBT/>
- <!--Optional:-->
- <CNAE/>
- <!--Optional:-->
- <TIME_ZONE/>
- <!--Optional:-->
- <STCDT/>
- <!--Optional:-->
- <FITYP/>
- <!--Optional:-->
- <REGIOGROUP/>
- <!--Optional:-->
- <DT_EMIT_CR/>
- <!--Optional:-->
- <DT_EXP_CR/>
- <!--Optional:-->
- <REG_MUNICIPIO/>
- <!--Optional:-->
- <DT_EMIT_BALADYIA/>
- <!--Optional:-->
- <DT_EXP_BALADYIA/>
- <!--Optional:-->
- <DT_EXP_IQAMA/>
- <!--Optional:-->
- <SORT1/>
- <!--Optional:-->
- <NAME3/>
- <!--Optional:-->
- <NAME4/>
- <!--Optional:-->
- <DTNASC/>
- </item>
- </I_ZG006>
- <I_ZG004>
- <!--Zero or more repetitions:-->
- <item>
- <!--Optional:-->
- <ORIGEM/>
- <!--Optional:-->
- <TIPO/>
- <!--Optional:-->
- <SIGLA/>
- <!--Optional:-->
- <FONE/>
- <!--Optional:-->
- <BUKRS/>
- <!--Optional:-->
- <EKORG/>
- <!--Optional:-->
- <KTOKK/>
- <!--Optional:-->
- <LIFNR/>
- <!--Optional:-->
- <NAME1/>
- <!--Optional:-->
- <NAME2/>
- <!--Optional:-->
- <STRAS/>
- <!--Optional:-->
- <STRAS2/>
- <!--Optional:-->
- <ORT02/>
- <!--Optional:-->
- <PSTLZ/>
- <!--Optional:-->
- <ORT01/>
- <!--Optional:-->
- <LAND1/>
- <!--Optional:-->
- <REGIO/>
- <!--Optional:-->
- <TELF1/>
- <!--Optional:-->
- <TELFX/>
- <!--Optional:-->
- <EMAIL/>
- <!--Optional:-->
- <STKZN/>
- <!--Optional:-->
- <STCD1/>
- <!--Optional:-->
- <STCD2/>
- <!--Optional:-->
- <STCD3/>
- <!--Optional:-->
- <OBSER/>
- <!--Optional:-->
- <CAD_ERNAM/>
- <!--Optional:-->
- <CAD_NAME/>
- <!--Optional:-->
- <CAD_ERDAT/>
- <!--Optional:-->
- <CAD_HORA/>
- <!--Optional:-->
- <CAD_OBSER01/>
- <!--Optional:-->
- <CAD_OBSER02/>
- <!--Optional:-->
- <HOUSE_NUM1/>
- <!--Optional:-->
- <TXJCD/>
- <!--Optional:-->
- <ZWELS/>
- <!--Optional:-->
- <AKONT/>
- <!--Optional:-->
- <FDGRV/>
- <!--Optional:-->
- <BRSCH/>
- <!--Optional:-->
- <INCO1/>
- <!--Optional:-->
- <INCO2/>
- <!--Optional:-->
- <ZTERMC/>
- <!--Optional:-->
- <ZTERME/>
- <!--Optional:-->
- <LNRZB/>
- <!--Optional:-->
- <HBKID/>
- <!--Optional:-->
- <INTAD/>
- <!--Optional:-->
- <WITHT/>
- <!--Optional:-->
- <WT_WITHCD/>
- <!--Optional:-->
- <WT_SUBJCT/>
- <!--Optional:-->
- <STCDT/>
- <!--Optional:-->
- <FITYP/>
- <!--Optional:-->
- <REGIOGROUP/>
- <!--Optional:-->
- <STCEG/>
- <!--Optional:-->
- <DT_EMISS_CR/>
- <!--Optional:-->
- <DT_VCTO_CR/>
- <!--Optional:-->
- <DT_EMISS_BALAD/>
- <!--Optional:-->
- <DT_VCTO_BALAD/>
- <!--Optional:-->
- <DTIQAMA/>
- <!--Optional:-->
- <SORT1/>
- <!--Optional:-->
- <ZDTNASC/>
- </item>
- </I_ZG004>
- </xsl:when>
- </xsl:choose>
- <I_ZG005>
- <xsl:for-each select="$bo/BPBankAccounts/row">
- <!--Zero or more repetitions:-->
- <item>
- <!--Optional:-->
- <ORIGEM>
- <xsl:value-of select="$origem"/>
- </ORIGEM>
- <!--Optional:-->
- <TIPO>
- <xsl:value-of select="$tipo"/>
- </TIPO>
- <!--Optional:-->
- <BANCO>
- <xsl:value-of select="./BankCode"/>
- </BANCO>
- <!--Optional:-->
- <AGENCIA/>
- <!--Optional:-->
- <xsl:variable name="contaLen" select="string-length(./row/Account)"/>
- <CONTA>
- <xsl:value-of select="substring(./Account,$contaLen - 18,$contaLen)"/>
- </CONTA>
- <!--Optional:-->
- <TITULAR/>
- <!--Optional:-->
- <TPBN/>
- <!--Optional:-->
- <BKREF>
- <xsl:value-of select="substring(./Account,1,$contaLen - 18)"/>
- </BKREF>
- <!--Optional:-->
- <IBAN/>
- <!--Optional:-->
- <SWIFT>?</SWIFT>
- <!--Optional:-->
- <BANKA>?</BANKA>
- </item>
- </xsl:for-each>
- </I_ZG005>
- <xsl:if test="$bo/BusinessPartners/row/U_BRF_MD_BPIDTF = 'CLI'">
- <I_ZG007>
- <!--Zero or more repetitions:-->
- <item>
- <!--Optional:-->
- <ORIGEM>
- <xsl:value-of select="$origem"/>
- </ORIGEM>
- <!--Optional:-->
- <TIPO>
- <xsl:value-of select="$tipo"/>
- </TIPO>
- <!--Optional:-->
- <LZONE/>
- <!--Optional:-->
- <ABLAD/>
- <!--Optional:-->
- <DISTANCIA/>
- <!--Optional:-->
- <CIRCULA/>
- <!--Optional:-->
- <TPVEIC/>
- <!--Optional:-->
- <KNFAK/>
- <!--Optional:-->
- <HORREC/>
- <!--Optional:-->
- <SEGUNDA/>
- <!--Optional:-->
- <TERCA/>
- <!--Optional:-->
- <QUARTA/>
- <!--Optional:-->
- <QUINTA/>
- <!--Optional:-->
- <SEXTA>?</SEXTA>
- <!--Optional:-->
- <SABADO/>
- <!--Optional:-->
- <DOMINGO/>
- <!--Optional:-->
- <EQUIP_DESC/>
- <!--Optional:-->
- <GEOCODE/>
- <!--Optional:-->
- <TIPO_CAMINHAO/>
- </item>
- </I_ZG007>
- <I_ZG008>
- <!--Zero or more repetitions:-->
- <item>
- <!--Optional:-->
- <ORIGEM>
- <xsl:value-of select="$origem"/>
- </ORIGEM>
- <!--Optional:-->
- <TIPO>
- <xsl:value-of select="$tipo"/>
- </TIPO>
- <!--Optional:-->
- <SEGUNDA/>
- <!--Optional:-->
- <TERCA/>
- <!--Optional:-->
- <QUARTA/>
- <!--Optional:-->
- <QUINTA/>
- <!--Optional:-->
- <SEXTA/>
- <!--Optional:-->
- <SABADO/>
- <!--Optional:-->
- <DOMINGO/>
- <!--Optional:-->
- <HORAVEND/>
- <!--Optional:-->
- <BANCO/>
- <!--Optional:-->
- <AGENCIA/>
- <!--Optional:-->
- <xsl:variable name="contaLen" select="string-length($bo/BPBankAccounts/row/Account)"/>
- <CONTA>
- <xsl:value-of select="substring($bo/BusinessPartners/row/Account,$contaLen - 18,$contaLen)"/>
- </CONTA>
- <!--Optional:-->
- <TITULAR/>
- <xsl:value-of select="$bo/BusinessPartners/row/AccountName"/>
- <STRAS1/>
- <!--Optional:-->
- <STRAS2/>
- <!--Optional:-->
- <STRAS3/>
- <!--Optional:-->
- <STRAS4/>
- <!--Optional:-->
- <STRAS5/>
- <!--Optional-->
- <STRAS6/>
- <!--Optional:-->
- <STRAS7/>
- <!--Optional:-->
- <MPKUNNR/>
- <!--Optional:-->
- <PTREF/>
- <!--Optional:-->
- <LOCALA/>
- <!--Optional:-->
- <LOCALB/>
- <!--Optional:-->
- <LOCALC/>
- <!--Optional:-->
- <LOCALD/>
- <!--Optional:-->
- <LOCALE/>
- <!--Optional:-->
- <LOCALF/>
- <!--Optional:-->
- <ZTERM>
- <xsl:value-of select="$bo/BusinessPartners/row/PayTermsGrpCode"/>
- </ZTERM>
- <!--Optional:-->
- <ZWELS>
- <xsl:value-of select="$bo/BusinessPartners/row/PeymentMethodCode"/>
- </ZWELS>
- <!--Optional:-->
- <KLIMK>
- <xsl:value-of select="$bo/BusinessPartners/row/CreditLimit"/>
- </KLIMK>
- <!--Optional:-->
- <BZIRK>
- <xsl:value-of select="$bo/BusinessPartners/row/Territory"/>
- </BZIRK>
- <!--Optional:-->
- <VKBUR>
- <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_SalOff"/>
- </VKBUR>
- <!--Optional:-->
- <VKGRP>
- <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_SalGrp"/>
- </VKGRP>
- <!--Optional:-->
- <KDGRP/>
- <!--Optional:-->
- <MSGNF/>
- <!--Optional:-->
- <REGESP/>
- <!--Optional:-->
- <REGESP1/>
- <!--Optional:-->
- <TXJCD/>
- <!--Optional:-->
- <LIFNR/>
- <!--Optional:-->
- <BRSCH>
- <xsl:value-of select="$bo/BusinessPartners/row/Industry"/>
- </BRSCH>
- <!--Optional:-->
- <NIELS/>
- <!--Optional:-->
- <WAERS>
- <xsl:choose>
- <xsl:when test="$bo/BusinessPartners/row/Currency = 'RMB'">
- CNY
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$bo/BusinessPartners/row/Currency"/>
- </xsl:otherwise>
- </xsl:choose>
- </WAERS>
- <!--Optional:-->
- <KONDA/>
- <!--Optional:-->
- <KALKS/>
- <!--Optional:-->
- <PLTYP>
- <xsl:value-of select="$bo/BusinessPartners/row/PriceListNum"/>
- </PLTYP>
- <!--Optional:-->
- <VERSG/>
- <!--Optional:-->
- <LPRIO>
- <xsl:choose>
- <xsl:when test="$bo/BusinessPartners/row/Priority = ''">
- <xsl:value-of select="''"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$bo/BusinessPartners/row/Priority"/>
- </xsl:otherwise>
- </xsl:choose>
- </LPRIO>
- <!--Optional:-->
- <VSBED>
- <xsl:value-of select="$bo/BusinessPartners/row/ShippingType"/>
- </VSBED>
- <!--Optional:-->
- <VWERK/>
- <!--Optional:-->
- <INCO1>
- <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_INCO1"/>
- </INCO1>
- <!--Optional:-->
- <INCO2>
- <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_INCO2"/>
- </INCO2>
- <!--Optional:-->
- <KTGRD/>
- <!--Optional:-->
- <TAXKD/>
- <!--Optional:-->
- <AKONT>
- <xsl:value-of select="$bo/BusinessPartners/row/DebitorAccount"/>
- </AKONT>
- <!--Optional:-->
- <FDGRV>
- <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_PlanGrp"/>
- </FDGRV>
- <!--Optional:-->
- <VZSKZ>
- <xsl:value-of select="$bo/BusinessPartners/row/IntrestRatePercent"/>
- </VZSKZ>
- <!--Optional:-->
- <SIGLA>
- B1<xsl:value-of select="substring($event/b1e:userid,1,3)"/>
- </SIGLA>
- <!--Optional:-->
- <NAME_USER>
- <xsl:value-of select="$bo/BusinessPartners/row/AliasName"/>
- </NAME_USER>
- <!--Optional:-->
- <FONE>
- <xsl:value-of select="/vpf:Msg/vpf:Body/vpf:Payload[id='atom5']/jdbc:ResultSet/jdbc:Row/jdbc:PortNum"/>
- </FONE>
- <!--Optional:-->
- <OBSER/>
- <!--Optional:-->
- <KDKG3/>
- <!--Optional:-->
- <KVGR4>
- <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_KVGR4"/>
- </KVGR4>
- <!--Optional:-->
- <KVGR5>
- <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_KVGR5"/>
- </KVGR5>
- <!--Optional:-->
- <BRYTH/>
- <!--Optional:-->
- <KZAZU/>
- <!--Optional:-->
- <KATR6>
- <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_KVGR6"/>
- </KATR6>
- <!--Optional:-->
- <KATR7>
- <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_KVGR7"/>
- </KATR7>
- <!--Optional:-->
- <CRNUMERO/>
- <!--Optional:-->
- <AREA_VENDAS/>
- <!--Optional:-->
- <QTDECLI/>
- <!--Optional:-->
- <KATR3/>
- <!--Optional:-->
- <KATR4/>
- <!--Optional:-->
- <KATR5/>
- <!--Optional:-->
- <IBAN>
- <xsl:value-of select="$bo/BPBankAccounts/row/IBAN"/>
- </IBAN>
- <!--Optional:-->
- <SWIFT>
- <xsl:value-of select="$bo/BPBankAccounts/row/BICSwiftCode"/>
- </SWIFT>
- <!--Optional:-->
- <BANKA/>
- <!--Optional:-->
- <ZDATA_ABERTURA/>
- <!--Optional:-->
- <ZNATUREZA/>
- <!--Optional:-->
- <ZOPCTRIB/>
- </item>
- </I_ZG008>
- </xsl:if>
- </bus:MT_CARREGA_CLIENTE_FORNECEDOR>
- </payload>
- <query id="httpheader.???" value=""/>
- </call>
- </xsl:template>
- </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement