BI 7.0 Infoset - Infocube - Left outer join - query
Hi Expert,
A infoset contain Infocube and ODS, linked with left outer join, common fields are PO,PO item. PO account assignment ODS have three keyfields: PO Doc.,Item,account Assignment .
PO Infocube <b>PO Account Assignment ODS</b>
PO PO item Amt<b>PO Doc. Item AccAssignment Cost object</b>
1000 10 230 <b>1000 10 1 CC1</b>
1001 10 250 <b>1002 10 1 CC1</b>
1002 10 150 <b>1002 10 2 CC2</b>
in BEx result are like this:
1000 10 230 1 CC1
1001 10 250 # #
1002 10 150 1 CC1
1002 10 150 2 CC2 ( amount only duplicated)
The issue was that amount gets duplicated. It only occurs if PO has more than one account assignment.
In report, we want show like this
1000 10 230 1 CC1
1001 10 250 # #
1002 10 150 1 CC1
1002 10 # 2 CC2
Any suggestion or input to overcome this issue?
Thanks,
Saran
Message was edited by:
Saravanan K
Hi,
did you solve your problem? because I have the same issue right now: the left outer join doesn't seem to do its job.
Let me know if you have found a solution, it would be appreciated.
have a nice day,
Dominic
Similar Messages
-
Hi Experts,
I am facing a problem with left outer join query. Am using one standard table and ztable for this join. My problem is values are not extracted from the Ztable.
Query:
SELECT b~lifnr b~belnr b~gjahr b~xblnr b~shkzg b~blart b~zfbdt b~budat b~wrbtr
b~wskto b~zlspr s~EXTRACT_STATUS s~maturity_date FROM bsik AS b
LEFT OUTER JOIN zprm_rvne_sapdoc AS s
ON s~belnr EQ b~belnr
AND s~gjahr EQ b~gjahr
INTO CORRESPONDING FIELDS OF TABLE it_join
WHERE b~zlsch = p_zlsch
AND b~xblnr IN so_invno
ORDER BY b~lifnr b~xblnr.
I have all entries of BSIK table in Ztable with extract status as Y but this query is not fetching extract status and maturity date of ztable so it is blank in the internal table.
Need solution.
Regards
Sridevi SHi,
see the sample wiki for writing the Left outer join
http://wiki.sdn.sap.com/wiki/display/Snippets/EmployeeInfotype0000to9999ChangeHistory
Specifying Two or More Database Tables as a Left Outer Join
The left outer join, on the other hand, reads lines from the left-hand database table or join even if there is no corresponding line in the right-hand table.
SELECT...
FROM <tab> LEFT [OUTER] JOIN <dbtab> [AS <alias>] ON <cond>
<options>
<tab> and <dbtab> are subject to the same rules and conditions as in an inner join. The OUTER addition is optional. The tables are linked in the same way as the inner join with the one exception that all lines selected from <tab> are included in the final selection. If <dbtab> does not contain any lines that meet the condition <cond>, the system includes a single line in the selection whose columns from <dbtab> are filled with null values.
In the left outer join, more restrictions apply to the condition <cond> than in the inner join. In addition to the above restrictions:
EQ or = is the only permitted relational operator.
There must be at least one comparison between columns from <tab> and <dbtab>.
The WHERE clause may not contain any comparisons with columns from <dbtab>. All comparisons using columns from <dbtab> must appear in the condition <cond>.
If we have two tables named stud1,stud2 with the following data
Stud1: id Name stud2: id Name
1 xxx 1 aaa
2 yyy 2 bbb
3 zzz 4 ccc
4 www 6 ddd
When we use Left Outer Join we get the output as:
1 aaa
2 bbb
3 <Null>
4 ccc
When we use Right Outer Join we get the output as:
1 aaa
2 bbb
4 ccc
<Null> ddd
When we use Full Outer Join we get the output as:
1 aaa
2 bbb
3 <Null>
4 ccc
<Null> ddd
Prabhudas -
Filter on "---" in Left Outer Join Query
Hi guys,
very basic question but I have not found an answer, yet. I built an left outer join MDO query and need to select all those dataset that did not find a "partner", that is fields are set to "---". However, I do not manage to filter on '---', NULL...
When using SQL, it appears to be a String "---" but in MDO???Hey guys, found out that IS NULL needs to be used in query. Anyway, it appears to cause problems somewhere else.
I placed an IS NULL filter expression inside a join query but query did not return any results when called in by transaction. After removing this line, both NULL and NOT NULL data were returned. When used in test mode, IS NULL was working fine... -
Issue on left outer join query in 10G
Dear Mr./Mrs./Ms. Oracle expertise,
The following query structure can function properly in Oracle 9i, but not work in Oracle 10G.
Please kindly advise what happened in Oracle 10G?
Is it a bug in 10G? If yes, any patch for it?
select a.col1,
a.col2,
a.col5,
b.col3,
b.col4
from t1 a
inner join t2 c on c.col1 = a.col1
left join (select col3
col4
from t3) b
on b.col1 = a.col1
and a.col2 = 'Y' <---------- seems 10G cannot allow this condition
where a.col5 = 123;
Purpose of above SQL
====================
Only those records from t1 table with a.col2 = 'Y' will
do the left outer join to "b" table and get the columns b.col3 and b.col4
Result set in Oracle 9i
=======================
col1 col2 col5 col3 col4
AAA N 111
BBB N 222
CCC Y 333 XYZ OOO
DDD Y 444 QPR 111
Result set in Oracle 10G
========================
col1 col2 col5 col3 col4
AAA N 111
BBB N 222
CCC Y 333
DDD Y 444
Rgds,
Ken ChanDear Schneider,
Sorry that there was a typo in my query.
Below is the revised query.
select a.col1,
a.col2,
a.col5,
b.col3,
b.col4
from t1 a
inner join t2 c on c.col1 = a.col1
left join (select col1,
col3,
col4
from t3) b
on b.col1 = a.col1
and a.col2 = 'Y' <---------- seems 10G cannot allow this condition
where a.col5 = 123;
Thanks.
Rgds,
ken Chan -
How to Mark join as left outer join in Info set
Hi Folks,
I have 2 info cubes in Info set, I need to mark the join as Left outer join.
I have read some blogs where is says that it cant be joined, but one of my colleagues has made left outer join using two cubes.
I want to replicate the same thing into my design.
If i normally connect one IO to another cubes same IO- its a normal join- its not written as left outer join. I want to see left outer join written on my link.
I tried global setting but no use.
Am I missing some setting,Hi Vivek,
Please have a look at SAP Note 577953 - @0S@ InfoSets (BW): Left outer joins.
The answer on question "3. How do I define a left outer join in InfoSet maintenance?" describes how you should proceed.
Best regards,
Sander -
Left Outer Join on same table clarification
HI,
I have a table that gets populated from 3<sup>rd</sup> party system. We don’t have control over it. So, the table has master record (master) and children. Master type is 78 and children’s type is 64. So, it looks like this. In the 3<sup>rd</sup>
party system, if Master transaction gets cancelled, it is recorded as type 178. If child is cancelled, then it is 164. Once the child is cancelled and created again using one process then newly created transaction will have 65 as type. Same thing with Master
cancelled transaction also. It will be 79. So, to summarize:
Master:
Brand New Transaction type = 78
Cancelled Transaction type = 178
Cancelled with creation transaction type = 79
Child:
Brand New Transaction type = 64
Cancelled Transaction type = 164
Cancelled with creation transaction type = 65
I don’t have to bother about master records. I need to focus on only children for my query.
ID
TxnID
Master
Type
TDate
Location
193075
211554
211543
64
20140805
ABC
193076
211555
211543
64
20140805
NBC
193077
211556
211543
64
20140805
ABC
193080
211559
211558
64
20140805
ABC
193081
211562
211561
64
20140805
ABC
193082
211565
211564
64
20140805
CBC
193083
211565
211564
164
20140805
CBC
193084
211566
211564
65
20140805
AZC
--drop
table #Transactions
CREATE
TABLE #Transactions
ID
int,
TxnID
int,
mstTicket
int,
Typecode
int,
Tdate
datetime,
Location
varchar(10)
select
* from
#Transactions
Insert
into #Transactions
(ID,
TxnID,
mstTicket,Typecode,Tdate,Location)
Select 193075, 211554,211543,64,'2014-08-05','ABC'
UNION ALL
Select 193076, 211555,211543, 64,
'2014-08-05',
'NBC' UNION ALL
Select 193077, 211556, 211543, 64,
'2014-08-05',
'ABC' UNION
ALL
Select 193080, 211559, 211558, 64,
'2014-08-05',
'ABC' UNION
ALL
Select 193081, 211562, 211561, 64,
'2014-08-05',
'ABC' UNION
ALL
Select 193082, 211565, 211564, 64,
'2014-08-05',
'CBC' UNION
ALL
Select 193083, 211565, 211564, 164,
'2014-08-05',
'CBC' UNION
ALL
Select 193084, 211566, 211564, 65,
'2014-08-05',
'AZC'
select
T.TxnID,
T.TypeCode,
T.Location,
TL.TxnID
From
#Transactions T
Left Outer
JOIN #Transactions
TL ON
TL.TxnID
= T.TxnID
and TL.TypeCode
= 164
select
T.TxnID,
T.TypeCode,
T.Location,
TL.TxnID
From
#Transactions T
Left Outer
JOIN #Transactions
TL ON
TL.TxnID
= T.TxnID
and TL.TypeCode
= 164
Where
T.typecode
in (64, 65)
I need a clarification regarding left Outer Join.
In the first left outer join query both 64 and 164 both have TL.TxnID populated. Why is that?. What I understand from
left outer join is that ‘Returns all the rows’ from left table and only matching data from right table.
Here, matching row from right table is 211565 and 164 record (id 193083). So, only it should have TxnID populated. But row 211565 and 64 has TL.txnID getting populated (ID 193082).
Why is it? Am I not understanding left out join properly?
Thanks,Thank you Shailesh. I understood what join does in left outer join. I was thinking
Left Outer JOIN #Transactions TL ON TL.TxnID = T.TxnID and TL.TypeCode = 164 is same as
Left Outer JOIN #Transactions TL ON TL.TxnID = T.TxnID and TL.TypeCode = T.TypeCode
and TL.TypeCode = 164
#Transactions
T
Left
Outer
JOIN
#Transactions
TL
ON
TL.TxnID
=
T.TxnID
and
TL.TypeCode
= 164
Where
T.typecode
in
(64,
65) -
BI 7.0 Left outer join in Infoset
Hi Everybody,
I am using BI 7.0 and have two cubes in my Infoset.
How do we set left outer join option in Infoset.
Thanks
ShilpaLook at <a href="http://help.sap.com/saphelp_nw2004s/helpdata/EN/05/7ce2416149c717e10000000a155106/frameset.htm">this</a> page. Note the text: <i>For performance reasons, you cannot define an InfoCube as the right operand of a left outer join.</i> Hope this helps...
-
BI Infoset left outer join (NW04s)
I created an Infoset using a left outer join for infoproviders:
- 0FIGL_O10 (GL transaction figures - DSO )
- 0CCA_C03 (CCA Statistical key figures - CUBE)
DSO 0FIGL_O10 is the left table with joins on:
- 0COSTCENTER
- 0FISCPER
The data set returned by Infoset appears to be based on a SQL using an
inner join.
This appears to be a bug.
We are on BI 700 SP 15.Hi Raynald - I did a demo with few records and it works fine for me. We are on 7, SP14.
-
Left Outer Join not working in Infoset.
Hello Friends,
I have two ODSes , one for planned data (zplan) and other is billing z ods (zsd_o03).
now the situation is such that in my planned ODS for one sold to party .
SOLD TO MATERRIAL CALMONT PLANNED QUANTIY
14315 100 06.2007 54
14315 200 06.2007 20
14315 300 06.2007 30
14315 400 06.2007 10
But in my Billing ODS iam having for Sold to 14315
SOLD TO MATERRIAL CALMONT ACTUAL QUANTIY
14315 100 06.2007 20
14315 200 06.2007 30
And my Bex ouput should be like
SOLD TO MATERIAL CALMONT planned ACTUAL QUANTIY
14315 100 06.2007 54 20
14315 200 06.2007 20 30
14315 300 06.2007 30 0
14315 400 06.2007 10 0
So for this i made one Infoset and these ODses are linked by Sold_to , Materail,
Calmonth.
First i tried using Inner joing option , but the bottom two lines were not ciming , so used left outer join , and activated and recreated the query but still its showiong me the output same as inner join .. i.e
14315 100 06.2007 54 20
14315 200 06.2007 20 30
So i checked by writing a ABAP code in Se38 , but there its showing me the correct result ..
So please anybody help me out because iam thinking that infoset is the right way to do this kind of reporting , or esle shall i make one ODS and populate it through this ABAP code..
Thanks in advance.Hi , can anybody help me in this regard..
Thanks .. -
How to find Inner join or (Left)outer join for Infoset
Dear Experts,
We have one Infoset which is based on the Master data and DSO. It is linked 0BPARTNER field From the Master Data and SOLD TO PARTY field from the DSO.
Here Could you please suggest me how can we able to find that whether this Infoset is based on Inner Join or (Left) outer join.
Thanks and Regards,
Suresh.HI Suresh,
If the infoset is based on left outer join , you see the respective table shaded in a dirrerent colour and also displays
that it is a left outer join in the connection
refer the below link for the details on left outer join , you can make a join as left outer from the context menu of the
object required
http://help.sap.com/erp2005_ehp_04/helpdata/EN/21/af0942b9dc9c39e10000000a155106/frameset.htm
Regards,
Sathya -
How to change to a left outer join an Infoset that is already created?
Hi! I need HELP please!!!
I created a data model based on an Infoset, but at the time to report on WEBI, there is a field that is recognized as a text instead of a date. I've been trying to modify everything i think of but nothing worked!!!!!! So now i want to change my infoset to a left outer join but i can't find where.
Could anyone help me, please!?Hi,
This is very simple. Just right click on the right operand, you will see the option. -
Left Outer Join Not working in BI 7.0 Infoset
Hi All,
I am working on BI 7.0. I have to create a report where I have to display the Target values from a target DSO against the transactional data (Operational data).
I have a DSO where for a subteam value target has been set up on different KPIs.
In the Info Cube, I have transactional data on daily basis per subteam. I have to show the actual and target values.
I have created an Info Set using Target DSO and Daily operational cube, so that I should able to compare the target and actual values of KPIs, for all the subteam values (From DSO, irrespective of whether the data is available in cube for those sub team).
I have used Outer Left Join in the Info set (DSO on left side), but I am unable to see the desired results. It is working just like an inner join.
Any Idea why the Outer Left Join is not working? The DSO has only one fey field called subteam on which I have set outer left join.
Regards,
AmitHi,
did you solve your problem? because I have the same issue right now: the left outer join doesn't seem to do its job.
Let me know if you have found a solution, it would be appreciated.
have a nice day,
Dominic -
Hi,
I got a requirement to design Infoset with OUTER JOIN between 2 ODS. Even after making the outer join query is displaying the output as INNER JOIN.
Contract ODS (0CRM_CNT2) [T00001]
Contract Number
Contract Item
Sales ODS (ZCRG_O16) [T00002]
Contract Number
Contract Item
Above 2 ODS are joined by Contract Number and Contract Item and marked Sales ODS as LEFT OUTER JOIN. I want to list all Contract line items in the query output even though there is no sales on that contract item.
SQL from the Query
CREATE VIEW [/BI0/0300094697] AS
SELECT
[T00002].[FISCVARNT] AS [K____1321],
[T00002].[FISCPER] AS [K____1322],
[T00001].[/BIC/ZCRCHCONT] AS [K____1307],
[T00002].[BASE_UOM] AS [K____1316],
[T00001].[MATERIAL] AS [K____1308],
[T00002].[QUANT_B] AS [ZIS0006___F223]
FROM
[/BI0/ACRM_CNT200] [T00001] LEFT JOIN
[/BIC/AZCRG_O1600] [T00002] ON
([T00001].[/BIC/ZCONTRITM] = [T00002].[/BIC/ZCONTRITM] AND
[T00001].[/BIC/ZCRCHCONT] = [T00002].[/BIC/ZCRCHCONT])
WHERE (((((( [T00002].[FISCPER] = '2008006')))) AND
(((( [T00002].[FISCVARNT] = 'V3')))) AND
(((( [T00001].[/BIC/ZCRCHCONT]= '0006000030'))))))
If anybody come across this pls answer . This is in BW 3.5 and Database in SQL Server
Thanks in advance.
Thanks
VinodHi,
Please see the sap note 577953 for more detail on left outer join in infosets.
Hope it helps.
Regards,
Nitin -
Problem with XMLTABLE and LEFT OUTER JOIN
Hi all.
I have one problem with XMLTABLE and LEFT OUTER JOIN, in 11g it returns correct result but in 10g it doesn't, it is trated as INNER JOIN.
SELECT * FROM v$version;
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
"CORE 11.2.0.1.0 Production"
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
--test for 11g
CREATE TABLE XML_TEST(
ID NUMBER(2,0),
XML XMLTYPE
INSERT INTO XML_TEST
VALUES
1,
XMLTYPE
<msg>
<data>
<fields>
<id>g1</id>
<dat>data1</dat>
</fields>
</data>
</msg>
INSERT INTO XML_TEST
VALUES
2,
XMLTYPE
<msg>
<data>
<fields>
<id>g2</id>
<dat>data2</dat>
</fields>
</data>
</msg>
INSERT INTO XML_TEST
VALUES
3,
XMLTYPE
<msg>
<data>
<fields>
<id>g3</id>
<dat>data3</dat>
</fields>
<fields>
<id>g4</id>
<dat>data4</dat>
</fields>
<fields>
<dat>data5</dat>
</fields>
</data>
</msg>
SELECT
t.id,
x.dat,
y.seqno,
y.id_real
FROM
xml_test t,
XMLTABLE
'/msg/data/fields'
passing t.xml
columns
dat VARCHAR2(10) path 'dat',
id XMLTYPE path 'id'
)x LEFT OUTER JOIN
XMLTABLE
'id'
passing x.id
columns
seqno FOR ORDINALITY,
id_real VARCHAR2(30) PATH '.'
)y ON 1=1
ID DAT SEQNO ID_REAL
1 data1 1 g1
2 data2 1 g2
3 data3 1 g3
3 data4 1 g4
3 data5 Here's everything fine, now the problem:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
PL/SQL Release 10.2.0.1.0 - Production
"CORE 10.2.0.1.0 Production"
TNS for HPUX: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
--exactly the same environment as 11g (tables and rows)
SELECT
t.id,
x.dat,
y.seqno,
y.id_real
FROM
xml_test t,
XMLTABLE
'/msg/data/fields'
passing t.xml
columns
dat VARCHAR2(10) path 'dat',
id XMLTYPE path 'id'
)x LEFT OUTER JOIN
XMLTABLE
'id'
passing x.id
columns
seqno FOR ORDINALITY,
id_real VARCHAR2(30) PATH '.'
)y ON 1=1
ID DAT SEQNO ID_REAL
1 data1 1 g1
2 data2 1 g2
3 data3 1 g3
3 data4 1 g4As you can see in 10g I don't have the last row, it seems that Oracle 10g doesn't recognize the LEFT OUTER JOIN.
Is this a bug?, Metalink says that sometimes we can have an ORA-0600 but in this case there is no error returned, just incorrect results.
Please help.
Regards.Hi A_Non.
Thanks a lot, I tried with this:
SELECT
t.id,
x.dat,
y.seqno,
y.id_real
FROM
xml_test t,
XMLTABLE
'/msg/data/fields'
passing t.xml
columns
dat VARCHAR2(10) path 'dat',
id XMLTYPE path 'id'
)x,
XMLTABLE
'id'
passing x.id
columns
seqno FOR ORDINALITY,
id_real VARCHAR2(30) PATH '.'
)(+) y ;And is giving me the complete output.
Thanks again.
Regards. -
Need to adjust SQL query for left outer join in Crystal Reports 2008.
I need to change this SQL 2005 query.....
SELECT omnicell_anl.DeviceIDsLastMetricTable.member_id, omnicell_anl.DeviceIDsLastMetricTable.[Device Name],
omnicell_anl.DeviceIDsLastMetricTable.Account, omnicell_anl.labeledLastMetrics.PROPERTY_NAME,
omnicell_anl.labeledLastMetrics.latest_monitor_value
FROM omnicell_anl.DeviceIDsLastMetricTable LEFT OUTER JOIN
omnicell_anl.labeledLastMetrics ON omnicell_anl.DeviceIDsLastMetricTable.member_id = omnicell_anl.labeledLastMetrics.member_id
WHERE
omnicell_anl.labeledLastMetrics.PROPERTY_NAME = ?MyProperty
To this query in Crystal Reports Report Writer:
SELECT omnicell_anl.DeviceIDsLastMetricTable.member_id, omnicell_anl.DeviceIDsLastMetricTable.[Device Name],
omnicell_anl.DeviceIDsLastMetricTable.Account, omnicell_anl.labeledLastMetrics.PROPERTY_NAME,
omnicell_anl.labeledLastMetrics.latest_monitor_value
FROM omnicell_anl.DeviceIDsLastMetricTable LEFT OUTER JOIN
omnicell_anl.labeledLastMetrics ON omnicell_anl.DeviceIDsLastMetricTable.member_id = omnicell_anl.labeledLastMetrics.member_id AND
omnicell_anl.labeledLastMetrics.PROPERTY_NAME = ?MyProperty
I can't seem to get the left outer join function of Crystal Reports to emulate the same SQL query in SQL 2005. Any ideas on how I can create this same query in Crystal 2008?
Thanks,
Dominic
Edited by: Dominic Carissimi on Oct 28, 2008 7:55 PM
Edited by: Dominic Carissimi on Oct 28, 2008 7:56 PMIf you want the list of values for command level parameter then you need to add another command like
select PropertyField from table
and delete the links between this command and the existing command.
Now go to field explorer and edit the command level parameter and make it as dynamic and add the property field from newly added command.
Hope this helps!
Raghavendra
Maybe you are looking for
-
Importing a Project outof memory error
Hi all, When i am importing a project (xml) file which was a 210Mb size.Getting outofMemoryerror .Is there any limitation ??? Any suggestions? Note: using BI APPS(OBIEE) 7.9.5.2 ODI Project thanks, saichand.v
-
Is there a version of PS that can adjust a batch by a Historgram setting?
Is there a version of PS that can adjust mass numbers of high res images for Contrast and Brightness but at the same time constrained by a Histogram setting? I have thousands of hi res .sid or .png images that are all of various degrees of brightness
-
Shut down the computer from a java program
Hello! Can anyone tell me if can be made an java program that can shut down the computer (windows 2000 operating system) and forces all the programs to close? If it can be made, can you give me some tips? Thanks Kata
-
Windows Media Player Plugin Extension on Firefox 21.0 doesn't work
The Windows Media Player Extension for Firefox plugin doesn't work on Firefox 21.0 I've uninstalled and installed it again but it not appears on Complements page even. Please make WMP extension work on Firefox again, use IE only to listen WMP streami
-
There are a lot of "unused" or obsolete folders that show up when I am moving messages to another folder (such as Junk). Having all these showing up all the time makes it cumbersome when doing this. I presume this "recent" list is stored somewhere, b