Join of two DSOs into third DSO
Hello,
I have two DSOs, for Example:
DSO1:
Key1
Characteristic1
Key Figure 1
DSO2:
Key2
Characteristic2
Key Figure 2
but I need a third DSO with both informations where the key matches (Key1 = Key2):
DSO3:
Key (1=2)
Characteristic1
Key Figure 1
Characteristic2
Key Figure 2
I know, that this is possible with a select statement in ABAP in an end-routine of the transformation. But I want only to use ABAP if realy neccessary.
It might be possible with an Infoset, but I dont know exactly how.
Any Ideas ?
Thanks
Armin
I will try it, but I do not know if it is possible to use an Infoset as source for an ODS.
Similar Messages
-
Join the two JInternalFrame into one
hi everybody,
What can I do to join two JInternalFrame into one, like I have 2 floating panel then I join it into 1 by using JTappedPane. That you can drag to spit it out or join together !
thanks,
QuinI think you mean saving two images side-by-side into one image. You won't be able to this with a native iphone app, but you may find a third party app on the AppStore to do this. Try this http://itunes.apple.com/us/app/two-faces-photo-sharing/id406310161?mt=8 if you want more help, email me at [email protected]
-
How to move the two itab into third itab
Hi sap guru ,
my question : i have 3 internal table (i_vbrk , i_vbrp and itab)
1.i_vbrk like vbrk .
DATA: BEGIN OF I_VBRK OCCURS 0 ,
VBELN LIKE VBRK-VBELN ,
FKDAT LIKE VBRK-FKDAT ,
FKART LIKE VBRK-FKART ,
KUNAG LIKE VBRK-KUNAG ,
END OF I_VBRK .
2.i_vbrp like vbrp .
DATA: BEGIN OF I_VBRP OCCURS 0 ,
VBELN LIKE VBRP-VBELN ,
MATNR LIKE VBRP-MATNR ,
WERKS LIKE VBRP-WERKS ,
END OF I_VBRP .
but for THIRD internal table which i have ' itab ' should be having same FIELDS like both internal table (i_vbrk and i_vbrp)
so I have ,
3. ITAB .
TYPES: BEGIN OF ITAB ,
VBELN TYPE VBRK-VBELN,
FKDAT TYPE VBRK-FKDAT,
FKART TYPE VBRK-FKART,
MATNR TYPE VBRP-MATNR,
WERKS TYPE VBRP-WERKS,
KVGR1 TYPE VBRP-KVGR1,
END OF ITAB .
IS THIS RIGHT ....
NOW I WANT THAT THE DATA WHICH I WILL FETCH FROM DB-TABLE FOR THOUSE TWO INTERNAL TABLE (i_vbrk and i_vbrp) SHOULD MOVE INTO THIS THIRD ITAB ..PLZ TELL ME WHAT WILL BE THE CODE FOR THAT ?
answer will be rewarded....Hi,
Common suggestion can be to use 'INNER JOIN' but to have
a good performance of the code You can try the following.
types : BEGIN OF t_VBRK,
VBELN LIKE VBRK-VBELN ,
FKDAT LIKE VBRK-FKDAT ,
FKART LIKE VBRK-FKART ,
KUNAG LIKE VBRK-KUNAG ,
END OF t_VBRK .
types : BEGIN OF t_VBRP,
VBELN LIKE VBRP-VBELN ,
MATNR LIKE VBRP-MATNR ,
WERKS LIKE VBRP-WERKS ,
KVGR1 TYPE VBRP-KVGR1,
END OF t_VBRP .
TYPES: BEGIN OF ITAB ,
VBELN TYPE VBRK-VBELN,
FKDAT TYPE VBRK-FKDAT,
FKART TYPE VBRK-FKART,
MATNR TYPE VBRP-MATNR,
WERKS TYPE VBRP-WERKS,
KVGR1 TYPE VBRP-KVGR1,
KUNAG LIKE VBRK-KUNAG ,
END OF ITAB .
data : i_vbrk type STANDARD TABLE OF t_vbrk,
wa_vbrk type t_vbrk.
data : i_VBRP type STANDARD TABLE OF t_VBRP,
wa_VBRP type t_VBRP.
data : i_itab type STANDARD TABLE OF itab,
wa_itab type itab.
*/////write the select statements here.....//////
loop at i_vbrk into wa_vbrk.
wa_itab-vbeln = wa_vbrk-vbeln.
wa_itab-FKDAT = wa_vbrk-FKDAT.
wa_itab-FKART = wa_vbrk-FKART.
wa_itab-KUNAG = wa_VBRK-KUNAG.
READ TABLE i_VBRP into wa_vbrp
with key vbeln = wa_itab-vbeln.
wa_itab-MATNR = wa_vbrp-MATNR.
wa_itab-WERKS = wa_vbrp-WERKS.
wa_itab-KVGR1 = wa_vbrp-KVGR1.
append wa_itab to i_itab.
endloop.
Reward points if helpful.................. -
Getting the average of two cols into third col when user inserts or updates
I hav a table with three column a,b,c.
now i have to insert the average of the col a & b into c when user inserts or updates
any of the row?
i tried using row level trigger for this but not workin fine..
can anybody of u give me an idea as how to proceed?
thanks in advance..Sorry to be late to reply....
actually..for the trigger i used i got a mutating error.
if there is any other option for doing this,u teel me how.
i used the followin trigger and placed AT to avoid the mutating error.But still
create or replace trigger trg_xyz after insert or update of m1,m2
on xyz for each row
declare
v1 number;
pragma autonomous_transaction;
begin
v1 := (:new.m1+:new.m2)/2;
if inserting then
update set m3=v1 where m2=:new.m2 and m1=:new.m1;
elsif updating then
update set m3=v1 where m2=:new.m2 and m1=:new.m1;
end if;
commit;
end;
this does not throw any error, but doesnt inserts the value.i checked using dbms_output..i showed the average value for v1..but its not updating.. -
Hi to all.. i have this two table , the problem is i dunno how to join this two table into one, becoz in the forms i have two button "BUTTON A IS FOR TABLE A WHICH IS THE EMPLOYEE.. AND BUTTON B IS FOR ADMIN... WHAT I WANT IS TO MAKE THIS TWO BUTTON INTO ONE BUTTON.. i;m using form6i and run in client server..
Guys any one here know plz help how to do this..
TABLE 1
BEGIN
iF :username IS NULL THEN
MESSAGE ('Please enter Username ');
MESSAGE ('Please enter Username ');
GO_ITEM('username');
RAISE FORM_TRIGGER_FAILURE;
end if;
IF :PASSNAME1 IS NULL THEN
MESSAGE('Please enter password.');
MESSAGE('Please enter password.');
GO_ITEM('PASSNAME1');
RAISE FORM_TRIGGER_FAILURE;
end if;
select username,passname
into :pass.username,:pass.passname1
from Employees
where :pass.username=username
and :pass.passname1=passname;
Message('Access Granted');
Message('Access Granted');
go_block('maina');
hide_view('pass1');
exception
when no_Data_found then
set_alert_Property('wrong',Alert_Message_text,'Invalid Password');
if show_alert('wrong')=alert_button1 then
go_item('PASSNAME1');
:passname1:=null;
end if;
end;
TABLE 2
BEGIN
iF :username IS NULL THEN
MESSAGE ('Please enter Username ');
MESSAGE ('Please enter Username ');
GO_ITEM('username');
RAISE FORM_TRIGGER_FAILURE;
end if;
IF :PASSNAME1 IS NULL THEN
MESSAGE('Please enter password.');
MESSAGE('Please enter password.');
GO_ITEM('PASSNAME1');
RAISE FORM_TRIGGER_FAILURE;
end if;
select username,passname
into :pass.username,:pass.passname1
from Admin1
where :pass.username=username
and :pass.passname1=passname;
Message('Access Granted');
Message('Access Granted');
go_block('maina');
hide_view('pass1');
exception
when no_Data_found then
set_alert_Property('wrong',Alert_Message_text,'Invalid Password');
if show_alert('wrong')=alert_button1 then
go_item('PASSNAME1');
:passname1:=null;
end if;
end;like i told you before in this posting How to join this two tables
use a union
select username,passname
into :pass.username,:pass.passname1
from Employees
where :pass.username=username
and :pass.passname1=passname
union
select username,passname
into :pass.username,:pass.passname1
from Admin1
where :pass.username=username
and :pass.passname1=passname; -
We have tried joining two DSO's and are getting the warning that "more than one datasource has been used in this report". It appears that the DSO driver does not support joins. The report runs but it is VERY slow, the same sort of performance you get when you try to join data from two datasources that are actually different (like two different SQL Server databases or an Oracle table joined to a SQL Server table). It appears that this is not a supported function with the DSO driver. Any thoughts?
Yes, we have created the joins between the two DSOs. We are looking into using the Open SQL driver to go against the base tables to see if that will work. This is how the original ODS driver used to work.
Update: After changing the join type to a left outer join the performance improved signficantly. Although not ideal it looks like it will be fine for our requirements. This particular report will be run monthly and scheduled to run overnight.
Edited by: Mike Garrett on Oct 27, 2009 4:28 PM -
Combine the data of two DSOs into one
Hello experts,
how to load the data of two DSOs into a single one using transformations and DTPs?
Example:
DSO A keyfields: X,Y,Z / attributes M,N,O
DSO B keyfields: X,Y,Z / attributes P,Q
DSO C keyfields: X,Y,Z / attributes M,N,O,P,Q (result should be a single data record!)
In the transformation between DSO A and C I map all keyfields and attributes M,N,O (no mapping for P and Q, meaning no transformation rule). For B to C mapping is all keyfields and attributes P, Q (no mapping for M,N,O, no transformation rule).
When I now load the data of DSO A and DSO B to DSO C I either see the attributes M,N,O or P,Q. This means that only the latest DTP is available and overwrites the attributes with blank values of the first DTP.
I have a solution using ABAP coding but according to the SAP Training courses (BW330) it should work without using ABAP coding.
Any help is highly appreciated.
Thanks in advance.
MarcoHi Marco,
Thanks again
I looked into BW330 Business information warehouse - Modelling.
Course version : 2006 Q2
Material number : 50079531
I looked into the page 281 still no luck.
just an overview i need to create X,Y,Z,M,N,O as info objects characteristics
and P, O as infoobjects keyfigure.
None of them will have attributes and i load XYZMNO to DSO1 and same XYZPO to DSO2.
Then map DSO1 - DSO3 and DSO2 - DSO3 and carry out the steps to get the data from DSO1 and DSO2 to DSO3.
Am i right.
Regards,
Harish -
Delta broken between two DSO ??
Hello,
We are on BI 7.0.
We have copied our productive system into our develoment system in order to have refresh datas. But since this copy with a big problem in our development system : one DTP on delta is broken between two DSO.
I Try to reactivate any objects (DTP, DSO, transformation...). Nothing ! Then I delete all datas in target DSO and relaunch an init with same DTP in delta ! all data are correctly transfered in target DSO, but when I add new datas in source DSO, it's impossible to load them into target DSO with same DTP : "no more data avaible "
Could you help me ? In our system we have severals DTP in delta between DSO, and there are correct ! only this one is broken.Hi Eric,
When a system is refreshed all the data sources and other DTPs might show the refreshing system details.
BASIS would be running BDLS job to change those entries and point correctly the Source system.
After refresh there are many possibilities that the INITs would be corrupted.
Check with your BASIS team whether BW relevant post refresh jobs are completed or not?
Thanks & Regards.
Ganesh Thota. -
Delta issues between two DSO's
This issue has been a recurrent one over past years, so maybe someone can explain me what is happening here:
The case is always the same, i.e. I try to load a delta from one DSO into another one. Let's call them DSO1, and DSO2. More in detail, the case is as follows:
1. I get an error when loading DSO1 to DSO2, due to some characteritic value's checks that I have implemented in a start routine.
2. I delete the red request from DSO2, and manually delete the wrong entryfrom DSO1.
3. I reload (full) the deleted records into DSO1, with the corrected values. At the end I check that my data into DSO1 is correct, and that the wrong record has gone.
4. I then reload a delta from DSO1 into DSO2, but I still get the same wrong record transferred, even if the record does not exist anymore in DSO1 !!
My guess is therefore that the data for deltas is fully saved in separate tables, instead of being compared at runtime. Does anyone know if my assumption is correct...If yes, how can I find this table? Is there anything I can do to solve this issue?The error is not very important...I have implemented a check so that a field is never transferred empty. The field is not empty anymore in the source DSO, but it still exists in the change log table...Can I do something about it?
With other words: Can I force the change log to be recreated as the difference between my two DSO's, instead as a package of changed records...?
Edited by: TTBBRR on Mar 22, 2010 1:43 PM -
Comparasions of records between two dsos using abap program
Hello Experts,
As per my business requirements we Implemented 30 DSO (EDW Layer) for x Reason with the reference from Y Reason DSOs. and for x reson dso we created transformations and dtp. through process chains we loaded the data to X Reason Dsos. after loading i want to comare these two dso records through ABAP Progrm.
here my source is : X Region Dsos
here Trget is : Y Region Dsos
these two are the mandatory fields
and the optional fields are:
1. Sales org
2. Sales division
3. document creation date.
for this type of requirement i want to implement ABAP Program.i want to abap code for this type of requirement. anyone have abap code for similar type of requirement please send the abap code.
Thanks & Regards,Hi saurabh,
If your requirement if to comepare both the values based on the sales org, sales div, data, u can build a report or if you want to look up the both the DSO and want to perform any operation we need to write routine at transforamation level.
I'm sending u a sample code where i had used for look up two ods and delete the exisitng saled docs.in the BI.
DATA : BEGIN OF i_uxxx OCCURS 0,
/bic/zaw LIKE /bic/aZD_UDLIT00-/bic/zaw,
END OF i_uxxx.
DATA : wa_udlit LIKE i_uxxxt.
DATA : BEGIN OF i_uxxxx OCCURS 0,
/bic/zaw LIKE /bic/aZD_UDAN00-/bic/zaw,
END OF i_udxxx.
DATA : wa_uxxxx LIKE i_uxxx.
case 1 : For uxxxx lite data
CLEAR i_uxxx.
DATA: wa_srcpack TYPE tys_sc_1,
zindex TYPE sy-tabix.
BREAK-POINT.
CLEAR: zindex.
SELECT /bic/zaw
FROM /bic/aZD_UDLIT00
INTO TABLE i_uxxx.
FOR ALL ENTRIES IN SOURCE_PACKAGE
WHERE /bic/zaw = SOURCE_PACKAGE-/bic/zcustomer.
LOOP AT SOURCE_PACKAGE INTO wa_srcpack.
zindex = sy-tabix.
CLEAR wa_xxx.
READ TABLE i_uxxx INTO wa_uxxx
WITH KEY /bic/zaw = wa_srcpack-/bic/zcustomer
IF sy-subrc = 0.
Delete SOURCE_PACKAGE.
ENDIF.
MODIFY SOURCE_PACKAGE INDEX zindex FROM wa_srcpack.
CLEAR: zindex.
ENDLOOP.
*case 2 : For uxxxx data
CLEAR i_uxxxx.
DATA: wa_srcpack1 TYPE tys_sc_1,
zindex1 TYPE sy-tabix.
BREAK-POINT.
CLEAR: zindex1.
SELECT /bic/zaw
FROM /bic/aZD_UDAN00
INTO TABLE i_uxxxx
FOR ALL ENTRIES IN SOURCE_PACKAGE
WHERE /bic/zaw = SOURCE_PACKAGE-/bic/zcustomer.
LOOP AT SOURCE_PACKAGE INTO wa_srcpack1.
zindex1 = sy-tabix.
CLEAR wa_uxxx.
READ TABLE i_uxxxx INTO wa_uxxx
WITH KEY /bic/zaw =
wa_srcpack1-/bic/zcustomer
IF sy-subrc = 0.
Delete SOURCE_PACKAGE.
ENDIF.
MODIFY SOURCE_PACKAGE INDEX zindex FROM wa_srcpack.
CLEAR: zindex1.
endloop.
Hope this helps...
Regards
KP -
Can i use Two DSO 's in Function module
hi experts,
Can i use Two DSO 's in Function module .That FM is used for Layout
I actually want to fill one DSO Refering the Data in Another DSO.
Regard
Naresh.In the first way the DSO's are usually called shared libraries or DSO libraries and named libfoo.so or libfoo.so.1.2. They reside in a system directory (usually /usr/lib) and the link to the executable program is established at build-time by specifying -lfoo to the linker command. In the second way the DSO's are usually called shared objects or DSO files and can be named with an arbitrary extension
-
How can i add two table data into third internal table see below
hi i insert diffferent table data into different internal table i did try to insert two different internal table data into third internal table by using move
but only single data is coming please help me
i want this two internal table data inot third internal table.
sELECT * FROM J_1IEXCHDR INTO CORRESPONDING FIELDS OF ITAB1 WHERE STATUS = 'P'.
SELECT * FROM J_1IEXCDTL INTO CORRESPONDING FIELDS OF ITAB2 WHERE LIFNR = J_1IEXCHDR-LIFNR.
AND DOCYR = J_1IEXCHDR-DOCYR,
AND DOCNO = J_1IEXCHDR-DOCNO.
WRITE: / ITAB1-LIFNR,
ITAB1-DOCNO,
ITAB1-EXYEAR,
ITAB1-BUDAT,
ITAB2-EXBED,
ITAB2-RDOC,
ITAB2-ECS.
ENDSELECT.
ENDSELECT.
thank you .hi
Two add two internal tables data. first we need to create third internal table with all the fields of first two internal tables.
later u move the two internal tables data to third internal table
by looping the internal table which have more records or depending on the requirement and move the corresponding fields of first internal table to the third internal table and use the read statement with condition based on primary key of first itab and get the corresponding data of 2table into 3table.
i am sending the sample code to u.
check it out. i think u will understand how to move.
select vbeln waerk netwr erdat audat kunnr
into table it_vbeln
from vbak
where vbeln in s_vbeln
and erdat in s_erdat.
if not it_vbeln[] is initial.
select kunnr name1
into table it_kunnr
from kna1
for all entries in it_vbeln
where kunnr = it_vbeln-kunnr.
endif.
loop at it_vbeln.
clear it_final.
it_final-vbeln = it_vbeln-vbeln.
it_final-waerk = it_vbeln-waerk.
it_final-netwr = it_vbeln-netwr.
it_final-erdat = it_vbeln-erdat.
it_final-audat = it_vbeln-audat.
read table it_kunnr with key kunnr = it_vbeln-kunnr.
it_final-name1 = it_kunnr-name1.
append it_final.
endloop. -
Join on two tables using "LIKE"
Hi all,
I need make join on two tables (QMEL and STXL) using keys for connection:
- field for join of first table is (QMEL-QMNUM - Notif. number - Char 12)
- field for join of second table is (STXL-TDNAME - Char 70)
If it is connection based on EQ, I think, it's no problem but I need to connect it on base of 'LIKE'.
Example:
QMEL-QMNUM = '100100698075'
I would like get all rows from STXL which contain or even better start with notif. number.
Examples I would like connect with QMEL-QMNUM:
STXL-TDNAME = '100100698075'
STXL-TDNAME = '1001006980750001'
STXL-TDNAME = '10010069807500010001'
STXL-TDNAME = '10010069807500010002'
etc..
Am I able to manage that with select which join these two tables this way?
Thanks for any solution
Vaclav Hosek.Hi,
Write 2 separate selects for this.
select * from QMEL
where......
if sy-subrc = 0.
loop at i_qmel into wa.
r_tdname-option = 'CP'.
r_tdname-sign = 'I'
concatenate wa-qnum '*' into r_tdname-low.
append r_tdname.
endloop.
select *
from STL
where tdname in r_tdname.
endif. -
Subject: How to do join between two tables using something like SE16
SE16, SE11 provide form based interface query information from a single table. Is there a way to do join between two tables without creating an infoset erc? I am looking for something similar to sql join but in SAP BI 7.0
Thanks.Hi
Pls look into below links. Hope this helps you.
1. http://help.sap.com/saphelp_46c/helpdata/EN/d2/cb45bf455611d189710000e8322d00/content.htm
2. http://help.sap.com/saphelp_46c/helpdata/EN/d2/cb45a5455611d189710000e8322d00/content.htm
Regards
Sirigiri -
Hi
have a two login in forms not in oracle... i have two tables first the
Master secodn the Employees.. my prob is i have two button for this two tables to login.. any solution on how i can join this two in one button that if i connect using from master tables or from employess it will login
FirstTAble:::
BEGIN
iF :username IS NULL THEN
MESSAGE ('Please enter Username ');
MESSAGE ('Please enter Username ');
GO_ITEM('username');
RAISE FORM_TRIGGER_FAILURE;
end if;
IF :PASSNAME1 IS NULL THEN
MESSAGE('Please enter password.');
MESSAGE('Please enter password.');
GO_ITEM('PASSNAME1');
RAISE FORM_TRIGGER_FAILURE;
end if;
select username,passname
into :pass.username,:pass.passname1
from Master
where :pass.username=username
and :pass.passname1=passname;
Message('Access Granted');
Message('Access Granted');
go_block('maina');
hide_view('pass1');
exception
when no_Data_found then
set_alert_Property('wrong',Alert_Message_text,'Invalid Password');
if show_alert('wrong')=alert_button1 then
go_item('PASSNAME1');
:passname1:=null;
end if;
end;
SEcodnTAble
BEGIN
iF :username IS NULL THEN
MESSAGE ('Please enter Username ');
MESSAGE ('Please enter Username ');
GO_ITEM('username');
RAISE FORM_TRIGGER_FAILURE;
end if;
IF :PASSNAME1 IS NULL THEN
MESSAGE('Please enter password.');
MESSAGE('Please enter password.');
GO_ITEM('PASSNAME1');
RAISE FORM_TRIGGER_FAILURE;
end if;
select username,passname
into :pass.username,:pass.passname1
from Employees
where :pass.username=username
and :pass.passname1=passname;
Message('Access Granted');
Message('Access Granted');
go_block('maina');
hide_view('pass1');
exception
when no_Data_found then
set_alert_Property('wrong',Alert_Message_text,'Invalid Password');
if show_alert('wrong')=alert_button1 then
go_item('PASSNAME1');
:passname1:=null;
end if;
end;use a union on the 2 select statements.
Maybe you are looking for
-
Can not make integrated weblogic server work
After installation of Jdeveloper 11.1.2.1.0, I ran "Test Connection" for IntegratedWeblogicServer and got the following error. What did I miss? Thanks in advance. Testing JSR-160 Runtime ... failed Cannot establish connection. Testing JSR-160 DomainR
-
IP: How to create new records in an empty (but planable) Cube
Hi specialists, I'm looking for a way to add new records to a (so far) empty but planning-enabled cube. As soon as I inserted some records via the data-loading-process (from a datasource), I can change the planable key-figures and I can add new lines
-
I downloaded Firefox 4.o exe. When I tried to open it I got an error message stating that it was not a valid Win32 application. I am using windows XP SP3. How do I get it to open?
-
Computer Not Turning On w/ Power Chord
My G4 went to sleep w/o warning (the same issue as this thread post?!?!) and now WILL NOT WAKE UP?! (yes I am aware of this "defect" via other posts). Any idea why? Here's what I tried to troubleshoot: 1. A diff power chord 2. Taking battery out and
-
How to do a DB lookup in ICM and return the ANI and Rewards Number to CTI
Hello, Does anyone know how to take the ANI and do a database look up to get the customer loyalty program number? After the number is collected, I need to return the ANI and the loyalty number to CTI using variable 5. Any feedback on how to acc