Reg: To automate deletion of data in two cubes at a time
Hi,
I want to automate deletion of two cubes at a time using abap code. The selection criteria will be same for both the cubes.
Will it be possible to do?
Please help.
Regards,
Sameer.
HI,
please see the below link
How can we automate the process of selective deletion in process chain
and there is a good PDF document is there on this
https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/603a9558-0af1-2b10-86a3-c685c60071bc#rating
thansk & Regards,
Sathish
Similar Messages
-
Automatically delete row data on interactive report
Hi All,
I would like to know it's possible to automatically delete row data on interactive report when the check box is checked.
I'm appreciating if you all can share your opinion or solution.
Thanks a lot in advance!
Best regards,
LizHi,
Why you like have checkbox ?
Is it more clear for user have image/button like my example ?
This is just example you need modify according your needs. Example do not have confirmation dialog.
Page HTML header
<script>
function delIRRow(p_pk_val){
var a = new htmldb_Get(null,null,'APPLICATION_PROCESS=DELETE_ROW');
a.addParam('x01',p_pk_val);
var r=a.get();
if(!r=='1'){alert('Delete operation failed!');}else{gReport.search('SEARCH');}
</script>On Demand process DELETE_ROW
BEGIN
delete from your_table where pk_col = APEX_APPLICATION.G_x01;
htp.p('1');
EXCEPTION WHEN OTHERS THEN
htp.p('0');
END;Change your_table and pk_col according your table name and pk column name.
Call javascript from image/button (IR column link) or checkbox, and send primary key value as parametter
Br,Jari
Edited by: jarola on Jul 5, 2010 11:58 AM -
We want to set up a delta refresh from R/3 data that will pull data into two cubes. One cube I want all the records to be loaded, in the second cube I want to filter the records that are loaded into that cube. I can figure out how to load the data into two cubes, but can I place a filter on one of the loads. (i.e. only load records of where type = 'X')
Thanks,
ChrisYou can do that in the Update Rules to the second cube... In the Start Routine...
DELETE FROM DATA_PACKAGE
WHERE type EQ 'X'.
(Please, verify the right syntax)
Then with only one Infopackage, you can load both cube with different conditions.
Hope it helps.
Regards,
Luis -
How to delete selective data in a cube
Hi all,
Can any one tell me, how to delete selective data in a cube. For example if i want to delete data corresponding particular Matrial Id or particular Customer ID (say C400) ? And even deleting the data based on particular Request numer.?
Sandy.Hi,
RSMO > Infocube > Manage > contents tab > selective deletion
Then define your selections for deletions (Matrial Id or particular Customer ID (say C400)).
Request based deletions can be done directly from Request tab.
Thanks,
JituK -
How to delete aggreagetd data in a cube without deleting the Aggregates?
Hi Experts,
How to delete aggreagetd data in a cube without deleting the Aggregates?
Regards
Alok KashyapHi,
You can deactivate the aggregate. The data will be deleted but structure will remain.
If you switch off the aggregates it wont be identified by the OLAP processor. report will fetch the data directly from the cube. Switching off the aggreagte won't delete any data,but temporarly the aggregate will not be availbale as if it is not built on the info cube. No reporting is not possible on swtiched off aggregates. The definition of the aggregate is not deleted.
You can temporarily switch off an aggregate to check if you need to use it. An aggregate that is switched off is not used when a query is executed.This aggregate will be having data from the previous load's. If the aggregate is switched off means it wont be available for reporting but data can be rolled up into it.
If u deactivate the aggregates the data will be deleted from the aggregates and the aggregate structure will remain the same.
The system deletes all the data and database tables of an aggregate. The definition of the aggregate is not deleted.
Later when you need those aggregate once again you have to create it from scratch.
Hope this helps.
Thanks,
JituK -
How to delete all data in all tables in one time ?!
1 CREATE OR REPLACE PROCEDURE delete_all_data
2 IS
3 v_statement VARCHAR2 (200);
4 BEGIN
5 FOR i IN (SELECT *
6 FROM user_tables)
7 LOOP
8 v_statement :=
9 'delete table ' || i.table_name ;
10 EXECUTE IMMEDIATE v_statement;
11 END LOOP;
12 commit;
13* END;
SQL> /
Procedure created.
SQL> exec delete_all_data
BEGIN delete_all_data; END;
ERROR at line 1:
ORA-00903: invalid table name
ORA-06512: at "DE2.DELETE_ALL_DATA", line 10
ORA-06512: at line 1
I made the previous code , but it's didn't work with me .... any help for this problem please ?!
I'm just reminder ..... all what I need ,that delete all data in all tables in one time only .
I'm waiting for the answer ..... and thanks in advancecreate or replace
FUNCTION TRUNC_SCHEMA RETURN NUMBER AS
CURSOR select_table IS SELECT TABLE_NAME AS TNAME FROM USER_TABLES ORDER BY 1;
sTableName Varchar2(128);
sUser Varchar2(128);
sConstraintName Varchar2(128);
plsql_block Varchar2(512);
BEGIN
SELECT USER INTO sUser FROM DUAL;
IF ((sUser='SYSTEM') OR (sUser='SYS')) THEN
RETURN 1;
END IF;
EXECUTE IMMEDIATE 'PURGE RECYCLEBIN';
-- DISABLE table's constraints
FOR C1 IN (select CONSTRAINT_NAME, TABLE_NAME from user_constraints where STATUS = 'ENABLED' AND CONSTRAINT_TYPE in ('P','R') ORDER BY R_CONSTRAINT_NAME) LOOP
sConstraintName := C1.CONSTRAINT_NAME;
sTableName := C1.TABLE_NAME;
plsql_block := 'ALTER TABLE ' || sTableName || ' DISABLE CONSTRAINT ' || sConstraintName;
EXECUTE IMMEDIATE plsql_block ;
END LOOP;
FOR D IN select_table LOOP
--get table name
sTableName := D.TNAME;
-- clear table
plsql_block := 'TRUNCATE TABLE ' || sTableName;
EXECUTE IMMEDIATE plsql_block ;
END LOOP;
-- ENABLE table's constraints
FOR C2 IN (select CONSTRAINT_NAME, TABLE_NAME from user_constraints where STATUS = 'DISABLED' AND CONSTRAINT_TYPE in ('P','R') ORDER BY R_CONSTRAINT_NAME desc) LOOP
sConstraintName := C2.CONSTRAINT_NAME;
sTableName := C2.TABLE_NAME;
plsql_block := 'ALTER TABLE ' || sTableName || ' ENABLE CONSTRAINT ' || sConstraintName;
EXECUTE IMMEDIATE plsql_block ;
END LOOP;
RETURN 0;
EXCEPTION WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('ERROR: ' || SQLERRM);
RETURN 1;
END TRUNC_SCHEMA;
/ -
In which method i can upload data to two transactions at a time and how ?
Hi,
Can any body tell me <b>In which method i can upload datas to two transactions at a time and how</b>
Pls tell me the steps if possible.
Thanks
PrabhuduttaHi,
I hope u are talking abt BDC,
If it is BDC's Then you can use both the methods.
Call Transaction or
Session Method.
Ex ..if already a vendor exists then call transaction xk02
if vendor no is not yet created then call transaction xk01.
hope this helps.
santhosh -
Insert the data into two tables at a time.
Hi ,
i have these two tables
create table [dbo].[test1](
[test1_id] [int] identity(1,1) primary key,
[test2_id] [int] not null
create table [dbo].[test2](
[test2_id] [int] identity(1,1) primary key,
[test1_id] [int] not null
alter table [dbo].[test1]
add constraint [fk_test1_test2_id] foreign key([test2_id])
references [dbo].[test2] ([test2_id])
alter table [dbo].[test2] add constraint [fk_test2_test2_id] foreign key([test1_id])
references [dbo].[test1] ([test1_id])
I want to insert the data into two tables in one insert statement. How can i do this using T-SQL ?
Thanks in advance.You can INSERT into both tables within one Transaction but not in one statement. By the way, you would need to alter your dbo.Test1 table to allow null for first INSERT test2_id column
See sample code below:
CREATE TABLE #test1(test1_ID INT IDENTITY(1,1),test2_id INT NULL)
CREATE TABLE #test2(test2_ID INT IDENTITY(1,1),test1_ID INT)
DECLARE @Test1dentity INT
DECLARE @Test2dentity INT
BEGIN TRAN
-- Insert NULL as test2_ID value is unknown
INSERT INTO #test1(test2_ID)
SELECT NULL;
-- get inserted identity value
SET @Test1dentity = SCOPE_IDENTITY();
INSERT INTO #test2(test1_ID)
SELECT @Test1dentity;
-- get inserted identity value
SET @Test2dentity = SCOPE_IDENTITY();
-- Update test1 table
UPDATE #test1
SET test2_ID = @Test2dentity
WHERE test1_ID = @Test1dentity;
COMMIT
SELECT * FROM #test1;
SELECT * FROM #test2;
-- Drop temp tables
IF OBJECT_ID('tempdb..#test1') IS NOT NULL
BEGIN
DROP TABLE #test1
END
IF OBJECT_ID('tempdb..#test2') IS NOT NULL
BEGIN
DROP TABLE #test2
END
web: www.ronnierahman.com -
Pulling in data from two cubes in one common report in OBIEE
Hi,
We have a scenario wherein we are using Oracle OLAP Cubes as data source for reporting against OBIEE v10.1.3.3.2. The specific question that we have can be exemplified as below:
The Analytic Workspace (as created using AWM) has the following seven dimensions:
Dimension A
Dimension B
Dimension C
Dimension D
Dimension E
Dimension F
Dimension G
Based on the above dimensions, we have the following cubes:
Cube One : Dimension A, Dimension B, Dimension C, Dimension D and Dimension E
Cube Two : Dimension D, Dimension E, Dimension F, Dimension G
So essentially, we have two cubes in the same Analytic Workspace and they do have a few dimensions in common.
What we now need to know is how best to include these two cubes in the same logical model in the business and presentation layers of the OBIEE repository - this needs to be done because we want to include measures from both the cubes in a common report.
Any ideas on the implementation of this scenario are highly appreciated.
Regards,
PiyushHello Wildmight,
I am sorry for the duplicate updates - and I regret the inconvenience caused.
Here is what we are trying to achieve:
We have a Business Domain wherein two measures are of importance : M1 and M2. Also, we now know that M1 and M2 are dimensioned as below:
M1 - Dimensions A, B, C, D , E , F, G and H
M2 - Dimensions C, D , F and G
Hence, we are looking at an AW with 8 dimensions and two cubes : One for M1 with 8 dimensions and the other for M2 with 4 dimensions. Also, here comes the need to have a report wherein we can see the values of M1 and M2 in the same report and then do some calculations and analysis using both the figures at the same time. What we now need to know is how best to include these two cubes (which have 4 dimensions in common) in the same logical model in the business and presentation layers of the OBIEE repository so that we can address the reporting requirement of having values of M1 and M2 in the same report.
Any help is much appreciated.
Best Regards,
Piyush -
MDX query for to get the data from two cubes
Hi
Can you tell me how to create MDX query to get the values from two cubes. (One hierarchy from first cube and one hierarchy from second cube)
Can you give me one example.
Regards,
Madhu.
SudhanHi Sudhan,
According to your description, you want to retrieve data from two different cubes, right? The short answer is yes. To query multiple cubes from a single MDX statement use the LOOKUPCUBE function (you can't specify multiple cubes in your FROM statement).
The LOOKUPCUBE function will only work on cubes that utilize the same source database as the cube on which the MDX statement is running. For the detail information about it, please refer to the link below to see the blog.
Retrieving Data From Multiple Cubes in an MDX Query Using the Lookupcube Function
Regards,
Charlie Liao
TechNet Community Support -
Deletion of data from the cube
Hi,
In our sales cube i want to delete the raws from the cube where there is no data for invoice quantity.
Likewise in my material master i want to delete the raws without division.
Is there any permenant solution. I suppose we can write routine.Where should i write the routine ? i mean at update rule level or transfer rule level or start routine will be the best option.Which one will be faster and why ?
Regards,
Viren.Hi,
I understood, that the records are already in the cube.
Selective deletion will not work because you can't select on keyfigure values.
So create records with RECORDMODE = R (Reverse Image) for these records you want to dissappear. Get the relevant records into a flatfile, upload these records with recordmode R with all keyfigures inverted. The incorrect values will the vanish.
A Deletion with recordmode = D is not possible for cubes.
For the Material-Records:
Within the updaterules, get the relevant Materialrecords into an internal table.
(SELECT * FROM /BI0/PMAT_SALES into itab_mat_del WHERE DIVISION is inital.)
For these MasterDatarecords: check in the sid-Table, if the relevant materialnumbers are in use already (Check Flags in the sid-Table).
loop at itab_mat_del into wa_mat_del.
select single * from /BIC/SMAT_SALES where
MATERIAL = wa_mat_del-material.
if CHCKFL is initial.
if DATAFL is initial.
if INCFL is initial.
If they are not used, the can be deleted by using the function module RSDMD_DEL_MASTER_DATA.
endif.
endif.
endif.
This should be implemented within the updaterules. (Didn't I said that already??)
hth
cheers
Sven
Message was edited by: Sven Muntermann -
My Z10 automatically deletes all data anytime i restart phone
I don't know what is wrong with my Z10 since last weekend i have noticed that anytime my phone restarts all my data are deleted. I thought it was a minor problem from new Apps i dowloaded and deleted but it stills persists. So i decided to wipe my phone to factory settings and restore from a previous back up dated (02/02/2015) which i did before i upgraded to the OS 10.3.1.2243. it now got worst that i can't even restore my previous backup as my phone hence when the phone restarts after back up restore as it normally does it goes back to factory settings. I have tried following the instruction provided by Blackberry in fixing the bug in this link http://btsc.webapps.blackberry.com/btsc/viewdocument.do;jsessionid=42944EB3464C0DAD08639BF5A8C876B0?... .
yet it says "The fix is not applicable to this device". Pls i need urgent help as it is obvious the new OS 10.3 has issues, can't use my phone at all hence no contacts left
Solved!
Go to Solution.No problem bro. Just click on like and accept as solution so that this trend ll be published for others to use it and fix the phone . Cheers
-
Retriving data from two tables at a time.
Please use this forum to provide feedback about OTN content/services. All other posts will be DELETED.
hi all,
Am using win98 and Oracle 7.
I have splitted a table into two tables having 10 and 9 fields respectively and records of 2000.Now in form builder I have put both tables in same block and on same canvas.
Now when I execute a query I retrieve records of 1st table and can navigate through records of 1st table only .To retrive records of 2nd table I have to put curser in 2nd table and query again for data retrival from 2nd table.This is bothering me to match coulmn of both tables.
Is there any way to execute the records of both tables at a time, so that matching coulmns of both tables would become easy to reach.
Thanks and Regardsheeeey mohammad
you have first to make master/detail block not one block only
then jion between them as pk and fk -
Deletion of Data in Inventory Cube -Effect of Marker
Hi,
We would like to delete some OLD data from our Inventory cube,Will it effect the Marker.If yes, how and is there any way out where we can find out where the marker has been set i.e upto what request or to which date,any table which stores the marker update or method by which we will come to know as to where the marker is set.Suggest apart from running the Report which has non cumulative KFs.
Scenerio.
I have loaded data for 4 month,(say Jan,Feb,March and April ) in Inventory cube,say each month one request so 4 requests all together. I will compress all three OLD requests (for Jan ,Feb and March) which r OLD and I keep the latest uncompressed (April). The compression happens with Marker update only(Without the Check).we are running the report to check the change in values.
Suppose if I delete data of Feb, Will my Marker get Effected ???
Rgds
SVUHi SVU123,
We would like to delete some OLD data from our Inventory cube.
Will it effect the Marker.If yes, how and is there any way out where we can find out where the marker has been set i.e upto what request or to which date,any table which stores the marker update or method by which we will come to know as to where the marker is set.Suggest apart from running the Report which has non cumulative KFs.
I think, this you can check in /BI0/L0IC_C03. For each plant/material (validity determining characteristic) you will have two record maintained in this table. The record with request SID = 1 will tell you when the marker was last updated for that plant/material.
I think, all the marker values are stored as reciept cumulative key figures with 0CALDAY as 31/12/9999. Check, if this is the case in List cube/ Efact table(not sure on Efact table though).
Deletion should not disturb the marker value if the restriction of material and 0CALDAY is given.
This will avoid deletion of the marker value, which I assume is stored in 31/12/9999.
Also, ensure that you are not deleting the values which have not been used in Marker calculation,(dates greater than dates when the marker was last compressed
Suggest you to check the whole deltion in Quality or make a copy cube in production and work on repairiing it.
Scenerio.
I have loaded data for 4 month,(say Jan,Feb,March and April ) in Inventory cube,say each month one request so 4 requests all together. I will compress all three OLD requests (for Jan ,Feb and March) which r OLD and I keep the latest uncompressed (April). The compression happens with Marker update only(Without the Check).we are running the report to check the change in values.
Suppose if I delete data of Feb, Will my Marker get Effected ???
I think, it shouldn't. But I suggest you to try this before..
Hope this helps,
Best regards,
Sunmit. -
How can i Delete the data from three tables at a time using same key.
I am New to Oracle ADF, I have a Requirement Like these, I have three tables like Employee,Salaries,Teams all of these are having one common EmpNo as common attribute, I have Search form these will return the all the employees related to that search query, when i click on Delete button the particular employe Data should delete from all the three tables based on the EmpNo.
Any Help is appreciable..1) The easiest way is to mark the foreign key constraints from SALARIES to EMPLOYEES and from TEAMS to EMPLOYEES as ON DELETE CASCADE. The DB server will then delete the necessary rows whenever you delete an employee row.
2) Another way is to implement a Before-Delete-Row DB trigger on the EMPLOYEES table where you can delete the related rows in the other tables (have in mind, that if you have foreign keys you may get a Mutating Table Exception, so this approach might be not very good).
3) An ADF way is to implement a custom EntityImpl class for the Employee entity and to override the remove() method where you can lookup the related TeamMember and Salary entities (through EntityAssoc accessors) and invoke their remove() methods too.
4) Another ADF way is to implement a custom EntityImpl class for the Employee entity and to override the doDML() method where you can delete the necessary rows in SALARIES and TEAMS tables through JDBC calls whenever a DELETE operation is being performed on the underlying Employee entity.
Dimitar
Maybe you are looking for
-
Mac Pro with Wake on Demand enabled wakes up but never goes to sleep again
Hey, i was using Wake on Lan since OS 10.5 Leopard for waking my Mac up with a Magic Packet. Since 10.6 this brilliant feature was removed and replaced by "wake on demand" wich lets your computer wake up every 2 hours for a few seconds (very ultra an
-
DreamWeaver Template - How to remove a border?
Hi Folks, I'm a newbie here. I decided to use a dreamweaver template to start my website. I want to remove the border of the template...as well as to make the Left and Right hand side "margins" the same background color as the webpage... can anyone
-
Populating the values in a form
Hi all, I have a form there I have a single selct dropdown list when i select an option from the available values the other fields should automatically reloaded to the corresponding values. Can any one plz give a solution for this. Thanks in advance.
-
Hi experts, I got an issue regarding po's output message related one here is issue : In my production system some messages(NEU) type are deleted manually (in me22n). next day to the same PO's NEU type message is sent to vendor with out physical trig
-
Itunes keep shutting down after opening
I have uninstalled iTunes and reinstalled and still after I open it and it is "Matching" with iTunes Store and boom it comes up with iTunes not responding and shuts me down. Where do I go from here? It is a Microsoft Windows box and it says "iTunes