Problem with Bex Customer Exit Variable

Hi Friends,
I have a customer exit variable which is getting filled based on the User Input.  I have written the code inside the If condition checking i_step = 2. The code is working as required.
But the problem is when I try refreshing the query or change the user variable selection, the Customer exit variable is not changing.  I tried to debug the code and realized that the  values for the exit variable based on the previous selection is not cleared and the i_step = 2  is not being executed for the variable.
While I close and reopen the query, the code is working fine.  
Does anyone know why this is happening?  Please suggest..
Thanks in advance..
Regards,
Priya

Hi Binu,
Here is the code sample.  I am trying to populate the month based on the input Week number '0I_WEKIN'
.  For eg.  If I give 37.2011, the month value should be 08.2011.  If I give 39.2011, month should be 09.2011.
  WHEN 'ZC_MONTH'.
    IF i_step = 2.     "after the popup
        READ TABLE i_t_var_range INTO lw_var_range WITH KEY vnam =
    '0I_WEKIN'.
       IF lw_var_range-high IS NOT INITIAL.
          l_week  = lw_var_range-high.
          l_week = l_week - 3.
          CALL FUNCTION 'WEEK_GET_FIRST_DAY'
            EXPORTING
              week = l_week
            IMPORTING
              date = l_date.
          lw_range-low = l_date+0(6).
        ENDIF.
        lw_range-sign = 'I'.
        lw_range-opt  = 'BT'.
        APPEND lw_range TO e_t_range.
    ENDIF.
Regards,
Priya

