Delete Requests of a Cube using ABAP routine

I have written a ABAP code to get all the requests of a cube. Now I want to delete all the requests which are older than 1 year through this ABAP routine. Please help.
REPORT ZTEST3.
TYPE-pools RSSM.
DATA: i_infocube like rsmonicdp-icube.
TYPES: l_req TYPE RSSM_T_PART.
DATA: li_req TYPE l_req.
CALL FUNCTION 'RSSM_ICUBE_REQUESTS_GET'                
EXPORTING
i_infocube = 'ZCOPCBC02'
IMPORTING
e_t_request = li_req.

Maybe this might help :
Delete multiple requests from DSO using RSMONICDP table

Similar Messages

  • Using ABAP routines for data selection

    Hello,
    I want to use ABAP routine to determine value range of data selection in Data Package but when I use routine for one field, selection criterias for other fields are ignored, e.g.:
    in Data Package I have two selection fields:
    CPUDT     Accounting Document Entry Date
    AEDAT     Date of the Last Document Change by Transaction
    For CPUDT I wrote ABAP routine
    and for AEDAT I have just typed in period of time.
    I started data extraction and open Monitor for this Data Package.
    At Header tag I checked selections info and there is selection only for CPUDT.
    Could somebody explain me is it normal system behaviour?
    Thanks
    Andrzej

    Thanks for reply but that would be too easy...
    I have tried your advice but nothing changed.
    I think this is data extraction configuration problem.
    Andrzej

  • How can i update data of DSO and Cube using ABAP??

    Hello Experts
    I have a requrement in which i need to update/ delete data from DSO and cube based on certain keys using ABAP.
    Please let me know how can i modify contets of cube or active table of DSO.
    Thanks
    Sudeep

    Hi
    I have requirement such that i need to update certain key figures in DSO after certain time.
    for eg. say record with key a is loaded to DSO and currospoding key figure was loaded with value 10
    after few days because of certain parameters changing in system i need to modify key figure value.
    currently i am doing same using 1 self transformation i.e. by loading same data again in same DSO.
    Amount of data is very huge and causing performance issues in system.
    now A is not key but i need to modify record for few combinations which apperar multiple times in DSO.
    Same DSO data is loaded into Cube regularly.
    I may need to update data after gap of few weeks as well.
    This design will be used as template and needto keep whole logic generic.
    So wring Function module can make it generic.
    Thanks
    Sudeep

  • Data selection in info package using ABAP routine.

    Hi,
    when we are  scheduling the info package(Infp package name is like XYZ),we want to load past 6 months data from the current date(INFO OBJECT(0CREATEDON) BETWEEN (Sy-Datum - 6 months TO  Sy-Datum),in the selection tab in schedule i want to write the abap routine (type 6).please can any one have this type of code please sedn to me asap.
    this is very urgent.delivery is tomorrow.

    hi Lekha,
    try following code.
    seems you post the same question twice, one posting is sufficient. and please don't forget to reward helpful answers.
    data: l_idx like sy-tabix.
    read table l_t_range with key
    iobjnm = '0CREATEDON'.
    l_idx = sy-tabix.
    DELETE l_t_range
    WHERE iobjnm = '0CREATEDON'.
    L_t_RANGE-SIGN = 'I'.
    L_t_RANGE-OPTION = 'EQ'.
    if not work, try
    L_t_RANGE-OPTION = 'BT'.
    BT = between
    last 6 month
    L_t_RANGE-LOW = sy-datum - 180.
    current date
    L_t_RANGE-HIGH = sy-datum.
    append l_t_range.
    modify l_t_range index l_idx.
    p_subrc = 0.
    $$ end of routine - insert your code only before this line -
    endform.

  • Delete request in a cube

    I have to delete a request in a cube. Unfortunately it isn't possible. I get a error message "Data target has already got request 25.445; deletion not permitted".
    Do you have an idea what is wrong?
    Thanks!

    Hi Kiev,
    You will need to delete the request from the further data target that is being loaded from this cube first, and then only can you delete the request from the cube.
    Hope this helps...

  • Use ABAP Routine in Selection Tab of Infopackage

    I am trying to use the ABAP routine in the InfoPackage SELECTION Tab to "EXCLUDE" a value. For example, I want to load all the Material types, except ZUN1. But, when I write in the ABAP, l_t_range-sign = 'E' instead of 'I' or l_t_range-option = 'NE' instead of 'E', I get an error saying these values are not permitted.
    Is there any way to exclude any value from Selection in the InfoPackage?
    Regards,
    Milind Vad

    Hi dear and welcome on board!
    You have two options:
    include everything you want in your IP
    load everything and exclude what you don't want in the start routine in transfer rules
    No other ways...
    Hope it helps!
    Bye,
    Roberto
    ...and please don't forget to reward the answers...it's THE way to say thanks here !

  • Hi loading last 2 months data using abap routine

    we are planning to write a routine in infopackage level,
    using the option 6-ABAP routine, to select the last 2 month data ,
    we have the time characteristics 0CALMONTH, At present we managing the load by manually changing the selection for last 2 month every time ,
    It would be a great help if anybody can show a sample code to select last 2 month data,
    Thanks,

    Hi,
    data: l_idx like sy-tabix.
    DATA: lv_calmonth LIKE /BI0/SCALMONTH-CALMONTH.
    DATA: lv_day TYPE DATS.
    "previous month
    lv_day = SY-DATUM.
    lv_day+6(2) = '01'.
    lv_day = lv_day - 1.
    lv_calmonth = lv_day(6).
    READ TABLE l_t_range with key fieldname = 'CALMONTH'.
    l_idx = sy-tabix.
    MOVE lv_calmonth TO l_t_range-low.
    MODIFY l_t_range INDEX l_idx.
    "previous month - 1
    lv_day+6(2) = '01'.
    lv_day = lv_day - 1.
    lv_calmonth = lv_day(6).
    MOVE lv_calmonth TO l_t_range-low.
    APPEND l_t_range.
    p_subrc = 0.
    let me know if this works.... not sure about the last append.
    Olivier.

  • Load data only for current month using ABAP Routine

    Hi Everyone,
    I am loading data from R/3 using the 0HR_PA_OS_1 extractor. This requirement is to load the position numbers from R/3. Using the extractor for a given position 28 I get the following dataset results.
    CALMONTH  POSITION
    11-2004           28
    12-2004           28
    01-2005           28
    02-2005           28
          |
    07-2007          28     CURRENT DATE
    Now when I pull data in BW I only want to load the record for most current i.e. 07-2007. I DO NOT want that ALL the records since the day the position was created should be loaded.
    Now I do understand this can be achieved using a ABAP routine in the INFOPACKAGE. Below is the routine that I am using and what it is doing is that it is only bringing in the first record.
    data: l_idx like sy-tabix.
      clear: l_idx.
      read table l_t_range with key
           fieldname = 'CALMONTH'.
      l_idx = sy-tabix.
    Current month only
      l_t_range-low = sy-datum(6).      "Current month
    l_t_range-high.
      l_t_range-option = 'EQ'.                           "equals
    l_t_range-sign = 'I'.
      modify l_t_range index l_idx.
      p_subrc = 0.
    Can anyone suggest a solution as to why this is happening?
    Thanks,
    Rahul

    One explanation would be
    - If there is no CALMONTH selection values specified in the selection tab, l_t_range would be empty. This would mean there would be no line for CALMONTH selection, and the code won't modify the l_t_range.
    If this is true, you need to check sy-subrc after reading from the itab.
    data: l_idx like sy-tabix.
    clear: l_idx.
    read table l_t_range with key fieldname = 'CALMONTH'.
    if sy-subrc = 0.
    l_idx = sy-tabix.
    * Current month only
    l_t_range-low = sy-datum(6). "Current month
    * l_t_range-high.
    l_t_range-option = 'EQ'. "equals
    * l_t_range-sign = 'I'.
    modify l_t_range index l_idx.
    else.   
    move 'CALMONTH' to l_t_range-fieldname.
    l_t_range-low = sy-datum(6).
    l_t_range-sign = 'I'.
    l_t_range-option = 'EQ'.
    append l_t_range.
    endif.
    p_subrc = 0.

  • Deleting request options in Cube?

    Hi,
    The Cube is Not Compressed where Aggregate Rollup and Compression of Aggregate rollup are available.
    Now, I need to delete only one request from the Cube.
    I have found two options
    1) Delete this request directly from Cube (Via Manage option of RSA1)
    2) Delete this request from Selective Delete option.
    I need to know which is the best option in order to avoid further maintanace of already available Aggregate Rollup and its Compression. For which option Aggregate Maintanace is needed ?
    Thanks
    Tony
    Edited by: BI Dev on Oct 24, 2008 12:35 PM

    Hi......
    You are saying that roll up and compression is not done........then you can easily make the QM status red........and delete the request.......
    In any case if roll up is done...then at first you have to deactivate the aggregate........as already said ..........then you can only delete the request..................and if compression is done.............not possible to delete any more..........because after compression request number dos'nt exist any more....
    Besides deleting entire requests, you also have the option of deleting data according to business-orientated aspects from the fact table. For example, you can delete the data for a cost center or of a customer even if these are spread over several requests.
    Remember that if you delete data selectively from an InfoCube, the aggregate belonging to this InfoCube is automatically deleted...........
    For you the best option is to delete the request from the target......
    Hope this helps.......
    Regards,
    Debjani......

  • Restricting data in cube using start routine

    Hi,
    Can anyone help me with my scenariou2026.I am trying to restrict the absence data being loaded into the cube where the absence is less than or equal to twenty.
    Firstly I put in a start routine in the update rules against actual time.
    DELETER DATA_PACKAGE WHERE  DUR_ACTUAL GT 20
    But this didnu2019t work.
    Secondly I put this code in the change routine for the key figure actual time
    IF RESULT GT 20.
      RETURNCODE = 1.
    ELSE.
      RETURNCODE = 0.
    ENDIF.
    But all the actual time fields were set to 0.
    Can anyone please help with the correct code.
    Thanks
    Forhad

    It is hard to say without debugging your code, and inspecting the input package.  Maybe you just need quotes around your values, or something simple like that.
    But did you know that it is faster to put a filter in a DTP?  Using a filter, you're pushing the criteria down to the SQL WHERE clause, and limiting the amount of data.
    And, you're eliminating the need for ABAP.
    Sorry, if you're not on BI7, disregard, because you don't have DTPs.
    Edited by: Jerry Coleman on Jan 29, 2009 10:05 AM

  • Activate Cube using ABAP

    Hi
    We have written some ABAP which allows us to do bulk updates on cubes - this is particularly useful when we're adding / removing navigational attributes, as there are many many cubes in the system.
    In addition to adding the navigational attribute, the ABAP then saves and activates the cube, and all the associated update rules, which would now have become inactive. This is really useful, as it means we don't have to have someone manually making all these changes, and possibly missing something along the way.
    However, what we have now found, is that although the cube is activated, and is shown as active in RSA1, and can be used in Multiproviders, the newly added Navigation Attributes are not available in the Aggregate Maintenance screen. This also means that any aggregates that were there, are now not available, which is clearly not ideal.
    The 2 standard SAP FM's that are used to SAVE and ACTIVATE the cubes are:
    1. RSDG_CUBE_SAVE
    2. RSDG_CUBE_ACTIVATE
    We have found a manual fix to the problem, which is to open the cube in edit mode from RSA1, save it, go back to RSA1 (don't activate yet), re-open the cube in edit mode, then activate. If these steps are followed, then the navigational attribute is available in the aggregate maintenance screen.
    I found a note which speaks about table /bic/v[cube name]2 not being updated, but that note only applies to APO. What I have noticed, is that:
    - when the navigational attribute is added, it appears in the table
    - if the manual fix (open/save/exit/open/activate) is followed, then the order of the items in the V2 table is changed
    Has anyone written a similar program that I could possibly leach some ideas off, as I really would like to get this sorted.
    Cheers,
    Andrew

    RSDG_CUBE_ACTIVATE - as mentioned in my original post, I already use this FM in my ABAP. It activates the cube, but still the navigational attributes are not available, and the V2 table is not updated.
    If I debug the SAVE routine from RSA1, then it appears there is something additional happening in the SAP standard program, that I am not able to accomplish by using the RSDG_CUBE_SAVE FM.
    Transfer Structures - doesn't matter whether I activate these or not, the navigational attributes are not available.
    Cheers,
    Andrew

  • Delete request Ids from Cube

    Hello Experts,
    We have 2 cubes (ZC_CB1, ZC_CB2). We are loading delta load to ZC_CB1. I need to move the specified period data from ZC_CB1 cube to ZC_CB2 cube and delete the specified period data from ZC_CB1 after finish the load. They don't want to use SELECTIVE DELETE to delete the data from ZC_CB1. Please let me know options to achieve the same.
    Thank you
    Regards,
    Prasad

    Selective deletion and deleting by request is the only way of deleting the data from the cube.
    May I ask why they don't want to use a selective deletion?
    You can also try to create a flatfile source system for this cube and load a reversal document to the cube.
    thanks.
    Wond

  • Query on a cube using abap

    Hello,
    i've programed a report and I want to get data from a cube in bw. How can I access them? Via MDX - ior is MDX only for external queries? I can't find a example to use the MDX functions.
    Alexander

    Basically to report the data in Infocube BW Queries are used with which you can see the output in Excel or in a Web Page.
    For Reporting in BW ABap Programs are not used as ABAP Programs does not not Provide drilldown and multi dimensional view.
    See the below link for creating MDX Queries
    /people/prakash.singh4/blog/2005/06/08/quick-help-in-creating-mdx-statement
    See the Features Supported by BW for MDX
    http://help.sap.com/saphelp_nw04/helpdata/en/14/a3639e028a144d8c8b7dd403b22a1a/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/14/a3639e028a144d8c8b7dd403b22a1a/frameset.htm
    Somewhat the support is very much limited like BW does not support the function like Ancestors viz....
    Regs
    Gopi.
    Assign points if it helps ...

  • Delete Request

    I have written a routine to delete request from a cube. This routine is written in the "Delete Overlapping Request" object of the process chain and included in the Data selection field. But the program gives the error "ABAP/4 : BCD_OVERFLOW" error. It gives the same short dump in ST22. Following is the routine....
    tables l_t_request_to_delete structure rsreqdelstruc
      using l_request like rsreqdone-rnr
      changing p_subrc like sy-subrc.
    data: temp_date like sy-datum.
    data: temp_date1 like sy-datum.
          temp_date1 = sy-datum - 1.
         loop at l_t_request_to_delete.
    temp_date = l_t_request_to_delete-timestamp+0(8).
    if temp_date < temp_date1.
    delete l_t_request_to_delete index sy-index.
    endif.
         endloop.
         clear p_subrc.

    Hi,
    Check OSS note 1268814.
    Might be ofsome help.
    Saurabh

  • ABAP to Delete and Reinsert/Reconstruct Requests in a Cube

    I need to write an ABAP that will selectively delete requests from a cube and then reinsert them.   The purpose of this exercise is to execute a modified update rule between the DSO and the Cube.
    I found FM RSSM_DELETE_REQUEST which will delete a request.  
    However I need the following:
    1) A table that will provide the individual request numbers that I want to delete
    2) A FM that will Reconstruct those requests. (There is no "RSSM_RECONSTRUCT_REQUEST) that I can find
    As for #1 above, supposedly table RSREQDONE is supposed to have all the requests.  However I can't find any rows in this table that provide me the request numbers in the Cube I am deleting them from.

    Are you talking about selective delete and reload?
    because if you need to load the data with a new/modified update rule, then i dont know if deleting the request and reinserting or reconstructing (- assuming thats what you mean) the requests will reflect or calculate the values differently based on the new update rule.
    However you could do a selective delete and reload.
    Selectively delete the data for whatever period/selection you require and reload it from the DSO.
    Wont this solve your problem
    Hope it helps
    Regards
    Joe

Maybe you are looking for

  • PLEASE PLEASE HELP!

    I need a new IPod and have undertaken the daunting task of transferring non-iTunes purchased files (from my old CDs, etc.) into my iTunes library. I need to do hundreds of songs, and was spending the afternoon using Yamipod when my computer froze. Wh

  • How can I buy a definitive licence of Lr 3.6 or 4.0?

    How can I buy a definitive licence of Lr 3.6 or 4.0? Someone help me?

  • ICD-P620 driver won't install

    I'm trying to install the driver for my ICD-P620 digital recorder on my new Windows 7 PC. I've downloaded and run the indicated driver installer (DVE version 3.3.01 plus driver), but when I then plug the recorder in, Windows says it can't find a driv

  • Automatic restart of WRT54G3G

    I use a WRTG3G router with a UMTS connection. On the PC behind that router, a Windows VPN client is active. This client has to remain active. I sent every 30 minutes a ping command, this improved the uptime. But after about 12 hours the VPN goes down

  • Anyconnect Linux

    Can´t get a cert-based IPSec-VPN with Linux working . (Mac and Win work fine with the same certs.) Somethings seems to be wrong with CertStore. From syslog: CNSSCertStore File: Certificates/NSSCertStore.cpp Line: 72 Invoked Function: CNSSCertUtils::I