Showing posts with label CDS. Show all posts
Showing posts with label CDS. Show all posts

Monday, 1 July 2024

SAP Datasphere: Replicating Custom CDS Views from S4 HANA to Azure Data Lake with CDC

Introduction


In this article I will share work experiences of using a custom CDS view on Joining BKPF and BSEG table in S4HANA and consuming it in SAP Datasphere for delta enabled replication (Change Data Capture) to Azure Data Lake Storage Gen2.

SAP Datasphere: Replicating Custom CDS Views from S4 HANA to Azure Data Lake with CDC

Create a Custom CDS View: ADT on Eclipse


Go to ABAP Repository Object and Click on the drop down for Core Data Services and then click on Data Definitions:

Monday, 10 June 2024

CDS based Analytical oData for Fiori

During my developments I found that analytical oData services (or maybe to be more precise "analytical entitysets" within oData services) are needed quite often but it's not very well documented what options can be used to create them. In most of the official literature you will find oData generated on top of "analytical query" but this option is not supported in Restful ABAP programming model and makes some stuff (like adding additional entitysets in the same service) difficult.

As a first thing let's explain "analytical oData" on a very simple example and probably most common scenario: you have some kind of document item which has for example Supplier, Company Code, Fiscal Year, Amount with Currency code and Quantity with Unit. And you perhaps need to get the "sums" of amounts and quantities on different levels

Monday, 4 March 2024

CDS View: Time comparison

This blog is about CDS scalar functions - CALENDER_SHIFT and CALENDER_OPERATIONS and how to use it in analytical queries for time comparison. Similarly FISCAL_CALENDAR_SHIFT and FISCAL_CALENDAR_OPERATION can be used.

These CDS scalar functions are used to compare the measure value of current time period with previous time period. Further it can be used to calculate measure value for year to date (YTD), month to date (MTD) or quarter to date (QTD). Current member can only be used when time dimensions are in drilldown else restricted measure is used. The usage of current member is not as fast as restricted measure. Detail specification of the mentioned scalar functions can be found in Help.

Friday, 2 February 2024

Tip: SAP GUI Scripting VBA Code Snippet to Detect all IDs of the UI Elements

In a few cases it is in business context not allowed to install additional analyze software or tools. So applications that are permissible and available must be used, e.g. like Microsoft Office applications. This makes things a bit more laborious, but not impossible.

Here a Visual Basic for Application (VBA) example to detect all IDs of the UI Elements of a session of the SAP GUI for Windows with SAP GUI Scripting. The result is written into a Microsoft Excel table.

The sub routine Start connects to the session and calls the recursive sub routine GetAll, which detects all IDs. The global variable gColl stores all IDs as an array of strings.

Saturday, 5 November 2022

SAP Analytics Clouds Stories with S/4HANA Live CDS – Time Variance

Purpose


This blog explains the typical issues developers have trying enable Time Variance charts in SAP Analytics Cloud (SAC) based on CDS-Views and how to solve this by adding additional fields and annotations to the Cube and Query

Baseline CDS View:


Every CDS which is built to do reporting in SAC, will have at least one date field, and in most dashboards the users want to see a time-based chart for their measures.

Monday, 22 August 2022

Extending SAP FIORI App : My Inbox – Approve Purchase Order (F0402A)

Overview

This blog shares on how SAP FIORI App – My Inbox can be enhanced. FIORI extension is done on My Inbox – Approve Purchase Order (F0402A) enhancing custom field in PO Line Item data.    Custom screen enhancement is done on PO Line Item to add field ‘Last Price’. To display the field on FIORI screen, no enhancement is needed either in Odata, Workflow or UI. Appropriate CDS views related to My Inbox – Purchase Order app to be identified and enhanced to modify the UI output display.

Workflow Configuration

SAP Business Workflow configuration entries maintained for Workflow Task of Purchase Order

Transaction Code – SPRO

Friday, 29 October 2021

Code Pushdown – CDS date interval slicing

Interval slicing is a task that developers need to deal with when working with overlapping records with validity periods – such as conditions in SAP. At single point in time multiple records can be valid (perhaps with different condition type). This blog will show you how to achieve this in CDS views without writing single line of ABAP.

ABAP Development, SAP CDS, SAP ABAP Tutorial and Material, SAP ABAP Exam Prep, SAP ABAP Career, SAP ABAP Learning, SAP ABAP Database
Overlapping intervals

Such data is saved in SAP in database table as per picture below – lets call the table ZSLICE_DB  (it has 4 records – corresponding with picture above).

