Create A/R Invoice + Payment
Hi,
My customer is using a our POS (point of sale) system to made order and invoice (payment is done immediate). I want to import these transaction information to SAP B1. I will also use B1 to maintain my stock inventory and Journal entry. I think what I need is similar to the "A/R Invoice + Payment". Instead of creating these invoice with the B1 front-end, I would like to develop a console program in VB .NET (2008) with the B1 SDK.
I have reference the SDK help on invoice and try the following code.
'Create the Documents object
Dim vInvoice As SAPbobsCOM.Documents
vInvoice = oCompany.GetBusinessObject(BoObjectTypes.oInvoices)
'Set values to the fields
vInvoice.Series = 0
vInvoice.CardCode = "C99998"
vInvoice.HandWritten = BoYesNoEnum.tNO
vInvoice.PaymentGroupCode = "-1"
vInvoice.DocDate = Today
vInvoice.DocTotal = 5733
'Invoice Lines - Set values to the first line
vInvoice.Lines.ItemCode = "A00001"
vInvoice.Lines.ItemDescription = "IBM Infoprint 1312 喷墨打印机"
vInvoice.Lines.PriceAfterVAT = 4095
vInvoice.Lines.Quantity = 5
vInvoice.Lines.Currency = "RMB"
vInvoice.Lines.DiscountPercent = 0
'Invoice Lines - Set values to the second line
vInvoice.Lines.Add()
vInvoice.Lines.ItemCode = " A00002"
vInvoice.Lines.ItemDescription = "IBM Infoprint 1222 喷墨打印机"
vInvoice.Lines.PriceAfterVAT = 2047.5
vInvoice.Lines.Quantity = 5
vInvoice.Lines.Currency = "RMB"
vInvoice.Lines.DiscountPercent = 0
'Add the Invoice
lRetCode = vInvoice.Add
However, the vInvoice.Add always return below errors.
-2028 No matching records found (ODBC -2028)
Can you give me some advise?
Besides, I think I only need to create the invoice and payment objects so as to pretend as A/R Invoices + payment? I don't need to create an order object, isn't it?
I think it may be easier if I can load the invoice object from an XML file. Can I use the GetBusinessObjectFromXML method on invoice and payment object? Can you share with me some code samples?
Thank you very much!
Yvonne
I'm not sure about this but give it a Try to remove the line which set the series. ( remove/comment that line )
I have same error message regarding with UDO series ( which is working fine in 2005 )
ref note : 1328973
Similar Messages
-
How to create A/R Down payment Invoice
Hi;
I am trying to create A/R Down Payment Invoice through DI API by using the below mentioned object but the system is giving me the following error "Invalid Value. {DPI1.ExLineNo} {Line No. 1}".
SAPbobsCOM.Documents oDoc SAPbobsCOM.Documents)x.CompanyObject.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDownPayments);
oDoc.Lines.SetCurrentLine(0);
oDoc.CardCode = "C0001";
oDoc.Lines.ItemCode = "Test";
oDoc.Lines.Quantity = 2;
oDoc.Lines.UnitPrice = 10;
oDoc.Lines.ActualDeliveryDate = DateTime.Now.Date;
oDoc.Lines.BaseType = 17;
oDoc.Lines.BaseLine = 1;
oDoc.Lines.BaseEntry = 1;
oDoc.Lines.ExLineNo
int oRetVal = oDoc.Add();
if (oRetVal != 0)
MessageBox.Show(x.CompanyObject.GetLastErrorDescription());
Please suggest me how I can create AR Down Payment Invoice along with Incoming Payment and then wanted to link AR down payment invoice with AR invoice.
Regards;
DeepakHi
Try this code
Try
'Create DownPayment Invoice Object
oDPM = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDownPayments)
'Set Down Payment Header Values
oDPM.CardCode = "Some Card code"
oDPM.DocDueDate = "Suitable Date"
oDPM.DownPaymentPercentage =" Numeric value (Double)"
oDPM.DownPaymentType = SAPbobsCOM.DownPaymentTypeEnum.dptInvoice
'Set Down Payment Line Values
oDPM.Lines.ItemCode =" Some Item Code"
oDPM.Lines.Quantity =" Quantity"
oDPM.Lines.Price =" Item Price"
lRetCode = oDPM.Add ' Try to add the invoice to the database
If lRetCode <> 0 Then
oCompany.GetLastError(lErrCode, sErrMsg)
MsgBox(lErrCode & " " & sErrMsg) ' Display error message
Else
MsgBox("Down Paymeny Invoice Added to DataBase", MsgBoxStyle.Information, "Invoice Added")
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
Regards
Arun -
Create Accounting in invoice and Create accounting in payment terms?
hi,
I want to know the difference between create accounting in invoice and create accounting in payment terms and is it compulsory to validate and create accounting in invoice before making payments ?
Regards
SudharshanIf the accounting method is accrual, then invoice accounting will be Item Expense/Charge -> Liability.
And payment accounting will be Liability -> Cash (it is different if you have reconciliation also)
An invoice has to be validated to get accounted or to get paid.
Payment just need a validated invoice, not an accounted invoice.
But Payment accounting can be done only after the invoice is accounted.
By
Vamsi -
"CREATE ACCOUNTING"프로그램이 INVOICE나 PAYMENT등을 SELECT하지 못할때
제품 : FIN_AP
작성날짜 : 2003-04-07
"CREATE ACCOUNTING"프로그램이 INVOICE나 PAYMENT등을 SELECT하지 못할때
========================================================
PURPOSE
Invoice나 Payment정보에 대해 Account정보를 생성한 다음
GL로 그 정보를 transfer해야 한다.
그렇게 Account정보를 생성하기 위해 "Create Accounting" 프로그램이
Concurrent list에 등록되어 있다.
Problem Description
"Create Accounting"프로그램을 실행했음에도 불구하고,
Accounting정보가 생성되지 않음.
Workaround
Solution Description
ap_invoice_payments_all과 ap_checks_all table에 있는 exchange_rate column값이 NULL이었다.
Concurrent 프로그램 중 "AutoRate"를 실행한 후, 다시 Accounting프로그램을
실행한다.
Reference Documents
------------------- -
Acctg document not created for cancellation invoice
Hi all,
We have a vehicle sales order created with payment card. The SO contains one item for vehicle and one item for parts. The items were delivered and invoiced separately. Hence, SO has one vehicle sales invoice (VSI) and one parts sales invoice (PSI).
The standard procedure was to post VSI first before the PSI. Accounting documents have been created when both invoices were posted. However, there was a need to cancel the PSI. When this was done, cancellation invoice was created but there was no accounting document posted for the cancellation.
I tried simulating the scenario in our test server and cancelled VSI 90000081 first before cancelling PSI 90000082 to test if this can be an alternative solution. Cancellation for VSI was posted successfully but error persists for PSI cancellation.
Order 67 06/19/06 Completed
. Delivery 80000081 06/19/06 Being processed
.. Picking request 20060619 06/19/06 Completed
.. GD goods issue:delvy 4900000293 06/19/06 complete
.. Invoice 90000081 06/19/06 Completed
... Accounting document 2000077 06/19/06 partly cleared
.. Invoice cancellation 90000084 06/19/06 Completed
... Accounting document 2000079 06/19/06 partly cleared
. Delivery 80000082 06/19/06 Completed
.. Picking request 20060619 06/19/06 Completed
.. GD goods issue:delvy 4900000294 06/19/06 complete
.. Invoice 90000082 06/19/06 Completed
... Accounting document 2000078 06/19/06 Not cleared
.. Invoice cancellation 90000083 06/19/06
.. Invoice 90000085 06/20/06 Blocked
Accounting status of 90000083 (where error occurs) in VF03->Header->Details is set to K or <b>Accounting document not created (authorization lacking)</b>.
Any inputs? Thanks in advance.Hello Sheila,
sorry - my first answer was in mistake - Status K means:
"The transaction is processed using payment cards. The order, however, does not contain valid authorization.
This problem occurs in billing documents for follow-up deliveries."
Could you check this ? Last way would be to set a breakpoint into the FM 'RV_ACCOUNTING_DOCUMENT_CREATE'
and trigger this via VF02 -> Release to accounting.
Regards Wolfgang -
Invoice payment status will update in SRM
Dear Experts,
I have done the invoice in SRM and invoice created in ECC and the same invoice number has been updated in SRM with status 'posted in the backend'.
for thi invoice, i have completed the payment. I would like to know whehter these status will be updated in SRM or not?
Thanks
RaviHi
It is not possible to see, but there is a way. You need to check in ECC in FBL1N for this invoice for the invoice payment. and if you are confirm that no further invoice you need to tick final invoice posted in PO.
With this tick you can confirm the status of the payment.
regards
Satish -
Query for report to show Invoices, Payments and Discounts
Hi All
I am hoping someone can help me with this query.
What the customer needs is the invoices for a specific date range, the payments applied to the invoices and the discount amount
Eg...
Invoice payment discount
100 90 10
This would be easy to get from the ORCT and RCT2 tables.
However, sometime the users add the payment on account and reconciles the invoices and a manual journal for the discounts.
So it would be best to look at the OITR and ITR1 tables?
This is what I have so far and it almost balances...
I am using this query to create the report in crystal,
To create the discount amount from the incoming payment window i said (T0.ReconSum - T3.TrsfrSum)
I also took out the vat amount within that formula.
With the amounts from the manual journal, i just took the amount as is.
select T2.CardCode, T2.CardName, T0.SrcObjTyp, T0.SrcObjAbs, T0.ReconSum, T3.TrsfrSum, T4.ReconDate, T2.U_FundedNonFunded, (T5.Debit - T5.Credit), T6.PymntGroup
from ITR1 T0
inner join OCRD T2 on T0.Shortname = T2.CardCode
left outer join ORCT T3 on T3.DocEntry = T0.SrcObjAbs and T3.CardCode = T0.ShortName
inner join OITR T4 on T4.ReconNum = T0.ReconNum
left outer join JDT1 T5 on T5.TransId = T0.TransId and T5.ObjType = T0.SrcObjAbs and T0.ShortName = T5.ShortName
inner join OCTG T6 on T6.GroupNum = T2.GroupNum
where T3.DocDate <= getdate() or T5.ContraAct = '1127331'
the account 1127331 is the Discount GL account.
Based on the example the Payment + discount = Invoices
however not all the customers are balancing..
any ideas? it looks like my query is getting only the invoices where a payment has been done. The amounts just dont seem to match.
Thank you
Jerushahi
I think your join with OJDT is wrong in this part : T5.ObjType = T0.SrcObjAbs
you should write
T5.ObjType = T0.SrcObjTyp
(I think you don't need this part at all )
try this:
select T2.CardCode, T2.CardName, T0.SrcObjTyp, T0.SrcObjAbs, T0.ReconSum, T3.TrsfrSum, T4.ReconDate, T2.U_FundedNonFunded, (T5.Debit - T5.Credit), T6.PymntGroup
from
ITR1 T0
inner
join OITR T4 on T4.ReconNum = T0.ReconNum
inner
join OCRD T2 on T0.Shortname = T2.CardCode
left
outer join ORCT T3 on T3.DocEntry = T0.SrcObjAbs and T3.CardCode = T0.ShortName
left
outer join JDT1 T5 on T5.TransId = T0.TransId and T5.ObjType = T0.SrcObjTyp and T0.ShortName = T5.ShortName
inner
join OCTG T6 on T6.GroupNum = T2.GroupNum
where
T3.DocDate <= getdate() or T5.ContraAct =
'1127331'
please let me know if it works now
shachar -
A/R Invoice+payment error
Hi,
when i go to create a a/r invoice + payment for one time customers, I get an error message which says default business partners for invoivce and payment not defined message 439-39. I know we have to do initial settings. I created a default customer wth code c9999. Apart from this, what other settings do I have to do?Hi,
You need to define the default Custmer code at the Sales Tab in the Administration > Setup > Financials > G/L Determination window.
Following information from Online Help (F1) will be useful :
Default Customer for A/R Invoice + Payment If you perform one-time sales (that is, the payment is made at the same time that the A/R invoice is generated), enter the code of the one-time customer, to which you will generate the A/R invoice + payment document whenever a one-time sale is made.
Regards,
Jitin -
Error while creating inter-company invoice for stock transport
Hi ,
I am facing following errors while creating inter-company invoice for STO order.
We have scenario where standard PO is created in company code A & then replenishment delivery is created in company code B.While raising inter-company invoice to company code A, we are facing problem.
In replenishment delivery we have 10 line items. But when we try to do inter company invoice through VF01/VF04 we get following log
XXXXXXXXXX(delivery Number) 000000 Customer XXXXX: Customer master table KNVV is missing (VF-022)
XXXXXXXXXX (delivery Number)000010 The bill-to party could not be determined (VF-047)
XXXXXXXXXX (delivery Number)000010 The payer could not be determined (VF-048)
With this first line item from delivery is not flows to invoice & if we saves this invoice then it is get saved with account determination error as some of the data does not comes into invoice header like account assignment group for customer, Payment term, destination country,region, tax classification for customer etc. That means invoice gets created without first line item from delivery with account determination error & so,no accounting document gets generated.
I checked customer master for all SP,SH,BP,PY they are correctly maintained.This was working fine few months back, but not working now.
If anybody had come across such kind of scenario, your valuable inputs will be highly appreciated.
Thanks & kind regards,
Ganesh PalatshahaHello
Kindly check the sales area of customer involved, whether the customer maintain with sales area for STO.
If that is note the case the refer following link:
- Error VF 047 & 048 while creating Inter company billing
Regards
JP -
Unable to Change Withholding Tax Base Amount while creating Service AP Invoice through DI API?
Dear All,
I am trying to create Service AP Invoice through DI API.
If I post the document without changing SAPPurchaseInvoice.WithholdingTaxData.TaxableAmount the dount ocument is created in SAP without any problem.
But if I change amount in above field then DI API throws error Unbalanced Transaction.
If I post same document in SAP with changed base amount it got posted in SAP without any Issue.
Where I am doing wrong?
please guide.
Using:
SAP B1 version 9 Patch Level 11
Location : India.
Thanks.Hi ,
maybe you can find solution to these note 1812344
1846344 - Overview Note for SAP Business One 8.82 PL12
Symptom
This SAP Note contains collective information related to upgrades to SAP Business One 8.82 Patch Level 12 (B1 8.82 PL12) from previous SAP Business One releases.
In order to receive information about delivered patches via email or RSS, please use the upper right subscription options on http://service.sap.com/~sapidp/011000358700001458732008E
Solution
Patch installation options:
SAP Business One 8.82 PL12 can be installed directly on previous patches of SAP Business One 8.82
You can upgrade your SAP Business One to 8.82PL12 from all patches of the following versions:8.81; 8.8; 2007 A SP01; 2007 A SP00; 2007 B SP00; 2005 A SP01; 2005 B
Patch content:
SAP Business One 8.82 PL12 includes all corrections from previous patches for releases 8.82, 8.81, 8.8, 2007, and 2005.
For details about the contained corrections, please see the SAP Notes listed in the References section.
Notes: SAP Business One 8.82 PL12 contains B1if version 1.17.5
Patch download:
Open http://service.sap.com/sbo-swcenter -> SAP Business One Products -> Updates -> SAP Business One 8.8 -> SAP BUSINESS ONE 8.82 -> Comprised Software Component Versions -> SAP BUSINESS ONE 8.82 -> Win32 -> Downloads tab
Header Data
Released On
02.05.2013 02:34:18
Release Status
Released for Customer
Component
SBO-BC-UPG Upgrade
Priority
Recommendations/additional info
Category
Upgrade information
References
This document refers to:
SAP Business One Notes
1482452
IN_Wrong tax amount was created for some items in the invoice with Excisable BOM item involves
1650289
Printing Inventory Posting List for huge amount of data
1678528
Withholding amount in the first row is zeroed.
1754529
Error Message When Running Pick and Pack Manager
1756263
Open Items List shuts down on out of memory
1757641
Year-end closing
1757690
SEPA File Formats - New Pain Versions
1757898
Incoming Bank File Format
1757904
Outgoing Bank File Format
1762860
Incorrect weight calculation when Automatic Availability Check is on
1770690
Pro Forma Invoice
1776948
Calendar columns are wrong when working with Group View
1780460
OINM column description is not translated
1780486
UI_System crash when you set extreme value of double type to DataTable column
1788256
Incorrect User-Defined Field displayed in a Stock Transfer Request
1788372
ZH: 'Unacceptable Field' when export document to word
1788818
RU loc: No freight in the Tax Invoice layout
1790404
Cash Flow Inconsistency when Canceling Payment
1791295
B1info property of UI API AddonsInstaller object returns NULL value
1791416
Adding a new item to BoM is slow
1794111
Text is overlapping in specific localization
1795595
Change log for item group shows current system date in all the "Created" fields
1797292
Queries in alerts should support more query results
1800055
B1if_ Line break issue in inbound retrieval using JDBC
1802580
Add Journal Voucher to General Ledger report
1803586
Not realized payment is exported via Payment Engine using 'SAPBPDEOPBT_DTAUS' file format
1803751
Period indicator of document series can be changed although it has been used
1804340
LOC_BR_Cannot update Nota Fiscal Model
1805554
G/L Account displayed in a wrong position when unticking the checkbox "Account with Balance of Zero"
1806576
Payment Cannot Be Reconciled Internally
1807611
Cannot update UDF in Distribution Rule used in transactions
1807654
Serial No./Batch inconsistency by canceled Inventory Transfer
1808694
BR: Business Partner Code cannot be updated with CNPJ CPF error
1809398
CR_Cannot Display Related Multi-Value Parameters
1809758
Arrow key not work for Batch/Serial Number Transactions Report
1810099
Tax Amount is Recalculated Even if Tax Code Is Not Changed
1811270
Upgrade fails on Serial And Batches object with error code -10
1811846
Cannot run Exchange Rate Differences when multi branch is activated
1812344
Withholding Tax Amount Is Not Updated in Payment Once Witholding Tax Code Is Changed in Document through DI API
1812740
DI:"Operation Code" show wrong value when add "A/P Tax Invoice" based on "A/P Invoice"
1813029
US_Vendor address on 1099 Summary by Form/Box Report is not updated according to the latest Invoice
1813835
Wrong amounts of Goods Return in Open Item List
1814207
Preliminary page prints setting does not keep after upgrade
1814860
Value "Zero" cannot be imported to "Minimum Inventory Level" field via Excel file
1815535
RFQ: Web front end not displayed in supplier language
1815810
GT: Adding Incoming Payment for Some Cash Flow Relevant Accounts Fails
1816191
BR:System Crashes While Working with Tax Code Determination Window
1816611
CR_Crystal Report Displayed Incorrectly Afte -
Creating a vendor invoice by t.code F-02 ...
Hi All,
Creating a vendor invoice by t.code F-02 and choosing the Posting Key 29, and the Special G/L Indicator "A", SAP selects automatically the Payment Block Key "A".
Why does it happen?
Could anyone advice me?
Thanks
Gandalf
Edited by: Umberto Gandalf on Mar 4, 2009 5:30 PMHi,
In case of special G/L indicators for down payment, the payment block and due date are editable fields at the time of document entry so that it can then be used for processing by the automatic payment program.
You can remove the block at the time of document entry.
regards -
Hi all,
Pardon me if anyone has posted on this. I have tried searching the forum and found nothing. If this has been posted, please lead me to the right thread.
Anyway, I have a client with a problem with their AR Invoice + Payment. Normally, we will need to complete full payment before we can add the AR Invoice + Payment. Otherwise, we will not be able to add the invoice into the system.
However, in the case of my client, they are able to add the AR Invoice even without making payment. They have been complaining to me several times.
Is there any settings I am missing or is there any solution to this problem? Thanks.
Regards,
Alvin ChongHi,
The only setting needed for AR Invoice + Payment is that the BP Code is defined in the G\L Determination.
You are mentioning that when you click on the AR Invoice + Payment, then the document window opens with a default BP Code, and then when you add the document, it does not ask for payment to be created.
If the above case :
1) Check for the additonal code in the SP_transactionNotification, any FMS etc
2) Test the same by upgrading the copy of the database in Test Enviorment to the Latest Patch.
Kind Regards,
Jitin
SAP Business One Forum Team -
Problems Printing AR Downpayment Invoice + Payment
Hi Experts,
I have searched high and low in the forum but I have not been able to find a solution to my problem.
Currently, what I have done is that I have created a print layout with Crystal Report for my AR Downpayment Invoice and have set this to the default layout.
I have also created a print layout with Crystal Report for Incoming Payment and have also set this to be the default layout.
Now, when I click on the print button, I am presented with 3 options:-
Invoice Only
Invoice and Payment In Succession
A/R Invoice + Payment
Now, when I select A/R Invoice + Payment, and click OK, the system only prints the invoice and does not print the payment document.
However, if I set the A/R Downpayment with a PLD print out as default, the prints both the Invoice and the Payment document which I have defaulted in the Incoming Payment document.
Am I doing something wrong here or does SAP not support the print out of 2 Crystal Report layouts?
Regards,
AlvinHi Rahul,
I went to printing sequence to check. From Invoice + Payment, the sequence does not allow me to select print layouts from anything other than AR Invoices, Deliveries, Sales Orders and Sales Quotations. Hence, there is still no way I can access my payment print layout which is in the Incoming Payment module.
Printing the document directly from Incoming Payment screen is not an option as my client needs to forbid the access to the incoming payment screen for this particular group of users.
Regards,
Alvin -
Block Vendor Invoice payment & Block Vendor Invoice
Dear Colleagues,
How can Vendor Invoice payment be blocked using F-53 / F- 58 ? any config. req ?
I know that at F110 level payment can be blocked if in the Vendor Master , payment block is ticked.
How Vendor invoice be blocked at FB60 level ? any config. req ?
Thnks
VinodHi Vinod
If you want to block all invoices for a particular vendor, please use the option payment block in the vendor master data. By using one payment block method, you would be able to block all the invoices for that vendor.
If you want to block some invoices for a vendor or a group of vendors, please create a new payment term and in the details, please give a default payment block method in the master and also tick the box for it. Everytime you create invoices and you want to block it, please use the payment term creat for this purpose.
Please let me know if you need any further information on this. Please do award points if fond useful.
Karthik -
A/R Invoice + Payment using DI API
How can we create an A/R Invoice + Payment using DI API ?
Hello,
You (should) create a A/R invoice first, then you can create a payment based on the invoice.
or If you create the payment first later the invoice you should reconsile the 2 transactions.
Regards,
János.
Maybe you are looking for
-
Security, dual boot os x partitions; making each invisible from each other?
I have partitioned my Mini's hard drive with the intention of using one partition for general exploratory google surfing, and the other partition for credit card transactions, etc, thereby keeping the latter free of nasties and avoiding hacker exploi
-
Excise base amount in LOcal currency in J1IG and How to cancel old
Hi, I have two query for depot plant 1: In case of import material PO currcny is JPY, now after PO I have done the GR then ref. to GR number I am doing the J1IG in J1IG in the column Excise base the default amount is coming from the PO but it
-
Garage Band made soundtrack to Quicktime slide show
Hi....I've made a soundtrack in Garage Band of 2 tracks of prerecorded music and a third voice over track. It's only about 2 minutes in length. I would like it to accompany a slide show of images I'm making in Quicktime. Can such a music file be impo
-
Af:selectOneRadio : spacing between radio button and it's text
Hi All, JDev 11.1.1.6 I want to put some space between two radio buttons (between two af:selectItem) say some 10px. <af:panelGroupLayout layout="horizontal" id="pgl9"> <af:outputText value="1. New mobile phone connection" inlineStyle="font-size: 12px
-
Error message unable to qualify my own domain name
Hello I have two systems at a remote location. The user reports they see the following error message sometime after the login screen is displayed. "Unable to qualify my own domain name(prec7b12)--using short name" Unfortunately we lost our admin so I