SAP HIER DESC AGG WITH ABEXA



Get Example source ABAP code based on a different SAP table
  



SELECT, Hierarchy Navigator HIERARCHY_DESCENDANTS_AGGREGATE with WITH
This example demonstrates the hierarchy navigator HIERARCHY_DESCENDANTS_AGGREGATE with the addition JOIN and the addition WITH.

ABAP_SOURCE_CODE
DEMO CL_DEMO_HRRCHY_DESC_WITH

ABAP_DESCRIPTION
This example demonstrates the way the different WITH additions work in the hierarchy navigator HIERARCHY_DESCENDANTS_AGGREGATE. The source is a hierarchy joined with another data source by the JOIN addition. Before the function is called, the result set of a join is produced containing all rows to which the WITH additions are applied. Depending on the value entered for the host variable level used in the WHERE condition, the additions WITH SUBTOTAL and WITH BALANCE return different results. The results of WITH NOT MATCHED and WITH TOTAL are independent of level.
The function COALESCE is used here to highlight the null values in the output. If this function is not used, the null values are converted to type-dependent initial values and hence cannot be detected as null values.