Recovery of compressed data in stock cube

Hi,
Does anyone know how to reverse the compression in stock cubes 0IC_C03?
By mistake the compression was made until last month and now the queries have negative stock values.
I'm using objects in version 3.X and I can´t do selective elimination by year, because it is not available.
Can I use reverse posting for the requests since the beginning of the year, and then load the data again via PSA, or make an Init for 2009?
What is the best solution for this problem?
Thank you,
Joana

Unfortunately, once compression is done there is no way to revert back to an uncompressed state. You basically have two options for removing the data at this point:
1) Use the RSDRD_SEL_DELETION Function Module in a custom ABAP program to delete the data for 2009, then load 2009 data again. Probably the preferred method
2) Truncate the entire InfoCube and re-load from the beginning. Probably not the best choice
Here's a sample ABAP program you could use to delete the InfoCube data:
REPORT zfi_delete_cube
  MESSAGE-ID zfi_msg.
CONSTANTS: c_i(1) TYPE c VALUE 'I',
           c_eq(2) TYPE c VALUE 'EQ',
           c_2009 TYPE /bi0/oicalyear VALUE 2009,
           c_space(1) TYPE c VALUE ' ',
           c_x(1) TYPE c VALUE 'X',
           c_c(1) TYPE c VALUE 'C'.
DATA: l_thx_sel type rsdrd_thx_sel,
      l_sx_sel type line of rsdrd_thx_sel,
      l_s_range like rsdrd_s_range,
      l_t_range type rsdrd_t_range,
      l_t_msg type rs_t_msg.
CLEAR: l_thx_sel,
       l_sx_sel,
       l_s_range,
       l_t_range,
       l_t_msg.
MOVE: c_i TO l_s_range-sign,
      c_eq TO l_s_range-option,
      c_2009 TO l_s_range-low,
      c_space TO l_s_range-high,
      c_x TO l_s_range-keyfl.
APPEND l_s_range TO l_t_range.
MOVE '0CALYEAR; TO l_sx_sel-iobjnm.
l_sx_sel-t_range = l_t_range[].
INSERT
  l_sx_sel
INTO TABLE
  l_thx_sel.
CALL FUNCTION
  'RSDRD_SEL_DELETION'
EXPORTINGexporting
  i_datatarget = 'ZXXX_C01'
  i_thx_sel = l_thx_sel
  i_authority_check = c_x
  i_threshold = '1.0000E-01'
  i_mode = c_c
  i_no_logging = ''
  i_parallel_degree = 1
  i_no_commit = ''
changing
  c_t_msg = l_t_msg.
IF sy-subrc EQ 0.
  MESSAGE s000.
ELSE.
  MESSAGE s001.
ENDIF.

