Can I use return table in non-cumulative cubes upd rules?

hi,
Is it possible to use return table in non-cumulative cubes upd rules?
What I mean is:
In non-cumulative cubes I need to use Automatic Time Conversion for time chars and when I use return table I have to map fields from comm structure to return table.
I am designing stock cube (with granularity on storage bin and quant level) where material movement data is took from Transfer Order docs. Data for source and target storage bin are in one document item, so I have to split each record.
Regadrs,
Andrzej
ps. Maybe somebody has some technical documentation on Automatic Time Conversion?

Hello Andrez,
  May be this code will be useful for you.
*data decleration
data: num type i,
      num1(2) type c,
*variable for fiscper
      lv_fiscper type RSFISCPER,
*variable for the calendar month
      lv_calmonth type RSCALMONTH,
*variable for the period
      lv_period type T009B-POPER,
*variable for the fiscal year
      lv_year type T009B-BDATJ,
*variable to find out the calendar quarter
      lv_month TYPE RSCALMONTH,
      lv_calquarter type RSFO_CALQUARTER.
*ICUBE_VALUES contain data for cube.Put these value into RESULT_TABLE
RESULT_TABLE = ICUBE_VALUES.
*add 12 times entry into result_table for 12 months
do 12 times.
append RESULT_TABLE.
enddo.
*processing for the split the value into 12 periods
loop at RESULT_TABLE.
num = num + 1.
num1 = num.
*divide the value by 12 for each month
  RESULT_TABLE-/BIC/ISMPLNRV = COMM_STRUCTURE-/BIC/ISMPLNRV / 12.
  RESULT_TABLE-CRM_CURREN = COMM_STRUCTURE-CRM_CURREN.
case strlen( num1 ).
WHEN 1.
concatenate  RESULT_TABLE-fiscyear '00' num1 into lv_fiscper.
RESULT_TABLE-fiscper = lv_fiscper.
WHEN 2.
concatenate  RESULT_TABLE-fiscyear '0' num1 into lv_fiscper.
RESULT_TABLE-fiscper = lv_fiscper.
endcase.
lv_period = lv_fiscper+4(3).
lv_year = lv_fiscper(4).
*find out the calendar month from the period and year
CALL METHOD CL_RSAR_FUNCTION=>FISCPER_CALMONTH
  EXPORTING
    I_FISCPER  = lv_PERIOD
    I_FISCVRNT = 'Z9'
    I_YEAR     = LV_YEAR
   I_CASE     = 0
  IMPORTING
    E_CALMONTH = lv_calmonth
RESULT_TABLE-CALMONTH = lv_calmonth.
*find out the calendar quarter from the fiscper
concatenate lv_fiscper0(4) lv_fiscper5(2) into lv_month.
*find out the calendar quarter
  if not lv_month is initial.
    CALL METHOD CL_RSAR_FUNCTION=>MONTH_QUARTER
      EXPORTING
        I_MONTH   = lv_month
      IMPORTING
        E_QUARTER = lv_calquarter.
    if sy-subrc <> 0.
      lv_calquarter = '00000'.
    endif.
  else.
    lv_calquarter = '00000'.
  endif.
  RESULT_TABLE-CALQUARTER = lv_calquarter.
  modify RESULT_TABLE.
endloop.
Regards
Gopal

