Skip to Content
author's profile photo Former Member
Former Member

lines of an Incoming payments

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Mar 24, 2008 at 11:02 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.

  • author's profile photo Former Member
    Former Member
    Posted on Mar 19, 2008 at 01:33 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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 ,

  • author's profile photo Former Member
    Former Member
    Posted on Mar 20, 2008 at 10:17 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 25, 2008 at 11:42 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.