Calculate sales tax rate using a query

Hello,
I am not sure if I can ask this question in the correct forum, excuse me if I am in the wrong place. Below is the question
We are using STATE.COUNTY.CITY combination for computing the tax.
I am fetching the sales tax rate in a custom form based on the ship_to of the customer from ar_location_rates, below is a query to fetch the state tax rate
     SELECT      NVL(arr.TAX_RATE, 0
     FROM      hz_cust_site_uses_all      HCSU,
               hz_cust_acct_sites_all      HCAS,
               hz_party_sites               HPS,
               hz_locations               HLC,
               hz_loc_assignments           HLA,
               ar_location_combinations alc,
               ar_location_rates           arr,
               hz_cust_accounts           hca
     WHERE      HCSU.site_use_id = v_site_use_id
     AND      hcsu.CUST_ACCT_SITE_ID = hcas.CUST_ACCT_SITE_ID
     AND      hcas.PARTY_SITE_ID = hps.PARTY_SITE_ID
     AND      hps.LOCATION_ID = hlc.LOCATION_ID
     AND      hlc.LOCATION_ID = HLA.LOCATION_ID
     AND      hla.LOC_ID = alc.LOCATION_ID
     AND alc.LOCATION_ID_SEGMENT_1 = arr.LOCATION_SEGMENT_ID
     AND     hca.CUST_ACCOUNT_ID = v_cust_acct_id
     AND      SUBSTR(hlc.POSTAL_CODE, 1,5) BETWEEN arr.FROM_POSTAL_CODE AND SUBSTR(arr.to_POSTAL_CODE, 1,5)
     AND     TO_CHAR(arr.end_date,'DD-MM-YYYY') = '31-12-2199';
I want to make sure if I am going the correct route, since the query is working in one instance and isn't working in another.
Thanks

Dear Jitendra,
maybe it would be better to post your question to forum <Expert Forums\SAP Business One\SAP Business One SDK>. There you will  find experts in programming DI and UI.
The forum <Expert Forums\SAP Business One\SAP Business One> you posted to is rather for questions concerning the use of SAP Business One and not the programming of its interfaces. Of course, it may be possible that someone answers your question here, too. But it is more likely to find answers in the others forum.
Regards,
Frank Romeni

Similar Messages

  • Sales Tax rate in Sales Order

    Hi All,
    I am writing an application which is suppose to import Sales Orders from other application, I cannot use DTW because I need to do some calculations while importing orders so am using DI to write code.
    Ok now comes the real problem, I have “Sales Tax” rate in my source application and I want to use same percentage in order, but DI does not allows me to specify sales tax rate (%) for the order instead it uses default customer tax code. Is there any way where I can override default tax rate and populate it with the number from source application?
    Thanks Gurus
    Jiten

    Dear Jitendra,
    maybe it would be better to post your question to forum <Expert Forums\SAP Business One\SAP Business One SDK>. There you will  find experts in programming DI and UI.
    The forum <Expert Forums\SAP Business One\SAP Business One> you posted to is rather for questions concerning the use of SAP Business One and not the programming of its interfaces. Of course, it may be possible that someone answers your question here, too. But it is more likely to find answers in the others forum.
    Regards,
    Frank Romeni

  • How we Rewrite the following class so that it calculates sales tax using a

    public class Item {
    private String sku;
    private double price;
    // return the sales tax
    public double salesTax() {
    return price * 0.7;
    public Item(String sku, double price)
    this.sku = sku;
    this.price = price;
    }

    one thing i would like to say you, we are here for common discussion releated to Java, i have asked a question which might be knowing to u ? but in reply i think dont want to give answer ! oky no problem !
    and as per my research abilities are concerned that are well good enough but just dont having enough resourses avilable with me thats y i have put on my quiery.
    About my Answer to Question i will find it any how.
    Thankyou.

  • How to calculate different tax rates for  same material in single invoice.

    Dear All,
    If the excise rates are changed during the budget and the stock is lying with the client with the existing rate.
    After effective date of new rates we receive the good with new rates.The new and the old rate stock is sent to a customer in single invoice.How can we configure such case. The excise should calculate by old rate to old stock and new stock should be calculated by new rate.
    Please guide in such case.
    Thanks in advance.
    deepti

    Hi Deepti
    In copy control you will have to redeterfine taxes whilst billing.
    If you want you change this and keep it as copy pricing. This won't change anything. Else use Copy prices and redetermine tax. You can find this setting in VTLA and VTFA in item category Pricing type.
    You can't have both of then in the same invoice as procedure is decided for the whole invoice and not a single Item. You can rather have two different item category type. TAN and ZTAN you redetermine taxes for tan and copy them as it is for ZTAN.
    Regards

  • Calculate sales tax based on all line items on the order

    My users have asked to determin tax on the sales order, based on all the line items on the order. For example, if all the items are for product only, or if all the line items are for labor only, or if there is a mix of product and labor,
    Order 1
    line 1 product flag as both for vertex
    line 2 labor flag as both for vertex
    Order 2
    line 1 product flag as product only
    line 2 product flag as product only
    Order 3
    line 1 labor flag as labor only
    line 2 labor flag as labor only
    I do not see away to do this while the order is being created. In the order 1 example above, line one is entered, priced, and taxed as product only (it is the only line on the order at that time and it is product only). Line two is entered, it is marked as both. But I cannot send line item one back through vertex marked as both. Vertex processing is already complete.
    I have looked at using both FYTX0001 and FYTX0002. With both of these exits I can only work with a single line item, i.e. once item one is processed it will not go through the exit when item two is added.
    Any assistance would be appreciated.
    Jay

    Hi WCG,
    Our business is located in California as well. California is a modified-origin state, where state, county, and city taxes are based on the origin of the sale, while district taxes are based on the destination of the sale. You only need to add Sales tax when your customer's billing address is in California. I do not believe that Catalyst currently supports district based sales tax. You could look into a third party solution like TaxJar and see if it could be integrated into Catalyst. We currently charge our California based customers exactly what we would charge them in our retail store.
    So you want to do something like this:
    -Ryan

  • Calculate Sales Tax on Freight Condition

    Hi All,
    We have an issue where we need to calculate an additional amount of Sales Tax on the Freight Condition which is entered on the Delivery Document as a manual condition and not on the sales order itself.
    I am unable to configure the system so that the Sales Tax amount calculated for the whole invoice is inclusive of the Freight amount too
    Is there any suggestions as to how I could do this?
    Thank you for you support
    Rukshana

    1. Calculation of sales tax on basic+ ED+ freight charges.
    2. Calculation procedure as basic+ Freight + ED+ sales.
    excise and tax is for a value addition to a product . so excise , tax is on basic value only.
    IF you want it for freight taxes  u need to do transportation  cost ther u can maintain service tax for freight vendors.
    me21n, vl31n,vt01n,vi01

  • Invoice Smartform - Printing sales tax rate

    Hey,
    I am having difficulties figuring out what changes I need to make in the print program RLB_INVOICE and the smartform LB_BIL_INVOICE in order to print out the sales rate tax.
    Thanks!
    Kas

    No Need to change the print program RLB_INVOICE , you need to chnage the smartfrom, anyway ur getting the  document number based on that you can fectch the sales tax and dispaly tha data....
    in the smartfrom you can write the code in program lines or From Routines.

  • How does iTunes Store calculate sales tax?

    Connecticut sales tax is 6.5%, but iTunes Store is charging 10% on purchases.

    Hi...
    Use the email form to contact Apple here >  Apple - Support - iTunes Store - Contact Us
    Information regarding taxes and fees here >  iTUNES STORE - TERMS AND CONDITIONS

  • Finding out the sales tax type using the Fun. Module-ME_PO_PRICE_SIMULATION

    HI,
       I have used the function module ME_PO_PRICE_SIMULATION to give the pricing details in one report.  In the same function module it is also giving the tax applicable for the vendor-material-site combination. ie., tax code and the tax. procedure. Is it possible to find out the Tax type using
    this data ie,, if it is LST or CST

    Hi ,
    I think from the taxcode you can findout LST(or) CST
    try
    G.Ganesh Kumar

  • Use Tax and Sales Tax

    Hi ,
    I want to know exactly what is use tax and Sales Tax. and how it is effects the business process if Use tax or sales tax is used.
    Thanks

    Sales tax is applicable to Sales within a state. Use tax is applicable on purchase from other state.
    It is clearly explained in SAP Library. Follow the link attached below:
    http://help.sap.com/saphelp_47x200/helpdata/en/e6/149e36d10e057ee10000009b38f889/frameset.htm
    Thanks
    Palani

  • How to calculate percentage growth rate

    Hi guys,
    Please I am trying to calculate the percentage of growth rate using MDX query.
    I have tried this but it keeps returns a null value.
    Create Member CurrentCube.[Measures].[Monthly Growth Internet Sales Amount]
    As [Measures].[Internet
    Sales Amount]/
    ([Date].[Month of Year].CurrentMember,[Measures].[Internet Sales Amount])- 
    ([Date].[Month of Year].PrevMember,[Measures].[Internet Sales Amount]), 
    FORMAT_STRING = "Currency", 
    VISIBLE = 1
    I need your assistance please.
    me

    Are you trying to return a percentage? If so, your format_string needs to have a percentage format.
    Also, are you trying to return [Internet Sales Amount] change vs last month? 
    If so, the query should be something like this...
    Member CurrentCube.[Measures].[Monthly Growth Internet Sales Amount]
    As
    (([Date].[Month of Year].CurrentMember,[Measures].[Internet Sales Amount])-
    ([Date].[Month of Year].PrevMember,[Measures].[Internet Sales Amount]))
    / [Measures].[Internet Sales Amount],
    FORMAT_STRING = "0.0%",
    VISIBLE = 1
    Please mark as answered, if this is what you are looking for.

  • Sales tax by state report in BI

    Hi Gurus,
    I have a requirement to design sales tax by state report in BI.
    Could you pls suggest how i need to approach.
    What is the standard datasource and standard DSO and cube.
    Do we have any standard sales tax by state standard query in BI.
    Regards
    Parnith

    Hi,
    I am not sure i got your question correctly (as you have not provided lot of information, its a generic question), so my answer will be, you can use the Datasource 2LIS_13_VDITM, which has the field MWSBP(tax), which brings tax information to BW and the same datasource also has Division, Sales District ,Sales Office etc, which can be used to derive State and you can stage this data in a billing item DSO (go to RSA1-- Business Content--> Datasources (select 2LIS_13_VDITM) and change grouping to Dataflow after and you will information about staging this datasource in BW (DSO, Cubes etc ).
    Cheers,
    CK

  • Maintaing Tax rates in TAXINJ through VK19 or FV11

    One more clarification I want.
    As per SAP notes in TAXINJ we can use VK19 for maintaining the Excise condition % like JMOD ,JECS and J1AX otherwise we need to remove stastical mark from Taxinj then only we can put % for Ecxise in Tax code.
    Fir Cess and SEcess ,SAP has released the config doc in which they are using VK19 for maintaing the these rates.
    Offcourse JIN6 and JIN7 we are directly maintaining in FTXP.
    If we are maintaining sale tax rate in FTXP we can see that values reflected in VK19 as well as in FV11 also for JIN6 and JIN7.Even all those values are store in one table KONP(KBETR)
    Then why we cannot use VK19 in TAXINJ?
    What excatly the problem we get if we do so.
    I need your help Lakhsmi.
    Regards
    Sunil

    Dear Sunil
    Normally tax condition records are maintained for TAXINN.
    VK11 for SD tax  condition rates
    FV11 for MM conditions
    Thanks
    Deepu Pillai

  • Rate maintenance of Taxe rate in TAXINJ through VK19 or FV11

    One more clarification I want.
    As per SAP notes in TAXINJ we can use VK19 for maintaining the Excise condition % like JMOD ,JECS and J1AX otherwise we need to remove stastical mark from Taxinj then only we can put % for Ecxise in Tax code.
    Fir Cess and SEcess ,SAP has released the config doc in which they are using VK19 for maintaing the these rates.
    Offcourse JIN6 and JIN7 we are directly maintaining in FTXP.
    If we are maintaining sale tax rate in FTXP we can see that values reflected in VK19 as well as in FV11 also for JIN6 and JIN7.Even all those values are store in one table KONP(KBETR)
    Then why we cannot use VK19 in TAXINJ?
    What excatly the problem we get if we do so.
    I need your help Lakhsmi.
    Regards
    Sunil

    Hi sunil
    In FTXP we will maintain Tax codes for that procedure..
    In VK19 we will maintain rate for central condition types.
    In VK11 we will maintain rate for sales condition types
    This is the difference ..
    Regards
    Srinivas.

  • USA Sales Tax defaulting from Location other than Ship To Site

    We have a requirement to default USA Sales Tax Rates in Order / Invoice based on Location say 'Loc1' different from Ship to Location say 'Loc2'. The location 'Loc1' is captured in Order Line DFF. We have only two types of tax codes defined for USA.
    1) Sales Tax - this is Location Based Tax (combination of State, County and City)
    2) Exempt - this is Non Taxable
    Questions:
    1) Is there a way to default Tax Code and Tax Rate based on 'Loc1' without any customizations?
    2) Just in case we customize the Tax Code defaulting to default based on location 'Loc1', is there a way to default & calculate Tax Rate corresponding to location 'Loc1'?
    3) What are the API/s to calculate Tax Rates with Location as input?
    4) What are the ways so that Tax Code & Tax Rate forcefully assigned at Order Line does not alter at Autoinvoice Interface and then Invoice?
    -Amrut

    Yes, It is happening for all suppliers. but not for all locations.
    I am able to book the order by selecting the other location.
    I have checked the location defied in oracle inventory and it looks ok.
    rgds

Maybe you are looking for