SAP CALCULATE_TAXES_NET Function Module for









CALCULATE_TAXES_NET is a standard calculate taxes net 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 taxes net FM, simply by entering the name CALCULATE_TAXES_NET into the relevant SAP transaction such as SE37 or SE38.

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



Function CALCULATE_TAXES_NET 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_TAXES_NET'"
EXPORTING
* I_XBAPI = "

TABLES
TAX_ITEM_IN = "
TAX_ITEM_OUT = "
* ERROR_RETURN = "

EXCEPTIONS
BUKRS_NOT_FOUND = 1 KALSM_NOT_VALID = 10 OTHER_ERROR = 11 KTOSL_NOT_FOUND = 12 KSCHL_NOT_FOUND = 13 KNUMH_NOT_FOUND = 14 MWSKZ_NOT_DEFINED = 2 MWSKZ_NOT_VALID = 3 KALSM_NOT_FOUND = 4 ACCOUNT_NOT_FOUND = 5 COUNTRY_NOT_FOUND = 6 DIFFERENT_DISCOUNT_BASE = 7 DIFFERENT_TAX_BASE = 8 TXJCD_NOT_VALID = 9
.



IMPORTING Parameters details for CALCULATE_TAXES_NET

I_XBAPI -

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

TABLES Parameters details for CALCULATE_TAXES_NET

TAX_ITEM_IN -

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

TAX_ITEM_OUT -

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

ERROR_RETURN -

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

EXCEPTIONS details

BUKRS_NOT_FOUND -

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

KALSM_NOT_VALID -

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

OTHER_ERROR - Unknown error

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

KTOSL_NOT_FOUND -

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

KSCHL_NOT_FOUND -

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

KNUMH_NOT_FOUND -

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

MWSKZ_NOT_DEFINED -

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

MWSKZ_NOT_VALID -

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

KALSM_NOT_FOUND -

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

ACCOUNT_NOT_FOUND - Error in Account Determination

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)

DIFFERENT_DISCOUNT_BASE -

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

DIFFERENT_TAX_BASE -

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

TXJCD_NOT_VALID -

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

Copy and paste ABAP code example for CALCULATE_TAXES_NET 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_i_xbapi  TYPE BKPF-XMWST, "   
lt_tax_item_in  TYPE STANDARD TABLE OF RTAX1U38, "   
lv_bukrs_not_found  TYPE RTAX1U38, "   
lv_kalsm_not_valid  TYPE RTAX1U38, "   
lv_other_error  TYPE RTAX1U38, "   
lv_ktosl_not_found  TYPE RTAX1U38, "   
lv_kschl_not_found  TYPE RTAX1U38, "   
lv_knumh_not_found  TYPE RTAX1U38, "   
lt_tax_item_out  TYPE STANDARD TABLE OF RTAX1U38, "   
lv_mwskz_not_defined  TYPE RTAX1U38, "   
lt_error_return  TYPE STANDARD TABLE OF BAPIRET2, "   
lv_mwskz_not_valid  TYPE BAPIRET2, "   
lv_kalsm_not_found  TYPE BAPIRET2, "   
lv_account_not_found  TYPE BAPIRET2, "   
lv_country_not_found  TYPE BAPIRET2, "   
lv_different_discount_base  TYPE BAPIRET2, "   
lv_different_tax_base  TYPE BAPIRET2, "   
lv_txjcd_not_valid  TYPE BAPIRET2. "   

  CALL FUNCTION 'CALCULATE_TAXES_NET'  "
    EXPORTING
         I_XBAPI = lv_i_xbapi
    TABLES
         TAX_ITEM_IN = lt_tax_item_in
         TAX_ITEM_OUT = lt_tax_item_out
         ERROR_RETURN = lt_error_return
    EXCEPTIONS
        BUKRS_NOT_FOUND = 1
        KALSM_NOT_VALID = 10
        OTHER_ERROR = 11
        KTOSL_NOT_FOUND = 12
        KSCHL_NOT_FOUND = 13
        KNUMH_NOT_FOUND = 14
        MWSKZ_NOT_DEFINED = 2
        MWSKZ_NOT_VALID = 3
        KALSM_NOT_FOUND = 4
        ACCOUNT_NOT_FOUND = 5
        COUNTRY_NOT_FOUND = 6
        DIFFERENT_DISCOUNT_BASE = 7
        DIFFERENT_TAX_BASE = 8
        TXJCD_NOT_VALID = 9
. " CALCULATE_TAXES_NET




ABAP code using 7.40 inline data declarations to call FM CALCULATE_TAXES_NET

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 XMWST FROM BKPF INTO @DATA(ld_i_xbapi).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


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!