How to do an incoming payment based on journal entry whit SDK ?
Hello
Somebody have the code for SDK of Business One, how to do an incoming payment based on journal entry?
Tks
Hello Julio,
Here some example code from the SDK helpfile.
Private Sub cmdTest_Click()
On Error GoTo ErrorHandler
Dim vCompany As SAPbobsCOM.Company
'create company object
Set vCompany = New SAPbobsCOM.Company
'set paras 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 = "622-7"
vPay.ApplyVAT = 1
vPay.CardCode = "D10006"
vPay.CardName = "Card D10004"
vPay.CashAccount = "288000"
vPay.CashSum = 0
'vPay.CheckAccount = "280001"
vPay.ContactPersonCode = 1
vPay.DocCurrency = "Eur"
vPay.DocDate = Now
vPay.DocRate = 0
vPay.DocTypte = 0
vPay.HandWritten = 0
vPay.JournalRemarks = "Incoming - D10004"
vPay.LocalCurrency = tYES
vPay.Printed = 0
vPay.Reference1 = 8
vPay.Series = 0
vPay.SplitTransaction = 0
vPay.TaxDate = Now
vPay.TransferAccount = "10100"
vPay.TransferDate = Now
vPay.TransferSum = 0
vPay.Invoices.AppliedFC = 0
vPay.Invoices.AppliedSys = 0
vPay.Invoices.DocEntry = 8
vPay.Invoices.DocLine = 0
vPay.Invoices.DocRate = 0
vPay.Invoices.InvoiceType = 13
vPay.Invoices.LineNum = 0
vPay.Invoices.SumApplied = 5031.2
Call vPay.Invoices.Add
Call vPay.Invoices.SetCurentLine(1)
vPay.Invoices.AppliedFC = 0
vPay.Invoices.AppliedSys = 1089.65
vPay.Invoices.DocEntry = 11
vPay.Invoices.DocLine = 1
vPay.Invoices.DocRate = 0
vPay.Invoices.InvoiceType = it_Invoice
vPay.Invoices.LineNum = 1
vPay.Invoices.SumApplied = 1000
vPay.CreditCards.AdditionalPaymentSum = 0
vPay.CreditCards.CardValidUntil = CDate("10/31/2004")
vPay.CreditCards.CreditAcct = "295000"
vPay.CreditCards.CreditCard = 3
vPay.CreditCards.CreditCardNumber = "884848448"
vPay.CreditCards.CreditCur = "EUR"
vPay.CreditCards.CreditRate = 0
vPay.CreditCards.CreditSum = 5031.2
vPay.CreditCards.CreditType = 1
vPay.CreditCards.FirstPaymentDue = CDate("11/29/2002")
vPay.CreditCards.FirstPaymentSum = 5031.2
vPay.CreditCards.LineNum = 0
vPay.CreditCards.NumOfCreditPayments = 1
vPay.CreditCards.NumOfPayments = 1
vPay.CreditCards.OwnerIdNum = "3993939"
vPay.CreditCards.OwnerPhone = "383838888"
vPay.CreditCards.PaymentMethodCode = 1
Call vPay.CreditCards.Add
Call vPay.CreditCards.SetCurentLine(1)
vPay.CreditCards.AdditionalPaymentSum = 0
vPay.CreditCards.CardValidUntil = CDate("10/31/2004")
vPay.CreditCards.CreditAcct = "295000"
vPay.CreditCards.CreditCard = 3
vPay.CreditCards.CreditCardNumber = "884848448"
vPay.CreditCards.CreditCur = "EUR"
vPay.CreditCards.CreditRate = 0
vPay.CreditCards.CreditSum = 1000
vPay.CreditCards.CreditType = 1
vPay.CreditCards.FirstPaymentDue = CDate("11/29/2002")
vPay.CreditCards.FirstPaymentSum = 1000
vPay.CreditCards.LineNum = 1
vPay.CreditCards.NumOfCreditPayments = 1
vPay.CreditCards.NumOfPayments = 1
vPay.CreditCards.OwnerIdNum = "3993939"
vPay.CreditCards.OwnerPhone = "383838888"
vPay.CreditCards.PaymentMethodCode = 1
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
HTH Regards Teun
Edited by: Teun Aben on Aug 4, 2010 9:00 PM
Similar Messages
-
Incoming payment for incoming payment, credit memo, journal entry &invoice
The message subject is expression of my f**king confusing.
Suppose, we received payment on account 120 Ringgit, invoice amount 210 Ringgit, JE transaction amount 10 Ringgit and credit memo amount (without copied from a certain invoice) 5 Ringgit.
In one new incoming payment, I pay all the 4 transactions, is it correct procedure ? it means the balance of the customer will be zero, that's what we want to do. Thanks in advance
BalajFirst and foremost, I would like to stay that this is a Public Forum and you must refrain from using improper language. There are people here to help you.
If you want to adjust the JE, Payment on Account and Credit Memo aginst the Invoice and receive the balance amount, it is possible through incoming Payment.
You will highlight the Invoice, CM, JE and check the Payment on Account box to include the On account amount, go to Payment means and in the amount column press CTRL+B to copy the balance amount and ADD the payment
Suda -
How to Collect the Incoming Payment from Alternative Customer?
Hi All,
Can any one solve the below problem and in which screen I have to execute?
1. How to Collect the Incoming Payment from Alternative Customer, if one Customer is having 2 Accounts in the same Company Code?
Thanks
ChandraPlease see the below link:
http://help.sap.com/saphelp_47x200/helpdata/en/01/a9b220455711d182b40000e829fbfe/frameset.htm
Thanks
Chandra -
How can I know if a manually created Journal Entries has not been paid yet?
Hi There.
I'm passing through the following situation: I need to find out which Journal Entries that have been manually created ( TransType = 30 ) don't have an Outgoing Payment record associated
Lets suppose that I manually created a Journal Entry. Let's call it OJDT_MAN
Then, I went to the Outgoing Payments Form ( Modules -> Banking -> Outgoing Payments -> Outgoing Payments ) and paid OJDT_MAN.
This process will create another Journal Entry. Let's call it OJDT_AUTO.
I can't find in the database anything that indicates that OJDT_MAN has already been paid. I tried looking for a Status field; Checking if OJDT_AUTO had some code that could get me to OJDT_MAN ( I found BaseRef and TransType = 46, that can guide me to the new OVPM record ); Tried looking at the new OVPM record for some field that could lead me to OJDT_MAN, but I had no success at all...
So, in resume, and again, how can I know if a manually created Journal Entry hasn't been paid?
(When I go to the Outgoing Payments Form and select a Business Partner, it B1 shows me only the not paid ones... How does he knows it? )Just to make it more clear, the SQL we were looking for is this:
Select
From
OJDT
Where
OJDT.TransId Not In ( Select VPM2.DocEntry From VPM2 Where VPM2.InvType = 30 )
And
OJDT.TransType = 30 -
How to create a journal entries by sdk
hi Experts
I know how to create invoice or order by sdk . but I do not know how to create Journal Entry by sdk. i mean what fields are required. Plz send me a basic template for Journal Entry.
Regards
GorgeDim oJounalEntry As SAPbobsCOM.JournalEntries
''Passing Jounal Entry
System.Runtime.InteropServices.Marshal.ReleaseComObject(oRecset)
oJounalEntry = Me.SBO_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries)
oJounalEntry.Series = 14
oJounalEntry.DueDate = Now
oJounalEntry.ReferenceDate = Now
oJounalEntry.TaxDate = Now
oJounalEntry.Lines.ShortName = bpcode
oJounalEntry.Lines.Credit = amount
oJounalEntry.Lines.Debit = 0
oJounalEntry.Lines.DueDate = Now
oJounalEntry.Lines.TaxDate = Now
oJounalEntry.Lines.ReferenceDate1 = Now
oJounalEntry.Lines.Add()
oJounalEntry.Lines.AccountCode = AccountCode
oJounalEntry.Lines.Credit = 0
oJounalEntry.Lines.Debit = amount
oJounalEntry.Lines.DueDate = Now
oJounalEntry.Lines.TaxDate = Now
oJounalEntry.Lines.ReferenceDate1 = Now
oJounalEntry.Lines.Add()
lRetCode = oJounalEntry.Add() -
Create incoming payments, based on Sales Person code
Hi all,
is there any SAPB1 functionality to create incoming payments, for many Sales Invoices of different customers , based on a Sales Person code ?
Thank you,
Aris PantelatosHi Jitin and Gordon,
Thank you both for your replies.
Jitin, I need to create different incoming payments (one for every customer) based on a list of invoices with a specified Sales Person on them.
Do you know, if this is included on SAPB1 roadmap?
Aris
Edited by: Aris Pantelatos on Feb 8, 2012 4:04 PM -
How To automate Customer Incoming payment process
HI
Our Client wish to automate Incoming payment process on the basis of below discount structure, In our client get majority of incoming payment through down payment and clear it the basis of FIFO method
Example
Down payment =1000
INV1.400
INV2.800
Will clear INV1 .400 with full amount
Will clear NV2. 800 with part payment and apply below discount percentage
0-6 days
6-12days
12-18days
3%
2%
1%
Kindly guide me the feasibility implementing this process with valuable thoughts
Regards
Ajeesh.sDear Expert
Example
Down payment =1000
INV1.400
INV2.800
Will clear INV1 .400 with full amount
Will clear NV2. 800 with part payment 600 and 100 paid out with in 6-12 days remaining 100 paid out with in 1 2-18 days , this is the scenario
Here INV2
0-6 days
6-12days
12-18days
3%
2%
1%
Kindly guide me the feasibility implementing this process with valuable thought -
How to cancel an incoming payment on prevoius date
Hi All,
There is an incoming payment posted on 01/06/2009 Posting date. Now I wanted to cancel this incoming payment as on 30/09/2009 posting date.
Please give your solution in detail steps.
Thankyou,
Sree.There are only two options for cancelling a document.
Original document date / current date
Since 30/09 is neither of these, it would not be possible. Unless you want to change your computer's date to 30/9 then restart B1 client. -
How to split data into tables based on the entries in a column?
My problem is very similar to this thread: how to link data from one numbers sheet to another sheet, however I could get it to work the way described there. I have one big table for entering data (the first one). I would like to have a few other tables populated automatically based on the entries in one of the columns of the first table. In my example below I put everything in one sheet for clarity. The selection to the other tables is to be done on the column "fruit" in the first table. (second one is "oranges", then "apples" and then "pears" -- had to cut the width of my screenshot due to the limitations of Apple's forums).
Here is what it would look like, just cannot figure out how to make it happen automatically.
Tried also importing similar Excel example to Numbers, but the import did not work correctly.
Any help will be appreciated.
LDLarry,
Here's an approach that I've used...
In the Purchases table, Aux column, the expression is:
=COUNTIF($A$1:A2, A) & "-"&A
Fill Down
This expression builds a string that identifies the item and the ocurrance of that item.
The Date column of the Summary tables, cell a3, contains:
=IF(ROW()-3<COUNTIF(Purchases :: $A,$A$1), LOOKUP(ROW()-2&"-"&$A$1, Purchases :: $F, Purchases :: B), "")
Fill Across, then fill down.
Regards,
Jerry -
How to get Data from SAP B1 through Journal Entries objects (Excel VBA)
Hi Genius
i had try to login SAB B1 thorugh MS Excel VBA code and it worked well. but i need some questions regards getting the data from after login. that means i want the Posting date, Transaction No, account code, debit and credit amount from Journal entries posted in a particular day through MS excel VBA into excel sheets 1 cell A1:E1
how i get it if any possible ways to do that
here my code to login
Public Sub login()
Sheets("Login").Select 'access the login tab
Worksheets("Login").Range("B1").Activate 'put focus on cell B1 (manager)
B1UserID = Trim(ActiveCell.Value2) 'set Businsss One user
ActiveCell.Offset(1, 0).Activate
B1Password = Trim(ActiveCell.Value2) 'set Business One password
ActiveCell.Offset(1, 0).Activate
sqluser = Trim(ActiveCell.Value2) 'set SQL user
ActiveCell.Offset(1, 0).Activate
sqlpass = Trim(ActiveCell.Value2) 'set SQL password
ActiveCell.Offset(1, 0).Activate
Db = Trim(ActiveCell.Value2) 'set Database name
ActiveCell.Offset(1, 0).Activate
Server = Trim(ActiveCell.Value2) 'set Server name
Set company1 = New SAPbobsCOM.Company 'initialate DI company object
company1.DbServerType = dst_MSSQL2005
company1.Server = Server
company1.DbUserName = sqluser
company1.DbPassword = sqlpass
company1.CompanyDB = Db
company1.UserName = B1UserID
company1.Password = B1Password
'connect to the database
lRetCode = company1.Connect
If lRetCode <> 0 Then
sErrMsg = company1.GetLastErrorDescription
MsgBox (sErrMsg)
Else
MsgBox ("Connected to: " & company1.CompanyName)
End If
End Sub
pls help me
advance thanks to solversGordons way is the easiest - just query the OJDT table for journal entry headers and JDT1 for journal entry lines if needed.
But if you want to work with the business objects:
'Journal entry
Dim oJE As SAPbobsCOM.JournalEntries
Set oJE = company1.GetBusinessObject(oJournalEntries)
oJE.GetByKey(1234)
Dim postingDate as String
postingDate = oJE.DueDate
'etc etc -
Post incoming payments based on Invoice number.
Hello,
I would appreciate your help on the following question. POINTS AVAILABLE. <b>Is there a way for us to post an incoming partial payment from a customer based only on the invoice number?</b>
For example, a customer has several open invoices and want to make a partial payment on 1 of the invoices. <b>I know we can do it using F-28 (Partial Payments tab), however, is there any other way to post a payment to a particular invoice without entering a customer number?</b> Using F-28 brings up all the invoices and pmts for the customer.
Thanks in advance!<b>This is the documentation about the program:</b>
<b>F.13</b>
This program clears open items from customer, vendor and G/L accounts (in particular, GR/IR clearing accounts) automatically.
It selects all accounts specified in the value sets that have debit and credit postings.
The following items are not cleared:
Noted items
Statistical postings and special G/L transactions of the type bill of exchange
Items with withholding tax postings
Down payments can only be cleared if down payment clearing for the same amount has been posted
The remaining open items are grouped according to fixed system criteria:
Company code
Account type
Account number
Reconciliation account number
Currency key
BSID-WAERS for customers
BSIK-WAERS for vendors
BSIS-PSWSL for G/L accounts
Special G/L indicator
The program also groups items according to a maximum of five user criteria. Note that the trading partner number and the business area are no longer fixed system criteria (in comparison to the former clearing programs SAPF123 and SAPF123W). Therefore, if you want to group by business area or trading partner number, you have to enter these as user criteria.
Clearing takes place when, for the group of line items selected according to the above criteria, the balance in document currency (for customers and vendors) or in update currency (for G/L accounts) is zero. The date for clearing is the clearing date according to your selection specifications. In an update run, if the clearing transaction is successful, the clearing document number is specified.
During the program run, all accounts in which clearing can be performed are blocked. They are then unblocked again after the clearing transaction. Accounts that are blocked by other transactions or that are intended for the automatic payment run are not considered in automatic clearing
<b>OB74</b>
Prepare Automatic Clearing
In this activity you enter the criteria for grouping an account's open items for automatic clearing. The clearing program clears the open items that are grouped together if their total balance equals zero in local and foreign currency.
You must enter the following standard criteria:
account type
account number or a number interval
You can also enter a further five criteria.
You select these five additional criteria from the fields in table
BSEG or BKPF. If possible, you should choose fields that are also
contained in table BSIS (G/L accounts), BSID (customers), or BSIK
(vendors). You can determine the field names by displaying the tables
in the Data Dictionary, which you reach by choosing
Tools -> ABAP Workbench and then Dictionary. -
What is the transid in incoming payment tables for canceled entry
The transid for document No. 1267 is 5555 in tables ORCT & OJDT.
if canceled the document no. 1267 then reverse entry transid in ojdt table for this document is 5556.
But where I have to find the reference 5556 in Incoming tables.
I don't want to in a report the both 5555 & 5556 JEs.Hi
you have two entries for OJDT table with the same document number and source, one for the original and another one for the cancellation.
Kind regards
Agustin Marcos Cividanes -
How to maintain petty cash dept wise cash journal entry(FBCJ)?
Dear All,
Cash journal fund transfer department to department (ex. Finance dept to Sales dept)
I want maintain dept wise petty cash, how can do it explain deeply.
*I example given one scenario
*Com.code : (AB01) ABC LTD
Finance dept sending Rs.10000
Sales Dept Received amount Rs.10000
Sales dept will do it some expenses through cash.
I want intercompany department wise how will be maintain petty cash in sap.
I have some solution in my mind that solution should be correct or wrong i donu2019t know suppose i done wrong correct me, Create new cash journal dept wise through, T.Code: (FBCJC0) and then we have to maintain cash journal in dept wise. Otherwise any solutions there explain detail.
Thanks & Regards
SelvaDear SAP Student
It is just like inter unit cash transfers. Also each department is spending cash on its own. Now that I would like to know the balance cash departmentwise.
As you said if I receive and pay through vendors I would be in a position to know only vendor wise balances. It does not serve my very purpose of deparmentwise balance of cash.
I agree with Selva to go in for creating deparmentwise cash journals in the company code since each deparment is incurring expenses also and each department wise balance is also required.
Aravind -
How to imort opening balance through template of journal entry
Dear Experts
I want to import opening balance through the date transfer workbench how can i do this ? is there any way to import opening balance in SAP ?
Pls reply ASAP
Regards
Rajani P. PatelDear Rajani P. Patel,
You may check these threads first:
Re: Uploading Opening Balances
Re: Importing Opening Balances from Legacy System
Thanks,
Gordon -
How to update UDF from marketing documents to Journal Entry UDF
Hi Experts,
I have a UDF in the marketing documents and I want to save the value to Journal Entry UDF.
Regards,
JummieHello Jummie,
If I understand correctly, the scenario is that copy the value of UDF from marketing document to the UDF its target JE from when the marketing document is created.
if so, just listen to FormDataAdd Event for the marketing document, copy the value of udf when document is created.
Here is the sample code.
Private Sub FormDataEventHandler( _
ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, _
ByRef BubbleEvent As Boolean) Handles oApp.FormDataEvent
'You may add the target documents, 133 - A/R invoice.
'Before action = true, start the transation
If BusinessObjectInfo.FormTypeEx = "133" _
And BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD _
And BusinessObjectInfo.BeforeAction = True Then
oCompany.StartTransaction()
'BubbleEvent = False
End If
'Before Action = false,
'Update product item tree
'Succeed, commit, otherwise rollback
If BusinessObjectInfo.FormTypeEx = "133" _
And (BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD) Then
If BusinessObjectInfo.BeforeAction = False And BusinessObjectInfo.ActionSuccess Then
Dim objectKey As String = String.Empty
oCompany.GetNewObjectCode(objectKey)
MsgBox(BusinessObjectInfo.Type)
Dim oInvoice As SAPbobsCOM.Documents = Nothing
oInvoice = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
If oInvoice.GetByKey(CInt(objectKey)) Then
'Retrieve the UDF value in documents
Dim udfValueInDoc As String = oInvoice.UserFields.Fields.Item("***").Value
Dim oJE As SAPbobsCOM.JournalEntries = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries)
'Retrieve the JE for the document
oJE.GetByKey(CInt(oInvoice.JournalMemo))
Dim succeeded = True
'add you code to copy the UDF from document into JE
If succeeded Then
'update the production tree succesfully,
oCompany.EndTransaction(SAPbobsCOM.BoWfTransOpt.wf_Commit)
Else
oCompany.EndTransaction(SAPbobsCOM.BoWfTransOpt.wf_RollBack)
End If
End If
End If
End If
End Sub
Regards, Yatsea
Maybe you are looking for
-
XML 5.6.1 Running Total
Hi I am new this XML Publisher. We are working on using BPA/XML Publisher to print the AR Invoice. I have two questions 1. How to print the values of subtotal, tax and Invoice Total in only last page 2. How to print the Running total of extend amount
-
The format bar in numbers 3.0 has been removed. I need to change a column and/or row to either currency, text, percentage, etc...
-
Hard Drive failure in 2011 iMac... warranty/price?
Hello, I have a 21.5" Intel Core i7 iMac with a 1TB hard drive (custom ordered from Apple). Got it in July 2011 with the extended 3-year AppleCare warranty. The only thing I've ever put into it was 8GB of extra memory, shortly after I purchased it.
-
Aperture created homepages and iWeb created web pages
Is there a way around the fact that Aperture created pages go into a "homepage.mac.com" directory when iWeb goes to "web.mac.com" directory?? The problem is to get all my creations (from Aperture and/or iWeb) into the same folder = much easier to giv
-
Passing Pl/Sql variables into shell variables.
I have written a file that ftp information from one pc to another in unix. All you have to do is supply a user_name/password and machine name to which ftp program will connect to. All connection information like user_id,password, machine name are sto