InfoPackage selection offset with OLAP variable

Hi Bw Gurus,
I have a requirement to load ODS with full upload everytime but in order to reduce repeated loads I am trying to use a DATE field which is not part of communication str. as a selection critera in InfoPacakge.
I changed DS to include this field avaialable for selection and It's working fine when I input date to and from values hard coded in InfoPackage.
Further I am trying to automate this InfoPackage scheduled weekly and I need to include date offset value for this DATE field to load for additional last 2 weeks every time to capture changes for already loaded data.
I have created OLAP customer exit variable having Date interval for Date starting from last 3 weeks to Current DAte and included in InfoPackage selection for DATE field but it's not working. By the way if someone can explain what's meaning for two columns there for TYPE(Variable change to selection.....) and detail for type.
Any clue for reason or any other way to accomplish this requirement?
Thanks in advance,

hi,
can you explain me ,hw you solved the pbm,
the same pbm i am facing.
i am trying to load the data everyweek ( i have date field ),so i have selected OLAP Variable option -7 and there i have selected 0WEEK,but data is not comining from R/3,then i have selected the option -6 abap code,i have written code to get the date range,even though i am not able to retrive the data.
can you suggest me
Thanks
Madhu

Similar Messages

  • Make an offset with a variable

    Hi all,
    In query designer, I want to make an offset with a variable, i explain :
    Now, I modify my date manually. for example, i give in selection screen month and year, 05.2008 and i change this date in 04.2008 with a "-1" offset.
    I want to give the possibility to make in the selection screen one numeric field which change automatically the offset :
    date : 04.2008
    offset : -2
    => date = 02.2008.
    Can i do this we a variable?
    Another way is to ask a second date. (date1, date2) but i prefer make this with an offset.
    I can find anything to do this.
    Can you help me?
    Thanks,
    Adrien

    Hi,
    you can do this with a customer exit variable. Have a look at the [SAP help |http://help.sap.com/saphelp_erp2004/helpdata/en/1d/ca10d858c2e949ba4a152c44f8128a/frameset.htm] on this subject. Basically what you would be doing is programming in Step 2 after the user has entered the value for variable 1.
    Hope this helps.
    Svenja

  • Authorization with OLAP Variable

    Dear all,
    we have the following scenario: we need to built a report where we show e.g. a value per employee.
    In order to establish that user A can only see his own data and not data from user B we did the followoing:
    - Creation of a table ZUSER which contains User-ID (logon) and employee number, e.g. smith / 12345
    - Creation of an authorization variable with type customer exit (Y_SU202) and assign it to InfoObject employee
    - In the customer exit for OLAP variable the coding reads from ZUSER
    So if user A executes the report the system reads the table and fills the variable with the corresponding entry.
    It works fine.
    But I have to assign in the PFCG Role for the corresponding authorization object * (all values); if I enter the name of the OLAP value it doesnt't work. But I need to do that due to the fact that otherwise the user can select via filtering in the report all values as the auth. variable just works for the exection but not for the filtering (when a * is assigned) in the authorization object.
    I tried to enter Y_SU202 and $Y_SU202 in the authorization object; both ways doesn't work.
    Thanks for your support
    Marc
    P.S.: I'm not sure if I should have post this topci to the security forum.

    yes, RSSM setting is fine; i have there two InfoObjects (employee number and costcenter).
    i changed in the role the value to * for both fields for testing. (after $Y_SU202 did not work for the employee).
    It seems that this has something to do with the i_step = 0; if I change it to i_step = 2; the initial execution works.
    But if I filter afterwards in teh query on the employee (select filter value) I see all values which is wrong.
    If i change the coding to i_step = 0 and the variable to input ready I do see all values, too.
    it seems that the auth. check does not work

  • Issue With OLAP Variable

    HI all,
    we have an issue with the OLAP variable. One of the  SAP olap variable(0P-perf1) is processed  as Authorisation. where it should be sap exit. When we try to change at the BEx analyzer it was in disabled status.
    My question here are :
    1) How we can change the processing type?

    Hi,
    Pls refer link
    creation of OLAP  Variable
    http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a55ece09411d2acb90000e829fbfe/frameset.htm
    It may help you.
    Thanks
    Edited by: npathak on Aug 4, 2010 4:09 PM

  • Select list with bind variable does not work

    Hi,
    What can be wrong with a 'select list' with the a simple select
    select omschrijving o, id i
    from basiscodes b
    where domein = 'OPTIES'
    and b.id in
    (select eo.basiscode_id from evenementen_opties eo
    where eo.event_id = :P16_ID)
    The :P16_ID has a value and should give result
    But it does not work at all with 'select list'
    Using the POPUP LOV (display discription, return key value) works nice
    The select retuns less then 10 records

    Hi Flavio,
    As I explained, the P16_ID is an item of the master page (page 16)
    In Page 18 where I want to reuse that value, the item is not there, but I use it to assign
    P18_EVENT_ID with the value in P16_ID and that works fine.
    In an after submit process, I do this :
    declare
    function get_pk return varchar2
    is
    begin
    for c1 in (select EVENEMENT_INSCHRIJVING_SEQ.nextval next_val
    from dual)
    loop
    return c1.next_val;
    end loop;
    end;
    begin
    :P18_ID := get_pk;
    :P18_EVENT_ID := :P16_ID;
    :P18_CREATIE_DT := TO_CHAR(SYSDATE,'DD-MM-YYYY HH24:MI:SS');
    :P18_CREATIE_USER := APEX_APPLICATION.G_USER;
    end;
    The value P16_ID is there before I open page 18
    I made a display item that displays the value P16_ID
    If I change the LOV select in :
    select b.omschrijving o, b.id i
    from basiscodes b
    , evenementen_opties eo
    where b.domein = 'OPTIES'
    and b.id = eo.basiscode_id
    and eo.event_id = 16
    then it returns the value I want : 1 record
    You see, I'm a really new one in apex.
    Forms 6i was easier for me...
    Regards Jules
    null

  • MySQL:  SELECT * FROM with a Variable from an HTML form

    Hello,
    I would like to insert the variable "find" from the HTML form below in the MySQL "SELECT * FROM" query beneath it.  In other words, where the word "santafe" appears below, I would like to insert the variable "$find."  But I can't quite get it to work.  How do I do it?
    Thanks in advance,
    John
    <form action="tsearch11.php" method="post">
    <label>Enter Topic:
    <input type="text" name="find" size="55"/>
    <input type="hidden" name="searching" value="yes" />
    <input type="submit" name="search" value="Search" />
    </label>
    </form>
    Then, on tsearch11.php:
    <?
    mysql_connect("mysqlv3", "username", "password") or die(mysql_error());
    mysql_select_db("sand2") or die(mysql_error());
    $find = strip_tags($find);
    $find = trim ($find);
    $t = "SELECT * FROM santafe"; 
    $y = mysql_query($t);
    ?>

    Putting a form variable in a SQL query to look for table or column names requires an extra level of security. You need to create an array of the valid names, and check that the form variable is in that array.
    $find = get_magic_quotes_gpc() ? stripslashes($_POST['find']) : $_POST['find'];
    $find = mysql_real_escape_string(trim($find));
    // create an array of valid table names
    $tables = array('santafe', 'sanfernando', 'guadalupe');
    // check that the variable is in the permitted array
    if (in_array($find, $tables)) {
      $t = "SELECT * FROM $find"; 
      $y = mysql_query($t);
    } else {
      $error = 'Sorry, you selected an invalid table.';
    In the page itself, check whether $y exists before using it. Otherwise display the error:
    if (isset($y)) {
      // display the results
    } elseif (isset($error)) {
      echo $error;

  • Search help needed! select box with 2 variables? is it possible

    Using coldfusion 8 and MySQL.  I need to make a search form that has a drop select that displays the department and category together in the drop select.
    Is it possible? what would the form and search query look like. any help would be appreciated. thanks in advance.
    example: each is a line item for the drop select. then when one is selected it returns the results if records are found.
    mens/shoes
    mens/clothing
    mens/accessories
    womens/shoes
    womens/clothing

    Gee, what a coincidence, my current project has one of those.  My approach is to include a concatonated field in the query and use it for the desired attribute of cfselect.
    The details of the contcatonated field depend on the db.  I don't use mySql but if I wanted to know badly enough, I would google "mySql concatonate"

  • OLAP Variable for Filter Selections in DTP

    Hi
      In BI 7.0 DTP i am using a ZZ OLAP Variable for a Filter on Location.
      How/Where i can check the values defined for that OLAP Variable and if i want to update that selection with few new values
    Thanks

    Hi,
    Please check the threads below:
    Re: Infopackage - ABAP routine or OLAP variable
    Re: How to create OLAP Variable in DEV
    Re: Infopackage - ABAP routine or OLAP variable
    Re: creation of OLAP  Variable
    -Vikram

  • Urgent::::What is OLAP Variable

    Hi Experts,
    I want write my own OLAP Variable in data selection in info package.....
    So where is the editor where i can write my own logic for a particular OLAP Variable????
    Pls share some knowledge of OLAP Variable in BW.
    Some good document on OLAp variable....
    Thanx in Advance????
    Naween

    Hi Naween,
    Three things need to be done: -
    1. In the Query Designer, create a New Variable based on the InfoObject that has the same data type as the value in your infopackage field selection. For example, create a variable for InfoObject 0CALDAY if your selection field is a date. This can be done in any query that has the required InfoObject. The processing of this variable must be 'CUSTOMER EXIT'.
    2. In CMOD, create code for this variable. Sample code for the derivation of first and last dates for year based on 0CALDAY is affixed below: -
    DATA: f_date LIKE sy-datum,
          f_date2 LIKE sy-datum,
    f_date3 LIKE sy-datum.
    WHEN 'Z1ST_LST'.
    returns first and last day in year
        CLEAR f_date.
        CLEAR f_date2.
        CLEAR f_date3.
        f_date = sy-datum.
        CLEAR l_s_range.
        concatenate f_date+0(4) '0101' into f_date2.
        concatenate f_date+0(4) '1231' into f_date3.
        l_s_range-low  = f_date2.
        l_s_range-high = f_date3.
        l_s_range-opt  = 'BT'.
        l_s_range-sign = 'I'.
    APPEND l_s_range TO e_t_range.
    3. Select the InfoPackage 'Data Selection' tab, then 'OLAP Variable' and specify the newly created variable. The values are not prepopulated but only populated at runtime. To review the values that will be populated, select the 'Details for Type' button and the 'Check' (glasses) button in the subsequent screen. If the values are not populated with the 'Check' method, you may have to log off and on to the system.
    Regards,
    Eugene

  • Issue with Default Variable in WAD after Java Patch 7.01.7.31

    Hello all,
    I'm running into an issue with the Web Application Designer Template execution for a particular default variable. This started occuring after Java Patch 7.01.7.31 we had implented over the weekend.
    The issue is when Executing the WAD Template, we have a selection screen with a variable with default values assigned to it. When leaving the default values and hitting Ok to execute  through the screen does not register and stays as is and I get a message at the top with the following: Characteristic Prob % Number has no master data for "1.00" or you do not have authorization.
    This only seems to occur for this default variable on info object Prob % Number, the other default variables seem to work fine. Also another note when clearing out the values it returns data and executes through. The value 1.00 is also a valid value in the cube and also in the output display. If we run this report in the BEx analyzer, the selection screen executes through with the default variable perfectly fine, this is only an issue with the Web Application Designer Template.
    Has anyone ran into this? I've searched and have not found any notes as of yet.
    Thank you,
    -Andy

    Dear Andy,
    Please raise this to SAP, seems like a strange problem this needs to be addressed by OSS note only.
    Close this thread once you get a solution.
    Regards.
    Den

  • OLAP Variable with user exit for Infopackage Selection 0fiscper

    Hi Frds/ Guru's ,
                    I have a requirement to use a OLAP Variable for Fiscal year period 0fiscper(Characteristic ) in the Infopackage Selection. . I need to extract the data for Previous Year and Current Year , that is to be automatically selected with a OLAP Variable . The standard one's provided by SAP are not satisfying my requirement,as they are getting populated with SAP Exit and I am not getting the ranges .I am planning to create a variable and use the processing type as Customer Exit and Populate it with ABAP code in respective Enhancement RSR00001.
    Even Can I create a ABAP Routine ? Please suggest me which is better to do in respect to performance of dataload  , will be really glad if anyone can provide some code for doing this as u might have faced the situation sometime .
    I have checked with all the threads available , could get some idea but will be really thankful if u gimme some hints in writing the code , at Exit level and routine level .
    Thanks,
    Krish

    thnx

  • Infopackage Selections Tab-OLAP Variable/ABAP Routine

    Hi Experts
    In my Infopackage Selections Tab i had Cal Mon/Year field....
    As per my requirment i have to write a selection condion that when we execute info package (it is a monthly data load)  it will extract data only for the months greater than or equal to current month
    Please update me on how can i achieve this either by using OLAP Variable or ABAP Routine in infopackage...will be great if can provide the required ABAP Code
    Thanks in Advance

    here's an example that fills the fiscal year from last month (bold is customer code... the rest is standard):
      data: l_idx like sy-tabix.
      read table l_t_range with key
           fieldname = 'PARAM_P_GJAHR'.
      l_idx = sy-tabix.
      data:
      v_caldy type /BI0/OICALDAY,
      v_calmn type /BI0/OICALMONTH,
      v_calyr type /BI0/OICALYEAR.
      v_caldy = sy-datum.
    determine first day*
      v_caldy+6(2) = '01'.
    determine last month*
      subtract 1 from v_caldy.
      v_calyr = v_caldy(4).
      l_t_range-sign   = 'I'.
      l_t_range-option = 'EQ'.
      l_t_range-low    = v_calyr.
      modify l_t_range index l_idx.
      p_subrc = 0.

  • Can't find 0FYTLFP OLAP Variable in InfoPackage Data Selection tab on 3.5

    On BW 3.5, when generating an InfoPackage with the datasource as Purchasing Data(80PUR_C01), under Data Selection tab, for the InfoObject 0FISCPER, I selected 7 (OLAP variables)for the Type column, then click the button next to it and under the column of Details for Type to bring up a window, but when expending the OLAP Variable field list, can't find the following value in the list which shows up on BW 3.1:
    0FYTLFP     0FISCPER Cumulated to Last Fiscal Year/Period (SAP Exit)
    How to make the above value show up in the OLAP Variable list?   I thought maybe the variable 0FYTLFP needs to be installed in Business Contents, but there is no variable object type in Business Content.  It sounds like a SAP Exit, but how to make the SAP Exit value show up on BW 3.5?
    Thanks for everyone's input!

    hey Rohit,
    Besides the three variable values in the list on BW 3.5, now I find a new one in the list, called "0E_ROLE     0SR_ROLE     Role (SAP Exit)", I have no idea why this one shows up now.  Now all the four variables in the list are:
    1. 0CML12LM     0CALMONTH     Last 12 Months Excluding the Current Month
    2. 0CMONTH     0CALMONTH     Current Calendar Month
    3. 0E_ROLE     0SR_ROLE     Role (SAP Exit)
    4. 0S_RQMRC     0REQUID     Most Current Data
    0FYTLFP is still not in the list!   We can't try to create BEx query since our BW 3.5 system is just installed and we have not got to the step to ceate a query.  I try the 2nd way you suggested by pressing F6 on this variable with the typed in value 0FYTLFP, get the following msg "BEx variable 0FYTLFP could not be evaluated - No error message", that means it would not work on BEx query as well, right? 
    What could be the reason that we can't see 0FYTLFP variable in our new installed BW 3.5?  Do you think our BASIS missed installing sth?
    Thanks
    Message was edited by: Kevin Smith

  • OLAP Variable in DTP - Not able to save the selection

    Hi Guru's
    We are on BI 7.0 and supportpack 13. I am facing an issue with the OLAP variable in DTP filter . I am not able to save the selection/filter  within DTP via OLAP variable. I am able to test the values of the OLAP variable within DTP screen (just like in infopackage) , but when i save it, it does not appear in the selection.
    Have any of u faced this issue? I searched for SAP notes , but could not find any matching this issue. Could u please help?
    Thanks & regards

    Hi Voodi,
    Thanks for ur response. But i have checked that too. I am not saying that the value need to appear in selections screen. The filter in DTP is not showing a check tick mark and also no variable is found even though i had saved it and activated the DTP.
    I also checked running thisDTP and checked the selections in the header of the monitor. No selection is shown there.
    Thanks

  • OLAP variable in the Infopackage

    Hi folks,
    I would like to use OLAP variable in the infopackage so I selected Type 7 in the infopackage and selected OLAP variable '0DAT' since I need the current date. By default, the current date is selected as 'From' in the infopackage selection. How can I change this so that
    1) the infopackage uses this OLAP variable for the 'To Value' field and not 'From Value'  and keeps the 'From Value' blank. 
    2) the infopackage uses this OLAP variable for the 'To Value' field and manually a date can be entered for the 'From Value'.
    Thanks for your help.

    Probably not possible via type 7 but possible via type 6
    use the code below
    data: l_idx like sy-tabix.
    data: lower_limit LIKE SY-DATUM.
    data: upper_limit LIKE SY-DATUM.
    upper_limit = sy-datum .
    lower_limit = sy-datum - 1000000.  This should set lower limit to a least possible value
    read table l_t_range with key
         fieldname = 'BUDAT'.
    l_idx = sy-tabix.
    l_t_range-low = lower_limit.
    l_t_range-high = upper_limit.
    l_t_range-sign = 'I'.
    l_t_range-option = 'BT'.
    modify l_t_range index l_idx.
    p_subrc = 0.
    Whenever you need to change your lower limit you have to enter inside the code and change it.
    Regards
    Anindya

Maybe you are looking for