Advertisement
Guest User

Untitled

a guest
Jan 26th, 2017
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 35.76 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <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="">
  3. <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
  4. <xsl:param name="atom"/>
  5. <xsl:param name="sessionid"/>
  6. <xsl:variable name="msg" select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role=&apos;S&apos;]"/>
  7. <xsl:variable name="vpSender" select="/vpf:Msg/vpf:Header/vpf:Sender/@Id"/>
  8. <xsl:variable name="vpObject" select="/vpf:Msg/vpf:Header/vpf:Sender/@ObjId"/>
  9. <xsl:variable name="vpReceiver" select="/vpf:Msg/vpf:Header/vpf:ReceiverList/vpf:Receiver[./@handover=&apos;P&apos;]/@Id"/>
  10. <xsl:variable name="vpBackupFolder" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id=&apos;BackupFolder&apos;]/@value"/>
  11. <xsl:variable name="vpBRFSBO" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id=&apos;BRFSBO&apos;]/@value"/>
  12. <xsl:variable name="vpDefaultLevel" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id=&apos;DefaultLevel&apos;]/@value"/>
  13. <xsl:variable name="vpDEV_Pass" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id=&apos;DEV_Pass&apos;]/@value"/>
  14. <xsl:variable name="vpDEV_Port" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id=&apos;DEV_Port&apos;]/@value"/>
  15. <xsl:variable name="vpDEV_Url" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id=&apos;DEV_Url&apos;]/@value"/>
  16. <xsl:variable name="vpDEV_User" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id=&apos;DEV_User&apos;]/@value"/>
  17. <xsl:variable name="vpPRD_Pass" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id=&apos;PRD_Pass&apos;]/@value"/>
  18. <xsl:variable name="vpPRD_Port" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id=&apos;PRD_Port&apos;]/@value"/>
  19. <xsl:variable name="vpPRD_Url" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id=&apos;PRD_Url&apos;]/@value"/>
  20. <xsl:variable name="vpPRD_User" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id=&apos;PRD_User&apos;]/@value"/>
  21. <xsl:variable name="vpQA_Pass" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id=&apos;QA_Pass&apos;]/@value"/>
  22. <xsl:variable name="vpQA_Port" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id=&apos;QA_Port&apos;]/@value"/>
  23. <xsl:variable name="vpQA_Url" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id=&apos;QA_Url&apos;]/@value"/>
  24. <xsl:variable name="vpQA_User" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id=&apos;QA_User&apos;]/@value"/>
  25. <xsl:variable name="vpWS_CARREGAR_VENDSAS_MENSA" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id=&apos;WS_CARREGAR_VENDSAS_MENSA&apos;]/@value"/>
  26. <xsl:variable name="vpWS_COMPOSI_PRODU_LNR" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id=&apos;WS_COMPOSI_PRODU_LNR&apos;]/@value"/>
  27. <xsl:variable name="vpWS_COMPRA_TERCEIROS_LNR" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id=&apos;WS_COMPRA_TERCEIROS_LNR&apos;]/@value"/>
  28. <xsl:variable name="vpWS_MOVIMENTO_ESTOQUE_LNR" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id=&apos;WS_MOVIMENTO_ESTOQUE_LNR&apos;]/@value"/>
  29. <xsl:variable name="vpWS_RETIFIC_MATERIAL_LNR" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id=&apos;WS_RETIFIC_MATERIAL_LNR&apos;]/@value"/>
  30. <xsl:variable name="vpWS_CARREGAR_SALDOS_CONT" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id=&apos;WS_CARREGAR_SALDOS_CONT&apos;]/@value"/>
  31. <xsl:variable name="vpWS_CARREG_DADOS_VENDAS_BW" select="/vpf:Msg/vpf:Header/vpf:Properties/vpf:prop[./@id=&apos;WS_CARREG_DADOS_VENDAS_BW&apos;]/@value"/>
  32. <xsl:template match="/">
  33. <Msg xmlns="urn:com.sap.b1i.vplatform:entity">
  34. <xsl:copy-of select="/vpf:Msg/@*"/>
  35. <xsl:copy-of select="/vpf:Msg/vpf:Header"/>
  36. <Body>
  37. <xsl:copy-of select="/vpf:Msg/vpf:Body/*"/>
  38. <Payload Role="X" id="{$atom}">
  39. <xsl:call-template name="transform"/>
  40. </Payload>
  41. </Body>
  42. </Msg>
  43. </xsl:template>
  44. <xsl:template name="transform">
  45. <xsl:variable name="reclvl" select="$msg/Msg/Level"/>
  46. <xsl:variable name="lvl">
  47. 2
  48. <!--<xsl:choose>
  49. <xsl:when test="$reclvl">
  50. <xsl:value-of select="$reclvl"></xsl:value-of>
  51. </xsl:when>
  52. <xsl:otherwise>
  53. <xsl:value-of select="$vpDefaultLevel"></xsl:value-of>
  54. </xsl:otherwise>
  55. </xsl:choose>
  56. -->
  57. </xsl:variable>
  58. <xsl:variable name="url">
  59. <xsl:choose>
  60. <xsl:when test="$lvl = 1">
  61. <xsl:value-of select="$vpDEV_Url"/>
  62. </xsl:when>
  63. <xsl:when test="$lvl = 2">
  64. <xsl:value-of select="$vpQA_Url"/>
  65. </xsl:when>
  66. <xsl:when test="$lvl = 3">
  67. <xsl:value-of select="$vpPRD_Url"/>
  68. </xsl:when>
  69. <xsl:otherwise>
  70. <xsl:value-of select="$vpDEV_Url"/>
  71. </xsl:otherwise>
  72. </xsl:choose>
  73. </xsl:variable>
  74. <xsl:variable name="port">
  75. <xsl:choose>
  76. <xsl:when test="$lvl = 1">
  77. <xsl:value-of select="$vpDEV_Port"/>
  78. </xsl:when>
  79. <xsl:when test="$lvl = 2">
  80. <xsl:value-of select="$vpQA_Port"/>
  81. </xsl:when>
  82. <xsl:when test="$lvl = 3">
  83. <xsl:value-of select="$vpPRD_Port"/>
  84. </xsl:when>
  85. <xsl:otherwise>
  86. <xsl:value-of select="$vpDEV_Port"/>
  87. </xsl:otherwise>
  88. </xsl:choose>
  89. </xsl:variable>
  90. <xsl:variable name="user">
  91. <xsl:choose>
  92. <xsl:when test="$lvl = 1">
  93. <xsl:value-of select="$vpDEV_User"/>
  94. </xsl:when>
  95. <xsl:when test="$lvl = 2">
  96. <xsl:value-of select="$vpQA_User"/>
  97. </xsl:when>
  98. <xsl:when test="$lvl = 3">
  99. <xsl:value-of select="$vpPRD_User"/>
  100. </xsl:when>
  101. <xsl:otherwise>
  102. <xsl:value-of select="$vpDEV_User"/>
  103. </xsl:otherwise>
  104. </xsl:choose>
  105. </xsl:variable>
  106. <xsl:variable name="pass">
  107. <xsl:choose>
  108. <xsl:when test="$lvl = 1">
  109. <xsl:value-of select="$vpDEV_Pass"/>
  110. </xsl:when>
  111. <xsl:when test="$lvl = 2">
  112. <xsl:value-of select="$vpQA_Pass"/>
  113. </xsl:when>
  114. <xsl:when test="$lvl = 3">
  115. <xsl:value-of select="$vpPRD_Pass"/>
  116. </xsl:when>
  117. <xsl:otherwise>
  118. <xsl:value-of select="$vpDEV_Pass"/>
  119. </xsl:otherwise>
  120. </xsl:choose>
  121. </xsl:variable>
  122. <call xmlns="">
  123. <SOAPAction>http://sap.com/xi/WebService/soap1.1</SOAPAction>
  124. <connect serviceport="HTTP_Port">
  125. <destProtocol>http</destProtocol>
  126. <destHost>
  127. <xsl:value-of select="$url"/>
  128. </destHost>
  129. <destPort>
  130. <xsl:value-of select="$port"/>
  131. </destPort>
  132. <!--<destPath>
  133. /XISOAPAdapter/MessageServlet?senderParty=&amp;senderService=BC_Business_One&amp;receiverParty=&amp;receiverService=&amp;interface=<xsl:value-of select="$msg/Msg/type"></xsl:value-of>
  134. &amp;interfaceNamespace=http%3A%2F%2Fwww.businessone.com.br%2F</destPath>
  135. -->
  136. <!--<destPath>
  137. /XISOAPAdapter/MessageServlet?senderParty=&amp;senderService=BC_Business_One&amp;receiverParty=&amp;receiverService=&amp;interface=<xsl:value-of select="$msg/Msg/type"></xsl:value-of>
  138. &amp;interfaceNamespace=http%3A%2F%2Fwww.businessone.com.br%2F</destPath>
  139. -->
  140. <!--<destPath>/XISOAPAdapter/MessageServlet</destPath>
  141. -->
  142. <!--<query>
  143. senderParty=&amp;senderService=BC_Business_One&amp;receiverParty=&amp;receiverService=&amp;interface=<xsl:value-of select="$msg/Msg/type"/>
  144. &amp;interfaceNamespace=http%3A%2F%2Fwww.businessone.com.br%2F</query>
  145. -->
  146. <destPath>
  147. /XISOAPAdapter/MessageServlet?senderParty=&amp;senderService=BC_Business_One&amp;receiverParty=&amp;receiverService=&amp;interface=<xsl:value-of select="$msg/Msg/type"/>
  148. &amp;interfaceNamespace=http%3A%2F%2Fwww.businessone.com.br%2F
  149. </destPath>
  150. <proxyHost>proxy.perdigao.com.br</proxyHost>
  151. <proxyPort>80</proxyPort>
  152. <authentification>basic</authentification>
  153. <user>
  154. <xsl:value-of select="$user"/>
  155. </user>
  156. <!-- <password>brf@2016</password>
  157. -->
  158. <password>
  159. <xsl:value-of select="$pass"/>
  160. </password>
  161. <trustStoreURI/>
  162. <keyStoreURI/>
  163. </connect>
  164. <xsl:variable name="event" select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role=&apos;T&apos;]/Event/b1e:b1events/b1e:b1event"/>
  165. <xsl:variable name="bo" select="$msg/BOM/BO"/>
  166. <xsl:variable name="origem">
  167. <xsl:choose>
  168. <xsl:when test="$bo/BusinessPartners/row/U_BRF_MD_BPIDTF = &apos;CLI&apos;">CLI</xsl:when>
  169. <xsl:when test="$bo/BusinessPartners/row/U_BRF_MD_BPIDTF = &apos;FOR&apos;">FOR</xsl:when>
  170. </xsl:choose>
  171. </xsl:variable>
  172. <xsl:variable name="tipo">
  173. <xsl:choose>
  174. <xsl:when test="$event/b1e:transactiontype = &apos;U&apos;">A</xsl:when>
  175. <xsl:when test="$event/b1e:transactiontype = &apos;A&apos;">I</xsl:when>
  176. <xsl:when test="$event/b1e:transactiontype = &apos;D&apos;">E</xsl:when>
  177. </xsl:choose>
  178. </xsl:variable>
  179. <payload xmlns:bus="http://www.businessone.com.br/" operation="">
  180. <bus:MT_CARREGA_CLIENTE_FORNECEDOR>
  181. <I_FORNECEDOR/>
  182. <I_ZG001>
  183. <!--Zero or more repetitions:-->
  184. <item>
  185. <!--Optional:-->
  186. <ORIGEM>
  187. <xsl:value-of select="$origem"/>
  188. </ORIGEM>
  189. <!--Optional:-->
  190. <TIPO>
  191. <xsl:value-of select="$tipo"/>
  192. </TIPO>
  193. <!--Optional:-->
  194. <STATUS>X</STATUS>
  195. <!--Optional:-->
  196. <EXCLUIT/>
  197. <!--Optional:-->
  198. <PENDENCIA/>
  199. <!--Optional:-->
  200. <GRCONT/>
  201. <!--Optional:-->
  202. <CPOSTAL/>
  203. <!--Optional:-->
  204. <USR_GEFIL/>
  205. <!--Optional:-->
  206. <STATATEND>9</STATATEND>
  207. <!--Optional:-->
  208. <ID_USR>
  209. <xsl:value-of select="$event/b1e:userid"/>
  210. </ID_USR>
  211. </item>
  212. </I_ZG001>
  213.  
  214.  
  215.  
  216. <xsl:choose>
  217. <xsl:when test="$bo/BusinessPartners/row/U_BRF_MD_BPIDTF = &apos;FOR&apos;">
  218. <xsl:element name="I_ZG004">
  219. <!--Zero or more repetitions:-->
  220. <item>
  221. <!--Optional:-->
  222. <ORIGEM>
  223. <xsl:value-of select="$origem"/>
  224. </ORIGEM>
  225. <!--Optional:-->
  226. <TIPO>
  227. <xsl:value-of select="$tipo"/>
  228. </TIPO>
  229. <!--Optional:-->
  230. <SIGLA>
  231. <xsl:value-of select="$event/b1e:userid"/>
  232. </SIGLA>
  233. <!--Optional:-->
  234. <FONE>
  235. <xsl:value-of select="/vpf:Msg/vpf:Body/vpf:Payload[id=&apos;atom5&apos;]/jdbc:ResultSet/jdbc:Row/jdbc:PortNum"/>
  236. </FONE>
  237. <!--Optional:-->
  238. <BUKRS>
  239. <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_BUKRS"/>
  240. </BUKRS>
  241. <!--Optional:-->
  242. <EKORG>
  243. <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_PurOrg"/>
  244. </EKORG>
  245. <!--Optional:-->
  246. <KTOKK>
  247. <xsl:value-of select="$bo/BusinessPartners/row/GroupCode"/>
  248. </KTOKK>
  249. <!--Optional:-->
  250. <LIFNR>
  251. <xsl:choose>
  252. <xsl:when test="$event/b1e:transactiontype = &apos;U&apos;">
  253. <xsl:value-of select="$bo/BusinessPartners/row/CardCode"/>
  254. </xsl:when>
  255. <xsl:otherwise/>
  256. </xsl:choose>
  257. </LIFNR>
  258. <!--Optional:-->
  259. <NAME1>
  260. <xsl:value-of select="substring($bo/BusinessPartners/row/AliasName,1,34)"/>
  261. </NAME1>
  262. <!--Optional:-->
  263. <NAME2>
  264. <xsl:value-of select="substring($bo/BusinessPartners/row/AliasName,35,69)"/>
  265. </NAME2>
  266. <!--Optional:-->
  267. <STRAS/>
  268. <!--Optional:-->
  269. <STRAS2/>
  270. <!--Optional:-->
  271. <ORT02/>
  272. <!--Optional:-->
  273. <PSTLZ>
  274. <xsl:value-of select="$bo/BusinessPartners/row/ZipCode"/>
  275. </PSTLZ>
  276. <!--Optional:-->
  277. <ORT01/>
  278. <!--Optional:-->
  279. <LAND1>
  280. <xsl:value-of select="$bo/BusinessPartners/row/Country"/>
  281. </LAND1>
  282. <!--Optional:-->
  283. <REGIO/>
  284. <!--Optional:-->
  285. <TELF1>
  286. <xsl:value-of select="$bo/BusinessPartners/row/Phone1"/>
  287. </TELF1>
  288. <!--Optional:-->
  289. <TELFX>
  290. <xsl:value-of select="$bo/BusinessPartners/row/Fax"/>
  291. </TELFX>
  292. <!--Optional:-->
  293. <EMAIL>
  294. <xsl:value-of select="$bo/BusinessPartners/row/EmailAddress"/>
  295. </EMAIL>
  296. <!--Optional:-->
  297. <STKZN/>
  298. <!--Optional:-->
  299. <STCD1>
  300. <xsl:value-of select="$bo/BusinessPartners/row/LicTradeNum"/>
  301. </STCD1>
  302. <!--Optional:-->
  303. <STCD2/>
  304. <!--Optional:-->
  305. <STCD3/>
  306. <!--Optional:-->
  307. <OBSER/>
  308. <!--Optional:-->
  309. <CAD_ERNAM/>
  310. <!--Optional:-->
  311. <CAD_NAME/>
  312. <!--Optional:-->
  313. <CAD_ERDAT/>
  314. <!--Optional:-->
  315. <CAD_HORA/>
  316. <!--Optional:-->
  317. <CAD_OBSER01/>
  318. <!--Optional:-->
  319. <CAD_OBSER02/>
  320. <!--Optional:-->
  321. <HOUSE_NUM1/>
  322. <!--Optional:-->
  323. <TXJCD/>
  324. <!--Optional:-->
  325. <ZWELS/>
  326. <!--Optional:-->
  327. <AKONT>
  328. <xsl:value-of select="$bo/BusinessPartners/row/DebPayAcct"/>
  329. </AKONT>
  330. <!--Optional:-->
  331. <FDGRV>
  332. <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_PlanGrp"/>
  333. </FDGRV>
  334. <!--Optional:-->
  335. <BRSCH/>
  336. <!--Optional:-->
  337. <INCO1>
  338. <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_INCO1"/>
  339. </INCO1>
  340. <!--Optional:-->
  341. <INCO2>
  342. <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_INCO2"/>
  343. </INCO2>
  344. <!--Optional:-->
  345. <ZTERMC/>
  346. <!--Optional:-->
  347. <ZTERME/>
  348. <!--Optional:-->
  349. <LNRZB/>
  350. <!--Optional:-->
  351. <HBKID/>
  352. <!--Optional:-->
  353. <INTAD/>
  354. <!--Optional:-->
  355. <WITHT/>
  356. <!--Optional:-->
  357. <WT_WITHCD/>
  358. <!--Optional:-->
  359. <WT_SUBJCT/>
  360. <!--Optional:-->
  361. <STCDT/>
  362. <!--Optional:-->
  363. <FITYP/>
  364. <!--Optional:-->
  365. <REGIOGROUP/>
  366. <!--Optional:-->
  367. <STCEG/>
  368. <!--Optional:-->
  369. <DT_EMISS_CR/>
  370. <!--Optional:-->
  371. <DT_VCTO_CR/>
  372. <!--Optional:-->
  373. <DT_EMISS_BALAD/>
  374. <!--Optional:-->
  375. <DT_VCTO_BALAD/>
  376. <!--Optional:-->
  377. <DTIQAMA/>
  378. <!--Optional:-->
  379. <SORT1>
  380. <xsl:choose>
  381. <xsl:when test="$event/b1e:transactiontype = &apos;A&apos;">
  382. <xsl:value-of select="$bo/BusinessPartners/row/CardCode"/>
  383. </xsl:when>
  384. <xsl:otherwise/>
  385. </xsl:choose>
  386. </SORT1>
  387. <!--Optional:-->
  388. <ZDTNASC/>
  389. </item>
  390. </xsl:element>
  391. <I_ZG006>
  392. <!--Zero or more repetitions:-->
  393. <item>
  394. <!--Optional:-->
  395. <ORIGEM/>
  396. <!--Optional:-->
  397. <TIPO/>
  398. <!--Optional:-->
  399. <NAME1/>
  400. <!--Optional:-->
  401. <NAME2/>
  402. <!--Optional:-->
  403. <STKZN/>
  404. <!--Optional:-->
  405. <STCD1/>
  406. <!--Optional:-->
  407. <STCD2/>
  408. <!--Optional:-->
  409. <STCD3/>
  410. <!--Optional:-->
  411. <STRAS/>
  412. <!--Optional:-->
  413. <HOUSE_NUM1/>
  414. <!--Optional:-->
  415. <HOUSE_NUM2/>
  416. <!--Optional:-->
  417. <STRAS1/>
  418. <!--Optional:-->
  419. <ORT02/>
  420. <!--Optional:-->
  421. <PSTLZ/>
  422. <!--Optional:-->
  423. <ORT01/>
  424. <!--Optional:-->
  425. <LAND1/>
  426. <!--Optional:-->
  427. <REGIO/>
  428. <!--Optional:-->
  429. <PFACH/>
  430. <!--Optional:-->
  431. <TELF1/>
  432. <!--Optional:-->
  433. <TELFX/>
  434. <!--Optional:-->
  435. <EMAIL/>
  436. <!--Optional:-->
  437. <KUNNR/>
  438. <!--Optional:-->
  439. <BUKRS/>
  440. <!--Optional:-->
  441. <VKORG/>
  442. <!--Optional:-->
  443. <VTWEG/>
  444. <!--Optional:-->
  445. <SPART/>
  446. <!--Optional:-->
  447. <KTOKD/>
  448. <!--Optional:-->
  449. <NAMEV_CONT/>
  450. <!--Optional:-->
  451. <SOBNAME_CONT/>
  452. <!--Optional:-->
  453. <TELF_CONT/>
  454. <!--Optional:-->
  455. <EMAI_CONT/>
  456. <!--Optional:-->
  457. <SIGLA/>
  458. <!--Optional:-->
  459. <NAME_USER/>
  460. <!--Optional:-->
  461. <FONE/>
  462. <!--Optional:-->
  463. <OBSER/>
  464. <!--Optional:-->
  465. <CAD_ERNAM/>
  466. <!--Optional:-->
  467. <CAD_NAME/>
  468. <!--Optional:-->
  469. <CAD_ERSDA/>
  470. <!--Optional:-->
  471. <CAD_HORA/>
  472. <!--Optional:-->
  473. <CAD_OBSER01/>
  474. <!--Optional:-->
  475. <CAD_OBSER02/>
  476. <!--Optional:-->
  477. <ENVIOFIN/>
  478. <!--Optional:-->
  479. <CFOPC/>
  480. <!--Optional:-->
  481. <HBKID/>
  482. <!--Optional:-->
  483. <PAFKT/>
  484. <!--Optional:-->
  485. <STCEG/>
  486. <!--Optional:-->
  487. <XSUBT/>
  488. <!--Optional:-->
  489. <CNAE/>
  490. <!--Optional:-->
  491. <TIME_ZONE/>
  492. <!--Optional:-->
  493. <STCDT/>
  494. <!--Optional:-->
  495. <FITYP/>
  496. <!--Optional:-->
  497. <REGIOGROUP/>
  498. <!--Optional:-->
  499. <DT_EMIT_CR/>
  500. <!--Optional:-->
  501. <DT_EXP_CR/>
  502. <!--Optional:-->
  503. <REG_MUNICIPIO/>
  504. <!--Optional:-->
  505. <DT_EMIT_BALADYIA/>
  506. <!--Optional:-->
  507. <DT_EXP_BALADYIA/>
  508. <!--Optional:-->
  509. <DT_EXP_IQAMA/>
  510. <!--Optional:-->
  511. <SORT1/>
  512. <!--Optional:-->
  513. <NAME3/>
  514. <!--Optional:-->
  515. <NAME4/>
  516. <!--Optional:-->
  517. <DTNASC/>
  518. </item>
  519. </I_ZG006>
  520. </xsl:when>
  521. <xsl:when test="$bo/BusinessPartners/row/U_BRF_MD_BPIDTF = &apos;CLI&apos;">
  522. <I_ZG006>
  523. <!--Zero or more repetitions:-->
  524. <item>
  525. <!--Optional:-->
  526. <ORIGEM>CLI</ORIGEM>
  527. <!--Optional:-->
  528. <TIPO>
  529. <xsl:value-of select="$tipo"/>
  530. </TIPO>
  531. <!--Optional:-->
  532. <NAME1>
  533. <xsl:value-of select="substring($bo/BusinessPartners/row/AliasName,1,34)"></xsl:value-of>
  534. </NAME1>
  535. <!--Optional:-->
  536. <NAME2>
  537. <xsl:value-of select="substring($bo/BusinessPartners/row/AliasName,35,69)"></xsl:value-of>
  538. </NAME2>
  539. <!--Optional:-->
  540. <STKZN/>
  541. <!--Optional:-->
  542. <STCD1>
  543. <xsl:value-of select="$bo/BusinessPartners/row/LicTradeNum"></xsl:value-of>
  544. </STCD1>
  545. <!--Optional:-->
  546. <STCD2/>
  547. <!--Optional:-->
  548. <STCD3/>
  549. <!--Optional:-->
  550. <STRAS/>
  551. <!--Optional:-->
  552. <HOUSE_NUM1/>
  553. <!--Optional:-->
  554. <HOUSE_NUM2/>
  555. <!--Optional:-->
  556. <STRAS1/>
  557. <!--Optional:-->
  558. <ORT02/>
  559. <!--Optional:-->
  560. <PSTLZ>
  561. <xsl:value-of select="$bo/BusinessPartners/row/ZipCode"></xsl:value-of>
  562. </PSTLZ>
  563. <!--Optional:-->
  564. <ORT01/>
  565. <!--Optional:-->
  566. <LAND1>
  567. <xsl:value-of select="$bo/BusinessPartners/row/Country"></xsl:value-of>
  568. </LAND1>
  569. <!--Optional:-->
  570. <REGIO/>
  571. <!--Optional:-->
  572. <PFACH/>
  573. <!--Optional:-->
  574. <TELF1>
  575. <xsl:value-of select="$bo/BusinessPartners/row/Phone1"></xsl:value-of>
  576. </TELF1>
  577. <!--Optional:-->
  578. <TELFX>
  579. <xsl:value-of select="$bo/BusinessPartners/row/Fax"></xsl:value-of>
  580. </TELFX>
  581. <!--Optional:-->
  582. <EMAIL>
  583. <xsl:value-of select="$bo/BusinessPartners/row/EmailAddress"></xsl:value-of>
  584. </EMAIL>
  585. <!--Optional:-->
  586. <KUNNR/>
  587. <!--Optional:-->
  588. <BUKRS>
  589. <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_BUKRS"></xsl:value-of>
  590. </BUKRS>
  591. <!--Optional:-->
  592. <VKORG>
  593. <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_SalOrg"></xsl:value-of>
  594. </VKORG>
  595. <!--Optional:-->
  596. <VTWEG>
  597. <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>
  598. </VTWEG>
  599. <!--Optional:-->
  600. <SPART>
  601. <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>
  602. </SPART>
  603. <!--Optional:-->
  604. <KTOKD>
  605. <xsl:value-of select="$bo/BusinessPartners/row/Properties">
  606. </KTOKD>
  607. <!--Optional:-->
  608. <NAMEV_CONT/>
  609. <!--Optional:-->
  610. <SOBNAME_CONT/>
  611. <!--Optional:-->
  612. <TELF_CONT/>
  613. <!--Optional:-->
  614. <EMAI_CONT/>
  615. <!--Optional:-->
  616. <SIGLA/>
  617. <!--Optional:-->
  618. <NAME_USER/>
  619. <!--Optional:-->
  620. <FONE/>
  621. <!--Optional:-->
  622. <OBSER/>
  623. <!--Optional:-->
  624. <CAD_ERNAM/>
  625. <!--Optional:-->
  626. <CAD_NAME/>
  627. <!--Optional:-->
  628. <CAD_ERSDA/>
  629. <!--Optional:-->
  630. <CAD_HORA/>
  631. <!--Optional:-->
  632. <CAD_OBSER01/>
  633. <!--Optional:-->
  634. <CAD_OBSER02/>
  635. <!--Optional:-->
  636. <ENVIOFIN/>
  637. <!--Optional:-->
  638. <CFOPC/>
  639. <!--Optional:-->
  640. <HBKID/>
  641. <!--Optional:-->
  642. <PAFKT/>
  643. <!--Optional:-->
  644. <STCEG/>
  645. <!--Optional:-->
  646. <XSUBT/>
  647. <!--Optional:-->
  648. <CNAE/>
  649. <!--Optional:-->
  650. <TIME_ZONE/>
  651. <!--Optional:-->
  652. <STCDT/>
  653. <!--Optional:-->
  654. <FITYP/>
  655. <!--Optional:-->
  656. <REGIOGROUP/>
  657. <!--Optional:-->
  658. <DT_EMIT_CR/>
  659. <!--Optional:-->
  660. <DT_EXP_CR/>
  661. <!--Optional:-->
  662. <REG_MUNICIPIO/>
  663. <!--Optional:-->
  664. <DT_EMIT_BALADYIA/>
  665. <!--Optional:-->
  666. <DT_EXP_BALADYIA/>
  667. <!--Optional:-->
  668. <DT_EXP_IQAMA/>
  669. <!--Optional:-->
  670. <SORT1/>
  671. <!--Optional:-->
  672. <NAME3/>
  673. <!--Optional:-->
  674. <NAME4/>
  675. <!--Optional:-->
  676. <DTNASC/>
  677. </item>
  678. </I_ZG006>
  679. <I_ZG004>
  680. <!--Zero or more repetitions:-->
  681. <item>
  682. <!--Optional:-->
  683. <ORIGEM/>
  684. <!--Optional:-->
  685. <TIPO/>
  686. <!--Optional:-->
  687. <SIGLA/>
  688. <!--Optional:-->
  689. <FONE/>
  690. <!--Optional:-->
  691. <BUKRS/>
  692. <!--Optional:-->
  693. <EKORG/>
  694. <!--Optional:-->
  695. <KTOKK/>
  696. <!--Optional:-->
  697. <LIFNR/>
  698. <!--Optional:-->
  699. <NAME1/>
  700. <!--Optional:-->
  701. <NAME2/>
  702. <!--Optional:-->
  703. <STRAS/>
  704. <!--Optional:-->
  705. <STRAS2/>
  706. <!--Optional:-->
  707. <ORT02/>
  708. <!--Optional:-->
  709. <PSTLZ/>
  710. <!--Optional:-->
  711. <ORT01/>
  712. <!--Optional:-->
  713. <LAND1/>
  714. <!--Optional:-->
  715. <REGIO/>
  716. <!--Optional:-->
  717. <TELF1/>
  718. <!--Optional:-->
  719. <TELFX/>
  720. <!--Optional:-->
  721. <EMAIL/>
  722. <!--Optional:-->
  723. <STKZN/>
  724. <!--Optional:-->
  725. <STCD1/>
  726. <!--Optional:-->
  727. <STCD2/>
  728. <!--Optional:-->
  729. <STCD3/>
  730. <!--Optional:-->
  731. <OBSER/>
  732. <!--Optional:-->
  733. <CAD_ERNAM/>
  734. <!--Optional:-->
  735. <CAD_NAME/>
  736. <!--Optional:-->
  737. <CAD_ERDAT/>
  738. <!--Optional:-->
  739. <CAD_HORA/>
  740. <!--Optional:-->
  741. <CAD_OBSER01/>
  742. <!--Optional:-->
  743. <CAD_OBSER02/>
  744. <!--Optional:-->
  745. <HOUSE_NUM1/>
  746. <!--Optional:-->
  747. <TXJCD/>
  748. <!--Optional:-->
  749. <ZWELS/>
  750. <!--Optional:-->
  751. <AKONT/>
  752. <!--Optional:-->
  753. <FDGRV/>
  754. <!--Optional:-->
  755. <BRSCH/>
  756. <!--Optional:-->
  757. <INCO1/>
  758. <!--Optional:-->
  759. <INCO2/>
  760. <!--Optional:-->
  761. <ZTERMC/>
  762. <!--Optional:-->
  763. <ZTERME/>
  764. <!--Optional:-->
  765. <LNRZB/>
  766. <!--Optional:-->
  767. <HBKID/>
  768. <!--Optional:-->
  769. <INTAD/>
  770. <!--Optional:-->
  771. <WITHT/>
  772. <!--Optional:-->
  773. <WT_WITHCD/>
  774. <!--Optional:-->
  775. <WT_SUBJCT/>
  776. <!--Optional:-->
  777. <STCDT/>
  778. <!--Optional:-->
  779. <FITYP/>
  780. <!--Optional:-->
  781. <REGIOGROUP/>
  782. <!--Optional:-->
  783. <STCEG/>
  784. <!--Optional:-->
  785. <DT_EMISS_CR/>
  786. <!--Optional:-->
  787. <DT_VCTO_CR/>
  788. <!--Optional:-->
  789. <DT_EMISS_BALAD/>
  790. <!--Optional:-->
  791. <DT_VCTO_BALAD/>
  792. <!--Optional:-->
  793. <DTIQAMA/>
  794. <!--Optional:-->
  795. <SORT1/>
  796. <!--Optional:-->
  797. <ZDTNASC/>
  798. </item>
  799. </I_ZG004>
  800. </xsl:when>
  801.  
  802. </xsl:choose>
  803.  
  804.  
  805. <I_ZG005>
  806. <xsl:for-each select="$bo/BPBankAccounts/row">
  807. <!--Zero or more repetitions:-->
  808. <item>
  809. <!--Optional:-->
  810. <ORIGEM>
  811. <xsl:value-of select="$origem"/>
  812. </ORIGEM>
  813. <!--Optional:-->
  814. <TIPO>
  815. <xsl:value-of select="$tipo"/>
  816. </TIPO>
  817. <!--Optional:-->
  818. <BANCO>
  819. <xsl:value-of select="./BankCode"/>
  820. </BANCO>
  821. <!--Optional:-->
  822. <AGENCIA/>
  823. <!--Optional:-->
  824. <xsl:variable name="contaLen" select="string-length(./row/Account)"/>
  825. <CONTA>
  826. <xsl:value-of select="substring(./Account,$contaLen - 18,$contaLen)"/>
  827. </CONTA>
  828. <!--Optional:-->
  829. <TITULAR/>
  830. <!--Optional:-->
  831. <TPBN/>
  832. <!--Optional:-->
  833. <BKREF>
  834. <xsl:value-of select="substring(./Account,1,$contaLen - 18)"/>
  835. </BKREF>
  836. <!--Optional:-->
  837. <IBAN/>
  838. <!--Optional:-->
  839. <SWIFT>?</SWIFT>
  840. <!--Optional:-->
  841. <BANKA>?</BANKA>
  842. </item>
  843. </xsl:for-each>
  844. </I_ZG005>
  845. <xsl:if test="$bo/BusinessPartners/row/U_BRF_MD_BPIDTF = &apos;CLI&apos;">
  846. <I_ZG007>
  847. <!--Zero or more repetitions:-->
  848. <item>
  849. <!--Optional:-->
  850. <ORIGEM>
  851. <xsl:value-of select="$origem"/>
  852. </ORIGEM>
  853. <!--Optional:-->
  854. <TIPO>
  855. <xsl:value-of select="$tipo"/>
  856. </TIPO>
  857. <!--Optional:-->
  858. <LZONE/>
  859. <!--Optional:-->
  860. <ABLAD/>
  861. <!--Optional:-->
  862. <DISTANCIA/>
  863. <!--Optional:-->
  864. <CIRCULA/>
  865. <!--Optional:-->
  866. <TPVEIC/>
  867. <!--Optional:-->
  868. <KNFAK/>
  869. <!--Optional:-->
  870. <HORREC/>
  871. <!--Optional:-->
  872. <SEGUNDA/>
  873. <!--Optional:-->
  874. <TERCA/>
  875. <!--Optional:-->
  876. <QUARTA/>
  877. <!--Optional:-->
  878. <QUINTA/>
  879. <!--Optional:-->
  880. <SEXTA>?</SEXTA>
  881. <!--Optional:-->
  882. <SABADO/>
  883. <!--Optional:-->
  884. <DOMINGO/>
  885. <!--Optional:-->
  886. <EQUIP_DESC/>
  887. <!--Optional:-->
  888. <GEOCODE/>
  889. <!--Optional:-->
  890. <TIPO_CAMINHAO/>
  891. </item>
  892. </I_ZG007>
  893. <I_ZG008>
  894. <!--Zero or more repetitions:-->
  895. <item>
  896. <!--Optional:-->
  897. <ORIGEM>
  898. <xsl:value-of select="$origem"/>
  899. </ORIGEM>
  900. <!--Optional:-->
  901. <TIPO>
  902. <xsl:value-of select="$tipo"/>
  903. </TIPO>
  904. <!--Optional:-->
  905. <SEGUNDA/>
  906. <!--Optional:-->
  907. <TERCA/>
  908. <!--Optional:-->
  909. <QUARTA/>
  910. <!--Optional:-->
  911. <QUINTA/>
  912. <!--Optional:-->
  913. <SEXTA/>
  914. <!--Optional:-->
  915. <SABADO/>
  916. <!--Optional:-->
  917. <DOMINGO/>
  918. <!--Optional:-->
  919. <HORAVEND/>
  920. <!--Optional:-->
  921. <BANCO/>
  922. <!--Optional:-->
  923. <AGENCIA/>
  924. <!--Optional:-->
  925. <xsl:variable name="contaLen" select="string-length($bo/BPBankAccounts/row/Account)"/>
  926. <CONTA>
  927. <xsl:value-of select="substring($bo/BusinessPartners/row/Account,$contaLen - 18,$contaLen)"/>
  928. </CONTA>
  929. <!--Optional:-->
  930. <TITULAR/>
  931. <xsl:value-of select="$bo/BusinessPartners/row/AccountName"/>
  932. <STRAS1/>
  933. <!--Optional:-->
  934. <STRAS2/>
  935. <!--Optional:-->
  936. <STRAS3/>
  937. <!--Optional:-->
  938. <STRAS4/>
  939. <!--Optional:-->
  940. <STRAS5/>
  941. <!--Optional-->
  942. <STRAS6/>
  943. <!--Optional:-->
  944. <STRAS7/>
  945. <!--Optional:-->
  946. <MPKUNNR/>
  947. <!--Optional:-->
  948. <PTREF/>
  949. <!--Optional:-->
  950. <LOCALA/>
  951. <!--Optional:-->
  952. <LOCALB/>
  953. <!--Optional:-->
  954. <LOCALC/>
  955. <!--Optional:-->
  956. <LOCALD/>
  957. <!--Optional:-->
  958. <LOCALE/>
  959. <!--Optional:-->
  960. <LOCALF/>
  961. <!--Optional:-->
  962. <ZTERM>
  963. <xsl:value-of select="$bo/BusinessPartners/row/PayTermsGrpCode"/>
  964. </ZTERM>
  965. <!--Optional:-->
  966. <ZWELS>
  967. <xsl:value-of select="$bo/BusinessPartners/row/PeymentMethodCode"/>
  968. </ZWELS>
  969. <!--Optional:-->
  970. <KLIMK>
  971. <xsl:value-of select="$bo/BusinessPartners/row/CreditLimit"/>
  972. </KLIMK>
  973. <!--Optional:-->
  974. <BZIRK>
  975. <xsl:value-of select="$bo/BusinessPartners/row/Territory"/>
  976. </BZIRK>
  977. <!--Optional:-->
  978. <VKBUR>
  979. <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_SalOff"/>
  980. </VKBUR>
  981. <!--Optional:-->
  982. <VKGRP>
  983. <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_SalGrp"/>
  984. </VKGRP>
  985. <!--Optional:-->
  986. <KDGRP/>
  987. <!--Optional:-->
  988. <MSGNF/>
  989. <!--Optional:-->
  990. <REGESP/>
  991. <!--Optional:-->
  992. <REGESP1/>
  993. <!--Optional:-->
  994. <TXJCD/>
  995. <!--Optional:-->
  996. <LIFNR/>
  997. <!--Optional:-->
  998. <BRSCH>
  999. <xsl:value-of select="$bo/BusinessPartners/row/Industry"/>
  1000. </BRSCH>
  1001. <!--Optional:-->
  1002. <NIELS/>
  1003. <!--Optional:-->
  1004. <WAERS>
  1005. <xsl:choose>
  1006. <xsl:when test="$bo/BusinessPartners/row/Currency = &apos;RMB&apos;">
  1007. CNY
  1008. </xsl:when>
  1009. <xsl:otherwise>
  1010. <xsl:value-of select="$bo/BusinessPartners/row/Currency"/>
  1011. </xsl:otherwise>
  1012. </xsl:choose>
  1013. </WAERS>
  1014. <!--Optional:-->
  1015. <KONDA/>
  1016. <!--Optional:-->
  1017. <KALKS/>
  1018. <!--Optional:-->
  1019. <PLTYP>
  1020. <xsl:value-of select="$bo/BusinessPartners/row/PriceListNum"/>
  1021. </PLTYP>
  1022. <!--Optional:-->
  1023. <VERSG/>
  1024. <!--Optional:-->
  1025. <LPRIO>
  1026. <xsl:choose>
  1027. <xsl:when test="$bo/BusinessPartners/row/Priority = &apos;&apos;">
  1028. <xsl:value-of select="&apos;&apos;"/>
  1029. </xsl:when>
  1030. <xsl:otherwise>
  1031. <xsl:value-of select="$bo/BusinessPartners/row/Priority"/>
  1032. </xsl:otherwise>
  1033. </xsl:choose>
  1034. </LPRIO>
  1035. <!--Optional:-->
  1036. <VSBED>
  1037. <xsl:value-of select="$bo/BusinessPartners/row/ShippingType"/>
  1038. </VSBED>
  1039. <!--Optional:-->
  1040. <VWERK/>
  1041. <!--Optional:-->
  1042. <INCO1>
  1043. <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_INCO1"/>
  1044. </INCO1>
  1045. <!--Optional:-->
  1046. <INCO2>
  1047. <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_INCO2"/>
  1048. </INCO2>
  1049. <!--Optional:-->
  1050. <KTGRD/>
  1051. <!--Optional:-->
  1052. <TAXKD/>
  1053. <!--Optional:-->
  1054. <AKONT>
  1055. <xsl:value-of select="$bo/BusinessPartners/row/DebitorAccount"/>
  1056. </AKONT>
  1057. <!--Optional:-->
  1058. <FDGRV>
  1059. <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_PlanGrp"/>
  1060. </FDGRV>
  1061. <!--Optional:-->
  1062. <VZSKZ>
  1063. <xsl:value-of select="$bo/BusinessPartners/row/IntrestRatePercent"/>
  1064. </VZSKZ>
  1065. <!--Optional:-->
  1066. <SIGLA>
  1067. B1<xsl:value-of select="substring($event/b1e:userid,1,3)"/>
  1068. </SIGLA>
  1069. <!--Optional:-->
  1070. <NAME_USER>
  1071. <xsl:value-of select="$bo/BusinessPartners/row/AliasName"/>
  1072. </NAME_USER>
  1073. <!--Optional:-->
  1074. <FONE>
  1075. <xsl:value-of select="/vpf:Msg/vpf:Body/vpf:Payload[id=&apos;atom5&apos;]/jdbc:ResultSet/jdbc:Row/jdbc:PortNum"/>
  1076. </FONE>
  1077. <!--Optional:-->
  1078. <OBSER/>
  1079. <!--Optional:-->
  1080. <KDKG3/>
  1081. <!--Optional:-->
  1082. <KVGR4>
  1083. <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_KVGR4"/>
  1084. </KVGR4>
  1085. <!--Optional:-->
  1086. <KVGR5>
  1087. <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_KVGR5"/>
  1088. </KVGR5>
  1089. <!--Optional:-->
  1090. <BRYTH/>
  1091. <!--Optional:-->
  1092. <KZAZU/>
  1093. <!--Optional:-->
  1094. <KATR6>
  1095. <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_KVGR6"/>
  1096. </KATR6>
  1097. <!--Optional:-->
  1098. <KATR7>
  1099. <xsl:value-of select="$bo/BusinessPartners/row/U_BRF_MD_KVGR7"/>
  1100. </KATR7>
  1101. <!--Optional:-->
  1102. <CRNUMERO/>
  1103. <!--Optional:-->
  1104. <AREA_VENDAS/>
  1105. <!--Optional:-->
  1106. <QTDECLI/>
  1107. <!--Optional:-->
  1108. <KATR3/>
  1109. <!--Optional:-->
  1110. <KATR4/>
  1111. <!--Optional:-->
  1112. <KATR5/>
  1113. <!--Optional:-->
  1114. <IBAN>
  1115. <xsl:value-of select="$bo/BPBankAccounts/row/IBAN"/>
  1116. </IBAN>
  1117. <!--Optional:-->
  1118. <SWIFT>
  1119. <xsl:value-of select="$bo/BPBankAccounts/row/BICSwiftCode"/>
  1120. </SWIFT>
  1121. <!--Optional:-->
  1122. <BANKA/>
  1123. <!--Optional:-->
  1124. <ZDATA_ABERTURA/>
  1125. <!--Optional:-->
  1126. <ZNATUREZA/>
  1127. <!--Optional:-->
  1128. <ZOPCTRIB/>
  1129. </item>
  1130. </I_ZG008>
  1131. </xsl:if>
  1132. </bus:MT_CARREGA_CLIENTE_FORNECEDOR>
  1133. </payload>
  1134. <query id="httpheader.???" value=""/>
  1135. </call>
  1136. </xsl:template>
  1137. </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement