Customer Exit - Reference value of variable in another variable

Hi
I am writing a query in BI7, i have a user entry variable V1 and a customer exit variable V2, both are on the version characteristic.
I need to write some code that will do the following:
If V1= 'WIP'
V2 = 0
ELSE
V2 = V1
End
Any help would be appreciated.
Thanks

Hi Niel
Thanks for the code, id already read the document but had had trouble trying to get it to work with my requirements, unfortunatley the code you gave me did not seem to be restricting the data, i made a few changes and set both the variables to ready for input and made the V1 variable (ZCUBVR03) default to 'WIP', i changed the code to step=1 and it works, when the variable screen pops up if WIP is default
ZCUBVR03 = WIP
ZCCFTEVR01 = 0
or if default is 1
ZCUBVR03 = 1
ZCCFTEVR01 = 1
This should happen after the variable screen when the user has entered ZCUBVR03, why is the code (below) not working when set to step 2?
Any help would be appreciated
Thanks
WHEN 'ZCCFTEVR01'.
      IF I_STEP = '1'. "after the popup
          LOOP AT i_t_var_range INTO loc_var_range
          WHERE vnam = 'ZCUBVR03'.
            CLEAR l_s_range.
            IF loc_var_range-low = 'WIP'.
              l_txtsh = '000'.
            ELSE.
              l_txtsh = loc_var_range-low.
            ENDIF.
              l_s_range-low = l_txtsh.
              l_s_range-high = ''.
              l_s_range-sign = 'I'.
              l_s_range-opt = 'EQ'.
              APPEND l_s_range TO e_t_range.
            EXIT.
          ENDLOOP.
          ENDIF.

