Coding for Customer-Exit Variables

Hi experts,
We have some variables in BEX with Customer-Exits.
I want to see the codings and i do following.
1- Tcode u201CCMODu201D and enter u201CProject Codeu201D go tou201DComponentsu201D.
2- Double Click on EXIT_SAPLRRS0_001
3- Double Click on INCLUDE ZXRSRU01
But I dont see anycoding here.
Where should be the codings for Variables with Customer-Exits hidden?
Do you have any idea, thank you.

Hi,
      The Include which you are seeing is for only the customer space. This is for Customer exit variables created  by Developers. So Here if there are any routines written by the Developers will be there. Initially it will be Blank.
If you want to See the standard SAP Exits goto SMOD.
Regards
Karthik

Similar Messages

  • Error in the ABAP Code for Customer Exit Variable

    Could you please update me what is the wrong with the below ABAP Code developed for Customer Exit Variable in BW
    i created a Variable (ZVWKNO) of Customer Exit,Single Value ,Mandatory and Variable is ready for input
    In CMOD i had written the below Code:
    When 'ZVWKNO'.
    DATA: WEEK(2) TYPE N,
    WEEKNO(2) TYPE N.
    IF i_step = 1.
    l_st_date = SY-DATUM.
    CALL FUNCTION 'DATE_GET_WEEK'
    EXPORTING
    DATE = l_st_date
    IMPORTING
    WEEK = l_fn_week.
    CHECK sy-subrc = 0.
    WEEK = l_fn_week+4(2).
    If WEEK 0.
    WEEKNO = WEEK - 1.
    l_s_range-low = WEEKNO.
    l_s_range-sign = k_sign_inclusive.
    l_s_range-opt = k_option_equals.
    APPEND l_s_range to e_t_range.
    ENDIF.
    ENDIF.
    But when i execute the query the default value is not populated with Week-1 No in the variable screen
    Please update me what went wrong
    Thanks

    Case ZVWKNO.                "write this with out comments
    When '1'.              "write the value that needs to equal with value in varaible ZVWKNO after when in sungle quotes
    DATA: WEEK(2) TYPE N,
    WEEKNO(2) TYPE N.
    IF i_step = 1.
    l_st_date = SY-DATUM.
    CALL FUNCTION 'DATE_GET_WEEK'
    EXPORTING
    DATE = l_st_date
    IMPORTING
    WEEK = l_fn_week.
    CHECK sy-subrc = 0.
    WEEK = l_fn_week+4(2).
    If WEEK 0.                                    "check this Week Minimum is '01' and Maximum '52'
    WEEKNO = WEEK - 1.
    l_s_range-low = WEEKNO.
    l_s_range-sign = k_sign_inclusive.
    l_s_range-opt = k_option_equals.
    APPEND l_s_range to e_t_range.
    ENDIF.
    ENDIF.
    Prabhudas

  • Where do I write the code for customer exit variable?

    Hi Gurus,
    Can anyone tell me where and the procedure that I have to follow to get to the include ZXRSRU01 where I can write customer exit variable code.
    I know its written in ZXRSRU01, but in my system it seems like its not active or does not exist. How do I get to start working in this include for customer exit variables?
    Any help is appreciated. Thank you.
    Regards
    Reddy

    hi Reddy,
    variable exit use enhancement RSR00001 not RSAP0001. EXIT_SAPLRRS0_001.
    try to follow some steps in 'how to' doc related to this, and sample code may useful for you
    https://websmp206.sap-ag.de/~sapdownload/011000358700002762582003E/HowToDeriveVariableValue.pdf
    https://websmp206.sap-ag.de/~sapdownload/011000358700002765042003E/HowToVerifyVariableInput.pdf
      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.
    hope this helps.

  • BW Master Data for Customer Exit Variable Reference

    Good day Experts,
    I have several queries that I would like to remove the hard coding of values on to prevent yearly maintenance. In these queries there are two conditions each condition is on different key figures that is amount by year.  The query is only to report on data that for the two amounts (separated by year) is greater than the specified values. I want to change the condition so the value is no longer hard coded so the query will role automatically as the time period changes. The year amount values that the condition will need to reference are not currently stored in our BW system. I would like to create master data that is maintained directly in the BW system for the amounts that a variable for the condition in the query can then access.
    I know it can be set up as master data and then referenced through a customer exit variable but when I set up the master data if I do the Amount as a key figure I cannot maintain the key figure value for the master data manually in BW, if I set the Amount up as a numeric characteristic then I canu2019t directly use a decimal. Am I missing something in the key figure setup then referencing the key figure as an attribute of the year value or do I need to do it as a characteristic and use a conversion routine or something for data manipulation?
    Can someone please give me some guidance to what the best way to do this is?
    The data necessary master data for storage in BW is the YEAR and a single dollar value:
    For Example:     
    Year          Amount
    2009           101.50
    2008          207.80
    2007          807.40

    I figured out that I can use an amount in the master data and maintain the amount manually as long as I use the amount with a currency instead of setting the currency in the key figure.

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

  • ABAP code Help for Customer Exit variable

    Hello All,
    Can anyone provide ABAP code for a customer exit variable please?
    Requirement:
    0CALYEAR(InfoObject) - ZCALCYR (Variable) <b>Calender year with default value actual year</b>.
    Proiperties of variable: single value,mandatory,ready for input,can'be changed in query navigation.
    i have read some docs on customet exit variables which i got from SDN but i found it's difficult for me to get this as i am not that good in ABAP.
    Thanks,
    Rakesh.

    Hi,
       Just check the below code. You just need to make slight changes I believe. Hope this helps you.
    In CMOD………..
    Sample code
      INCLUDE LXRSRF01                                                   *
    data: l_s_range type rsr_s_rangesid.
    case i_vnam.
      when 'ZCALCYR'.
        if i_step = 1.
         l_s_range-low = sy-datum+0(4).
            append l_s_range to e_t_range.
        Endif.
    Endcase.

  • 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 create an user input variable for customer exit variable? - BW3.5

    Hi Guru,
    I have a requirement for the selection period of my reports. There are 3 possible reporting periods which should be user selectable:
    1. Month: Current reporting month
    2. Fiscal Year to Date
    3. Project Year to Date
    Here I need 2 variable to do these, 1 customer exit and 1 user input variable. I have created a variable customer exit to calculate all these requirement. But can any1 tell on how to create the user input variable for my customer exit? I need a user input variable with drop down list like below.
    01-Current month
    02- Fiscal Year to Date
    03-Project Year to Date
    I have create a new master data for this variable, but it's not working. What I need now is a standalone master data which do not need to link to any exiting records. Can any1 tell me how to create this?

    Just go to the definition of the variable for which you have created a customer exit. There you will find a check box for "Ready for Input". Just tick that checkbox and the variable will be available as a selection variable in the reports selection screen.
    Regards,
    Yogesh

  • Function module needed for customer exit variable need to use in Bex report

    Hi Experts,
    I have a requirement where i need to get Cummulative result between two interval periods.
    If user gives single mandatory input value - 002-2009
    for one Scenario:-
    Project start Date   untill Pervious year i.e  December 2008
    Where project start date will get from one of the field in my BW CUBE
    can anyone help for the customer exit function code for this scenario. As i am into BI i dont have idea in ABAP.
    Please help sample cod for this .
    Thanks,
    Anil.

    I had created one customer exit which had fullfill my requirement.

  • Reg: ABAP code for customer exit variable

    Hi Team,
    I have a requirement to create a report  based on an multiprovider 'TEST'.
    Based on the input selection of Period; I need to define a Keyfigure X which will be a count of value available for that Period in one cube involved in the MProvider. E.g.: If for period 12, the value = 1 in the cube; then this keyfigure will give the count as 1 in the output of the report.
    The second KF Y values are available in the second infocube directly: ibut should be displayed based on the value of the KF 'X' with logic as if X > 0 ; then the values should be read from the second infocube in the report. & if X <= 0; no values should be displayed.
    Please help me with the ABAP code to be used in the query level.
    Thanks & Regards
    Sneha

    Hi Sneha,
       I would suggest the following
    1.Please change the design the cube and include a key figure Zcount that would be incremented for each record.
    Now as per the first requirement you need to get the count for a Input Period from First cube
    This would be very simple to implement , all you have to do is restrict this KF with the Input characteristic/variable and also the First Infocube.
    2.You can also use exception aggreation counter to address this requirement . Even in this case you need to include a dummy key figure in the cube and the exception characteristic would be the period in the Infocube.
    But performance would be on downside when compared to the first one.
    3.The second requirement is quite simple
    Create a formula KF as follows
      (KF1 > 0)*KF2 . 
      KF1 > 0 is a logical operation and it would always return 1 on success and 0 otherwise.
    Hope this helps,
    Regards,
    James Harold.

  • How to identify what customer exit variables are used in which query?

    Hi all,
    When i happened to check the CMOD transaction code i can find a list of customer exits are used. But i want to know what are those customer exist are used in which query? can anyone let me know the procedure of identifying it.
    Thanks a lot
    Pooja

    hii pooja
    check the foll links
    Very Urgent: Customer Exit Variable
    customer exit variable
    MIssing Authorisation for customer exit variable query
    Authorization variable or customer exit variables
    if it is helpful assign points
    thanks.

  • Executing customer exit variable in dropdown box. in WAD

    hi Experts,
    i have implemented two customer exit variables for current month and next síx months in a query and it is working well, and the code for customer exit variable is correct.
    we have a requirement to use the customer exit variables in dropdown box in web application designer. in the dropdown box in web application designer i used command SET_SELECTION_STATE_SIMPLE in that 'command specific Parameters' i had given the exit variables current month and next six months.but after executing the web application designer and if i drill down the report with current month and next six months it's giving error message .
    can anyone please tell me how to implement customer exit variables in web application designer through drop down box. i am using this in bi7 reports.
    Regards
    Sruthi Reddy

    Hi,
    Customer Exit Variable in SAP BI : is used to calculata MTD,YTD, and some other calculations.
    You can define variables with Customer Exits and then write code in CMOD. See the Article/Blogs in the same
    https://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
    CHeck the Following Articles.
    Customer Exit Variables in BW/BI Reports
    Using Customer Exit Variables in BW or BI Reports Part - 1
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/business-intelligence/s-u/using%20customer%20exit%20variables%20in%20bw%20or%20bi%20reports%20part%20-%201.pdf
    How to use Customer Exit Variables in BW Reports: Part - 2
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/business-intelligence/g-i/how%20to%20use%20customer%20exit%20variables%20in%20bw%20reports%3a%20part%202.pdf
    Using Customer Exit Variables in BW/BI Reports Part - 3
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/10fc4382-afa6-2c10-1380-fa224fe4324f&overridelayout=true
    Using Customer Exit Variables in BW/BI Reports: Part - 4
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0fefc77-40e3-2c10-8da3-d4bfcb013387?quicklink=index&overridelayout=true 
    Calculating the Ageing of the Materials
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/business-intelligence/a-c/calculating%20the%20ageing%20of%20the%20materials.pdf
    Thanks
    Reddy

  • Problem with customer exit variable

    HI i have created a customer exit variable to rread a table based in user input and pass it to my variable , every thing works fine but i get a waring message in my WAD saying
    RANGE-LOW for customer exit variable ZVSO_PRM corrected to #   BRAIN  746
    Does any one have any idea why is it comming
    my code is as follows
    WHEN 'ZVSO_PRM'.
    IF I_STEP = 2.
    DATA: BEGIN OF ZPROD_MODEL OCCURS 0,
    I_PROD LIKE ZCURR_PM_T-/BIC/ZPRODMOD,
    END OF ZPROD_MODEL.
    DATA: BEGIN OF ZREGIO_TABLE OCCURS 0,
    REGION LIKE ZCURR_PM_T-/BIC/ZREGION,
    END OF ZREGIO_TABLE.
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZREG02'.
    CLEAR L_S_RANGE.
    ZREGIO_TABLE = LOC_VAR_RANGE-LOW.
    APPEND ZREGIO_TABLE.
    ENDLOOP.
    LOOP AT ZREGIO_TABLE.
    SELECT /BIC/ZPRODMOD FROM ZCURR_PM_T INTO TABLE ZPROD_MODEL WHERE /BIC/ZREGION = ZREGIO_TABLE-REGION.
    APPEND ZPROD_MODEL.
    ENDLOOP.
    SORT ZPROD_MODEL.
    CLEAR L_S_RANGE.
    LOOP AT ZPROD_MODEL.
    L_S_RANGE-LOW = ZPROD_MODEL-I_PROD.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDLOOP.
    ENDIF.

    Could it be that the code doesn't find any value in ZCURR_PM_T table for the specified input region?

  • 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

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

Maybe you are looking for