cancel
Showing results for 
Search instead for 
Did you mean: 

Creating Joins between ECC tables in a HDBDD file

shyam_uthaman
Participant
0 Kudos

Hi All,

Out of curiosity, I wanted to create a view in a HDBDD file in native HANA (no S4 here).

All the examples I could find only joined tables defined in the same hdbdd file.

But how do I join 2 tables in a different schema (coming in from ECC).

Pardon my ignorance with the syntax here but can you please help me get this one working?

florian.pfeffer : I've seen some of your replies on similar topics.. would you be able to help out here?

Thank you for your time.

namespace "MAINPACK"."SHYAM"."0PERF";


@Schema: 'SHYAM'
context NEWVIEW {


    view CompCode as select from "ECCSCHEMA"."T001"
    mixin {
        f: association[1] to "ECCSCHEMA"."T001A"
            on BUKRS = f.BUKRS;
    }
    into {
        f.BUKRS AS BUKRS
    };


};

Accepted Solutions (0)

Answers (1)

Answers (1)

pfefferf
Active Contributor

No direct access to catalog objects is possible in XS classic CDS views. You have to define synonyms in the repository for your catalog tables (hdbsynonym), than you can use the synonyms when you define your view.

Regards,
Florian

shyam_uthaman
Participant
0 Kudos

Understood. Another question before I close this question.

What would be the use case to create a CDS based view (on XS classic or XSA)?

I am a bit confused on why SAP has 2 parallel view building possibilities going on - the CDS Views and the Calc View.

From my understanding, the CDS views are DB views and Calc views and Information views ..but then I don't see why anyone would create a CDS view at all for general business use cases.

Can you help me here by providing a use case for CDS views (the HANA CDS views..and not the ABAP one)?

Regards,

Shyam

pfefferf
Active Contributor
0 Kudos

I could repeat here the same things which where already discussed several times, but I will not do it :). Do a search here in the community then will find several discussions answering your questions. For instance one discussion can be found here.