cancel
Showing results for 
Search instead for 
Did you mean: 

How can i create an oIncomingPayment using DIAPI

Former Member
0 Kudos

Hi all,

I want to create an oIncomingPayment using DIAPI. I am doing this in Java. In java i am finding two documents oIncomingPayments and Payments. Which one i have to take.

I am finding cash, chequenumber in Payments Document. But i am unable to find these in oIncomingPayments.

Can anybody explain the procedure to create an oIncomingPayment. Like first add the docnumber later add the PaymentMeans like that. In BusinessOne UI i am creating IncomingPayment by selecting the paymentMeans. How can i do this using DI API? Is there any different Document for this? or can i do this using IncomingPayment Document?

Any body send me sample code of creating IncomingPayment? Send any (.net or Java).

Thanks in advance,

Ramu.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi VJR,

Try this:

-

-


Dim sap_pay As SAPbobsCOM.Payments

sap_pay = vCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oIncomingPayments)

sap_pay.CardCode = "CM-001018"

sap_pay.Invoices.DocEntry = 46 'EDIT TO SUIT YOUR NEEDS

sap_pay.CashAccount = "11020000101" 'EDIT TO SUIT YOUR NEEDS

sap_pay.CreditCards.CreditType = SAPbobsCOM.BoRcptCredTypes.cr_Regular

sap_pay.CreditCards.CreditCard = 1

sap_pay.CreditCards.CreditSum = 100

sap_pay.CashSum = 50

sap_pay.Invoices.SumApplied = 150

sap_pay.Add()

vCompany.GetLastError(IErrCode, serrmsg)

If IErrCode <> 0 Then

msgbox(serrmsg)

Exit Sub

Else

msgbox("Success !")

End If

-

-


Hope it Helps !

-

-


Alfredo Pérez

www.corponet.com.mx

SAP Developer & Consultant

alperal (at) gmail.com

+52-(81)-137-937-80

Answers (0)