Customer Exit Variable on Cal Year/Month Error

Hi Experts
My requirment is to develop a Restricted Keyfigure...
The restriction is based on 0Calmonth (Calendar Year/Month)
The sales from beginning of calendar year up to last "closed" month in a Calendar.
Ex: in June i want to see 01.01.2009 to 31.05.2009 data.
in October i want to see 01.01.2009 to 30.09.2009 data.
When user execute the report
in Jan 2010 i want to see 0 as there is no closed month in that particular year.
in Fed 2010 i want to see 01.01.2010 to 31.01.2010 data.
For that purpose i created a variable
Customer Exit on calendar Year/Month
Variable represents : Interval
Variable is : Mandatory
Variable is Ready for Input (Uncheck)
in CMOD...i had written The below Code
WHEN 'ZYCCM' . "Current Year Culm. to Last Closed Month
DATA :Month(2) type c,
Start_Month like rsd_c_timnm-calmonth,
End_Month like rsd_c_timnm-calmonth.
Month = sy-datum+4(2).
if Month = '01'.
Start_Month = '000000'.
End_Month = '000000'.
Else.
concatenate sy-datum(4)'01' into Start_Month.
End_Month = sy-datum(6) - 1.
Endif.
CLEAR L_S_RANGE.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'BT'.
L_S_RANGE-LOW = Start_Month.
L_S_RANGE-HIGH = End_Month.
When i execute the report i am getting an error
"No Value Could be determined for Variable ZYCCM"
Please update what went wrong and how to Correct error

Hi
Thanks for the update..
Modified code as below
WHEN 'ZYCCM' . "Current Year Culm. to Last Closed Month
DATA :Month(2) type c,
Start_Month like rsd_c_timnm-calmonth,
End_Month like rsd_c_timnm-calmonth.
Month = sy-datum+4(2).
if Month = '01'.
Start_Month = '000000'.
End_Month = '000000'.
Else.
concatenate sy-datum(4)'01' into Start_Month.
End_Month = sy-datum(6) - 1.
Endif.
CLEAR L_S_RANGE.
L_S_RANGE-LOW = Start_Month.
L_S_RANGE-HIGH = End_Month.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'BT'.
APPEND l_s_range TO e_t_range.
But when i executed the report....the report is executed sucessfully but the restriction applied to only Jan 2009
When i saw the KF definition in RSRT 
I EQ JAN 2009
I am expecting
BT JAN2009 APRIL2009
Please help
Tahnks

