top of page

JOINS Tables using SE16H

Writer's picture: JKS LearningJKS Learning

How to Create Inner Joins between tables using SE16H

The situation: We want to execute the PO number, line items, Company Code, the asset code, Asset description, Material Document Number, and Movement type for a PO that has 4 line items and has Account Assignment (A) for Asset.


All of these details in a table similar to this one.


Steps: Type the primary table [EKPO] into Se16h, then click the icon for maintaining outer join relationships (2).


2- Give the join a name and a description, then create (2).


3- We'll enter the first JOIN table (EKKN) and use the output to decide which fields to execute.


4- We will execute after selecting the Asset Number field (ANLN1).


5- Select the Line of table, then press the icon in the square to add table for join creation; the table name will display in the selected secondary table field on the right.


6- Now, click the create icon (page left down) to add the fields that will be used to retrieve data from the connected table.

Hint: this point is similar to the specification we give to the ABAPER to get the data, in a simple way, we have a po number in EKKO, to get the right asset number for a specific line item in po, we want to enter EKKN table with PO number and PO line item number, so we will use the fields EBELN & EBELP as our primary keys here to get the right data without duplication. You may also utilize the fields as a constant Value to filter.



7- We will create a new join table (ANLA) Asset master record table to obtain the description of the Asset number.


8- We will run after selecting the Description field from the ANLA output.


9- Select the table line and add the fields as we did in the previous steps.



10- We will enter the Asset number (ANLN1) and the Company code (BUKRS) into the ANLA table to acquire the description of the Asset number.


11- To obtain the Material Document numbers, we will create a new join table (MSEG). and the sort of movement.


12- We will enter the PO number, PO item line, and Company Code into the MSEG table.


Hint: Before saving, double-check the Sequence number for the linked tables.


13- Double-check that you have selected the outer joined you saved; you can now execute. Executed table:

Executed table:


714 views0 comments

Recent Posts

See All
bottom of page