on 2009 Sep 06 6:48 PM
Hi Everyone,
I need to create an A/R Invoice and its payment in a sigle transaction using DI Server. The problem is that I don't know the DocEntry that will be assigned to the invoice in order to set it in the SOP message for creating the incoming payment.
I guess the SOAP message should look like:
<?xml version="1.0" encoding="UTF-16"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header>
<SessionID>F46EDCE6-3F79-1F9F-1D1E-DC6226D04FA7</SessionID>
</env:Header>
<env:Body>
<dis:AddObject xmlns:dis="http://www.sap.com/SBO/DIS" CommandID="Add invoice">
<BOM>
<BO>
<AdmInfo>
<Object>oInvoices</Object>
</AdmInfo>
<Documents>
<row>
<DocDate>20040707</DocDate>
<DocDueDate>20040707</DocDueDate>
<CardCode>BP</CardCode>
</row>
</Documents>
<Document_Lines>
<row>
<ItemCode>Item1</ItemCode>
<Quantity>3</Quantity>
<TaxCode>My Tax</TaxCode>
</row>
</Document_Lines>
</BO>
</BOM>
</dis:AddObject>
<dis:AddObject xmlns:dis="http://www.sap.com/SBO/DIS" CommandID="Add Incoming Payment">
<BOM>
<BO>
<AdmInfo>
<Object>oIncomingPayments</Object>
</AdmInfo>
<Payments>
<row>
<CardCode>BP</CardCode>
<DocTypte>rCustomer</DocTypte>
........
</row>
<Payments>
<Payments_Invoices>
<row>
<DocEntry>???</DocEntry> <----
<InvoiceType>it_Invoice</InvoiceType>
<SumApplied>100</SumApplied>
</row>
</Payments_Invoices>
</BO>
</BOM>
</dis:AddObject>
</env:Body>
</env:Envelope>
Any help?
Request clarification before answering.
Hi Jane,
Then, could you please explain it in detail, and please don't refer me to the documentation because I've read it all and there is nothing about it
Thanks in advanced
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Hugo Moreno,
Basically the DI Server has same objects and methods as the DI API.
Best Regards
Jane Jing
SAP Busienss One Forums team
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Hugo Moreno,
You could use the GetNewObjectCode Method of the Company Object to retrieves the key of the last added record.
Please refer to SDK DI API help for this method.
Best Regards
Jane Jing
SAP Business One Forums team
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
39 | |
8 | |
4 | |
3 | |
3 | |
3 | |
3 | |
2 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.