31 Hierarchical report
In SAP ABAP, a hierarchical report (often called a Hierarchical-Sequential List) is used to display data with a clear parent-child relationship, such as a Sales Header (VBAK) with its related Items (VBAP). There are two primary ways to implement this in the SAP GUI: the modern Object-Oriented (OO) approach and the classic Function Module approach 1. Object-Oriented Approach (Modern)The recommended modern way to create these reports is using the SAP ALV Object Model (SALV). This approach is cleaner and more maintainable.Class: CL_SALV_HIERSEQ_TABLE.Key Steps:Data Selection: Select data into two separate internal tables (Header and Item).Binding: Define which fields link the two tables (e.g., CARRID or EBELN) using the structure SALV_S_HIERSEQ_BINDING.Factory Method: Use the factory method of CL_SALV_HIERSEQ_TABLE to create the instance.Display: Call the display( ) method. 2. Function Module Approach (Classic)This is the older method but is still widely found in legacy systems.Function Module: REUSE_ALV_HIERSEQ_LIST_DISPLAY.Key Parameters:t_outtab_header: The internal table for header data.t_outtab_item: The internal table for item data.is_keyinfo: A structure of type SLIS_KEYINFO_ALV that defines the shared key fields between the two tables.it_fieldcat: A combined field catalog for both header and item levels.
Download
0 formatsNo download links available.