Selective Deletion of Infocube data

BW experts,
I have a scenario where in "rough" data already stored in an InfoCube will be replaced by a more "intelligent" data from another source. The deletion/replacement of data should happen without manual intervention (cause flat file data files arrive at a schedule time and should be loaded "automatically"into the cube) What are my options here? I currently know that it is possible to delete infocube contents using function module 'RSDRD_SEL_DELETION' (perhaps do it in the Update Rule).
1) Is there another way (more "SAP Standard" or more "intelligent")?  I need to delete based on characteristics  that can be found in the file (e.g. the file has data for 0MATERIAL, 0CALWEEK).
2) What are the "watch outs" for using function module 'RSDRD_SEL_DELETION'?
Please advise.
Thank you very much.

Hello Emmanuel,
   In ABAP programe Just used the Infocube Name and the selection condition on what basis you want to delete.
See Below the code.
*add the fiscper selection in L_THX_SEL table for seletion of data
CLEAR L_SX_SEL.
  L_SX_SEL-IOBJNM = '0FISCPER'.
    CLEAR L_S_RANGE.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPTION = 'EQ'.
    L_S_RANGE-LOW = TFISCPER.  "yr data.
*--this is imortant otherwise data wil not delete
    L_S_RANGE-KEYFL = RS_C_TRUE.
    APPEND L_S_RANGE TO L_SX_SEL-T_RANGE.
  INSERT L_SX_SEL INTO TABLE L_THX_SEL.
**get the selection for company
  CLEAR L_SX_SEL.
  L_SX_SEL-IOBJNM = '0COMPANY'.
    CLEAR L_S_RANGE.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPTION = 'EQ'.
    L_S_RANGE-LOW = VARIANT.
*--this is imortant otherwise data wil not delete
    L_S_RANGE-KEYFL = RS_C_TRUE.
    APPEND L_S_RANGE TO L_SX_SEL-T_RANGE.
  INSERT L_SX_SEL INTO TABLE L_THX_SEL.
*function module for selective deletion..
CALL FUNCTION 'RSDRD_SEL_DELETION'
  EXPORTING
    I_DATATARGET              = 'IFIBIV'
    I_THX_SEL                 =  L_THX_SEL
  I_DEL_ACTIV               = RS_C_TRUE
  I_DEL_UPDATE              = RS_C_FALSE
  I_DEL_CHANGE              = RS_C_FALSE
  I_AUTHORITY_CHECK         = RS_C_TRUE
  I_MODE                    = RSDRD_C_MODE-CHOOSE
  I_THRESHOLD               = '0.1'
  I_PARALLEL_DEGREE         = 1
  I_NO_LOGGING              = RS_C_FALSE
  I_NO_COMMIT               = RS_C_FALSE
  I_NO_ENQUEUE              = RS_C_FALSE
  I_SHOW_REPORT             = RS_C_FALSE
  I_TRANSACTIONAL_ODS       = RS_C_FALSE
  CHANGING
    C_T_MSG                   =  L_T_MSG
EXCEPTIONS
  X_MESSAGE                 = 1
  INHERITED_ERROR           = 2
  INVALID_TYPE              = 3
  OTHERS                    = 4
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Hope This will help.
In Start Routine there is no disadvantage to delete the data from data package.
But it depened on the scenario and requirement.
Regards
Gopal