Similar Messages

  • Issue with customer exit for copying one variable value to another

    Hello Gurus,
    I need to copy the value of a single value variable into another single customer exit variable.
    I coded as below.
      WHEN 'customer_exit_var'.
        IF I_STEP = 2. "after the popup
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
          WHERE VNAM = 'user_input_Variable'.
            CLEAR L_S_RANGE.
            L_S_RANGE-LOW = LOC_VAR_RANGE-LOW.
            L_S_RANGE-HIGH = ''.
            L_S_RANGE-SIGN = 'I'.
            L_S_RANGE-OPT = 'EQ'.
            APPEND L_S_RANGE TO E_T_RANGE.
            EXIT.
          ENDLOOP.
        ENDIF.
    I used the condition <= for the customer exit variable in the report. But, it is considering only single value, but not all the values <= to the give value.
    Please help me in this regard,
    Thanks,
    Aarthi.

    Thanks for your immediate response Govind.
    My report is restricted based on two dates. Date1 and Date2. Need to consider all records whose dates are <= Date1 and <= Date2.
    Date1 and Date2 should have same values. But user inputs only Date1.
    So, I created Date1 as Single, User Input Variable restricted the query with <=Date1.
    Next I created Date2 as Single, Customer Exit Variable and restrcited the Query with <=Date2.
    In CMOD I used the above code to assigne Date1 Value to Date2.
    When I execute the report, say I give todays date in the report (Dec, 12, 2007). Date2  has to consider all the values <= Dec 12, 2007. But, in my case it is considering only Dec 12, 2007, but not the before dates.
    So, Please help me in solving this problem.
    Thanks,
    Aarthi.

  • Customer Exit (i_step = 1) - Retrieve Variable Value

    Hello,
    I have BW web report and created customer exit (i_step = 1). The BW Web Report is being called from BSP application and I'm passing variable value on URL.
    For example:
    /sap/bw/BEx?cmd=ldoc&template_id=Z_JEFF_CLAIM_TEST&VAR_NAME_1=ZAGGET&VAR_VALUE_EXT_1=10310
    What I need to do now is retrieve the variable value passed on URL in the custom exit i_step = 1. 
    Does anyone know how to do this?
    Thanks,
    Gary

    hi Gary,
    can try in variable user exit ZXRSRU01 ?
    DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.
      IF I_STEP = 1.
        LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'ZAGGET'.
        .... = LOC_VAR_RANGE-LOW.
        ENDLOOP. 
      ENDIF.
    hope this helps.

  • Customer exit not working for variable

    hi ,  i have created the variable with customer exit,options for variable are optional and ready for input checked.when in debugging mode the value in exit i_vnam is having value of the variable but in the second time it dont have.so i cannot go the code after user inputs data. please solve.

    Hi vijay pilli,
    Custome exit means  by writing code you have to populate the value by specifying a value directly or from the user input.
    for example :
    when ever user runs the report he need to see only for that current year sales revenue.So, for this create a variable for 0calyear > customer exit> clear the ready for input>
    here based on sy-datum we will get the current year.
    when variable
    l_s_range-low = Sy-datum+0(4).
    l_s_range-sign = I.
    L_S_RANGE-OPT = EQ
    Append L_S_RANGE TO E_T_RANGE.
    Regards
    Sree

  • 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

  • Passing multiple single values in Customer Exit Variables

    Hi,
    I have one requirement to Pass multiple single values in Customer Exit Variable.
    If the user gives 2010 i need to get value previous fisacal year(2009),if its 2009, we need to get 2009.
    Just requirement is like how to pass multiple single values?
    Thanks.

    Hi..
    For this create a variable- Types of variable= Characteristics Value> Processing type as Customer Exit-->Reference Char as Fiscal year..
    Try this code..
        when 'xxxx'.
          DATA: lv_zp0003_month(2) TYPE n,
                  lv_zp0003_year(4) TYPE n.
          CLEAR: lv_zp0003_month, lv_zp0003_year.
          lv_zp0003_month = sy-datum+4(2).
          lv_zp0003_year = sy-datum(4).
    If the month is January the year is set to previous year
          IF lv_zp0003_month = '01'.
            lv_zp0003_year = lv_zp0003_year - 1.
           l_s_range-low = lv_zp0003_year.
    Else the year is set to actual
          ELSE.
            l_s_range-low = lv_zp0003_year.
          ENDIF.
          IF l_s_range-low = l_s_range-high.
            l_s_range-opt = 'EQ'.
          ELSEIF l_s_range-high IS INITIAL.
            l_s_range-opt = 'EQ'.
          ELSEIF l_s_range-low LT l_s_range-high.
            l_s_range-opt = 'BT'.
          ENDIF.
          l_s_range-sign = 'I'.
          APPEND l_s_range TO e_t_range.
    Hope this helps.
    Regards.
    AKG

  • Formula Variable Customer Exit

    Hi Gurus,
    I have a requirement where I have to read the one formula variable value ( Replacement path with attribute value ) into customer exit of another characteristic variable .
    For example :
    I have one characteristic formula variable called VAR1 ( which gives the value ) .This value I want to use it in customer exit of another varable  VAR2 ( is it possible to use one formula variable value into another variable ) which I want to use it in Customer exit.
    VAR1  -  Formula Variable
    VAR2  -  Simple Variable with out User Input.
    Example is as below :
    Formula Variable ( VAR1 i.e PLND_DLVRY )  based on this value I want to define another variable APO Version in the Customer
    If it is possible please guide me what is the process. Also I want to make sure which I_STEP I need to use...
    Please guide the best solution.
    Thanks
    Ganesh Reddy.

    Hi Krishnan / Arvind,
    Sorry I was thinking 0PLND_DELRY is nav attribute for 0MAT_PLANT. But 0PLND_DELRY is the quantity field so I can't make this field as a nav attribute. Right now I am populating directly in the Cube using master data. my cube  data looks like
    Fields Description
    F1 = Version
    F2= Material
    F3= Plant
    F4= 0PLND_DELRY
    F5= Calendar Yr/Month
    F6= Concensus Forecast ( Key Figure )
    Condition is Combination of Material and Plant will define 0PLND_DELRY ( Delivery Time )
    F1  |   F2 |  F3  |  F4   |F5  |   F6
    201104 | M001 |200 |  30 |  2011/07 |  5100
    201104 | M002 |200 |  60 |  2011/07 |  6200
    201104 | M001 |300 |  90 |  2011/07 |  4900
    201104 | M001 |200 |  30 |  2011/07 |  7900
    201105 | M001 |200 |  30 |  2011/07 |  5700
    201105 | M002 |200 |  60 |  2011/07 |  6900
    201105 | M001 |300 |  90 |  2011/07 |  4300
    201105 | M001 |200 |  30 |  2011/07 |  7400
    201106 | M001 |200 |  30 |  2011/07 |  5500
    201106 | M002 |200 |  60 |  2011/07 |  6700
    201106 | M001 |300 |  90 |  2011/07 |  4500
    201106 | M001 |200 |  30 |  2011/07 |  7500
    201107 | M001 |200 |  30 |  2011/07 |  5000
    201107 | M002 |200 |  60 |  2011/07 |  6500
    201107 | M001 |300 |  90 |  2011/07 |  4000
    201107 | M001 |200 |  30 |  2011/07 |  8000
    In Order to bring the variance for F6 for Material M001 and Plant 200 then my result is
    Calendar Yr / Mnth = 2011/07
    Current Value = 5000
    Lead Time = 30,  offset = -1
    Version = 201107-1 = 201106 Then
    Prior Value = 5500
    Variance = 5000-5500 = -500
    for Material M002 and Plant 200 then my result is
    Calendar Yr / Mnth = 2011/07
    Current Value = 6500
    Lead Time = 60,  offset = -2
    Version = 201107-2 = 201105 Then
    Prior Value = 6900
    Variance = 65000-6900 = -200
    for Material M001 and Plant 300 then my result is
    Calendar Yr / Mnth = 2011/07
    Current Value = 4000
    Lead Time = 90,  offset = -3
    Version = 201107-3 = 201104 Then
    Prior Value = 4500
    Variance = 4000-4900 = -900
    for Material M001 and Plant 200 then my result is
    Calendar Yr / Mnth = 2011/07
    Current Value = 4000
    Lead Time = 30,  offset = -1
    Version = 201107-1 = 201106 Then
    Prior Value = 4500
    Variance = 8000-7500 = -500
    Every month we get same data with different version and different numbers for all months. Please advise me what is the best solution we can do
    Thanks
    Ganesh Reddy.

  • Change customer exit variable in selections over Dropdownbox

    Hello Experts,
    we are on NW2004s, SP12.
    I have a customer exit variable (0CALYEAR) in two columns. In the first column the customer exit variable and in the second column the customer exit variable with an offset -1.
    Now I want to change the year in a dropdownbox. Under <=BW3.5 that was not possible, only over a how to paper.
    I can fill the dropdownbox in the web template but when I change the year, it jumps back to the year selected by the customer exit. How can I change the variable in the new web application designer (2004s) during the navigation? Has any one experience with such a problem?

    Hallo Frank,
    how can I change the variable values in the WAD?
    The parameters of the variable: mandatory, customer exit, reference characteristic: 0calyear, single value, not ready for input.
    My coding:
    DATA: l_s_range TYPE rsr_s_rangesid.
      DATA: i_s_var_range   TYPE  rrs0_s_var_range.
      DATA: i_calyear(4) TYPE c,
            i_duedate(4) TYPE c.
      IF i_step = 1.   " Variable nach Selektionsbild bearbeiten
        READ TABLE i_t_var_range
        WITH KEY vnam = 'CALYEAR_X01'
        INTO i_s_var_range.
        i_calyear = i_s_var_range-low.
        i_duedate = '0210'.
        IF sy-datum+4(4) GE i_duedate.
          i_calyear = sy-datum(4).
        ELSE.
          i_calyear = sy-datum(4) - 1.
        ENDIF.
    Rückgabetabelle füllen
        CLEAR l_s_range.            " Range-Tabelle füllen
        l_s_range-low  = i_calyear.
        l_s_range-sign = 'I'.
        l_s_range-opt  = 'EQ'.
        APPEND l_s_range TO e_t_range.
      ENDIF.
    Thank you for your fast reply!
    Regards
    Jens

  • Query Customer Exit - Multi Single Values

    Hi SDN,
    Is it possible to return multi-single values in a customer exit for a query variable or only a range?
    I have 2 characteristics (NUMC), an item ZITEM and a group ZGROUP.  An item can belong to many groups.
    ZITEM           ZGROUP
    1                     1
    1                     2
    2                     3
    4                     1
    I would like to create a variable in Query Designer for ZITEM that returns a list of single values for ZITEM (not a range).  For example, Group 1 should return items 1, 4.
    The relationship between ZITEM and ZGROUP is not defined in master data (compounding).  Currently, I have a DSO which has ZITEM and ZGROUP defined as a key.  I would like my query variable-customer exit to read the DSO and return a list of single values of ZITEM.
    I'm assuming making ZGROUP a compounding infoobject of ZITEM would solve the issue in query designer because I could restrict on ZGROUP.  I have not used this approach because it would require modifying standard extractors.
    Another option I explored was to create an Infoset between my InfoCube and the DSO which has ZITEM & ZGROUP.  Unfortunately my InfoCube has NonCulm. Key Figures and therefore cannot be used in an infoset.
    Does anyone know how to create a multi-single value customer exit or have any ideas on how to solve this problem?
    Thanks!

    I was able to create a customer exit which performed multi-single values.
    Psuedocode:
    1) Create Internal Table and populate it with DSO data for Group and Item
    2) In Customer Exit, loop through internal table for the group you want
    3) In loop, append l_s_range to e_t_range (this will add multi-single values)
    WHEN 'ZCX_FLWGRP60'.
        IF I_STEP = 2.
          l_s_range-sign = 'I'.
          l_s_range-opt = 'EQ'.
          "get multi single values for flow types
          LOOP AT l_t_flwgrp INTO l_s_flwgrp
            WHERE /BIC/ZFLW_TP_G = '60'.
            l_s_range-low = l_s_flwgrp-FS_FLW_TP.
            append l_s_range TO e_t_range.
          ENDLOOP.
        ENDIF.

  • Customer exit variable output error

    Hi gurus,
    I have created one customer exit variable. in the selection screen i am giving multiple plant and material value,
    my code is working for sigle plant and single material.
    when i have taken multiple value. i am getting error message
    error is 'No value determined for th variable"
    When i debug my code in RSRT, it is giving all the values for different combination of plant and material. and those values are getting in the E_T_RANGE.
    but out put it is giving the error.
    my code is:
    WHEN 'ZPRDEMVA'.
        IF i_step = 2.
          READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE
          WITH KEY VNAM = 'ZPRRNDT'.
          v_date = LOC_VAR_RANGE-LOW.
          v_year = v_date+0(4).
          v_month = v_date+4(2).
          v1_date = v_date+6(2).
          v3 = v_year - 1.
          v4 = v_month - 1.
          if v4 = 00.
          v4 = 12.
          v3 = v3 - 1.
          endif.
          concatenate v3 v4 v1_date into ddate.
          CALL FUNCTION 'DATE_GET_WEEK'
            EXPORTING
              DATE         = ddate
            IMPORTING
              WEEK         = zweek
            EXCEPTIONS
              DATE_INVALID = 1
              OTHERS       = 2.
          CALL FUNCTION 'WEEK_GET_FIRST_DAY'
            EXPORTING
              WEEK         = zweek
            IMPORTING
              DATE         = monday
            EXCEPTIONS
              WEEK_INVALID = 1
              OTHERS       = 2.
          sunday = monday + 6.
          v3_date = monday.
          v4_date = sunday.
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
                  WHERE VNAM = 'ZPRPLNML'.
          CLEAR L_S_RANGE.
            v_werks          = LOC_VAR_RANGE-LOW.
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
                  WHERE VNAM = 'ZPRMATML'.
          CLEAR L_S_RANGE.
            v_matnr          = LOC_VAR_RANGE-LOW.
          data: dummy_menge like i_mseg-menge value '0.01'.
          Do 52 times.
               select MATERIAL PLANT QUANT_B MOVETYPE
                     from /BIC/AWINO0100 into  table  i_mseg
                     where PSTNG_DATE between monday and sunday
                     and   MOVETYPE between 261 and 262
                     and   MATERIAL = v_matnr
                     and   PLANT = v_werks.
                         if sy-subrc NE 0.
                           i_mseg-menge = '0.01'.
                           i_mseg-matnr = v_matnr.
                           i_mseg-werks = v_werks.
                           i_mseg-bwart = '261'.
                           append i_mseg.
                         endif.
            loop at i_mseg.
              itab1-matnr = i_mseg-matnr.
              itab1-werks = i_mseg-werks.
              itab1-menge = itab1-menge + i_mseg-menge.
              itab1-bwart = i_mseg-bwart.
              COLLECT i_mseg into itab1.
            endloop.
            sort itab1 by matnr werks bwart.
            loop at itab1 where bwart = '261'.
              itab2-matnr = itab1-matnr.
              itab2-werks = itab1-werks.
              itab2-bwart = itab1-bwart.
              itab2-menge = itab1-menge.
              read table itab1 with key matnr = itab2-matnr
                                        werks = itab2-werks
                                        bwart = '262'.
              if sy-subrc = 0.
                itab2-menge =  itab2-menge - itab1-menge.
              endif.
              append itab2.
            endloop.
            clear itab1[].
            refresh itab1.
            sunday = sunday + 7.
            monday = monday + 7.
          ENDDO.
          loop at itab2.
            sum1 = sum1 + itab2-menge.
          endloop.
          average = sum1 / 52.
          loop at itab2.
            sum2 = sum2 + ( ( itab2-menge - average ) *  ( itab2-menge - average ) ).
          endloop.
          sum2 = sqrt( sum2 / 52 ).
          l_s_range-sign = 'I'.
          l_s_range-opt = 'EQ'.
          l_s_range-low = sum2.
          Append l_s_range to E_T_RANGE.
          clear itab2[].
          refresh itab2.
          sum1 = 0.
          sum2 = 0.
          monday = v3_date.
          sunday = v4_date.
          ENDLOOP.
          ENDLOOP.
        ENDIF.
    Can any one please help me.
    Thanks in advance.

    Hi Alec,
    i created a customer exit with the formula variable only. in the code i am getting the both quantity and unit fields. now i want to get quantity with unit in output.
    thanks

  • 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

  • Authorisation variable using customer exit

    Hi,
    how to populate a authorisation object at runtime? is it possible to have a variable etc that can be populated a runtime?
    I have a object zsales_off which has different values for different users. i need to create separate roles just to have different values for sales office for different users. i would like to avoid this by having a single role with the zsales_off getting populated at runtime.
    please give details steps with code if possible? 
    i have created the authorisation variable and am using it in the query. if i manually assign values for sales office in the role, it is working fine.
    i want to assign values at run time. i am confused with the process as such.
    few specific doubts like:
    1> the variable should be of "authorisation" processing type or "customer exit" processing type.
    2>what to use I_step=0 or I_step =1? how to use? where to use?
    3>to write a abap code or use a func module, which one? how to use.
    4> what(value) to assign for the zsales_off object in the authorisation profile?
    thank u in advance..

    Hi torsten,
    thank you. but i am afraid it doesn't give me an idea as to how to move ahead?
    i have variable with processing type "authorisation" used in many queries.
    can i use the customer exit rsr0001 for this variable? what value should be assigned in the authorisatio profile for this object?
    please give the detail process and a abap code if possible.
    thank u

  • Passed i_step = 2,3(Hierarchy Node Variable with Customer-Exit)

    Hellow !
    I want to insert the following ststement to force the variable to be executed with i_step = 2 or 3.
    CASE I_VNAM.
    when 'ZTEST'.
        CLEAR loc_var_range. REFRESH loc_var_range.
        CLEAR: l_s_range, ytest001.
    LOOP AT i_t_var_range INTO loc_var_range.
       SELECT * FROM ytest001
                  WHERE bname = sy-uname
                        AND node   = loc_var_range-low.
            IF sy-subrc = 0.
              l_s_range-low = loc_var_range-low.
              l_s_range-high = '0HIER_NODE'.
              l_s_range-sign = 'I'.
              l_s_range-opt  = 'EQ'.
              APPEND l_s_range TO e_t_range.
             else.
              l_s_range-low = '#'.
              l_s_range-sign = 'I'.
              l_s_range-opt  = 'EQ'.
              APPEND l_s_range TO e_t_range.
             endif.
    ENDLOOP.
    However, Passed customer-exit(Enhancements for Global Variables in Reporting)  i_step =2,3
    Regards,
    Don

    Hi,
    in addition to Anil's valid input, make sure that ZTEST is NOT ready for input. Indeed "ready for input" vars cannot be changed via customer exits.
    hope this helps...
    Olivier.

  • Custom Exit - Get System Date with user input

    I am using a BW query to connect to a BOBJ universe.  Some reports from the universe must be scheduled to run for today's date and emailed to a user.  Unfortunately, we cannot determine "today" dynamically when scheduling in BOBJ.  There will be other reports filtered with a range.
    I want to create a BW custom exit variable to allow user input.  My idea is to take the user input, like "01/01/1904", and replace the value with today's date.
    Is this possible?
    Here's example code for what I am trying to achieve.
    IF user input = "01/01/1904" then get today's date.
    else use the values from the user input.
    Scenario 1: user inputs 08/01/2010 - 08/31/2010 the custom exit returns values 08/01/2010 - 08/31/2010
    Scenario 2: user inputs 01/01/1904 the custom exit returns 09/03/2010 (today)

    Hi,
    In your case, i_vnam variable and processing variable for below statement would be same.
    LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'variable name'.
    Please see the below article for reference.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20f119d9-922d-2c10-88af-8c016638bd90?quicklink=index&overridelayout=true

  • Sample of plan version customer exit code

    Hi! We have a requirement for Forecast accuracy report to be able to report comparison of current actual v current month forecast and
    forecast 1 month ago, forecast 2 months 2 up to 12 months ago. I'm using Calculated/Restricted Key figures with variables "0FISCYEAR & and 0P_FYEAR" with offset and plan version variable 0VERSION & OP_VERS3 but not restricted. The offset for period/year works but not sure how to link it to a plan version specific to period/year. We don't want the variable for plan version to be fixed. We would like to pull the values of the Cal./Rest key figures for period/year and specific version. In our case, we use versions 1, 2, 3 up to 12 for 2010, and version 1 represents 01/2010 forecast/plan version, version 2 is 02/2010 up to 12/2010 version 12. And for 2011, we use versions 101, 102, 103 up to 112. 101 is version specific for 01/2011, 102 for 02/2011 up to 112 for 12/2011.  Same thing for FY 2012, our versions are 201 (representing version for 02/2012) , 202, 203 up to 212.  We have the same pattern of versions for 2020 as well (starts from 01 to 12; 101 to 112; 201 to 212 up to 901 to 912).
    We would like to be able display the values for 12 rolling months for the version specific to period and year as mentioned above.
    Example - in the query, I enter period/ year "03/2011" and version 103 (which represents the version for 03/2011). The result of the query should show up the following CKF/RKF columns:
    1. Current Actual 03/2011
    2. Current Forecast 03/2011 version 103
    3. Forecast 1 month ago 02/2011 version 102
    4. Forecast 2 months ago 01/2011 version 101
    5. Forecast 3 months ago 12/2010 version 12
    6. Forecast 4 months ago 11/2010 version 11
    7. Forecast 5 months ago 10/2010 version 10
    8. Forecast 6 months ago 09/2010 version 09 up to forecast 12 months ago version 03.
    I think we will need a short coding/customer exit for variable version but donu2019t know what needs to be done if using enhancement.  I created a variable customer exit for plan version "ZVAR_MULTIVERSION_EXIT".  Type of variable is characteristic value, processing type is customer exit, reference characteristic is "0VERSION", other basic settings - multiple values and optional.  Please advise if anything I need to change on the settings for plan version variable.  Then my next question is how to code this scenario or maybe you can provide a sample abap code and how to link the customer exit to the "ZVAR_MULTIVERSION_EXIT" plan version variable.   Please advise and greatly appreciate any help and input you can provide.
    Thanks a lot in advance for your help.
    Ching

    Hi,
    Write the code as follows, it will solve your requirement:
    "Declare work area WA_RANGE with type same as I_T_VAR_RANGE.
    when 'variable_name'.
         IF i_step = 1.
              REFRESH e_t_range.
              data: v_date type sy-datum.
              data: v_mon type I length 2.
              data: v_year type I length 4.
              data: v_month type /bi0/oicalmonth.
              v_date = sy-datum.
              v_mon = v_date+4(2).
              v_year = v_date+0(4).
              v_year = v_year - 1. "Previous Year
              concatenate v_year v_mon into v_month.
              WA_RANGE-SIGN = 'I'.
              WA_RANGE-OPT = 'EQ'.
              WA_RANGE-LOW = v_month.
              append wa_range to e_t_range.
         ENDIF.
    Hope this helps.
    Regards,
    Joe
    Edited by: lazarus_joey on Feb 17, 2012 7:04 PM

