Using BRF+ to Replace TVARV in SAP TM: A Step‑by‑Step Guide

Why move from TVARV to BRFplus?
In SAP Transportation Management (TM) it is common to store configurable parameters—such as tariff zones, shipping conditions and regional codes—in table TVARV. While TVARV is simple to maintain, it lacks crucial features: values cannot be transported, there is no version history, and users must have technical access to change entries. SAP’s Business Rule Framework plus (BRFplus) is a web‑based tool that solves these limitations. BRFplus lets business users define rules through a graphical interface, tests and simulations can be performed before activation, and rules are transported like any other SAP configuratio. The framework organizes rules into applications, functions and expressions, with a clear separation between input/output data objects and decision logic.
This tutorial shows how to replace a TVARV lookup with a BRFplus rule that determines a freight material based on input parameters. The steps cover application creation, data objects, decision tables, function exposure and transport.
Step 1 – Create an Application
- Open the BRFplus workbench. Use transaction
BRFPLUSor navigate to the BRFplus Workbench via the SAP Easy Access menu. From the Repository tab choose My Applications and click Create Application:

- Enter basic details. Specify an Application Name, a Short Description and assign it to a responsible User. An application serves as a container for all related rules, expressions and data objects. It is versioned and transportable

- Save and activate. After creating the application, use the Activate function to ensure it is ready for adding objects. Activation writes the definition to a transport request.

Step 2 – Define Data Objects
BRFplus rules operate on Data Objects, which can be simple elements or complex structures. In this example we need input parameters (such as shipping condition and region) and an output parameter (the material to be determined).
- Create elements for each input. In your application’s tree, right‑click and choose Create → Data Object → Element. Give the element a name (e.g.
Z_INPUT_SHIPTYPE) and decide how it binds to underlying data:- DDIC binding: When a corresponding data element exists in the Data Dictionary, select Bind to DDIC element; BRFplus will reuse the domain length and data type.
- No binding: For free‑form text or numeric fields, select No Binding, then define a data type and length manually.


- Create the output element. Repeat the process to create a result element (e.g.
Z_OUTPUT_MATERIAL) and bind it to a material number data element likeMATNR.

- Activate the data objects. Use the Activate command on each element to make them available for use in expressions and functions.

Step 3 – Build a Decision Table
A Decision Table is a spreadsheet‑like expression that maps conditions to results. It is ideal for replacing TVARV because it keeps multiple combinations in one place and allows ranges, wildcards and priority handling.
- Create the decision table. Right‑click the application and choose Create → Expression → Decision Table. Assign a name such as
Z_DT_MATERIAL_DETERMINATIONand open it in edit mode.

- Insert columns. In the Table Settings dialog, add a Condition Column for each input parameter and a Result Column for the output. Assign each column to the data objects created in Step 2.

- Define matches. Add rows for each combination of input values and the corresponding material number. BRFplus supports multiple result rows; you can flag the table to return the first match or all matches depending on your requirements.

- Activate the table. Save and activate the decision table; BRFplus will check for completeness and overlapping conditions.

Step 4 – Create a Function to Expose the Rule
A decision table cannot be called directly; you need a Function that encapsulates the rule, defines its signature and links to the expression.
- Create the function. Right‑click the application and choose Create → Function. Provide a name such as
Z_FUNC_MAT_DETERMINATIONand select Functional Mode.

- Define the signature. In the Signature tab, add the input data objects to the Importing section and the output data object to the Result section. You can also define Changing or Exporting parameters if needed.

- Bind the expression. In the Binding section, choose your decision table as the function’s Top Expression. This tells BRFplus to evaluate the table when the function is executed.
- Activate the function. Activation generates an ABAP class behind the scenes and makes the function callable from ABAP or customizing.
Link decision table, create IN and OUT:



Step 5 – Test the Rule and Generate Code
BRFplus includes built‑in test capabilities:
- Simulate the function. Use the Test button in the function toolbar. Enter sample values for your input parameters and verify that the decision table returns the expected material number. Adjust the table if necessary, then re‑activate.
- Generate a function module. From the Tools menu choose Generate Function Module to create an FM that wraps your BRFplus function. You can call this FM from TM customizing or ABAP code. The generation screen prompts for a function ID and options like including comments or local mode.
- Use SE38–> FDT_TEMPLATE_FUNCTION_PROCESS, and include the ID listed in aplication of BRF+ created:

- Review the generated code. The resulting function module contains minimal ABAP code that passes input parameters to the BRFplus function and returns the result. This generated interface standardizes the call and avoids manual coding.
Step 6 – Transport and Integrate into TM
- Assign the objects to a transport request. Use transaction
FDT_TRANSor choose Write Application/ID to Transport from the BRFplus workbench. Select your application and assign it to a workbench or customizing request. When transported, all included objects—application, data objects, decision tables, functions—move together. - Other option is transport manually, by entering in T-code: fdt_helpers:

- Acces the path below: Write App or ID to transport

- We need to copy the ID of aplication created, select some request, and copy ObjectID, remember to flag the option: Transport Whole Application:


- Replace TVARV calls. In the TM configuration where you previously used TVARV (e.g. in a pricing determination table or a BAdI implementation), call the generated BRFplus function module instead. Map the relevant fields (such as shipping condition and region) to the function’s input parameters and use the returned material number as the result.
Once integrated, future changes to the rule require only an update to the decision table. Versioning and transport management ensure that changes are traceable and consistent across systems.
Conclusion
Switching from TVARV lookups to BRFplus brings several benefits. BRFplus provides a central repository for business rules with built‑in version control and transportability.
Rules are defined through intuitive expressions—such as decision tables—allowing business analysts to maintain logic without ABAP coding. The combination of applications, data objects, functions and rule sets structures the logic and promotes reusability. By following the steps above—creating an application, defining data objects, building a decision table, wrapping it in a function, testing, transporting and integrating—you can replace static TVARV entries with a flexible, maintainable BRFplus solution that enhances your SAP TM processes.