Delete fact table

Dear Experts:
This is Zehua who is new here.
when I check some old program of our project, I found an interesting thing.
There is a program generated from T-CODE: 'DELETE_FACTS'.
The program name was inputted manually:'ZTEST_DELETE_FACTS'
In the program, i can see below source code at the end part.
CALL FUNCTION 'RSDRD_BUILD_REPORT_FOR_BATCH'
      EXPORTING
        I_REPID           = 'GP1T5KLHUF5VOCCZQ4IY5CO6XPG'
The funny thing is, when I type the REPID in T-CODE:'SE38', I found it is also a program.
And source code is as below.
REPORT GP1T5KLHUF5VOCCZQ4IY5CO6XPG .
TYPE-POOLS: RSDRD, RSDQ, RSSG.
DATA:
  L_UID       TYPE RSSG_UNI_IDC25,
  L_T_MSG     TYPE RS_T_MSG,
  L_THX_SEL   TYPE RSDRD_THX_SEL.
  L_UID = '84EMQ3J91RXWJIWROHA3VHWHG'.
  IMPORT I_THX_SEL TO L_THX_SEL
    FROM DATABASE RSDRBATCHPARA(DE) ID L_UID.
  DELETE FROM DATABASE RSDRBATCHPARA(DE) ID L_UID.
  CALL FUNCTION 'RSDRD_SEL_DELETION'
       EXPORTING
            I_DATATARGET      = 'ZUMA0196'
            I_THX_SEL         = L_THX_SEL
            I_AUTHORITY_CHECK = 'X'
            I_THRESHOLD       = '1.0000E-01'
            I_MODE            = 'C'
            I_NO_LOGGING      = ''
            I_PARALLEL_DEGREE = 1
            I_NO_COMMIT       = ''
       CHANGING
            C_T_MSG             = L_T_MSG.
  export l_t_msg to memory id sy-repid.
  UPDATE RSDRBATCHREP
    SET  DELETEABLE = 'X'
    WHERE REPID = 'GP1T5KLHUF5VOCCZQ4IY5CO6XPG'.
It seems that the code is automatically generated by system.
Could anyone tell me via which T-CODE or how can I get this program?
Hope I am clear enough.
Thanks in advance.

Hi,
Tcode 'DELETE_FACTS' , will genarete G* programs, which are generated by system, so it won't work even you copy the Code.
Note: After Code genaration you can find it in SE38 (you copy the name of the program once you execute it in 'DELETE_FACTS'), then put it in PC and do the delation of data in Cube or you can use the same program in SE38 also.
Thanks
Reddy

