Formula variable user exit.

Hello experts;
I will provide max points for help with this.
In query designer can I access a key figure from another cube and use it in a formula?
I cannot use multi-cube in this solution so I was looking into creating a formula variable using a user exit to access a key figure stored in a different cube.
Ex:
I have a Tracings cube with customer and material cost information.
I need to calculate the cost per patient for Absorbent material.
I can get the customer cost for Absorbent material but the number of patients is stored in a different cube called Census information.
Since the Census information is not related to a material (only customer) I cannot get the number of patients together with the cost of the absorbent material. I was hoping to access the Census information (number of patients) from the query calculating the cost per patient.
Thanks
Den

I really don't see how you can implement it using exit variable even if you can read data from other cube in exit. If you still want to explore it, refer the following thread - How to read data from an InfoCube in BI 7.0?
Why can't you build a multiprovider - these kind of requirements are precisely the reason why multiprovider is there (when you need information present in multiple infoproviders in the same report)

Similar Messages

  • How can i do a variable User exit that present the values before execute

    Hi Gurus,
    How can i do a variable User exit that present the values before execute, i need this:
    a variable that calculate SYS-DATUM until 30 days before (I got the code) but this  variable run automatic because is user exit, i want this variable but first present the values, not execute automatic, this is because the users want the report that automatic present the values , help

    Hi,
    Refer the below links,
    http://documentation.softwareag.com/natural/nat424mf/pdf/ops_mf/conf_usrex.pdf
    http://www.erpgenie.com/component/content/article/1097
    http://www.apentia-online.at/UP/Apentia/files/Article/SAP_BW_User_Exits_and_BAdIs.pdf
    Hope it helps you,
    Regards,
    Ravindra.

  • Filters with variables user-exits on queries

    Is it possible to define complex selection criteria by using the EXIT_SAPLRRSO_001?. Something similar to what we may do a select for Sap:
    Select * from table where ((field1 = value1 and field2 = value2) or (field1 = value3 and field2 = Value4)).
    I guess not, it seems that only allows a range for output as a single variable ...
    If this is not possible, is there any way to filter the data before the show?. I do not care who is among the infoprovider and Bex, who between Bex and Excel ...
    Filters with variables user-exits on queries

    The variable can take any combination that can be specified in a select-option. The criteria used to select these values to be populated for the variable can be as complex as any ABAP program. So all combinations in a select statement are allowed.

  • Steps for Variable User Exit

    Hi All,
    I have to do some coding in my variable exit. I have followed the follwing steps to create a project a write the code. Anyone please confirm if my steps are correct or missing anything.
    1. Go to CMOD, give project name and Click on create.
    2. Enhancements -> give RSR00001. and click on Components.
    3. Double click on 'EXIT_SAPLRRS0_001'. This will bring up the functionmodule in which we can find an include.
    4. Double click on 'ZXRSRU01' Include.
    5. Press Enter for the warning message.
    6. It gave me a message saying that 'the Include doesnot exist, Do you want to create it'. Click Yes. This will bring up a blank ABAP editor.
    7. Write the required code using CASE Statement.
    Am I missing anything here?
    I would be grateful if someone can send me any documents relating to the variable User Exits.
    Best Rgds,
    James.

    Hi,
    Directly go se38 and execute ZXRSRU01 program. Then write a case statement. below is the sample code to calculate default year month variable.
    case v_name.
      when 'ZYRMTH'.
        if i_step = 1.
          read table i_t_var_range
          with key vnam = 'ZYRMTH'
               into ld_s_var_range.
          if sy-subrc ne 0.   " no value exists, assigns default
            c_year = sy-datum(4).
            c_month = sy-datum+4(2).
            if c_month = 1.
              c_year = c_year - 1.
              c_month = 12.
            else.
              c_month = c_month - 1.
            endif.
            concatenate c_year c_month into c_monyr.
            l_s_range-low = c_monyr.
            clear e_t_range.
            l_s_range-sign = 'I'.
            l_s_range-opt  = 'EQ'.
            append l_s_range to e_t_range.
          endif.
        endif. 
    endcase.
    Regards,
    Malli

  • Formula   variable  sap exit

    formula   variable  sap exit   what  are the changes in my report in quary designer

    Hi,
    If you're refering to the InfoObject 0CALYEAR, there is an exit variable available called: 0CYEAR - Current Calendar year
    Which will filter on the current year.
    br
    Mikael

  • Formula Variable Customer Exit

    Hi Gurus,
    I have a requirement where I have to read the one formula variable value ( Replacement path with attribute value ) into customer exit of another characteristic variable .
    For example :
    I have one characteristic formula variable called VAR1 ( which gives the value ) .This value I want to use it in customer exit of another varable  VAR2 ( is it possible to use one formula variable value into another variable ) which I want to use it in Customer exit.
    VAR1  -  Formula Variable
    VAR2  -  Simple Variable with out User Input.
    Example is as below :
    Formula Variable ( VAR1 i.e PLND_DLVRY )  based on this value I want to define another variable APO Version in the Customer
    If it is possible please guide me what is the process. Also I want to make sure which I_STEP I need to use...
    Please guide the best solution.
    Thanks
    Ganesh Reddy.

    Hi Krishnan / Arvind,
    Sorry I was thinking 0PLND_DELRY is nav attribute for 0MAT_PLANT. But 0PLND_DELRY is the quantity field so I can't make this field as a nav attribute. Right now I am populating directly in the Cube using master data. my cube  data looks like
    Fields Description
    F1 = Version
    F2= Material
    F3= Plant
    F4= 0PLND_DELRY
    F5= Calendar Yr/Month
    F6= Concensus Forecast ( Key Figure )
    Condition is Combination of Material and Plant will define 0PLND_DELRY ( Delivery Time )
    F1  |   F2 |  F3  |  F4   |F5  |   F6
    201104 | M001 |200 |  30 |  2011/07 |  5100
    201104 | M002 |200 |  60 |  2011/07 |  6200
    201104 | M001 |300 |  90 |  2011/07 |  4900
    201104 | M001 |200 |  30 |  2011/07 |  7900
    201105 | M001 |200 |  30 |  2011/07 |  5700
    201105 | M002 |200 |  60 |  2011/07 |  6900
    201105 | M001 |300 |  90 |  2011/07 |  4300
    201105 | M001 |200 |  30 |  2011/07 |  7400
    201106 | M001 |200 |  30 |  2011/07 |  5500
    201106 | M002 |200 |  60 |  2011/07 |  6700
    201106 | M001 |300 |  90 |  2011/07 |  4500
    201106 | M001 |200 |  30 |  2011/07 |  7500
    201107 | M001 |200 |  30 |  2011/07 |  5000
    201107 | M002 |200 |  60 |  2011/07 |  6500
    201107 | M001 |300 |  90 |  2011/07 |  4000
    201107 | M001 |200 |  30 |  2011/07 |  8000
    In Order to bring the variance for F6 for Material M001 and Plant 200 then my result is
    Calendar Yr / Mnth = 2011/07
    Current Value = 5000
    Lead Time = 30,  offset = -1
    Version = 201107-1 = 201106 Then
    Prior Value = 5500
    Variance = 5000-5500 = -500
    for Material M002 and Plant 200 then my result is
    Calendar Yr / Mnth = 2011/07
    Current Value = 6500
    Lead Time = 60,  offset = -2
    Version = 201107-2 = 201105 Then
    Prior Value = 6900
    Variance = 65000-6900 = -200
    for Material M001 and Plant 300 then my result is
    Calendar Yr / Mnth = 2011/07
    Current Value = 4000
    Lead Time = 90,  offset = -3
    Version = 201107-3 = 201104 Then
    Prior Value = 4500
    Variance = 4000-4900 = -900
    for Material M001 and Plant 200 then my result is
    Calendar Yr / Mnth = 2011/07
    Current Value = 4000
    Lead Time = 30,  offset = -1
    Version = 201107-1 = 201106 Then
    Prior Value = 4500
    Variance = 8000-7500 = -500
    Every month we get same data with different version and different numbers for all months. Please advise me what is the best solution we can do
    Thanks
    Ganesh Reddy.

  • Selection screen values in global variable user exit

    Hi all,
    I made a project report global variable of type 3 (User Exit) and I develop the related code in enhancement KKDR0001 component EXIT_SAPLKYP1_003. In this code I need the value of project definition that user entered on selection screen.
    Does anybody know how can I get this data?
    Thanks!

    Hi,
    You can do the following for getting project in Earlier screen
    Data: l_string(20) type c
    Field-symbols: <fs> type any.
    l_string = '(Screen)variable name'.
    assign l_string to <FS>.
    Just try above...

  • Variable User Exit

    Hi have a user exit variable in a query (It must concatenate two characteristics from the user entry parameters).
    WHEN 'NOMSOLI'.   " nombre solicitante tarifa compras
          CLEAR: l_s_var, l_s_var2.
          READ TABLE i_t_var_range WITH KEY vnam = 'OS_SALON'
                                                    INTO l_s_var.
          IF ( sy-subrc EQ 0 ).
            LOOP AT i_t_var_range INTO l_s_var2 WHERE vnam = 'OS_EDICI'.
              IF ( sy-subrc EQ 0 ).
                CONCATENATE l_s_var-low '.' l_s_var2-low INTO l_s_range-low.
                l_s_range-sign  = 'I'.
                l_s_range-opt   = l_s_var2-opt.
                APPEND l_s_range TO e_t_range.
              ENDIF.
            ENDLOOP.
          ENDIF.
    I must to take care the user entry parameters of the query : LE,BT,GE..... <,>, = , ..etc
    The final result of the variable shows the follow structure data (because the entry parameters user)::
    I   |GE |S028.006  
    I   |LE |S028.008  
    but when I execute the query, it shows an error about the interval result.
    Some one knows how it works when you have more values entry data?
    Because always I create user exit variables like:
    I   |EQ |S028.006

    Hi MP,
    The code seems to be OK as per your current requirement. Please clear below mentioned points are correct as per what i understand.
    User Input
    1. OS_SALON
    2. OS_EDICI
    -> First input is going to be single.
    -> Second input would always be multiple but single values with various options.
    -> you need to concatenate first value with all the second values and the options of just 2nd one.
    -> After concatenation, you need to validate the result value with the data in the infoprovider.
    -> Validated data then needed in output.
    I can suggest you some alternate method if it is same what i understand.
    Regards
    Raj

  • Variable User Exits

    Previously I have only used CMOD to manipulate variables in queries. However, my current client has BW 3.5 and I have read that the direction now is to use the BADI RSU5_SAPI_BADI.
    Can anybody provide an example of a user exit using the BADI? I know enough ABAP to get by in the old user exit but I don't think my knowledge extends this far.
    I am on BW 3.5 SP13.
    Cheers,

    hi,
    sample code
      INCLUDE ZXRSRU01                                                   *
      DATA: L_S_RANGE TYPE RSR_S_RANGESID.
      DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.
      CASE I_VNAM.
      WHEN 'CUMMONTH'.
        IF I_STEP = 2.                                  "after the popup
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
                  WHERE VNAM = 'MONTH'.
            CLEAR L_S_RANGE.
            L_S_RANGE-LOW      = LOC_VAR_RANGE-LOW(4)."low value, e.g.200001
            L_S_RANGE-LOW+4(2) = '01'.
            L_S_RANGE-HIGH     = LOC_VAR_RANGE-LOW.   "high value = input
            L_S_RANGE-SIGN     = 'I'.
            L_S_RANGE-OPT      = 'BT'.
            APPEND L_S_RANGE TO E_T_RANGE.
            EXIT.
          ENDLOOP.
        ENDIF.
      ENDCASE.
    sent doc also ...

  • Convert Variable User Exit to ABAP OO

    Hi, I recall an article that demonstrated a better way to implement the Varaible User Exit with ABAP OO, instead of the usual design.  The ABAP OO way would eliminate a single variable code error from shutting down all of the others.   Can anyone point me to the article?
    Thanks

    Hello,
    You can use BADI which is a ABAP OO.
    [Enhancing DataSources with BAdI RSU5_SAPI_BADI|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3001894b-b1fb-2910-77ba-e80b6f2053b7]
    [Implementing a Business Add In (BAdI) in an Enhancement|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d0456c54-0901-0010-f0b3-cd765fb99702]
    Thanks
    Chandran

  • Variable user exit question

    Hi all,
    i m looking for a code to make an User exit variable  to select the actual month and the previous month , for example in this moment ( september and October )

    Hi,
    Use Tcode: CMOD, funtion module :EXIT_SAPLRRS0_001 double click on the program ZXRSRU01, start writing ur code. The code which i gave u is for Calculate Month to date, similarly u have change the code as per ur requirement.
    Regarding User exits:
    http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a56f5e09411d2acb90000e829fbfe/frameset.htm
    to calculate "month to date" user input is "Calday" Key Date
    sample code:
    WHEN 'ZPUTMNTH'.
    IF I_STEP = 2. "after the popup
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZPDATE'.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW = LOC_VAR_RANGE-LOW(6). "low value, e.g.YYYYMM (200606) part of key date (20060625)
    L_S_RANGE-LOW+6(2) = '01'. “ low value e..g. YYYYMM01 (20060601)
    L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW. "high value = input
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'BT'.
    APPEND L_S_RANGE TO E_T_RANGE.
    EXIT.
    ENDLOOP.
    ENDIF.

  • Variable user exit EXIT_SAPLRRS0_001 not called when I execute my query

    Hi *,
    I have created a variable in my query. Corresponding to that, I have written an exit in EXIT_SAPLRRS0_001. Wanted to debug this exit but unsuccessful.
    I put a breakpoint in  "IF i_step = 2." and started running the query. I thought that the point of execution will be hated at my breakpoint so that I can check my logic.
    But the query simply directly executes. Where is the fault ? What needs to be checked ? Is the exit being called? My debugging technique is right ?
    Will assign points for suggestible remedies.
    Regards,
    Srinivas

    Hi !
    Case 1.
    your cmod project may not be activated.
    a. Go to the cmod "editior" go to change mode and activate your code....
    b. press back button once ...
    c. continue to press activate button at every step till you come to cmod initial screen ...
    At last when you are at cmod initial screen ... press activate again ....
    This is very important as our cmod code (project) should be activated at every level ...
    Case 2.
    If it still does not work ... try using a break point just before the code segment ( case statement or if statement i.e. case 'i_vnam' etc .... ) and try to debug....
    Hope it helps ....
    Regards
    Anshul

  • Formula Variable with customer Exit (ABAP Code)

    Hi Experts,
    Please advise me wether i am going in the right way to achieve my requirment else please advise me any alternate approach and update me with the abap code for my customer exit as i am not familiar with ABAP.
    My Requirment:
    Data :
    Emp_ID----Start_Date(DATS)---End_Date(DATS)
    I had a user entry (intreval) VARIABLE created on Start_Date
    User will enter the date intreval he want to analyze...
    Ex: 01.01.2008 to 01.02.2008
    Now i want to use the No of Days between user entered date intreval in my calculaction of a keyfigure
    In the above example it is 31 days
    So i created a Formula Variable of Customer Exit now i need a code that will
    pass the user entered dates to
    FM: FIMA_DAYS_AND_MONTHS_AND_YEARSImport parameters Value
    I_DATE_FROM 01.01.2008
    I_DATE_TO 01.02.2008
    I_FLG_SEPARATE ' '
    Export parameters Value
    E_DAYS 31
    E_MONTHS 1
    E_YEARS 1
    and need to pass the E_DAYS (31) to the result of formula
    User Entry Variable (Intreval) : ZST_VAR
    Formula Variable (Customer Exit) : ZND_EXIT
    Code
    WHEN 'ZND_EXIT'.
        DATA: low_date2 TYPE d,
        high_date2 TYPE d,
        num_days TYPE N,
        new_low_date2 TYPE d.
        IF i_step = 2.
          LOOP AT i_t_var_range INTO ls_varrange WHERE vnam = 'ZST_VAR'.
            CLEAR l_s_range.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            ls_varrange-low = low_date2.
            ls_varrange-high = high_date2.
    CALL FUNCTION 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
      EXPORTING
        I_DATE_FROM          = low_date2
        I_DATE_TO            = high_date2
        I_FLG_SEPARATE       = ' '
      IMPORTING
        E_DAYS               = NUM_DAYS
      l_s_range = NUM_DAYS.
      APPEND l_s_range TO e_t_range.
      EXIT.
      ENDLOOP.
      endif.

    Hello,
    Before the WHEN statement it shoud have a CASE statement. In the user exit coding place your WHEN statement anywhere between CASE...ENDCASE statement.
    your code should look like
    DATA: low_date2 TYPE d,
    high_date2 TYPE d,
    num_days TYPE N,
    new_low_date2 TYPE d.
    Case i_vnam.
    WHEN 'ZND_EXIT'.
    IF i_step = 2.
    LOOP AT i_t_var_range INTO ls_varrange WHERE vnam = 'ZST_VAR'.
    CLEAR l_s_range.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'BT'.
    low_date2 = ls_varrange-low.
    high_date2 = ls_varrange-high.
    CALL FUNCTION 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
    EXPORTING
    I_DATE_FROM = low_date2
    I_DATE_TO = high_date2
    I_FLG_SEPARATE = ' '
    IMPORTING
    E_DAYS = NUM_DAYS
    l_s_range-low = NUM_DAYS.
    APPEND l_s_range TO e_t_range.
    EXIT.
    ENDLOOP.
    endcase.
    Thanks
    Chandran

  • User-Exit Variable

    Hi, I created a simple user-exit variable and for some reason the variable seems to get executed around 16 times and then the query gives me the below error messages.   Any ideas why my variable would have I_STEP = 2 many times before it bombs out? 
    Note: This variable is based on a Virtual Characteristic I just implemented and is probably related.  The query did not fail before trying to implement this user exit based on the Virtual Characteristic.
    Error for variable in customer enhancement ZVRSR_001
    Incorrect call of OLAP layer CL_RSR_OLAP; error in BW-BEX-ET
    *~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
    * Load Variable with NCI Authorized Sales Rep (Sales Group)
    *~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
      WHEN 'ZVRSR_001'.
        IF I_STEP = 2.                         "after the popup
          DATA: LT_REP    TYPE /BIC/AZ_P_O04300.
          DATA: LV_REP    TYPE /BI0/OISALES_GRP.
          SELECT SINGLE * FROM /BIC/AZ_P_O04300 INTO LT_REP
               WHERE USERNAME = SY-UNAME.
          IF SY-SUBRC = 0.
            W_L_S_RANGE-LOW = LT_REP-/BIC/ZSHTO_GRP.
          ELSE.
            W_L_S_RANGE-LOW = '???'.
          ENDIF.
          W_L_S_RANGE-SIGN = 'I'.
          W_L_S_RANGE-OPT  = 'BT'.
          APPEND W_L_S_RANGE TO E_T_RANGE.
        ENDIF.
    ENDCASE.

    OK, It looks like because it is a Virtual Characteristic that the User Exit Variable Code will be called every time the "Virtual Characteristic" code is executed as well.  The real problem seemed to be that I had used a BT in the Variable User Exit Range.  Once I changed that to "EQ' it works fine now.  Thanks

  • Formula variable to compute number of Months

    Hi Guyz,
    I have created a formula variable( Custom exit)  to compute the number of months, and the field used is 0CALMONTH, below is the code, but am not getting the required value.
    The scenario is : 0CALMONTH: if the range entered is 022010 042010
    ZAVERAGE value should 2, but the value is showing as 0 , Please help .
    When 'ZAVERAGE'.
    clear l_s_range.
    *call function 'MONTHS_BETWEEN_TWO_DATES '
    if i_step = 2 .
    data: yrd(2)  ,
           mmd(2).
    Read table i_t_var_range into loc_t_var_range with key vnam = '0I_CALZ1'.
    yrd = loc_t_var_range-high3(4) - loc_t_var_range-low3(4).
    yrd = yrd * 12.
    mmd = loc_t_var_range-high(2) - loc_t_var_range-low(2).
    mmd = mmd + yrd.
    if i_vnam = 'ZAVERAGE'.
    *if sy-subrc = 0 .
    . l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    l_s_range-low = mmd.
    . append l_s_range to e_t_range.
    ENDLOOP.
    Regards,
    Ravi

    Hi,
    You need to have two variables created. One for entering the month ranges and other for storing the "number of months" value. Please refer to the link below for further details.
    Derive Number of months from variable entry
    I hope it helps.
    Thanks.
    Regards,
    Samruddhi.

Maybe you are looking for

  • Week view and task list solutions? Solved: a way to sync notes to Mac.

    I've been using a Palm Tungsten T5 for years and routinely rely on the Palm's Calendar week view feature and task list. The week view is indispensable to see where I can fit in appointments. Are there any ways to achieve the same functionalities on t

  • Can i use mac book pro charger to mac book

    can i use mac book pro charger to mac book? my battery suddenly died and it was'nt working. 

  • Bridge Cannot Find Photoshop

    I'm running CS6.  When I'm in Bridge and double click a photo, I get the following error message: "Windows cannot find 'C:\Program Files\Adobe\Adobe Photoshop CS4 (64 Bit)\Photoshop.exe'. Make sure you typed the name correctly, and then try again." I

  • Determine Schema Owner

    I have a user I'm trying to remove, but it's the owner of some objects. I'm assuming it's the schema owner and thus I'll need to assign the schema to a different user, but I'm not sure how to query the schema owners. Thanks in advance!

  • Is there a way to text someone on iMessage without using your number on an iphone

    is there a way to text someone on iMessage without using your number on an iphone ? there's someone i want to text but it's long distant an ik not sure about giving my number to them just yet. so is there a way to send them a message from iMessage on