Need an example to add an Invoice via DIAPI
Hi,
I'm trying to add an invoice, but the Totals aren't calculated right.
probably due to the fact that I'm missing something or there's something I dont know
My invoice is added but when I look at the totals, it doesn't make sence
Document.DocTotal = 1000
Document.Lines.Price = 1000
what this does is that, I get :
Total Before Discount = 1000
Discount = 5.66 - $56.60
Tax = $56.60
Total = 1000
Well, I just want it right so if I add 1000 without tax
this should be 1056.60 and no discount should be there since I'm not adding discount when adding my invoice.
I'm actually strugling with that since yesterday !
Thank you for your help
Hi Marc,
The reason why you are getting this behaviour is because there is a tax code defined by default on the business partner you are using. If you specify in your code that the line amount is 1000 and the total is 1000 and the business partner is tax liable, SBO knows that 100 + tax is not 1000, so it takes the tax amount and make it the discount. If you want your total to be 1000 + tax, then don't specify a total. If you want your total to be 1000, then specify that the tax rate is zero rated.
Hope it helps,
Adele
Similar Messages
-
Stock Transfer Discount via DIAPI
Dear Expert,
I want to add Stock Transfer via DIAPI. The Stock Transfer successful added but without discount. How can I add Stock Transfer via DIAPI with Discount value?
Thanks for any help.This is my code, just simple only... but discount become blank. How to add stock transfer with discount? Others fields can add successfully, except the discount column.
Dim lRetCode As Long
Dim lErrCode As Long
Dim sErrMsg As String
Dim oTransfer As SAPbobsCOM.StockTransfer
oTransfer = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oStockTransfer)
oTransfer.FromWarehouse = "01"
oTransfer.Lines.ItemCode = "AT010"
oTransfer.Lines.WarehouseCode = "04"
oTransfer.Lines.Quantity = 1
oTransfer.Lines.Price = 10
oTransfer.Lines.DiscountPercent = 9
lRetCode = oTransfer.Add
If lRetCode <> 0 Then
oCompany.GetLastError(lErrCode, sErrMsg)
SBO_Application.MessageBox(lErrCode & " - " & sErrMsg)
Else
SBO_Application.MessageBox("successful")
End If -
I simply need to know how to do this. Everything online talks about doing this as a watermark feature or during Export only. I need to know how to do this during the Develop stage, if it's possible.
I took a photo of a couple for a pregnancy announcement shoot. We added a chalk board that had the date the birth is to take place written on it, but it didn't show as well when I reviewed the first couple pics. So I erased the chalk board thinking that I could just add the date via Lightroom, but I have been unable to figure it out. Any help would be very much appreciated.To create a graphic watermark or identity plate for this purpose with a hand written chalk look you would need Photoshop or Elements to create a transparent PNG file so you might as well do the whole thing in one of those programs to start with. You can't do this in the develop stage anyway like you requested.
-
Incoming Payment add in sequence via SDK
Hi guys,
I want to use the SDK to add an incoming payment based on an invoice. It will only be a partial payment however and I want to pay the invoice in the same way that the "Add In Sequence" button works. I do not want the invoice to close until it is paid in full.
Can anyone help?Hello
Pay in Sequnece is a business logic, you must code the same logic as B1 client uses.
Of cource it is possible. I am sure, until the invoice not fully payed, the sap b1 internal reconsiliation engige will not close the sales invoice, os it will stay opened automatically. (not payed totally, you will see the reaining amount when you open the invoice via B1 client).
logic should be coded:
1. get the payment anoumt and customer
2. get open of the customer and sort them by date (sequnece based on date).
here you mayuse a query based on jdt1 (balduedeb and balduecred are the fields holding the open amount of a transaction, ie unpayed amount of the incoive or a Journal entry)
select * from jdt1 where shortname = 'cardcode' and balduedeb-balduecred != 0
3. issue the payment object, until the payment amount is fit wiht the selected open items amount.
Regards
János -
Error "No alternative payer/payee defined" when reversing invoice via MIRO
Dear experts,
we have created an invoice via MIRO, but we need to reverse it. While we try to reverse it using MIRO, we get the following error:
"No alternative payer/payee defined"
We have reviewed possible causes of this error, as explained in several posts in this forum, that suggest the error is related to One TIme Vendor settings. However, we are not using One Time Vendor, neither we have alternative payers defined in the vendor master record.
The strange thisng for us is that we get no error while posting the invoice, but we get this error while trying to reverse it.
Any help is welcomed.
Thanks a lot in advence for your time and advise.
Kind regards.
Marcos SuárezHi,
thank you for your answer.
The strange thing in our case is taht we do not have have an alternative payee informed in XK02 for our vendor (neither at general level, nor at company code level). Is there any other possibility?
Thank you very much in advance.
Kind regards.
Marcos Suárez -
Hi,
I am using an inbound Purchase Invoices INVOICE02.
Is it possible to park an invoice via idoc rather than creating it in MIR0.
I do not want my IDOC to post the invoice and rather need to just park the invoice.
Regards
KrishHi,
There should be some reason for giving this FM inside the main FM
This FM MRM_INVOICE_PARK will park the invoice while creating the invoice.
The inbound function module uses IDOC_INPUT_INVOIC_MRM.
I wanted to know if there is any indicator in the incoming idoc which will rout thru the MRM_INVOICE_PARK.
Regards
KRish -
Cannot add AP Invoice due to Tax
Dear All,
would need your help on adding AP invoice.
i don't know why when i try to add a AP invoice by coping from Goods Receipt PO, when i press the button Add in the AP Invoice, error message prompt out as "[A/P Invoice - Row - Tax Definition][line 1:], Tax Definition (1)" [Message 173 -64]
please kindly help.
Thank you very much and looking forward to hearing from you soonHi,
I found something related to this on following link. May be helpful to you.
[http://sap.ittoolbox.com/groups/technical-functional/sap-business-one/error-message-tax-definition-1-message-173-64-2271051]
Regards
AshutoshT -
Apply Cash Payment and Credit Memo to an Invoice via DI API
Hi, All:
I would like to be able to create an invoice and apply cash and a credit memo to it which equals the total of the invoice. This will close out the invoice.
Does anyone out here know if this can be done through the DI API? If so, some sample code would be greatly appreciated.
Thanks.For those of you who are wondering, here is an example:
int invoiceDocEntry = 0;
int creditMemoDocEntry = 0;
Documents invoice = (Documents)company.GetBusinessObject(BoObjectTypes.oInvoices);
invoice.CardCode = "S001600";
invoice.DocDate = DateTime.Today;
invoice.DocDueDate = DateTime.Today;
invoice.Lines.ItemCode = "A2-IC-6"; //$78.00
invoice.Lines.Quantity = 2;
invoice.Add();
if(invoice.Add() != 0)
throw new Exception("Could not add invoice: " + company.GetLastErrorDescription());
invoiceDocEntry = Int32.Parse(company.GetNewObjectKey());
System.Runtime.InteropServices.Marshal.ReleaseComObject(invoice);
Documents creditMemo = (Documents)company.GetBusinessObject(BoObjectTypes.oCreditNotes);
creditMemo.CardCode = "S001600";
creditMemo.DocDate = DateTime.Today;
creditMemo.DocDueDate = DateTime.Today;
creditMemo.Lines.ItemCode = "B4-HDMI-.7";
creditMemo.Lines.Quantity = 1; // $10.00
if(creditMemo.Add() != 0)
throw new Exception("Could not add credit memo: " + company.GetLastErrorDescription());
creditMemoDocEntry = Int32.Parse(company.GetNewObjectKey());
System.Runtime.InteropServices.Marshal.ReleaseComObject(creditMemo);
Payments payment = (Payments)company.GetBusinessObject(BoObjectTypes.oIncomingPayments);
payment.CardCode = "S001600";
payment.Checks.CheckSum = 68.00;
payment.Checks.CheckNumber = 100;
payment.Invoices.DocEntry = creditMemoDocEntry;
payment.Invoices.InvoiceType = BoRcptInvTypes.it_CredItnote;
payment.Invoices.Add();
payment.Invoices.DocEntry = invoiceDocEntry;
payment.Invoices.InvoiceType = BoRcptInvTypes.it_Invoice;
if(payment.Add() != 0)
throw new Exception("Could not add payment: " + company.GetLastErrorDescription());
System.Runtime.InteropServices.Marshal.ReleaseComObject(payment); -
XML editor with buttons to add HTML tags via CDATA
Hi:
Does anyone know an XML editor with buttons to add HTML tags via CDATA?
<?xml version="1.0" encoding="UTF-8"?>
<content1>
<text1>
<![CDATA[<p><b>]]>THE ORIGINS.<![CDATA[</b><br />]]>
He was born ...
<![CDATA[<br /><br /><p>]]>
Thanks in advanceI just did a google search of "XML editor with buttons to add HTML tags via CDATA" and found this.
I usually just write in all my XML by hand that included the CDATA tags if needed.
http://activeden.net/item/flash-xml-editor-version-2/47884
I hope this helps? -
Catch event when user add an Invoice (push the Add button)
i have User Defined Table(@User_Table1)
so i like too whenever user click the Add Button, beside add an invoice..it write to the @User_Table1..
at the moment, i using Screen Painter to make the form not using the existing one like A/R Invoice for example
thanksI dont know about possibility how to continue the process of adding in case, that there will be some user input like msgbox, inputbox or something else. The only way how to do it (in my oppinion) is to at the end of the code set bubbleevent to true (maybe the msgbox sets it to false). You have 2 choices how to recevie invoice details:
- in case of beforeaction = true receive it from active form
- in case of beforaction = false receive number of invoice and through object get details of invoice
Petr -
I want to add apple tv via hdmi connection , and I already have ethernet input of tv for my viera cast connection, which gets Amazon prime. Wireless connection is APE base and APX, Want to add
apple tv to get Netflix so I can cancel my xfinity premium channels. Will this set up work. p.s as you can tell I am a Mac novice.Providing you have a free HDMI port on the TV and the location you would put the Apple TV will allow it to connect to your network, you should be good to go.
-
I have an itunes account without credit card. How can I add a credit card to my account? Also, is there a way to buy apps without credit cards but via app store? Also, I want to download it directly to my iPad, can I do it even if i add credit card via pc?
Changing Account Information
http://support.apple.com/kb/HT1918
Apps Store FAQ
http://support.apple.com/kb/HT4461
iTunes Store FAQs
http://support.apple.com/kb/ht1689
http://www.apple.com/support/ipad/applications/ -
Why need to link credit memo with invoice
Hi, gurus,
I received an AP invoice valued $2222 and then received a credit memo valued $222 about 1 week later.
Now I need to make payment.
I was told it's good to link credit memo with invoice by entering invoice number in the field "invoice reference" when creating credit memo. But I'm not sure why it's better because system will pick up both items anyway when i entered $ 2000 using f-53 to make outgoing payment.
The only reason i can think of is this link will guarantee that credit memo has the same terms of payment with invoice.
Is there any other good reasons? Any help will be appreciated.Dear,
We need to link credit memo with invoice against for two obvious reasons
1.. Future tracking of all credit memo i-e if we gave excess credits to vendor then it was against which invoice. This will create linkage and tracking of credit memo with invoice that will be shown in FBL1N .
2..At the end of specific time period ,month or quarter ,its a normal practise to reconcile vendor balance as per SAP ledger to that of vendor's own book. At that time you will need credit memo track also that against which invoice was the credit given.
This all can be achived after posting credit memo with refrence to invoice number. Audit perpective should also be kept in mind. Hope this will help you
Regards -
Not able to post / add AR Invoice
Dear All,
We are not able to add- ar invoice in SAP b1 8.81 PL9 Sql 2008 error ocurring "Internal error (242) occurred [Message 131-183]".
AR invoice is based on Delivery note.
Please help on high priority.
Regards
Aarati Kollur
<a href="http://gamesy8.name/">y8</a>, <a href="http://www.descargar-ares.name/">descargar ares</a>, <a href="http://www.aresnt.org/">ares</a>Hi,
You can check few things
view system message log
you may get some more description of an error
some times internal error occurs due to absence of link with server.
Please check if the server is pinging.
You are copying DC TO A/R Invoice just check bill to and ship to addresses.
If there is a difference betn the addresses then this error comes.
At our end , we change the BP address.
Prior to changing the address SO was copied to Dc.
After address change new address got reflected in the fresh DC
while clubbing multiple DCs i one invoice system gave same message like you.
We sorted out the problem by changing the relevant fields.
hope this helps you.
thanking you
Malhaar -
Unable to add AP Invoice based on a Purchase order or even directly for one particular item.
We get the following error
Stock Account is not defined [ AP Invoice Rows- Warehouse Code] Line 2 'Item Code' Message Message 173-77
We are unable to create goods issue,goods transfer or Goods Receipt for this item
Regards
FarheenHi Rekha........
As you know there are three types of GL Accounting Method.
1. Warehouse
2. Item Group
3. Item Level
If you are doing Purchase Invoice or GRN then you have to set all the stock related accounts.
For GRN at least set Inventory account, Allocation Account, Purchase Account and Purchase Offset Account.
For AP Invoice Based on GRN Sundry Creditors, Tax Accounts, Cenvat Clearing Account, Rounding Off.
For Delivery set Cost of goods sold, Inventory account,
For AR Invoice set Sundry debtors, Revenue account, Rounding Off
If ur GL method is set by Warehouse then define those acocunts at warehouse level.
If ur GL method is set by Item Group then define those acocunts at Group level.
If ur GL method is set by Item then define those acocunts at Item level.
This will solve your problem.....
Regards,
Rahul
Maybe you are looking for
-
Heavy CPU Utilization of Dictionary Query - After 9i to 10g Upgrade
Hi Friends, We have migrated our production DB from Oracle 9i(Windows) to Oracle 10g(AIX) and after that a heavy cpu utilization query is coming frequently and hence many timeouts are happening in the application. Application is connecting to the dat
-
Asset Procurement Assignment Logic
Dear SAP Gurus, We have one material, when we procure this particular material, In MIGO it will automatically take "C" type register which is for capital goods. Following area I already checked in my system 1. In J1ID it is assigned to TOOLS 2. There
-
Webhelp display in Firefox does not use stylesheet.
I have created a Webhelp system using Robohelp, single-sourced from FrameMaker. I have a custom stylesheet (CSS) file that I am deploying with the Webhelp. On IE and Chrome, the stylesheet is used. On Firefox, it is not. Does anyone know why this mig
-
WRT54G Limited Access in Vista
I have an XP and a Vista machine on my wireless network. The Vista computer keeps going into limited Access Connection after it is on for a while. The XP machine never looses connection. To connect again all I have to do is disconnect from the networ
-
Hi, I have recently started learning BSP. I have created an application to navigate from one page to another page. For this I have just put a command button using statement <input type=submit name="onInputProcessing(nextpg)" value="take me to Next Pa