Error in I_STEP = 3

Hi all,
    I am validating the user input in I_STEP = 3 and popping up a message. However, after the popup , the query continues to get executed. I have tried to use "Raise <exception>" . However, in this case , I get an error message after the popup saying that "There are invalid values for the variables". Is there anyway to catch this error message. Please let me know if there is any other alternative.
Thanks,
Kartheek

Hi Karthink,
When validating the user input in I_STEP = 3 and popping up a message. However, after the popup , the query continues to get executed without giving a chance to the user to input  the correct value for the varible.
I have seen that u have faced the similar kind of issue .Is your issue got resolved is yes, could you please let us know how it got solved.
Thanks
Srinivas

Similar Messages

  • I_STEP = 3; Error Message Pop up not coming on BEX

    Hi Gurus,
    i am having problem getting the ERROR MESSAGE POP UP on the BEX after validating the DATA user entered in the selection screen.
    Here is my scenario:
    user enter the values in the selction screen and i am validating those values in my varaible exit in I_STEP 3. When the user enters the incorrect values i am calling message class
    MESSAGE E000(ZBW).
    i am mainining the message class in SE91 and its all there.
    This is working fine when execute the query in RSRT and i get the error message in the botton scrool bar. when i am execute this in BEX, its getting dixconneced with the message
    Error Group
    RFC_ERROR_SYSTEM_FAILURE
    Message
    connection closed without message (CM_NO_DATA_RECEIVED).
    Please let me know if there is a solution for this. we are in BW 3.5 support pack 20.
    Thanks
    Krishna
    Edited by: krishna guttapalem on Apr 23, 2008 6:05 PM

    Hi,
    i have this opened this another thread too. search with the string "variable in selection screen" in business intelligence - business explorer. you can find the solution in that thread. i tried to post the link for that thread here but i am not able to do that.
    thanks
    krishna

  • 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 message in Bex Variable screen

    Hello All,
    In my BW I have a new variable of type interval for the selection criterion calendar year/month .
    I want to check high value of the interval if it is lesser than or equal to current calendar year/month (that is 201405)  then report can be executed.Else if it is greater than current calendar year/month (that is 201405) an error message has to be displayed for the user to change the value.
    Can anyone help me in knowing how this can be done.
    Many Thanks,
    PS

    Hi,
    This can be handled by writing code in Cmod i_step = 3.
    IF I_STEP = 3.
              LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'Give the tech.name of user input variable'
                      IF LOC_VAR_RANGE-HIGH GT SY-DATUM+0(6).
                           CALL FUNCTION 'RRMS_MESSAGE_HANDLING'
                              EXPORTING
                                I_CLASS = 'RSBBS'
                                I_TYPE = 'I'                     " It will throw Warning Message
                                I_NUMBER = '000'
                                I_MSGV1 = 'Give the message which you need to display'.
                            RAISE no_replacement.
                      ENDIF.
             ENDLOOP.
          ENDIF.
    Hope this gives an idea.
    PS:In case you need to throw an error message then replace   I_TYPE = 'I'    by   I_TYPE = 'E'  .
    Regards,
    AL
    Message was edited by: Anshu Lilhori

  • Print Error Log Text in Report

    Hi
    I am facing a issue.
    i have displayed the error requests. i want to add one more functinality in that. once i will click on a error request then the detailed log of that error request should be shown.
    but once i click on a error request a ABAP dump come with message.Short text
        No more storage space available for extending an internal table.
    below is the code.
    AT LINE-SELECTION.
      WRITE: g_s_dtp-dtp HOTSPOT.
      CALL METHOD cl_rsbm_error_handler=>get_log
        EXPORTING
          i_requid      = itab1-e_requid
          i_datapakid   = itab1-e_datapakid
          i_segid       = itab1-e_segid
          i_step        = itab1-e_step
          i_record      = itab1-e_record
        IMPORTING
          e_t_messages  = l_t_messages
          e_t_detail    = l_t_detail
        EXCEPTIONS
          log_not_found = 1
          OTHERS        = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
                   RAISING log_not_found.
      ELSE.
    ---- Display ----
        CALL METHOD cl_rssm_show_log=>show_messages_write_log
          EXPORTING
            i_t_messages = l_t_messages
            i_t_details  = l_t_detail.
      ENDIF.

    Hello Mishra,
    first you have to check whether this issue happens occasionally or not. Sometimes if the program needs a lot of memory and current available memory is low, then this runtime exception occurs. If this issue happens always, then you need to consider to make less data displayed. Thus it will cause less memory accordingly.
    CALL METHOD cl_rssm_show_log=>show_messages_write_log
    EXPORTING
    i_t_messages = l_t_messages
    i_t_details = l_t_detail.
    ENDIF.
    Best Regards,
    Jerry

  • Customer Exit Variable - Variable Value Error BRAIN 000

    I created a variable which is processed by 'Customer Exit'. This variable is 'optional' and NOT user input required.
    And i have written my code in customer exit under I_STEP EQ 1.
    I used the variable in my query as a default value for a free characteristic.
    The query runs fine and return me the correct result.
    The problem is when i used the same variable as a default value of a free characteristic in another query which has another user input variable for another characteristic, i got a warning message after input a value for another variable.
    Variable Value Error BRAIN 000 <<i>my variable name</i>>
    How to make it work in the second query?
    Please help as I am new to this.
    Thanks,
    CH

    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

  • 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

  • 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 in Customer Exit

    Hi Guys,
    I hope someone would be able to quickly point me in the right direction. I have the following error message:
    "Diagnosis
    This internal error is a deliberate termination, since a program status has arisen, that is not allowed to occur.
    The error has arisen for variable ZMOVETYP1 in the customer enhancement .
    Procedure
    Please check your customer enhancement.
    Procedure for System Administration"
    ZMOVETYP1 is of Variable Type=Characteristic, Processing= Customer exit, Variable represents=Multiple single values, variable is Optional, and NOT Input ready. Basically I want to use this variable in a FILTER on movement types in order to EXCLUDE certain movement types based on calendar VALIDTO date and company code.
    TRICKY part: how to send/load into l_s_range-low more than one value. Basically I want to exclude a PAIR of movement types each time. Either 301&302 , either 351&352.
    Below is the code:
      WHEN 'ZMOVETYP1'.
         IF i_step = 2.
            DATA: zcompcode TYPE /BI0/PCOMP_CODE-comp_code,
                  zvalidto TYPE sydatum.
            loop at i_t_var_range INTO l_t_var_range where vnam = 'ZMPD002'.
            endloop.
            if sy-subrc = 0.
    * select the upper part of the 0CALDAY interval, ZMPD002 is basically VALIDTO, based on validfrom-validto interval
    * specified by the user
             zvalidto = l_t_var_range-low.
            endif.
            loop at i_t_var_range INTO l_t_var_range where vnam = '0S_COCD'.
    * select the company code based on the user input
            endloop.
            if sy-subrc = 0.
             zcompcode = l_t_var_range-low.
            endif.
             if zcompcode = '1L01'.
               if zvalidto >= '01.11.2010'.
    * if validto date is bigger or equal to 01.11.2010 exclude from the filter the values 301 and 302
                l_s_range-low = '301'.
                l_s_range-sign = '*E*'.
                l_s_range-opt = 'EQ'.
                APPEND l_s_range TO e_t_range.
                l_s_range-low = '302'.
                l_s_range-sign = '*E*'.
                l_s_range-opt = 'EQ'.
                APPEND l_s_range to e_t_range.
               else.
    * if validto is lower than 01.11.2010 exclude from the filter the values 351 and 352
                l_s_range-low = '351'.
                l_s_range-sign = '*E*'.
                l_s_range-opt = 'EQ'.
                APPEND l_s_range TO e_t_range.
                l_s_range-low = '352'.
                l_s_range-sign = '*E*'.
                l_s_range-opt = 'EQ'.
                APPEND l_s_range to e_t_range.
               endif.
             endif.
         endif.
    Edited by: Dan on Dec 27, 2010 8:46 PM
    Edited by: Dan on Dec 27, 2010 8:48 PM

    try using the below code...
      WHEN 'ZMOVETYP1'.
         IF i_step = 2.
            DATA: zcompcode TYPE /BI0/PCOMP_CODE-comp_code,
                  zvalidto TYPE sydatum.
            read table i_t_var_range INTO l_t_var_range where vnam = 'ZMPD002'.
            if sy-subrc = 0.
             zvalidto = l_t_var_range-low.
            endif.
            read table i_t_var_range INTO l_t_var_range where vnam = '0S_COCD'.
            if sy-subrc = 0.
             zcompcode = l_t_var_range-low.
            endif.
             if zcompcode = '1L01'.
               if zvalidto >= '20101101'.
                l_s_range-low = '301'.
                l_s_range-sign = 'E'.
                l_s_range-opt = 'EQ'.
                APPEND l_s_range TO e_t_range.
                l_s_range-low = '302'.
                l_s_range-sign = 'E'.
                l_s_range-opt = 'EQ'.
                APPEND l_s_range to e_t_range.
               else.
                l_s_range-low = '351'.
                l_s_range-sign = 'E'.
                l_s_range-opt = 'EQ'.
                APPEND l_s_range TO e_t_range.
                l_s_range-low = '352'.
                l_s_range-sign = 'E'.
                l_s_range-opt = 'EQ'.
                APPEND l_s_range to e_t_range.
               endif.
             endif.
         endif.
    rgds, Ghuru

  • Error With Customer Exit Variable

    Hi,
    I need To Create Customer Exit For Text Variable based on Two Input Variable values.
    can any one correct my code Code is written below based on quarter and Fiscalyearvarient.
    I have to get calmonth Text value.
    I am getting the error as : "I_T_VAR_RANGE" is a table without a header line and therefore has no
    Component Called "0PERIV".
    DATA :  l_s_range TYPE rsr_s_rangesid,
            loc_var_range LIKE rrrangeexit.
    IF i_step = 2.
    CASE i_vnam.
       WHEN 'ZTXT_CML' .
          CLEAR: l_s_range.
          LOOP AT i_t_var_range INTO L_S_VNAM WHERE vnam = 'ZQUAR' AND vnam = '0periv'.
            IF i_t_Var_range-0PERIV = 'IE'.
              IF i_t_var_range-ZQUAR = '1'.
                l_s_range-low = 'APRIL'.
                l_s_range-sign = 'I'.
                l_s_range-opt = 'EQ'.
              ELSEIF i_t_var_range-ZQUAR = '2'.
                l_s_range-low = 'JULY'.
                l_s_range-sign = 'I'.
                l_s_range-opt = 'EQ'.
              ELSEIF i_t_var_range-ZQUAR = '3'.
                l_s_range-low = 'OCTOBER'.
                l_s_range-sign = 'I'.
                l_s_range-opt = 'EQ'.
              ELSEIF i_t_var_range-ZQUAR = '4'.
                l_s_range-low = 'JANUARY'.
                l_s_range-sign = 'I'.
                l_s_range-opt = 'EQ'.
              ENDIF.
            ELSEIF i_t_var_range-0PERIV = 'K4'.
              IF i_t_var_range-ZQUAR = '1'.
                l_s_range-low = 'JANUARY'.
                l_s_range-sign = 'I'.
                l_s_range-opt = 'EQ'.
              ELSEIF i_t_var_range-ZQUAR = '2'.
                l_s_range-low = 'APRIL'.
                l_s_range-sign = 'I'.
                l_s_range-opt = 'EQ'.
              ELSEIF i_t_var_range-ZQUAR = '3'.
                l_s_range-low = 'JULY'.
                l_s_range-sign = 'I'.
                l_s_range-opt = 'EQ'.
              ELSEIF i_t_var_range-ZQUAR = '4'.
                l_s_range-low = 'OCTOBER'.
                l_s_range-sign = 'I'.
                l_s_range-opt = 'EQ'.
              ENDIF.
            ENDIF.
              APPEND l_s_range TO e_t_range.
          ENDLOOP.
      ENDCASE.
    ENDIF.

    Hi Supraja,
    You would have to declare I_T_VAR_RANGE internal table as the table with an header line.
    This you will find in data declaration segment.
    ie
    DATA : I_T_VAR_RANGE type <table name> WITH HEADER LINE.
    or
    Create a work area like l_s_var_range.
    Use work area while performing operations in your code and later append the record to the table i_t_var_range.
    DATA : L_S_VAR_RANGE type i_t_var_range.
    Also, i_step = 3 is the right one, because you are processing the customer exit based on the values of the user input of two variables.
    Modified code below.
    DATA : l_s_range TYPE rsr_s_rangesid.
    DATA : L_S_VAR_RANGE type i_t_var_range,
    loc_var_range LIKE rrrangeexit.
    IF i_step = 3.
    CASE i_vnam.
    WHEN 'ZTXT_CML' .
    CLEAR: l_s_range.
    LOOP AT i_t_var_range INTO l_s_var_range WHERE vnam = 'ZQUAR' AND vnam = '0periv'.
    IF l svar_range -0PERIV = 'IE'.
    IF l_s_var_range -ZQUAR = '1'.
    l_s_range-low = 'APRIL'.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    ELSEIF l_s_var_range -ZQUAR = '2'.
    l_s_range-low = 'JULY'.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    ELSEIF l_s_var_range -ZQUAR = '3'.
    l_s_range-low = 'OCTOBER'.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    ELSEIFl_s_var_range -ZQUAR = '4'.
    l_s_range-low = 'JANUARY'.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    ENDIF.
    ELSEIFl_s_var_range -0PERIV = 'K4'.
    IF i_t_var_range-ZQUAR = '1'.
    l_s_range-low = 'JANUARY'.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    ELSEIF l_s_var_range -ZQUAR = '2'.
    l_s_range-low = 'APRIL'.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    ELSEIF l_s_var_range -ZQUAR = '3'.
    l_s_range-low = 'JULY'.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    ELSEIF l_s_var_range -ZQUAR = '4'.
    l_s_range-low = 'OCTOBER'.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    ENDIF.
    ENDIF.
    APPEND l_s_range TO e_t_range.
    ENDLOOP.
    ENDCASE.
    ENDIF.
    Hope it helps,
    Best regards,
    Sunmit.

  • Bex Customer Exit: I_STEP 2,3 are not getting called up?

    Hi All,
    I need a small help in BEX variable customer exit. I am trying to give an error message on what user had entered on the selection screen. I kept several breakpoints. But I understand that this particular code is calling up only when 'I_STEP = 1'. For I_STEP 2 and 3, the follwong code is not being called? I have seen so many validations happening on user entered values with error messages.. But I am not sure where I am missing?
    Here is my sample code.. can any one extend the help?
    The original requirement is to 'modify' what user had entered. But I understand that SAP is not allowing to modify what user had input.. So thought of giving a small error message.. and not able to do that also.. so I am in this Forum..
    thanks,
    Hari
    When 'ZCATID2'.
    *data : l_year1(4) type n,
          l_year2(4) type n,
          l_text(12).
    data: l_cat(10).
    *IF I_STEP <> 2.
    *RAISE no_processing.
    *ENDIF.
    IF I_STEP EQ 3.
      break-point.
      READ TABLE I_T_VAR_RANGE WITH KEY VNAM    =  'ZCATID2'
      INTO  LOC_VAR_RANGE .
      if LOC_VAR_RANGE-LOW CP '*'.
      message i999(zz) with 'Test'.
      endif.
      break-point.

    Thanks Roberto for this good document to clear my fundamentals. I think I understand the mistake on my code.
    Thanks verymuch for your timely help.
    Best Regards,
    Hari
    ( I looked to give more points to you but it allwoed me only 10 points to give you.). Have a nice day!!

  • Error in Variable in Customer Enhancement

    Message  : Error Variable in Customer Enhancement YQVMTD
    I need To Create Customer Exit For Variable based on 0P_FPER (Fiscal Year Period).The user has to enter a value for Fiscal year/Period(0P_FPER).If the user is entering Current month(eg:July 2009) then the report should display Previous Month(eg:June 2009) .If user is entering months other than current month (eg: April 2009)  then the report should display April 2009 Data only.
    Special Case: If the System Date is Jan 2009(That is if Current Month is Jan 2009) then the report should display Dec 2008 Data.
    This is the exit in CMOD for the customer exit variable u2018YQVMTDu2019.  This variable in not ready for input.
    DATA :
                curfiscper TYPE /bi0/oifiscper,
          Curperiod(3) TYPE n,
          Curfiscyear(4) TYPE n,
      When u2018YQVMTDu2019.
       IF i_step = 2.
         READ TABLE i_t_var_range WITH KEY
         vnam = '0P_FPER'
         iobjnm = '0FISCPER'
          INTO l_s_var_range.
        if sy-subrc = 0.
             Concatenate sy-datum0(4) '0' sy-datum4(2) into curfiscper.
             If l_s_var_range-low = curfiscper.
                Curperiod = l_s_var_range-low+4(3).
                If Curperiod = '001'.
                   Curfiscyear = l_s_var_range-low(4).
                   Curfiscyear =  Curfiscyear - 1.
                   Concatenate Curfiscyear '012' into l_s_var_range-low .
                Else.
                   Curperiod = Curperiod - 1.
                   Concatenate l_s_var_range- low(4) curperiod into l_s_var_range-low. 
                EndIf.
              Else.
                 l_s_var_range-low = l_s_var_range-low.
             EndIf.
        l_s_range-sign = 'I'.
        l_s_range-opt = ' EQ '.
        APPEND l_s_range TO e_t_range.
        EndIf.
      EndIf.
    When i execute the query i am getting the following error:
    Error Variable in Customer Enhancement YQVMTD
    Diagnosis
    This internal error is a deliberate termination, since a program status has arisen, that is not allowed to occur.
    The error has arisen for variable YQVMTD in the customer enhancement .
    Procedure
    Please check your customer enhancement.
    Procedure for System Administration
      Notification Number BRAIN 649
    Please have a look into this and suggest me whether i need to change anything in the code in the exit.

    Hi Rathy,
       Yes I made the change at all places.
    When 'YQVMTD'.
    IF i_step = 2.
    LOOP AT I_T_VAR_range INTO l_s_var_range WHERE vnam = '0P_FPER'.
    Concatenate sy-datum0(4) '0' sy-datum4(2) into curfiscper.
    If l_s_var_range-low = curfiscper.
    Curperiod = l_s_var_range-low+4(3).
    If Curperiod = '001'.
    Curfiscyear = l_s_var_range-low(4).
    Curfiscyear = Curfiscyear - 1.
    Concatenate Curfiscyear '012' into l_s_range-low .
    Else.
    Curperiod = Curperiod - 1.
    Concatenate l_s_var_range-low(4) curperiod into l_s_range-low.
    EndIf.
    Else.
    l_s_range-low = l_s_var_range-low.
    EndIf.
    l_s_range-sign = 'I'.
    l_s_range-opt = ' EQ '.
    APPEND l_s_range TO e_t_range.
    Endloop.
    EndIf.

  • Error while executig reports

    Hello All,
    I had posted a thread yesterday to create a characteristic value to populate current calendar month/year.. i received a reply for the same and have written the following code for it...
      data:  l_s_range like E_T_RANGE,
              mo type i,
              moc(2),
              I type i.
    CLEAR L_S_RANGE.*
      if i_step = 1.
        mo = sy-datum+4(2).
        moc = mo.
        if sy-datum+4(2) = 1.
          l_s_range-low = '01'.
          l_s_range-high = '01'.
          l_s_range-sign = 'I'.
          l_s_range-opt = 'EQ'.
          append l_s_range to e_t_range.
        else.
          if mo < 10.
            concatenate '0' moc into moc.
          endif.
          l_s_range-low = moc.
          l_s_range-high = moc.
          l_s_range-sign = 'I'.
          l_s_range-opt = 'EQ'.
          append l_s_range to e_t_range.
        endif.
      endif.
    ENDFUNCTION.
    On executing the report i got the following errors:
    Messages:
    Value "03" for user-exit variable ZCURMNTH is invalid
    Variables contain invalid values.
    System error in program CL_RSR_OLAP_VAR and form INIT-02- (see long text)
    Please help me ASAP...
    Sneha

    Hello Sneha,
                       Create a single value characteristic value variable with processing type as customer exit for 0calmonth(calendar year/month) characteristic, and if you want to display that variable as user input then check ready for input option and write the following code .You can use this variable in the aprropriate place in your report.
    data: year(4) type n,
    mon(2) type n,
    zcalmon(6) type n.
    when 'test1'.
    year = sy-datum(4).
    mon = sy-datum+4(2).
    concatenate year mon into zcalmon.
    clear l_s_range.
    l_s_range-low = zcalmon.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    append l_s_range to e_t_range.
    i guess this code will work for you.
    regards,
    karthik.

  • Error while running report?  Urgent

    Hi
    I am trying to create report and in that the report should run by taking the current week.
    I have written a customer exit for that and when i run the report i am getting following error
    An exception with the type CX_SY_DYN_CALL_ILLEGAL_TYPE occurred, but was
    neither handled locally, nor declared in a RAISING
        Message no. RS_EXCEPTION000
    The function call of DATE_GET_WEEK failed; a field may have been assigned to
    the parameter WEEK whose type is not compatible with th
        Message no. RS_EXCEPTION000
    I am using following customer exit
    data: l_curweek  type sy-datum.
       if i_step = 1.
         call function 'DATE_GET_WEEK'
           EXPORTING
             date = sy-datum
           IMPORTING
             week  = l_curweek.
        clear l_s_range.
         l_s_range-low = l_curweek.
         l_s_range-sign = 'I'.
         l_s_range-opt = 'EQ'.
         append l_s_range to e_t_range.
       endif.
    Please help me out.

    This time it gives different errors
    Error for variable  in customer enhancement Z_C_WEEK
        Message no. BRAIN649
    Diagnosis
        This internal error is a deliberate termination, since a program status
        has arisen, that is not allowed to occur.
        The error has arisen for variable Z_C_WEEK in the customer enhancement .
    Procedure
        Please check your customer enhancement.
    Procedure for System Administration
    Variables contain invalid values.
        Message no. BRAIN633
    System error in program CL_RSR_OLAP_VAR and form INIT-02- (see long text)
        Message no. BRAIN299
    Diagnosis
        This internal error is an intended termination resulting from a program
        state that is not permitted.
    Procedure
        Analyze the situation and inform SAP.
        If the termination occurred when you executed a query or Web template,
        or during interaction in the planning modeler, and if you can reproduce
        this termination, record a trace (transaction RSTT).
        For more information about recording a trace, see the documentation for
        the trace tool environment as well as SAP Note 899572.

  • CX_SY_NO_HANDLER Error While executing query in RSRT T-Code

    Hi Experts,
    I have created a data source extraction using function module.
    Then i have created customer exit variable, dso, infocube and all....
    my variable name is ZWBS_VAR and
            query name is WBS_VAR.
    while executing this query name I'm getting the exception CX_SY_NO_HANDLER.
    If i use WBS_VAR instead of ZWBS_VAR in when condition.. it is not showing that error.
    this is my code i have written in ZXRSRU01 include.
    DATA:it_wbs_elemt TYPE STANDARD TABLE OF /bic/awbsdsogn00,
         wa_wbs_elemt like line of it_wbs_elemt,
         L_S_RANGE TYPE RSR_T_RANGESID with header line,
         LOC_VAR_RANGE like line of i_T_VAR_RANGE,
         ZLOW TYPE C,
         LV_USER LIKE SY-UNAME,
         lv_user1 LIKE /bic/awbsdsogn00-/BIC/WBSE.
    CASE i_vnam.
    *****************************Start of Code for 'ZWBS_VAR' variable******************************
    when 'ZWBS_VAR'.
    lv_user = sy-uname.
    if lv_user CP '/BIC/WBSE'.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = lv_user
    IMPORTING
    output = lv_user1.
    CLEAR wa_wbs_elemt.
    SELECT * FROM /bic/awbsdsogn00 INTO TABLE it_wbs_elemt WHERE /BIC/WBSE = lv_user1.
    READ TABLE it_wbs_elemt INTO wa_wbs_elemt WITH KEY /BIC/WBSE = lv_user1.
    IF sy-subrc = 0.
    l_s_range-low = wa_wbs_elemt-/BIC/WBSE.
    l_s_range-sign = ' I '.
    l_s_range-opt = ' EQ'.
    APPEND l_s_range TO e_t_range.
    ENDIF.
    ENDIF.
    ENDCASE.
    IF I_STEP = 3.
    LOOP at i_t_var_range INTO loc_var_range WHERE vnam = 'ZWBS_VAR'.
    CLEAR : l_s_range.
    zlow = loc_var_range-low.
    lv_user = sy-uname.
    CALL FUNCTION 'CONVERSIOn_EXIT_ALPHA_OUTPUT'
    EXPORTING
    input = loc_var_range-low
    IMPORTING
    output = loc_var_range-low.
    IF lv_user NE loc_var_range-low.
    IF lv_user CP '/BIC/WBSE'.
    CALL FUNCTION 'RRMS_MESSAGE_HANDLING'
    EXPORTING
    I_CLASS = 'RSBBS'
    I_TYPE  = 'E'
    I_NUMBER = '000'
    I_MSGV1 = 'You are not authorized for the WBS ELEMENT'
    I_MSGV2 = loc_var_range-low
    I_MSGV3 = 'Enetr your valid WBS ELEMENT'
    I_MSGV4 = lv_user
    EXCEPTIONS
    OTHERS = 02.
    RAISE Again.
    ELSE.
    l_s_range-low = loc_var_range-low.
    l_s_range-sign = loc_var_range-sign.
    l_s_range-opt = loc_var_range-opt.
    APPEND l_s_range TO e_t_range.
    ENDIF.
    ENDIf.
    ENDLOOP.
    ENDIF.
    If you find any errors in this piece of code please let me know..
    Thanks&Regads,
    Sirisha.

    Hey think other way round .
    Filtering the report with the partner(current user executing the report) will suffice your requirement .
    Am I correct ?
    If yes then follow this simple approach .
    Create a variable(mandatory, not ready for input ) of type customer exit on partner infoobject and filter your report with this variable .
    In this way the current user executing the report can see data only related to him .
    Type the below code in cmod .
    WHEN '(give your variable name).
         DATA :lv_bp        TYPE /bi0/oibpartner,
        CHECK i_step EQ '1'.
        lv_bp = sy-uname.
        IF lv_bp IS NOT INITIAL.
          lv_bp = ( sy-uname ) .
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
            EXPORTING
              input  = lv_bp
            IMPORTING
              output = lv_bp.
          l_s_range-sign = 'I'.
          l_s_range-opt  = 'EQ'.
          l_s_range-low  = lv_bp .
          APPEND l_s_range TO e_t_range.
          CLEAR : l_s_range,lv_bp.
        ENDIF.
    If this approach is not flexible in ur case then let me know will change the code what u have written as I can see many errors in that .
    Also I can figure it out that the whole code is ctrl c ctrl v of that sdn document but his requirement was quite different than yours .

