cancel
Showing results for 
Search instead for 
Did you mean: 

lines of an Incoming payments

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

I have a document.csv of payment I want transferet it in xml and after possible to matter à WITHOUT, pour le the me there this was fct child et and and in this it where I have roncontré of the problemes.

Answers (3)

Answers (3)

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

hi i have same doubt, can anyone tell me the lines of code used to post a incoming payment of Account type it would of great help for me

its urgent too, i need to finish of it tonite

so plz do help

thank you in advance

issac

Former Member
0 Kudos

Hello,

In actual fact, I wanted initialized the lines of an object Payments.

What could you offer me?

thanks for all.

Former Member
0 Kudos

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

Former Member
0 Kudos

thank you for your disposition ,

the Incoming payments have invoices as lines

but this ecriture " CType(oDocu.Invoices, Document_Lines)" is it logical or not?

with : oDocu As Payments and oDoc_Lines As Document_Lines ,