2008 Oct 02 12:46 PM
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
2008 Oct 02 1:25 PM
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á
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
2008 Oct 02 1:25 PM
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á
2008 Oct 02 1:29 PM
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...
2008 Oct 02 2:13 PM
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.
2008 Oct 02 2:50 PM
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.
2008 Oct 02 3:30 PM
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.
2008 Oct 02 3:32 PM
2008 Oct 03 12:02 PM
2008 Oct 06 8:21 AM
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?
2009 Jan 21 10:53 AM
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |