Program to drop/delete Infocube data

Hi,
Please suggest me an ABAP progra or Function Module that can delete data from an Infocube. I need to schedule it in background on daily base.
Thank you.

hi,
check the below logic to delete the contents from Cube
data: RSICCONT like rsiccont,
      rsseldone like rsseldone.
data: begin of i_req occurs 0,
      rnr like RSICCONT-rnr,
      end of i_req.
refresh i_req.
select * from RSICCONT
                  where ICUBE  = 'ZCS_D10'   " Cube name
                  order by TIMESTAMP descending.
  i_req-rnr = rsiccont-rnr .
  append i_req.
  clear i_req.
endselect.
loop at i_req.
  select single * from RSSELDONE where RNR eq i_req-rnr and
                  source in ('0CO_OM_OPA_5',        " Data source name
                             '0CS_OM_OPA_1').           " Data source name
  if sy-subrc eq 0.
    CALL FUNCTION 'RSSM_DELETE_REQUEST'
      EXPORTING
        REQUEST                    = i_req-rnr
        INFOCUBE                   = 'ZCS_D10'
      EXCEPTIONS
        REQUEST_NOT_IN_CUBE        = 1
        INFOCUBE_NOT_FOUND         = 2
        REQUEST_ALREADY_AGGREGATED = 3
        REQUEST_ALREADY_COMDENSED  = 4
        NO_ENQUEUE_POSSIBLE        = 5
        OTHERS                     = 6.
    IF SY-SUBRC <> 0.
      MESSAGE ID sy-MSGID TYPE 'I' NUMBER sy-MSGNO
          WITH sy-MSGV1 sy-MSGV2 sy-MSGV3 sy-MSGV4.
    else.
      message i799(rsm1) with i_req-rnr 'deleted'.
    ENDIF.
    do.
      select single * from RSICCONT where ICUBE  = 'ZCS_D10'
                                      and  rnr    = i_req-rnr.
      if sy-subrc ne 0.
        exit.
      endif.
    enddo.
  endif.
hope it helps..
regards,
raju

