Professional Documents
Culture Documents
Mapping With BRFplus Decision Tables and SAP AIF __ Copy 456h-8rnq-Iubx-yz3f
Mapping With BRFplus Decision Tables and SAP AIF __ Copy 456h-8rnq-Iubx-yz3f
Michal Rohnka
Michal Rohnka
Mapping with
BRFplus Decision Tables
and SAP AIF ®
Uwe Mayer
Predictive Accounting with SAP S/4HANA
www.sap-press.com/5000 | $24.99 | 91 pages
Muhammad Iqbal
SAP HANA Data Lifecycle Management: Dynamic Tiering and Data Aging
www.sap-press.com/5009 | $29.99 | 104 pages
In the E-Bite, we will look in more detail at the extensive mapping capabili-
ties of BRFplus. You will learn how to leverage the wide range of possibilities
that BRFplus decision tables offer in the areas of value and structure map-
pings. You’ll also investigate how other BRFplus expressions can supple-
ment decision tables in creating complex and nested structure mappings,
allowing BRFplus to serve as a fully customizable and high-performance
mapping engine.
Finally, you’ll also learn how to integrate BRFplus with SAP Application Inter-
face Framework. You will implement BRFplus calls in SAP Application In-
terface Framework configurations on value and structure mappings, as well
as checks. You’ll observe standard error-handling behavior and enhance it
with custom logic to maximize SAP Application Interface Framework moni-
toring capabilities.
Figure 1.1 shows the simplest conversion from an external to internal value.
In this case, value AB01 will be converted to 1710, and AC01 will be converted
to 1310.
This is the simplest scenario for BRFplus: you can achieve this goal in many
other ways, but keep in mind that editing such conversions in BRFplus has
proven to be well-received by many business users. Users appreciate the
web-based intuitive environment of BRFplus and the ability to download
and upload Excel files with these conversions. What’s more, it might be
company policy to reduce the number of custom ABAP Dictionary tables in
favor of BRFplus which is recognized to be configuration.
The most important parts of complexity handling are rulesets and rules.
These are used when you run your BRFplus function in action mode. This
mode assumes that you will create a ruleset and populate it with rules,
applying expressions therein. This means you won’t have a single top expres-
sion: you can put as many expressions as you like in rules and even use a rule-
set header, which provides endless opportunities to model your logic.
For example, Figure 1.2 shows complex structure mapping. Based on two
input columns (shaded grey), a decision about how to populate the green
columns is made. That can let you run different logic—for example, for dif-
ferent sending systems. Also note the different icons in the green cells. The
circle, triangle, and rectangle icon indicates that a cell will be populated
based on the value in some input field. For example, the BSCHL destination
field will be populated from the BSCHL source field. The triangle with a small
circle icon shows that this cell contains reference to an expression. That
means that to determine what value should be placed in, for example, the
SGTXT field, an expression will be called and its logic will be performed to
return a value.
Imagine now that from a single cell you can call any expression, and there is
an expression that can call a BRFplus function. The potential is great: you
only need to leverage it.
You’ll map a single value from IDoc FIDCC2 field XREF1_HD to field BUKRS. That
will be the only change in the IDoc content, which will be applied in this sce-
nario. To be able to test the solution, you’ll call the implemented BRFplus
function from enhancement IDOC_INPUT_FIDCC2_G1 in function module
IDOC_INPUT_FIDCC2, which is the standard function module assigned to IDoc
FIDCC2.
Figure 2.1 shows the details of the application you need to set when creat-
ing it:
쐍 Type: Application
쐍 Name: FIDCC2_MAPPING
Values under the Application section are inherited by all objects assigned to
this application. You need to enter the application Name, Text, and Short
Text. In addition, you need to choose the Storage Type; in most cases, includ-
ing this one, it will be Customizing. The last step is assigning a Development
Package and Software Component, as you do for all workbench objects.
Note
When creating BRFplus objects, try to be as descriptive as possible. Name is
object main identification and is used by users working in BRFplus expert user
mode. Short Text is shown as the object name in simple user mode. Text can be
used as part of the self-documentation of objects.
1. To create a function, right-click the application you have just created (in
the navigation panel on the left-hand side of the window) and select Cre-
ate 폷 Function (Figure 2.2). Then populate the following details in the pop-
up window (Figure 2.3):
– Type: Function
– Name: GET_BUKRS
– Short Text: Get Company Code
– Text: Get Company Code value based on external company ID
– Application: FIDCC2_MAPPING
2. Next, add context data objects by clicking the Add New Data Object but-
ton and choosing Add New Data Object (Figure 2.4).
5. Similarly, for a context data object, you need to create a Result Data
Object, by clicking on circular icon, next to the data object (as shown in
Figure 2.6). Then, select Create on the next menu.
6. The result data object should be bound to BUKRS DDIC Element. Populate
details in same way as for XREF1_HD in Figure 2.5, but use BUKRS as DDIC ele-
ment this time. All other fields will be populated automatically. Binding
in this case will also provide you with value help, so values entered in the
decision table will be checked against value table T001, assigned in the
ABAP Dictionary to the BUKRS domain.
Note
For a BRFplus function, you can select one of four different modes:
쐍 Functional Mode: process only top expression; no rulesets
쐍 Event Mode: process only assigned rulesets; no top expression
쐍 Functional and Event Mode: process top expression, then process assigned
rulesets
쐍 Analytical Mode: used for evaluation of large datasets persisted in the data-
base
2. From the available expressions, choose Decision Table, and populate the
other fields as shown in Figure 2.8:
– Type: Decision Table
– Name: DT_GET_BUKRS
– Short Text: DT Get Bukrs
– Text: Decision Table Get Company Code value based on external ID
– Application: FIDCC2_MAPPING
– Is Reusable: Check
– Result Name: BUKRS
– Text: Company Code
Note that the Possible Result Data Objects entry is inherited from the
function and populated automatically.
3. Select Create and Navigate to Object to take a closer look at all the features
that are available on the screen for the newly created Decision Table.
The General tab includes several fields holding the main administration
data of the decision table (as shown in Figure 2.9). Here you’ll see the Name,
unique ID, info about whether Versioning is on, and creation details, along
with the change log, Storage Type (inherited from the application), and
application assignment.
The Texts tab is used to adjust text entered during table creation (as shown
in Figure 2.10). Source can be changed to Text Symbol or Exit Class.
The Documentation tab can be used to hold documentation text (as shown
in Figure 2.11). It can be provided via Free Text Input, an SAPscript object, or
an Exit Class (selected under the Source dropdown). This is a very good place
to keep self-documentation for the object. Details for Texts and Documenta-
tion will be covered in Section 2.4.
The Versioning tab (shown in Figure 2.12) is used to work with versions,
which are described in more detail in Section 2.3.
The Transport information tab contains info about the current transport
request assignment of the object (as shown in Figure 2.13).
When you look down on the screen, below the General tab, you will see three
buttons: Additional Actions, Context Overview, and Start Simulation like on
Figure 2.14. Additional Actions will allow you to perform the following:
쐍 Check Completeness
Check if all of a table’s mandatory fields are populated
쐍 Check Overlaps
Check if all table entries are accessible
쐍 Rearrange
Change order of the columns
쐍 Merge Rows
Combine multiple rows into one row
쐍 Import from Excel
Import table content from Excel file
쐍 Export to Excel
Export table content to Excel file
Context Overview will display context objects available at the decision table
level. Start Simulation will take you to the BRFplus simulation tool. If you
trigger a simulation from the Decision Table screen, only this decision table
expression will be simulated, not the whole function that the decision
table is assigned to.
Below these buttons, you’ll see the Table Contents area (Figure 2.15). Cur-
rently, this area is empty, but you’ll populate it going forward.
Now, click Table Settings on the right side of the Table Contents menu bar
(Figure 2.15). A pop-up window will appear with all decision table options
related to its content. The window is broken down into four sections to help
you distinguish with what type of configuration you’re working on.
Next you need to add a condition column by clicking on Insert Column and
choosing From Context Data Objects (Figure 2.16). A condition column also
can be an expression that returns a Boolean-type result.
The Context Query pop-up window now will appear. Choose XREF1_HD as
your result (Figure 2.17). XREF1_HD will be added as Condition Column. Now
you can close the Table Settings window.
Now that you’ve created a condition for a row, you need to set up what
result it will return.
3. Click the three dots in the BUKRS column and populate the result with a
company code that you have in your system, as shown in Figure 2.19
(company code 1710). Note that because you bound BUKRS to the DDIC ele-
ment, you can now use search help on this field. Doing so will also provide
you with a description of the chosen company code.
5. Add conditions and results to make the finalized content look like Figure
2.21. You’ve already added a line with the condition checking if XREF1_HD
is equal AB01, and you have also added line with condition working with
patterns in previous step. The only missing line is the one that will
check if XREF1_HD is equal to AC01. Use company codes present in your
system.
1. Click the Start Simulation button (shown in Figure 2.14). You will be moved
to BFRplus simulation framework (Figure 2.22). The options here are
divided into the following sections:
– Object
Display object that will be tested. Click the Select button to change
objects.
– Simulation Mode
You can select whether you want code for tested objects to be gener-
ated before simulation execution, by choosing Generation Mode, or
not, by choosing Interpretation Mode.
– Version
You can select which version you would like to test: the current active
version, the newest changes not yet activated, or the version active at a
selected date and time.
– Action Settings
Check the Execute Actions checkbox if you want the simulation to also
execute actions. If not checked, the simulation will only inform you
that an action was reached.
2. Click the Continue button. On the screen that appears, you can populate
context before simulation execution. Each simulation must have context
populated because the BRFplus simulation framework always tests objects
in certain conditions. Figure 2.23 shows manually populated context.
3. Click Import Test Data to import data from Excel (Figure 2.24). Importing
from Excel is not supported if the context contains a table-type data
object. The Create Import Field Structure button prepares a sample Excel
file in the correct format, which you can populate with data and import
back into BRFplus. You don’t need to import test data from Excel in this
example.
Note
Notice that the Variants button is grayed out. Variants are supported only for
functions.
4. Populate data in the XREF1_HD manual input field and click Execute and
Display Processing Steps. This simulation method will show all processing
steps that were involved in providing the result. It’s the best way to debug
your BRFplus objects and learn how they are processing data. Execute will
just run and show the result, which is useful if you already know what’s
happening inside your objects.
5. Figure 2.25 shows the results of the simulation with the processing steps
displayed. In the Result section, you’ll see the actual results. Because the
data object is bound to the DDIC element, you’ll also see the description
of the value.
6. The Processing Steps section shows all the processing steps; you can even
drill down to each cell evaluation procedures (Figure 2.26). Note that
because this is an expression simulation, BRFplus creates a temporary
function to be able to execute it.
2. This will take you to the screen shown in Figure 2.28. Provide data as fol-
lows in the Function Group, Function Module, and Transport sections:
– Function: GET_BUKRS
– Function Description: (Get Company Code)
– Create Function Group: Check
– Function Group: ZFIDCC2_BRF_MAPPING
– Function Module: ZFIDCC2_XREF1_HD_TO_BUKRS
– Development Package: ZBRF_SAPPRESS
– Workbench Request: S42K900259
– Customizing Request: S42K900261
These details will be applied to ABAP function module that will be gener-
ated for you, and thus you’ll have an easy-to-use and reusable ABAP inter-
face for your BRFplus function.
ENHANCEMENT 1 ZIDOC_INPUT_FIDCC2_GL.
DATA: ls_e1fikpf TYPE e1fikpf.
ASSIGN idoc_data[ segnam = |E1FIKPF| ]-sdata
TO FIELD-SYMBOL(<fs_e1fikpf>).
ls_e1fikpf = <fs_e1fikpf>.
CALL FUNCTION 'ZFIDCC2_XREF1_HD_TO_BUKRS'
EXPORTING
XREF1_HD = ls_e1fikpf-xref1_hd
IMPORTING
E_BUKRS = ls_e1fikpf-bukrs
EXCEPTIONS
CX_FDT = 1
CX_FDT_NO_RESULT = 2
CX_FDT_ARITHMETIC_ERROR = 3
CX_FDT_PROCESSING = 4
OTHERS = 5.
<fs_e1fikpf> = ls_e1fikpf.
ENDENHANCEMENT.
Listing 2.1 Enhancement Implementation with BRFplus-Generated Function Module
Now you can input IDoc FIDCC2 and check if the mapping is working cor-
rectly.
Configuration Options
Now we’ll go through all the set up options available for decision tables so
that you can familiarize yourself with all the possibilities offered to make
them work exactly as you need.
To start, click the Table Settings button in the top-right corner of the deci-
sion table contents.
The Result Data Object section shown in Figure 2.29 defines the Result Data
Object and how the decision table should behave in different processing sit-
uations. Three checkboxes are available:
Two options can be found in the Table Check Settings section, shown in Fig-
ure 2.30:
For both table check settings, the following four options can be chosen,
determining the behavior if an issue appears:
The next section is List of Columns, which breaks down to Condition Columns
and Result Columns. Your List of Columns section should look like Figure 2.31.
Note that you can set up a few more parameters for both Condition Columns
and Result Columns. First, the Mandatory Input checkbox indicates if a field
needs to be populated or not. Column Accessibility is used to hide some col-
umns or restrict access to them.
For Result Columns, you can also click Insert Action Column, which will add a
special column in the decision table that triggers BRFplus actions for spe-
cific rows. BRFplus actions can include, for example, sending mail or start-
ing a workflow.
2. The content should look like that shown in Figure 2.33, so there should be
no value in the result data column in the second row, just three dots indi-
cating a BRFplus cell without a value. The rest of the cells should remain
as set up previously.
3. Notice that now the second row in Figure 2.33 has an empty result col-
umn, which was selected to be mandatory in the result columns setup
shown in Figure 2.31. Click the Check button at the top of the screen,
shown in Figure 2.34.
4. Because of the setup you’ve done, the Mandatory Input column checkbox
is checked for BUKRS, and missing mandatory input will be treated as an
error. You’ll see a message like the one in Figure 2.35.
2.3 Versioning
Versioning is a very powerful option and a great tool to trace changes made
to BRFplus objects and secure older versions. It’s extremely useful, espe-
cially with decision tables. Because you can upload decision table content
from Excel, which overwrites all the content, it’s very important to keep ver-
sioning on for the crucial tables so as not to lose data. A trace of version
changes can also be handy when issues occur after configuration updates.
The Versioning tab is visible at the top of the decision table screen, as shown
in Figure 2.36.
Versioning can be switched on or off with the Set Versioning button. After
activation of versioning, each time an object is activated, a new version is
stored. The other button, Object History, allows you to access the detailed
history of the object. After clicking it, you’ll see a pop-up window with a few
selections, as shown in Figure 2.37.
You can set up a date range for which you would like to query the object his-
tory. You can also choose whether to display processing-relevant changes
and non-processing-relevant changes. After clicking the Show History but-
ton, detailed historic info will be shown, as in Figure 2.38.
This information will show you in detail who changed what and when.
Going back to the Versioning tab, you’ll find two more useful functions. The
first one lets you copy an old version. To do this, you just need to select the
version that you’re interested in and click the button with the Copy icon.
The retrieved version will be stored as a new and already active version.
When coping a version, you’ll see the pop-up window in Figure 2.39. It is not
recommended to copy child objects unless you’re sure that you need to do
so. In most cases, you just want to retrieve decision table content.
The last option is version comparison. To compare, you need to select two
versions and click the Compare button. The result will show a comparison of
the two versions in a vertical or horizontal layout (Figure 2.40).
Finally, you can click each version line in the Changes column to see the
change log for a single version (Figure 2.41).
For both Texts and Documentation, four types of dependencies can be set
up:
Exit Class
Exit class is an SAP name for a class called from BRFplus object configura-
tion to supply additional custom ABAP logic. These are regular SAP ABAP
classes that implement required interfaces. The best option is to copy an
example class that SAP delivers to be sure that all requirements are fulfilled.
One common class can handle texts and documentation for many objects.
SAP provides sample class template CL_FDT_DEMO_EXIT_CLASS, which you
can copy and adapt to your requirements. Because it’s a regular ABAP class,
you can develop any kind of complex logic you’d like to provide texts and
documentation. Sample code snippets for implementations can be found
in Listing 2.2 and Listing 2.3. To fetch Texts or Documentation from Exit
Class, you just need to provide a class name in Exit Class field, as shown on
Figure 2.42.
METHOD if_fdt_text_docu_exit~get_text.
ev_text = COND #(
WHEN iv_id = |12B17D7689C01ED9A7ADAE3F8556C2D4|
THEN |DT exit text |
ELSE |text not found| ).
ev_text_type = if_fdt_admin_data=>gc_text_dep_no.
ENDMETHOD.
Listing 2.2 Provide Text from Custom Exit class
METHOD if_fdt_text_docu_exit~get_documentation.
ev_documentation = COND #(
WHEN iv_id = |12B17D7689C01ED9A7ADAE3F8556C2D4|
THEN |DT exit documentation |
ELSE |documentation not found| ).
ev_dependency_type = if_fdt_admin_data=>gc_docu_dep_no.
ENDMETHOD.
Listing 2.3 Provide Documentation from Custom Exit Class
objects, it’s very important to remember that you need to check the object
ID before passing a documentation value. It is also recommended to pro-
vide some standard text, like documentation not found, to show users that
documentation for this object was not found if this object should have doc-
umentation delivered via an exit class. The last line in this listing sets the
type of documentation dependency, the same as we described in Section
2.4, Free Text Input.
So far, you’ve learned how to work with decision tables. You’ve created, con-
figured, and tested them. Now it’s time to use this knowledge to develop
more complex solutions and learn how powerful decision tables and BRF-
plus can be.
3 Advanced Mapping
In this section, you’ll learn how to create nested decision table calls, reuse
decision tables with function call expressions, and enable nested calls to a
decision table with more than one result column. All the examples are
based on same standard IDoc FIDCC2, and we’ll also use the decision table
you created in the previous section so that you can smoothly continue
extending your BRFplus knowledge.
Note
An example of calling a BRFplus function from ABAP code was presented in Sec-
tion 2. All exercises in this section are tested within the BRFplus simulation
framework to put more focus on this core topic of this E-Bite. All of them can be
called from ABAP code by following same steps as described in Section 2.
1. Create a function (as in Section 2.1, Create BRFplus Function) with the fol-
lowing details, as shown in Figure 3.1:
– Type: Function
– Name: GET_E1FIKPF
– Short Text: Get E1FIKPF Segment
– Text: Get E1FIKPF Segment
– Application: FIDCC2_MAPPING
2. Create a new data object by clicking the Add New Data Object button and
choosing Add New Data Object. Populate the following details, as shown
in Figure 3.2:
– Type: Structure
– Name: INB_E1FIKPF
– Text: FI Document Header (BKPF)
– Application: FIDCC2_MAPPING
– Binding Type: Select Bind to Structure Type (DDIC)
– DDIC Type Name: E1FIKPF
Create also a result data object named OUT_E1FIKPF with exactly the same
details (as in Section 2.1, Create BRFplus Function). Now both your context
object and result data object are of the same structure type.
3. Set Function to Functional Mode and create a new top expression with the
following details, shown in Figure 3.3 (as in Section 2.1, Create Decision
Table):
– Type: Decision Table
– Name: DT_GET_E1FIKPF
– Short Text: Get E1FIKPF Segment
Figure 3.3 Decision Table Creation with Result Data Object of Type Structure
4. Go to the table settings by clicking the Table Settings button of the newly
created decision table, then check that the Result Columns table contains
all the fields from the OUT_E1FIKPF structure. Obviously, you don’t need
all of them; in most business cases, only a few out of all the available fields
are used. These fields are created to cover all possible scenarios, but usu-
ally one scenario uses only a portion of them. Use the Column Accessibility
option to hide all fields except BUKRS, BLART, BLDAT, BUDAT, WWERT, XBLNR,
BKTXT, WAERS, GLVOR, and AWTYP. No columns should be set as mandatory, as
shown in Figure 3.4.
Figure 3.4 Table Settings with Mandatory Input Not Checked and Hidden Columns
In this scenario, you will use the decision table as a simple mapping engine,
so there will be no condition columns. Therefore, all inbound E1FIKPF lines
will be processed in the same way.
1. Now it’s time to populate the result columns with some content. Close
the table settings and add a new line to the decision table.
2. To assign context value to the result data object, click the small icon with
an arrow in a cell you want to populate, choose Context 폷 More (Figure 3.5),
and search for the source field. Because you’re mapping between the
same structures, the source field name will be the same as the target field
name.
3. Repeat this for the following columns: BLART, BLDAT, BUDAT, WWERT,
XBLNR, BKTXT, and WAERS. Columns GLVOR and AWTYP populate with
constants. When you’re done, the result should look like Figure 3.6.
The mapping is done! The only missing field is BUKRS. Now you’re going to
implement a nested call to the decision table that will populate BUKRS by
processing expression.
1. Click the BUKRS column and choose Select Expression (Figure 3.7). A pop-
up search window will open; choose decision table DT_GET_BUKRS, which
you created in Section 2, as shown in Figure 3.8. Now your screen should
look like Figure 3.9. Note that result column BUKRS contains not a simple
value, but a call for another expression—in this case, a decision table. This
is a nested call.
Figure 3.9 Nested Call to Decision Table Implemented in Decision Table Result Column Cell
In this section, you’ll learn how to use function call expressions to enable
reusability of decision tables on a higher level. Function call expressions are
basically a context mapping tool. They allow you to call other BRFplus func-
tions as though they were expressions, providing context mapping. Thanks
to that, you can build a generic function with a decision table in it that will
be an interface to your decision table and call this interface with different
function calls depending on the context available.
In this example, you’ll build another structure mapping example with the
E1FISEG structure from IDoc FIDCC2. You’ll use this again in the next sec-
tion. The key point here will be that you will create a single decision table
that will be used differently depending on input parameters. You can imag-
ine two source systems sending data into two different fields, and they need
to be mapped to the same field on the receiving side. In the following exam-
ple, you need to map inbound data to the general ledger account number.
One source system will provide input for mapping to the SGTXT field and
second one to the ZUONR field, but they will use same decision table to pro-
vide the general ledger account number.
1. Create new function GET_E1FISEG (as in Section 2.1, Create BRFplus Func-
tion) as shown in Figure 3.14 with the following data:
– Type: Function
– Name: GET_E1FISEG
– Short Text: Get E1FISEG segment
– Text: GET E1FISEG segment
– Application: FIDCC2_MAPPING
2. Add existing data object INB_E1FIKPF by clicking Add Existing Data Object.
Then add new data object INB_E1FISEG by clicking on Add New Data
Object,with the following data (as shown in Figure 3.15):
– Type: Structure
– Name: INB_E1FISEG
– Text: FI Document Item (BSEG)
– Application: FIDCC2_MAPPING
– Binding Type: Bind to Structure Type (DDIC)
– DDIC Type Name: E1FISEG
3. After you populate the context with two structures, one handling header
and the other the lines of finance document, you need to add a result data
object with the following data, as shown in Figure 3.16:
– Type: Structure
– Name: OUT_E1FISEG
Prepare Ruleset
This time, you’ll set up a function in event mode because you’ll need a rule-
set to achieve the expected mapping result. In more complex scenarios like
this one, the top expression is not enough; you need more flexibility and
processing capabilities to achieve your goal. In such situations, rulesets
come into play. Let’s walk through how to set them up and leverage their
capabilities to extend what is possible in BRFplus:
1. Go to the Assigned Rulesets tab of the function and click the Create Ruleset
button (Figure 3.17). Populate the pop-up window with the following val-
ues (Figure 3.18):
– Type: Ruleset
– Name: RULESET_GET_E1FISEG
– Short Text: Ruleset Get E1FISEG
– Text: Ruleset Get E1FISEG IDoc Segment
– Application: FIDCC2_MAPPING
A ruleset isn’t only an envelope for the rules that are processed one after
another; a ruleset has its own header and can extend context with its own
variables. To show the ruleset header, click the Show Ruleset Header but-
ton (Figure 3.19).
2. In later steps, you will create a decision table that will have a condition
column based on the INB_E1FISEG-KOART field and a result build of all
fields from the OUT_E1FISEG structure, because of that, the decision table
check will let you know that you have condition and result columns with
the same name. To avoid this issue, add a ruleset header variable named
LOCAL_KOART that will store the INB_E1FISEG-KOART value and will be used
as a condition column, bypassing the duplicate name issue. Click Create
(Figure 3.20), then populate the Create Object pop-up with the following
values, as shown in Figure 3.21:
– Type: Element
– Name: LOCAL_KOART
– Short Text: Account Type
– Text: Account Type
– Application: FIDCC2_MAPPING
– Binding Type: Bind to DD
– DDIC Element: KOART
– DDIC Description: Account Type
– Element Type: Text
– Application: FIDCC2_MAPPING
– Is Reusable: Check
4. Formulas are very useful expressions that allow all sorts of variable pro-
cessing, like arithmetical calculations, text operations, system value
retrieval, and more. You’ll use formula expressions in this example for
value passing. Populate a formula as shown in Figure 3.24 to pass a value
from the inbound context KOART to LOCAL_KOART in the ruleset header.
Rules
You’ve already created a ruleset and learned that it’s an envelope used to
structure rules, but rulesets cannot work on their own: they need to contain
rules to be able to execute required business logic. Your next step is to cre-
ate a rule. Rules are the most basic logic handlers in BRFplus. One ruleset
can contain many rules and calls them in sequence. Rules call expressions
as processing blocks. Create a rule by clicking the Insert Rule dropdown
below Rule section in the ruleset window you’re currently in (see Figure 3.25)
and choosing Create.
Note
Rules, unlike other objects in BRFplus, do not open pop-up windows when you
create them.
쐍 Name: DT_GET_E1FISEG
쐍 Application: FIDCC2_MAPPING
쐍 Is Reusable: Check
The result is a whole structure, like in the example in the Decision Table
with Structure as a Result section.
1. Hide and unmark as mandatory all the result columns except BUZEI,
BSCHL, KOART, WRBTR, SGTXT, HKONT, MENGE, and MEINS. Then add two
condition columns. One should be INB_E1FIKPF 폷 XREF2_HD and the other
LOCAL_KOART.
2. Populate the values as shown in Figure 3.28. The XREF2_HD value for the
first row should be as shown in Figure 3.29. And the other two should con-
tain values SOURCE_SYSTEM_001 and SOURCE_SYSTEM_002.
1. Create a new function named GET_HKONT (for detailed steps, see Section 2.1,
Create BRFplus Function).
2. Add a new data object named INPUT as a twenty-character long text with-
out binding.
3. Also add a result data object named HKONT and bind HKONT to the DDIC ele-
ment (for detailed steps, see Section 2.1, Create BRFplus Function). The
result should look as shown in Figure 3.30 and include the following data:
– Mode: Functional Mode
– Top Expression: DT_GET_HKONT
– Component Name: INPUT
– Text: Input for Account
– Data Object: HKONT
4. As you may notice in Figure 3.30, there’s also a top expression DT_GET_
HKONT and its Mode is set to Functional Mode. Set it the same way and cre-
ate a top expression as a decision table (for detailed steps, see Section 2.1,
Create Decision Table) named DT_GET_HKONT with the following parame-
ters as shown in Figure 3.31:
5. Populate the table with values as shown in Figure 3.32 and go back to deci-
sion table DT_GET_E1FISEG. In the INPUT column, you have source values
that are delivered from the source system. In the HKONT field, you need to
populate account numbers that you can find in your system and that can
be used for posting.
6. Click the second row in column HKONT and choose Create Expression (Fig-
ure 3.33). Notice that you are not creating an expression for the whole col-
umn, but only for one cell. Then choose Function Call for the Type and
populate the function call expression details as shown in Figure 3.34.
8. Repeat the same steps for the HKONT cell in the third row of DT_GET_
E1FISEG, but this time name the new function call GET_HKONT_SRC_002 and
map INB_E1FISEG 폷 ZUONR to INPUT. The result should look like Figure 3.36.
Go to the GET_E1FISEG function, activate all new objects, and simulate to
see how it’s using the function call expression to reuse the same decision
table for different inputs.
In the preceding sets of steps, you’ve learned how to build complex struc-
ture mapping and also how to reuse decision tables with function call
Create Function
Let’s start by creating a new function
1. Create a new function with the following info, as shown in Figure 3.37 (for
detailed steps, see Section 2.1, Create BRFplus Function):
– Type: Function
– Name: GET_SGTXT_FROM_MATNR
– Short Text: Get Text from Mat
– Text: Get Short Text from Material
– Application: FIDCC2_MAPPING
Figure 3.37 New Function to Fetch SGTXT Value Based on MATNR Value
2. Populate the Signature tab as shown in Figure 3.38 (for detailed steps, see
Section 2.1, Create BRFplus Function). MATNR should be added using the
Add Existing Data Object button; use the existing INB_E1FISEG 폷 MATNR ele-
ment.
SGTXT_OUT should be created with the Add New Data Object button with
binding to the SGTXT DDIC object, as shown in Figure 3.39:
– Type: Element
– Name: SGTXT_OUT
– Short Text: Result Short Text
– Text: Result Short Text
– Application: FIDCC2_MAPPING
– Binding Type: Bind to DD
– DDIC Element: SGTXT
– DDIC Description: Text
– Element Type: Text
Create Ruleset
The next step is to create a ruleset for your new function, using the follow-
ing details, as shown in Figure 3.40 (for detailed steps, see Section 3.2, Pre-
pare Ruleset):
쐍 Type: Ruleset
쐍 Name: RULESET_GET_SGTXT
쐍 Application: FIDCC2_MAPPING
쐍 Name: SGTXT_MEINS_STRUCTURE
쐍 Application: FIDCC2_MAPPING
Create only two fields from existing data objects INB_E1FISEG-MEINS and
INB_E1FISEG-SGTXT. The result should look like Figure 3.42, so you should
see the two fields you have just added, MEINS and SGTXT. Activate and close
the structure.
and table settings like those shown in Figure 3.44 (for detailed steps, see Sec-
tion 2.1, Create Decision Table and Prepare Ruleset):
쐍 Name: DT_GET_SGTXT_MEINS
쐍 Application: FIDCC2_MAPPING
쐍 Is Reusable: Check
Populate the decision table with values like those shown in Figure 3.45.
In the MATNR column, you can provide some material numbers from your
system or some random values; these values will not be used during the
posting. Texts provided in the SGTXT column are free texts; you can enter
any values that will help you in the exercise. The MEINS column should be
filled in with some existing unit of measure values.
Figure 3.45 Decision Table with Two Result Columns Populated with Values
Finally, pass SGTXT from the variable to the SGTXT_OUT result of the func-
tion. You can do this simply by adding a rule to the ruleset, as shown in Fig-
ure 3.46. This function is completed.
Create Function
First, you need to create a function:
1. Create a function like that shown in Figure 3.47 (for detailed steps, see Sec-
tion 2.1, Create BRFplus Function):
– Type: Function
– Name: GET_MEINS_FROM_MATNR
– Short Text: Get UoM from Mat
– Text: Get Unit of Measure from Material
– Application: FIDCC2_MAPPING
Figure 3.47 New Function to Fetch MEINS Value Based on MATNR Value
2. Create a result data object with the following details (as shown in Figure
3.48):
– Type: Element
– Name: MEINS_OUT
– Short Text: Result UoM
– Text: Result Unit of Measure
– Application: FIDCC2_MAPPING
– Binding Type: No Binding
– Element Type: Text
The context should be same as in the previous function (for detailed steps,
see Section 2.1, Create BRFplus Function), so only the MATNR field should be
there. Set the function to event mode.
Create Ruleset
Create a ruleset called RULESET_GET_MEINS and a ruleset header just like in
the The SGTXT Column section. To do so, use the existing SGTXT_MEINS_
STRUCTURE as a Variable and decision table DT_GET_SGTXT_MEINS as Expression
which Initializes the Variables. The only change will be in the rule, which
should be as shown in Figure 3.49. Instead of changing the SGTXT_OUT ele-
ment, you will change MEINS_OUT, which is a result data object of the GET_
MEINS_FROM_MATNR function.
Expression
Once you’ve created two new functions, create a function call expression
for each one. Name them GET_SGTXT_FROM_MATNR and GET_MEINS_FROM_MATNR.
Their details should match those shown in Figure 3.50 and Figure 3.51. They
should be pointing to GET_SGTXT_FROM_MATNR and GET_MEINS_FROM_MATNR as
Target Function. They should both map source MATNR field to target MATNR
field. Result Data Objects should be set to OUT_E1FISEG-SGTXT and OUT_
E1FISEG-MEINS.
To use the function call expressions you just created, go to decision table
DT_GET_E1FISEG and populate columns SGTXT and MEINS with calls to their
corresponding function call expressions. The result should look like Figure
3.52. Activate all objects and go to the simulation to see them in action.
Figure 3.52 Decision Table DT_GET_E1FISEG Populated with New Function Calls
5. Scroll down to the bottom of the value mapping, click BRFplus Function
Name, and press (F1). You’ll see what’s required from the BRFplus func-
tions for them to work with SAP Application Interface Framework. Your
BRFplus function GET_BUKRS doesn’t fulfill those conditions because its
context is not aligning with what’s described in the help info. Notice that
there is no information related to processing itself, so the only thing
that’s mandatory is the matching context.
6. As you learned in previous sections, the best BRFplus tool to adjust your
function’s context to the current needs is the function call expression,
but you need to also create a function that has the correct context and
can be called from SAP Application Interface Framework. Go to the BRF-
plus workbench and create a new function named GET_BUKRS_AIF (for
detailed steps, see Section 2.1, Create BRFplus Function). Its signature
should only consist of VALUE1 bound to DDIC element XREF1_HD, and the
result object can be named as you wish; there is no SAP Application
Interface Framework prerequisite for this (for detailed steps, see Section
2.1, Create BRFplus Function). Next, create a top expression GET_BUKRS_
AIF of type call function (for detailed steps, see Section 2.1, Create Deci-
sion Table). Your result should look like Figure 4.3. You should have one
context parameter named VALUE1, a result data object created, and top
expression GET_BUKRS_AIF.
Figure 4.3 New Function with Context Prepared to Be Called from SAP AIF
7. Now you can go to the call function expression and set up Result Data
Object as BUKRS_OUT, Target Function as GET_BUKRS, and map VALUE1 to
XREF1_HD (for detailed steps, see Section 3.2, Prepare Ruleset). The result
should look like Figure 4.4.
8. Activate all newly created BRFplus objects and go back to SAP Application
Interface Framework value mapping.
9. The only thing left is to place your BRFplus application and function in
SAP Application Interface Framework value mapping as shown in Figure
4.5. You need to populate BRFplus Application Name and BRFplus Function
Name with values corresponding to the BRFplus application you’re using
and the newly created function, then save the configuration.
Figure 4.5 BRFplus Function Called from SAP Application Interface Framework Value
Mapping
10. You can send in FIDCC2 IDoc that you have in your system by going to
Transaction WE19, providing the existing IDoc number and clicking the
Standard Inbound button to send in IDoc. You can also test the new GET_
BUKRS_AIF function using BRFplus simulations (for detailed steps, see
Section 2.1, Simulate Decision Table) or the SAP Application Interface
Framework Interface Test Tool (Transaction /AIF/IFTEST).
BRFplus Adjustments
You need to create a new function GET_E1FISEG_AIF that will be called as an
SAP Application Interface Framework structure-mapping BRFplus function.
This time, you can’t simply apply a function call expression on the previ-
ously created function because structure types created by SAP Application
Interface Framework and BRFplus are of different types. Fortunately, there
is a way to achieve your goal of reusing existing BRFplus functions in SAP
Application Interface Framework:
1. The new function needs to be in event mode. In the Signature tab, you
need to only use RAW_LINE (bind to the type of the E1FISEG line in your
IDoc SAP Application Interface Framework structure) and RAW_STRUCT
Figure 4.7 New Function in Event Mode with AIF Compatible Signature
3. Because your function is in event mode, you need to create a ruleset for it.
Go to the Assigned Rulesets tab and create a ruleset. Name it RULESET_GET_
E1FISEG_AIF.
4. You need to match the context of the functions GET_E1FISEG and GET_
E1FISEG_AIF. GET_E1FISEG_AIF function has its signature defined already.
You also know what structure types are used by GET_E1FISEG because
you’ve created it yourself in previous exercises, so add these to the con-
text of the ruleset to be able to move values from one to another. To do so,
you need to add three variables in the ruleset header, which already exist
in the context of the application:
– INB_E1FIKPF
– INB_E1FISEG
– OUT_E1FISEG
6. In Figure 4.10, you can see that the destination context value is already
assigned to this rule step. You need to choose, as shown in Figure 4.10, the
context value that will be the source for the INB_E1FIKPF change. It should
be RAW_STRUCT-E1FIKPF. The result is shown in Figure 4.11, which shows
that INB_E1FIKPF will be changed with values from RAW_STRUCT-E1FIKPF.
Note
Note that in terms of the BRFplus name context value, is used in reference to
single values, structures, and tables—so, all BRFplus types.
Now it’s time to provide values for OUT_E1FISEG. For this example, you’ll
want to do this using existing function GET_E1FISEG via function call
expression, so you need to choose Expression Processing from the available
options to create a new expression as shown in Figure 4.12.
2. Click the small circular button next to No Available Context and choose
OUT_E1FISEG from context. The result should look like Figure 4.14: OUT_
E1FISEG should be assigned as the object to be changed.
3. Now click the GET_E1FISEG_AIF function call and populate its details as
shown in Figure 4.15: the target function should be set to GET_E1FISEG
and the result data object to OUT_E1FISEG. Mapping should be applied
from INB_E1FIKPF to INB_E1FIKPF and from INB_E1FISEG to INB_E1FISEG.
5. Activate all created objects and go back to SAP Applicaton Interface Frame-
work structure mapping.
6. Populate the BRFplus config as shown in Figure 4.17. You need to populate
BRFplus Application Name and BRFplus Function Name with values corre-
sponding to the BRFplus application you’re using and the newly created
function, then save the configuration.
7. You can test inbound processing of IDoc FIDCC2 that you have in your
system by going to Transaction WE19, providing existing IDoc number,
and clicking the Standard Inbound button to send IDoc. You can also test
this using the SAP Application Interface Framework Interface Test Tool
(Transaction /AIF/IFTEST).
Figure 4.18 New Function with SAP Application Interface Framework Check Compatibility
3. Because you’re in event mode, you need to create a ruleset. Name it CHECK_
XREF1_HD (for detailed steps, see Section 3.2, Prepare Ruleset).
4. Create a rule as shown in Figure 4.19. It will check that XREF1_HD is not
equal to 0000, is not empty, and contains only four characters. Activate
all objects and go to SAP Application Interface Framework customizing
for structure mapping.
Figure 4.21 BRFplus Call from SAP Application Interface Framework Check
First, we’ll look at the standard behavior of possible usages of BRFplus in SAP
Application Interface Framework under unexpected exception conditions.
Second, you’ll learn where those standard procedures can be enhanced to
provide better feedback on errors to SAP Application Interface Framework
users. Finally, you’ll take full control of the error handling in BRFplus, switch-
ing off exception rising and providing SAP Application Interface Framework
with full issue info in a controlled and organized manner, moving the SAP
Application Interface Framework user experience and BRFplus integration
to another level.
First, as for other exercises, make sure you have IDoc FIDCC2 and that it can
be posted through SAP Application Interface Framework in your system.
You will manipulate this IDoc via Transaction WE19 to generate errors in
SAP Application Interface Framework processing.
Value Mapping
The first test that you will conduct is to verify the behavior of value map-
ping XREF1_HD_TO_BUKRS, which is calling BRFplus function GET_BUKRS_AIF.
You know that it’s deriving a company code based on the XREF1_HD field. In
order to generate an exception in decision table DT_GET_BUKRS, used as a
centerpiece of value mapping, you need to pass a value into XREF1_HD that
isn’t present in a condition column (values there should be as shown in Fig-
ure 5.1). For this example, use value AABB.
Structure Mapping
Now you’ll verify how SAP Application Interface Framework is behaving
when an exception occurs on the structure mapping level. The first test will
be to change the XREF1_HD field back to the AB01 value and replace the cur-
rent value in the XREF2_HD field with SOURCE_SYSTEM_003. Because the only
values expected by decision table DT_GET_E1FISEG are SOURCE_SYSTEM_001
and SOURCE_SYSTEM_002, passing other values will cause an exception when
none of the rows in DT_GET_E1FISEG match such a condition (current condi-
tions are shown in Figure 5.3). Let’s trigger such an error:
1. Switch back to Transaction WE19, which you opened in the previous steps.
2. Change the XREF1_HD field value in the IDoc structure back to AB01.
Change the XREF2_HD value to SOURCE_SYSTEM_003. Click the Standard
Inbound button to send the IDoc.
3. Go to SAP Application Interface Framework monitoring, Transaction /AIF/
ERR, to check the results. There should be an error like that shown in Fig-
ure 5.4. You can see that this error is not really what you would expect.
This is a standard message arriving from standard IDoc processing, saying
that you have not specified an account, but you’d expect to see an error
from BRFplus showing that decision table processing failed. You know
that an exception triggered in BRFplus on the structure mapping level
doesn’t cause an error in SAP Application Interface Framework structure
mapping, and processing continued to the SAP Application Interface
Framework action. For a better look at what happened, you can switch
SAP Application Interface Framework to technical mode by clicking the
shown in Figure 5.6. This behavior is not very helpful in informing SAP
Application Interface Framework users about the errors and assisting
them in issue solving, so that might be an area in which you’d like to
make some improvements. In the next two sections, you’ll have the
opportunity to try to mitigate this issue and possibly improve the pro-
cessing to the standard expected by SAP Application Interface Framework
users.
Figure 5.6 E1FISEG with Only One (Second) Line Not Transformed
To start, you’ll need to create a new function module aligned with the
SAP Application Interface Framework requirements for an interface. As
suggested by the SAP Application Interface Framework help, simply copy
Figure 5.8 Import Parameters with SAP Application Interface Framework–Related Types
Add a Tables parameter as in Figure 5.9. Those interface changes will allow
you to easily call this function module from the SAP Application Inter-
face Framework function module ZFIDCC2_E1FISEG_AIF_MAP you created
by copying the template SAP Application Interface Framework function
module. Switch to ZFIDCC2_E1FISEG_AIF_MAP now.
IF lt_return_tab[] IS INITIAL.
lr_dest_line->* = CORRESPONDING #(
BASE ( lr_dest_line->* ) ls_result-dest_line ).
ELSE.
APPEND LINES OF lt_return_tab TO return_tab.
ENDIF.
Listing 5.1 Call of BRFplus-Generated Function Module from SAP Application Interface
Framework after Mapping Function Module
5. After you’ve populated the main function module with the code from
Listing 5.1, go to the ZFIDCC2_GET_E1FISEG_AIF function module gener-
ated by BRFplus to adjust exception handling there. Find the line of code
like the one in Listing 5.2.
CATCH cx_fdt_processing.
Listing 5.2 Catch for Standard Processing Exception in BRFplus
6. Change the code to match that in Listing 5.3. Remove the message trigger-
ing by removing all code in the Catch segment.
CATCH cx_fdt_processing INTO DATA(lr_exc).
Listing 5.3 Catch with Assignment to Class
7. Place the code from Listing 5.4 in the Catch segment from which you
removed code in the previous step.
return_tab[] = VALUE bapiret2_tab( FOR message
IN zcl_BRFplus_exception=>get_messages( exception = lr_exc )
( COND bapiret2(
message_v3 = message-msgv3
message_v4 = message-msgv4 ) ) ) ).
Listing 5.4 Example of Processing Exception from BRFplus
1. First, create the ZCL_BRFPLUS_EXCEPTION class and inside static method GET_
MESSAGES. The signature should be set as shown in Figure 5.10: the inbound
parameter name EXCEPTION is referring to the BRFplus exception class, and
the returning parameter MESSAGES is of a type corresponding to the mes-
sage table. Insert ABAP code from Listing 5.5, as GET_MESSAGES method
source code.
METHOD get_messages.
IF exception->previous IS NOT INITIAL.
messages = get_messages( exception =
CAST cx_fdt_processing( exception->previous ) ).
ELSE.
messages = exception->mt_message.
ENDIF.
ENDMETHOD.
Listing 5.5 ABAP Code for GET_MEESSAGES Method
3. Now you have everything in place. Go to Transaction WE19 and run the
two example IDocs from the Structure Mapping section first should
result in exceptions on all lines and the second one should have excep-
tion on the second line. The results of these runs should look like Figure
5.12 and Figure 5.13. You will see line numbers and table names that cause
the errors and the information that an account cannot be determined
based on the input provided, along with the value of this input.
What’s more, because you populated BAPIRET2 with PARAMETER, FIELD, and
ROW values, you enabled forward navigation to work when double-clicking
on an error, which will now take you to the field that caused the error.
Thanks to that, SAP Application Interface Framework users will not see the
difference between exceptions generated from BRFplus and those triggered
by SAP Application Interface Framework value mappings, guaranteeing the
same user experience in both cases.
In this section, you’ll learn that there is a different option that you can use
to change the BRFplus decision table processing behavior, so that instead of
raising exceptions, it will provide meaningful error messages that can be
propagated to SAP Application Interface Framework.
You know from the previous section that raising an exception if no match is
found in the table is a configurable option, so if you switch that behavior
off, you can stop the decision table from raising exceptions if there is no
row with matching conditions for the given input. Stopping exceptions is
one thing, but another is that you want to still have as informative error
information as you’d have with exceptions because that info is needed by
SAP Application Interface Framework users operating on the interface. Fol-
low these steps to meet these needs:
1. You need to open the class created in the Section 5.2, Helper Class for
Fetching Errors from BRFplus for BRFplus exception handling and add the
attribute BAPIRET2_TAB with the level Static Attribute, set visibility as
Private, and the associated type as BAPIRET2_TAB. This will serve as the
container for all BRFplus error messages you’ll add through BRFplus pro-
cessing and is fully compatible with the SAP Application Interface Frame-
work return table.
2. Next, create three new simple static and public methods:
– SET_BAPIRET2
Only one importing parameter named IM_BAPIRET2 with associated
type BAPIRET2 and code as in Listing 5.6
– GET_BAPIRET2_TAB
Only a returning parameter named RE_BAPIRET2_TAB with associated
type BAPIRET2_TAB and code as in Listing 5.7
– CLR_BAPIRET2_TAB
No parameters, with code as in Listing 5.8
METHOD set_bapiret2.
APPEND im_bapiret2 TO bapiret2_tab.
ENDMETHOD.
Listing 5.6 SET_BAPIRET2 Code
METHOD get_bapiret2_tab.
re_bapiret2_tab = bapiret2_tab.
ENDMETHOD.
Listing 5.7 GET_BAPIRET2_TAB Code
METHOD clr_bapiret2_tab.
CLEAR bapiret2_tab.
ENDMETHOD.
Listing 5.8 CLR_BAPIRET2_TAB Code
3. Add a new message to class ZBRF with the number 3 and text MATNR &1
value has no match in Table DT_GET_SGTXT_MEINS.
Once you’ve prepared the methods that will allow you to store, retrieve, and
clear errors, open BRFplus and go to decision table DT_GET_SGTXT_MEINS.
You need to change a few things in the settings to prevent errors being
raised:
3. Add an action column by clicking the Insert Action Column button (see
Figure 5.15). You also need to deselect the Mandatory Input column check-
boxes for SGTXT and MEINS. The setup should look like Figure 5.15. The
action column will be added to the table and will provide you with the
ability to call the static method you created earlier. It will be used if no
match is found, so you’ll be unable to provide SGTXT and MEINS, which why
you need to mark them as not mandatory.
4. The next step is to add a new line in the decision table (for detailed steps,
see Section 2.1, Populate Decision Table with Data). This new line should
be the last one, with all condition columns and result columns empty.
The only cell populated there should be Action. Because it will be the last
line and the decision table is set to return the first match found, you know
that if the last line is checked, it means no match was found.
5. To create an action, click the icon in the Action cell and select Create. Pop-
ulate the pop-up window as shown in Figure 5.16: enter the name of the
action and a corresponding text description, then choose Call Procedure
for the Type because this action will call a static class method. Create the
action and navigate to it. Notice that the message type, class, and number
are provided in the name because it will be a BRFplus action that will pro-
vide SAP Application Interface Framework with this message. That should
help make the usage of this action clear.
6. Choose the class created for BRFplus exception handling and method
SET_BAPIRET2. Then, under Mapped Parameters, click the Add Parameter
button and choose IM_BAPIRET2, as shown in Figure 5.17.
7. Map the method fields as follows:
– TYPE: Enter value E
– ID: Enter value ZBRF
– NUMBER: Enter value 003
– MESSAGE_V1: Select Context Parameter MATNR
– PARAMETER: Enter value E1FIKPF-E1FISEG
– FIELD: Enter value MATNR
8. You cannot provide a value for ROW at this point because the row number
isn’t passed to this BRFplus function, but the function is called on the
line level, so you can set ROW after returning to ABAP from BRFplus.
9. BRFplus is now ready to store error messages in the static attribute of the
class. You need to add code to the ZFIDCC2_GET_E1FISEG_AIF function
module to be able to retrieve errors stored during BRFplus processing. In
the last line, add the code in Listing 5.9.
LOOP AT zcl_BRFplus_exception=>get_bapiret2_tab( )
REFERENCE INTO DATA(lr_line).
lr_line->row = CONV int4( raw_line-buzei ).
APPEND lr_line->* TO return_tab.
ENDLOOP.
zcl_BRFplus_exception=>clr_bapiret2_tab( ).
Listing 5.9 Code to Retrieve Errors Stored by BRFplus in SAP Application Interface
Framework
10. Now you can go to Transaction WE19 and run the IDoc with the MATNR val-
ues changed—for example, to W0001 and W0003. The results should be
like those shown in Figure 5.18. Note that this method was able to retrieve
an error twice for each line. Because an exception wasn’t triggered, BRF-
plus processing continued and was able to call the decision table for both
fields it’s used for. This approach is useful if you have many decision table
calls on one line and you want to present all existing errors to SAP Appli-
cation Interface Framework users after one run of the interface.
Figure 5.18 Four Errors for All Four Decision Table Calls
6 What’s Next?
So far, you’ve learned how to use BRFplus as a mapping engine, how to use
decision tables for mapping with advanced rules, and how to integrate SAP
AIF for value mapping, structure mapping, and more. Yet, your BRFplus
journey doesn’t stop there.
In addition to this book, our editors picked a few other SAP PRESS publica-
tions that you might also be interested in. Check out the next page to learn
more!
Notes on Usage
This E-Bite is protected by copyright. By purchasing this E-Bite, you have
agreed to accept and adhere to the copyrights. You are entitled to use this
E-Bite for personal purposes. You may print and copy it, too, but also only
for personal use. Sharing an electronic or printed copy with others, how-
ever, is not permitted, neither as a whole nor in parts. Of course, making
them available on the Internet or in a company network is illegal.
For detailed and legally binding usage conditions, please refer to the section
Legal Notes.
Service Pages
The following sections contain notes on how you can contact us.
Legal Notes
This section contains the detailed and legally binding usage conditions for
this E-Bite.
Copyright Note
This publication is protected by copyright in its entirety. All usage and
exploitation rights are reserved by the author and Rheinwerk Publishing; in
particular the right of reproduction and the right of distribution, be it in
printed or electronic form.
Digital Watermark
This E-Bite copy contains a digital watermark, a signature that indicates
which person may use this copy. If you, dear reader, are not this person,
you are violating the copyright. So please refrain from using this E-Bite
and inform us about this violation. A brief email to info@rheinwerk-
publishing.com is sufficient. Thank you!
Limitation of Liability
Regardless of the care that has been taken in creating texts, figures, and pro-
grams, neither the publisher nor the author, editor, or translator assume
any legal responsibility or any liability for possible errors and their conse-
quences.
1
ISBN 978-1-4932-1906-3
© 2020 by Rheinwerk Publishing, Inc., Boston (MA)
1st edition 2020
All rights reserved. Neither this publication nor any part of it may SAP, the SAP logo, ABAP, Ariba, ASAP, Concur, Concur ExpenseIt,
be copied or reproduced in any form or by any means or translated Concur TripIt, Duet, SAP Adaptive Server Enterprise, SAP Advan-
into another language, without the prior consent of Rheinwerk tage Database Server, SAP Afaria, SAP ArchiveLink, SAP Ariba, SAP
Publishing, 2 Heritage Drive, Suite 305, Quincy, MA 02171. Business ByDesign, SAP Business Explorer, SAP BusinessObjects,
SAP BusinessObjects Explorer, SAP BusinessObjects Lumira, SAP
Rheinwerk Publishing makes no warranties or representations BusinessObjects Roambi, SAP BusinessObjects Web Intelligence,
with respect to the content hereof and specifically disclaims any SAP Business One, SAP Business Workflow, SAP Crystal Reports,
implied warranties of merchantability or fitness for any particular SAP EarlyWatch, SAP Exchange Media (SAP XM), SAP Fieldglass,
purpose. Rheinwerk Publishing assumes no responsibility for any SAP Fiori, SAP Global Trade Services (SAP GTS), SAP GoingLive, SAP
errors that may appear in this publication. HANA, SAP HANA Vora, SAP Hybris, SAP Jam, SAP MaxAttention,
SAP MaxDB, SAP NetWeaver, SAP PartnerEdge, SAPPHIRE NOW,
“Rheinwerk Publishing” and the Rheinwerk Publishing logo are
SAP PowerBuilder, SAP PowerDesigner, SAP R/2, SAP R/3, SAP
registered trademarks of Rheinwerk Verlag GmbH, Bonn, Ger-
Replication Server, SAP S/4HANA, SAP SQL Anywhere, SAP Strate-
many. SAP PRESS is an imprint of Rheinwerk Verlag GmbH and
gic Enterprise Management (SAP SEM), SAP SuccessFactors, The
Rheinwerk Publishing, Inc.
Best-Run Businesses Run SAP, TwoGo are registered or unregistered
trademarks of SAP SE, Walldorf, Germany.
All of the screenshots and graphics reproduced in this book are
subject to copyright © SAP SE, Dietmar-Hopp-Allee 16, 69190 Wall- All other products mentioned in this book are registered or unreg-
dorf, Germany. istered trademarks of their respective companies.