Similar Messages

  • Archive Stock Cube with non-cumulative nature

    Hi All,
    I have been trying to archive the Inventory (Stock) Infocube as we have more than couple of hundread million records in the cube and it is taking long time to execute query.
    I know how to acrive the regular cubes and DSOs, but I couldn't find any helpful documentation where I can know how to archive the Infocube with non-cumulative nature or containing Marker update.
    Can anyone pleaes post the link of document?
    BTW, we are using BI7.0 SP15
    Thanks,
    Dhaval

    Hi,
    There are two ways of archiving data from a non-cumulative InfoCube - time slot archiving and archiving with selection characteristics.
    Time slot archiving (recommended)
    As an archiving method, you must choose for a non-cumulative InfoCube, time slot archiving for the time reference characteristic. When you recreate an archiving object for a non-cumulative InfoCube, this characteristic is also suggested by the system.
    Only archive non-cumulative changes up to a specific point in the past. This reduces the volume of data in the InfoCube. The marker (= end non-cumulative) remains unchanged.
    In the variants maintenance screen, in the archive administration, under Non-Cumulatives, choose the Movements Only option.
    You are only able to archive the marker if you also archive all of the non-cumulative changes. Subsequently, the contents of the non-cumulative InfoCube are archived completely. In the variants maintenance screen, in the archive administration, under Non-Cumulatives, choose the Movements and End Non-cumulative option.
    You must archive the non-cumulative changes (for all times) first, and then archive the marker in a separate archiving run, so that the non-cumulative changes and the marker are stored separately in the archive.
    The advantage of time slot archiving is that archiving runs can be carried out periodically using a single variant with a relative time restriction. The alternative archiving method described below does not have this advantage.
    Archiving with selection characteristics
    In some cases, archiving based only on time slots does not have the required effect of reducing the volume of data in the InfoCube. This is the case, for example, if the non-cumulative bearing objects are subject to high fluctuations, meaning that data is constantly being loaded for new objects and old objects are made obsolete. With time slot archiving, the end non-cumulative remains for all objects until all of the data in the InfoCube is finally archived, even if all the non-cumulative changes for an object have been archived already.
    In this case, you want to archive and delete completely any objects that are no longer active in the InfoCube. This means archiving the marker as well. For other objects that are still active, you only need to archive the non-cumulative changes from the past, which means the marker is retained.
    When you define the archiving properties for a non-cumulative InfoCube, do not therefore choose the time slot archiving method. Instead, select individually the characteristics that are relevant to restricting archiving runs. The time reference characteristic should also be included in this selection whenever possible.
    Using this archiving method, for each archiving run, you need to create selection conditions in a variant. In the variant for the archiving run, in addition to the selection conditions, you can also specify for the selected characteristics whether or not non-cumulative changes and marker data is archived. If you choose to archive marker data, be aware that the time selection contains the maximum value for time.
    Please refer to the below link to archive the data for Stock Cube:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/3f/c219fe9a46194aa66d55254fdab182/frameset.htm
    Hope this helps.
    Regards
    Tanuj

  • How to create a report in bex based on last data loaded in cube?

    I have to create a query with predefined filter based upon "Latest SAP date" i.e. user only want to see the very latest situation from the last load. The report should only show the latest inventory stock situation from the last load. As I'm new to Bex not able to find the way how to achieve this. Is there any time characteristic which hold the last update date of a cube? Please help and suggest how to achieve the same.
    Thanks in advance.

    Hi Rajesh.
    Thnx fr ur suggestion.
    My requirement is little different. I build the query based upon a multiprovider. And I want to see the latest record in the report based upon only the latest date(not sys date) when data load to the cube last. This date (when the cube last loaded with the data) is not populating from any data source. I guess I have to add "0TCT_VC11" cube to my multiprovider to fetch the date when my cube is last loaded with data. Please correct me if I'm wrong.
    Thanx in advance.

  • Date Wise stock report (0IC_C03)

    How can we see the date wise stock quantity and value in Query using  cube 0IC_C03.
    Example:Suppose i want to see what was my stock quantity and stock value on 25th Jan08.

    Hi,
    Restrict the Key figure value and quantity with the date.
    OR
    Go to the key figure in RSA1-> Info objects -> Double click on ur key figure-> Go to the aggregation tab Specify exception aggregation as last value and reference char as 0calday.
    This will give u the stock on the last day.
    If u want to do it in bex
    Create a Calculated Key figure put ur key figure in. And right click select the properties select exception aggregation last value and reference char as 0calday.
    Khaja

  • Validity table for stock cube

    hi,
    I am designing a stock cube with non-cumulative values.
    Data for amounts of stock movements I plan to get from Transfer Order documents.
    Data will be extracted on daily basis and in cube I want to have among others following chars: quant, storage bin, storage type and warehouse nr.
    I would like to include in validity table such all of chars mentioned above (i.e. quant, storage bin, storage type, warehouse nr and date).
    I am wondering is it ok to include so many chars in this table. Are there any guidelines for designing this table?
    Can you suggest any documentation?
    Regards,
    Andrzej

    You can use RSDG_CUBE_VALT_MODIFY report for this.
    See:
    http://help.sap.com/saphelp_bw31/helpdata/en/02/9a6a1c244411d5b2e30050da4c74dc/content.htm
    Also take a look on notes:
    360249
    534865
    419490
    Regards

  • How to delete the rollup and compress request from the cube

    Hi Experts,
    I have a requirement, one request was updated into the cube and it was been rollup and then compressed.  As the request was compressed so based on request id we cant perform the deletion.
    So it is possible with selective deletion.  Now before performing the selective deletion do i need to deactivate the aggregates. 
    Help me out on this.
    Regards
    Prasad

    Hi.........
    U hav to deactivate the aggregates................bcoz.........Selective deletion is only possible with uncompressed requests...............ie from F fact table...........after compression data moves from F fact table to E fact table.............. you can't do selective deletion on E fact table.........So first deactivate the aggregates............then do the selective deletion..............then again activate the aggregates..............and do the aggregate filling job manually in RSA1..............but I will suggest u delete the request...............bcoz any how u hav to deactivate the aggregates............and in case of selective deletion u hav to be very particular................if ur load is not taking much time............then delete the request and repeat the load............
    Regards,
    Debjani...........

  • Inventory 0IC_C03, issue with historical data (data before Stock initializa

    Hi Experts,
    Inventory Management implementation we followed as bellow.
    Initailization data and delta records data is showing correctly with ECC MB5B data, but historical data (2007 and 2008 till date before initialization) data is not showing correctly (stock on ECC side) but showing only difference Qunatity from Stock initialization data to date of Query.
    we have done all the initial setting at BF11, Process keys and filed setup table for BX abd BF datasources, we are not using UM datasource.
    1 we loaded BX data and compressed request (without tick mark at "No Marker Update)
    2. initialization BF data and compressed request (with tick mark at "No Marker Update)
    3 for deltas we are comperessing request on daily (without tick mark at "No Marker Update).
    is this correct process
    in as you mentioned for BX no need to compress ( should not compress BX request ? )
    and do we need to compress delta requets ?
    we have issue for historial data validation,
    here is the example:
    we have initilaized on may 5th 2009.
    we have loaded BX data from 2007 (historical data)
    for data when we see the data on january 1st 2007, on BI side it is showing value in negative sign.
    on ECC it is showing different value.
    for example ECC Stock on january 1st 2007 : 1500 KG
    stock on Initialization may 5th 2009 : 2200 KG
    on BI side it is showing as: - 700 KG
    2200 - (-700) = 1500 ,
    but on BI side it is not showing as 1500 KG.
    (it is showing values in negative with refence to initialization stock)
    can you please tell, is this the process is correct, or we did worng in data loading.
    in validity table (L table) 2 records are there with SID values 0 and -1, is this correct
    thanks in advance.
    Regards,
    Daya Sagar
    Edited by: Daya Sagar on May 18, 2009 2:49 PM

    Hi Anil,
    Thanks for your reply.
    1. You have performed the initialization on 15th May 2009.
    yes
    2. For the data after the stock initialization, I believe that you have either performed a full load from BF data source for the data 16th May 2009 onwards or you have not loaded any data after 15th May 2009.
    for BF after stock initialization delta data, this compressed with marker update option unchecked.
    If this is the case, then I think you need to
    1. Load the data on 15th May (from BF data source) separately.
    do you mean BF ( Material movements) 15th May data to be compressed with No Marker Update option unchecked. which we do for BX datasource ?
    2. Compress it with the No Marker Update option unchecked.
    3. Check the report for data on 1st Jan 2007 after this. If this is correct, then all the history data will also be correct.
    After this you can perform a full load till date
    here till date means May 15 th not included ?
    for the data after stock initialization and then start the delta process. The data after the stock initialization(after 15th May 2009) should also be correct.
    can you please clarify these doubts?
    Thanks
    Edited by: Daya Sagar on May 20, 2009 10:20 AM

  • Datamart using stock cube

    Hi experts,
    I have a stock cube which is compressed and having marker update till today. Now I am trying to do datamart using this cube.
    Is it possible to do datamart with the cube which is compressed and having marker update.
    suggest me the procedure to if it is possible.
    regards,
    rajesh.

    Hi Rajesh,
    Check note 375098 (Datamart extraction from non-cumulative InfoCubes)

  • Datamart works for Compressed data

    Hello
    We created Datamart for the Billing Cube and needs to send the data to New Billing Cube.
    I question like for the Old Cube for which Datamart is created, got some compressed records.
    So when iam loading the data from Datamart to new cube, will it be possible for me to get the compressed records too.
    Do we need to load differently for compressed records.
    Please provide some solution if anyone has faced this, it will be very helpful for me.
    Thanks in advance

    Hello,
    when you load data from one cube to another, all records will be passed; compressed and not compressed.
    Furthermore, if you are creating a new cube and need to load all the data from the old cube to the new cube, I recommend to compress the old cube fully, update indexes, and create statistics on it; the selection and fetching of data will be faster.
    Hope this helps...
    Olivier.

  • When do we compress the request in cube. ?

    Hello all,
    We have been live for a few months now. After how many days/weeks/months should we compress the request in cube. ?How often do we have to compress the data in the cube.
    I know once compress than we cannot delete the data by request but we there is an issue and we need to delete data completely from the cube that is possible right ?
    Thanks in advance

    How often Compression needs to be done depends on the volume of data that is loaded everyday. Unless the volume of records loaded everyday is unusually high, doing compression once a week might be good enough.
    Also you are right abt losing the ability to delete by request in the infocube after compressing the request. But we dont necessarily have to delete the whole cube incase of issues. There is always the option of doing 'SELECTIVE DELETION'.
    Next, when doing the compression you have an option of mentioning the date range. Choose the option of compressing requests that are older than 4 days (arbitrary) to have a buffer for deleting the request incase of issues.
    Hope this helps!

  • Modeling "Status" for transaction data in a cube

    Hello all,
    I saw this thread created sometime ago about putting status in a cube.
    How to model Status filed
    I would like model a status of transactions within a cube. One suggestion was to just create a CHAR characteristic of a certain length (I assume this would be in the E and F fact tables and not with the master data at all).
    To me, this would mean that if the status changed, a whole new row would have to be loaded - and the old row removed? Would one use some kind of selective deletinon?
    It seems that a navigational attribute would be best placed in the E/F fact tables.
    Best Regards,
    Casey

    @kkc - thanks for the reply but I already knew about the E and F fact tables - I just did not know that compression takes care of the status field
    @Wond - Above you said "Yes it will be a whole new record will be sitting in the cube, once the status changes the cube will have three records when doing compression the two will wipe out itself and you will remain with one."
    So how does it decide which record stays around? By the loading date? Also, is there any good documentation out there that would say this?
    Thanks a lot!
    PS - I also found this thread but it speaks of the ODS and using 0RECODMODE (it does not say how to set this with the new  BI 7.0 and the "Transformations"/"Data Transfer Processes")
    Modeling "Status" for transaction data in a cube
    Edited by: Casey Harris on Feb 29, 2008 11:28 AM

  • MB5B Report for Date Wise Stock and Value

    Hi,
    I am Taking MB5B Report for Date Wise Stock and Value.
    But I have one doubt all stocks is coming or not in these report like Unrestrected Stock,Return Stock.Blocked stock,Transist stock,Restrected Stock,qty Inspection Stock.
    I have another Doubt in these report three Stock type indicaters are there like these.
    1.Storage Location / Batch Stock
    2.valuated Stock
    3.Special Stock.
    But i have one doubt what is defferent these
    1.Storage Location / Batch Stock
    2.valuated Stock

    Hi Prasad,
    Yes MB5B report consider the Unrestricted, Quality, Blocked, Transit stock and restricted stock. Not sure about Return Stock.
    If you select the Storage location/Batch stock radio button then the system will display all the possible stock from the storage location and the corresponding batch also.
    If you select Valuated stock radio button then system will show only the valuated stock not the Non-valuated stock. Because Non-valuated material type is available in SAP system will not show those stock suppose if you select the Valuated stock radio button.
    Regards
    Karthick

  • Could not see the data in the cube

    Hi all,
    Iam trying to load data from one cube to another. Everything is fine but Iam not able to see the data in the new cube.
    I created 2 cubes--> Cube A new & cube B new which are copied from existing cubes cube A and Cube B. I need to load data from these new cubes cube Anew & cube B new to another cube (cube C new)  which is also a copy of existing cube C. I created update rules and activated them.I tried to load the data into the cube C new. I can see the load to be green but I cannot see the data in the cube C new. it shows 0 records in cube C new. there are records in cube A new & cube B new.
    Can anyone plz help me out.
    Thanks in advance.
    Thanks,
    Preethi.

    Hi Balu,
    I dont know what exactly the problem was but even after the load was successful i could not see any records in the new cube. The source cubes had 60,446 and 7595 records. but the target cube had 0 records.
    I ran the program SAP_FACTVIEWS_RECREATE as Bhanu suggested and deleted the data from the new cube(inspite of having 0 records I deleted them). I tried to load the data again which was successful and I could see the data in the new cube.
    Hope its clear.
    Thanks,
    Preethi.

  • Input ready query is not showing loaded data in the cube

    Dear Experts,
    In Input ready query we have problem that it is not showing the values which was not entered by throught hat query. Is any settings in input ready query that we can do to populate the loaded data on the cube as well as data entered through Input ready query itself.
    Thanks,
    Gopi R

    Hi,
    input ready queries always should display most recent data (i.e. all green and the yellow request). So you can check the status of the requests in the real-time InfoCube. There should exist only green requests and maybe at most one yellow request.
    In addition you can try to delete the OLAP cache for the plan buffer query: Use RSRCACHE to do this. The technical names of the plan buffer query can be found as follows:
    1. InfoCube\!!1InfoCube, e.g. ZTSC0T003/!!1ZTSC0T003 if ZTSC0T003 is the technical name of the InfoCube
    2. MPRO\!!1MPRO, e.g. ZTSC0M002/!!1ZTSC0M002 if ZTSC0M002 is the technical name of the multiprovider
    If the input ready query is defined on an aggregation level using a real-time InfoCube, the first case is relevant; if the aggregation level is defined on a multiprovider the second case is relevant. If the input-ready query is defined on a multiprovider containing aggregation levels again the first case is relevant (find the real-time InfoCubes used in the aggregation level).
    Regards,
    Gregor

  • Can not find data in virtual cube

    Experts,
    I can not find data in virtual cube with services function module (copying Z_RS_BCT_FIGL_DATA_GET_VC10 from RS_BCT_FIGL_DATA_GET_VC10).The standard cube is maintained with data.
    Can anybody tell me what could be the reasons the data is coming through Virtua cube.
    Thanks,
    AK

    Hi,
    i_basic_infoprov is the name of the provider where the data is selected from. This must be a basic provider that contains data. What I meant was, create a copy of fm RS_BCT_FIGL_DATA_GET_VC,1 maybe as Z_BCT_FIGL_DATA_GET_VC1, and enter the name of this fm in the properties of your virtual cube. For that fm it might also be a good idea to enter a default value for i_infoprov. And this should be the name of your virtual cube.
    regards
    Siggi

Maybe you are looking for