Similar Messages

  • Procedure to delete Fact Table

    Hi All,
    If I have to rerun my fact table the same day, more than once a day, and if there were rows in it already, I want to delete those rows and reload the fact with current date. I want to create a procedure and include it in the package, the procedure should check for the current_timestamp and if any rows with the that date and if there were any then it should delete it. Please let me know how I can do this. I am running SQL Server - 2008.
    Thanks for your time and help.

    You should have to date in your primary key (ex : in a varchar format like YYYYMMDD).
    Then you have 2 ways to implement it :
    * create an ODI procedure that will delete all data where this date = today. Run this procedure before your interface.
    * or modify your IKM : add a step that will delete the data in the target table where date = today.

  • How can we delete the data in e-fact table.

    how can we delete the data in e-fact table.

    hii,
    You cannot delete the request individually but you can one of the following:
    1. Do a selective deletion from the cube. RSA1 -> Cube -> Contents -> selective deletion.
    2. Delete all the data in the cube and then reconstruct only the required request ids. This would work only if you have the PSA available for all the requests.
    3. Reverse posting is another possibility.
    hope it helps,
    partha

  • Delete Fact and Dimension Tables

    Hai All,
              Small question! When deleting data from info cube, it asks whether to delete just Dimension table or both fact and Dimension tables.
    What is the difference between these two?
    Thank you.

    Hi Visu,
    The dimension table will contain the references to char value by way of SID and DIM ids, whereas the fact table will contain the number (of key figures). If you delete just the Fact table, the numbers go away, yet the DIM ids remain intact, so reload is faster. But if you are convinced that this data is not correct either, or you want a clean slate to strat reload again, then delete both Fact and Dim tables. Then when you reload, the DIM ids will be created again.
    Hope this helps...

  • How do you handle update and delete rules for fact tables?

    I have a fact table with a composite key of 5 columns. Two of the columns are FKs to the date dimension. I was setting the delete/update rules for the FK relationship in SSMS and it had a problem with me creating cascade action on the FKs that connected
    to the date dimension.
    What is the proper way to set up FK relationships in fact tables with SSMS when  you have composite keys as most fact tables do?

    Yeah I understand all that. What I'm trying to do is to protect my database from RI violations that occur by production support people blowing away stuff in a dimension table but forgetting to blow away related records in the fact table. I want those fact
    records deleted automatically so we don't have orphan records which was a real issue at a previous engagement. Production support is usually just people that know SQL and some relational modeling. It's not too likely they will understand the details of dimensional
    modeling enough such that they would know that they had to blow away the fact record first.
    My problem is I have a FK to a role playing dimension (the date dimension in this case). So basically I have to columns in the fact table that have a FK relationship to the PK of the date dimension. When I create both relationships SSMS and try to have both
    of them cascade delete SSMS has an issue with it.
    The error I get is:
    Unable to create relationship '[relationship name]'
    Introducing Foreign Key constraint '[constraint name]' on table '[table name]' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other foreign key constraints.
    I can go ahead and put no action and the table will save fine. The question now becomes how does the cascade delete actually work. Can I just set one part of the key to cascade delete?
    Actually I just realized that this is an even bigger design issue. What DOES happen to a fact record when one of it's dimensions gets deleted and I've got full RI set up on the table?
    Or am I totally thinking about this wrong. Do you set up cascade deletes in a dimensional model? Is there a way to prevent deletes from the dimension table if there are related fact records?

  • Delete only the Fact table using process chain?

    Hi Experts,
    I have an issue,where i have to delete the contents of the Infocube.So when i drag the Process type "Delete Contents of the Data target" into the process chain.I Am able to delete the contents of the cube.
    But in my case i need to delete only the FACT table and not the DIMENSION table.The system does prompt a message to delete FACT only /FACT & DIM TAbles.
    Please advice if its possible to Delete the FACT table only using process chains
    thanks in advance

    Hi ,
    check this link ..
    http://help.sap.com/saphelp_nw04/helpdata/en/80/1a6473e07211d2acb80000e829fbfe/content.htm
    Regards,
    Shikha

  • Parent member values in Fact tables

    Hello,
    I want to understand something, as far as I know, we can only send data to base level members, right ?
    Then how come we find rows of data that have parent member values in the Fact tables ? (assuming we do not play manually with the database of course), I thought that this can be due to an import with the data manager, can this be right ?

    nilanjan chatterjee wrote:
    Hi,
    >
    > The data for the parent members should be available in the SQL tables.
    > For example, 2011.TOTAL is parent member. You should not have any data for this member in your database. If it is there, it might have come somehow (may be an import). But this is not right. You might want to remove these records. But be sure that you dont delete the records for the base level members.
    >
    > Hope this helps.
    I guess you meant should not, right ?

  • No Message: Write to Fact table.

    Hi ALL,
    Source: ECC 6
    Target: BI 7.3
    We are Transferring 2LIS_13_VDITM Datasource---->> 0SD_CO3 Infocube .
    After Data Replication ,
    1. Data Transferred to PSA .
    2. During Transformation Creation Manuel Mapping is performed . Activated .
    3. During DTP Creation Only Following Warning Messages Occur , Status s not Transferred to Green .
    Data is not coming Cube , No Error Messages. (Totally 29000 Records have to transfer to BI Cube)
    Warning Messages are,
    1.No Message: Write to Fact table.
    2.No Message:Infocube Update Completed .
    What is the Problem?

    Hi,
    Have you set the Industroy sector before uploading the set up tables?
    For more information refer the note: 353042
    Summary
    Symptom
    Fields BWGEO, BWGEOO, BWGVP, BWGVO, BWNETWR, BWMNG, etc. of DataSources 2LIS_02_SCL, 2LIS_02_ITM, 2LIS_03_BF, 2LIS_03_UM, 2LIS_40_REVAL are not filled.
    This may lead to the following:
    The system does not perform any update into an InfoCube (for example: 0RT_C*, 0PUR_C01, 0CP_PURC1 and so on), even though data arrives in BW.
    This occurs with the following InfoSources:
    2LIS_02_SCL, 2LIS_02_ITM
    2LIS_03_BF, 2LIS_03_UM
    2LIS_40_REVAL
    With some restriction, this symptom also occurs with the following InfoSources if they are used in connection with retail or consumer products. (InfoCube: 0RT_* or 0CP_* ).
    2LIS_11_VAITM, 2LIS_12_VCITM, 2LIS_13_VDITM
    Other terms
    0PROCESSKEY, PROCESSKEY, 0RT_C01, 0RT_C02, 0RT_C03, 0RT_C04, BWBRTWR, BWGEO, BWGEOO, BWGVP, BWGVO, BWNETWR, BWMNG
    Reason and Prerequisites
    The process key (0PROCESSKEY and 0BWAPPLNM) of the InfoSources has not been filled. As a result, no key figures are updated because of the update routine of the participating InfoCube and along with it no records are inserted into the InfoCube. In each update routine, the system checks the content of the PROCESSKEY. If this field has no contents, then no data is written into the InfoCube because of the IF condition in the update rules.
    Solution
    So that you can work in the above mentioned InfoSources, you MUST activate the determination of the process key. This is done with the help of Transaction MCB_ which you can find in the OLTP IMG for BW (Transaction SBIW) in your attached R/3 source system.
    Here you can choose your industry sector. 'Standard' and 'Consumer products' are for R/3 standard customers, whereas 'Retail' is intended for customers with R/3 Retail only.
    You can display the characteristics of the process key (R/3 field BWVORG, BW field 0PROCESSKEY) by using Transaction MCB0.
    If you have already set up historical data (for example for testing purposes) by using the setup transactions (Statistical Setup Programs) (for example: Purchasing: Tx OLI3BW, material movements: OLI1BW) into the provided setup tables (for example: MC02M_0SCLSETUP, MC03BF0SETUP), you unfortunately have to delete this data (Tx LBWG). After you have chosen the industry sector by using  MCB_, perform the setup again, so that the system fills a valid transaction key for each data record generated. Then load this data into your connected BW by using 'Full update' or 'Initialization of the delta process'. Check, whether the system updates data into the involved InfoCubes now.
    If all this is not successful, please see Note 315880, and set the application indicator 'BW' to active using Transaction 'BF11'.
    Related notes:
    157317 --> You MUST make sure that this note is relevant for you.
    352344 -> Process key + reversals in Inventory Management
              (Consulting note).
    Regards,
    Anil Kumar Sharma .P

  • Fact Table index vs BIA Index

    BIA gurus..
    Prior to our BIA implementation we had the drop and rebuild index process variants in our process chains.
    Now after the BIA implementation we have the BIA index roll-up process variant included in the process chain.
    Is it still required to have the drop and rebuilt index process variants during data load ?
    Do the infocube fact table indexes ever get hit after the BIA implementation ?
    Thanks,
    Ajay Pathak.

    I think you still need the delete/create Index variants as it not only helps in query performance but also speeds up the load to your cubes.
    Documentation in Perfomance tab:
    "Indices can be deleted before the load process and after the loading is finished be recreated. This accelerates the data loading. However, simultaneous read processes to a cube are negatively influenced: they slow down dramatically. Therefore, this method should only be used if no read processes take place during the data loading."
    More details at:
    [http://help.sap.com/saphelp_nw70/helpdata/EN/80/1a6473e07211d2acb80000e829fbfe/frameset.htm]

  • Dimension Table Larger Than Fact Table

    Hi,
    I need a solution to deal with a situation in my project. The master data for the Business Partner is close to 20 Mil and growing. The overall records in the fact table is only 1.5 to 2 Mil.
    I am looking for suggestions that can help me in designing a optimal data model which does not hinder the reporting performance. Reporting with 20 Mil records in Dimension and 10 times less data in the fact table is not common occurance. I guess this is a scenario that the retail Industries would have experinced due to the huge customer base.
    P.S: Segregation of the dimension is something that will not help. And its currently a line item dimension. So any thoughts apart from these will be highly appreciative.
    Thanks!
    Sajan R

    Hi Sajan Rajagopal ,
    I think u need to just go through the dimensions u had created so trat u can delete unnecessary infoobjects assigned to tat dimension and can build a dimension whcih has only those of master data.
    For Ex...for the material master when we checked we had huge amount of data more than ur's so we had made diffenet dimenons for material and batch and then we had tried to load the data for tat dimensions and it was working fine and also data loads also getting loaded fine..
    Please check ur dimensions once so tat required ones are defined correctly in the dimensions

  • Fact tables in Infocube

    How many tables Exact Contain in Info cube?
    Please search the forum
    Edited by: Pravender on Sep 16, 2011 12:31 AM

    Hi Mahesh,
    For Basis InfoCubes in SAP BW, there are two fact tables for
    including transaction data: The F and the E fact table.
    Unlike the E fact table, the F fact table contains the information
    about the request from where the transaction data originates
    When loading data (when receiving requests), the system writes data
    into the F fact table.
    During "compression", the system summarizes data from different
    requests and writes it to the E fact table.
    To ensure good reporting performance, it is important that you only
    keep data from a few requests in the F fact table, which means that you
    should compress requests as soon as possible.
    Also bear in mind that deleting transaction data according to the
    request is only possible from the F fact table, as only this table
    contains the information regarding which data belongs to which
    request.
    You should therefore compress a request as soon as you are certain
    that the data loaded is correct. When you install BW on an ORACLE database, BITMAP indexes are created on the fact tables to improve the reporting performance of the system
    And yes try to search on help.sap, there is plenty of information.
    Regards
    Sunny

  • Few dimension values used in FACT tables.

    Hello all,
    We are trying to know if somebody faced this issue earlier. We have dimension tables containing 5 million records, but the fact table uses hardly 30k of these dimension values. The fact table contains 350 million records, so is there any way to improve the performance of the query in such a scenario, where hardly 20% of dimension values are actually used by the FACT tables.
    Thanks and Regards,
    Upendra

    nilanjan chatterjee wrote:
    Hi,
    >
    > The data for the parent members should be available in the SQL tables.
    > For example, 2011.TOTAL is parent member. You should not have any data for this member in your database. If it is there, it might have come somehow (may be an import). But this is not right. You might want to remove these records. But be sure that you dont delete the records for the base level members.
    >
    > Hope this helps.
    I guess you meant should not, right ?

  • Load data in a fact table

    Hello,
    I have implemented SCD2 dimension and mapping executing works fine.
    Now I have question about loading data in a fact table.
    How do I need to use OWB (maybe JOINER operator - Join condition - between dimensions and source table) in case of:
    - update on source table
    - delete on source table
    I think the most simple is insert on source table. It is probably to_char(source_transaction_date,'dd.mm.yyyy') = to_char(sysdate,'dd.mm.yyyy'), if I load once a day..
    What is the procedure for fact table mapping to handle updates and deletes on source table?
    Regards

    Some discussions in previous forums should help you
    http://forums.sdn.sap.com/thread.jspa?threadID=2019448
    http://forums.sdn.sap.com/thread.jspa?threadID=1908902
    In the SAP tutorial, you can see a sample example of making fact tables.
    http://help.sap.com/businessobject/product_guides/boexir32SP1/en/xi321_ds_tutorial_en.pdf
    Arun

  • How to query on multiple fact tables ?

    Hello all,
    I know this is a recurring subject around here. I have read various topics and tried many thing but I couldn't reach my goal :
    I want to query a BMM with 6 fact tables that all have common dimensions.
    For instance, I have Invoices facts, Stocks facts, and a common SpareParts dimension.I am currently using a prewiew of my target BMM, which contains only these 2 fact tables and this single dimension. They are joined both at physical and logical level.
    I'd like to build a report showing for a given spare part both stock and invoice information, but Answers replies it can't link Stocks with Invoices (even when I use the spare part dimension in the report).
    * I can't afford to put both fact data in a single table as I'm most likely to report on the 4 other fact tables the same way.
    * I can't either alias my dimension table, as I'd like :
    - to avoid having 6 spare part dimensions for my 6 fact table (imagine the user's face in front of that)
    - to have the filter on a spare part filtering on both tables at once (as I talk about the same spare part on both sides)
    Unless you tell me I can create an alias and then say somewhere it's actually the same dimension...
    * A colleague tried to alias the dimension and then build a 1-1 join between the dimension and its alias, but it didn't work.
    * I have tried to build a hierarchy for the spare parts with all the fact data at the lowest level, but it didn't do. I guess hierarchies are not intended to be used that way.
    * I have tried the bridge table to link the two fact tables but i get a circular path. Furthermore, as the fact tables then turn to dimensions, I'm pretty sure my aggregates won't work... I guess bridge tables are not intended to be used that way.
    * I have tried singing, dancing, jumping and bouncing around my desktop but all I got was rain.
    Can anybody catch me before I jump across the window ? I wouldn't like to get wet...
    Many thanks in advance.
    Ced.

    Hi,
    unfortunately, this purpose-built datamart was built within the company RPD. It has been deleted since then. These are the two reasons why I can't post it.
    My advice is to take the time to read the help about how to build logical tables in the Administrator tool.
    Here's a quick walkthrough:
    - create your logical tables and join them in the business model diagram
    - create dimensions (hierarchies) for all your dimension tables with at least a total level and a detail level. Thins can be done automatically by right-clicking the dimension table and selecting "Create Dimension"
    - in the dimension tables, select the source table (in the source subfolder of the dimension table) and edit its properties : in the properties dialog box, select the content tab and in front of the dimension name, select the lowest (or apropriate) logical level
    - in some complex BM (logical levels), it might also be necessary to apply similar settings to the fact table: This time, when you edit a fact table source, you will see the list of all dimensions available in the contents tab. There, for each dimension your fact table is related to, you will select the apropriate dimension level. if there isn't any join between you fact table and a given dimension, leave the logical level blank.
    I hope this helps.
    Ced.

  • Problems with Fact Table in an Infocube

    In IC 0CCA_C11 we've seen almost a 50% increase in the row count on the F fact table from about 100 million rows to about 150 million rows.   However we are very certain that we really havent had that much growth.
    We have a process chain that does a full load of 12 million rows to the cube and then deletes the previous full load.  Because this PC is conflicting with a more important PC that loads to the cube, we've been cancelling the step in the PC and manually deleting the previous request out of the cube via the IC "Manage" screen.
    Is it possible that what we've been doing has been leaving rows in the cube that we thought were deleted? 
    If so, is there an Analysis and Repair function in RSRV that will get rid of all these extra rows?
    There's no way this cube could have truly grown by 50 million rows in 2 weeks!

    Wardell,
    Check the data in RSA3 for the extractor that you use to bring data .
    You must be using the data source 0CO_OM_CCA_09. Check the data and reconcile and you will get it.
    Let me know if you need anything else.
    Thanks
    Ravi Thothadri
    [email protected]

Maybe you are looking for

  • How can I use a dll if I dont have a header file

    I'm not sure if I'm even trying the possible here as I have searched and not been able to find much at all.  However I figured it was worth asking here. I have access to several dll's used by a program, I need to open a file using the program (for so

  • Easy way how to convert deep structure to XML

    Hi, is there any easy way how to convert a complex deep structure to XML. I have XSLT transformation ready for using, but when I look on examples on using CALL TRANSFORMATION, I am finding only examples for internal tables. Something like this CALL T

  • DIY film scanning

    I'm editing my documentary in FCPX using an SD 16mm transfer which was fine for editing, but now I want to re-transfer the footage in HD, 1080p,  I have more time than money and I've been looking into the DIY solution of scanning sections of the 16mm

  • Question about stacks

    i've been with aperture since 1.0 so forgive my ignorance on this. I vaguely remember pre 2 that with stack you could do a search (either keyword, star, or whatever) and it would list all the photos that match that and the one in stacks you could ope

  • Extra task instruction email sent when task is claimed from group que

    Jasmin or whoever can help, Task instruction and reminder emails are sent correctly to my group members but when someone claims a task from the group que they get another task instruction email as soon as it hits their personal que. Is this a bug or