Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a View based on another View

TobiasMeinzer
Advisor
Advisor
0 Kudos

Hi there,

I have the following tables:

table 1 (Object List):

- Key

- ID Object

table 2 (Object Reference):

- ID Object 1

- ID Object 2

Now I need to get the <table1.Key> of the referring Object from <table2> with a selection condition concerning <table1.Key> (Some Keys are only for Projects, others for certain Documents, so I need the related Document Key to a certain Project Key).

My "solution":

Part 1 - I would choose all <ID Objects> from <table1> related to <ID Object 2> from <table2> that meet the selection condition for their <Keys> in <table1> and select by joining the related <ID Object 1> from <table 2>.

Part 2 - After that I choose those <Keys> from <table1> which have the concerning <ID Object 1> from <table2>.

I hope everybody is confused now

With my "solution" I would need to proceed a view (part 2) based on another view (part 2), which the workbench doesn't allow me to do, cause a view cannot get its data from another view but only from a basis database table.

Any ideas?

Many thanks in advance.

Best regards

Tobias

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi!

It seems for me, as you mentioned it already, it is not allowed to use joins in an another join.

You might create one join and code the others in ABAP.

Regards

Tamá

9 REPLIES 9

Former Member
0 Kudos

Hi!

It seems for me, as you mentioned it already, it is not allowed to use joins in an another join.

You might create one join and code the others in ABAP.

Regards

Tamá

0 Kudos

Thanks for your reply.

As I need to extract this view to Business Intelligence it is not possible to use ANY program code but only a view or a database table. Writing this issue in SQL/OpenSQL wouldn't be a problem actually. Unfortunately the View Editor Tool doesn't provide SQL coding...

0 Kudos

You could trying run a job first to fill a custom table with the results of your query and then base your BI extract on this custom table. I've also tried before to base a view on another view in SE11 and it wouldn't let me do it.

0 Kudos

Actually we already thought about that kind of solution but it would be nice to solve that problem by just having a view and not using a cronjob at first.

0 Kudos

Our BASIS have direct access to Oracle via SQLPlus and it would be possible for someone with this access to create a view based on a view directly in the database. I would assume that such a view would not be visible in the DDic but would be accessible from a SAP program using real SQL. I've never created a BI extract, though, so don't know if such a view would be accessible from there - I would suspect not.

Former Member
0 Kudos

Can't you simply use JOINs on the tables directly?

Rob

Former Member
0 Kudos

this can be achieved using view clusters.TA se54

0 Kudos

I thought SE54/View Cluster is a tool for database maintenance but not for my kind of issue. How would you try to solve my problem with that tool?

TobiasMeinzer
Advisor
Advisor
0 Kudos

view based on view is not possible.