Similar Messages

  • Custom exit variable for fiscal year/period

    Hi BI Experts
    1) In one of the column i just want Budget data to be displayed for the entire year..i.e even if the user enters 005/2006 for fiscal year /period that column should display 001/2006 to 012/2006 Budget.
    I have created a restricted KF for 0AMOUNT restricted by version(for Budget), valuetype (for Budget )
    now how do I assign variable for Fiscal year/period...and the problem is posting period is not populated ...I mean there is no transformation for that...
    Can you share your experience on that ...full points wil be awarded...
    Thanks

    Hi Ajay and Pradhiba
    I am really sorry for assigning you guuys points ...wasa bit busy ...
    The problem is that the year and posting period is not populated...there fore I cannot use those time characteristics...
    Now I have only fiscal year/period populated..now i want
    if the user enters 005/2006 ....i want my first column to calculate the data for 001/2006 to 012/2006 ...thats the req...
    can u share ur ABAP experience in that...
    thanks

  • Customer Exit Variable not working in BO-Webi Report

    Hi All,
    I have created a universe based on Bex Query.
    Bex query consists of a customer exit variable on Calendar year/month where in it will populate current calendar year month by default while executing the query. It works fine while executing in SAP BI Bex Analyser.
    I have created a universe based on the query. For Calender year/Month i got L00, L01, LOV values in universe.
    Based on the universe I have created a Webi report. I did not specify calendar year/month as query filters. While directly executing the Webi report, I get the calendar year/month variable screen. But the value for it not populated based on customer Exit code written in BI.
    What has to be done to get the customer exit values in variable screen.
    Thanks for your understanding.
    -- Selva

    Since you have customer exit variable in your bex query, it will be like a global filter in your universe.
    Execute the webi report and check whether you are getting only current month data.
    --- Thanks

  • Customer Exit VAriable Error

    Hi
      Please fix this or update me on how to fix it as i am struggling to fix
    I created a restricted Key Figure based on Info object data Type DATS
    User Enter Date intreval 01.01.2007 to 31.12.2007
    My requirment is to develop a Variable on Cal Year/Month (0CALNONTH) of Processing Type CUSTOMER EXIT that will take the user input date and display the Year/Month accordingly
    Code
    When 'EXIT_CYM_VAR'.
        DATA: Low_ymon1 Type N,
              High_ymon1 Type N.
        IF i_step = 2.
          LOOP AT i_t_var_range INTO  ls_varrange
              Where vnam = '0I_DAYS'."User Specified Key date Intreval
            CLEAR l_s_range.
            Low_ymon1 = ls_varrange-low+0(6).
            High_ymon1 = ls_varrange-high+0(6).
            l_s_range-low = Low_ymon1.
            l_s_range-high = High_ymon1.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'BT'.
            APPEND l_s_range TO e_t_range.
          ENDLOOP.
        ENDIF.
    Error
    Check the user exit for variable EXIT_CYM_VAR. Make sure that variables for characteristic values are in internal format and are not compounded. This means, for example, that a date variable must have the value 20000914 and not the value 14.09.2000.
    Thanks

    Hi,
    may be u try this.
    When 'EXIT_CYM_VAR'.
    DATA: Low_ymon1(6) Type N,
    High_ymon1(6) Type N.
    IF i_step = 2.
    Read i_t_var_range INTO ls_varrange
    Where vnam = '0I_DAYS'."User Specified Key date Intreval
    CLEAR l_s_range.
    Low_ymon1 = ls_varrange-low+0(6).
    High_ymon1 = ls_varrange-high+0(6).
    l_s_range-low = Low_ymon1.
    l_s_range-high = High_ymon1.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'BT'.
    APPEND l_s_range TO e_t_range.
    ENDIF.
    regards,
    rakesh.

  • 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

  • Help needed in Customer exit variable

    Hi Experts,
    We have a scenario as below.
    User enters fiscal year period.Based on the fiscal year period,entire year will be selected.
    Row would contains
    0fiscper3(Fiscal months from Jan to Dec)
    Column contains Amount(Actual or Forecast)--There is a restricted keyfigure on amount.If value type=60 then forecast
    and value type=10 then actual amount
    If the user enters 002.2010 then it should give Actual values ie value type=10 for 001.2010 and 002.2010.For all values greater than 002.2010, it should give forecast values(value type=60)
    Report Format.
    Jan----
    Actual Value(value type=10 in the column for amount)
    Feb----
    Actual Value(value type=10 in the column for amount)
    Mar----
    Forecast Value(value type=60 in the column for amount)
    Apr----
    Forecast Value(value type=60 in the column for amount)
    May----
    Forecast Value(value type=60 in the column for amount)
    Jun----
    Forecast Value(value type=60 in the column for amount)
    Jul----
    Forecast Value(value type=60 in the column for amount)
    Aug----
    Forecast Value(value type=60 in the column for amount)
    Sep----
    Forecast Value(value type=60 in the column for amount)
    Oct----
    Forecast Value(value type=60 in the column for amount)
    Nov----
    Forecast Value(value type=60 in the column for amount)
    Dec----
    Forecast Value(value type=60 in the column for amount)
    I know that i have to create a customer exit variable for value type
    But in this scenario.the value for value type may change in each row based on fisper3(month).
    How can i obtain such a scenario in the customer exit
    Your help will be appreciated.
    Thanks,
    Senoy
    Edited by: senoy laxman on Feb 15, 2010 6:42 AM

    Hi Senoy,
    you have to create two customer exit variables for fiscal year period(0fiscper) as given below.
    1. for actual values (value type=10), coding in cmod such that showing values less than and equal to user input values.
    2. for forecasting values(value type=60,)coding such that showing values greating than user input values.
    use the first varible in the first selction and the second varible in the second selection in the given below structure(use the structure in rows)
    use the fiscal period user input varible in the third selection in the given structure below.
    structure
    selection - (Actual)-restrict with value 20 and first customer exit variable .
    selection -(Forecast)-restrict with value type 60 and second customer exit variable.
    Selection - 0fiscper
    Add the key figure 0Amount in the columns or in rows(in the selection of second structure) as per your requirment.
    hope this helps you.

  • BW Customer Exit variable

    Hi Experts,
    I need some help with BW Customer Exit code. This is my reqmt. When a user entes Fiscal period and year,  the code shld go back 6 months back from there and apply that period as the lowest range and the user entered year and perid as the highest value range. Can anyone help??
    Thanks,
    DV

    Hi,
    Create Customer Exit Variable on Fiscal year period and the try with the following code.
    Create ZFYP User entry variable on Fiscal year period
    Process By = USer Entry
    Characteristic = Fiscal year period.
    Variable represents  =Single
    Variable Entry = mandatory
    Check ready for input.
    Create ZFSIX Customer Exit variable on Fiscal year period
    Process By = Customer Exit
    Characteristic = Fiscal year period.
    Variable represents  = Interval
    Variable Entry = mandatory
    UnCheck ready for input.
    Then write the following code in CMOD.
    1.Drag and drop  Fiscal year period in Freecharacteristic and restrict with ZFYP Variable.
    2.Restrict Keyfigure with Fiscal year period  with  ZFSIX  Variable in columns.
    WHEN 'ZFSIX'.
    DATA:  ZMONMIT LIKE GJVAR-MONMIT,
           ZFY1 TYPE /BI0/OIFISCPER,
           ZFY2 TYPE /BI0/OIFISCPER.
    DATA:  zbuper LIKE t009b-poper,
           zbdatj LIKE t009b-bdatj,
           zzdate LIKE sy-datum.
    DATA:  ZPOPER  TYPE POPER.
    DATA:  ZNUMC TYPE NUMC2.
    LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'ZFYP'.
              CLEAR l_s_range.
              ZFY1 = loc_var_range-LOW.
              ZBDATJ = loc_var_range-low+0(4).
              ZPOPER = loc_var_range-low+4(3).
             ZMONMIT = '01'.
              CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
                EXPORTING
                  I_GJAHR              = ZBDATJ
                 I_MONMIT              = ZMONMIT
                  I_PERIV              = 'V3'
                  I_POPER              =  ZPOPER
               IMPORTING
                 E_DATE                = ZZDATE
               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.
              ENDIF.
         CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
           EXPORTING
             I_DATE               = ZZDATE
    *        I_MONMIT              = u201800u2019
             I_PERIV              = 'V3'
          IMPORTING
            E_BUPER              =  ZPOPER
            E_GJAHR              =  ZBDATJ
          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.
         ENDIF.
        CONCATENATE ZBDATJ ZPOPER INTO ZFY2.
        L_S_RANGE-LOW    = ZFY2 .
        L_S_RANGE-HIGH   = ZFY1.
        L_S_RANGE-SIGN   = 'I'.
        L_S_RANGE-OPT    = 'BT'.
        APPEND L_S_RANGE TO E_T_RANGE.
    ENDLOOP.
    Thanks
    Reddy

  • Customer Exit variable to display the current Year/Month by default.

    Hi Experts,
    I need to create a variable on the object 0CALMONTH that needs to display the current Month/Year by default when the query is run.
    Can anyone please help with the ABAP code that is required for the creation of this Customer Exit Variable?
    Thanks
    Aravind

    Hi,
    try this , just copy and paste in your Editor,
    Data: Year(4) type c,
          month(2) type C,
          date(6)  type c.
    IF I_STEP = 1.
      CASE I_VNAM.
        WHEN 'VAR_X'.
          l_s_range-low = sy-datum+0(6).
          l_s_range-opt = 'EQ'.
          l_s_range-sign = 'I'.
          year = l_s_range.
          l_s_range-low = sy-datum+4(2).
          l_s_range-opt = 'EQ'.
          l_s_range-sign = 'I'.
          month = l_s_range.
          concatenate year month INTO date separated BY '/' .
          Append  date to e_t_range .
      ENDCASE.
    ENDIF.
    Thanks,
    JACK

  • How to get the current month value for a customer exit variable?

    How to get the current month value for a customer exit variable? 
    And also if we have an InfoObject with date value (including date, month, year), then how to derive the month value from this date type of Char.?
    Thanks!

    Hi Kevin,
    Check here........
    Re: Customer Exist for "From Current Date To Month End"
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/25d98cf6-0d01-0010-0e9b-edcd4597335a
    Cal month
    Regards,
    Vijay.

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

  • 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

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

Maybe you are looking for

  • How can i active my multimedia and packet data?

    pls help of how to ative my multimedia and packet data, or wat the instractions i need to follow in order for me to active the multimedia model of the phone is 6070.hope u will help me in this .coz i want to share pics in my frnds and send a email to

  • How loud is the whine on the new 2Ghz MacBook?

    I have been seeing alot of posts about people complaing about the whining thier MacBook is making. I was wondering how loud it is, and if its really anything to be concerned about. My old iBook makes some noise, but its not anything that annoys me, a

  • Mapping file samples wanted

    Is there any sample that shows how to use mapping file with TopLink JPA? Thanks.

  • Dynamic query building

    I am working on an application these days where I am using some existing SQL queries to access the database to grab information out of it, mostly to generate reports. 1) These queries are extremely lengthy and cumbersome. Sometimes upto 18-25 lines l

  • Java Apps Files Not Working - N 500

     I Have N 500 Symbyan Belle Refresh--Now Its Not Working Any f .Jar or jad Files Also .Sis Files Working Corect Plz Help Me..