Monday, 18 October 2021

A new generation of CDS views: how to migrate your CDS views to CDS view entities

With ABAP release 7.55, a new type of CDS view has been released: the CDS view entity. CDS view entities are an improvement over the “classic” CDS DDIC-based views.

CDS Views, SAP ABAP, SAP ABAP Tutorial and Materials, SAP ABA Certification, SAP ABAP Preparation, SAP ABAP Guides, SAP ABAP Career

New migration tool available


Now, a new migration tool is available that automates many steps of a migration from a CDS DDIC-based view to a CDS view entity. But that’s not the only helper to facilitate a migration. The following support has been released:

Thursday, 1 February 2018

Smart charts in Object Pages using ABAP CDS Annotations

With the introduction of Fiori Elements SAP started a revolution in the way we can construct Fiori apps, they are basically a set of generic UI5 codes that can read annotations and generate applications automatically without the need of javascript coding.

These templates are powered by Smart Controls, you can place them in your XML views to create mixed apps or just let the Fiori Elements execute all the job.

Saturday, 3 December 2016

ABAP on HANA – Steps to call a CDS view from another CDS View

Core Data Services (CDS) :


CDS is an infrastructure layer for defining semantically rich data models, which are represented as CDS views.

A CDS view is used to define the structure of an SQL view and represents a projection onto one or several ABAP Dictionary tables or ABAP Dictionary views.

This blog shows how to call a CDS view from another CDS view.

Monday, 21 November 2016

Create Fiori app using CDS with BOPF- For beginners Part 2

This blog is on continuation to  Part 1.

In this part we shall create the BOPF action and display the sale order scenario in the Fiori App using Smart Template.

For the BOPF action, go to BOPF Business Object ZDEMO_I_SALESORDER  from Tcode BOBX. Click on change mode. Under the Node Elements, traverse to node ZDEMO_I_SALESORDER and select Action element. Right Click on Action and Click “Create”.

Tuesday, 15 November 2016

Create Fiori app using CDS with BOPF- For beginners Part 1

Prerequisite:

1) Concepts of Core Data Services(CDS)
2) Basic Understanding of OData service
3) Concepts of BOPF
4) Conceptual knowledge of Fiori(Smart Template)

The Fiori/Ui5 is for the UI part, the CDS is for the data retrieval(code push down) while the BOPF is for handling DB activities.

Saturday, 5 November 2016

CDS ALV report with selection criteria

SAP classes CL_SALV_IDA_* and SAP programs SALV_IDA_* as of 7.5 SP03. With all this functionality provided by SAP, HANA / CDS is powerful development tool saving time and making possible the code pushdown to HANA database.

Create CDS view from ADT using folder Core Data Services, right-click to create New -> DDL Source

CDS ALV report with selection criteria

Thursday, 27 October 2016

ABAP CDS in SAP BW

Introduction

ABAP Core Data Services (CDS) Views were introduced with SAP ABAP 7.40 SP05. CDS allows the creation of rather complex views that by far exceed the capabilities of database views created in SE11. Besides their role in the ABAP Programming Language, CDS Views are the technology behind the virtual data model on top of the SAP S/4HANA application tables which, e.g. is used in SAP S/4HANA Analytics.

This aspect – the role of CDS in SAP S/4HANA Analytics – frequently brings up the question whether or how CDS might be used in the context of SAP BW powered by SAP HANA or SAP BW/4HANA.

Thursday, 8 September 2016

A kill to an ABAP CDS View?

In the first blog of this series we considered that CDS views are not just for the super cool HANA types, but can also be used to escape when marooned on planets with nothing but a lowly Oracle DB. Many of SAP's customers I suspect have only just begun to dip their toes into these scary HANA waters, and so its important to understand what of this new technology we can learn and use today (whilst still on the traditional non-HANA DB); and what must wait for a possible future HANA implementation.

In today's blog we will consider the performance of the ABAP CDS view with an Oracle DB, if we are without the HANA DB in the back end; all from the perspective of a certain double-o secret agent. In Teched I posed the question to an SAP expert, (Who shall remain nameless, less Spectre (of course we all know that SAP==Spectre ABAP Programmers) learn of his details and track him down), here I was lead to believe that even on Oracle the use of the ABAP CDS views would give major performance benefits over the equivalent SQL statement. I have to say I had my suspicions that this may have been a double agent trying to lure me, and so without further ado on returning from TECHED set out to test the ABAP CDS view tech with the help of my very own 00-agent and the necessary 00 CDS-View.