on 10-28-2014 5:27 PM
Hi Experts,
I have created scenario for B1if PO2SO which is working fine but each time I update PO in source company it is not updating in target but it is creating new SO on target company.
Can anyone advise on this please?
Thanks,
Bhavank
Hi,
an exchange of Customer/Vendor Reference number (NumAtCard) is such an approach.
As result you always know, if a change of the original PO needs to change or create a SO.
The data retrieval to find the correct SO for update could be done with a SQL atom.
Best regards
Bastian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bastian,
I have already map PO number (DocEntry*DocNum) into field NumAtCard of SO. I can implement a successor step SO2PO to update your original PO with the created SO number (DocEntry*DocNum).
I dont know how to manage this within SQL Atom, Can you please advise on this more?
Thanks,
Bhavank
Hello Bastian,
I am stuck up with the updation process in B1PO2B1SO. When Creating a PO in the Source DB, it gets updated as SO in the Destination DB. Insertion takes place without any complaints.
But while updating a particular PO, it gets created as a new SO in the Outbound.
Please come up with ur suggestions... It's urgnt..
Thanks,
KHAN
Hi Bastian,
Glad to see ur Reply instantly... But Can u pls be clear??? I am new to B1if.. Where should i make that Docentry? Below is my XSLT for Atom3.. Can u pls help me with this info???
<?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:output><xsl:param name="atom"></xsl:param><xsl:param name="sessionid"></xsl:param><xsl:variable name="msg" select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role='S']"></xsl:variable><xsl:variable name="vpSender" select="/vpf:Msg/vpf:Header/vpf:Sender/@Id"></xsl:variable><xsl:variable name="vpObject" select="/vpf:Msg/vpf:Header/vpf:Sender/@ObjId"></xsl:variable><xsl:variable name="vpReceiver" select="/vpf:Msg/vpf:Header/vpf:ReceiverList/vpf:Receiver[./@handover='P']/@Id"></xsl:variable><xsl:template match="/">
<Msg xmlns="urn:com.sap.b1i.vplatform:entity">
<xsl:copy-of select="/vpf:Msg/@*"></xsl:copy-of>
<xsl:copy-of select="/vpf:Msg/vpf:Header"></xsl:copy-of>
<Body>
<xsl:copy-of select="/vpf:Msg/vpf:Body/*"></xsl:copy-of>
<Payload Role="X" id="{$atom}">
<xsl:call-template name="transform"></xsl:call-template>
</Payload>
</Body>
</Msg>
</xsl:template><xsl:template name="transform">
<xsl:variable name="DocEntryCode" select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role='S']/BOM/BO/Documents/row/DocEntry"></xsl:variable>
<xsl:variable name="DocNumCode" select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role='S']/BOM/BO/Documents/row/DocNum"></xsl:variable>
<xsl:variable name="ClientPO" select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role='S']/BOM/BO/Documents/row/NumAtCard"></xsl:variable>
<FinalAtomResult xmlns="">
<BOM>
<BO>
<AdmInfo>
<Object>17</Object>
<Version>2</Version>
</AdmInfo>
<Documents>
<row>
<CardCode>
<xsl:value-of select="/vpf:Msg/vpf:Body/vpf:Payload[@id='atom1']/row[./col[1]=$vpSender]/col[2]"></xsl:value-of>
</CardCode>
<Reference1>
<xsl:value-of select="$msg/BOM/BO/Documents/row/Reference1"></xsl:value-of>
</Reference1>
<Reference2>
<xsl:value-of select="$msg/BOM/BO/Documents/row/Reference2"></xsl:value-of>
</Reference2>
<Comments>
Based On PO(LMC): <xsl:value-of select="$msg/BOM/BO/Documents/row/DocNum"></xsl:value-of>
</Comments>
<DocDueDate>
<xsl:value-of select="$msg/BOM/BO/Documents/row/DocDueDate"></xsl:value-of>
</DocDueDate>
<NumAtCard>
<xsl:value-of select="$ClientPO"></xsl:value-of>
</NumAtCard>
</row>
</Documents>
<Document_Lines>
<xsl:for-each select="$msg/BOM/BO/Document_Lines/*">
<row>
<LineNum>
<xsl:value-of select="LineNum"></xsl:value-of>
</LineNum>
<ItemCode>
<xsl:value-of select="ItemCode"></xsl:value-of>
</ItemCode>
<Quantity>
<xsl:value-of select="Quantity"></xsl:value-of>
</Quantity>
<Price>
<xsl:value-of select="Price"></xsl:value-of>
</Price>
</row>
</xsl:for-each>
</Document_Lines>
</BO>
</BOM>
</FinalAtomResult>
</xsl:template></xsl:stylesheet>
Hi,
if you're doing the B1 update call via B1 object atom please enter the relevant key value of the receiver object into the UI. In the following screenshot you can see an example to update a specific existing Sales Order.
The Key Value has been dynamically read from a previous SQL call:
If you are doing the B1 call with the Outbound definition, you need to enter following segment into final mapping atom0:
Best regards
Bastian
Hi Bastian,
I didn't get any improvement. What you have mentioned for mapping the final atom 0 is atom 3 for me. I have made tag input for query params in my atom3 as you have given above.
And Regarding the XPath Expression, my payload atom is also atom3. If i give atom1 as a payload value, event is getting filtered.
I will show u how my atom0(final atom) and atom 3 look like.
FINAL ATOM(ATOM 0):
<?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="/bfa:unbranch/vpf:Msg[1]/vpf:Body/vpf:Payload[./@Role='S']"/>
<xsl:variable name="vpSender" select="/bfa:unbranch/vpf:Msg[1]/vpf:Header/vpf:Sender/@Id"/>
<xsl:variable name="vpObject" select="/bfa:unbranch/vpf:Msg[1]/vpf:Header/vpf:Sender/@ObjId"/>
<xsl:variable name="vpReceiver" select="/bfa:unbranch/vpf:Msg[1]/vpf:Header/vpf:ReceiverList/vpf:Receiver[./@handover='P']/@Id"/>
<xsl:template match="/">
<Msg xmlns="urn:com.sap.b1i.vplatform:entity">
<xsl:copy-of select="/bfa:unbranch/vpf:Msg/@*"/>
<xsl:copy-of select="/bfa:unbranch/vpf:Msg/vpf:Header"/>
<Body>
<xsl:copy-of select="/bfa:unbranch/vpf:Msg/vpf:Body/*"/>
<Payload Role="R" id="{$atom}">
<xsl:call-template name="transform"/>
</Payload>
</Body>
</Msg>
</xsl:template>
<xsl:template name="transform">
<xsl:copy-of select="/bfa:unbranch/vpf:Msg/vpf:Body/vpf:Payload/FinalAtomResult/*"/>
</xsl:template>
</xsl:stylesheet>
ATOM3:
<?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:output><xsl:param name="atom"></xsl:param><xsl:param name="sessionid"></xsl:param><xsl:variable name="msg" select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role='S']"></xsl:variable><xsl:variable name="vpSender" select="/vpf:Msg/vpf:Header/vpf:Sender/@Id"></xsl:variable><xsl:variable name="vpObject" select="/vpf:Msg/vpf:Header/vpf:Sender/@ObjId"></xsl:variable><xsl:variable name="vpReceiver" select="/vpf:Msg/vpf:Header/vpf:ReceiverList/vpf:Receiver[./@handover='P']/@Id"></xsl:variable><xsl:template match="/">
<Msg xmlns="urn:com.sap.b1i.vplatform:entity">
<xsl:copy-of select="/vpf:Msg/@*"></xsl:copy-of>
<xsl:copy-of select="/vpf:Msg/vpf:Header"></xsl:copy-of>
<Body>
<xsl:copy-of select="/vpf:Msg/vpf:Body/*"></xsl:copy-of>
<Payload Role="X" id="{$atom}">
<xsl:call-template name="transform"></xsl:call-template>
</Payload>
</Body>
</Msg>
</xsl:template><xsl:template name="transform">
<xsl:variable name="DocEntryCode" select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role='S']/BOM/BO/Documents/row/DocEntry"></xsl:variable>
<xsl:variable name="DocNumCode" select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role='S']/BOM/BO/Documents/row/DocNum"></xsl:variable>
<xsl:variable name="ClientPO" select="/vpf:Msg/vpf:Body/vpf:Payload[./@Role='S']/BOM/BO/Documents/row/NumAtCard"></xsl:variable>
<FinalAtomResult xmlns="">
<BOM>
<BO>
<AdmInfo>
<Object>17</Object>
<Version>2</Version>
</AdmInfo>
<QueryParams>
<DocEntry>
<xsl:value-of select="substring-before(BOM/BO/Documents/row/NumAtCard,'*')"></xsl:value-of>
</DocEntry>
</QueryParams>
<Documents>
<row>
<CardCode>
<xsl:value-of select="/vpf:Msg/vpf:Body/vpf:Payload[@id='atom1']/row[./col[1]=$vpSender]/col[2]"></xsl:value-of>
</CardCode>
<Reference1>
<xsl:value-of select="$msg/BOM/BO/Documents/row/Reference1"></xsl:value-of>
</Reference1>
<Reference2>
<xsl:value-of select="$msg/BOM/BO/Documents/row/Reference2"></xsl:value-of>
</Reference2>
<Comments>
Based On PO(LMC): <xsl:value-of select="$msg/BOM/BO/Documents/row/DocNum"></xsl:value-of>
</Comments>
<DocDueDate>
<xsl:value-of select="$msg/BOM/BO/Documents/row/DocDueDate"></xsl:value-of>
</DocDueDate>
<NumAtCard>
<xsl:value-of select="$ClientPO"></xsl:value-of>
</NumAtCard>
</row>
</Documents>
<Document_Lines>
<xsl:for-each select="$msg/BOM/BO/Document_Lines/*">
<row>
<LineNum>
<xsl:value-of select="LineNum"></xsl:value-of>
</LineNum>
<ItemCode>
<xsl:value-of select="ItemCode"></xsl:value-of>
</ItemCode>
<Quantity>
<xsl:value-of select="Quantity"></xsl:value-of>
</Quantity>
<Price>
<xsl:value-of select="Price"></xsl:value-of>
</Price>
</row>
</xsl:for-each>
</Document_Lines>
</BO>
</BOM>
</FinalAtomResult>
</xsl:template></xsl:stylesheet>
Kindly help me out in this.
THANKS,
KHAN
Hi Khan,
I'm not able to debug your complete solution via SCN.
Please check the inbuild documentation (Help -> Online Help) about the usage of the B1 object atom or how to use the B1 Outbound call.
There are also additional B1i trainings available in the partner edge, please open following section: "Additional Training for SAP Business One -> SAP Business One Additional Training - Integration -> Integration Framework of SAP Business One" or check the link below:
Here you can find an overview and some examples of concrete integration scenarios involving SAP Business One.
If these information are not detailed enough, please contact your local product expert to organize a classroom or online training in your region.
Best regards
Bastian
User | Count |
---|---|
98 | |
12 | |
10 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.