SAP Function Modules

MSR1_MD_TAXRATE_GETLIST SAP Function module - Get List of Tax Rates per Country







MSR1_MD_TAXRATE_GETLIST is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name MSR1_MD_TAXRATE_GETLIST into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: MSR1_MD
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM MSR1_MD_TAXRATE_GETLIST - MSR1 MD TAXRATE GETLIST





CALL FUNCTION 'MSR1_MD_TAXRATE_GETLIST' "Get List of Tax Rates per Country
* EXPORTING
*   application =               " msr_select-application  Application Name
*   pi_land1 =                  " a002-aland    Departure Country (MSR_SELECT)
*   pi_kschl = 'MWST'           " a002-kschl    Tax Condition Type
*   pi_pricing_date = SY-DATUM  " a002-datbi    Validity date of the condition record
  IMPORTING
    return =                    " bapiret2      Return parameter
  TABLES
    pot_taxrate =               " msr1_taxrate  MSR: Tax Rate
    .  "  MSR1_MD_TAXRATE_GETLIST

ABAP code example for Function Module MSR1_MD_TAXRATE_GETLIST





The ABAP code below is a full code listing to execute function module MSR1_MD_TAXRATE_GETLIST including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_return  TYPE BAPIRET2 ,
it_pot_taxrate  TYPE STANDARD TABLE OF MSR1_TAXRATE,"TABLES PARAM
wa_pot_taxrate  LIKE LINE OF it_pot_taxrate .


SELECT single APPLICATION
FROM MSR_SELECT
INTO @DATA(ld_application).


SELECT single ALAND
FROM A002
INTO @DATA(ld_pi_land1).


SELECT single KSCHL
FROM A002
INTO @DATA(ld_pi_kschl).


SELECT single DATBI
FROM A002
INTO @DATA(ld_pi_pricing_date).


"populate fields of struture and append to itab
append wa_pot_taxrate to it_pot_taxrate. . CALL FUNCTION 'MSR1_MD_TAXRATE_GETLIST' * EXPORTING * application = ld_application * pi_land1 = ld_pi_land1 * pi_kschl = ld_pi_kschl * pi_pricing_date = ld_pi_pricing_date IMPORTING return = ld_return TABLES pot_taxrate = it_pot_taxrate . " MSR1_MD_TAXRATE_GETLIST
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_return  TYPE BAPIRET2 ,
ld_application  TYPE MSR_SELECT-APPLICATION ,
it_pot_taxrate  TYPE STANDARD TABLE OF MSR1_TAXRATE ,
wa_pot_taxrate  LIKE LINE OF it_pot_taxrate,
ld_pi_land1  TYPE A002-ALAND ,
ld_pi_kschl  TYPE A002-KSCHL ,
ld_pi_pricing_date  TYPE A002-DATBI .


SELECT single APPLICATION
FROM MSR_SELECT
INTO ld_application.


"populate fields of struture and append to itab
append wa_pot_taxrate to it_pot_taxrate.

SELECT single ALAND
FROM A002
INTO ld_pi_land1.


SELECT single KSCHL
FROM A002
INTO ld_pi_kschl.


SELECT single DATBI
FROM A002
INTO ld_pi_pricing_date.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name MSR1_MD_TAXRATE_GETLIST or its description.