Text Variable(Customer Exit) displays variable name instead of its value.

Hi Gurus,
My requirement is to display the year(from variable) as the field name i.e Year end salary 2009.
I was using the fields name as hardcoded values like 2009 but as per my requirement i need to display it from the variable.
I tried using Text Variable using customer exit, but I'm getting variable name(zvariable) instead of value(2009).
Please help me out, many thanks in advance.
Regards,
Ankur

Hi,
Actually I tried to create a Text Variable with Replacement Path.
But here the problem is that we have a Characteristic Variable (Customer Exit) which is not listing in the selection box of Replacement Path.
Hence we tried to create another Text Variable (Customer Exit) and refering to the same Customer Exit code.
Regards,
Ankur

Similar Messages

  • BEx Variables - Customer Exit - Find Max and Min of two values

    Hi Experts, I have two ID's at any given time in my InfoProvider. I'm trying to create two user exit variable on this ID. One should return the max of the two and the other should return only available one (i.e. the Min). The variable should not prompt the user for any value. Any time the variable is used in the report. max should the max of the two ID's and the Min should show the lower of the two values.
    I would appreciate if somebody could provide the code that I can use.

    you could use below:
    Variable for Max
    SELECT MAX ( ID Field )
    FROM <Source>
    INTO <wa_id>.
    Variable for Min
    SELECT MIN ( ID Field )
    FROM <Source>
    INTO <wa_id>.

  • How to find out query name in customer exit for variables

    We use the same customer exit variable in different queries. In the customer exit we want to find out, which query has called the customer exit. With the technical query name we want to read a master data table entry.
    e.g. If we come from query ZG1_TEST1 we want to use selection sel1
    Query name  |  selection
    ZG1_TEST1   |  sel1
    ZG1_TEST2   |  sel2  
    How can we find out the query name in the customer exit for variables?
    Thanks for your help,
    Evi

    Hi Evi,
    check out the structure I_S_RKB1D in your exit. It contains the query.
    Siggi

  • No Query Result After Using Hierarchy Node Variable (Customer Exit)

    Hi
    I have problem at my query. It doesn't show anything in BEx but when i check the data in BW using tcode LISTCUBE i can display the data.
    This problem happen when i change the restrictions for one of characteristic in filter value.
    The characteristic is custom Infoobject (ZCPARTNER), which like Infoobject Partner Unit.
    Previously I set the restriction with constant value, example : A500,A700,A710,A720,A730,A740 and it worked before.
    But when I change it using hierarchy node variable (customer exit), this problem is arise.
    Here is my code at ZXRSRU01
      WHEN 'ZHIEPART'. --> hierarchy node variable
       BREAK-POINT.
        IF i_step = 2.
        Read from ZZCONSGR information
          LOOP AT i_t_var_range INTO loc_var_range
             WHERE vnam = 'ZZCONSGR' OR vnam = 'ZOCONSGR'. --> read input value from consolidation group variable
            CLEAR l_s_range.
            CLEAR l_s_range-low.
            IF loc_var_range-low EQ '000000000000030000'
               OR loc_var_range-low EQ '000000000000010130'.
              l_s_range-low = 'MEZBUNITMDI'.
              l_s_range-high = '0HIER_NODE'.
            ELSEIF loc_var_range-low EQ '000000000000040000'
               OR loc_var_range-low EQ '000000000000010160'.
              l_s_range-low = 'MEZBUNITMPI'.
              l_s_range-high = '0HIER_NODE'.
            ENDIF.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            APPEND l_s_range TO e_t_range.
            EXIT.
          ENDLOOP.
        ENDIF.
    Here the hierarchy in BW system:
    XXX Cons Unit Hierarchy Set; InfoObject ; Node Name
    - XXX Cons Unit Hierarchy Set; 0HIER_NODE; ZBUNITALL
      - XXX DownStream ... ; OHIER_NODE; MEZBUNITMDI
         - ME/A730; 0CS_UNIT; MEA730
         - ME/A740; 0CS_UNIT; MEA740
      - XXX Power ; OHIER_NODE; MEZBUNITMPI
        - ME A800 - A808; OHIER_NODE; MEZBUNITMPI
        - PT Mitra xxx; 0CS_UNIT;  MEA820
    Anyone can help my problem? Thank you
    Regards,
    Satria B Tandyono

    Hi Satria,
    Instead of following code ---
    CLEAR l_s_range-low.
    IF loc_var_range-low EQ '000000000000030000'
    OR loc_var_range-low EQ '000000000000010130'.
    l_s_range-low = 'MEZBUNITMDI'.
    l_s_range-high = '0HIER_NODE'.
    ELSEIF loc_var_range-low EQ '000000000000040000'
    OR loc_var_range-low EQ '000000000000010160'.
    l_s_range-low = 'MEZBUNITMPI'.
    l_s_range-high = '0HIER_NODE'.
    ENDIF.
    try this ---
    IF loc_var_range-low EQ '000000000000030000'
    OR loc_var_range-low EQ '000000000000010130'.
    l_s_range-low = 'MEZBUNITMDI'.
    ELSEIF loc_var_range-low EQ '000000000000040000'
    OR loc_var_range-low EQ '000000000000010160'.
    l_s_range-low = 'MEZBUNITMPI'.
    ENDIF.
    Note : whenver the option is EQ, the system takes only low value.

  • Exclude in variable customer exit

    Hello,
    Can you help me solve problem with exclude in variable customer exit? I have z-table with name of variable and values. Primary I need save multiple values with exclude. I was tried this code:
    if i_step eq 2.
    select * from zbwsd_01 into table i_t_var
         where vname = i_vnam.
    l_subrc = sy-subrc.
    else.
    l_subrc = 4.
    endif.
    if l_subrc = 0.
      loop at i_t_var.
        CLEAR L_S_RANGE.
        L_S_RANGE-LOW  = i_t_var-value.
        L_S_RANGE-SIGN = 'E'.
        L_S_RANGE-OPT  = 'EQ'.
        APPEND L_S_RANGE TO E_T_RANGE.
      endloop.
    else.
    I have NW2004s. Have you some idea?
    Thanks a lot
    Jiri

    Exclude is ok, if I use variable type Selection option. For type Multiple value this is not valid

  • Problem in the variable customer exit in the query jump target

    Hi developers,
    we have problem because we have created a variable time on 0CALDAY who is mapped in the cube of the stock with posting date.We launch the query for example with range 01/8/2005 31/8/2005 and the resul is OK.
    Then we jump on the other query where the users wish see the result of the posting date for the period 01/8/2005 31/8/2005 For resolved this problem we have created a variable customer exit for the characteristic 0Postingdate and have inserted the code in user exit variable:
    WHEN 'ZV_CEREG'.
        IF i_step = 2.
          LOOP AT i_t_var_range INTO loc_var_range
                 WHERE vnam = 'Z_DAT_AN'.
            CLEAR l_s_range.
            CLEAR datastock.
            l_s_range-low  = loc_var_range-low.
            l_s_range-high = loc_var_range-high.
            l_s_range-sign = loc_var_range-sign.
            l_s_range-opt  = loc_var_range-opt.
            APPEND l_s_range TO e_t_range.
            EXIT.
          ENDLOOP.
        ENDIF.
    When we effectued the jump the our objective is transfer the date inserted by user in the variable  of the query sender 'Z_DAT_AN' to the variable of the query receveir 'ZV_CEREG'.
    This step it does not work correctly, this why are different query?
    You can help me for resolved this problem!!
    Thanks Domenico

    Hi,
    I think, this approach does not work. Because customer exit will be finished before displaying the result set of 1st report. So the assignment to VAR2 from VAR1 does not execute then after.
    I hope, In RSBBS,after assigning receiver, in the assignment details,select 'Variable' for 'Type' of 'infoobject' 0calday.And select '0Postingdate' for 'fieldname' and select 'selection options' for selection type.
    Take help.sap.com help for further information.
    With rgds,
    Anil Kumar Sharma. P
    Message was edited by: Anil Kumar Sharma

  • RSBBS - create a variable customer exit based on initial selection

    Dear all,
    I am using RSBBS (RRI) to jump from one query specific cell to another query. The destination query gets the parameters from the selected cell. In order to achieve this, the only thing we have done was to insert the relevant characteristics as Free Characteristics on the destination query (no variables were required).
    Now, I need to add a new variable on my destination query. This variable should be a customer exist based on one of the paramenters that the destination query gets from the original query. How do I get this value to use it in the variable customer exit???
    Thanks in advance

    Thanks for your reply,
    I got it in a different but not tottally different way from wthat you suggested.
    I have created a variable () (ready for imput) for my characteristic. However, on transaction RSBBS, when defining the target query, I went to "Assigment Details" option and for my characteristic, I have changed the type form "generically" to "variable" and choosed the field name of the variable ().
    In this way the target report gets the original report definition for this characteristic as a variable that I can then use on my costumer exit.
    I have tryed and worked...brilliant!

  • Wrting customer exit in variables

    Hi Guys,
    I have to change the code in customer exit for variables in reporting.i have to give inputrange in 0calmonth(01/06-07/06)and i have to get the output as 0calday(multiplevalues),can any body help me out.
    Thanks
    Kiran

    Kiran,
       check this... i wrote the code as mentioed in my last post...
    data:w_date(8).
    CASE I_VNAM.
      WHEN '0CALDAY Variable Name'
        if i_step = 1.        clear l_s_range.
          read table I_T_VAR_RANGE where vnam = '0CALMONTH Varibale'.
          l_s_range-low = concatenate i_t_var_range-low+'01'.
          l_s_range-sign = 'I'.
          l_s_range-opt  = 'EQ'.
    w_date = concatenate i_t_var_range-high '01' into w_date.
    call function 'SLS_MISC_GET_LAST_DAY_OF_MONTH'
        exporting
             DAY_IN = w_date
        importing
             LAST_DAY_OF_MONTH = l_s_range-high.
          append l_s_range to e_t_range.
        endif.
    endcase.
    check this code and let me know...change the Variable Names and keep capital letters.
    i'm telling you again... if the 0CALMONTH variable range 200605 to 200608. code will populate the values for 0CALDAY like this...20060501 to 20060831.
    all thes best.
    Regards,
    Nagesh Ganisetti.

  • Do we write variable customer exits for virtual key figures in Bex?

    Hi all,
    Am I thinking the right here " We write variable customer exits in CMOD for virtual key figures in BEx " or am I totally wrong. If thats the case where do we write it.
    Thanks,
    JB

    Nevermind

  • Customer Exit For Variable

    Hi Experts,
    Currently i am using SAP BI 7.0, I dont have much ABAP knowledge.
    Requirement : I need to create a Customer exit on variable to derive Fiscal period from the date entered manually by user.The date is in mm/dd/yyyy format and i need to derive Fiscal period from it.
    Please assist me in doing this.
    Best Regards,

    Hi,
    Assume date entered by the user is captured in user input variable: Variable_Date
    Exit Call after User Input
    <Declaration>
    DATA :  l_date1(7) TYPE c,
              l_year(4) TYPE c,
              l_month(2) TYPE c,
             LS_RANGE_IN_LINE LIKE LINE OF I_T_VAR_RANGE,
             d_date type sydatum.
    <You need to write code in Step2 as you would be reading data entered by user.>
    WHEN 2.
        CLEAR l_s_range.
        READ TABLE I_T_VAR_RANGE WITH KEY VNAM = 'Variable_Date' INTO
                      LS_RANGE_IN_LINE.
            d_date = LS_RANGE_IN_LINE-LOW .
            l_year = d_date(4).
            l_month = d_date+4(2).
            CONCATENATE l_year '0' l_month INTO l_date1.
          l_s_range-low  = l_date1.
          l_s_range-sign = 'I'.
          l_s_range-opt  = 'EQ'.
          APPEND l_s_range TO e_t_range.
    Regards
    Lavanya

  • Allowing customer exit interval variables to be "Ready for Input"

    Hi BI fans,
    I am looking to construct a Pie Chart where the default view will show the Year-To-Date data. At present, we are utilizing a customer exit variable (from the 0FISCPER characteristic) to carry out this task.
    It is also required, however, to allow the user to manually adjust the start <u><b>and</b></u> end date of this period. Is it possible to have a customer exit interval variable which will allow the user to modify the start and end date – and thus facilitate specified time periods?
    I look forward to hearing from you,

    Hi
    Use a BI Content variable like 0I_CFYTD - Year to Date For Current Fiscal Yearm, this variable is a interval variable and will default from fiscal period 1 to the current period.
    If you edit the variable and set it to ready to input then when you run the report at the variable screen you can change the period on which you want to report.
    hope this helps

  • How to debug i_step=0 Bex Variable (Customer Exit)

    Hi all,
    can anyone please help me regarding following problem:
    I have a variable (customer exit) in a query. This is for hierarchy authorization.
    This variable is mentioned in my analysis authorization (Infoobject 0COSTCENTER).
    Now i want to debug the coding when execute the query in TA RSRT.
    But when i set a break-point. The i_step starts with 1. I want to debug
    the coding when the i_step is 0 !!!! Any idea?
    Best regards,
    Frank

    Here a break solution:
    only for develop system-
    you can set this code at start of the include:
    DATA: flag TYPE c.
    WHILE flag IS INITIAL.
    ENDWHILE.
    let start the query, then go to SM50 and take in debugging the process in loop. (Programe/mode-program-debugging).
    Pay attention leave the code immediately after that.

  • Customer Exit - Fill variable depending on query view name

    Hi
    We're running BW 7.0
    We have a query which is used for broadcasting and as well for user input. That's why we have a variable which is default filled by a customer exit. This variable is the week and is default filled: fist week of year up to actual week.
    But now we have for the same query different selection requirenments.
    The same query should be send by email with
    - first week of year up to actual week
    - previous week
    Because of dynamic variables the calweek needs to be filled by customer exit and worked until now fine - until a second requirenment was coming (separat broadcast only with previous week).
    I don't like the idea to copy the query because of maintenance work.
    I'd like to have several views - and depending on the view name etc. I would fill the customer variable. But I don't get the query view name into customer exit - right?
    Do you have any other ideas?
    How do you handle such requirenments?
    Thx
    Roger

    Hi Helder,
    I understand your requirement but I don't understand the solution you are using. I think it's a bit tricky.
    What I would do is:
    Create three variables:
    - VAR1: Single value, mandatory, ready for input, customer exit. Used to store "User input date"
    - VAR2: Select option, customer exit, not ready for input. Used to store Valid From restriction.
    - VAR3: Select option, customer exit, not ready for input. Used to store Valid to restriction.
    Then, use this code:
    WHEN 'VAR2'.
    IF I_STEP = 2.
    READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE
    with key VNAM = 'VAR1'.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW = LOC_VAR_RANGE-LOW.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'LE'.
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDIF.
    WHEN 'VAR3'.
    IF I_STEP = 2.
    READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE
    with key VNAM = 'VAR1'.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW = LOC_VAR_RANGE-LOW.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'GE'.
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDIF.
    I think this should work, and you'll have three independent variables used for one purpose each.
    Hope this helps.
    Regards,
    Diego

  • SSingle Variable (Customer Exit)

    Hi,
    Into the ABAP code, if I add the line "APPEND L_S_RANGE TO E_T_RANGE." the variable is not working!!!
    This mean I can't get more than one value into my variable???
    Could anyone help please?
    http://wiki.sdn.sap.com/wiki/display/BI/Sample+user+exits+for++Bex+Variables+in+SAP+BW
    SINGLE VARIABLE
    WHEN 'VAR_SINGLE'.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW = '40'.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    APPEND L_S_RANGE TO E_T_RANGE.
    My customer exit:
    zpl TYPE char4.
    IF i_step = 2.
      CASE i_vnam.
        WHEN 'ZPLANT1'.
          LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'ZV_TXT2'.
            CLEAR: l_s_range.
            zpl = loc_var_range-low.
            CASE zpl.
              WHEN 'NORD'.
                CLEAR L_S_RANGE.
                l_s_range-low = '0010'.
                l_s_range-sign = 'I'.
                l_s_range-opt = 'EQ'.
                APPEND l_s_range TO e_t_range. *** When I add this line into the code, the variable is not working when I launch the BEx***
              WHEN OTHERS.
                l_s_range-low = '0010'.
                l_s_range-high = '0175'.
                l_s_range-sign = 'I'.
                l_s_range-opt = 'BT'.
            ENDCASE.
            APPEND l_s_range TO e_t_range.
          ENDLOOP.
      ENDCASE.
    ENDIF.
    I would like to do this:
        WHEN 'ZPLANT1'.
          LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'ZV_TXT2'.
            CLEAR: l_s_range.
            zpl = loc_var_range-low.
            CASE zpl.
              WHEN 'NORD'.
                CLEAR L_S_RANGE.
                l_s_range-low = '0010'.
                l_s_range-sign = 'I'.
                l_s_range-opt = 'EQ'.
                APPEND l_s_range TO e_t_range.
                l_s_range-low = '0175'.
                l_s_range-sign = 'I'.
                l_s_range-opt = 'EQ'.
                APPEND l_s_range TO e_t_range.
              WHEN OTHERS.
                l_s_range-low = '0010'.
                l_s_range-high = '0175'.
                l_s_range-sign = 'I'.
                l_s_range-opt = 'BT'.
            ENDCASE.
            APPEND l_s_range TO e_t_range.
          ENDLOOP.
      ENDCASE.
    ENDIF.
    Thx in advance
    Batou

    Hi,
    DATA : l_s_range TYPE rsr_s_rangesid.
    DATA : loc_var_range LIKE rrrangeexit.
    Here:
    ZPLANT : Is customer Exit variable on Plant
    ZV_TXT1: Is Text variable Bcoz I'll gibe input through variable in Report.
    ZPL =  loc_var_range-low = CHAR 60
    WHEN 'ZPLANT'.
       LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'ZV_TXT1'.
          CLEAR: l_s_range.
               ZPL = loc_var_range-low.
                CASE ZPL.
                  WHEN 'A'.
                         l_s_range-low = 'PA01'.
                         l_s_range-high = 'PA05'.
                         l_s_range-sign = 'I'.
                         l_s_range-opt = 'BT'.
                  WHEN 'B'.
                         l_s_range-low = 'PB01'.
                         l_s_range-high = 'PB05'.
                         l_s_range-sign = 'I'.
                         l_s_range-opt = 'BT'.
                  WHEN OTHERS.
                         l_s_range-low = 'PA01'.
                         l_s_range-high = 'PZ10'.
                         l_s_range-sign = 'I'.
                         l_s_range-opt = 'BT'.
                ENDCASE.
                     APPEND l_s_range TO e_t_range.
              ENDLOOP.
      ENDCASE.
    ENDIF.
    Thanks
    Reddy

  • Variable Customer Exit Is Not Working

    Dear all,
    I have created two variables to compare current month and previous month:
    ZCURMONTH
    ZPREVMONTH
    However, only column with ZCURMONTH displays the data but not column with ZPREVMONTH.
    Can someone tell me what is wrong with this customer exit code?
    IF I_STEP = 2.
      CASE I_VNAM.
        WHEN 'ZCURMONTH'.
          CLEAR loc_var_range.
          READ TABLE i_t_var_range INTO loc_var_range WITH KEY VNAM = '0P_PER3'.
          CLEAR l_s_range.
          l_s_range-sign     = 'I'.
          l_s_range-opt      = 'BT'.
          IF loc_var_range-low GT '012'.
            l_s_range-low = '012'.
            l_s_range-high = loc_var_range-low.
          ELSE.
            l_s_range-low = loc_var_range-low.
            l_s_range-high = loc_var_range-low.
          ENDIF.
          APPEND l_s_range TO e_t_range.
        WHEN 'ZPREVMONTH'.
          CLEAR loc_var_range.
          READ TABLE i_t_var_range INTO loc_var_range WITH KEY VNAM = '0P_PER3'.
          CLEAR v_period.
          IF loc_var_range-low LT '013'.
            v_period = loc_var_range-low - 1.
          ELSEIF loc_var_range-low = '013'.
            v_period = loc_var_range-low - 2.
          ELSEIF loc_var_range-low = '014'.
            v_period = loc_var_range-low - 3.
          ELSEIF loc_var_range-low = '015'.
            v_period = loc_var_range-low - 4.
          ELSE.
            v_period = loc_var_range-low - 5.
          ENDIF.
          CLEAR l_s_range.
          l_s_range-sign     = 'I'.
          l_s_range-opt      = 'BT'.
          IF loc_var_range-low GT '001'.
            l_s_range-low = v_period.
            l_s_range-high = v_period.
          ELSE.
            l_s_range-low = '012'.
            l_s_range-high = '016'.
          ENDIF.
          APPEND l_s_range TO e_t_range.
      ENDCASE.
    ENDIF.
    Thanks!

    Hi AL,
    I set the variable to represent "Interval" instead of "Multiple Single Values". Which one is correct in my case i.e. Period 12 - Period 16?
    Also, I have set the break-point for debug by monitoring the L_S_RANGE structure and E_T_RANGE table. The values are what I expected in EXIT_SAPLRRS0_001 function. However, I lost the plot when it goes to another function i.e. RRS_VAR_VALUES_EXIT_AFTER, the L_S_RANGE has changed to another value and E_T_RANGE becomes invalid.
    Appreciate further inputs.

Maybe you are looking for