Tax Amount throug query rowwise for a/r invoice
Hi Experts,
can anyone pls tell me how to get the tax amout and tax code for row level for a/r invoice through query generator for A/R iNVOICE.
Note: I dont want to hardcore it
Thanks & Regards,
Mukesh Agrawal
mukesh,
SELECT M.DocNum,M.DocDate,
(SELECT Sum(TaxSum) FROM INV4 where statype=-90 and DocEntry=M.DocEntry) as 'Excise Duty',
(SELECT Sum(TaxSum) FROM INV4 where statype=-60 and DocEntry=M.DocEntry) as 'Education Cess',
(SELECT Sum(TaxSum) FROM INV4 where statype=7 and DocEntry=M.DocEntry) as 'SHEd Cess',
(SELECT Sum(TaxSum) FROM INV4 where statype=1 and DocEntry=M.DocEntry) as 'VAT'
FROM OINV M LEFT OUTER JOIN INV1 L on L.DocEntry=M.DocEntry LEFT OUTER JOIN INV4 T
on T.DocEntry=L.DocEntry and L.LineNum=T.LineNum
Where (M.DocDate >= '01-jun-08' AND M.DocDate <= '30-jun-08')
GROUP BY M.DocNum,M.DocDate,M.DocEntry
Hope it will solve the problem.
Jeyakanthan
Similar Messages
-
Miro service tax amount is calculating wrongly for particular materials for import PO
Dear All,
I have created import PO with three vendors like foreign vendor, customs duty vendor & Clearing Agent vendor.
After creating PO with all conditions the PO is posted and MIGO is done.
While doing MIRO there is no problem for foreign vendor and customs duty vendor (there is no service tax applicable for both)
While doing MIRO for Clearing agent vendor, we have to calculate service tax for 12.36 %.
The service tax is properly maintained in the system and its calculating correctly for all other PO's except this PO.
This particular PO has 32 materials.the values are flowing correctly from PO to MIRO but while calculating service tax the tax value is higher than the exact value.
When we do MIRO for same clearing agent with different material the service tax is calculating correctly. But if we use particular materials with same clearing agent vendor the tax amount is not calculating correctly
For example:
for Item 10
The value is 1062.72 & 12.36 to be calculated on this value.
The actual tax value is 131.35 but in MIRO its showing as 171.90. The same problem is happening with all other 31 materials.
The Info record is not maintained for all the materials. On what basis should we check for the above issue. Kindly help with your valuable inputs.
Kindly refer the screenshot.
Thanks & Regards
SubbuHi Ajith,
Please find the screenshot below
But for same vendor with different material in another PO the tax is calculating correctly
9050* 12.36 = 1118. 58
For this the tax is exactly calculating as 1118.58
Regards
Subbu. -
How the Tax amount calculated in AR for this scenario (11i)
Dear All,
I have some doubts with the Tax amount in the AR Trx. Please look into below scenario.
Step1: Create SO and AR Trx
In OM side:
1. I created a SO 001 and there is a item A only. The item's Unit Selling Price is *100$*, Quantity is *1*. Then the SO flown to AR.
In AR side:
1. AR Trx 001 is created for the SO and Tax rate is 17%. Hence the AR Trx Total Amount = Line Amount + Tax Amount = 100 + (100 0.17) = 117*.
Step2: The item has been return from customer.
In OM Side:
2. I added the same item with the Unit Selling Price *200$* and Quantity -1. Then the new SO line flown to AR.
In AR side:
2. Credit Memo is create for the return line of SO.
My doubt is:
What's the tax amount for the Credit Memo? It is 200 * 0.17 or the original trx tax amount (100 * 0.17)?
Thanks & Best Regards!
JeromeJerome,
The tax calculated on the Credit memo is always based on the Credit memo amount. So it will be on $200.
However there are few things you need to consider here. If you are creating a RMA in OM and if overapplication is not enabled for the AR Transaction type, the RMA will fail during Autoinvoice since you cannot credit more than the Invoice amount.
One thing I am not sure though is whether you can actually create a RMA with a price different than that of the Original Order.
Hope that helps.
Thanks,
Anil -
I wann a Query for Total Invoice amount for a particular custmer as well as A/R credit memo Total amount (EX if an custmer having 10 invoice and 5 a/r credit memo's i want sum of the 10 invoce amount as well as a/r credit memo total ).
Thanks & Regards
YogiHi
If you need in One line ,
SELECT CardCode, CardName,sum(Total) AS 'Total'
from
(Select T0.CardCode, T0.CardName, Sum (T0.DocTotal )as 'Total'
FROM dbo.OINV T0
Where T0.CardCode like '[%1]%'
GROUP BY T0.CardCode, T0.CardName
UNION ALL
SELECT T1.CardCode, T1.CardName,Sum((T1.DocTotal *-1)) AS 'Total'
FROM dbo.ORIN T1
Where T1.CardCode like '[%1]%'
GROUP BY T1.CardCode, T1.CardName
) A
GROUP BY CardCode, CardName
ORDER BY CardName
<<
Or You might like this
SELECT CardCode, CardName,sum(Total) AS 'Total',Sum(ARtotal) as 'Invoice',Sum(APTotal) as 'Credit'
from
(Select T0.CardCode, T0.CardName, Sum (T0.DocTotal )as 'Total', Sum (Doctotal) as 'ARTotal',Null as 'APTotal'
FROM dbo.OINV T0
GROUP BY T0.CardCode, T0.CardName
UNION ALL
SELECT T1.CardCode, T1.CardName,Sum((T1.DocTotal *-1)) AS 'Total', Null as 'ARTotal', Sum((T1.DocTotal *-1)) AS 'APTotal'
FROM dbo.ORIN T1
GROUP BY T1.CardCode, T1.CardName
) A
GROUP BY CardCode, CardName
ORDER BY CardName
Hope this helps
Bishal
Edited by: BIshal Adhikari on Jul 22, 2009 9:07 AM
Edited by: BIshal Adhikari on Jul 22, 2009 9:24 AM -
Difference between tax amount shown on VAT report and the invoice
Dear Friends,
We observe that there is a difference of rounding off between the tax amount shown in the invoice and the one shown in the VAT report.
We have to manually adjust this tax amount since the Tax authorities do not accept any difference in the VAT report and the Invoice.
Please advise as what could be done to solve this issue.
Rgds,
Kunal Vichare.Hi Satya,
There are 2 things: Pricing Procedure and Tax Procedure.
Pricing Procedure tell system about the what and how the price to calculated for material in PO. In this pricing procedure the conditions NAVS / NAVM as pertainin to tax applicable on the PO price. These conditon display the tax. The tax is calculated based on tax procedure. Tax procedure acts as a master and there is one tax procedure for one country. For this tax procedure there are tax codes defined. Tax codes means using the same tax procedure but changing value of various conditions and omiting some if required.
Eg. TAXINN is tax procedure for India. Based in this procedure many tax codes are defined for 12% vat, 6% vat , no vat etc.
So what kind of tax will be applicable on the PO is governed by tax code which is mentioned in Invoice tab (tax code) its a 2 character code.
Based on this tax code taxes are calculated on PO net value and then the tax amount is displayed in pricing procedure by conditions NAVS / NAVM.
MWST is condition for Input tax. If you are using tax code then MWST is not to be used.
Tax code becomes useful while doing MIRO as there is an option of inserting tax code. So the tax on PO net value will be calculated automatically.
Regards,
Vishal -
Approval Query needed for AR Reserve Invoice
Need to create an approval for delivery doc- If AR reserve invoice not paid need to triger an approval. how can I cutomise the query to look at base document.
SELECT DISTINCT 'TRUE' FROM OINV T0 WHERE T0.[isIns] = 'Y' AND T0.[DocStatus] <> 'C'
Thanks and RegardsHi Anoop,
This one should do it I believe. I have attachde the query as not everything gets copied in this forum. The query below will not work.
SELECT distinct 'true' FROM DLN1 T0 WHERE T0.[BaseType] = 13 and $[$38.45.1] in (SELECT docentry FROM OINV T0 WHERE isins = 'Y' and paidtodate <> doctotal)
There are a few limitations with approvals in B1 that are based on values on the linelevel like this one.
The query can not see past the first line of the document. So it will only check the basedoc of the first item in the Delivery (it is possible to add an item on the first line after copying the Reserve Invoice details into the delivery).
Apart from that, the query only checks if the payment have been fully done "(paidtodate <> doctotal)", if it has been partially paid it will still trigger the approval. If partial payment is acceptable you can change that to "paidtodate <> 0".
Hope it helps,
Jesper -
Where do I need to populate the Tax amount in BAPI_ACC_DOCUMENT_POST inorder to create Vendor Invoice (Non PO) - FB60.
I have populated Tax information GL A/c, Condition key, Account key, Tax Code in u2018ACCOUNTTAXu2019 table and Tax amount $7 in 'CURRENCYAMOUNT' table but got below errors:
u2018Balance in transaction currencyu2019 - when we have $-107in Vendor line, $100 in GL line & $7 in Tax line. (It showing difference $7).
The tax amount must not be greater than the tax baseu2019 - When we have $-107 in Vendor line, $107 in GL line & $7 in Tax line.
Here is the code, please check and suggest me:
Header Details:
it_documentheader-obj_type = u2018BKPFFu2019.
it_documentheader-doc_date = u201811/08/2011u2019.
it_documentheader-pstng_date = u201811/08/2011u2019.
it_documentheader-comp_code = u20180001u2019.
it_documentheader-ref_doc_no = u2018TESTQ108u2019.
it_documentheader-doc_type = u2018KRu2019.
it_documentheader-obj_key = u2018$u2019.
it_documentheader-username = sy-uname.
it_documentheader-bus_act = u2018RFBUu2019.
it_documentheader-fisc_year = u20182011u2019.
Vendor Line u2013 Accounts Payable
lv_item_no = 1.
it_accountpayable-itemno_acc = u20181u2019.
it_accountpayable-vendor_no = u20187800988u2019.
it_accountpayable-comp_code = u20180001u2019.
it_accountpayable-pmnttrms = u2018DUBPu2019.
it_accountpayable-tax_code = u2018I1u2019.
it_accountpayable-taxjurcode = u2018000003749u2019.
it_accountpayable-item_text = u2018Test123u2019.
Populate currency amount for account payable data
it_currencyamount-itemno_acc = u20181u2019.
it_currencyamount-curr_type = '00'.
it_currencyamount-currency = u2018USDu2019.
it_currencyamount-amt_doccur = -107.
it_currencyamount-amt_base = 100.
Append it_currencyamount.
G/L Account data
it_accountgl-acct_type = u2018Su2019. " GL
it_accountgl-itemno_acc = u20182u2019.
it_accountgl-gl_account = u2018623000u2019.
it_accountgl-item_text = u2018Test123u2019.
it_accountgl-costcenter = u20181099u2019.
it_accountgl-profit_ctr = u20181u2019.
it_accountgl-comp_code = u20180001u2019.
it_accountgl-tax_code = u2018I1u2019.
it_accountgl-taxjurcode = u2018000003749u2019.
Append it_accountgl.
it_currencyamount-itemno_acc = u20182u2019.
it_currencyamount-curr_type = '00'.
it_currencyamount-currency = u2018USDu2019.
it_currencyamount-amt_doccur = 100.
Append it_currencyamount.
Tax Line Details:
it_accounttax-itemno_acc = '3'.
it_accounttax-gl_account = '0000210000'.
it_accounttax-acct_key = 'NVV'.
it_accounttax-cond_key = 'XP1I'.
it_accounttax-tax_code = 'I1'.
Append it_accounttax.
it_currencyamount-itemno_acc = '3'.
it_currencyamount-curr_type = '00'.
it_currencyamount-currency = u2018USDu2019.
it_currencyamount-amt_doccur = 7.
it_currencyamount-amt_base = 100.
Append it_currencyamount.Hi
See this [post|BAPI_ACC_DOCUMENT_POST and partial non deductible VAT;. It's related with Note 487064 - Direct posting to tax account with AC BAPIs.
I hope this helps you
Regards
Eduardo -
Hi all,
Is there anyway I can show the tax amount in PR05 screen for each expense type? This is the amount of tax calculated from the tax code. Currently we can select the tax code but can't see the actual amount.
Regards,
EricHi,
I hope it cannot be done in PR05 with standard function module.
Thanks,
Nandagopal C -
Allow to change Tax Amounts in A/R Invoice
Hi Experts
I am using Sap B1 2007 . It allows me to change Tax Amount (Tax Amount Distribution Screens) in case of Excise Invoices in A/R Invoice but not in Service Tax Invoices . Why is it so.
ThanxHello,
In the Sales A/R module we can not change any tax amount.
But you can change in Purchase A/P module in any tax amount.
This is best business practices according to SAP.
because when we received the materials then need to round the tax amount and it is totally depend on vendor invoice so it will never fixed for same.
I also need some time adjustment we client make GRPO .
But when we make Sales document then we can fixed rounding for all tax code.
Thanks
Manvendra Singh Niranjan -
HI
there is no such column like po_amount in po_headers_all table then how can i get po total amount(including tax amount) from po_headers_all table or else tell me how to get data from views in R12
As we are using sql developer tool to build queries in our project
With regards
sivaPO line total is not included the tax, to View the tax amount (N) Action-> manage tax
1) You have to sum up the lines to get the PO total,
select ph.segment1 po_num, sum ( (pl.unit_price * pl.quantity)) price
from po_lines_all pl, po_headers_all ph
where pl.po_header_id = ph.po_header_id
and ph.type_lookup_code in ('STANDARD', 'BLANKET') --Add as per your requirement
-- and ph.segment1 = '2017'
-- and ph.org_id = 7852 --Use when you have multiple OU
group by ph.segment1
2) To get the tax
SELECT *
FROM ( SELECT lines.line_num line_number,
lines.item_description line_description,
dist.distribution_num dist_number,
dist.code_combination_id dist_code_combination_id,
NVL (dist.nonrecoverable_tax, 0) nonrecoverable_tax,
NVL (dist.recoverable_tax, 0) recoverable_tax,
NVL (dist.nonrecoverable_tax, 0)
+ NVL (dist.recoverable_tax, 0)
total_tax,
(NVL (dist.req_line_quantity, 0) * NVL (lines.unit_price, 0))
amount,
dist.org_id,
dist.DISTRIBUTION_ID
FROM po_requisition_lines_all lines, po_req_distributions_all dist
WHERE lines.requisition_line_id = dist.requisition_line_id
AND NVL (lines.cancel_flag, 'N') <> 'Y'
AND NVL (lines.modified_by_agent_flag, 'N') = 'N'
-- AND lines.requisition_header_id = :1
ORDER BY lines.line_num, dist.distribution_num) QRSLT
ORDER BY LINE_NUMBER, DIST_NUMBER
Join the po_distributions_all, po_lines_all & po_headers_all tables to get the specific value.
Thanks -
In fbl1n report for document type RE withholding tax amount is not showing
in fbl1n report for document type RE withholding tax amount is not showing
in sap note 363309 determines
Solution
Remove the field which contains the withholding tax information (field BSEG-QSSHB) from your display
variant.
If you want to display the withholding tax information, double-click on the document number and
subsequently choose 'Withholding tax'.
my doubt is we remove the field BSEG-QSSHB in layout how can show the withholding tax amount in FBLIN report
how to remove from the layout
please clarefy
bhayyapuHi,
If you want to check amounts of withholding tax for the vendors, you have some options to view it. You can access the WITH_ITEM, LFC1 tables by SE16. You have too the S_P00_07000134 report. This report is developed for the Colombia but I already used for the another country with the ABAP development for this country.
Also you can use table join BSIK and WITH_ITEM by SQVI for the open items and BSAK and WITH_ITEM for cleared items. It is more simple and fast.
JPA -
Tax Amount for Invoice Creation using BAPI_INCOMNGINVOICE_CREATE ?
Hi,
I am using BAPI_INCOMNGINVOICE_CREATE function module for cearting Invoice for a PO with referrence to Goods Receipt. In this case got a problem that if i did GRC for 10 Quantity for a Line Item in PO which consists 20 Quantity then i need to caliculate Tax Amount and add it to the Gross Amount of Bapi Header Structure Field Gross_Amount.
So can any suggest me how to pass caliculate Tax for only GRC and pass to Bapi Header Gross_Amount Filed.I thank you, need to calculate the tax first. Add this up with your header data. You can you below function module to calculate tax:
CALCULATE_TAX_DOCUMENT
CALCULATE_TAX_ITEM
Kuntal -
FB60 - Two line items for tax amount (Posting Key - 50)
Hi,
I am facing some issue in FB60 invoice posting. For the same vendor(say V1) I am posting 2 different invoices for 100 USD - the <u>company code, G/L, CostCenter & Tax Jursdiction code are different</u> in both the cases. Once I do FB60 and got to document overview screen this is what I see...
<b>Case1</b> - in the document overview screen I see a Posting key(PK) 31(invoice amount), PK50(tax amount) & PK40(total amount)...which is fine.
<b>Case2</b> - in second case the document overview shows two line items for PK50(credit - tax amount) and tax amount is different.
Two questions...
1) Why there are two tax items (PK50 items) - is that dependent on tax rule or vendor or company code?
2)My client says the tax amount should be same in both cases - but I am wondering how can it be, when tax codes are different in both the cases? Where can I check how these tax values are getting calculated.
Any adivse/hints will be greatly appreciated/rewarded.
Thanks
KiranAKu
I got the same scenario also
this second document display because of material price change u can double click that document -
Dear Experts,
I have parked an invoice in MIR7.I need the table where tax data in MIR7 are updated. Is there any such table, where tax amount are stored when parking the invoices.
It is very Urgent issue for me.
Thanks
Prasant sekharhi,
check VBSEGK table -
Hi,
Please tell me BAPI for post Tax Amount.
Which tcode use for Post tax code, is it FB01 or FB60.
Regards
JanaHi,
Use BAPI_ACC_DOCUMENT_POST
TCodes
FB41 Post Tax Payable
FB05 Post with Clearing
FB01 Post Document
Edited by: Neenu Jose on Nov 18, 2008 1:15 PM
Edited by: Neenu Jose on Nov 18, 2008 1:16 PM
Edited by: Neenu Jose on Nov 18, 2008 1:17 PM
Edited by: Neenu Jose on Nov 18, 2008 1:18 PM
Maybe you are looking for
-
Zen Nano Plus WON'T START / RECOVERY / RES
Hello ZNP friends and fellow victims of frustration, I have the GB Zen Nano Plus and a Windows XP operating system. My Zen is just over 3 months old, and a few days ago I started having the "stuck on Logo or hour glass (building library) problem". Li
-
PLEASE HELP on how retrieve async callback
Hi all, I have some question on calling and retrieving results from BPEL processes First of all I would like to know the meaning of http://set.by.caller written on service port in the WSDL's process. Why can I see these info (service & binding) only
-
Why are my iTunes songs switched around?
Hi, why is my music messed up in my iTunes??? I play one song and even though it has the right album cover and the right name of the song I want to listen to it plays a completely different song! WHAT'S UP WITH THAT?!?! I also have to have wifi now?
-
Dear Friends, I am trying to draw a structure in Adobe Illustrator with 3D effect. But I am unable to give it proper shape. Can someone please help me for drawing the similar structure as showed below. I have facing problems in giving 3D effect. Than
-
Lightroom 2.2 locking up
Several times now after reviewing many photos and rejecting some, when I click 'delete rejected photo's' under the Photo tab... Lightroom locks up completely requiring not just a reboot, but a hard restart.... The computer can't even shut down proper