Showing posts with label cds. Show all posts
Showing posts with label cds. Show all posts

Monday, 22 May 2023

BASIC Concepts in CDS VIEWS

This blog would give basic idea on different concepts which are  used in the  S4HANA CDS view.

It will be helpful for new beginners on basic concepts which we can use while creating a CDS views

@AbapCatalog.sqlViewName:It is mandatory annotation and which is created in  SE11 (16 Characters length) after activating and it will not be same as  view name/entity name.

@AbapCatalog.compiler.compareFilter: It defines the evaluation of filter  condition in path expression. 

True: If they match, the associated join expression is evaluated only once.
False: A separate join expression is created and evaluated for each filter condition.

Saturday, 14 December 2019

CDS based data extraction – Part I Overview

Anyone interested in the state of the art extracting data in the SAP universe and beyond? This blog (series) is meant to provide a comprehensive overview of the topic, highlight the main features but also make sure you understand the meaning and implication of all available annotations related to the topic. I am aware of the fact that various documents/blogs have been published on the topic already, but for sake of completeness I will repeat parts here which you might already know.

Sunday, 24 September 2017

CDS Associations and Propagation with SQL in SAP HANA

As Part of HANA 1.0 SPS11, the New feature called CDS Associations implementation with the help of SQL instead having the dependency of CDS to create association among Database objects like tables, views.

Later as part of HANA 2.0 SPS00, an interesting new feature and an enhancement of the above one where the user is allowed to propagate the association while creating views.

Sunday, 16 July 2017

Creating CDS/EDM views from RAW HANA SQL TABLES

If you need to create a CDS/EDM views from raw SQL HANA tables..here is a script. There seems to be no automatic utility in HANA studio.

The below assumes you know SQL and how to create a CDS/EDM view.

A definition of a SQL table, which need to be converted.

Friday, 26 May 2017

Core Data Services [CDS] in SAP S/4 HANA

A data model represents framework of what relationships are in a database. Data models are the foundation of software development. They provide a standardized method for defining and formatting database contents consistently across systems, enabling different applications to share the same data.
Professional data modeling tools provide a way to generate SQL from a modeled ER diagram although some developers often prefer writing SQL directly. Below is a look of a data model.

Tuesday, 23 May 2017

S/4 HANA Trial Balance CDS View

We were very excited when we discovered the standard SAP delivered CDS C_TRIALBALANCEQ0001 for displaying the Trial Balance as the calculation of opening and closing balances can be tricky and the Universal Journal ACDOCA table was new to us, as was S/4 HANA.

During our testing using the embedded BW we realised that the opening and closing balances it was returning was incorrect and upon consultation with SAP they confirmed that additional new Fiscal configuration is required on an S/4 HANA environment.

Friday, 16 September 2016

ABAP new Open SQL and CDS runtime

With the introduction of NW AS ABAP 740 SPS5, the New enhanced extended Open SQL was introduced. The new enhanced open sql has some good features such introduction of aggregate functions, right outer join, casting, etc making it a starting step for Code-Push down paradigm.

The Code push down techniques (CDS and New SQL) are compared in the demo here. Below is a demo program of data retrieval from BKPF and BSEG.

1) ABAP program using inner join between BKPF and BSEG
2) ABAP program using CDS view entity
3) ABAP program using enhanced Open SQL features

Thursday, 7 April 2016

Expose CDS Views as OData Service

In continuation to previous blog Core Data Services in ABAP in this blog I will show how to create CDS Views and step by step procedure to generate OData service using CDS Views.

There are 3 different ways you can expose CDS views as OData service:
  1. Import DDIC structure using SEGW Netweaver Gateway service builder transaction.
  2. Reference Data Source using SEGW Netweaver Gateway service builder transaction.
  3. Using Generic Annotations. (@Odata.publish:true) 
First way is supported from SAP ABAP NW 7.40 SP5, Second and third ways are supported from SAP ABAP NW 7.50 and above. For first two ways SAP NW Gateway is used and for third type without use of SAP NW Gateway odata services can be created using annotations. Gateway is used only to add the service created using annotations.

In this blog I am going to show type one i.e how to generate OData service using import DDIC structure using SEGW service builder transaction.

Tuesday, 1 March 2016

Core Data Services in ABAP

Core Data services (CDS) are domain specific languages (DSL) and services for defining and consuming semantically rich data models in SAP HANA. They are integral part of SAP HANA, and can be leveraged in the ABAP stack.

Core Data Services in ABAP and Certifications
Core Data Services are enhanced “view entities” in ABAP provides several advantages:.