Similar Messages

  • How to delete InfoCube data in a Process Chain with restictions?

    Hi Friends!
    My process chain is a full update in the cube 
    I need delete the data everyday except  the last day in the month.
    How can I do this in 7.0 release?
    Thanks!

    Hi,
    Please use the option Delete of overlapp requests process type
    Take the following conditions as :
    1) Only delete request from same DTP
    3) Only Full DTP
    3) Only Delete DTP requests from same souce
    Selections are
    Overlapping
    Request date
    Is in the current month
    based on the month
    Hope this helps out
    Thanks
    PT
    Edited by: PT on Feb 23, 2010 7:18 PM

  • Delete InfoCube Data

    Hello!
    I need to delete data of a particular InfoCube.
    I was wondering if there is a standard function module in SAP which I can modify?
    Kind regards

    Hi,
    For deletion of cube data.
    Go to SE38 Execute these Function Modules or Programs:
    RSAPO_DELETE_CUBE
    RSAPOADM_CLEANUP_CUBE
    RSAR_DELETE_ICUBE
    RSAU_INFOCUBE_CONTENT_DELETE
    RSDG_CUBE_DELETE
    RSDPC_DROP_CUBE
    RSDPM_DB_CLEANUP_CUBE
    RSDPTEST_MOLAP_CUBE_CLEANUP
    RSDPW_INFOCUBE_DELETE_ALL_DATA
    RSDPW_INFOCUBE_DELETE_DATA
    RSDPW_INFOCUBE_DROP
    RSDP_MDMETA_ICUBE_DROP
    If this is helpful then assign some points.
    Rgs,
    I.R.K

  • Deleting selected data from an Infocube in BW using ABAP program?

    Hi Everybody,
                       I have to create a ABAP program in SE38 which, on execution will delete selected data from a Cube in BW module. How to achieve it. Is there any function module that can do so? Eagerly waiting for your suggestions.
    Regards,
    Pulokesh

    select the records from the cube or  ods and put in to one internal table.
    and then u can delete the records

  • 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

  • How to delete the data in the compressed  infocube

    hi, bi gurus
    we are facing a problem in inventory management the info cube in BW production
    normally every time inventory cube gets compressed that means the data will be moving to F fact table to E fact table
    now the problem is we are having some bad data for latest five requests in this cube as we all know compressed data
    can't be delete by deleting request in the request tab the only way is go for selective deletion but i don't find any selective
    option in the cube we are PSA data for that five request which having correctdata please help how to delete the bad data in the
    info cube and load the correct data which we are having in PSA
    Thanks
    Joe

    Hi André
    Thanks you for ur answer
    what i am telling is their is an option for selective deletion for inventory cube
    but i don't find any specific option to delete the data that means like calendar day like that
    i hope you got my question.
    hi Saveen Kumar,
    Thank you again
    we are using 3.xx flow if we do the request reverse posting for all the 5 requests which has updated incorrect data
    next we need to do compression also or not
    and how to reload the data from PSA to Infocube becuse if request still avaliable in info cube it will not allow me to do that
    can you please tell me detail how to proceed in step by step this is first time i am doing request reverse post and i have to do it production please tell me
    Thanks in adavance
    Thanks,joe

  • Delete access for the Infocube data

    hi,
    If you want to remove the delete access from the infocube , which change should be done to the security role. Please advise.
    Thanks in advance...

    Hi,
    May be you can try this......
    S_RS_ICUBE  
              Activity                      - 03 (display), 23 (maintain), 63 (activate), 66 (refresh). Uncheck 06 (delete)
              Infocube subobject   -  Choose as required....including DATA
              InfoArea & InfoCube - Choose as required.
    Regards,
    Murali.

  • 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

  • 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

  • Deleting the data in the infocube will delete the data in explorer reports?

    Hi,
    I have some explorer reports based on the BW queries.
    1. I have deleted the data in BW but when I go and check the data is still visible in the explorer reports ? Is there any option once I delete the data in BW the data should also be deleted in the explorer?
    2. Once I transport these explorer reports from dev to Quality, if the quality system cube does not have the data then these explorer reports does not show up any data or else it carries the data as well from the devlopment system?
    Regards
    A

    hi,
    Explorer reports will take data from Indexes in BWA, so it will show data even if you delete the data from cubes.
    you will have to index your queries/ cubes again if you need the latest data.
    I guess this can be scheduled through process chains.
    Regards, Mayur

  • How to delete Master data using Process Chain

    I need to delete data in respective data targets such as Infocubes, DSO’s & Master data Infoobjects. It was fine with Infocubes & DSOs  using respective process type. But the issue is with Master data Infoobjects.
    Is there any process type by using which I can delete data in Master data Infoobjects using process chain?

    Murali,
    Master data object process type is not there because in BW, master data is conformed or is shared by other infoproviders. Due to this dependency, master data loading is a bit more complex. You need to drop all the data from all the infproviders which are using the master data you want to delete.
    -Saket

  • How do I reinstall Adobe Acrobat XI Pro from the Creative Cloud? I was deleting another program and accidently deleted Acrobat.

    How do I reinstall Adobe Acrobat XI Pro from the Creative Cloud? I was deleting another program and accidently deleted Acrobat.

    Sweetmelissa63 for information on how to reinstall Adobe Acrobat XI Professional please see CC desktop lists applications as "Up to Date" when not installed - http://helpx.adobe.com/creative-cloud/kb/aam-lists-removed-apps-date.html.

  • Is it possible to validate the deletion of data in custom SE16

    Hi Guys,
    To maintain a Z table ZCITY (Master Data), I created custom SE16 t-code ZSE16CITY (using SE93 - Transaction with parameters).
    Is it possible to validate the deletion of data from ZCITY Table in custom SE16.
    If ZCODE exists in any of the transaction table then deletion of the record is not allowed and display the message for user.
    Is this functionality is doable in custom SE16 or I have to create a maintenance program using Dialog screen (SE51).
    Thanks for you input.
    mini

    Hi ,
    try this way....
    using SE93 - Transaction with parameters
    next pass the below values in the Name of the screen field and Value
    VIEWNAME                                                <table name>
    DATABROWSE-TABLENAME     <table name>
    Prabhudas

  • How to Delete the Data in Cube and in ODS

    Hi ALL,
            I have a cube and an ODS both the data targets have data from the year 2002 to 2005.now i want to delete the data from both the data targets with respect to data related to the year 2003 only,how can it be done. Any Help Appreciated with rewarding points.
    Regards,
    BW Seeker.

    Hi
    Generally we can delete the data in the request for the data of year 2003 from request tab in manage screen of datatarget. This can be done only when we are sure that that particular request/s belongs to 2003 year data.
    This can be better handled with selective deletion of data for year 2003 with some keyfields like 0CALMONTH etc..
    This is infact only way when you have already compressed the data in Infocube.
    Hope it helps...
    Best Regards,
    DMK
    *Assign points if it helps...

  • 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

Maybe you are looking for

  • JUMSOFT MONEY EN ICLOUD, JUMSOFT MONEY EN ICLOUD, JUMSOFT MONEY EN ICLOUD

    he adquirido el app Money de Jumisoft en l applestore, y aunque anuncian la funcion de guardado en iCloud, no me deja guardarlo desde el iMac. ¿Alguin sabe como puedo guardar en iCloud mi archivo Money para luego poder acceder a el desde los diversos

  • How to include logos in pdf forms??

    hi all, i am working with the pdf forms for the first time and dont yet kno the tricks of trade  can ne1 tell me how do i include graphic logo in the form?? here, i am referring to the logos we can access by TXN SE78 (the ones we use while working wi

  • Blank adobe form displayed in  web dynpro application

    Hi,              I have created an Interactive Adobe form using web dynpro Java. When I run the form (in IE), a blank page is displayed. If I keep the Adobe reader open and run the form on IE, the form is opened in reader and it's working. When I acc

  • Variations issues with User & Group Site Column value

    Hi all, I have created variation sites. e.g. http://mydomain/en-us for english & http://mydomain/de-de for german language. I have created custom page layouts. This page layouts are based on custom content types. I have created a column called "User"

  • Quark Xpress files won't save OS 10.9.4

    I am unable to save Quark Xpress documents in my iMac running OS 10.9.4. The file is fine as I am able to use it on a different machine outside of the office. The file is on the local desktop and can not be saved there or to the server even if the na