Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 15

ABAP Dictionary External Views for Overcoming ABAP CDS Views

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.

3. Change DDIC fields type if needed and activate.


4. Go to ABAP Dictionary and check existence and look at data.
 

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.

Thank you for attention!


FollowLikeRSS Feed
Alert Moderator
Assigned Tags

 ABAP Development
 ABAP CDS view
 ABAP Dictionary External Views
 sap hana models

Similar Blog Posts


 CDS view entities - The new CDS views
By Harish BokkasamSep 04, 2020
 CDS - One Concept, Two Flavors
By Horst KellerJul 20, 2015
 Accessing Native HANA Tables in S/4 ABAP CDS views - Analytics
By Sreekanth SurampallyJun 27, 2018
Related Questions
 How to create an ABAP CDS View based on a BW composite provider
By Antonio HernandezJul 09, 2018
 Association on CDS Views reading data from different views in a XOR meaning
By Matthias FischerDec 13, 2018
 How to view a table in ABAP dictionary created from HANA database directly.
By Daniel basisJan 23, 2020
10 Comments
You must be Logged on to comment or reply to a post.
Horst Keller
July 30, 2018 at 9:45 am
External Views shouldn't be used any more. Use AMDP instead.
 Like 1
 Share

Sebastian Gesiarz
February 26, 2019 at 1:45 pm

Hi Horst,

Could you please share some documentation on the scenario?

Would it be the case to execute AMDP reading CV in the CDS view?

Could you please share some samples?

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,

Thank you for sharing.

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

Please correct if I am wrong.

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

You might also like