BEx Variable I_Step 2, Custom Exit, IF Condition fail for "var ready Inp"

Hi all,
could someone please help with the following issue.
Variable definition is as followed.
processing type = Customer Exit
in the Details Tab I chose "Multiple Singles"
and variable as "Optional"
and "Variable is ready for Input".
objective is, once the user enter fiscperiod like 004.2011, in the customer exit, using my own logic I would need to derive some set of periods and send back to query.
In code, I am doing a check of I_STEP =2, then do the loop on the i_t_var_range, then capture the "LOW" value, then use my own logic to derive my own fiscperiods, then append the e_t_range, then Endif.
when I debug, control is going to IF condition, but I see that I_step contained "1" not 2 as expected, that's where the condition is failing, and control is skipping the whole block of the code inside the If condition.
this is giving me an impression that, the definition of the variable has some problem.
Any Insights are greatly appreciated.

I guess you need to use 2 variable.
Var1 will store the value of user entered fiscal year period and then. this is normal Variable and is ready for Input".
Var2 to will read that value of Var1 -
then you write your logic -
to populate Var2 correctly.
And use Var2 in your query.
Note : Var2 is not ready for input, and its exit variable
Regards,
Vinod

Similar Messages

  • Need clarification on BEX variable usage in customer exit.

    hi,
    i am an ABAP guy,i dont have any idea about BW,But here i got one problem,
    1)Variable has been craeted in BEX Report (processed by Customer exit).
    2)i am trying to write ABAP code in CMOD customer exit(ZXRSRU01),but when i am calling BEX variable it is not taking it is giving error(it should defined by data statment)so how to call the bex varible in Customer exit,if any body have sample code or any idea kindly let me know.

    Hi and welcome to SDN!
    there are a lot of examples and clarifications in these forums. For instance:
    Re: steps for a customer exit.
    Re: Regarding the Code for the Customer Exit
    Best regards,
    Eugene

  • Include character value variable processed by customer exit in the report

    I have defined a character value variable' processed by 'customer exit'. i am troubleshooting a problem so I need to see the value of this variable. Is there a way to display this variable in the report. If so, what section, rows or columns? And how to configure?
    Thanks,
    Sharon

    Hi,
    You can add directly the variable, in BEx Analyzer 7.0 you can add variables in the Excel Cell that you would.
    Steps:
    - Select the Excel Cell
    - In the BEx Design Toolbox, select Insert text
    - When you are in Design Mode - click over the text element
    - Go to Constants tab and select the Custom Exit Variable
    - Save the workwook
    Regards,
    Dani

  • 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

  • Fun BEx i_step 2 Customer Exit / ABAP Question!

    Hello Gurus
    We run two queres, one has a restriction on ZCOMPCODE (which is an OpCo), the other on ZCOMPHIER (Which is an OpCo Hierarchy).
    We have too many cubes under our multiProvider so to aid performance we have an 'InfoProvider' Customer Exit Variable in our queries. This restricts the cubes to those relevant to the selected OpCo by indexing against a predefined table.
    The code works for ZCOMPCODE.
    ZLASTHIER has a one to one relationship with ZCOMPCODE so we want to enhance our 'InfoProvider' Exit Variable to incorporate restrictions on ZLASTHIER.
    Ie currently we have:
    LOOP AT i_t_var_range INTO ls_var_opco WHERE VNAM = 'ZVAR006'.
    (Where ZVAR006 is on ZCOMPCODE)
    I want to enhance this so that if VNAM = 'ZVAR007' (which is a variable based on ZCOMPHIER), it will convert it.
    I need to tag something along the following lines into my code:
    If VNAM 'ZVAR007' = 'H1'.
    ls_opco = '001'.
    ELSEIF 'ZVAR007' = 'H2'.
    ls_opco = '002'
    etc etc
    Im not very good at abap but im sure I can't be miles off!
    Any help appreciated!
    Tom

    Hi
    Basically the requirement is to get Company code corresponding to the Hierarchy in ZVAR007 and then restrict to the particular Infoprovider. Plz let me know if my understanding is correct.
    Here we go :
    LOOP AT i_t_var_range INTO loc_var_range WHERE VNAM = 'ZVAR007'. "reads Hier value
    If sy_subrc is not initial.
    Select comp_code  comp_hier from table
    into itab1 where comp_hier = loc_var_range-low. " selects company code from thetable which has comp code - hierarchy mapping.
    read itab into wa_itab. " not giving condition assuming there s only one record.
    "Add the same code as in the user exit for Comp Code, to select the Infoprovider based on the company code selected(wa_itab-comp_code).
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDLOOP.
    Plz let me know in case of issues.
    Regards,
    Aparna

  • I_step = 2 : Customer Exit Variables

    Has anyone had problems with i_step = 2 in customer exit variables in 2004s queries and web templates.
    When the web template is first executed the call takes place directly after the variables values are entered.  This works as expected.
    If you return to the variable screen to change the variable values the call does not take place.
    We are on SP11.
    I have tested the same customer exit variable using a 3.5 Query and Web template and it works in both cases explained above.
    Has anyone had a similar problem?

    Hi MM
    Thanks for the pointer.  Unfortunately this did not help.
    It is interesting to note with 2 identical queries, 1 developed in the 3.5 Query Designer and the Other in the 2004s Query Designer.
    Both queries have the same customer exit variable.  The variable exit is called correctly on all calls (1st and 2nd) when the 3.5 query is executed. 
    The 2004s query does not yield the correct result in the new BI Web runtime.
    Also as we have just applied SPS11 to our development system, only our Development System has been effected.  Our QA and Production systems on SPS 10 are not effected.
    Cheers
    Ian
    PS> I have submitted a OSS note to SAP.
    Message was edited by:
            Ian Carbonel

  • How to change a Manual Input variable into a customer exit variable?

    Hello,
    I need to change the "processing by" option of an used BEx variable from "Manual Input" to "Customer Exit" but this field is not available (= in grey) in modification.
    Does it exist a tip or a standard program to modify this no-accessible field of an existing BEx variable?
    Thanks in advance for your answers,
    Samuel

    Hi,
    I don't think it's possible (unless tweaking some parameters directly in some tables, as stated in the previous post) so you would have to create a new one and replace it.
    Hope it helps,

  • Variable of Type Customer Exit

    HI All,
       Below is the code to derive a Time Band through a Customer Exit. But when i execute the query its going to Debugging mode automatically..... and throwing a message
    Value " is too long for variable XMON12
    >> Row: 73 Inc: LRRMSU13 Prog: SAPLRRMS
    System error in program SAPLRRS2 and form GET_SID-1- (see long text)
    WHEN 'XXXXXX'.
           read table i_t_var_range with key vnam = 'DATE_1' INTO i_s_var.
           L_S_RANGE-LOW   = '00000000'.
           L_S_RANGE-HIGH  = I_S_VAR-LOW.
           L_S_RANGE-SIGN  = 'I'.
           L_S_RANGE-OPT   = 'BT'.
           APPEND L_S_RANGE TO E_T_RANGE.
           WHEN 'XMON12'.
           L_S_RANGE-LOW   = 0.
           L_S_RANGE-HIGH  = 365.
           L_S_RANGE-SIGN  = 'I'.
           L_S_RANGE-OPT   = 'BT'.
           APPEND L_S_RANGE TO E_T_RANGE.
    Did i miss anything.
    Regards.

    Ramana,
    Variable: XMON12 for Days or Months ....??
    Write code below I_STEP = 2, and remove variable for ready for input(value will be populated via user exit).
    WHEN 'XMON12'.
    IF I_STEP = 2 "Variable get populated after providing input values.
    L_S_RANGE-LOW = 0.
    L_S_RANGE-HIGH = 365.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'BT'.
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDIF.
    Hope it Helps
    Srini

  • Text Variables processing as Customer Exit

    I have posted a similar problem but didnt get any response. Would appreciate if i get some kind of advice in this. I need to display header as Jan FY2007, Feb FY2007 and so on in my report. I want to use same text variable inorder to acheive this as i have a big number of colums displaying fiscal periods for all nearly 4-5 fiscal years. Replacement path doesnt apply as the"Label" option returns the short text. So i guess i need to write a customer exit inorder to fetch the medium text  description from 0FISPER table. I need some kind of help with ABAP code.
    Points will be awarded for any kind of helpful solution.

    Thanks Anil. Yes i am using BI 7.0 I thought of doing that. But as of now the BEx settings for 0FISCPER is Key and still it picks the Short text when i choose the replacament path with Label option. Do you still think if i change the Bex settings as Medium text it should solve the issue? And also please clarify after changing to Medium text do i still need to opt for Label replacement option to achieve my requirement?
    I will try to figure that out and will definitely assign points for your fruitful advice.
    Thanks.

  • How to display text variable of type customer exit

    Hi to all,
    I have created a query in query designer which display sales value according to plant.
    There i have also used a variable which will take input from user and restricted on 0CALDAY.
    I have also created 2 text variable to display the text for sales based on input in variable.
    I need when user enter the 01.02.2010 - 31.12.2010 value in variable , text variable should display SALES FROM 01.02.2010 TO 31.12.2010
    i knew how to do that by using text variable of processing type customer exit.
    But display of text variable is like SALES FROM 01022010 TO  31122010  ,
    But i need that SALES  01.02.2010 TO 31.12.2010
    i shall be thankfull to you for this.
    Regards
    Pavneet Rana
    Edited by: pavneet rana on Dec 22, 2010 7:46 AM
    Edited by: pavneet rana on Dec 22, 2010 8:03 AM

    Hi,
    Give Description on Sales Amount  as SALES FROM &ZVAR_YEAR1& TO &ZVAR_YEAR2&.
    ZVAR_YEAR1 & ZVAR_YEAR2 are the two text variables. These two variables should NOT be input enabled.
    In the Exit - under I_STEP = 2, write the below code.
    WHEN 'ZVAR_YEAR1'.
      DATA:   l_s_range       TYPE rs_s_range,
                   loc_var_range TYPE rrs0_s_var_range.
      READ TABLE i_t_var_range INTO loc_var_range WITH KEY vnam = 'ZVAR_INPUT_CALDAY'.
      l_s_range-sign = 'I'.
      l_s_range-opt  = 'EQ'.
      l_s_range-low  = loc_var_range-low.
      APPEND l_s_range to e_t_range.
    WHEN 'ZVAR_YEAR2'.
      DATA:   l_s_range       TYPE rs_s_range,
                   loc_var_range TYPE rrs0_s_var_range.
      READ TABLE i_t_var_range INTO loc_var_range WITH KEY vnam = 'ZVAR_INPUT_CALDAY'.
      l_s_range-sign = 'I'.
      l_s_range-opt  = 'EQ'.
      l_s_range-low  = loc_var_range-high.
      APPEND l_s_range to e_t_range.

  • Variable offset in customer exit

    Hello,
    I need to calculate the Date based on the user entered the values in the selection criteria 0calmonth.   Say the user entered the calmonth as 05/2008, i need to calculate the date and i can achieve this in customer exit.  But under calmonth variable if we use offset (as -1 or -2), it is not considerding.  Ex.  in selection criteria the value entered as 05/2008 and offset as -1,  then then date i need to calculate is based on value 04/2008 not 05/2008.   But in customer exit not sure how can i consider this offset value as well.
    Appreciate your earlier response.
    Thanks
    Sreedh

    Sreedh,
    if the offset is not fixed, then can you provide a formula variable for entering this offset and then pass on both the cal month and the offset to the customer exit?
    Lets assume calmonth is by variable V1 and formula variable is by v2, then pass to the customer exit v1-v2.
    Hope this helps
    Naveen.A

  • Using a dummy variable in a  customer exit

    I currently have a report that uses 0calmonth = Current Month (SAP Exit)
    Now, this works fine when running for the month, but if a user wants to see the last completed month I'd need to setup a separate report that says
    0calmonth = last month.
    These reports are broadcasted automatically by e-mail, this is why I don't want to specify the actual requested month n the variable, I'd need to change my settings all the time.
    I have a whole bunch of reports setup that way and I don't want to duplicate them all, what I had in mind was to use a dummy variable in which the user enters a value CMTD or LMTD.  These values would then be used in a customer exit of the kind:
    IF CMTD set as current month
    else if LMTD set as last month
    I have no problem with that last part, but how do I create that dummy variable and is there anyway (without adding an infoobject in my cube) to have it include in the F4 menu the two option CMTD and LMTD (which are really meaningless abbreviations...)
    Thanks all for your help.
    Eric
    Message was edited by:
            Eric Blondin

    OK, this was actually easy, I used a text variable to feed in CMTD or LMTD.  Any way to have the two values available as options?  Text variables don't provide a selection box...

  • Text Variable replace with Customer Exit Variable

    Dear Experts,
    I created a text variable based on replacementh path (instead of customer exit). The reference characteristic is same that as my customer exit Variable and replace it by Key.
    I want to replace it with already Existing Customer Exit Variable but it is not displaying in the List Box even though existing variable option is mandatory.
    Can any one Suggest me the answer for this.
    Regards
    Supraja.K

    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.

  • To Supress variable screen in WAD - variable used in customer exit

    Hi All,
    We have a requirement to supress variable screen with WAD 7.0, but the report on which we have built the WAD contains a variable which is used to calculate quaterly utilization in customer exit and ready for input.
    So as there is a variable in CMOD and used in report level, eventhough we supress variable screen in WAD, not getting supressed.
    Can you provide some pointers.
    Thanks,
    Sri Arun Prian

    Hi Arun.
    Can you please tell me, is the variable entry mandatory? If yes please make the variable entry is optional.
    Regards,
    Lokanatha.

  • Bex Odata Services with Customer Exit

    Hi All,
    Im using Bex as Odata Services in order to export the result set , everything works fine until i tried to use Customer Exit in Bex...in that moment the Odata Service goes down an shows a few errors.
    Does anybody know how can i manage this?
    Thanks a lot.

    Hi Marcos,
    Can you please explain your scenario and what you have done so far (e.g. share the coding in the user exit)?
    I understand that you get a few error messages. Please share them too and display the error messages on the lowest level (with details on the error).
    Last but not least, on which BW release and SP level are you working?
    Thanks,
    Sander

Maybe you are looking for