Schema Mapping

The tables that are accessed by the detection process are located either in the local ABAP schema of the application or in other schemas that can be replication schemas or the ABAP schemas of other, co-deployed applications. In all of these cases, the schema name may change between the development, test, and production systems of a landscape:
  • 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".