Professional Documents
Culture Documents
Consommer Une Calculation View Avec Procedure Stockée Et CDS Table Function Et Paramètres Avec Une Views A Definir
Consommer Une Calculation View Avec Procedure Stockée Et CDS Table Function Et Paramètres Avec Une Views A Definir
Limitations
10911,689
Hi, in this post I would like to share usage of ABAP Dictionary External Views in ABAP CDS views development to overcome some limitations.
Scenario 1
Imagine that we have S/4HANA system and HANA DB also used for other applications. In this case we usually have and use in HANA not only main schema of
S/4HANA system. We use ABAP CDS views in S/4HANA for reporting reasons.
How to use data from REPZME schema in our ABAP CDS views? By default you could use only tables visible in ABAP Dictionary of T85 Application server and
placed in SAPT85 schema.
Scenario 2
Imagine that we have S/4HANA system and using ABAP CDS views for reporting reasons. But some developers in your company are good at HANA Information
Models development or already exist some Calculation Views with complex logic.
Do you need to rebuild them using ABAP CDS views or may be you could reuse it?
Solution
In this post I would like to show solution for Scenario 1 and Scenario 2.
From ABAP 7.4 SP02 it is possible to create Dictionary External Views for this reasons.
We would like to use table MARA from REPZME Schema in ABAP CDS views.
1.Go to HANA Studio Modeler Perspective, create in Content Area some package and Calculation VIew for table MARA. I just select 4 fields for demo purpose. In
CV we could use tables not only from main SAPT85 Schema.
2. Go to HANA Studio ADT Perspective, create some ABAP Package and create new “Dictionary view”. Give it a name, description and select External View option
and find our Calculation Views with Browse button.
5. Go back to ADT Perspective and create ABAP CDS views Data definition based on External view ZT04_PROXY.
Result
We use in ABAP CDS views data from table not in visible by default in ABAP Dictionary or reuse in ABAP CDS views complex logic that was written in
Calculation Views .
Nous utilisons dans les vues ABAP CDS les données de la table qui ne sont pas visibles par défaut dans le dictionnaire ABAP ou réutilisons dans les vues ABAP
CDS la logique complexe qui a été écrite dans les vues de calcul.
ABAP Development
ABAP CDS view
ABAP Dictionary External Views
sap hana models
Sebastian Gesiarz
February 26, 2019 at 1:45 pm
Hi Horst,
Thanks in advance,
Sebastian
Like 0
Share
Martin Sommer
November 25, 2019 at 3:22 pm
Hi Horst, can you elaborate? According to latest ABAP documentation (AS ABAP Release 754) "External views should only be used in those cases
that are not covered by ABAP CDS or AMDP."
https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abenddic_external_views.htm
Like 0
Share
SS
April 22, 2020 at 5:47 pm
Hello Maksim,
Could you please also share how Native HANA and S4HANA System will be connected, for consuming calculation view on Native HANA in S4HANA
CDS View if they are on different HANA Databases?
Thanks
Like 0
Share
Shanthi Bhaskar
May 6, 2020 at 11:23 am
You cannot consume ABAP CDS in the Native HANA system. You should use any of the data provisioning techniques such as SLT, SDI, or BODS to
get the table(s) data into the Native from S4HANA. You can use CDS views as Source for BODS and target can be HANA, but it is not recommended
at all, you might run into licensing agreement issues.
Like 0
Share
Maksim Alyapyshev
Blog Post Author
May 7, 2020 at 7:00 am
I consume data from HANA table in ABAP CDS view, not like you mention.
By the way currently external views shouldn’t be used any more, and we use AMDP for this purpose.
Like 0
Share
Shanthi Bhaskar
May 7, 2020 at 6:01 pm
Hi Markim,
I mentioned You cannot consume ABAP CDS in the Native HANA system
Thanks,
Shanthi.
Like 0
Share
Carlos Tolosa
May 22, 2020 at 12:29 am
Hello,
I've replicated some external tables using SLT into a schema "A" in HANA DB and I can see those tables as native HANA tables.
How can I consume that data in ABAP side which runs over the HANA schema "B" of the ECC server.
I'm trying to use CDS but I have not been able to connect or query the data in tables from schema "A" into schema "B". I'm getting a lot of "table
doesn't exist" and "not authorization" errors.
Is there any known procedure for this?, Is this even posible? I know it can be done with other former SAP DB tech (Oracle, Sybase, MS SQL, etc).
Could anybody please share some documentation form making the schema connection?
Thanks,
Carlos.
Like 0
Share
KG
May 24, 2020 at 7:37 am
Carlos Tolosa Hi Carlos, in order to access non-s/4(ECC) schema data in ABAP CDS views, you need to use CDS Table functions. Table functions
along with AMDP class and method implementation can help youaccess native HANA SQL objects to read data. Then this table function can be used
in CDS views to model your VDM.
Like 0
Share
Klaus Reiner
October 29, 2020 at 5:40 pm
Hi all,
would it not be much more easier to create an external table into the ABAP-SAP-schema
of the T84-System? Then the external table would already be in the correct schema and
should be accessible directly in the ABAP-CDS-view.
Or are there any constraints from a technical point of view? Please let me know, if so.
// Klaus