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

Similar Messages

  • OLAP variable selection in Infopackage

    Hi,
    I have a Requirement to load data for the last 14 days everyday,i.e Truncate laod,for that i have crated a userexit variable in Quey designer,that variable picks the data for last 14 days default.it is working fine in query on calday restriction,but that variable i used in Infopackage level for calday selection parameter,but its not working, my cube getting load for all days.Can any one help on this.
    Thanks
    Naveen.

    Hi..
    I am not sure if it helps or not.. but in PC there is option wekly and fortnightly...can you try this...
    REg
    Ram

  • Variables available for InfoPackage

    Hello Gurus;
    Currently in one infopackage, as option to filter the Fiscal Year I use the standard variable 0FYEAR that is defined as SAP Exit.
    This works fine.
    However, I now want to add the previous fiscal year.
    I add from the Business Content the variables 0P_FYRL and 0I_FYRL. They are available in reporting, but not a option to select in OLAP variable in the InfoPackage.
    Does anyone know how to add them in the infopackage?
    Thanks in advance,
    Regards;
    Ricardo

    Hi,
    Please check the thread below:
    olap variable
    -Vikram

  • InfoPackage OLAP variables used in the ZXRSRU01 INCLUDE - I_STEP value ?

    Dear All, as I am aware OLAP variables used in InfoPackage Data Selection are processed in the standard user exit (EXIT_SAPLRRS0_001) - INCLUDE ZXRSRU01 where the customer created global reporting variables are also processed when queries are run and are processed according to the value of I_STEP being 1, 2 or 3.
    When processing the variables according to the running of InfoPackages the value of I_STEP in this case seems to be 0. Is this always the case for the value of I_STEP = 0 when processing according to InfoPackage?
    I have meticulously searched documentation and can only find the I_STEP = 0 value when applied to Authorisation processing.
    We are creating separate Includes depending on the value of I_STEP instead of having one great block of code in the ZXRSRU01 Include.
    We obviously want the InfoPackage code to run only when the InfoPackage runs instead of it being checked every time a query is run.
    Also is there an easier way to see where a customer variable is used:
    1) rather than creating a dummy query that uses the variable to restrict a characteristic and using the right click mouse funstion to see where the varaible is used in queries? and
    2) also when the variable is used in InfoPackage selection is there a transaction or feature somewhere to see where this variable is used in these selections as opposed to looking at the table RSLDPSEL via SE16 selecting on variable name
    i.e is there a nice "where used" feature that shows comprehensively where a customer user exit variable is used across the board.
    Thanks
    Mark

    Hi Sarah,
    You don't need any FM for your issue.
    Please try thie sample code :
    DATA: VAR_INPIUT LIKE RRRANGEEXIT.
    CASE I_VNAM.
      WHEN 'ZVAR2'.
       CLEAR L_S_RANGE.
       IF I_STEP = 2."PROCESSED AFTER VARIABLE INPUT
    *Reading value of ZVAR1
        LOOP AT I_T_VAR_RANGE INTO VAR_INPIUT
          WHERE VNAM = 'ZVAR1'.
          CASE VAR_INPIUT-LOW.
    *FILLING ZVAR2
           WHEN 0.
              L_S_RANGE-LOW     = 10.
           WHEN 1.
              L_S_RANGE-LOW     = 20.
          ENDCASE.
          L_S_RANGE-SIGN     = 'I'.
          L_S_RANGE-OPT      = 'EQ'.
          APPEND L_S_RANGE TO E_T_RANGE.
          EXIT.
        ENDLOOP.
      ENDIF.
    ENDCASE.
    Hope this helps
    Joe

  • 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

  • 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

  • Step by step OLAP variable for Infopackage

    Hi Experts
    I have been thru all the threads but am still not clear how to accomplish this.  I am not an ABAPer so am trying to do this in Bex.
    I am in BI 7.0.  I want to create an OLAP variable for 0CO_OM_CCA_9 infopackage to select all cost centers for one 0comp_code.
    I've tried creating a query as well as variable but I can't seem to get it to work.
    I think the problem is all of the various possibilities of Settings in the variable creation i.e. Processed by, repalcement path, etc
    Thanks very much for your help !

    Thank you very much Sven !  This is exactly what I needed.
    I have a couple of additional questions.
    Do I use the variable in this query somewhere or just create it on the Cube?
    For Replacement Rule do I choose query and use the query I've just created or choose variable ?
    I have done this with query in replacement Rule and I can't see my variable in the list for selections in my Infopackage. 
    Thanks for your help
    laura

  • Olap variable in infopackage

    SDN,
    My question is the OLAP variable used at infopackage levl.
    Is that variable got entry when queri runs or from where it gets value?
    I didn't understand this I'm just confused in this regards.
    why olap variable(BEX varialbe ) at ip level
    pls could anybody clarifies this to me?
    thx
    r

    Hi,
    this field is to used to populate date range field dynamically
    suppose u r loading any particular infopackage weekly for previous weeks data (monthly or daily) then u can use option 1 (2 or 0).
    http://help.sap.com/saphelp_nw04/helpdata/en/e1/b7463c32a3fe13e10000000a114084/frameset.htm

  • Problem in OLAP Variable for InfoPackage

    Hi All ,
    My requiremnt is to get all the Blank values for VERSION field from the R/3 to BW .
    So I created a OLAP variable and given that variable in the InfoPackage.
    code i written is
      IF p_vnam = 'ZS_BLKVR'.
        CLEAR: l_s_range.
        l_s_range-sign  = 'I'.
        l_s_range-opt  = 'EQ'.
        l_s_range-low   = '' .
        l_s_range-high  = '' .
        APPEND l_s_range TO p_t_range.
        CLEAR: l_s_range.
      ENDIF.
    Now when iam loading data in BW , it is giving zero records , but there are records in r/3 with blank values for VERSION field.
    in the selection critria it is displaying as '#' for Version in the monitor.
    So is there any other way to get the Blank values VERSION records from R/3
    Thank You.....

    Hi Ravi,
    You can write an ABAP routine to populate the VERSION field. Choose type '6' from the drop-dwon and try the following code,
    loop at l_t_range into l_s_range where fieldname = 'VERSION'.
      l_s_range-low = ' '.
      modify l_t_range from l_s_range.
    endloop.
    If it doesn't work then try to use the other way round. Find out what are the non-zero values possibel for version and exclude all the values from the selection.
    Hope it helps.
    Thanks,
    Soumya

  • ABAP code for custom OLAP variables

    Hi experts,
    We have a custom variant set as customer exit that I have just added to an infopackge for the data selection of 0FISCYEAR infoobject via 7-OLAP Variant. When I click on the magnifying glass under the "details for Type" column, the "Use Variable of OLAP Processor" window appears showing the OLAP Variable and the fiscal year variant. When you hit F6 (check) it should process the variant and return data for the ranges. With this variant we are using there is not data being returned (using the SAP exit variants data is returned).
    I have gone through the forums and have seen people citing the function module EXIT_SAPLRRS0_001 as this is the user exit which houses such abap code. I have seen the variant inside this module and the code itself, but why is it in the infopackage when I click on check (F6) no data is returned? I am getting the feeling this abap code is only executed for reporting. In this case I want the infopackage to select certain data from R/3 (via the use of OLAP variable with custom code) during the load to the ODS.

    Hi Mark,
    If you created the custom fiscal year variant as a customer exit type, I doubt that it'll work.
    Variant is an auxiliary time characteristic. You cannot create it. You can only add new char values:
    BW Customizing Implementation Guide (SPRO tcode) -> Business Information Warehouse -> General BW Settings -> Maintain fiscal year variant.
    Though, maybe I misunderstood your requirements.
    Best regards,
    Eugene
    Message was edited by: Eugene Khusainov

  • Creation of an OLAP variable

    Hai All,
               I need to create an OLAP variable in an infopackage for an object for picking up data from last two months. I mean to say that the object has to pickup all the data pertaining to the last two moths only from the system date without any manual intervention. I see that there is an option in info package where I can select 7-OLAP variable and another option ABAP program. Which one of these is a good way and how to doit? any advise or also any reference to documentationwill be appreciated.
    Thank you very much.
    Message was edited by: vasu vasu

    Hi Vasu,
    > I already created a
    > variable giving an offset but its not showingup in
    > the list of OLAP variable showed in the info package.
    > Is there any other place where I need to do this?
    I experienced the same problem. My solution was to edit the variable and deselect the 'ready for input' option. Also the variable has to be a SAP- or customer-exit variable so that it can run as a background job.
    Best regards,
    Christian Frier

  • Creation of OLAP Variable for Master data

    Dear BW Experts,
    How to Create OLAP Variable for Master data  in SAP BW? What is the use of OLAP Variable?

    The entry column Type (Variable) on the Select Data tabpage indicates a variable time frame in which the data should be requested. The variables are not replaced by concrete values until a request is made. There are eight options:
    Variable            Data request        Description
    0
                          Yesterday
                                            (12am – 12am)
    1
                         Last week
                                            (Monday-Sunday)
    2
                           Last month
                                            (1. (First day - last day of previous month)
    3
                           Last quarter
                                           (1. (First day - last day of previous quarter)
    4
                           Last year
                                          (01. (January 1 – Dec 31 of previous year)
    5
                      User time selection
                                               See below
    6
                       ABAP routines
                                               See below
    7
                         <b>OLAP variables</b>
                                                See below
    <b>Time selections with the help of the variables 0 to 4.</b>
    The variables 0-4 only refer to date fields of the data type DATS.
    <b>User time selection</b>
    Type 5 gives you a free selection of all fields.
    If you select this variable for a field, confirm the selection, and then choose Detail for Type, an additional dialog box appears. In this dialog box you can freely limit the values of the fields and determine the next period value and the number of periods until a repetition.
    Variables are placeholders for values and are not replaced by concrete values until a data request is made. You can also use a Variable for selections when requesting data for an InfoObject, if you choose type 7, confirm the selection, and then choose Detail for Type.

  • OLAP variable

    Hi All,
    I need to find the available OLAP variables in the system.  Any one can suggest me how to do this.
    Regards
    karunakar

    Use Business Content in Admin Workbench, look for Variable under Query Elements. The system table is RSZGLOBV.

  • 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.

  • 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

Maybe you are looking for

  • How do you edit pages in safari?

    Does anyone know how to edit web pages in Safari? I used to use netscape and it was simple: you simply chose the "edit page" option. But I can't find anything like that in Safari.

  • Problems facing while installing Oracle 8i personal edition under win98se

    hello, I am having problems while installing Oracle 8i personal edition under win98se. I am stuck on the creation of database. it always stuck at 85%. I've try installed many many times.. but it still the same.. what can i do? i am using win98 se. is

  • How do I locate and delete the "other" used space on my Ipod 2 ?

    Not only did I get curious about the Autofill button and lose all of my music on my Ipod Nano 2nd Edition but now my Ipod is showing that I have 90% Other stored on it and can't figure out how to locate and delete it! I have looked all over online an

  • Finding user details,messages present and total space consumed

    Hi, i have to find - the total number of users present in the ims server, - the total number of messages present - the total amount of disk space consumed by all messages. when iam executing the command "mboxutil -a" on solaris iam getting all the us

  • How to set up BlazeDS project in FB3?

    Hi , I want to start a new project with Flex,BlazDS and web service. web servces are located in other server by SOAP. I have install BlazeDS in local pc and I do not have a idea how to start set up in Flex Builder and do the project. Please help me .