Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Tax calculation of PO line item using CALCULATE_TAX_ITEM

ajeethram
Explorer
0 Kudos
8,311

Hi All,

I am using  CALCULATE_TAX_ITEM function module to find taxes used in particular PO line item. I did pass values to TAXCOM structure.

The function module returns all the conditions and values properly, except for some conditions it returns 0 value.

I tried searching SCN regard this issue and didn't got any valuable input.

I also used the below FM's before CALCULATE_TAX_ITEM as said in some posts, but no luck.

   CALL FUNCTION 'J_1BSA_COMPONENT_ACTIVE'

     EXPORTING

       bukrs                = wa_ekpo-bukrs

       component            = 'IN'

     EXCEPTIONS

       component_not_active = 1

       OTHERS               = 2.

   IF sy-subrc EQ 0.

     ls_komk-mandt = ekko-mandt.

     ls_komk-kalsm = ekko-kalsm.

     IF ekko-kalsm = ''.

       ls_komk-kalsm = 'ZDOMES'.

     ENDIF.

     ls_komk-kappl = 'M'.

     ls_komk-waerk = ekko-waers.

     ls_komk-knumv = ekko-knumv.

     ls_komk-lifnr = ekko-lifnr.

     ls_komp-kposn = wa_ekpo-ebelp.

     ls_komp-matnr = wa_ekpo-matnr.

     ls_komp-werks = wa_ekpo-werks.

     ls_komp-matkl = wa_ekpo-matkl.

     ls_komp-infnr = wa_ekpo-infnr.

     ls_komp-evrtn = wa_ekpo-konnr.

     ls_komp-evrtp = wa_ekpo-ktpnr.

     CALL FUNCTION 'RV_PRICE_PRINT_ITEM'

       EXPORTING

         comm_head_i = ls_komk

         comm_item_i = ls_komp

         language    = 'E'

       TABLES

         tkomv       = tkomv

         tkomvd      = tkomvd.

   ENDIF.

   IF NOT ekko-llief IS INITIAL.

     ls_taxcom-llief = ekko-llief.

   ELSE.

     ls_taxcom-llief = ekko-lifnr.

   ENDIF.

   CALL FUNCTION 'REFRESH_TAX_TABLES'.

   CALL FUNCTION 'FIND_TAX_SPREADSHEET'

     EXPORTING

       buchungskreis = is_t001-bukrs

     EXCEPTIONS

       not_found     = 1

       OTHERS        = 2.

Kindly advice any additional input if needed.

Thanks,

Ajeeth

1 ACCEPTED SOLUTION

0 Kudos
3,124

Hi Ajeeth,

Better check your pricing procedure like, Is there any routine assigned (for your condition's base value) in that or not? Because I have faced similar issue, but I got the amount as double due to some routine assignment.

Thanks,

Venkadesh

12 REPLIES 12

Former Member
0 Kudos
3,124

Hi,

Try to find the values of missing conditions from below table if possible:

  • KONH Conditions (Header)
  • KONP Conditions (Item)
  • KONV Conditions (Transaction Data).

Regards,

Venu

0 Kudos
3,124

Hi Venu,

Thanks for the reply.

Even the tables KONP has null value in it.

Thanks,
Ajeeth

0 Kudos
3,124

Hi,

I think you can find the value in KONV or KOND tables. If not check try checking Pricing Routine Tables which is assigned in pricing procedure.

Regards,

Venu

0 Kudos
3,124

Checked KONH, KONP, KONV, KOND, AXXX(condition table), but no luck.

Thanks,
Ajeeth

former_member195431
Participant
0 Kudos
3,124

Hello Ajeeth,

Fill the FM for testing as mentioned in the steps below: -

Hopefully this should solve your issue.

Thanks

Rajit

0 Kudos
3,124

Hi Rajit,

Yes i am already passing the above said values in that FM.

Thanks,

Ajeeth

0 Kudos
3,125

Hi Ajeeth,

Better check your pricing procedure like, Is there any routine assigned (for your condition's base value) in that or not? Because I have faced similar issue, but I got the amount as double due to some routine assignment.

Thanks,

Venkadesh

0 Kudos
3,124

Hi Venkadesh,

Yes there is a routine assigned in that step and it is non statistical.

Thanks,
Ajeeth

0 Kudos
3,124

Hi Ajeeth,

Try to put break point on FM "J_1I4_GET_KWERT" this will give base amount for the routine, so once u debug that may help to resolve your issue.

Thanks,

Venkadesh

0 Kudos
3,124

Hi Venkadesh,

The routines 362 and 363 are assigned in 2 other condition types and the sum of these makes the third condition which i need to fetch.

Problem is the conditions with routines assigned brings wrong value and the 3rd condition brings null value.

I tried debugging the routine which contains the FM you said in above thread, but couldn't find anything.

Thanks,
Ajeeth

0 Kudos
3,124

Hi All,

The issue got resolved using the below FM above CALCULATE_TAX_ITEM,

   CALL FUNCTION 'J_1I4_COPY_PO_DATA'

     EXPORTING

       y_ekpo = ekpo.


@ Venkadesh,


The FM you suggested was being called inside the above mentioned FM, thus calculating the missing values. Thanks for the valid suggestion.


Thanks to all.


Regards,

Ajeeth

0 Kudos
2,370

Dears,

Its really works with me. Thanks

Asim