ABAP_DESCRIPTION The AMDP class CL_DEMO_AMDP_VERSUS_ABAP_SQL>> has an AMDP method AMDP> and the regular methods ABAP_SQL_NESTED_SELECT>, ABAP_SQL_FOR_ALL_ENTRIES>, and ABAP_SQL_SUBQUERY>, which all get the same data from database tables in the EPM> model. These database tables can be filled using the program RS_EPM_DGC_HANA>>. The master data must be created again here (X>) and, for example, the values 100000 > for Number of Sales Orders> and 90000 > for Number Delivered>, plus a time interval of approximately three months must be entered. The example class selects a random date from the existing change data and uses it to make the selections. The selections pick invoices paid on this date, plus the associated business partners and product information. The method ABAP_SQL_NESTED_SELECT> uses nested SELECT> statements and provides the worst result, as expected. However, the use of FOR ALL ENTRIES> in ABAP_SQL_FOR_ALL_ENTRIES> or the same subqueries in ABAP_SQL_SUBQUERY> as in AMDP demonstrates that AMDP does not provide any performance benefits as long as only SQL is implemented that can also be expressed in AB_SQL .
SQLScript Implementation of the Method AMDP METH CL_DEMO_AMDP_VERSUS_ABAP_SQL=>AMDP
ABAP Implementation of the Method ABAP_SQL_NESTED_SELECT> METH CL_DEMO_AMDP_VERSUS_ABAP_SQL=>ABAP_SQL_NESTED_SELECT
ABAP Implementation of the Method ABAP_SQL_FOR_ALL_ENTRIES> METH CL_DEMO_AMDP_VERSUS_ABAP_SQL=>ABAP_SQL_FOR_ALL_ENTRIES
ABAP Implementation of the Method ABAP_SQL_SUBQUERY> METH CL_DEMO_AMDP_VERSUS_ABAP_SQL=>ABAP_SQL_SUBQUERY