Similar Messages

  • 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

  • How to make BEX Customer Exit Variable inactive through Customer Exit Code

    Hi,
    I had created two variables VAR1 and VAR2 as Customer Exit variables
    If VAR1 is entered then it should automatically make the VAR2 as NO Entry Variable.
    vice versa also required.
    can u help me with any code in CMOD so that we can make it inactive through Customer Exit Code.
    Thanks in Advance.
    Sunil.

    What i want is not commenting the code
    I want to make the BEX Variable as inactive by using the Customer Exit Code
    EX : If value in VAR1 is entered  then VAR2 should become automatically inactive.
           If value in VAR2 is entered  then VAR1 should become automatically inactive.
    how can this be done
    Thanks in advance.
    Sunil

  • Error with a customer exit variable

    I have a customer exit variable in a characteristic (0fiscyear). Also I have a manual input variable on the characteristic 0fiscper. The customer exit collects the four digits of the year that the user introduces a screen for the characteristic 0fiscper. Collect the value correctly and in the development system does not give error, but in the production system said that "the value 2008 (for example) is not valid for 0fiscyear characteristic". The two systems are at the same level of patches and queries are identical. Any idea why this error??
    Thanks and regards
    Ricardo

    No value at all behind 0fiscyear ?

  • Understanding complex query with selections(customer exit variables)

    Hi experts,
    I am trying to understand one query having  a combination of selections and BEx variables in it.
    In Characteristic Restrictions panel of Query Designer:
    we have some CHARs restricted by means of authorisation variables
    In Default Values panel:
    some other CHARs without any filters
    In free CHARS panel
    some characteristics
    In Rows panel:
    some more chars that were placed in Default values panel
    In Columns panel:
    Formula YTD on selection YTD
    Formula Monthly on selection Monthly
    Selection on YTD characteristic(hidden)
    Selection on Monthly characteristic(hidden)
    Selection XX(in definition,I saw selection on YTD Keyfigure and a characteristic variable VAR1(i-step=1) filled with customer exit..this variable picks up right version of Master Data...our system has many versions of master data,one for each year)
    Selection YY(in definition,I saw selection on Monthly key figure and the same characteristic variable VAR1 we used in Selection XX)
    When I execute this..I see one variable popup which asks for values for year and version of master data...I enter master data version for that year and the year....I see the result...
    Now I tried to experiment to learn...I deleted Selection XX and Selection YY and tried to execute....a variable popup asking for year...I enter year and tried to execute..it throws message---'Value for variable VAR2 cannot be determined'......
    I couldnot understand this error because VAR2 is a customer exit characteristic variable defined in CMOD...ITS NEVER USED IN THIS QUERY...but defined in CMOD to pick up correct version of Master data..its defined in such a way that it picks value depending upon VAR1 varaible....both variables function is same...its just that  VAR1 works on i_step=1 and VAR2 works on i_step=2 plus dependent on VAR1....
    Can anyone understand why I am seeing error about VAR2 when its never used in Query....??
    Thanks for your inputs....

    Hi Vikram,
    I am unable to find VAR2 anywhere in query designer....Can it be like that its hidden?
    Thanks and Rgds,
    SChand

  • Problem with customer exit variable that is input ready as well

    Hello all,
    I'm facing an issue with a customer exit variable that again has been defined as input ready. I'm not sure why it is working incorrectly and I#m wondering if this is a bug or if I do s.th. stupid.
    The problem is that in the exit program ZXRSRU01 this varibale does not go into the program code I have prepared for this variable. I have added entry points for all three i_step values 1,2,3, but the code will never be touched and in debugging I can see that it simply pypasses the code for this variable.
    I have tried to enter a value or to leave it blank, no difference.
    When I run another test by just using a customer exit variable w/o input ready capability, then I have no issue, the exit does exactly what I have coded.
    Does this mean, that a customer exit variable along with input readiness dows not work ?????
    You may ask why I need this variable. Well, my intention is to use the input value of this variable A to derive other values for a complete different variable B. Afterwards I want to erase the input given into variable A to have it blank.
    Any comments are appreciated
    Thanks

    Hi Heiko,
    I assume A & B variables are defined on different Characteristics. If you wish to derive B based on A, you can create the Query Characteristic Restriction on B & have a dummy RKF restricted on A whose processing is by Manual Input; where processing of B is by Customer Exit. In istep 2 you can check for B, read A & derive B. There would not be a need to blank out A since the Query would not be restricted on A - you can hide the dummy RKF from showing in the output. Just a thought.
    --Priya

  • Authorization (rsecadmin) with customer exit variable

    Hello,
    I need to maintain authorization on 0CALMONTH with a customer exit variable.
    0CALMONTH is "authorization relevant"
    I created a variable of type "customer exit" : ZVAR001 (this variable is OK, I checked its value in a query)
    I created a new authorization object with 0CALMONTH = $ZVAR001.
    When I run my query I have a message due to authorization error.
    If I change my authorization object by replacing my variable ($ZVAR001) by a constant value I have no authorization problem.
    I don't understand why...
    Error logs don't help me to solve my problem : I have the following message "Message EYE007: You do not have sufficient authorization" and system just says I have "0CALMONTH  I EQ $ZVAR001 " but doesn't precise values under variable ZVAR001
    Thanks for your help

    Indeed problem was in costumer exit because I used condition with "I_STEP". Since I have delete my condition I have no authorization problem with my variable....

  • RSCRM: Query date with customer exit variable

    Hi All,
    Is there any way to run the RSCRM transaction with a query with a customer exit variable for a date characteristic?
    The issue is that the query ran ok but the variable is not being updated when the RSCRM query is running with a background job or a process chain.
    Thanks in advance
    EV

    I do not think you can select Customer Exit variable, if you see the type is selected to Char Value Variables and it is not editable.
    It would be suggested to go for Customer Exit procesing type for your text variable.
    Cheers,
    Neel.

  • Changing a customer exit variable in Step 2 which was already set in Step 1

    Hello,
    i have the following problem.
    There are 2 BEx customer exit variables A and B.
    Variable A is filled in Step 1 before the user dialog appears.
    Variable B is determined in Step 2 in dependence of variable A.
    Now i want to change variable A in dependence of user entry althoug it was already filled in step 1. Can i somehow force the variable manipulation in step 2 for a single variable wich has already been set in step 1?
    Or is there a way to change all variables at once after they have been set e.g. in step 3?
    Regards,
    Alexander

    Hello Alexander!
    It's true: You cannot change values that were entered in step 1. It's a feature This is supposed to make sure that a value that was entered (or confirmed) by the user can never be changed by any piece of coding - customer or SAP. If that possibility existed, then that would create some real issues for reliability and also support.
    What is your scenario that you are trying to solve? Maybe there's another way to do it?
    Regards,
    Christian!

  • Behavior of customer exit variables (used as prompt) in a workbook

    Hi All,
    We are on NW2004s. I am using a customer exit variable in the prompt for my query then saved the query as a workbook.
    1. When I run the query the customer exit routine/program is called and the selection screen variable is populated with the correct value.
    Ex. Calendar year variable is a prompt variable defined as customer exit variable that gets the current year.
    when you run the query the prompt for calendar year shows "2007" as default value. this is correct.
    2. when I run the workbook using this same query, it looks like it is not executing the customer exit program. The value in the calendar year prompt is whatever the last value used when the workbook was last ran.
    I also placed a breakpoint in the customer exit program (EXIT_SAPLRRS0_001) to check if it is being called and it looks like it isn't.
    Is there a configuration/property that I should enable/check to make sure that customer exit variables used as prompts works in workbooks? Is this a bug? Anybody else have issues with using customer exit variables as prompts in their workbooks?
    Thanks in advance,
    Malou

    Hello Marilou,
    See the abswer I got from the 1st response on my question
    Save and reuse variable option in 7.0
    It may be a good help.
    Variables seem to be an understated item in the documents.
    Kind regards
    Message was edited by:
            BI developer

  • Problem with customer exit variable in BeX Query

    Hi All,
    We have created a customer exit variable in a query and populated with few patterns in customer exit.
    My query has to bring all the records where the address line is containg the patterns passed through customer exit. Here the query is not working as expected.
    It is bringing the values where the address line is exactly same as the pattern and not bringing the records where the pattern is part of the address line.
    For example: Pattern passed in customer exit = 'HOSPITAL'
    The record where address line = 'HOSPITAL' is shown in the rpeort, where the record with address line = 'HOSPITAL ROAD' is not shown in the report.
    I would appreciate your help on this.
    Regards,
    Rakesh

    Hi Diogo,
    Below is the code I am using in the customer exit.
    SELECT * FROM zae_tt_pbuild INTO TABLE gt_pbuild.
          IF sy-subrc = 0.
            LOOP AT gt_pbuild INTO gs_pbuild.
              CONCATENATE '*' gs_pbuild-pbuild '*' into lv_pattern.
              ls_range-low = lv_pattern.
              ls_range-sign = lc_sign_i.
              ls_range-opt = 'CP'.
              APPEND ls_range TO e_t_range.
              CLEAR: ls_range,
                     lv_pattern.
            ENDLOOP.
          ENDIF.
         ENDIF.
    I have tried using '%' instead of '*' aswell but the result is same.
    Thanks,
    Rakesh

  • Crystal Reports with BEx Query using Custom Exit Variable

    Hi,
    We have BW BEx Query using Customer User Exit variable to derive  the Fiscal Week for Last Year (called it VAR2) based on another user input variable Current Fiscal Week (called it VAR1).
    VAR2 is derived from VAR1 in CMOD via some codings and thus it DOES NOT have the "Variable is Ready for Input" flag ticked in the BEx. VAR1 is user input variable, so it has "Variable is Ready for Input" flag ticked in the BEx.
    When we create a Crystal Reports with the BEx Query using variable VAR2, and when we run it we got an error message saying "Failed to execute query; '[]<java.lang.UnsupportedOperationException: No Selection State Support!ZP_MI_LYPUBWEEK>'. Redesign your query or contact the data source maintainer to solve the problem".  (note: ZP_MI_LYPUBWEEK is VAR2 in this case).
    Could anyone please assist? Surely, CR supports BEx customer user exit variables like the above, right?. I also refer to the forum below as it seems to have a similar issue (except mine with an error message), but it does not provide a solution in it.
    Crystal Reports with BEx Query using Custom Exit Variable
    Thanks,
    Andy

    Hi Vibhav,
    We have the SAP Crystal Reports for Enterprise XI4.0 Version 14.0.0. Not sure if SP0 or other SP, got to check with Basis Team later.
    We tried that "mandatory" option and did not work either.
    Anyway, SAP has now come back again saying it is something they will fix it in next release/version. We got a phone call from them and a reply below to our OSS.
    23.08.2011 - 08:20:49 CET - Info for Customer by SAP  
    I have raised this issue on the Idea#s Place as an enhancement request
    on the below link:
    https://cw.sdn.sap.com/cw/ideas/5586
    This ER contains the information of including the customer exit
    variables in the report without checking the #input for ready# option.
    This ER can be considered for being implemented in the future
    versions. You can refer to SAP Note: 1515837 - How To: Enhancement
    Request Process - "Idea Place" for more information regarding the Idea
    Place.
    Cheers,
    Andy

  • Problem with customer exit variable on date range

    Hi All,
    I have customer exit variable on date range. In the selection screen it has to give the week range  as a default (05/21/2009 to 05/27/2009).
    Earlier its working fine and from yesterday onwards it is not working properly. yesday onwards default date range was not displaying in selection screen.
    Wht would be the problem.
    Thanks in Advance

    Hi Ashish,
    I checked every thing what u told earlier. Every thing is fine.
    And another thing is
    I have routine in infopackage level. Since day before yesterday it was working fine and yesterday onwards it was not working.
    Eg: budat will take the data based on routine for the week. But yesterday onwards it is not picking up the data.however I have the data in datasource for the week.
    Wht would be the problem. I debuged the code and its working fine.
    Sekhar

  • 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 cell definition in BEx

    Hi,
    I have defined a query with a Structure in Row and Key Figures in column.
    The result of query should look like this:
    Fiscal/Year Period | Quantity per month | Quantity cumulative
    011.2010 (Variable Offset Value -3) | 5 | 5
    012.2010 (Variable Offset Value -2) | 6 | 11
    001.2011 (Variable Offset Value -1) | 7 | 7
    002.2011 (Variable Single Value, Manual Input) | 8 | 15
    "Quantity cumulative" is defined as follows:
    Quantity cumulative (002.2011) = Quantity 001.2011 + Quantity 002.2011
    Quantity cumulative (001.2011) = Quantity 001.2011
    Quantity cumulative (012.2010) = Quantity 011.2010 + Quantity 012.2010
    Quantity cumulative (011.2010) = Quantity 011.2010
    "Fiscal/Year Period" and "Quantity per month" are OK. But I have problem to define the key figrue "Quantity cumulative".
    I have defined a Customer Exit Variable on Reference Characteristic "Fiscal/Year Period". Moreover I have also defined cell definition to define each individual cell for key figrue "Quantity cumulative" restricted by Customer Exit Variable.
    The Quantity cumulative (002.2011) and Quantity cumulative (001.2011) are calculated correct. But it doesn't work for 012.2010 and 011.2010 (because of previous year).
    I would be helpful if you can give some hints.
    Thanks

    Hi,
    try to use this trick with an IF condition in you customer exit. Calling 'var1' the manual input of:
    data: month_difference TYPE N.
    month_difference = 'var1'+4(3) - 4.
    IF month_difference >= 0.
    DO the classic code which you have already used.
    ELSE month_difference < 0.
    DO the replace concatenating manually 'var1'(4) and the single month.
    ENDIF.
    Hope it helps.
    Best regards.
    Simone.

Maybe you are looking for

  • MS Word automation with java

    hi our customer wants to be able to start a word document out of a java application (to write a letter...) and to fill in some variables, like the address, also out of the java application... anybody has an idea how to implement that ? thanks, domeni

  • Comparison of FCP v. Avid v. Adobe, PLZ Read!

    Firstly I wanted to commemorate the people of this Final Cut discussion board for being very helpful and for posting interesting and insightful questions and answers. I am planning to purchase, along with a friend, a sony HD camera and as well as som

  • Display range in 3d bar chart

    Hi, I'm creating a 3D chart (top right icon in the menu). I want to enter a range (like 34-68) for the first bar instead of a whole number like 68 and then have the 34-68 range display only... I don't want to have the bar start at 0 and go up to 68.

  • How to pay my final bill after switching carriers???

    I switched to a different carrier at the end of June. I was on auto pay and as usual I received an email from Verizon Wireless regarding my final bill. The email said that the automatic payment would be made on August 7th. However, it is now the 15th

  • Dock Icons Corrupted

    For several weeks now, when I restart I often lose a few dock icons. They turn into question marks or the application icon is replaced by a completely unrelated document icon which opens some image in Preview. I restart more often than I might otherw