Create Credit Memo based on A/R Invoice
Hello Gurus,
Is it possible to create a A/R Credit Memo based on A/R Invoices through DI API or DI Server? Please help.
Hi Gilbert Ngo
Yes it is possible, here is an example of how i added a invoice based on a sales order, just change it as you require.
Dim oInvoice As SAPbobsCOM.Documents
oInvoice = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
oInvoice.CardCode = BPCode.Text
oInvoice.DocDueDate = Now
oInvoice.Lines.BaseType = SAPbobsCOM.BoObjectTypes.oOrders
oInvoice.Lines.BaseEntry = CInt(OrderStr)
oInvoice.Lines.BaseLine = 0
oInvoice.Lines.Add()
oInvoice.Lines.BaseType = SAPbobsCOM.BoObjectTypes.oOrders
oInvoice.Lines.BaseEntry = CInt(OrderStr)
oInvoice.Lines.BaseLine = 1
lRetCode = oInvoice.Add
oCompany.GetLastError(lErrCode, sErrMsg)
If lRetCode <> 0 Then
MessageBox.Show("Not Added" & lErrCode & " " & sErrMsg)
ElseIf lRetCode = 0 Then
'oCompany.GetNewObjectCode(OrderStr)
MsgBox("Added Invoice")
End If
PLEASE NOTE THAT oInvoice.Lines.BaseEntry = CInt(OrderStr) is refereing TO THE DOCENETRY AND NOT THE DOCNUM of the base doc.
Hope this helps
Similar Messages
-
Error while creating Credit Memo Request for Milestone billing invoice
Hi All,
I have a scenario where i have Milestone billing(% based) at header level in Contracts. I create Invoice for that and then try to create Credit Memo Request with reference to the Invoice.
Problem comes when we try to change the qty in the credit memo request. we are able to change the qty but the value is not changing. It remains the same constant value of that milestone.
In my copy control from Invoice to Credit memo request for the item category i have maintained the pricing type as "C" because i want to copy and manual conditions.
So kindly let me know which config setting should be done so that whenever i change the qty the value should also be changed.
Please Note : This is happening only when my billing plan is at header level. For Billing plan at Item level its working fine.....
Thanks.....Hiiii.....
Can anyone please advise on the below issue of mine.....
Thanks alot for the help.......in advance -
Creating Credit Note based on Invoice
HI there,
I am trying to create a Credit Note through the DIAPI using VB. This Credit Note must be linked to the Invoice 88 for example :
Try *
'Get the required business object *
''Dim oCreditDoc As SAPbobsCOM.Documents = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oCreditNotes)*
Dim queryString As String*
Dim oRecSet As SAPbobsCOM.Recordset*
oRecSet = oCompany.GetBusinessObject(300)*
queryString = "SELECT T0.CardCode from OINV T0 where T0.DocNum = 88 "*
oRecSet.DoQuery(queryString)*
Dim oCreditDoc As SAPbobsCOM.Documents = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oCreditNotes)*
'Set the business partner code*
oCreditDoc.CardCode = oRecSet.Fields.Item(0).Value*
'set the documents due date -mandatory*
oCreditDoc.DocDueDate = Now*
'add first line on invoice*
'use the SO order specified in the text box *
'as a base document*
oCreditDoc.Lines.BaseType = SAPbobsCOM.BoObjectTypes.oInvoices*
oCreditDoc.Lines.BaseEntry = CInt("88")*
oCreditDoc.Lines.BaseLine = 0*
'add the new invoice document*
lRetCode = oCreditDoc.Add*
'check return code*
If lRetCode <> 0 Then*
oCompany.GetLastError(lErrCode, sErrMsg)*
MsgBox("Error : " & lErrCode & " : " & sErrMsg)*
Else*
'store newly created object code in a new string*
'(could have stored it in OrdCodeStr)*
Dim OrdCodeStr2 As String*
OrdCodeStr2 = ""*
oCompany.GetNewObjectCode(OrdCodeStr2)*
MsgBox(" Created Credit Note : " & OrdCodeStr2)*
End If*
Catch ex As Exception*
MsgBox("Exception. Connect: " & ex.Message)*
End Try*
I am getting an "Item code missing" error. Does this mean i must set up each and every line to credit? What if there are millions of lines? Can we not just set a BaseEntry and BaseType for the document as a whole so it knows which Invoice needs to be credited completely?
Kind regards,
Greeshma
p.s. i tried to get this to display as code but seems this editor is either confusing me or it doesnt work! sorry. when i find the right person to complain about it to i will!
Edited by: Greeshma Gulab on Nov 18, 2009 11:13 AM
Edited by: Greeshma Gulab on Nov 18, 2009 11:15 AMHi,
I am not able to make out ur code because of the formating problem, but anyways check the below thread, it might be helpful to u..
Create Credit Memo based on A/R Invoice
Vasu Natari. -
Create A/R credit memo based on paid (closed) A/R invoice.
Hello All,
Many customers need a possibility to create credit memo based on paid invoice to make control on sales quantities, sales price with any discount and cost of good sold.
Is there a way to create A/R credit memo based on closed A/R invoice (Paid) in B1 ?
Best Regards,
Khaleel Abu DayyehHi Khaleel,
You have to Cancel Incoming Payment to Open AR Invoice.
Then pass AR Credit Memo for that Invoice which was Closed after Creation Incoming Payment on behalf of this Invoice.
So Cancel Incoming Payment and Open AR Invoice and Create Credit Memo on Behalf of Invoice.
There is no other work around for this Scenario
Hope this helps
Regards::::
Atul Chakraborty -
Invoice Tax left after create credit memo (Receivable)
Hi All,
I have problem after creating Credit Memo(CM) in Receivable. The invoice line become 0 but invoice tax still appear.
It's caused the tax in CM is 0, even the line value have match value.
Can anyone help me?
Best regards,
ErieAnyone help?
-
MRRL : How can we create Credit Memo for these Invoices
Hi Gurus,
How can we create Crerdit memo in case when the Invoice has been posted thru MRRL?
Is there any way the we can do Subsequent Credit / debit for the ERS vendor (posted by MRRL) as well?
Thanks in advance
ShashidharHello
How can we reverse fi document created through MRRL transaction.
FI document cannot be reversed reason being -Error-Invoice doc. 5105692828/2009 was created via evaluated receipt settlement.
GR material document cannot reversed reason being-Error-Deficit of PU IR quantity 1,456.000 CS
Not possible even to return the delivery to Vendor , Movement type 122
Thanks
Dinabandhu -
Service Type A/R Credit Memo Based on Item Type A/R Invoice???
Hi Experts,
How can we Raise Service Type A/R Credit Memo for An A/R Invoice Which is Based on Item Type A/R Invoice???
We Need this Solution for A/R Invoice Which has been Claimed for Shortage but Actually No Return of Stock to us.
Regards,
M.SenthilnathanHi Senthil.....
On the basis of item type AR invoice its not possible to raise the service type AR credit memo.
But one thing you can do is yoou can raise the separate AR invoice and service credit memo. But later you need to
reconcile both the transactions manual. This way you can solve your purpose....
Regards,
Rahul -
In Invoice created credit memo to Customer which causing below error
Dear Experts,
A PO was raised with GR Done completely. and Invoice was also posted with wrong value. again to correct that invoice user created credit memo to the vendor . .
Then we are running MR11 then we are ending up this Error in Routine DMENG_DETERMINE, RE_BPMNG<0 could you please let me know how to solve this problem
Thanks in Advance
ChandraHi Expert,
Please refer the below link..
Try this before referring the link...
Please check
If FI document has been cleared already or not.
You should take the clearing FI document back (or reverse it) using FI - T-Code:FB08
Transactions if the follow on FI doc has been cleared.
INVOICE REVERSED TWICE.
Regards,
GK
SAP -
Creating credit memo request - V1 498 / missing order quantity
Hi Experts,
could any of You pls help me with a credit memo creation issue?
I credit memo needed to be created based on invoice, so configuration and copy control is done as usual, but I have a failure during CR order creation referring to an invoice F2.
I got an error message: V1 498 - Credit already exist for item... - and no qty is transferred to new document
I have gone thought the threads on Forum, but none of the suggested solution was appropriate to solve the issue:
- the document flow is updated in copy control ,
- I can no remove the schedule line flag at VOV7 - the order qty will be missed but target qty is used, and end up incompletition (VU 019 error messge), so billing is faile
- completition control set as B at VOV7,
Still have the problem
Could any of You pls help me - answers will be appreciated.V1 498 - Credit already exist for item...
What the above message means is that lines items have already been used as reference for the creation of credit memo request(s).
Create a new sales order, delivery and billing document. Then create credit memo request with reference to this new billing document and test.
In VTAF copy control, at item level, field "Pos./neg. quantity" dictates how the quantity in the source document is affected by copy control.
PS - I tried to create credit memo with reference to billing document (F2), there were no issues there. Therefore I am taking that the issue is with credit memo request (copied with ref to billing document F2) -
How can we create credit memo with reference to INV
Hi,
Pls tell how can we post credit memo with reference to Invoice which is posted through SD.
Is there any use with reference to field in T.Code FB75.
Thanks in advance,
PadmajaHi Vijay,
I could not found any field for Inv. reference in the Payment Tab of T.Code FB75.
Is there any facility in SAP to create Credit Memo for a particular customer with reference to Invoice. All the details of that Invoice should get updated in the credit memo automatically.
Thanks in advance,
Padmaja -
Posting a Credit Memo with Reference to the Invoice
Dear all,
I'd like to post a Credit Memo with Reference to the Invoice but in transaction FB65 or I can't find field to input Reference to the Invoice
Please tell me where I can Reference to the Invoice
Thank in advance
MinhDear all,
When I create a a Credit Memo (Transaction FB65),
On the Payment tab page in the Enter Vendor Credit Memo,the system doesn't display field Invoice Reference to input Invoice document number of an invoice reference exists.
Please tell me how to configure to display field Invoice Reference
Thank in advance
Minh -
A/R credit memo for closed A/r Invoice
Hi Guru's,
Our Client want to make an A/R credit memo for closed A/R Invoice (i.e) payment is already received for that A/R Invoice.
But in such scenario, the he is not able to get the referce of the A/R invoice as it closed... so he makes the stand alone Goods Return , Excise & A/R Credit Memo.
But the problem in this stand alone scenario is that the system treat such case as purchase scenario and hit the repective account of VAT and excise which is very incorrect.
e.g
Instead of hitting - VAT payable account for debit
its hitting - VAT input account for debit
So please help me in this matter and give the solution as soon as possible ....its urgent.
Thanks & Regards,
Abhishekhi Abhishek,
Create a new tax code and in that tax code create
vat code with its A/P G/L account is same as A/R G/L account,Similary you repeat it for ed,cs,hcs also.
1. Change Posting period if required.
2.Reverse incoming payment entry.
3.Do A/R credit memo base on A/R invoice with new tax code.
Incoming excise invoice will be created automatically
in background.
Incoming excise invoice journal entries will be hit as in
sales scenario.
Hope above answer helps you.
Jeyakanthan -
DI API: Wrong PriceAfterVAT value in credit note based on A/R invoice
Hi all,
I have serious problem with creating Credit Note based on existing A/R Invoice in Sales module.
I use SBO 2004A patch level 32. With SDK I've created A/R Invoice with 2 items. First item has discount percent 0% and price after VAT 1. Second item has 100% discount, this means, doctotal is 1. Document VAT is 7,6% and VAT is calculated correctly in invoice. Then I've created credit note only with 1 item and this row is bounded with 1 row in invoice. After calling oCreditNote.Add, in Business One this credit note has all prices (price, price after VAT, row total) with the same value -> there is no vat calculated although in invoice the vat calculated is.
Is it bug in DI API or do I something wrong?
I use the standard ways to create new invoice and credit note through DI API.
Many thanks for your answers.
Best regards
Libor.Hi Libor,
To create a Credit note for a Invoice you should use the Invoice as the base document for the Credit note. Here is an example of how I create a GRPO from a draft GRPO. Try this (for your Invoice - Credit Note) and see if it does not work for you (SAP suggests this way of doing it).
(Draft will be your invoice - GRPO will be your credit note)
Dim oDraft As SAPbobsCOM.Documents
Dim oGRPO As SAPbobsCOM.Documents
If oDraft.GetByKey(YourInvoiceNumber) Then
'Build the GRPO (new GRPO Obj for each GRPO Doc)
oGRPO = oComp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes)
oGRPO.DocDate = oDraft.DocDate
oGRPO.DocDueDate = oDraft.DocDueDate
oGRPO.DiscountPercent = oDraft.DiscountPercent
oGRPO.CardCode = oDraft.CardCode
For i = 0 To oDraft.Lines.Count - 1
oDraft.Lines.SetCurrentLine(i)
oGRPO.Lines.BaseType = oDraft.Lines.BaseType
oGRPO.Lines.BaseEntry = oDraft.Lines.BaseEntry
oGRPO.Lines.BaseLine = oDraft.Lines.BaseLine
If i < oDraft.Lines.Count - 1 Then
oGRPO.Lines.Add()
End If
Next i
'Add the GRPO
iRetCode = oGRPO.Add
If iRetCode <> 0 Then
oComp.GetLastError(iRetCode, sErrMsg)
Log.WriteLog("Error Adding GRPO : " & sErrMsg, EventLogEntryType.Warning)
Return False
End If
End If -
Billing Status C in Sales Ord not getting reversed on creating Credit Memo?
Dear SD Guru's
I have a small query, i have such a scenario.
I create sales order for a saleable service material from (01.02.08 to 29.02.08) through order type (ZOOH)
Raise invoice in advance for 30 days on 01.02.08 through billing type (ZOIN) say 100 rupees.
Now on 15th client says he doesnt want the service and i issue a credit memo request (ZOCR) against my invoice type (ZOIN) and change the contract dates from 16.02.08 to 29.02.08 for value 50 rupees.
Now i create credit memo (ZOCM) for 16.02.08 to 29.02.08.
Now once i do that i want the billing status to be reversed in my original document (ZOOH) for period 16.02.08 to 29.02.08
How can we achieve this?
Please its urgent. Points will be suitably rewarded
Regards
RaviHi Krishna,
Your inputs have been valuable, but could you please tell me why doesnt it automatically edit the billing plan row against which i have raised my credit memo. I have to go and do it manually in my original sales document and edit the period.
Cant it happen automatically?
Kind Regards
Ravi -
Create credit memo automatically when creating returns to vendor...
How can i create create "Credit Memo" automatically upon creating
returns to vendor (Movement Type 122) considering right calculation of
the sales tax & withholding tax.Hi,
There is a special display variant in the item list for invoice reduction. You enter
the invoice quantities or values that differ to the quantities or values suggested by
the system separately into the item list. (You can only enter data in these fields
when you have flagged the item as Vendor error: reduce invoice).
When you post a reduced invoice, the system creates two accounting documents.
The first document contains the invoice postings with the actual quantities and
values. The second document contains a credit memo for the difference between
the actual quantities and values and the default quantities and values.
Therefore, with invoice reduction, you do not actually reduce an invoice. Instead,
you also post a credit memo for the amount of the reduction. The amount payable
to the vendor is the value of the invoice reduced by the credit memo amount.
The PO history is updated with the unchanged default values.
When you post an invoice reduction, the system creates a message record. You
can use this to send a letter of complaint (notification of credit memo posting)
to the vendor.
Regards
Ankur
Maybe you are looking for
-
How to access and control a Windows 7 computer from a Mac - long distance?
I bought my parents their very first computer. They are 2000 miles away in another state. Currently I have the computer in my possession to "set-up" everything so it is as seamless as possible when they receive it. It is an HP with Windows 7. I have
-
Can I control the spacing before and after a signature?
When using the Mail app, can I control the spacing before and after a signature? It seems like the app adds space, but it doesn't add the same amount every time. Thanks. Greg
-
Can't move playlist to my sonos
Sonos won't allow me to change playlist. I can use radio, but not playlists.
-
Restrict Query Data based on Date range and Users
Hi All, I have a few web reports that I need do restrict data based on Users. In all the queries i have an infoobject 0CALDAY, and a User Entry range variable on it. Because of performance issues I need to restrict the range of dates a User can see
-
The built in notes app on my ipad 2 continually sends emails to my blackberry every time i add a line to the note. I get a new email every minute, each time it saves. How do i make it stop?