Create draft incoming payments
Hi all,
i am having great difficulty in creating draft incoming payments through the DI, whatever I seem to do I cannot see the sort of properties that the help files say are there e.g. .cashsum .transferaccount etc. The only propoerties that are shown are the ones for marketing documents. I have tried all combinations of the two sets of code below but nothing seems to work,
Dim DraftPay As SAPbobsCOM.Documents = GetDIConnection.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oIncomingPayments)
DraftPay.DocObjectCode = SAPbobsCOM.BoObjectTypes.oIncomingPayments
Dim DraftPay As SAPbobsCOM.Documents = GetDIConnection.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPaymentsDrafts)
DraftPay.DocObjectCode = SAPbobsCOM.BoObjectTypes.oPaymentsDrafts
In trying to fix this issue i have given up on the idea of creating a draft and tried to create a simple incoming payment but i hit the same issue. Whatever I seem to do I only get the option to use marketing document properties.
Am I missing something obvious or has someone else hit this issue (I am using V2007 by the way)
Any help would be appreciated as we begin training on this system in two weeks!
Gordon
Hi,
you create payments like
vb6 samples:
Dim oPay As SAPbobsCOM.Payments
Set oPay = vCompany.GetBusinessObject(oIncomingPayments)
Set oPay = vCompany.GetBusinessObject(oVendorPayments)
Set oPay = vCompany.GetBusinessObject(oPaymentsDrafts)
for drafts you also have to set:
oPay.DocObjectCode = bopot_IncomingPayments
or
oPay.DocObjectCode = bopot_OutgoingPayments
i hope it helps
lg David
Similar Messages
-
Client has a requirement to reuse Draft Incoming Payments as they receive recurring amounts every month against the same GL Accounts (linked to Profit Ctr codes for reporting, may have 20+ lines).
Currently the software does not allow you to add a Draft Incoming Payment in a month other than the one it was saved in. (eg. Saved As Draft in July cannot be added in August unless the dates are changed to August and it is "re-saved")
Also, Incoming Payments do not have the Duplicate option.
Either one of these would save the client time with recurring transactions.
Regards
JennyHi Marco,
I also tried to open IncomingPayment draft document with link button.I couldn't open payment draft object inside query generator and posted this in SAP Support center, they said it is bug in the SBO Application not in DI API. I am using SBO 2004 version.
regards,
BBN -
Hi,
i'm working on Draft Incoming Payments and i've the following question:
if you have more than one draft incoming payments with the same DocNum (assigned by the system), how can i uniquely identify one of them?
For example i need to open a specific draft incoming payment starting from the BP balance sheet. For that same BP i've more than one draft incoming payment in the system.
Please note that i'm trying to use the LinkedButton object for performing the above described operation and it seems that there is no property to opening the draft incoming payments.
Can anybody help me?
Thank
Regards
MarcoHi Marco,
I also tried to open IncomingPayment draft document with link button.I couldn't open payment draft object inside query generator and posted this in SAP Support center, they said it is bug in the SBO Application not in DI API. I am using SBO 2004 version.
regards,
BBN -
BAPI to create an incoming Payment
Hi,
I have to create an incoming payment (FB01). The posting keys will be 40 and 15.
Wich BAPI could do this ?
(We don't have BAPI_ACC_DOCUMENT_POST).
Thanks.
SandrineWhich version do you have ?
Look for FM/BAPI begining with BAPI_ACC (OSS [Note 306504 - Collective note: BAPIs for the AC interface|https://service.sap.com/sap/support/notes/306504]), or look for oldest function module like POSTING_INTERFACE_START, [POSTING_INTERFACE_DOCUMENT|https://www.sdn.sap.com/irj/sdn/advancedsearch?query=posting_interface_document&cat=sdn_all] and POSTING_INTERFACE_END.
Regards -
Include the Journal entry created in Incoming Payments PLD
Hello Experts!!!
Is there a way to include the journal entry created in the Incoming Payments PLD?hi jennifer,
You can create query print layout designer report using query.
SELECT
T0.TransId, T0.BaseRef, T0.RefDate,
T1.Account, T1.ShortName, T2.AcctName,
T1.Debit, T1.Credit
FROM OJDT T0 INNER JOIN JDT1 T1 ON T0.TransId = T1.TransId and
T1.TransType = 24 INNER JOIN OACT T2 ON T1.Account = T2.AcctCode
WHERE
T0.BaseRef = '[%0]' or T0.RefDate = '[%1]'
Jeyakanthan -
How to make a draft of an incoming payment
I want to do a draft of an incoming payment, but i don't know how to do it, if is there any special object that o this(like odraft for document object). Anyone knows how to do ti? Thanks!
Hi Miguel,
Here is a sample:
Dim sboDraft As SAPbobsCOM.Documents
Dim lngRetVal As Long
Dim lngErrCode As Long
Dim strErrmsg As String
Dim strTransfer As String
sboDraft = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDrafts)
sboDraft.DocObjectCodeEx = SAPbobsCOM.BoObjectTypes.oIncomingPayments
sboDraft.DocDate = YourDate
sboDraft.DocDueDate = YourDate
sboDraft.Lines.SetTheLineItemsYouWantInTheDocument()
lngRetVal = sboDraft.Add
If lngRetVal <> 0 Then
sboDraft.GetLastError(lngErrCode, strErrmsg)
MsgBox("Error: " & strErrmsg)
Else
Call sboDraft.GetNewObjectCode(strTransfer)
MsgBox("Draft Incoming Payment Created")
End If -
Create A/R Invoice and Its Incoming Payment using DI Server
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?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 -
Error creating incoming payment. (ODBC -2035)
The error that I get while creating an incoming payment is:
This entry already exists in the following tables (ODBC -2035)
Here is the code:
public static bool CreatePayment()
DateTime now = DateTime.Now;
Payments pmt = (Payments) m_company.GetBusinessObject(BoObjectTypes.oIncomingPayments);
pmt.ApplyVAT = BoYesNoEnum.tYES;
pmt.CardCode = invoice.CardCode;
pmt.CardName = invoice.CardName;
pmt.CashSum = 0;
pmt.ContactPersonCode = invoice.ContactPersonCode;
pmt.DocCurrency = invoice.DocCurrency;
pmt.DocDate = now;
pmt.TaxDate = now;
pmt.DocRate = 0;
pmt.LocalCurrency = BoYesNoEnum.tYES;
pmt.DocType = BoRcptTypes.rCustomer;
pmt.HandWritten = BoYesNoEnum.tNO;
pmt.JournalRemarks = "journal remarks";
pmt.Remarks = "remarks";
pmt.Reference1 = baseEntry.ToString();
pmt.TransferSum = 0;
// invoice
pmt.Invoices.AppliedFC = 0;
pmt.Invoices.DocEntry = baseEntry;
pmt.Invoices.DocLine = 0;
pmt.Invoices.InvoiceType = BoRcptInvTypes.it_Invoice;
pmt.Invoices.SumApplied = amount;
// credit card
pmt.CreditCards.AdditionalPaymentSum = 0;
pmt.CreditCards.CardValidUntil = Util.CCDateToDateTime(cardExpirationDate);
pmt.CreditCards.CreditCard = bp.CreditCardCode;
pmt.CreditCards.CreditCardNumber = ccNumber;
pmt.CreditCards.CreditSum = amount;
pmt.CreditCards.CreditType = BoRcptCredTypes.cr_InternetTransaction;
pmt.CreditCards.FirstPaymentDue = now;
pmt.CreditCards.FirstPaymentSum = amount;
pmt.CreditCards.NumOfCreditPayments = 1;
pmt.CreditCards.NumOfPayments = 1;
// there's a record in OCRP (credit card payment methods)
pmt.CreditCards.PaymentMethodCode = 1;
if (pmt.Add() != 0)
int errCode;
string errMsg;
m_company.GetLastError(out errCode, out errMsg);
// here errMsg is "This entry already exists in the following tables (ODBC -2035)"
return false;
return true;
I had 53 records in ORCT (incoming payments) but the next number in NNM1 and ONNM was 1. So I assumed that it was wrong and tried to set NNM1.NextNumber and ONNM.AutoKey to 54 for ObjectCode = 24 (Incoming payment).
The error remained the same. Then I removed all records from ORCT and its subordinate tables RCT1, RCT2, RCT3,.... and changed the next number back to 1.
The error is still: "This entry already exists in the following tables (ODBC -2035)".
Do you have any ideas what may cause the above error and how I can get more info which is the entry that already exists and in which table?
The code above works on another company (database).
Thanks.
SvilenThanks Alexey,
Please note that I have manually modified SBO tables once the problem appeared not before. I do not know how receipt numbers got out of sync.
I also find the message "This entry already exist in the following
tables" without actually specifying any table, strange, the least.
The SDK is not particularly good and the samples in the help file are outdated and therefore wrong. -
Create incoming payments, based on Sales Person code
Hi all,
is there any SAPB1 functionality to create incoming payments, for many Sales Invoices of different customers , based on a Sales Person code ?
Thank you,
Aris PantelatosHi Jitin and Gordon,
Thank you both for your replies.
Jitin, I need to create different incoming payments (one for every customer) based on a list of invoices with a specified Sales Person on them.
Do you know, if this is included on SAPB1 roadmap?
Aris
Edited by: Aris Pantelatos on Feb 8, 2012 4:04 PM -
Create Incoming payment from an A/R Invoice
Hello,
I am on SBO2005A SP01 PL39 and do not find the option to create Incoming payment from an existing Invoice. When I open an existing A/R Invoice and click on CopyTo it shows only A/R Credit Memo. I remember seeing the Incoming Payment option in the earlier patch. Does this mean I cannot create an Incoming Payment based on an A/R Invoice?
Thanks and Regards,
SheetalSheetal,
Just to clarify, the Incoming Payment has never been available as a Copy to option from Invoice.
The Incoming Payment resides inside the Banking module.
From Main Menu > Banking > Incoming Payment ...Incoming Payment
The only time the Payment Means window will automatically open when you Add the Invoice is when the Payment Terms of the Business Partner is setup to open Payment Means window.
Suda -
No matching record found when creating Incoming Payment...
Hi,
I'm starting a transaction, creating a invoice and then creating a incoming payment.
The invoice is created successfuly in memory I can see the next DocEntry and DocNum and passing it to the incoming payment as usual but I'm getting the error : No matching records found
Any idea ?I found why.
The Series used was not there. But it's not obvious to know that it's because you set a wrong Series code with an error like this. -
Error on creating Incoming Payment that links to another Incoming Payment
Hi Experts,
I am trying to create an Incoming Payment to pay an Invoice, as well as to use another Incoming Payment with an open balance (with Payment On Account box checked) to offset part of this payment.
Conceptually...
Incoming Payment A (-$75)
--- link to Invoice B ($85)
--- link to Incoming Payment C (-$10)
This can be done manually, but by using DI API, I am facing this error:
"-10: Base document card and target document card do not match. (RCT2.DocLine)(line: 2)"
Here is the source code:
Dim oPayments As Payments = DirectCast(oCompany.GetBusinessObject(BoObjectTypes.oIncomingPayments), Payments)
' [HEADER]
oPayments.CardCode = "C0001"
oPayments.DocDate = Today
oPayments.DocType = BoRcptTypes.rCustomer
oPayments.CashSum = 0
oPayments.BankChargeAmount = 0
oPayments.TransferAccount = "12180208"
oPayments.TransferDate = Today
oPayments.TransferSum = 75
oPayments.LocalCurrency = BoYesNoEnum.tYES
' [LINE 1 - AR Invoice B.]
oPayments.Invoices.InvoiceType = BoRcptInvTypes.it_Invoice
oPayments.Invoices.DocEntry = 16949
oPayments.Invoices.SumApplied = 85
' [LINE 2 - Incoming Payment C with Open Balance.]
oPayments.Invoices.Add()
oPayments.Invoices.InvoiceType = BoRcptInvTypes.it_Receipt
oPayments.Invoices.DocEntry = 20338 ' Journal Entry Number of the Incoming Payment
oPayments.Invoices.SumApplied = -10
If oPayments.Add() <> 0 Then
oCompany.GetLastError(errCode, errMessage)
BarError(String.Format("{0}: {1}", errCode, errMessage))
Else
BarSuccess("Success.")
End If
Initially I tried to set
oPayments.Invoices.DocEntry
with the Incoming Payment's DocEntry, but after trial and error, I realized I should be using the Incoming Payment's Journal Entry's Number instead. So this field should be correct. (If I were to use the Incoming Payment's DocEntry for this field, I get the "-2028: No matching records found (ODBC -2028)" error.)
I have ensured that the Incoming Payment C's CardCode is the same as the one I set in
oPayments.CardCode
, so I'm not sure why it gives an error saying the document cards do not match. I would appreciate any form of help on this! Thanks!Hi,
I am not trying to Pay to Account (you are referring to the top left radio button of the Incoming Payment right?). I am trying to create an Incoming Payment that uses another over-paid Incoming Payment (i.e. Open Balance > 0) to offset its Amount Due.
Anyway I have found the solution to my problem. It seems that I need to also set the
oPayments.Invoices.DocLine
value to the over-paid Incoming Payment's Journal Entry's document line which contains the same business partner as my Incoming Payments. This DocLine value is usually 1 (0-based), as SAP usually creates the Journal Entry with the BP row in the second row. -
Incomming Payment with a Postdated Check
I need to create several Incoming Payments for several Invoices with postdated checks. The problem is that most times, the general manager does want those Invoices to be still shown in the Aging Report. I tried several things, including saving the incoming payment as a Draft but when it changes Posting Period, it causes problems.
Are you post dating the checks, or the incoming payment? Perhaps if you post date the incoming payment document, the invoices may still appear on the aging report? I have not tested this, but it would seem to be logical
-
Post an incoming payment ( check ) against an invoice
Hi
I am trying to post an incoming payment ( cheque ) against an invoice. I keep getting no matching records found ( odbc error -2028 )
Has anyone got a simple example I could use as a comparison please ?
Thanks
Regards AndyI had a similar problem. Just make sure you have the proper Invoice number and that everything exist in SAP
This error means that to create your incoming payment, the SDK needs everything created prior to make an incoming payment. Exactly as if you would do it in SAP
So just make sure everything is there and that you refer to the right Invoice
Good luck -
Incoming payments - payment on account
Hi,
I am trying to create an incoming payment(payment on Account) using SDK . Which property i should use to make a Payment on Account?
Thanks,
JayakumarHi Jayakumar,
That'll be something like
vPay = vCompany.GetBusinessObject(oIncomingPayments)
vPay.DocType = SAPbobsCOM.BoRcptTypes.rAccount
Try filling the same properties you do when you create a payment with the GUI.
Hope this helps,
Ian
Maybe you are looking for
-
Dear Experts, Is there any trans code that can showing journal of the GL account? For example in FBL3N, for account xxxxx, we could find line item display from the gl account.If we double click the document number, we can find journal/document overvi
-
I can do this in Word 2003 on my works Windoze PC, but the file created will not migrate across. I have tried the help function within Word for Mac, but to no avail.
-
INT_PTR_KIND in init stmt
I'm compiling this snippet using f95 on solaris 8: SUBROUTINE sysGetMemory( tot,avail,used ) !DEC$ ATTRIBUTES DLLEXPORT :: SYSGETMEMORY IMPLICIT NONE REAL, PARAMETER :: MBYTE = 1024.*1024. INTEGER, PARAMETER :: DWORD = 4 ! INTEGER(4) INTEGER, PARAMET
-
Macbook pro will not start up, press the start button and it sort of clicks then nothing
Yesterday I remember MBP getting extremly hot. After a bit I opened it up and it did not work. pressing the start button and it sort of clicks then nothing.
-
Display buttons depends on Role
Hi, May I Know how to displaying the buttons depends on user roles. can you give example with code it will helpful to me