Ansicht
Dokumentation

ABENDDICDDL_DEFINE_DRUL - DDICDDL DEFINE DRUL

ABENDDICDDL_DEFINE_DRUL - DDICDDL DEFINE DRUL

Fill RESBD Structure from EBP Component Structure   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.
SAP E-Book

- DEFINE DEPENDENCY RULE

DEFINE FILTER$|JOIN DEPENDENCY RULE drul
  ON dbtab $[, ...$]
    IF { cond_pattern }
      THEN { derived_cond }


Effect

Dictionary DDL statement used to define a dependency rule. The statement has two variants:

The name drul of a dependency rule must comply with the naming conventions for dictionary types and can have a maximum of 30 characters. The name is in the namespace of the ABAP Dictionary data types and must match the name of the DRUL source code.

The names dbtab of DDIC database tables for which the dependency rule is defined are specified after ON.

  • In the case of filter dependency rules, exactly one DDIC database table must be specified.
  • In the case of join dependency rules, comma-separated DDIC database tables must be specified.

cond_pattern is used to specify a pattern for a relational expression after IF. In the case of reads made on the database table dbtab, the SAP HANA database optimizer searches for this pattern in the associated WHERE condition or ON condition. If the pattern is found, the optimizer uses AND to add the condition derived_cond specified after THEN to the corresponding WHERE condition or ON condition. The potential conditions are specified in the same way as in the CDS DDL or CDS DCL syntax and are described in the filter and join dependency rules.

Caution

It cannot be guaranteed that the SAP HANA database finds the pattern cond_pattern. This is why the additional condition derived_cond must not modify the result set of the original query. This is technically possible, but produces undefined behavior in cases where the SAP HANA database optimizer finds the pattern cond_pattern in some reads but not in others.

Notes

  • The derivation of an additional condition derived_cond from a pattern cond_pattern usually defines a dependency between semantic and technical columns of a DDIC database table. When an application accesses a table with a specific selection condition for semantic columns, an additional condition for technical columns is created implicitly. In the optimization of access to deprecated data, regular date columns are the semantic columns and the temperature column is the technical column.
  • If multiple dependency rules are defined for a DDIC database table, AND is used to join all additional conditions and append them to the original condition.
  • Dependency rules can be defined for DDIC database tables only; they cannot be defined for DDIC views. The SAP HANA database optimizer evaluates all SQL reads on these tables. These include reads made with , AMDP, and Native SQL, plus all reads made on views that contain the DDIC database table as a data source.
  • Dependency rules are not evaluated in reads not made using SQL (such as in calculation views).
  • As in the CDS syntax, the definition of an ABAP Dictionary append structure can contain comments after // and between /* ... */.
  • Partners and customers cannot currently define their own dependency rules.





TXBHW - Original Tax Base Amount in Local Currency   Vendor Master (General Section)  
This documentation is copyright by SAP AG.

Length: 6563 Date: 20240329 Time: 070819     sap01-206 ( 94 ms )