Hello,

Sign up to join our community!

Welcome Back,

Please sign in to your account!

Forgot Password,

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

You must login to ask a question.

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

SAP EWM Help Latest Questions

  • 0
  • 0
DPM125
Beginner

What is the difference between @AbapCatalog.sqlViewName and CDS view name?

In SAP CDS (Core Data Services), when you create a CDS view in ABAP, two different names are involved: the CDS view name (the logical name in the ABAP layer) and the @AbapCatalog.sqlViewName (the technical name of the corresponding SQL view in the database).

The CDS view name is the ABAP-level name used within the ABAP environment. It’s the name you use to reference the CDS view in ABAP programs, in other CDS views, or in tools like ADT (Eclipse). It represents the semantic model and is part of the ABAP repository.

On the other hand, @AbapCatalog.sqlViewName defines the technical name of the SQL view that gets created in the underlying database when you activate the CDS view. This SQL view acts as a bridge between the ABAP dictionary and the actual database. The SQL view is stored in the database and can be accessed using standard SQL statements if needed.

In simple terms:

  • The CDS view name = used in the ABAP layer (semantic name for CDS).

  • The sqlViewName = used in the database layer (technical name for DB view).

For example:

@AbapCatalog.sqlViewName: ‘ZEMP_SQL’
@EndUserText.label: ‘Employee CDS View’
define view ZCDS_Employee as select from zemployee {
key emp_id,
emp_name,
emp_dept
}

Here, ZCDS_Employee is the CDS view name (used in ABAP), while ZEMP_SQL is the SQL view name (created in the database).

Key Differences Summary

Aspect@AbapCatalog.sqlViewNameCDS View Name
LayerDatabase layerABAP layer
PurposeTechnical representation of CDS view in DBLogical/semantic name in ABAP
Naming ruleMax 16 charactersUp to 30 characters
Created inDatabaseABAP Dictionary
UsageUsed in SQL tools or DB accessUsed in ABAP programs or other CDS views
ExampleZEMP_SQLZCDS_Employee

Related Questions

Leave an answer

Leave an answer