Questions tagged [cds]

The ABAP Core Data Services (ABAP CDS) are the implementation of the general CDS concept for AS ABAP. ABAP CDS makes it possible to define semantic data models on the central database of the application server. For questions specific to the HANA CDS implementation, use the tag [hana-cds] instead.

The ABAP Core Data Services (ABAP CDS) are the implementation of the general CDS concept created by SAP for ABAP-based systems. ABAP CDS makes it possible to define semantic data models on the central database of the application server.

Useful links

175 questions
9
votes
4 answers

HANA CDS Views vs Calculation Views vs Table Functions

In SAP HANA I am used to create Calculation Views. Previously I learned that Calculation Views (which after compilation are column-views) are to be prefered over Database-SQL-Views. Now with CDS-Views I am not sure if this is still the case.…
Thorsten Niehues
  • 13,712
  • 22
  • 78
  • 113
9
votes
2 answers

Environment discovery failed. No matching environments matched the given Id - PowerApps

Am trying to connect to one of my PowerApps environment using the console app given in the following URL Get started with the Common Data Service SDK I followed all steps provided in the link. Registered App in AD, created environment and database…
Ranadheer Reddy
  • 4,202
  • 12
  • 55
  • 77
7
votes
1 answer

Why does `FOR ALL ENTRIES` lower performance of CDS view on DB6?

I'm reading data from a SAP Core Data Service (CDS view, SAP R/3, ABAP 7.50) using a WHERE clause on its primary (and only) key column. There is a massive performance decrease when using FOR ALL ENTRIES (about a factor 5): Reading data using a…
koks der drache
  • 1,398
  • 1
  • 16
  • 33
4
votes
1 answer

How to achieve NOT EXISTS with the ABAP CDS?

I would like to select all EKPO records that don't have an existing posting in MSEG table. In ABAP SQL this can be done like below: SELECT ebeln, ebelp FROM ekpo INTO TABLE @DATA(orders) WHERE NOT EXISTS ( SELECT ebeln FROM mseg …
RaTiO
  • 979
  • 2
  • 17
  • 33
4
votes
1 answer

DATS to string conversion in ABAP CDS view

I have a simple CDS view. When I execute it, I have the error invalid format (return table) row number 1 property name. I think I need to cast the date to string or char type, but there's this syntax error: CAST DOGUM_TARIHI on type CHAR: Length…
Mert
  • 474
  • 2
  • 8
  • 21
4
votes
3 answers

READ_TEXT similar function in CDS View

I need to read text stored for invoice, order, etc. In ABAP we can use READ_TEXT function module, but I need to read it within a CDS view. Is there a way to read text from database tables directly in a SELECT statement?
Eralper
  • 6,461
  • 2
  • 21
  • 27
4
votes
3 answers

Concatenating a space in CDS views

As of ABAP 7.40 SP5 I can use the CONCAT function to combine two fields in my CDS view select list. It's limited to two parameters but I can work around that by chaining this function to combine multiple fields or build larger strings. What I can't…
Lilienthal
  • 4,327
  • 13
  • 52
  • 88
4
votes
1 answer

Selecting from a CDS entity versus from a CDS Database view

In SAP's ABAP CDS, the define view statement is used to create a CDS view. This object has a CDS entity name, which is how it appears in the editor and packages but it also has an AbapCatalog.sqlViewName annotation that has to be different. The…
Lilienthal
  • 4,327
  • 13
  • 52
  • 88
4
votes
3 answers

Optional parameters in ABAP CDS views?

I'm trying to create a CDS view for consumption with optional parameters. But at the moment, optional parameters are not supported. Is there a workaround available to somehow choose which where clauses are to be executed/used based on input…
codemania23
  • 913
  • 11
  • 19
3
votes
2 answers

SAP Runtime error when showing Multiple parents of an entity using CDS hierarchy in the SAPUI5 Tree table

I'm using CDS parent child hierarchy to get multiple parents of an entity. There is no problem with the data that has a single parent. But when I try to display the data that has multiple parents, it's dumping. There is no dump when I get the…
BalajiB
  • 326
  • 6
  • 29
3
votes
2 answers

Call a class method from ABAP CDS View?

I would like to call a method from a class in an existing CDS view to get certain data, which can only be called by this method. So I want to call a method from a CDS View. What is the easiest way to do this? I would be very happy about an example…
Tangodo
  • 35
  • 1
  • 5
3
votes
2 answers

Aggregated field to use SUM/MIN based on a condition?

I would like to know if it's possible to SUM if a field has a specific value otherwise take only the MIN (just one value of the aggregated records) I tried something like that but it's syntactically not correct, so I'm looking for an alternative to…
RaTiO
  • 979
  • 2
  • 17
  • 33
3
votes
2 answers

How to get current year in ABAP CDS view

Is there any way to get current timestamp or current date ? SQL syntax is date.now() but it doesn't work in ABAP CDS. Is there any solution without parameters ?
Mert
  • 474
  • 2
  • 8
  • 21
3
votes
4 answers

Call BRF+ rule from ABAP CDS view?

First of all, I'm developing in ECC with ABAP 7.50 and Oracle DB. I have a BRF+ rule that for a given postal code returns me a specific contractor ID. There are only 2 possible contractor IDs, but the postal codes for each one are a set of rules…
RaTiO
  • 979
  • 2
  • 17
  • 33
3
votes
2 answers

Connect to another SAP HANA database with CDS

I entered a new database connection in transaction DBCO to another sap system. and testet it successfully with the report ADBC_TEST_CONNECTION. How do I make use of this connection in a CDS view? Is it even possible? I thought it would work with…
Tommehh
  • 872
  • 1
  • 17
  • 44
1
2 3
11 12