cancel
Showing results for 
Search instead for 
Did you mean: 

Join BSEG, BKPF, EKBE and EKPO

henry_M
Discoverer
View Entire Topic
Cocquerel
Active Contributor
0 Kudos

There are several standard CDS view involving those 4 tables.
You can run statement like this one to identify them

SELECT TOP 10
    "DEPENDENT_SCHEMA_NAME",
    "DEPENDENT_OBJECT_NAME",
    "DEPENDENT_OBJECT_TYPE",
    STRING_AGG("BASE_OBJECT_NAME",    ', ' ORDER BY "BASE_OBJECT_NAME" ) "TABLES"
FROM (SELECT
        DISTINCT "BASE_SCHEMA_NAME",
        "BASE_OBJECT_NAME",
        "BASE_OBJECT_TYPE",
        "DEPENDENT_DATABASE_NAME",
        "DEPENDENT_SCHEMA_NAME",
        "DEPENDENT_OBJECT_NAME",
        "DEPENDENT_OBJECT_TYPE",
        1 "COUNTER"
       FROM "SYS"."OBJECT_DEPENDENCIES"
       WHERE "BASE_OBJECT_TYPE" = 'TABLE'
       AND "BASE_OBJECT_NAME" IN ('BSEG', 'BKPF', 'EKBE', 'EKPO'))
GROUP BY "DEPENDENT_SCHEMA_NAME",
    "DEPENDENT_OBJECT_NAME",
    "DEPENDENT_OBJECT_TYPE"
ORDER BY SUM("COUNTER") DESC

Cocquerel_0-1727883417122.png

 

henry_M
Discoverer
0 Kudos
thank you for your reply. I ran the query, but my system does not have any standard views including these tables. Is it possible to share how the views, including these tables were created ? Thanks.
Cocquerel
Active Contributor
0 Kudos
do you get result when you query the view "SYS"."OBJECT_DEPENDENCIES" without filter ? If no, you are missing some system privileges.
henry_M
Discoverer
0 Kudos
yes i got a result, but it did not show me any views with more than one table. i only got e.g. a view where table EKPO was used, then another view where the table EKBE was used, etc.
Cocquerel
Active Contributor
0 Kudos
I'm surprised. your S/4HANA version is maybe very old.