Customer Exit Variable in formula to get values for multiple keyfigures

Hi to all,
I have query as defined in following scenario:
CHAR_X     C_KF1 (based on KF1)     C_KF2 (based on KF2)     u2026     C_KFn (based on KFn)
Value1                    
Value2                    
u2026                    
Valuem                    
C_KF = calculated key figure
I need to create a customer exit variable that will search through selection e.g. CHAR_X/KF1 and give some result. I need this variable for every keyfigure (KF1-KFn). Using customer exit variable is the only solution.
My question is: do I have to create formula variable (customer exit) representing every keyfigure separately (VAR1 u2013 VARn, like in below example)?
CHAR_X     C_KF1 (using VAR1)     C_KF2 (using VAR2)     u2026     C_KFn (using VARn)
Value1                    
Value2                    
u2026                    
Valuem                    
Or is it possible to create one general formula variable since the way to retrieve the value in variable is always the same (like in below example)? In this case, how do I pass the value of the respective keyfigure to this variable?
CHAR_X     C_KF1 (using VAR_X)     C_KF2 (using VAR_X)     u2026     C_KFn (using VAR_X)
Value1                    
Value2                    
u2026                    
Valuem                    
Thanks for your replies, points will be awarded!
Cheers

That is my concern, the value of variable is not the same.
What variable should do is:
take KF1 id, go through values for CHAR_X, get back one value
This value would always be different, and also "KF" part in code of variable should be different, based on the column where the variable is being used (so, in column C_KF1 ,variable should "pick up" id of KF1, etc.).
I hope it makes it more clear. For now, I do not have the code for variable yet, I am just interested in concept whether it is possible to pass the ID of keyfigure dynamically so I can make decision how to model this request.
Thanks

