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

Similar Messages

  • Display Error Message in BW Report based on Customer Exit Variable

    Hi
    I need to display an error message in the BW report based on the value of a customer exit variable - i was able to do this successfully in BW3.5 using the below code.
      WHEN 'ZUPN'. "Here ZUPN is the customer exit variable
        IF i_step = 1.
          <check for condition -- if successful, variable flag = 1, else variable flag = 0>
          IF flag = 0.
            MESSAGE e157(00). "Error Message
          ENDIF.
        ENDIF.
    I have upgraded my system to BI 7.0 now. Whenever the variable check is not successful, it displays a blank screen instead of the error message in the report. Please advice if we need to change the code and how ??

    Bhanu,
      Thanks for u r reply.This warning message appears every time i execute the report through portal.
    Any idea ?
    Regards
    Mano

  • Error creating Customer Exit variable, please help

    Hi Experts,
    This is the scenario, I need to obtain the convertion rate from the table TCURR in order to convert several currencies to USD, so I created a Customer Exit variable that gets the Period and based on that obtains the conversion rate for the last day of the given month from TCURR, the problem is when I created the Formula Variable to get the value from the Customer exit variable I got the following error:
    'ZVARREGEXIT' ALREADY EXISTS; SELECT A DIFFERENT NAME.
    But in not using that name anywhere on my variables creation, Im doing something wrong? How can I check wheres is that variable being used.
    Ideas, comments are always welcome and appreciated.
    Regards.

    Hi Ed,
    Open Admin Workbench (RSA1) and choose Transport Connection --> Object Types --> Query Elements --> Variable --> Select Objects. Find the variable of interest and transfer it back to the main screen, then right-click and choose 'Display Description'. That will show you a "where used" list of queries, workbooks, etc.
    Next, you can use the previous technique to open one of the queries, find the variable in the query, and determine which InfoObject it is associated with.
    Hope this helps!
    Regards,
    Saurabh

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

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

  • Error rro01_s_rkb1f  unknown when creating a customer exit variable.

    Hi,
    I am creating a customer exit variable( i am new to abap).I wrote the code and when i am activating it i am getting the  "error rro01_s_rkb1f unknown". I double clicked on that and i saw that it is Declared in RRO01 as TYPES: rro01_s_rkb1f as rrkb1f.
    And when i saw this rrkb1f it was not active , then i activated it.Even then i am getting this error.
    Can anyone help me on this.
    Thank you
    mandha

    hi,
    I solved it some type pools wer not declared.

  • Error while executing customer Exit Variable (No value could be determined for variable.  BRAIN 632)

    Hello,
    I created a customer exit variable which has to show the range between the first and last day of the previous month. The query will be executed every first of the month.
    Variable is declared as: Customer exit, based on 0CALDAY, Interval, Mandatory and NOT input.
    When i debug the query, it is making the calculation but its not populating my variable; when I execute the query from RSRT, the output test shows a message:
    ENo value could be determined for variable ZRANGE_PREVMONTH.                            BRAIN               632ZRANGE_PREVMONTH
    Below the code i'm using (SAP 7.4)
    ***Customer Exit to calculate previous month.
    IF i_step = 2.
         CASE i_vnam.
              WHEN 'ZRANGE_PREVMONTH'.
    DATA:  LS_RA_SID  TYPE   RSR_S_RANGESID.
    DATA:  yyyy(4) TYPE n.
    DATA:  mm(2) TYPE n.
    DATA:  dd(2) TYPE n.
    DATA:  fst_date LIKE sy-datum.
    DATA:  fst_date2 LIKE sy-datum.
    LOOP AT i_t_var_range_c INTO loc_var_range
        WHERE vnam = '0DAT'.
          dd = sy-datum+6(2).
          mm = sy-datum+4(2).
          yyyy = sy-datum+0(4).
          fst_date2 = sy-datum.
          IF dd = '01' AND mm = '01'.
            mm = '12'.
            yyyy = yyyy - 1.
          ELSEIF dd = '01' AND mm <> '01'.
            mm = mm - 1.
          ELSEIF dd <> '01'.
            mm = mm - 1.
          ENDIF.
          CLEAR: fst_date.
          CONCATENATE yyyy mm '01' INTO fst_date.
          fst_date2 = fst_date2 - 1.
          CLEAR: ls_ra_sid.
          ls_ra_sid-sign = 'I'.
          ls_ra_sid-opt = 'BT'.
          ls_ra_sid-high = fst_date2.
          ls_ra_sid-low = fst_date.
          APPEND ls_ra_sid TO e_t_range.
    ENDLOOP.
    ENDCASE.
       ENDIF.

    Hi Fernanda,
    Try this:
    DATA:  LS_RA_SID  TYPE   RSR_S_RANGESID.
    DATA:  fst_date LIKE sy-datum.
       CASE i_vnam.
              WHEN 'ZRANGE_PREVMONTH'.
    fst_date = sy-datum - 1.
    concatenate fst_date(6) '01' into ls_ra_sid-low.
          ls_ra_sid-sign = 'I'.
          ls_ra_sid-opt = 'BT'.
          ls_ra_sid-high = fst_date.
          APPEND ls_ra_sid TO e_t_range.
    ENDLOOP.
    ENDCASE.
       ENDIF.
    Just post here for any queries..
    Regards,
    Loed

  • 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

  • Customer exit variable - internal table in BEX

    Hi,
    i am running a report and using variables in it.
    The report runs over a info cube. There are few challenges in it.
    One of the variable is posting date, and when user enters posting date i need to negate it with current system date.
    If the negated value is greater than 28 then i need to exclude documnet type 'YG' and display the query, else i need to include the dcumnet type 'YG' and document type '  '.  The above logic can be well implemented via a customer exit variable(for posting date) using an internal table. We have internal tables like C_T_DATA which is used in data source enhancement, which help us to implement our own desired logic.
    Do we have such kind of internal tables, based on which the report output (result set) is derived?
    i know that we have l_t_range and e_t_range, but dont know their usage, some one can explain in detail about them?
    Thanks in advance.

    Hi Selva & Lakshmin,
    The code given by Selva is almost correct . If my understanding is clear , you also wanted to include  document type ' ' when the negated value is less than 28 .
    Modification in Selvas Code :
    Variable 'V_DOCTYP' must be of type Multiple Single Values.
    DATA : V_DATE LIKE SY-DATUM.
    DATA : V_DAYS TYPE I.
    if i_step = 2.
    when 'V_DOCTYP'.
    READ TABLE i_t_var_range INTO loc_var_range WITH KEY vnam = 'ZV_PDATE''.
    IF SY-SUBRC = 0.
    V_DATE = loc_var_range-low.
    ENDIF.
    V_DAYS = SY-DATUM - V_DATE.
    IF V_DAYS > 28.
    l_s_range-low = 'YG'
    l_s_range-sign = 'E'.
    l_s_range-opt = 'EQ'.
    APPEND l_s_range TO e_t_range.
    ELSE.
    l_s_range-low = 'YG'
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    APPEND l_s_range TO e_t_range.
    clear l_s_range.
    l_s_range-low = ' '.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    APPEND l_s_range TO e_t_range.
    ENDIF.
    ENDIF.
    Hope the above reply was helpful.
    Kind Regards,
    Ashutosh Singh

  • Customer exit variable in Planning filter - IP

    Hi,
    I am new to business planning. I am trying to use a customer exit variable in filter, while performing check system generates message "RFC failue error". the logic is written to get the current year. But I am not able to use this variable?  Can you please answer me this question... Can I use Customer exit variables in planning modeler filters or planning functions ?

    Hi there,
    Yes you can, and it is used very often in both.
    Probably your variable is wrongly defined.
    What you can do is create a query over that aggregation level, and insert the planning filter in there. Put some key figure on the query and put a breakpoint on your variable customer exit code. Execute the query and debug the variable code to check the error.
    Hope this helps,
    Regards,
    Diogo.

  • Check user entry in Customer Exit Variable in i_step2

    Hi Folks,
    at the moment I'm facing a challenging problem. In an BW Query i have a Customer Exit defined as "not ready for Input" to catch the Variable in I_Step = 2 and fill by a certain algorithm. When i change the CE Variable to "Inputready", the user can enter values, but i have no chance to react on these values as i_step = 2 will not b reached during execution- And this behaviour is correct. BUT is there any chance to Check user entries in an Customer Exit variable and change this somehow in des code?
    Thanks for all replies.
    BR,
    Maik

    Hi there,
    It is possibel depending on what you wish to accomplish.
    You can create two variables for the same characteristic.
    The first is an input ready variable for the user to enter the data and the second is a not input ready variable CE where you can in step 2 process the data entered from the variable ready for input.
    You can than fill the CE variable with any data, but you will have the variable restricted by the two variables (the ready for input and the CE).
    But for validating you could throw an error message based on the variable input ready.
    Diogo.

  • Customer exit variable with exclusion

    Hello all, anyone know why a customer exit variable cannot exclude values ?
    I've tried with multiple, single and interval without success (it give me a generic error in the customer exit for my variable).
    Only the "selection option" mode seems to be enabled to exclude values (also in debug mode with rsrt transaction).
    Unfortunately, I cannot use selection option (because this exclusion is an integration of pre-existence selection on a complex structure).
    We have SAP BW 3.1C, with SP16. I've looked for sap notes but nothing about this problem (may be a limit).

    Now I post my code. The variable is a "Multiple Single Values", optional, not "Ready for Input".
    This is my code.
      DATA: L_S_RANGE TYPE RSR_S_RANGESID.
      If I_STEP = 2.
        CASE I_VNAM.
         WHEN 'ZXXXXX'.
            clear l_s_range.
            l_s_range-sign = 'E'.
            l_s_range-opt = 'EQ'.
            l_s_range-low = 'xxxxxxx'.
            append l_s_range to e_t_range.
        ENDCASE.
      ENDIF.
    The query raise an error (generic error on customer exit).
    I've debugged the code. Error has raised from plausibility_check on RRS_VAR_VALUES_EXIT_AFTER. The following is the code that raise the error.
            CASE i_vparsel.                                              
              WHEN   rro04_c_vparsel-param                               
                  OR rro04_c_vparsel-<b>multiple</b>                            
                  OR rro04_c_vparsel-table.                              
                IF     <l_s_range>-sign <> rs_c_range_sign-<b>including</b>     
                    OR <l_s_range>-opt  <> rs_c_range_opt-<b>equal</b>.         
                  PERFORM raise USING rs_c_false g_c_ue_invalid_range    
                                      i_vnam space space space.          
                ENDIF.                                                   
    From this code, it seems that with multiple selection we only have sign including and option equal.
    What do you think about ?

  • How to assign a Customer exit variable to Key figure

    Hi,
    I have created a Customer Exit variable to findout no. of days in the month. 
    But I dont know how to assign that variable to a Keyfigure value.  Can you please let me know how to assign it.
    Regards
    Sankar

    Hi Sankar,
    From what I could understand, you want to display the output of that key figure for some no. of days of a month (calculated in your customer exit variable)...right ???
    If that is the case then you can create a structure in columns. Create a new selection...include your key figure and that customer exit variable in it.
    That shall serve the purpose.
    Regards
    Shalabh Jain
    Edited by: Shalabh Jain on Dec 15, 2008 1:46 PM

  • 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

  • How to insert a code for a function module into a Customer Exit Variable?

    I have two Key Figures viz., Net Prchs Rtl, and Net Prchs Unt. Both these Key figures have This Week (TW) and Last Week (LW). There is a variable for This week but there is no variable defined for Last week.
    I need to get data in the column LW (Last Week) for both the key figures.
    In function module EXIT_SAPLRRS0_001 one of the functions I have is:
    Get the previous Fiscal Week
              CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
    I need to create a new variable to get values in the Last week column for different key figures and use function “'DATE_TO_PERIOD_CONVERT'” in that variable.
    Can anyone please explain me the steps as to how to use a function module in a variable so that when the variable is used in a key figure it shows the output.
    In other words what I want to know is after creating a Customer exit variable of type Characteristic value how do I refer the above mentioned function moduel and insert the code for the function module into the Customer exit variable that I created.
    Thank you.
    TR.

    Hi Wond,
    Thanks a lot for your reply. I understand what you mean but I have never done this before so can you please explain it in a detailed manner. I have the following code:
    Get the previous Fiscal Week
              CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
                EXPORTING
                  i_date         = ld_date
                  i_periv        = lc_periv
                IMPORTING
                  e_buper        = ln_poper
                  e_gjahr        = ln_bdatj
                EXCEPTIONS
                  input_false    = 1
                  t009_notfound  = 2
                  t009b_notfound = 3
                  OTHERS         = 4.
              IF sy-subrc <> 0.
                MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
              ELSE.
                lc_poper = ln_poper.
                CONCATENATE ln_bdatj lc_poper+1(2) INTO wa_e_t_range-low.
                wa_e_t_range-sign = 'I'.
                wa_e_t_range-opt = 'EQ'.
                APPEND wa_e_t_range TO e_t_range.
              ENDIF.
            ENDIF.
          ENDIF.
        ENDIF.
    I believe I should now use the above code in my customer exit variable. If that's right can you please explain me the steps as to how should I do this so that the variable gets populated.
    Thank you.
    Regards,
    TR.

Maybe you are looking for