# FI_TAX_CALCULATION — Calculate FI Tax Lines

> Calculates the tax lines (BSET) of an FI document from its header (BKPF) and item (BSEG) data according to the tax codes. It is used in custom developments that simulate tax amounts before posting or rebuild tax lines. The tax code and tax base must be filled correctly in the items; the results are returned in the T_BSET table.

- Modules: FI
- Type: Function module
- Function group: TAX2
- Remote-enabled (RFC): No
- S/4HANA status: Used the same way in S/4HANA
- URL: https://nekuhub.com/en/functions/fi-tax-calculation/

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| I_RWBSET_HEAD | RWBSET_HEAD | Tax line header data | - |

## Tables parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| T_BKPF | BKPF | Document header | Yes |
| T_BSEG | BSEG | Document items | Yes |
| T_BSET | BSET | Tax lines | Yes |
| T_BSEC | BSEC | One-time account data | - |
| T_RWBSET | RWBSET | Accounting interface tax lines | - |

## Call template (ABAP)

```abap
CALL FUNCTION 'FI_TAX_CALCULATION'
  TABLES
    t_bkpf = lt_t_bkpf
    t_bseg = lt_t_bseg
    t_bset = lt_t_bset
    t_bsec = lt_t_bsec
    t_rwbset = lt_t_rwbset.
```

## Related tables

BSET, T007A

