SAP CALCULATE_TAX_ITEM Function Module for









CALCULATE_TAX_ITEM is a standard calculate tax item SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for calculate tax item FM, simply by entering the name CALCULATE_TAX_ITEM into the relevant SAP transaction such as SE37 or SE38.

Function Group: TAX1
Program Name: SAPLTAX1
Main Program: SAPLTAX1
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function CALCULATE_TAX_ITEM pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'CALCULATE_TAX_ITEM'"
EXPORTING
* ANZAHLUNG = ' ' "
* RESET = ' ' "
* I_KTOSL = ' ' "
* DIALOG = ' ' "Call dialog module indicator
* DISPLAY_ONLY = ' ' "Display mode in the dialog module if <> BLANK
* INKLUSIVE = ' ' "
* I_ANWTYP = ' ' "
* I_DMBTR = '0' "
* I_MWSTS = '0' "
I_TAXCOM = "
* PRUEFEN = ' ' "

IMPORTING
E_NAVFW = "Total non-deductible tax
E_TAXCOM = "
E_XSTVR = "Tax changed manually
NAV_ANTEIL = "Allocate non-deductible tax

TABLES
* T_XKOMV = "

EXCEPTIONS
MWSKZ_NOT_DEFINED = 1 MWSKZ_NOT_FOUND = 2 MWSKZ_NOT_VALID = 3 STEUERBETRAG_FALSCH = 4 COUNTRY_NOT_FOUND = 5 TXJCD_NOT_VALID = 6
.



IMPORTING Parameters details for CALCULATE_TAX_ITEM

ANZAHLUNG -

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

RESET -

Data type: C
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_KTOSL -

Data type: BSEG-KTOSL
Default: SPACE
Optional: Yes
Call by Reference: Yes

DIALOG - Call dialog module indicator

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

DISPLAY_ONLY - Display mode in the dialog module if <> BLANK

Data type: C
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

INKLUSIVE -

Data type: C
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_ANWTYP -

Data type: BKPF-AWTYP
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_DMBTR -

Data type: BSEG-DMBTR
Default: '0'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_MWSTS -

Data type: BSEG-MWSTS
Default: '0'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_TAXCOM -

Data type: TAXCOM
Optional: No
Call by Reference: No ( called with pass by value option)

PRUEFEN -

Data type: C
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for CALCULATE_TAX_ITEM

E_NAVFW - Total non-deductible tax

Data type: BSEG-NAVFW
Optional: No
Call by Reference: No ( called with pass by value option)

E_TAXCOM -

Data type: TAXCOM
Optional: No
Call by Reference: No ( called with pass by value option)

E_XSTVR - Tax changed manually

Data type: BSEZ-XSTVR
Optional: No
Call by Reference: No ( called with pass by value option)

NAV_ANTEIL - Allocate non-deductible tax

Data type: BSET-FWSTE
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for CALCULATE_TAX_ITEM

T_XKOMV -

Data type: KOMV
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

MWSKZ_NOT_DEFINED - No percentage rate in procedure for this tax code

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

MWSKZ_NOT_FOUND -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

MWSKZ_NOT_VALID - Tax code is not valid here

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

STEUERBETRAG_FALSCH -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

COUNTRY_NOT_FOUND -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

TXJCD_NOT_VALID -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for CALCULATE_TAX_ITEM Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lv_e_navfw  TYPE BSEG-NAVFW, "   
lt_t_xkomv  TYPE STANDARD TABLE OF KOMV, "   
lv_anzahlung  TYPE KOMV, "   SPACE
lv_mwskz_not_defined  TYPE KOMV, "   
lv_reset  TYPE C, "   SPACE
lv_i_ktosl  TYPE BSEG-KTOSL, "   SPACE
lv_dialog  TYPE BSEG, "   SPACE
lv_e_taxcom  TYPE TAXCOM, "   
lv_mwskz_not_found  TYPE TAXCOM, "   
lv_e_xstvr  TYPE BSEZ-XSTVR, "   
lv_display_only  TYPE C, "   SPACE
lv_mwskz_not_valid  TYPE C, "   
lv_inklusive  TYPE C, "   SPACE
lv_nav_anteil  TYPE BSET-FWSTE, "   
lv_steuerbetrag_falsch  TYPE BSET, "   
lv_i_anwtyp  TYPE BKPF-AWTYP, "   SPACE
lv_country_not_found  TYPE BKPF, "   
lv_i_dmbtr  TYPE BSEG-DMBTR, "   '0'
lv_txjcd_not_valid  TYPE BSEG, "   
lv_i_mwsts  TYPE BSEG-MWSTS, "   '0'
lv_i_taxcom  TYPE TAXCOM, "   
lv_pruefen  TYPE C. "   SPACE

  CALL FUNCTION 'CALCULATE_TAX_ITEM'  "
    EXPORTING
         ANZAHLUNG = lv_anzahlung
         RESET = lv_reset
         I_KTOSL = lv_i_ktosl
         DIALOG = lv_dialog
         DISPLAY_ONLY = lv_display_only
         INKLUSIVE = lv_inklusive
         I_ANWTYP = lv_i_anwtyp
         I_DMBTR = lv_i_dmbtr
         I_MWSTS = lv_i_mwsts
         I_TAXCOM = lv_i_taxcom
         PRUEFEN = lv_pruefen
    IMPORTING
         E_NAVFW = lv_e_navfw
         E_TAXCOM = lv_e_taxcom
         E_XSTVR = lv_e_xstvr
         NAV_ANTEIL = lv_nav_anteil
    TABLES
         T_XKOMV = lt_t_xkomv
    EXCEPTIONS
        MWSKZ_NOT_DEFINED = 1
        MWSKZ_NOT_FOUND = 2
        MWSKZ_NOT_VALID = 3
        STEUERBETRAG_FALSCH = 4
        COUNTRY_NOT_FOUND = 5
        TXJCD_NOT_VALID = 6
. " CALCULATE_TAX_ITEM




ABAP code using 7.40 inline data declarations to call FM CALCULATE_TAX_ITEM

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

"SELECT single NAVFW FROM BSEG INTO @DATA(ld_e_navfw).
 
 
DATA(ld_anzahlung) = ' '.
 
 
DATA(ld_reset) = ' '.
 
"SELECT single KTOSL FROM BSEG INTO @DATA(ld_i_ktosl).
DATA(ld_i_ktosl) = ' '.
 
DATA(ld_dialog) = ' '.
 
 
 
"SELECT single XSTVR FROM BSEZ INTO @DATA(ld_e_xstvr).
 
DATA(ld_display_only) = ' '.
 
 
DATA(ld_inklusive) = ' '.
 
"SELECT single FWSTE FROM BSET INTO @DATA(ld_nav_anteil).
 
 
"SELECT single AWTYP FROM BKPF INTO @DATA(ld_i_anwtyp).
DATA(ld_i_anwtyp) = ' '.
 
 
"SELECT single DMBTR FROM BSEG INTO @DATA(ld_i_dmbtr).
DATA(ld_i_dmbtr) = '0'.
 
 
"SELECT single MWSTS FROM BSEG INTO @DATA(ld_i_mwsts).
DATA(ld_i_mwsts) = '0'.
 
 
DATA(ld_pruefen) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!