Get Technical Flavor of CDS

Index

Before we further move to understand CDS in-depth, first we would like to understand the artifacts which support CDS view.

When CDS is created, Developer needs to enter three artifact names which together work as a CDS. All three artifacts are created in the custom namespace and their name must start with Z or Y.

The artifacts created during CDS creation are:

  1. DDLS(Data Definition Language Source) – We enter DDLS name along with package name and Description
  2. VIEW(A structure which can be seen in SE11) – is mentioned with annotation @AbapCatalog.sqlViewName. Just press Control and Click on View name and it leads to SE11 structure
  3. STOB(Structured Object) – is mentioned with ‘define view’ or ‘extend view’ syntax.

This is important to understand that when CDS is consumed from ABAP in a query, STOB object should be used to make SELECT. The query should not be made on DDLS or VIEW object.

CDS can be created with Eclipse in an ‘ABAP Project’. To create a CDS, follow steps:

  1. In Project Explorer, Right Click on Project > New > Other > Core Data Services > Data Definition
  2. Provide Package(enter $TMP for local objects), Name(should start with Y or Z) and Description
  3. Click Next to select Transport if Package is not $TMP. Either an existing transport to ve selected or new Transport to be created
  4. Click Next and Select one of the Template based on which type of CDS you need to create
  5. Click Finish and Editor opens with selected template in EDIT mode
  6. Write your CDS in Editor

Index

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s