Maybe you are looking for

  • Firewire connection to my G% and Macbook Pro

    We have two camcorders and an external hard drive. 1 Panasonic NV GS500 2 Panasonic NZ DS 30 3 hard Drive Plieades 3.5" Recently the GS500 and the Hard drive will not connect to the computer. The Hard Drive lists as "Unknown Device " and the GS500 do

  • AWR report problem after cluster node switch.

    Hello all. I have some strange problem, can any one advice what to do.... I have OracleDB (Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 on Solaris x86_64), we have two server nodes and one shared storage attached to them, db is running o

  • QM Digital Signature SAP System's Personal Security Environments (PSEs)

    Hi All, We want to introduce the Digital Signatures for Quality Management Result Recording and Usage Decision. (Transaction Codes :QE01,QE02,QA11,QA12). We have made some studies.Still we need some suggessions to achieve the final goal. ============

  • Officejet v40 stops printing

    recently purchased a new dell laptop with windows 7.  connected my officejet v40, automatically updated the drivers but when I print it only prints about 1/4 of the page.  any ideas on how to correct.?  the printer works fine on other PCs that do not

  • Missing default flag for communication type in crm/business partner

    Hello! We've connected a crm 5.0 with an R/3-system (4.6c). The crm-system is the leading system... While inserting a new customer in crm with phone- and fax-number. After "save" we've got red bdocs, telling us that the standard entry for communicati