Maybe you are looking for

  • Two iPhone users, one account for apps & media

    My wife and I just bought iPhones. We are trying to share some stuff and keep other stuff separate, here's what we're looking for. 1. We use two different Macs with different emails. 2. We are using a single Mobile Me account to sync our address book

  • Processor noise with audio output?

    I attached my Mac book pro to my 40" LCD TV along with an audio output from the headphones out to the input on the TV. What I noticed is that the "processor whine" that we all complain about that seems to cease when we are running things like photo b

  • Colname values

    Hi, again something I cannot understand. For linking to a detail-page D8 uses as $colname_rsxxx the value "-1". The former version DMX2004 used "1". Why was this value changed? And is there any advantage of using instead a "0"? Martin

  • Canon MF4570dn (MF4500 series) scanner problems

    Hi - I have a new Canon MF4570dn multi function printer / fax / scanner. I have installed the "MF Toolbox" software but I can not get the scanner to work. I have no interest in the fax function. When I push any of the "color scan", "B&W scan", or PDF

  • Switching to systemd doesn't allow kexec to work

    I switched to systemd and I noticed that kexec is not working when I have added kexec to daemons array.It doens't load a kernel without going to BIOS->GRUB2. But kexec works when I am on sysVinit. i 'm ot sure what I 'm missing? Last edited by hadron