Hi Bastian,
I'm a little further now, thanx. But stil not the desired end results.
After I added a hard-coded docentry in the B1 Object call, both scenarios has status 'Success' in the message log.
The log file from the second scenario contains under Payload Role 'C' all the object fields (it's a large file, so I collapse the table nodes):
*****
<Msg xmlns="urn:com.sap.b1i.vplatform:entity" xmlns:b1il="urn:com.sap.b1i.sim:b1ilog" 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:sim="urn:com.sap.b1i.sim:entity" xmlns:vpf="urn:com.sap.b1i.vplatform:entity" MessageId="15092204205501167243C0A800281121" BeginTimeStamp="20150922042055" logmsg="0000" status="success" msglogexcl="false" handover2CentralSrv="" MessageLog="true" msglogdbop="update" SubMessageId="1" BackMessageId="2" DelMessageId="">
<Header>
<msg.occ INB="1" PRC="n.a." PRQ="0" OUTBIU="1" OUT="1"/>
<msglog step="Default message log" always="false" b1ifactive="true"/>
<Receiver Id="001sap0002" ObjId="single"/>
<IPO Id="INB_IQ_INTQ_ASYN_BIU" tid="15092122191401167233C0A80028EE66"/>
<IPO Id="OUT_FILE" tid="15092122191401167868C0A800285B44"/>
<Resumption>
<starter ipo="/vP.001sap0002.in_BIU/com.sap.b1i.vplatform.runtime/INB_IQ_INTQ_ASYN_BIU/INB_IQ_INTQ_ASYN_BIU.ipo/proc"/>
<restart id="outbound" q="Q.OUT_FILE.001sap0002" s="S.RC.SoConfirm2" u="15092204205501167243C0A800281121.1"/>
</Resumption>
<INproperties>
<PAR.Channel>INB_IQ_INTQ_ASYN_BIU</PAR.Channel>
<PAR.SysId>001sap0002</PAR.SysId>
<dbq.stream>S.RC.SoConfirm2</dbq.stream>
<ds>com.sap.b1i.vplatform.runtime</ds>
<http.user/>
<offline/>
<sessionid>100121083251220202957F000001E654</sessionid>
<starter>
/vP.001sap0002.in_BIU/com.sap.b1i.vplatform.runtime/INB_IQ_INTQ_ASYN_BIU/INB_IQ_INTQ_ASYN_BIU.ipo/proc
</starter>
</INproperties>
<Sender Id="001sap0002" ObjId="successor"/>
<Successor Id="" Mode=""/>
<Identification Ident="vBIU Name" IdPar="n.a."/>
<nsList/>
<Retrieval adapter="" type="" ruledoc=""/>
<ReceiverList>
<Receiver Id="001sap0002" filter="" sndfilter="" subscribed="true" handover="P"/>
</ReceiverList>
<vBIU Id="RC.SoConfirm2" ver="1.0.0" SId="RC.SoCreatConfirm2" filter="" phase="X"/>
<Variables>
<var id="userid" value="no_authentication"/>
<var id="username" value="no_authentication"/>
</Variables>
<Properties/>
<SysTypeProperties type="B1if" offline="" snd="001sap0002" rcv="001sap0002" ssystype="F.AnySystem" rsystype="F.AnySystem">
<property Key="DelDatePlus" Value="" Dir="S" Src="Cust" VSrc="Cfg"/>
<property Key="DelDatePlus" Value="" Dir="R" Src="Cust" VSrc="Cfg"/>
</SysTypeProperties>
<LocalProperties type="B1if" biu="RC.SoConfirm2" snd="001sap0002" rcv="001sap0002" sid="RC.SoCreatConfirm2" offline=""/>
<VarProperties/>
<MsgList counter="1" complete="true" multimsg="false" delmsg=""/>
<Outbound type="Flat File" channel="OUT_FILE" format="xml" fmode="write" fname="C:\B1ifCursusB1i\FileOutXML\20150922042057.xml" encoding="UTF-8" ruledoc="not_applicable" deli="" wrap="" dellead="0" bom="false" dtd=""/>
</Header>
<Body>
<Payload Role="T" Type="Handover"/>
<Payload Role="S">
<vPStatus xmlns="" status="success" no="0000" Message="Processing completed" Phase="final" B1IMessageId="15092204204601166255C0A800286BAD" SubMessageId="1_1" BeginTimeStamp="20150922042046" EndTimeStamp="20150922042055" SenderSysId="001sap0002" ReceiverSysId="0010000107" SenderObjectTypeId="OrderCreation" ReceiverObjectTypeId="" succ="RC.SoConfirm2" offline.id="">
<Msg xmlns="urn:com.sap.b1i.vplatform:entity" MessageId="15092204204601166255C0A800286BAD" BeginTimeStamp="20150922042046" recording="true" logmsg="0000" SubMessageId="1_1" status="success" msglogexcl="false" handover2CentralSrv="" MessageLog="true" msglogdbop="update" BackMessageId="1_2" DelMessageId="1" b1msg="499" b1status="success">
<Header>
<msg.occ INB="1" PRC="1" PRQ="" OUTBIU="n.a." OUT="1"/>
<msglog step="Default message log" always="false" b1ifactive="true"/>
<Receiver Id="0010000107" ObjId="17"/>
<IPO Id="INB_FI_EXST_ASYN_NAM" tid="15092122191401166228C0A80028CBD7"/>
<IPO Id="PRC_FIn" tid="15092122191401166393C0A8002890CE"/>
<IPO Id="OUT_B1" tid="15092122191401166787C0A80028C21B"/>
<Resumption>
<starter ipo="/vP.001sap0002.in_FEAN/com.sap.b1i.vplatform.runtime/INB_FI_EXST_ASYN_NAM/INB_FI_EXST_ASYN_NAM.ipo/proc"/>
<restart id="processing" q="Q.PRC_FIn.001sap0002" s="S.RC.SoCreat2" u="15092204204601166255C0A800286BAD.1"/>
<restart id="outbound" q="Q.OUT_B1.0010000107" s="S.RC.SoCreat2" u="15092204204601166255C0A800286BAD.1_1"/>
</Resumption>
<ProcStream>S.RC.SoCreat2</ProcStream>
<Sender Id="001sap0002" ObjId="OrderCreation"/>
<Inbound deli="" wrap="" pltype="xml" encoding="UTF-8" path="C:\B1ifCursusB1i\FileInXML" ext="xml" file="OrderCreation" size="638" date="22-09-2015 04:20" fileerrid="1509220420Zb1x2FfGHiQu0x2FFMbtkmAwrjCprdUx3D.xml"/>
<Successor Id="RC.SoConfirm2" Mode="message"/>
<Identification Ident="File Name" IdPar=""/>
<nsList xmlns=""/>
<Retrieval type="Handover"/>
<Outbound type="SAP Business One" channel="OUT_B1" method="Synchronous Insert" objectid="17" updpol="" keys="DocEntry"/>
<vBIU Id="RC.SoCreat2" ver="1.0.0" SId="RC.SoCreatConfirm2" filter="" phase=""/>
<Variables>
<var id="userid" value="no_authentication"/>
<var id="username" value="no_authentication"/>
</Variables>
<Properties/>
<SysTypeProperties type="B1if" offline="" snd="001sap0002" rcv="receiverdummy" ssystype="F.AnySystem" rsystype="">
<property Key="DelDatePlus" Value="" Dir="S" Src="Cust" VSrc="Cfg"/>
</SysTypeProperties>
<LocalProperties type="B1if" biu="RC.SoCreat2" snd="001sap0002" rcv="receiverdummy" sid="RC.SoCreatConfirm2" offline=""/>
<VarProperties/>
<ReceiverList>
<Receiver Id="0010000107" filter="" sndfilter="" subscribed="true" handover="P"/>
</ReceiverList>
<MsgList counter="1" complete="true" multimsg="false" delmsg="1"/>
</Header>
<Body>
<Payload Role="T" Type="File exist" FileName="C:\B1ifCursusB1i\FileInXML\OrderCreation.xml"/>
<Payload Role="S" intype="xml">
<document xmlns="">
<header>
<cust>C20000</cust>
<date>20150610</date>
<deldate>20150820</deldate>
<referentie>test 65</referentie>
</header>
<line>
<item>A00001</item>
<aantal>5</aantal>
<prijs>2</prijs>
<totaalprijs>10</totaalprijs>
</line>
<line>
<item>A00002</item>
<aantal>3</aantal>
<prijs>4</prijs>
<totaalprijs>12</totaalprijs>
</line>
</document>
</Payload>
<Payload Role="R" id="atom0">
<BOM xmlns="">
<BO>
<AdmInfo>
<Object>17</Object>
<Version>2</Version>
</AdmInfo>
<Documents>
<row>
<CardCode>C20000</CardCode>
<DocDate>20150610</DocDate>
<DocDueDate>20150820</DocDueDate>
<NumAtCard>test 65</NumAtCard>
</row>
</Documents>
<Document_Lines>
<row>
<ItemCode>A00001</ItemCode>
<Quantity>5</Quantity>
<Price>2</Price>
<LineTotal>10</LineTotal>
</row>
<row>
<ItemCode>A00002</ItemCode>
<Quantity>3</Quantity>
<Price>4</Price>
<LineTotal>12</LineTotal>
</row>
</Document_Lines>
</BO>
</BOM>
</Payload>
<Payload Role="R2" Call="object" Type="DIAPI">
<Envelope xmlns="">
<Header>
<Action throwException="true" autoCommit="false">add</Action>
<WritePolicy insert_on_exists="error" update_on_miss="fallback2I" update_policy="regular"/>
</Header>
<Body>
<BOM>
<BO>
<AdmInfo>
<Object>17</Object>
<Version>2</Version>
</AdmInfo>
<Documents>
<row>
<CardCode>C20000</CardCode>
<DocDate>20150610</DocDate>
<DocDueDate>20150820</DocDueDate>
<NumAtCard>test 65</NumAtCard>
</row>
</Documents>
<Document_Lines>
<row>
<ItemCode>A00001</ItemCode>
<Quantity>5</Quantity>
<Price>2</Price>
<LineTotal>10</LineTotal>
</row>
<row>
<ItemCode>A00002</ItemCode>
<Quantity>3</Quantity>
<Price>4</Price>
<LineTotal>12</LineTotal>
</row>
</Document_Lines>
</BO>
</BOM>
</Body>
</Envelope>
</Payload>
</Body>
</Msg>
</vPStatus>
</Payload>
<Payload Role="X" id="atom2"/>
<Payload Role="C" id="atom1" system="0010000107" status="success" b1login="Technical User" method="Synchronous Retrieval" objectid="17" payload="atom2" keyname="DocEntry" keyvalue="488" DIresult="success" DImsg="">
<BOM xmlns="">
<BO>
<AdmInfo>
<Object>17</Object>
</AdmInfo>
<ORDR>...</ORDR>
<RDR1>...</RDR1>
<RDR12>...</RDR12>
<RDR12>...</RDR12>
</BO>
</BOM>
</Payload>
<Payload Role="R" id="atom0" pltype="xml">
<Fileout xmlns="" type="file"/>
</Payload>
<Payload Role="R2">
<Fileout xmlns="" type="file"/>
</Payload>
</Body>
</Msg>
****
I try several dynamic variations for the docentry without results, for example:
/vpf:Msg/vpf:Body/vpf:Payload[./@Role='C'][./@id='atom1'][./@objectid='17']./@keyname='DocEntry'][./@DIresult='success']/@DImsg
Can you please check or the file is now oke and what the dynamic xpath should be.
In the Atom0 transformation (the one who should wirite to the file (outbound xml file) I add the template like below, but I wunder or that will work in this case.
********
| </xsl:template><xsl:template name="transform"> |
| | | <xsl:attribute name="pltype">xml</xsl:attribute> |
| | | <Fileout xmlns="" type="file"> |
| | | <xsl:for-each select="$msg/BOM/BO/Document_Lines/*"> |
<row>
<DocNum>
<xsl:value-of select="$msg/BOM/BO/Documents/row/DocNum"></xsl:value-of>
</DocNum>
<CardCode>
<xsl:value-of select="$msg/BOM/BO/Documents/row/CardCode"></xsl:value-of>
</CardCode>
<CardName>
<xsl:value-of select="$msg/BOM/BO/Documents/row/CardName"></xsl:value-of>
</CardName>
</row>
</xsl:for-each>
</Fileout>
| | </xsl:template></xsl:stylesheet> |