Schema Mapping
-
The ABAP schema is usually called SAP<sid>, where <sid> is the name of the ABAP instance.
-
Replication schemas are often named according to the source system, which is different for development, test, and production.
Therefore, it is important that schema mapping is used when you need to access tables in other database schema beside the ABAP schema and that no schema names are hard coded. As CDS views don't support schema mapping, you can only use CDS table functions and ABAP managed database procedures for your extensions.
Logical database schemas can be maintained in AS ABAP with transaction DB_SCHEMA_MAP. Such a logical database schema can afterwards be used with the macro ABAP.schema. The statement SELECT … FROM "$ABAP.schema( FRA_CORE_ERP )"."BKPF" for example selects data from database table BKPF of the logical schema "FRA_CORE_ERP".