Get Example source ABAP code based on a different SAP table
ABAP_DDIC - Views A DDIC view> is a grouping of columns of one or more DDIC database tables, resulting in an application-specific view. In AS ABAP, views are defined in ABAP Dictionary and can be referenced as data types in the same way as DDIC structures. Views can be used like DDIC database tables in reading AB-SQL statements and, with some limitations, also in writing AB-SQL statements. For this reason, the ABAP DDIC views are in the same namespace as all types of the ABAP Dictionary and hence in the namespace of all global types> of an AS ABAP. The name of a view must follow the naming rules for DDIC views>. The data in a view is not saved physically. It is read from the database from the involved DDIC database tables.
Views can be used to restrict data access for a DDIC database table. Access to fields is restricted with projections and access to specific rows is restricted with selections.
Views that select from multiple DDIC database tables use joins or subqueries to join these tables and to read the required fields and rows. The views in ABAP Dictionary are usually platform-independent. With some exceptions, the views in ABAP Dictionary are, when activated, transformed into platform-dependent SQL views > in the current standard AS ABAP database > in the ABAP database schema >. This is done using the DDL> statement CREATE VIEW> with the addition AS SELECT>, which formulates the corresponding SELECT> statement. BEGIN_SECTION VERSION 5 OUT The definition of a view in the database can be displayed in transaction SE11>> by choosing Utilities -> Database Object>. END_SECTION VERSION 5 OUT ABAP Dictionary manages the following categories of views:
DDIC table views> In DDIC table views the platform-dependent DDL statement is created from the definition of the view in the form-based ABAP Dictionary tool>.
DDIC external views> (obsolete) A DDIC external view makes an SAP HANA view> known in ABAP programs and makes it usable like a DDIC table view. ABAP_NOTE SAP HANA XSA> replaces SAP HANA XSC>. The access methods designed specifically for XSC objects are not suitable for XSA objects and have become obsolete. DDIC external views> represent one such access method and have been declared obsolete. See SAP Note 3116165> and SAP Note 2465027>. When a view is accessed using the AB-SQL statement SELECT>>, the database SELECT> statement defined in the DDL statement is executed and the result set is returned as if a SELECT > were executed on a DDIC database table whose structure matches the structure defined by the view.