on 03-19-2008 12:26 PM
Couled you please tall me what can I make to declarer the lines of an Incoming payments????
in a documents they make: oDoc_Lines as Document_Lines, and for the lines of an Incoming payments they make what exactly??
please help meeeee
Hi,
There is a good sample code in the help (Add a payment line sample).
But I can give a short code here:
Dim vPay As SAPbobsCOM.Payments
Set vPay = vCompany.GetBusinessObject(oIncomingPayments)
Dim pChecks As SAPbobsCOM.Payments_Checks
Dim pAcc As SAPbobsCOM.Payments_Accounts
Dim pCredit As SAPbobsCOM.Payments_CreditCards
Dim pInvoice As SAPbobsCOM.Payments_Invoices
Set pChecks = vPay.Checks
Set pAcc = vPay.AccountPayments
Set pCredit = vPay.CreditCards
Set pInvoice = vPay.Invoices
//Add your code here - fill the data of the payments lines
As you can see, you always set the sub object from the header object. Therefore, when you add eventually the payment, all the data of the sub objects are already in.
Hope it helps,
Renana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am not sure I completely understood your last message:
You want to transfer an excel file to an XML file and create out of it the payments object?
How does the XML looks like? can you post it here (or part of it)?
If you want to use XML, try to create a payment object with sons and then call oPayments.SaveToFile or GetAsXML and see how the XML should look like (you can also use oCompany.GetBusinessObjectXmlSchema).
After you have a valid XML, you can transfer it to object by calling oCompany.GetBusinessObjectFromXml
Hope it helps,
Renana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi there...
im trying to create an Incoming Payment with DI API.
the object that im using is
dim opay as SAPbobsCOM.Payments
opay = ocompay.getbusinessObject(SAPbobsCOM.BoObjectTypes.oIncomingPayments)
when i choose a cardcode : 'XYZ'... in SAP Business One, the lines of the Payments Document shows DocEntries for pending Invoices to pay. i want to check one of them and make a cash payment.
please...im still waiting for Help.
sorry for the english
thanks
Hi,
Payment_Invoices cannot be casted to Documents nor to Document_Lines.
This is a dedicated object for Payments.
Why do you wish to make this cast?
Regards,
Renana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am not sure what do you mean by payment lines.
Incoming payments has several sub-objects (you may call it lines) such as Checks, Credit cards, Invoices and accounts.
You can find the structure also in the help under Payment Object
To use CreditCards in the code (for example) use:
Dim oCredit as SAPbobsCOM.Payments_CreditCards
Dim vPay As SAPbobsCOM.Payments
Set vPay = vCompany.GetBusinessObject(oIncomingPayments)
vPay.CardCode = "D10006"
vPay.CardName = "Card D10004"
vPay.CashAccount = "288000"
vPay.CashSum = 0
// your code
Set oCredit = vPay.CreditCards
// your code
Hope it helps,
Renana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
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.