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

Incoming Payment Via DIAPI.

Dear Members,

I want to Create Payment on Account for Customer via DIAPI.

I Could not find this field Called Payment on Account(ORCT.PayNoDoc.) in DIAPI. Any one can help me in this regard.

With Regards,

G.Shankar

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 08, 2009 at 08:29 PM

    Dear G.Shankar,

    I believe this field is a dependent field that could not be directly updated. That is why it would not be exposed to DI API. If you have no link with invoice etc in the payment, this field will have value automatically updated.

    Thanks,

    Gordon

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 08, 2009 at 08:03 PM

    G.Shankar,

    I also looked for this field in the 2007A SP01 SDK Help documentation and while I can see this field in the database definition of the table ... I do not see a property for this in the "Payments Object" for the DI API. Possibly you want to review the object in the SDK Help Documentation.

    Eddy

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 09, 2009 at 06:28 AM

    Dear G.Shankar,

    Please use Payments_Accounts Object to add payment on the account.

    Here the saple code from SDK help :

    
    Private Sub cmdTest_Click()
       On Error GoTo ErrorHandler
       Dim vCompany As SAPbobsCOM.Company
    
       'create company object
       Set vCompany = New SAPbobsCOM.Company
    
       'set parameters for connection
       vCompany.CompanyDB = "SBODemo_US"
       vCompany.Password = "manager"
       vCompany.UserName = "manager"
       vCompany.Server = "(local)"
    
       'connect to database server
       If (0 <> vCompany.Connect()) Then
          MsgBox "Failed to connect"
          Exit Sub
       End If
    
       Dim nErr As Long
       Dim errMsg As String
    
       'Set the object's properties
       Dim vPay As SAPbobsCOM.Payments
       Set vPay = vCompany.GetBusinessObject(oIncomingPayments)
       vPay.Address = ""
       vPay.ApplyVAT = 1
       vPay.CardCode = "10000"
       vPay.CardName = "this is not a card"
       vPay.CashAccount = "288000"
       vPay.CashSum = 620
       vPay.CheckAccount = "280001"
       vPay.ContactPersonCode = 0
       vPay.DocCurrency = "Eur"
       vPay.DocDate = Now
       vPay.DocRate = 0
       vPay.DocTypte = 1
       vPay.HandWritten = 0
       vPay.JournalRemarks = "Jrms"
       vPay.LocalCurrency = tYES
       vPay.Printed = 0
       vPay.Reference1 = 15
       vPay.Series = 0
       vPay.SplitTransaction = 0
       vPay.TaxDate = Now
       vPay.TransferSum = 0
    
       vPay.AccountPayments.AccountCode = "10000"
       vPay.AccountPayments.AccountName = "Acc name"
       vPay.AccountPayments.LineNum = 0
       vPay.AccountPayments.SumPaid = 300
       vPay.AccountPayments.VatGroup = "A4"
       Call vPay.AccountPayments.Add
       Call vPay.AccountPayments.SetCurentLine(1)
       vPay.AccountPayments.AccountCode = "10100"
       vPay.AccountPayments.AccountName = "Acc name"
       vPay.AccountPayments.LineNum = 1
       vPay.AccountPayments.SumPaid = 320
       vPay.AccountPayments.VatGroup = "A9"
       If (vPay.Add() <> 0) Then
           MsgBox ("Failed to add a payment")
       End If
    
       'Check Error
       Call vCompany.GetLastError(nErr, errMsg)
       If (0 <> nErr) Then
           MsgBox ("Found error:" + Str(nErr) + "," + errMsg)
       Else
           MsgBox ("Succeed in payment.add")
       End If
    
       'disconnect the company object, and release resource
       Call vCompany.Disconnect
       Set vCompany = Nothing
       Exit Sub
    ErrorHandler:
       MsgBox ("Exception:" + Err.Description)
    End Sub
    

    Best Regards

    Jane Jing

    SAP Business One Forums team

    Add a comment
    10|10000 characters needed characters exceeded

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.