Skip to Content
0
Former Member
Jan 30, 2008 at 06:18 AM

Issue of Creating Paymments_Invoice, Please help

45 Views

Hi,

I am using SAP B1 2005A and DI Server to build the payment system. I know B1WS won't work for B1 2005A.

I have a soap request to create incoming payment against to the invoice DocEntry. However, I always get the error of invalid value message. Can any one help to see what I did wrong? Thanks advance.

strSOAPcmd = @"<?xml version=""1.0"" encoding=""UTF-16""?>";

strSOAPcmd += @" http://schemas.xmlsoap.org/soap/envelope/"">";

strSOAPcmd += "<env:Header>" + "<SessionID>";

strSOAPcmd += strSessionID;

strSOAPcmd += "</SessionID>";

strSOAPcmd += @" http://www.sap.com/SBO/DIS"">";

strSOAPcmd += "<BOM><BO><AdmInfo><Object>oIncomingPayments</Object></AdmInfo>";

strSOAPcmd += "<Payments_Invoices><row>";

strSOAPcmd += "<DocEntry>12121</DocEntry>";

strSOAPcmd += "<SumApplied>510.00</SumApplied>";

strSOAPcmd += "<AppliedFC>0</AppliedFC>";

strSOAPcmd += "<InvoiceType>13</InvoiceType>";

strSOAPcmd += "<DocLine>0</DocLine>";

//strSOAPcmd += "<DiscountPercent>0</DiscountPercent>";

strSOAPcmd += "<InstallmentId>1</InstallmentId>";

strSOAPcmd += "</row></Payments_Invoices>";

strSOAPcmd += "</BO></BOM></dis:AddObject></env:Body></env:Envelope>";

The Error message is :

<?xml version="1.0" ?>

- http://www.w3.org/2003/05/soap-envelope">

- <env:Body>

- <env:Fault>

- <env:Code>

<env:Value>env:Receiver</env:Value>

- <env:Subcode>

<env:Value>-1004</env:Value>

</env:Subcode>

</env:Code>

- <env:Reason>

<env:Text xml:lang="en">'' is not a valid value for field 'InvType'. The valid values are: '15' - 'Delivery', '16' - 'Returns', '203' - 'A/R Down Payment', '13' - 'A/R Invoice', '14' - 'A/R Credit Memo', '132' - 'Correction Invoice', '20' - 'Goods Receipt PO', '21' - 'Goods Returns', '204' - 'A/P Down Payment', '18' - 'A/P Invoice', '19' - 'A/P Credit Memo', '24' - 'Incoming Payment', '25' - 'Deposit', '46' - 'Payment Advice', '57' - 'Checks for Payment', '76' - 'Postdated Deposit', '-2' - 'Opening Balance', '-3' - 'Closing Balance', '30' - 'Journal Entry', '58' - 'Whse Reconciliation', '59' - 'Goods Receipt', '60' - 'Goods Issue', '67' - 'Inventory Transfers', '68' - 'Work Instructions', '-1' - 'All Transactions'</env:Text>

</env:Reason>

- <env:Detail>

<Object>24</Object>

<ObjectIndex>1</ObjectIndex>

<Command>AddObject</Command>

<SessionID>session id here</SessionID>

</env:Detail>

</env:Fault>

</env:Body>

</env:Envelope>

I have checked the value in the database RCT2 and find the InvType is by default string '13'. I try to put

<InvoiceType>'13'</InvoiceType> and it still come out with the error above. If i comment out the <InvoiceType>13</InvoiceType>. I get -2028 which is Data Source - No Data Found. That means InvoiceType is mandatory.

Interesting thing is that the incoming payment against to the BP cardcode works perfectly. It can create the incoming payment.

I am confused why I have applied the value the InvType and cover all the field in the Payments_Invoices XML schema. The error still appear as shown above. Any guru please help me to pass this difficulty please. Many thanks.

Edited by: Olga Goudz on Jan 30, 2008 7:19 AM

Edited by: Olga Goudz on Jan 30, 2008 7:33 AM