One of the powerful tools provided by SAP S/4HANA, SE16H (SAP Table Join Functionality), allows you to merge multiple tables during data analysis, making processes more efficient.
In the SAP SD (Sales and Distribution) module, merging different tables to retrieve data greatly facilitates reporting and analysis.
In this article, we will explain step by step how to merge two tables using SE16H.
What is SE16H?
SE16H is an enhanced version of transaction codes SE16 and SE16N.
It offers faster and more flexible querying while supporting SQL operations such as inner join, left outer join.
This allows you to view and analyze multiple tables on a single screen.
Merging Two Tables with SE16H
In our example, I will explain how to join the two most used tables in financial modules such as BSEG and BKPF.
1- First, execute the SE16H transaction code. As shown in the screenshot below, enter BSEG in the Table Name field, then fill in the Company Code and Fiscal Year fields appropriately. Next, click on the button located in the Outer Join Definition section.

2- On the opened screen, the Outer Join Definition Name and Definition Type fields should be filled in appropriately by the user. When the Create button (highlighted with a red box) is pressed, the row indicated by the arrow becomes active.


3- On the activated row, enter the name of the table you want to join with the BSEG table. In our example, we enter the BKPF table name. If you need to join additional tables, you can use the Add Row button to include more tables in the join operation. After entering the table name, click on the button located in the Output column, as shown in the screenshot below.

4- When the button in the Output column is clicked, the field names belonging to the BKPF table are listed, as shown in the screenshot below. In this window, select the field names from the BKPF table that you want to display in the report.

5- After selecting the fields from the BKPF table that you want to display in your report, double-click on the table name under the Secondary Table column, specifically on BKPF. After this double-click, as shown in the screenshot below, you will see the BKPF table name in the Selected Secondary Table field. Finally, click on the Create button located just below this field.

6- When you click the Create button, you will be prompted to enter the fields that will be used to join the BKPF and BSEG tables, as shown in the screenshot below. In our example, we want to match the fields Fiscal Year, Document Number, and Company Code so that the data appears accordingly in the report.

7- After completing all the steps, the SAP system prompts us, as shown below, asking whether we want to save the related join operation. We proceed by selecting Yes to continue with the process.

8- After running our report, as shown in the screenshot below, the highlighted fields correspond to the selected fields from the BKPF table. These fields are now visible in our report, just as we specified.

Don’t forget to follow my upcoming blog posts.
THANKS FOR READING :)


Comments