Creating nested tables

In this recipe, we will see how we can create a nested table. A nested table involves two internal tables, an inner and an outer table.

Before we dive into the details of creating our nested table, we will create two tables types in the ABAP dictionary. The first type ZST8_T_PERNR_ADDRESS is based on the line type shown as follows:

Creating nested tables

The table type ZST8_T_PERNR_GRADES is based on the on the line type shown as follows:

Creating nested tables

There has to be a connecting field or fields between the two. We keep the PERNR employee number as the connecting ...

Get SAP ABAP Advanced Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.