Similar Messages

  • Customer exit Variable to split single date value into a range

    Hi All,
    we have a requirment where user will enter a date(01/21/2010) value in the variable input screen, it should be single value and mandatory, and the query output should have data for the Preceding 24 months for all 6 Key figures.  (e.g. user chooses 12/15/2009, result set is 12/01/2007 - to - 11/30/2009) summarized by month,
    Our query design is as given below -
    since we only have DATE value in the cube, we have added FISCAL YEAR/PERIOD in the cube and mapped DATE with time chars. Now the cube has the data stored in monthly buckets using FISCAL YEAR/PERIOD . Now we have used the variables  FISCAL YEAR/PERIOD  to restrict Key figures and have an offset on that to get the prior 24 periods.
    Since in our requirement user wants to enter Date variable asmandatory input, we create 1 customer exit variables as a mandatory & single value variable for Date Variable, and using that exit variable we thought of passing the period of user entered date to FISCAL YEAR/PERIOD  which we are using to restrict Key figures and get offset of 24 months.
    Can someone please help us in passing this period vaule from inout Variable Date to Fiscal year/period using CMOD, any other ideas are also welcome
    Thanks in advance

    Hi sateesh,
    we are using DATE_TO_PERIOD_CONVERT ,but in this case if user enter's a date (01/21/2010) then we are getting output only for that date and not for the entire prior 24 months period
    As per our requirment when user enter's date (01/21/2010) it should get the whole range that is entered date and 24 prior months and pass the range back to same input Variable so that in the output we get the data for entire prior 24 months
    Thanks

  • Customer exit variable is somehow retaining a value and placing in filter

    we have something strange occurring.  We have a  variable being filled via the customer exit.    Some how it is placing an old value in the filter so every time we run the report we have to remove it and rerun.  we tried to remove and save the workbook again but it still defaults a value in there.  the code is not defaulting anything in there though.  any ideas??

    Immich,
    For starters I'd removed the Custoemr Exit and run the query.
    If it runs as expected, then I'd open your workbook which holds the query and run the query again. Are the results of the query running in the workbook the same as running the query in it's own right?  They should be, if not I suspect that a filter value is being set within the workbook (not the query).
    Would you validate that?
    Regards
    Gill

  • Customer Exit Variable on 0CO_AREA

    Hello Experts,
    I have a requirement to create a customer exit variable on 0CO_AREA to return values for 0CO_AREA based on the 0PROFIT_CTR which will be entered by user in a BW query. As CO_AREA is compounding on PROFIT_CTR, I am not sure if we can do it or not and if yes, how ?
    I am not a good ABAPer so I will appreciate if some one give me more help in code writing as well..
    Regards.

    hi Rakesh,
    check the steps in 'How to… Use Variables for Currency Conversion'
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/287bab90-0201-0010-f48e-cc55b0cd13d0
    hope this helps.

  • Display Error Message in BW Report based on Customer Exit Variable

    Hi
    I need to display an error message in the BW report based on the value of a customer exit variable - i was able to do this successfully in BW3.5 using the below code.
      WHEN 'ZUPN'. "Here ZUPN is the customer exit variable
        IF i_step = 1.
          <check for condition -- if successful, variable flag = 1, else variable flag = 0>
          IF flag = 0.
            MESSAGE e157(00). "Error Message
          ENDIF.
        ENDIF.
    I have upgraded my system to BI 7.0 now. Whenever the variable check is not successful, it displays a blank screen instead of the error message in the report. Please advice if we need to change the code and how ??

    Bhanu,
      Thanks for u r reply.This warning message appears every time i execute the report through portal.
    Any idea ?
    Regards
    Mano

  • Help needed in Customer exit variable

    Hi Experts,
    We have a scenario as below.
    User enters fiscal year period.Based on the fiscal year period,entire year will be selected.
    Row would contains
    0fiscper3(Fiscal months from Jan to Dec)
    Column contains Amount(Actual or Forecast)--There is a restricted keyfigure on amount.If value type=60 then forecast
    and value type=10 then actual amount
    If the user enters 002.2010 then it should give Actual values ie value type=10 for 001.2010 and 002.2010.For all values greater than 002.2010, it should give forecast values(value type=60)
    Report Format.
    Jan----
    Actual Value(value type=10 in the column for amount)
    Feb----
    Actual Value(value type=10 in the column for amount)
    Mar----
    Forecast Value(value type=60 in the column for amount)
    Apr----
    Forecast Value(value type=60 in the column for amount)
    May----
    Forecast Value(value type=60 in the column for amount)
    Jun----
    Forecast Value(value type=60 in the column for amount)
    Jul----
    Forecast Value(value type=60 in the column for amount)
    Aug----
    Forecast Value(value type=60 in the column for amount)
    Sep----
    Forecast Value(value type=60 in the column for amount)
    Oct----
    Forecast Value(value type=60 in the column for amount)
    Nov----
    Forecast Value(value type=60 in the column for amount)
    Dec----
    Forecast Value(value type=60 in the column for amount)
    I know that i have to create a customer exit variable for value type
    But in this scenario.the value for value type may change in each row based on fisper3(month).
    How can i obtain such a scenario in the customer exit
    Your help will be appreciated.
    Thanks,
    Senoy
    Edited by: senoy laxman on Feb 15, 2010 6:42 AM

    Hi Senoy,
    you have to create two customer exit variables for fiscal year period(0fiscper) as given below.
    1. for actual values (value type=10), coding in cmod such that showing values less than and equal to user input values.
    2. for forecasting values(value type=60,)coding such that showing values greating than user input values.
    use the first varible in the first selction and the second varible in the second selection in the given below structure(use the structure in rows)
    use the fiscal period user input varible in the third selection in the given structure below.
    structure
    selection - (Actual)-restrict with value 20 and first customer exit variable .
    selection -(Forecast)-restrict with value type 60 and second customer exit variable.
    Selection - 0fiscper
    Add the key figure 0Amount in the columns or in rows(in the selection of second structure) as per your requirment.
    hope this helps you.

  • Need logic to find Year to Date for customer exit variable

    Hi to all,
    I am creating customer exit variable for query .
    query should display data according to current system year from jan till current system date.
    here senario is like that user never enter year and query will automatically will fetch the data according to current year starting from jan to current system date.
    example.
    current year 2010 and today is system date is sep 29 2010, so query will display data from jan 2010 to current data sep 29 2010.
    please can any one provide me logic for that.
    any code .
    regards
    pavneet rana

    Hi,
    You need to create the characteristic customer exit variable of type select-options. Restrict your keyfigure based on this variable.
    In the logic in CMOD,
    write as below
    i_step =2.
    case i_vnam.
    When 'exit variable'.
    temp = sy-datum+0(4).
    concatenate temp '0101' into temp1.
    l_s_range-low= temp1.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'BT'.
    l_s_range-high= sy-datum.
    append APPEND l_s_range TO e_t_range.
    endcase.
    For any further help on customer exit based variable, please refer below article.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20f119d9-922d-2c10-88af-8c016638bd90?quicklink=index&overridelayout=true
    Edited by: Rahul K Rai on Sep 29, 2010 3:09 PM

  • How to get the current month value for a customer exit variable?

    How to get the current month value for a customer exit variable? 
    And also if we have an InfoObject with date value (including date, month, year), then how to derive the month value from this date type of Char.?
    Thanks!

    Hi Kevin,
    Check here........
    Re: Customer Exist for "From Current Date To Month End"
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/25d98cf6-0d01-0010-0e9b-edcd4597335a
    Cal month
    Regards,
    Vijay.

  • Customer Exit to derive formula variable to text variable (BW 3.5)

    Hi gurus,
    I have created a formula variable in a BEX report (BW 3.5) that is fill by the user during runtime.  This formula variable is used in conditions and other key figures in the query.
    What I need now is to use the value given by the user in this formula variable and expose it in a text variable.
    The variable properties are as follows:
    VARIABLE 1: 'MONTOANA'
    Type of variable: formula
    Processing by: user entry
    Variable entry is: mandatory
    Ready for input?  YES
    Dimension ID: Price  (currency: Argentine pesos / Unit: per mil)
    VARIABLE 2: 'TXMONANA'
    Type of variable: text
    Processing by: customer exit
    Variable entry is: mandatory
    Ready for input?  NO
    Dimension ID: Price  (currency: Argentine pesos / Unit: per mil)
    I pretend tu use the value of 'MONTOANA' in the variable 'TXMONANA', so I wrote the following code in transaction CMOD (enhancment EXIT_SAPLRRS0_001, include ZXRSRU01):
    CASE i_vnam.
    WHEN `TXMONANA`.
        IF i_step = 2. "after the popup
          LOOP AT i_t_var_range INTO loc_var_range
            WHERE vnam = 'MONTOANA'.
            CLEAR l_s_range.
            l_s_range-opt = 'EQ'.
            l_s_range-sign = 'I'.
            l_s_range-low = loc_var_range-low.
            APPEND l_s_range TO e_t_range.
            EXIT.
          ENDLOOP.
        ENDIF.
    ENDCASE.
    I'm not getting any result for the text variable.  Could you kindly help me?
    Thanks to all in advance!!!
    LL

    We found the solution with members of our ABAP team.  In the end the issue was due to the type of the field.  The field loc_var_range-low is CHAR 60 so I had to extract the first characters on the right to get the value I wanted to deliver into the text variable.
    Thanks anyway for your help.  Regards, Leticia

  • Default value of BeX customer Exit variable not Displayed in WeBI??

    Hello Experts,
    We are stuck with a problem where WeBI report is created on top of BeX query and we are not able to see the default value of Bex Customer exit variable in WeBI run. Here is the complete scenario:
    1. One restricted KF is created in BeX, restricted with Customer exit variable on net Due date. And this variable is mandatory, ready for input, and Default value in calculated is user exit as current Week's Monday.
    2. So, by default KF data should be restricted to Monday of current week, if user does not change this value.
    3. Now, WeBI report is created on top of this Bex query, and all is working fine, i.e. we are getting variable as Prompt in WeBI, but Default value is not shown while Running the Webi Report.
    So, need your inputs on the same, if default values from BeX in WeBI is supported or not? If yes, why this is happening, and how to resolve it?
    Please notice, the restrcition is in KF only, it is not a separate restrcition on Net Due date in Filter area or in Defualt area of BeX
    and we are on SAP BW 7.1 and BOXI 3.1 SP4.
    Regards,
    Vipul
    Edited by: VIPUL GOYAL on Nov 23, 2011 9:44 PM

    Hi,
    See 1285993 - Support of Customer Exit Variables from BEx query into WebIntelligence via OLAP universe
    WebI will prompt when executed, but the default values calculated by the user exit  - do not appear.
    Note: If the BEx variable has property 'ready for input' set / enabled, then its WebI prompt shows ok, but no default value appears.
    Cause
    This behaviour expected 'by design' (in the context of the product's current limitations) as explained in the online guide below:
    Please refer to Chapter 7, page 44, document link here: http://help.sap.com/businessobject/product_guides/boexir3/en/xi3_sap_olap_universes_en.pdf
    Characteristic variable > processing type > Customer Exit  is "Supported, without user entry"                                                                               
    -->  This should be understood as meaning "User will not be shown a prompt"
    regards,
    H

  • Using Formula Variable in Customer Exit variable

    Hi,
    I want to assign valuees of 2 Formula Variables to one cstomer exit variable based on some Characteristic.
    Example. Formula variables are Early and Late. If Early = 3 and Late = 4 , I want to pass value to the Customer Exit variable as Low = 3 and High = 4.
    The problem is in I_T_VAR_RANGE there is no value for formula variable in LOW field.
    Other variables based on Characteristics have values in this field.
    What can I do in this case?
    Regards
    SSS

    SSS,
    You can restrict your characteristic with two variables in the value range options of restricting.
    One can be used as low and the other can be high.
    Hope that helps.
    Thanks.

  • Error Message : " No value could be determined for Customer Exit Variable "

    Hello BI Experts ,
    I have created a "ZYTD_PERIOD" Customer Exit Variable  Interval  Mandatory and ready for input check mark removed.
    The reference character is '0FISCPER' .
    I want to have YTD figures when the user enter single Fiscal Year Period for variable 0P_FPER.
    So I have written below code in SE37 : EXIT_SAPLRRS0_001 and include program : ZXRSRU01
    ==================================================================
      case i_vnam.
                  WHEN 'ZYTD_PERIOD'.
                  IF I_STEP = 2.
                  LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = '0P_FPER'.
                  CLEAR L_S_RANGE.
                  L_S_RANGE-LOW0(4) = LOC_VAR_RANGE-LOW0(4).
                  L_S_RANGE-LOW+4(3) = '001'.
                  L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW.
                  L_S_RANGE-SIGN = 'I'.
                  L_S_RANGE-OPT = 'BT'.
                  APPEND L_S_RANGE TO E_T_RANGE.
                  EXIT.
                  ENDLOOP.
                  ENDIF.
    ===================================================================
    After that I use this 'ZYTD_PERIOD' variable in the query .
    Also I have used the variable 0P_FPER in another structure.
    When I execute the query by entering the value of 0P_FPER as 010.2009 or any other value ,
    I am getting below error message ,
    *No value could be determined for variable ZYTDPERIOD*_
    Below is details of this Error message ,
    Note that I have proper Master and Text data for 0CO_AREA and 0COMP_CODE loaded into BI.
    =======================================================================
    Diagnosis
    This error diagnosis is specific only to the variables 0P_FVAEX or 0P_CTPCA !
    Termination message BRAIN 632 appears:
    Could not determine value for variable 0P_FVAEX (or 0P_CTPCA).
    System Response
    1. Operation method of SAP-Exit-Variables 0P_FVAEX or 0P_CTPCA
    With queries from the CO application, both SAP-Exit-Variables look for an entry for 'controlling area'. With this controlling area from the selection screen, the SAP-Exit-Variables program reads the attributes for InfoObject 0CO_AREA (controlling area).
    With queries from the FI application, the SAP Exit Variable 0P_FVAEX looks for an entry for 'company code'. With this company code from the selection screen, the SAP Exit Variables program reads the attributes for InfoObject 0COMP_CODE (Company Code).
    0P_FVAEX determines the fiscal year variant (attribute 0FISCVARNT) from the attributes for 0CO_AREA (CO queries) or 0COMP_CODE (FI queries). 0P_CTPCA determines the currency type of the profit center local currency (attribute 0CURTP_PCA) from the attributes for 0CO_AREA.
    2. Cause of Error
    The attributes for the controlling area (InfoObject 0CO_AREA) or company code (InfoObject 0COMP_CODE) were not loaded into the BW system, or the attributes for the controlling area are not active in the BW system.
    Check whether this is the cause of the error in your BW system. Display the contents of table /bi0/mco_area or /bi0/mcomp_code using transaction se16.
    Application CO:
    Check whether the attributes 'fiscal year variant' (field FISCVARNT) and 'profit center local currency currency type' (field CURTP_PCA) are filled in the 'A' version (field OBJVERS) for the selected controlling area. If the fiscal year variant in the OBJVERS = 'A' is empty, then the error is with variable 0P_FVAEX. If the currency type of the profit center's local currency in OBJVERS = 'A' is empty, then the error is with variable 0P_CTPCA.
    Application FI:
    Check whether or not the attribute 'fiscal year variant' (field FISCVARNT) is filled in the 'A' version (field OBJVERS) for the selected controlling area. If the fiscal year variant is empty in OBJVERS= 'A', then the error is with variable 0P_FVAEX.
    Procedure
    Using InfoSource 0CO_AREA, load the attributes for the controlling area or company code into your BW system.
    Afterwards, activate the attribute changes in your BW system. To do this, use transaction rsa1, path 'Tools > Hierarchy/Attribute changes', functions button 'InfoObject list'. Choose InfoObject 0CO_AREA or 0COMP_CODE from this list, and activate the attribute changes.
    =====================================================================================
    Is there any special settings needed before writing BEx Customer Exit ?
    I have already created a project in CMOD and assinged a proper RSR00001
    and EXIT_SAPLRRS0_001 and project is active.
    Any help please ....
    Regards ,
    Amol

    My Code is as below ,
              case i_vnam.
                  WHEN 'ZYTD_PERIOD'.
                  IF I_STEP = 2.
                  LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = '0P_FPER'.
                  CLEAR L_S_RANGE.
                  L_S_RANGE-LOW0(4) = LOC_VAR_RANGE-LOW0(4).
                  L_S_RANGE-LOW+4(3) = '001'.
                  L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW.
                  L_S_RANGE-SIGN = 'I'.
                  L_S_RANGE-OPT = 'BT'.
                  APPEND L_S_RANGE TO E_T_RANGE.
                  EXIT.
                  ENDLOOP.
                  ENDIF.
                  ENDCASE.

  • Customer exit variable - missing values

    Hello experts,
    Has anyone ever encountered this problem?
    We have a customer exit variable, based on 0VENDOR. In the customer exit we simply fill in a variable with the values in this master data table. By debugging we can see how the e_t_range structure gets filled in correctly with all the values in the master data, for example 2,300 values, the same values we expect to see in the report but we don't know why at some point after our code in the customer exit and in the standard code, our variable contains less values and only an incorrect number of values gets displayed in the final report.
    Any ideas on this would be very much appreciated.
    Many thanks in advance,
    Inma

    Hi,
    Are you sure you're losing some values?
    Remember that if no values exist for a master data value on the InfoCube, no line will be shown, so you could see less than 2300 lines.
    You could probably try to show filter values on the query and check if they match with your e_t_range.
    Regards,
    David.

  • Table look up using value from customer exit variable

    I have a customer exit variable, CURRMON, which the user enters in the format MM/YYYY. From this entry, I would like to do the following to calculate and display the number of business days in the selected month:
    Do the following to get Business Days in month.
    Use the KF "FBA Day"  (CTAFBAD) from the CTA_M01 infocube and write ABAP routine.
    1. Based on user entry cal month get the last calendar day .
    2. Do a master data look up (CTAFBAC is the master data object), using the last calendar day from step 1.
    3. CTAFBAD is the attribute of CTAFBAC so move the value of CTAFBAD to the result, and display this result
    Can anyone help me with this?

    Hello,
    You can use i step = 1 in SMOD transaction and write the code there.
    l_s_range-low = sy-uname.
    append ls_range to e_t_range.
    regds,
    Shashank

  • Current filter values in Customer Exit variables

    Hi!
    I have a pretty hard question here that I would be impressed if someone has an answer to:
    The scenario is:
    I have a customer exit variable that should de dependent on the current filter setting in the query. Is it possible from within the customer exit code get information about the current filter(s)?
    I know that I can access other variables values, but in this case I would like to know which values that has been filtered on within BEx (after the popup screen).
    Regards
    Marty

    You asked for:
    1. In the field I_S_RKB1D-COMPUID (or GENUNIID I'm not quite sure) you get the internal query name.
    2. Look in RSZELTXREF with SELTUID = I_S_RKB1D-COMPUID.
    3. The filter values have LATYP = FIX (if they are in the filter box).
    4. Search table RSZRANGE with ELTUID = RSZELTXREF-TELTUID.
    5. Don't wonder if this doesn't work anymore after an upgrade
    Best regards
    Dirk

Maybe you are looking for

  • Mail not appearing on Iphone OS4

    for the last 3 days when mail is sent to my phone it is blank. as in reciver and cc'd persons are visible as well a subject but that is it ??? can anyone help

  • Facebook not loading right

    My facebook page will not load right. It looks like it is all starting in the middle and all the pop ups are already opened. Any ideas?

  • Office 365 in education

    Hi, My wife is the assistant head for a primary school and she is wanting to move towards Office 365 so they can benefit from using Lync, SharePoint sites and personal profiles and collaborating with other schools.  I'm looking at possibly doing the

  • Email displays as read

    All of my old email recently started viewing as being unread. Any ideas?

  • Drop shadow blur issue

    Hi, we have come across an issue using Illustrator drop shadows with a large blur. What seems to happen is that Illustrator expands the box size and after fading the shadow to nothing it seems to fade back to the colour. To try create a box with a co