Similar Messages

  • Help please: Selective Deletion of Infocube data (Sales)

    Dear Experts
    Am working on a BW 3.5 server
    I have been referring to the below SDN posting
    <u>Selective Deletion of Infocube data</u>
    My scenario is like this..
    My Sales data infocube has multiple records with the
    same Delivery number and Bill of Lading number
    (same material number also).
    Some of these records are having "Created" status
    others are with "Cancelled" status.
    Requirement is to retain latest record based on Billing date
    after deleting previous records
    having same Delivery number and Bill of Lading number.
    Kindly advice a best practice solution.
    warm Regards,
    AbyJ
    ============

    Hi,
    I think selective deletion won't be the right solution to your problem.
    I would suggest to build up a second cube as a 1:1 copy of your sales cube.
    Build a transformation or update rule from your old to your new cube. In the startroutine you can now easily retain latest record based on Billing date
    after deleting previous records having same Delivery number and Bill of Lading number by sorting your data package according to this fields. After you have checked it in the new cube, you can either leave that and build the reporting on this cube if possible or in a second step you have to delete data in your old cube and then reload your new cube completely in your old cube. Build a transformation or update rule, easy 1:1 relations and reload data.
    An issue for this approach can be the number of records in your sales cube.
    Regards,
    Juergen

  • Selective deletion and plan data

    Hello Gurus,
    I am having some doubts
    Any one of  them,could you please  clarify my doubts.
    1.By using the selective deletion (for Infocube),I have deleted some records.
    when i checked it on the log,In Deletion mode its showing the different values such as D,N and R....
    When I deleted the records,it has created 2 requests in log .
    onething its showing the status as 'N' and another thing as 'R'
    What is this mean.why its differing by requests.
    2.Reg plan data,How we are getting this plan data.(I know,based on actual data we are creating),But what is the procedure,how and  where we are creating this plan data like R/3 or BW.
    Will assign points.
    Thanks in advance
    Brgds
    Kumar

    Hi,
    As far as plan data is concern, there would be various plan data requirements for an org. let's say 'sales budget' / 'Production Planning' / 'Procurement plan' /
    'inventory status'..and so on so forth..
    basically when ever there is plan data requirement normaly the concern department has to prepare the paln data for the quater/Half/fiscal year, on either
    a legacy system or R/3 system..
    If it is from R/3 you are suppose to create a DS and then an infosource and so on..
    If it is a Legacy system - then go for the File Upload, after making your flat file
    infosource.
    Hope this helps..
    assign points if useful..
    cheers,
    Pattan.

  • Selective Deletion from Infocube Only (Not from Aggregates)

    Hi,
    For the Selective Deletion, i used the FM 'RSDRD_SEL_DELETION' in program. But this FM deletes the data first from Infocube then from aggregate.Because of this, deletion took more time to delete and adjust the Aggregate.
    I need an way in which i can delete the data from Infocube only and after i reach to my reconcile period then i will deactivate and actiavted the aggregate, so the data will be consistent in Infocube and aggregate.
    is there any to Delete(Selective Deletion) the data only from the Infocube not from its aggregate (for the Performance Point of View)?
    Thanks in Advance.
    Regards,
    Himanshu.

    Hi
    You can try manual selective deletion which will delete data from cube only. check out the below thread.
    steps fro selective deletion for cubes and ODS
    If you want to delete data from FM only, then try to deactivate your aggregates before you start your selective deletion.
    Once deletion is done, you can reload the aggregates
    Regards,
    Venkatesh

  • Selective Deletion using 0REQUID & Date fields in combination

    We are running SAP NetWeaver 2004s patch 15 I have tried to run a selective deletion with request ID and date fields but we are getting an SQL error.  The cube is compressed but the requests I am after have not been compressed.  Is this an activity I should be able to do?  I have checked SAP messages and found one but it was for version much older than ours  below is the error message I recieve in the Job Log.
    Job started
    Step 001 started (program RSINDEX1, variant &0000000000098, user ID BROWNAW)
    SQL: 2010/12/16 15:06:21
    CREATE TABLE "/BI0/0100000703" (DIMID INTEGER
    NOT NULL) IN CMC#BTAB
    SQL-END: 2010/12/16 15:06:21 00:00:00
    SQL: 2010/12/16 15:06:21
    insert into "/BI0/0100000703" SELECT DISTINCT
    DIMID FROM "/BIC/DZFIGL_STGP" WHERE (
    "DIM"."SID_0REQUID" =  109126
    SQL Error: SQL0206N  "DIM.SID_0REQUID" is not valid in the co ntext where it is used
    SQL-END: 2010/12/16 15:06:21 00:00:00
    System error: CREATE_TABLE_AS_SELECT/RSDU_EXEC_SQL /BI0/0100000703 206-
    Job cancelled after system exception ERROR_MESSAGE

    Thanks for the quick response.  I have validated that the data ranges do exist for the requests.  Part of our process is to use the same selection to output the data before the deletion is ran so we can validate the number of records that are purged and have a backup of the data in case another issue is discovered at a later date. 
    When I run this seleciton for output I get over 30k records.  Unfortunately I cannot just blow away the requests as most contain data that needs to remain.  As well as we use this as a source for delta records that come from multiple sources so the logistics of resetting the delta indicator on the requests and not screwing up other delta's is a big risk.  If I should be able to run a selective deletion with request I am hoping SAP can respond with a fix to the issue.

  • Selective deletion in master data

    Hi all,
    I m unableto delete a particular employee from the 0EMPLOYEE master data.Please help me on this
    Thanks,
    Mahee

    hi Mahee,
    you can't delete master data if it's used in infoprovider(ods/cube), you can check this with
    rsa1->infoobject->choose the characteristic->'master data maintenance', select the row for that characteristic value, and button 'delete' (trash icon) and 'save', you will get a message 'master data cannot be deleted'.
    transaction slg1, object RSDMD, subobject MD_DEL, and execute, in next screen double click the top node, you will see the log, message text in below panel, e.g 'master data xyz(SID xxxxx) is used in /.../...'
    xyz = characteristic value
    /.../... = table name, can be dimension table of infocube, e.g /bic/d[infocubename]x, then you know which data target used the value
    How to see where all the master data is being used
    hope this helps.

  • How to do a infocube selective deletion in a process chain ?

    Hi all,
    I encounter a little diffculty : I have a process chain that allow me to load daily R/3 datas into a BW/APO infocube, that works perfectly. The problem is that the volume of datas naturally keeps on growing, so I'd want to create a new step in the process chain, that would allow to make selective deletion in the cube.
    For example, after every data loading in the infocube, datas of the cube that are dating of more than x days  should be removed. I just can't find a process that allows me to do that, but only"complete deletion of data target contents", or "delete overlapping requests from infocube".
    I'm quite sure there's an easy way to do that but.... Anyone go an idea please ?
    Many thanks !
    Fabrice

    Hi Fabrice,
                          To my knowledge, there is no standard process type in process chian that can do this. You can include a program that can delete the old records. I am sure it is a simple login in it. You can do selective deletion in infocube manually but I wish we have a variant that can be created at this screen and refer in a process type. But at this time, I see only the program as solution.

  • How to go for selective deletion if the request is rolled up???.. URGENT!!!

    hi all,
    we a have a data target which was compressed and rolled up...
    please do suggest us how to go for selective deletion  if the data target was rolled up???
    on what basis we need to do the selective deletion ??
    thanks for ur understanding...
    suggestions would be highly rewarded
    regards
    Prince

    Hi,
    in the subsequent datatargets of your ODS:
    if the requests are only rolled up, then you can delete those requests; now if your aggregates are collapsed then you'll have to dactivate them and reactivate them after. If not you can simply delete them.
    then delete all the requests from your ODS up to the request right after the missing one. This will deactivate you ODS delta init. This is not a problem since when you'll have finished with the above your ODS and subsequent targets will have a consistent status in terms of data.
    Reinit your ODS delta without datatransfer, reconstruct your missing request and the subsequent requests in your ODS.
    Reactivate them (not all together as a single activation, but separately).
    Then load the delta into your subsequent targets.
    Now if the subsequent datatargets are collapsed then you'll have to either reinit with full load or selective delete them. the missing request in your ODS still must be reloaded before!
    If you go for selective deletion you'll have to find the right selection criteria based on the data of your ODS. For instance if you can ensure that only a selected period is incorrect (all the ODS requests from the missing one to the last only contain data for JAN08) then you can selectively delete JAN08 from your subseq targets and perform a FULL load selecting JAN08 from your ODS.
    Then perform an INIT without data transfer... you can then continue your deltas as usual....
    hope this helps....
    Olivier.

  • Selective deletion job taking very long time

    Hi All,
    I am performing the selective deletion on cube for the year 2011 and the deletion job is running for a long time (14 hrs). Generally this job takes few mins to execute.
    Could you please provide your inputs?
    Regards,
    Venkat
    Job log overview for job:    BI_INDX4OSEBBLUUTR6KUTWHGHZLY5ID / 13193500
    ime     Message text                                                                 Message class Message no.
    3:19:35 Job started                                                                       00           516
    3:19:36 Step 001 started (program RSINDEX1, variant &0000000000718, user ID ECW7752)      00           550
    3:32:48 SQL: 26.02.2012 13:32:48 ECW7752                                                 DBMAN         099
    3:32:48  DELETE FROM DDSTORAGE WHERE DBSYSABBR = 'ORA'                                   DBMAN         099
    3:32:48 AND INDEXNAME = ' ' AND TABNAME = '/BIC/FZCOG_C06                                DBMAN         099
    3:32:49 SQL-END: 26.02.2012 13:32:49 00:00:01                                            DBMAN         099
    3:32:53 SQL: 26.02.2012 13:32:53 ECW7752                                                 DBMAN         099
    3:32:53  DELETE FROM DDSTORAGE WHERE DBSYSABBR = 'ORA'                                   DBMAN         099
    3:32:53 AND INDEXNAME = ' ' AND TABNAME = '/BIC/FZCOG_C06                                DBMAN         099
    3:32:54 SQL-END: 26.02.2012 13:32:54 00:00:01                                            DBMAN         099
    3:32:54 SQL: 26.02.2012 13:32:54 ECW7752                                                 DBMAN         099
    3:32:54  CREATE TABLE "ZBICZFZCOG_C06" PCTFREE 10 PCTUSED                                DBMAN         099
    3:32:54 00 INITRANS 001 TABLESPACE PSAPPBP NOCOMPRESS                                    DBMAN         099
    3:32:54 STORAGE (INITIAL     0000000016 K NEXT                                           DBMAN         099
    3:32:54 0000001024 K MINEXTENTS  0000000001 MAXEXTENTS                                   DBMAN         099
    3:32:54 2147483645 PCTINCREASE 0000 FREELISTS   001                                      DBMAN         099
    3:32:54 FREELIST GROUPS 01) PARTITION BY RANGE                                           DBMAN         099
    3:32:54 ("KEY_ZCOG_C06P") ( PARTITION "/BIC/FZCOG_C060"                                  DBMAN         099
    3:32:54 VALUES LESS THAN (0) , PARTITION                                                 DBMAN         099
    3:32:54 "/BIC/FZCOG_C060000001798" VALUES LESS THAN                                      DBMAN         099
    3:32:54 (0000001798) , PARTITION                                                         DBMAN         099
    3:32:54 "/BIC/FZCOG_C060000001799" VALUES LESS THAN                                      DBMAN         099
    3:32:54 (0000001799) , PARTITION                                                         DBMAN         099
    3:32:54 "/BIC/FZCOG_C060000001801" VALUES LESS THAN                                      DBMAN         099
    3:32:54 (0000001801) , PARTITION                                                         DBMAN         099
    3:32:54 "/BIC/FZCOG_C060000001802" VALUES LESS THAN                                      DBMAN         099
    3:32:54 (0000001802) , PARTITION                                                         DBMAN         099
    3:32:54 "/BIC/FZCOG_C060000001806" VALUES LESS THAN                                      DBMAN         099

    check notes
    Note 991372 - Selective deletion from InfoCubes takes a long time
    Note 481238 - Selective deletion ends with dump and ORA-00918

  • Selective deletion for particler cube and rebuild of aggrigates in Psystem

    Hi Friends,
    1.In my manage data target screen i have 8 cubes but i want do selective deletion from 1st cube ..how i can do ..?
    Im thinking like...IN DETILS column i will select.one data target and then i will go to contents tap and then selective deletion for paricler requst ID...is correct to do selective deletion for particler data target out of 8 cubes..plz tell me
    2.in production ...while doing selective deletion ...aggregates are failed...means status is in red color...
    now,how can i create or build or rebuild those aggrgates again...please and my qns...
    Thanks in advance

    Hi
    1. technically Yes its ok to do selective deletion of only 1 cube, incase of delta load you will have to do selective reload to only that cube otherwise data for that perticular selection will get doubled in rest of 7 cubes.
    Actually depends on situation in which you plan to do so.
    2. its possible to aggreegates get affected due t selective deletion.
    Just go to manage->rollup tab of cube and rebuild agreegates.
    Hope this helps.
    Regards
    Sudeep

  • Data Error in the Query/Report after selective data deletion for infocube

    Hi Experts,
    Please advise what i was missing and what went wrong...
    I got a Query (Forecast) on a Multicube...which is based on 2 Infocubes with Aggregates...
    As i identified some data discrepency..yesteraday i performed selective data deleation on one of the Infocube
    and executed report yesteraday and the results in the query are correct...
    When today i executed the same report i am getting different results..
    When i compared the results of the report with that of data in cube they are not matching
    The report is not displaying the data in cube..for some rows it is displaying the data in the cube but for some rows it is just displaying same as the above row
    there is no data loaded into info cube after selective deleation
    Do i need to perform request compression and fill the aggregated after selective deleation
    Please advise what went wrong

    Hi Venkat,
    No i haven't done anything on aggregates before or after selective delete
    As there is not data load after the selective delete according to SAP Manual we don't need to perform any thing on aggregates...as selective data deletion on cube will delete data from aggregates as well
    Please update how to identify error

  • Steps involved in Selective Deletion of Data from Info Cube

    Please search...this is much discussed in different threads out here
    Hi Experts
    I shall be greatful if you can updated me with the detail steps involved in Selective Data Deletion from a Info Cube....as i need to delete data selectively from a Infocube in LIVE system...so there is no second chance for me..
    Please update in detail
    Thanks in advance
    Edited by: Moderator

    Not sure how you were searching, but did you come across any of these...
    https://forums.sdn.sap.com/search.jspa?threadID=&q=selective+deletion&objID=f131&dateRange=all&numResults=15

  • Master Data Selective Deletion

    Hi,
    Is it possible to delete master data selectively?
    SE14 or DB02 can be of help?
    Regards

    Hi,
    Please have a look at the below points:.
    1.You can only delete the master data record if there is no transaction data exist
    for the master data that you need to delete . otherwise you wont be able
    to delete the master data.
    2.While loading we load the master data first followed by transactional data,
    but deletion is opposite ie first transactional data and then master data.
    3.You need to find it out where it is used by just go to info object and
    where used list it will give you all the detail about that info object.
    4.When you manually go to info object right click and delete it will ask fro two
    thing one is with Sid or without Sid,i think delete with "with Sid",
    while doing this you will get some message that some of the master data is
    not deleted. Then just ignore this warning as this is due to still some transactional data exist.
    5.You need to again find it out So,then goto tcode SLG1-- enter Object: RSDMD and
    Subobject: MD_DEL and User: ur userID and F8 and go to next screen  expand it and
    double click  it will give information about what all objects using the
    Sid of master data.
    6.After getting the list of object you need to delete the corresponding
    particular data from the various objects.
    7.Use Tcode RSRV -> Tests in Transaction RSRV -> All Elementary Tests -> Transaction Data -> Entries Not Used in the dimension of an InfoCube (Dbl Click)From the right side window, expand u201CEntries Not Used in the Dimension of an InfoCubeu201D Node &Enter InfoCube (like 0SD_C01), click u201CTransfer Now, click u201CExecuteu201D (Toolbar)u2026 and the results displayed in the right side window..Now, click u201CCorrect erroru201D (Toolbar)
    Hope this is helpful.
    Also give it a try like go to maintainace of master data and select the row that you want
    to delete and in the above select the delete button and save it.
    Thanks,
    Saveen kumar

  • Mark Infocube Data for Deletion

    HI Everyone. 
    I am attempting to understand if there is a way in the Infocube to mark specific
    data for deletion rather than actually delete that data using selective deletion and than
    unmark it when we are ready to show the data again?  
    Please let me know your thoughts. 
    Thanks Uday

    Hi Uday
    There is nothing called 'marking for deletion'... The last post on this subject is what you can follow at the most i.e. delete the data from the Infocube but not from PSA and try to use it from the PSA as required.
    Cheers
    Umesh

  • WEBI and LOV shown after selective deletion of data

    Hi, have the following problem.
    I know that the values for LOV are taken from the infoprovider. After making a selective deletion by characteristic in the infocube which has the loading date, custom characteristic like 0CALDAY, the LOV of the universe still says that i can select this data when in fact all the entries in cube has been deleted.
    Let´s say at first we have 01.01.2012, 05.01.2012, 10.01.2012 and 14.01.2012. After selective deletion of data loaded the 10.01.2012 i want that the LOV in BO has to be 01.01.2012, 05.01.2012, and 14.01.2012 but what i found is that the entry 10.01.2012 still exist althought it has no data in the infoprovider for this date.... any idea how to "delete" this proposal from the LOV ?
    Is it a default value coming from a BEx Query Variable? (set in bex query filters) NO
    is it a predefined filter in the MDX universe, sending a default value? NO
    is the default value coming from a webi query filter prompt? (set in query panel) YES
    There is a characteristic, ZDATEXT-Date Extraction with no master data and created as a reference characteristic of 0DATE.
    It is used in the universe as a dimension and then used in a WEBI as a filter (option maintain last values selected unchecked)
    Why the prompt still propose this date if there is no data in relation with this date ?
    Thanks in advance,
    Joaquin Casas Baca-Castex

    Hi,
    My understanding is that the BAPI call  MDPROVIDER_GET_MEMBERS (as tested in SE37) which is responsible for retrieving the list of values in BW goes against the master data tables, rather than the posted transaction values rolled-up into the Cube.
    i believe that some of the infoobject properties  'Query Execution Filter Value Selection'  or bex characteristic properties " only return posted values in masterdata" which have some effect on this, although i can't remember if these are consumed in XI3.1.
    I know they work in BI4.0 however, when using BICS. 
    Regards,
    H

Maybe you are looking for

  • Migrating settings, actions, plug-ins etc. from CS5 to CS6 (Creative Cloud)

    Hi, I wondered if someone could help me with the transition from CS5 to CS6 (Creative Cloud). I'm on a Mac with Mountain Lion. I would like to migrate as many settings (i.e. workspaces where relevant), personal Photoshop actions, plug-ins (i.e. Type

  • Photos get blurry when I bring them into iMovie.

    When ever I bring any of my photos (full res. from my canon 5D 12 mega pixel or high res neg scans) into iMovie they look horrible. They just get blurry. Whats the deal. I know the images or tac sharp. If I tether my camera to my TV and view them, th

  • Trying to restore certain directories to a new Mac

    I just received a new MacBook Pro.  I have a time machine backup that I want to restore from on a time capsule.  For various reasons, I dont' want to restore everything, I simply want to restore certain files, folders, etc.  I've tried using 'Browse

  • Changing HTTP to HTTPS in topic's true code of Robohelp

    Hi, Maybe someone can help me out there: In one of the topics of my help file, I've inserted a multimedia file (an swf file). When looking at the true code of the topic - I notice that Robohelp inserted the following links: codebase=" http://download

  • Cluster Remote Application Module

    Is it possible to deploy remote application module in clustering environment (for JClient client application)? I try to deploy in two standalone OC4J, but it always failed while migrating ejb session bean to another instance. I put replication="EndOf