Skip to Content
author's profile photo Former Member
Former Member

CALCULATE_TAX_ITEM' giving wrong results

Hi Experts,

I am using CALCULATE_TAX_ITEM' FM to get the Invoice tab tax details in Smartforms for printing Purchase Order.

When iam trying to see print preview, some time it is giving correct values and some times not.

I have used FM REFRESH_TAX_TABLES to refresh the tax Internal Table but still unable to get the correct values.

if i debug the form then its giving correct values and the same PO im executing directly its not giving correct value.

I have cleared all local variable, structures and internal tables.

Please let me know if anyone faced the same issue in smartforms,

Regards

SK

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 13, 2010 at 05:56 AM

    hi Shaik Basha

    Please make sure dat u are using :

    RV_PRICE_PRINT_ITEM' and 'J_1B_NF_PO_DISCOUNTS' prior to CALCULATE_TAX_ITEM' It makes the necessary arrangements regarding the Company code and other details .

    Or you could refer the standard coding for the Calculation of Taxes for the line items it also usually follws the same sequesnce .

    Hope it helps .

    Regrards

    Swapnil

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 13, 2010 at 11:29 AM

    Hi,

    U can get the conditon valuse using FM this will give give correct figures always. ( Make sure that Your conditions are not statistical).

    wa_komp-kposn = wa-ebelp.

    wa_komp-werks = wa-werks.

    wa_komp-matnr = wa-matnr.

    wa_komp-matkl = wa-matkl.

    wa_komp-meins = wa-meins.

    wa_komp-mglme = wa-menge.

    wa_komp-wrbtr = wa-netwr.

    wa_komp-mwskz = wa-mwskz.

    wa_komp-mtart = wa-mtart.

    wa_komk-txjcd = wa-txjcd.

    wa_komk-mwskz = wa-mwskz.

    wa_komk-mandt = ekko-mandt.

    wa_komk-knumv = ekko-knumv.

    wa_komk-aland = ekko-lands.

    wa_komk-bukrs = ekko-bukrs.

    wa_komk-hwaer = ekko-waers.

    wa_komk-waerk = ekko-waers.

    wa_komk-lifnr = ekko-lifnr.

    IF ekko-bsart NE 'ZNB4'.

    wa_komk-kappl = 'TX'.

    ELSE.

    wa_komk-kappl = 'M'.

    ENDIF.

    IF ekko-bsart NE 'ZNB4'.

    wa_komk-kalsm = t005-kalsm.

    ELSE.

    wa_komk-kalsm = ekko-kalsm.

    ENDIF.

    wa_komk-prsdt = ekko-bedat.

    wa_komk-ekorg = ekko-ekorg.

    SELECT SINGLE j_1ichid

    FROM j_1imtchid

    INTO wa_komp-steuc

    WHERE matnr = wa_komp-matnr

    AND werks = wa_komp-werks.

    CALL FUNCTION 'PRICING'

    EXPORTING

    calculation_type = 'B'

    comm_head_i = wa_komk

    comm_item_i = wa_komp

    IMPORTING

    comm_head_e = wa_komk

    comm_item_e = wa_komp

    TABLES

    tkomv = i_komv.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 13, 2010 at 11:56 AM

    Hi,

    You have to use these . It may slove your issue.

    RV_PRICE_PRINT_ITEM

    RV_PRICE_PRINT_HEAD

    RV_PRICE_PRINT_REFRESH

    Thanks.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 16, 2010 at 11:16 AM

    resolved myself

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      HI,

      I have copied the standard FM (CALCULATE_TAX_ITEM) into ZFM and used the same.

      Smartform will not get refresh when u use Cal_XX FM internally (no commit work) so we need to create Z and call the same in Forms.

      Regards

      SK

  • author's profile photo Former Member
    Former Member
    Posted on Oct 18, 2012 at 12:55 PM

    Hi Shaik,

    I am stuck with the same issue can you please gimme the solution for FM CALCULATE_ITEM_TAX.

    This function module is giving the wrong answer.

    Have gone through the number of links but none of them gave the solution

    Any help would be appreciable.

    Thanks & Regards,

    Akshay Ruia

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      I had the same issue, that taxes on invoice tab of PO was not printed correctly on PO form by calling CALCULATE_TAX_ITEM.

      If you want to have the same tax value as komp-mwsbp, that use following form routine call before FB CALCULATE_TAX_ITEM.

      perform j_1b_save_tax_fields(saplmepo) using ekko ekpo lfa1.

      This is used in transaction me23n also.

      Kind regards,

      Tülay

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.