Similar Messages

  • Validity Table in Non cumulative cube

    Hi Friends,
    What is the use of validity table in Non cumulative cube?
    I have already studied the document 'How to Inventory
    Please can any one explain me with example.
    Thanks & Regards,
    Ramnaresh.P.

    Hi,
    Validity table is created for non-cumulative key values.
    Non cumulative key figures are one which are not possible to cumulate such as head count, inventory amount, these are always in relation to a point in time.
    Regards,
    Shiva.

  • Define the Characteristics of the validity table for non-cumulatives

    Hi Friends,
      Here I am designing MultiProvider ( ZCA_M01), based on the Two Business content info cubes (0IC_C03 & 0SD_C03 ) & one customized info cube (ZPUR_C01).
    I done Identification for char & keyfigures also.
    When i trying to activating the Multiprovider, here i am getting the error , error message is : Define the Characteristics of the validity table for non-cumulatives.
    Even here I am attaching the error message help also.
    Message no. R7846
    Diagnosis
    The InfoCube contains non-cumulative values. A validity table is created for these non-cumulative values, in which the time interval is stored, for which the non-cumulative values are valid.
    The validity table automatically contains the "most detailed" of the selected time characteristics (if such a one does not exist, it must be defined by the user, meaning transfered into the InfoCube).
    Besides the most detailed time characteristic, additional characteristics for the InfoCube can be included in the validity table:
    Examples of such characteristics are:
    •     A "plan/actual" indicator, if differing time references exist for plan and actual values (actual values for the current fiscal year, plan values already for the next fiscal year),
    •     the characteristic "plant", if the non-cumulative values are reported per plant, and it can occur that a plant already exists for plant A for a particular time period, but not yet for plant B.
    Procedure
    Define all additional characteristics that should be contained in the validity table by selecting the characteristics.
    In the example above, the characteristics "plan/actual" and  "plant" must be selected.
    The system automatically generates the validity table according to the definition made. This table is automatically updated when data is loaded.
    Please take as a high priority.
    Thanks & Regards,
    Vanarasi Venkat.

    Hi Venkat,
    If you want to include 0IC_C03 cube in your multi provider the you must make sure that the time characterestics ( 0CALDAY, 0CALMONTH ....) are present in all of the other info providers which you are including in the MP. The Time char to choose depends upon the Inventory cube in which you have mentioned during the definition. As you are using the standard cube 0IC_C03 it has the time char as 0CALDAY. Try to include this in all the other info providers and dont include more tha one Non-cumulative in the MP.
    Try this and see if it helps....

  • HT3354 how can i use one table for reference to another

    how can i use a table for a referance to another eg when i type a word in a cell, i will like it to match the word with another table then return the information in the cell i am using

    you can use vlookup() (or any of the lookup family of functions) to locate an item based on a key value:
    Here is an example of something you can do with two tables:
    The table on the right is title "Data" and stores a list of names with age and favorite color.
    The table on the left uses the value in the first column to lookup up information in the table Data
    in the table on the left:
    B2=IFERROR(A2&" is " & VLOOKUP(A2, Data :: A:D, 2, 0)&" years old and likes the color "& VLOOKUP(A2, Data :: A:D, 3, 0), "NOT FOUND")
    I know this look complicated.  so I'll break it up into smalled pieces:
    first the "&" is called the concatenate operator and joins two strings.  like this:
    a string is a set of characters between double quotes.
    so "string 1" & "string 2" becomes "string 1string2"  or "Sam " & "Jones" becomes "Sam Jones"
    you can use cell references instead of strings directly in which case the concatenation is performed on the contents of the cells.
    so if cell A1 contains "Hi " and the cell A2 contains "There"  then A1 & A2 will result in "Hi There"
    so you could add the formula
    A3=A1 & A2
    this is short hand for select cell A3 then type everything including the A3 so that A3 contains "=A1 & A2" (omit the double quote)
    OK.  So the formula I provided concatenates several items together:
    it concatenates A2, then the string " is " then a formula, then the string " years old and likes the color " then a formula
    the two formulas (highlighted in blue) perform a lookup of the value in cell A2 in columns A thru D of the table named "Data".  If if finds the value in cell A2 in the first column of the lookup range in the table Data (column A) then it returns the value from the same row but in the second or third column.
    all that is in a function calld iserror() to trap the condition where the calue you enter in A2 does not exist in the table Data:
    You will find the Numbers users guide and function reference helpful.  You can download then from Apple here:
    http://support.apple.com/manuals/#productivitysoftware

  • Can we use return statement in procedure?

    Can we use return statement in procedure or we can use more than one return statement in procedure?

    HamidHelal wrote:
    NOReally? Did you at least test it? You can use RETURN in procedure or in anonymous PL/SQL block. The only restriction is you can't specify return value:
    SQL> begin
      2      dbms_output.put_line('Before return');
      3      return;
      4      dbms_output.put_line('After return');
      5  end;
      6  /
    Before return
    PL/SQL procedure successfully completed.
    SQL> create or replace
      2    procedure p1
      3      is
      4      begin
      5          dbms_output.put_line('Before return');
      6          return;
      7          dbms_output.put_line('After return');
      8  end;
      9  /
    Procedure created.
    SQL> exec p1;
    Before return
    PL/SQL procedure successfully completed.
    SQL> begin
      2      dbms_output.put_line('Before return');
      3      return 99;
      4          dbms_output.put_line('After return');
      5  end;
      6  /
        return 99;
    ERROR at line 3:
    ORA-06550: line 3, column 5:
    PLS-00372: In a procedure, RETURN statement cannot contain an expression
    ORA-06550: line 3, column 5:
    PL/SQL: Statement ignored
    SQL> create or replace
      2    procedure p1
      3      is
      4      begin
      5          dbms_output.put_line('Before return');
      6          return 99;
      7          dbms_output.put_line('After return');
      8  end;
      9  /
    Warning: Procedure created with compilation errors.
    SQL> show err
    Errors for PROCEDURE P1:
    LINE/COL ERROR
    5/9      PL/SQL: Statement ignored
    5/9      PLS-00372: In a procedure, RETURN statement cannot contain an
             expression
    SQL> SY.

  • Can I use a Power PC non intel Mac Mini as an external HD with my iMac 3.06

    Can I use a Power PC non intel Mac Mini as an external HD with my iMac 3.06 Intel Core Duo
    I can't figure out how to get this to work. Is it possible?

    WildBull wrote:
    Will it work if I connect via usb instead of firewire?
    No. There is no "USB Target Disk Mode".
    Just so we're clear, when you start your Mac mini in FireWire Target Disk Mode (TDM - holding T on startup), do you see a FireWire icon on the Mac mini's display? IIRC, it's not required that the Mac mini be connected to a display for TDM, but it would help diagnose whether or not the mini is actually starting in this mode.

  • How can I  extract non-cumulative cube data to another cubes ?

    Dear Expert,
             I copied inventory cube 0ic_c03 to  a new cube : ZIC_C03  , then I loaded the data of 0ic_c03 to the new cube ZIC_C03 . 
    the loading was sucessful, but  the result of  report of the ZIC_C03 was not correct. After looking into the problem, I found out
    the new cube can successfully extract data related with "Goods movement" & "Revaluation", yet the extract of "Open Balance" does not seems to work.
             I have read through Note:375098, in which I could not find (InfoObject 0RECORDTP) in my start routine as mentioned in the solution
    ,and the note was not mentioned valid for BW 3.5 release.
             How can I  extract non-cumulative cube data to another cubes correctly in BW3.5 release SP20? 
       Thanks !

    Hi,
    Check Routines in Update rules wether same code is wrriten in  new cube
    cheers,
    Satya

  • Using table comparison can we use multiple tables as source?

    Using table comparison can we use multiple tables as source?
    Thank you very much for the helpful info.

    Table Comparison
    1) Input Data coming in
    2) Comparison table (table to which the data is compared)
    3) Output (input rows with respective opcodes based on the comparison result of input dataset with the comparison table)
    If your question is whether table comparison can accept union/join of multiple table sources, you can achieve by using merge/query transforms and then feeding to table comparison. Here, you have to be careful about choosing the primary keys inside table comparison

  • Can I use Read table

    Can I use read table instead of multiple select & loop statements.
    Any one please give me the sample code ..how to do it.
    Thanks in advance

    Hi,
    Yes you can use read instead of nested loops and select which will affect the performance.
    REPORT  zkeerthi_ITABLE9                          .
    tables:vbap,vbak,vbkd.
    data:begin of it_vbap occurs 0,
         vbeln like vbap-vbeln,
         matnr like vbap-matnr,
         end of it_vbap.
    data:begin of it_vbak occurs 0,
         erdat like vbak-erdat,
         ernam like vbak-ernam,
         vbeln like vbak-vbeln,
         end of it_vbak.
    data:begin of it_vbkd occurs 0,
         konda like vbkd-konda,
         kdgrp like vbkd-kdgrp,
         vbeln like vbkd-vbeln,
         end of it_vbkd.
    data:begin of it_final occurs 0,
         vbeln like vbap-vbeln,
         matnr like vbap-matnr,
         erdat like vbak-erdat,
         ernam like vbak-ernam,
          konda like vbkd-konda,
         kdgrp like vbkd-kdgrp,
         end of it_final.
    parameters:v_matnr  type vbap-matnr.
    select vbeln
           matnr
           from vbap
           into table  it_vbap
           where matnr = v_matnr.
    select erdat
           ernam
           vbeln
           from vbak
           into table it_vbak
           for all entries in it_vbap
           where vbeln = it_vbap-vbeln.
    select konda
           kdgrp
           vbeln
           from vbkd
           into table it_vbkd
           for all entries in it_vbap
           where vbeln = it_vbap-vbeln.
    loop at it_vbap.
    read table it_vbak with key vbeln = it_vbap-vbeln.
    move :it_vbak-erdat to it_final-erdat,
          it_vbak-ernam to it_final-ernam,
          it_vbap-vbeln to it_final-vbeln,
          it_vbap-matnr to it_final-matnr.
          append it_final.
    read table it_vbkd with key vbeln = it_vbap-vbeln.
    move:it_vbkd-konda to it_final-konda,
         it_vbkd-kdgrp to it_final-kdgrp.
         append it_final.
    endloop  .
    sort it_final by matnr.
    loop at it_final.
    write:/ it_final-vbeln,
         it_final-matnr,
         it_final-erdat,
         it_final-ernam,
          it_final-konda,
         it_final-kdgrp.
    endloop.

  • Urgent : Query on Non cumulative cube

    Dear BI Experts,
    I have a non cumulative cube to help me report Stock Balance. It has stock entries from Jan till June,2006. When I query on the cube to report the balance as of Current Period (July,2006) it doesnot return anything. What I expected is that it would show me current stock balance (from Jan till June,2006) though my selection date is in July where there is new stock update done in July.
    I tried compression on the cubes as well but didnot change the result.
    Can anybody help.
    Kind regards,
    priyadarshi

    Hi Riccardo,
    Thanks for your very useful answer. I have "Company" , "SetOfBooks" , "Material" & "0CALDAY" in my validity table. Here For every combination I see a record in the validity table with "Fixed To Time" set with the last transaction dates for the combination. But I would like to preset the "Fixed To Time" for each record to some value like "31-12-9999" .
    Should this be possible & how ?
    Regards,
    priyadarshi

  • Activation error on Multi Provider which has Non-cumulative Cube

    Hi,
    My company has upgraded the BI 7.0 from 3.5.
    It is working fine so far.
    But I met the below message and could not activate it when I generate the multi provider which has Non-cumulative Cube.
    Define the characteristics of the validity table for non-cumulatives (Message no. R7846)
    And then I checked the Single cube but Single cube has no error.
    I think this is program error and searched the notes in OSS but could not find.
    Does any expert know this issue?
    Thank you.

    Hi lee,
    validity slice tables need to be defined for cubes using non cumulative key figures.
    In this we need to specify the characteristic combination on which this table has be maintained.
    The maintanence can be done from cube change mode, menu bar extras--> maintain non cumulative values.
    This table constantly gets updated with validity dates as we upload data.
    An report on this can be seen in tcode RSDV.
    Naveen.A

  • Validity slice is not correct for non-cumulative cube

    Hello Expert,
    There are two non-cumulative cube, say cube1 and cube2. Cube2 has only one more dimension of PLANT than Cube1.
    Cube2 is copied from cube1 and change the char of validity.
    Cube1 & cube2 use the same fill data source. That is, first load with opening balance and second with delta.
    char of validity for cube1: calendar day & material
    char of validity for cube2: calendar day & plant.
    The query based on cube1 works well. To say cube2, the validity slice(in TXN RSDV or TBL /BIC/TCUBE2) is not correct. There is only one record which contains BLANK plant.
    There are plants in F table.
    I tried the following steps to recovery the validity slice, however, it made no sense.
    1) PGM RSDG_CUBE_VALT_MODIFY to rebuild the validity slice structure
    2) FM RSDV_VALID_RECREATE with I_REBUILD_FROM_FACT = 'X' to create validity slice from fact table.
    Would you please suggest?
    Thanks
    XY

    Hi XY,
    For sure, running the RSDV_VALID_RECREATE function module in SE37 will recreate the validity table. And you can use the parameter "X"  in the parameter I_REBUILD_FROM_FACT if the entire fact table should be  read.
    Also, to change the validity slice manually in tcode RSDV you should:
    - overwrite the column 'To mode' with a 'F', which mean Fixed
    - & then the 'Fixed to time' with your new value.
    There is a program which allows you to modify it: Program   > RSDG_CUBE_VALT_MODIFY
    At
    Nadja Xavier

  • More than Non-cumulative cubes in one MultiProvider

    Hi There,
    I have got two non cumulative cubes and want to build a MultiProvider on them.
    Got information at couple of places on help.sap.com at one place it says MultiProvider can have more than one non-cumulative cubes at other place it says it can't. What is the right suggestion?
    Thanks
    Vikash

    Hi,
    From the performance perspective you should not use more than one Non Cumulative Infocube in a Multi Provider. If you user more than one the query will not execute parallel and execute in sequential which leads to delay in query run time.
    This is a recommendation from SAP not to use morethan one Non Cumulative Cubes in a MP.
    Cheers

  • Non-cumulative cubes require 0CALDAY in Netweaver 2004s?

    Dear all,
    I just noticed, that under NW2004s you are not able anymore to activate a cube (containing non-cumulative data, like stock data) that does not contain 0CALDAY as a time characteristics.
    So far our stock cube is only based on 0CALMON and I have not planned to change this. It worked for many years and I really do not need 0CALDAY in there...
    Does someone know, why this has changed and whether I can do anything against it? Is there some kind of documentation or information regarding this change?
    Thanks,
    Andreas

    Hi,
    this happesn becuase non-cumulative aggreagte based on key date( ie.e values of the key figures till that date value) and if there is no key date given in the query then they take 0CALDAY as defualt key date.
    Now in some cases the two cubes may be able to show the correct data becasue of aggregation happening on that level may bring the correct result but in some cases the date could be different and thats why the values are not macthing
    Thats why it is not allowed to use more then one non-cumulative in a multicube.
    Thanks
    Ajeet

  • Compress non-cumulative cube

    Hi Gurus! I'm working on a retail project. I've created an infocube based on 0RT_C36 to keep the stock movements. It is a non-cumulative cube.
    After the load of the initialization data (2lis_03_bx) the compression with the option "no marker update" unchecked runs fine. The process compress about 300.000 records in a few minutes.
    But after the load of historical movements, the initialization of 2lis_03_bf, the compression with the option "no marker update" checked runs for more than 10 hours. There are 400.000 records loaded in the fact table (F table). I've checked in ST22, ST21 and no errors or dumps appear. In SM50 the process was running and the number of inserted records was 250.000. After that the basis gay kill the compression...
    Is it normal? Is there anything I can check to speed up the process?
    Thanks!

    Hi Federico,
    This a common problem.
    You can find also another message in this Forum section with the same problem.
    You need to restrict the number of the request that you are going to compress for every job. Try also to enlarge TableSpace, in particular the temporary TableSpace, that you can subsequently reduce.
    Consider that any other job, like query from user or other uploads, reduce the speedof the compression.
    Ciao.
    Riccardo.

Maybe you are looking for