Problem in customer exit

Hi all,
        I wrote a customer exit and debugged that and the coede was working fine but i am not able to see the result in the query.Can anyone of you suggest what are the possible causes for this.

Here is the code which i had written.
DATA: l_s_range type rsr_s_rangesid.
data: loc_var_range like rrrangeexit.
DATA: v_pre1(2) type c.
DATA: v_pre2(2) type c.
CASE: I_VNAM.
  when 'Z_MTD_PREBAL'.
    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-low(4) = loc_var_range-low(4).
        v_pre1 = loc_var_range-low+4(3) - 1.
        if v_pre1 < 10.
        l_s_range-low+4(2) = '00'.
        l_s_range-low+6(1) =  v_pre1.
        else.
        l_s_range-low+4(1) = '0'.
        l_s_range-low+5(2) =  v_pre1.
        endif.
       l_s_range-sign = 'I'.
       l_s_range-opt = 'EQ'.
      Append l_s_range to e_t_range.
exit.
endloop.
endif.
This code is used to display the previous month's balance based on the user input for fiscal period(YYYYMMM).MMM stands for the period.
hence, the key figure has been restricted on Fiscal period which has a customer exit variable. the code for the same is as above.

Similar Messages

  • 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

  • Critical problem with customer exit scenario

    Hi Gurus,
    I have some critical prblm in designing the report.
    we have one field say VOtype which holds numeric values..
    and another column parameter whihc holds whihc type & corresponding values..
    VOtype 
    1400   parameterA 1
    1400   parameterA 2
    1400   parameterB 3
    1510   parameterA 3
    1501   parameterA 3
    1521   parameterB 4
    now when user enters some variable X - value.. say X=3
    the report should calulate total conisidering first 3 digits of VOtype so we hav four combination 140, 151, 150, 152
    the report should see lik this
                                    TotalA     TotalB
    1400   parameterA 1   
    1400   parameterA 1
    1400   parameterB 3
                                       2          3
    1510   parameterA 3
                                       3          0
    1501   parameterA 3
                                       3          0
    1521   parameterB 4
                                       0          4
    when user enters  X=2
    the report should calulate total conisidering first 2 digits of VOtype
    so we hav only two combination 14, 15
    the report should see lik this
                                         TotalA     TotalB
    1400   parameterA 1   
    1400   parameterA 1
    1400   parameterB 3
                                           2          3
    1510   parameterA 3
    1501   parameterA 3
    1521   parameterB 4
                                           6          4
    can you help me in handling this situation?..
    whether i hav to go for customer exit?..
    how can I represent the data in report as above.. like all the detailed lines & also total disply in report?..
    points will be awarded ..for every solution..
    Regards,
    Naveen

    Hi ,
    U have to create a customer exit variable for the value type by assigning the value of each document type = required count
    this is the solution for ur problem
    Assigning points is the way of saying thanks in SDN
    Regards ,
    Subash Balakrishnan

  • Problem with customer exit variable on date range

    Hi All,
    I have customer exit variable on date range. In the selection screen it has to give the week range  as a default (05/21/2009 to 05/27/2009).
    Earlier its working fine and from yesterday onwards it is not working properly. yesday onwards default date range was not displaying in selection screen.
    Wht would be the problem.
    Thanks in Advance

    Hi Ashish,
    I checked every thing what u told earlier. Every thing is fine.
    And another thing is
    I have routine in infopackage level. Since day before yesterday it was working fine and yesterday onwards it was not working.
    Eg: budat will take the data based on routine for the week. But yesterday onwards it is not picking up the data.however I have the data in datasource for the week.
    Wht would be the problem. I debuged the code and its working fine.
    Sekhar

  • Problem with customer exit variable in BeX Query

    Hi All,
    We have created a customer exit variable in a query and populated with few patterns in customer exit.
    My query has to bring all the records where the address line is containg the patterns passed through customer exit. Here the query is not working as expected.
    It is bringing the values where the address line is exactly same as the pattern and not bringing the records where the pattern is part of the address line.
    For example: Pattern passed in customer exit = 'HOSPITAL'
    The record where address line = 'HOSPITAL' is shown in the rpeort, where the record with address line = 'HOSPITAL ROAD' is not shown in the report.
    I would appreciate your help on this.
    Regards,
    Rakesh

    Hi Diogo,
    Below is the code I am using in the customer exit.
    SELECT * FROM zae_tt_pbuild INTO TABLE gt_pbuild.
          IF sy-subrc = 0.
            LOOP AT gt_pbuild INTO gs_pbuild.
              CONCATENATE '*' gs_pbuild-pbuild '*' into lv_pattern.
              ls_range-low = lv_pattern.
              ls_range-sign = lc_sign_i.
              ls_range-opt = 'CP'.
              APPEND ls_range TO e_t_range.
              CLEAR: ls_range,
                     lv_pattern.
            ENDLOOP.
          ENDIF.
         ENDIF.
    I have tried using '%' instead of '*' aswell but the result is same.
    Thanks,
    Rakesh

  • Problem with customer exit EXIT_SAPLL03A_002:

    hello all ,
    i have to write some code in the customer exit 'EXIT_SAPLL03A_002'. this customer exit will trigger while creating a transfer order using LT01,LT02 or LT03 transaction . the standard program for all these transactions is SAPML03T . The customer exit EXIT_SAPLL03A_002 is present inside the Standard program SAPML03T. i have to change the storage type indicator value in the internal table imlvs which is present in the standard program SAPML03T.but when i try to access this internal table inside the exit 'EXIT_SAPLL03A_002'.it is showing syntax error as 'IMLVS is not found '.
    How can i make use of field symbols in this case ?
    can we declare a field symbol as internal table .
    my requirement is to change th value of (SAPML03T)IMLVS-LTKZE inside the customer exit 'EXIT_SAPLL03A_002'.
    Thanks in advance ,
    pavan.

    Hi,
    Here is the example for your reference. I am trying to change the shipping condition in the internal table.
    FIELD-SYMBOLS: <fs> TYPE table,
                   <fs_ekpv> TYPE cekpv.
    DATA:lv_structurename(40) TYPE c,
         lv_ttype TYPE cifapottype,
         xekpv TYPE TABLE OF ekpv.
    DATA:lv_vsbed TYPE vsbed.
    lv_structurename = '(SAPMM06E)PTV[]'.
    ASSIGN (lv_structurename) TO <fs>.
    IF <fs> IS ASSIGNED.
      IMPORT lv_ttype FROM MEMORY ID 'ZAPO_TTYPE'.
      CHECK NOT lv_ttype IS INITIAL.
      CLEAR lv_vsbed.
      SELECT SINGLE  vsbed
             FROM ztlb_transport
              INTO lv_vsbed WHERE ttype = lv_ttype.
      IF NOT lv_vsbed IS INITIAL.
        LOOP AT <fs> ASSIGNING  <fs_ekpv>.
          <fs_ekpv>-vsbed = lv_vsbed.
        ENDLOOP.
      ENDIF.
    ENDIF.
    Thanks,
    Vamshi.

  • Problem with Customer exit

    Hi,
    I have a set of variables:
    ZVAR_002 : Fiscal year period (User entry/mandatory/single value), Ready for input.
    ZVAR_004 : Key date to derive Document Date (customer exit/mandatory/single value) used date as reference characteristic, Ready for input.
    ZVAR_005 : Key date to derive net due date (Replacement path/optional/single value) used date as reference characteristic.
    what i am trying to achieve is to derive a date from ZVAR_002(Fiscal year/period) into ZVAR_004.
    example: 001.2007 - 31.07.2006
                  010.2007 - 30.04.2007
    i want the same value that is on ZVAR_004  to be used by ZVAR_005.
    firstly i do not want ZVAR_004 to be ready for input, but i am getting error when i do not check the input ready box. is this a limitation?
    Because i made ZVAR_004 mandatory when the variable screen pops up i am not able to leave the field blank as it requires me to enter some value. As mentioned above i do not want this variable to be displayed in the first place. i want to derive it from ZVAR_002.
    I am using a customer exit to derive the value of ZVAR_004 from ZVAR_002. I am using the following code.
    WHEN 'ZVAR_004'.
      CLEAR:  t_date.
          SELECT  SINGLE low
          FROM  RSZGLOBV
          INTO  lv_fiscper
          WHERE objvers = 'A'
          AND   vnam =    'ZVAR_002'
          AND   iobjnm =  '0FISCPER'.
          IF    sy-subrc IS INITIAL
            AND NOT lv_fiscper IS INITIAL.
            lv_fiscper_month = lv_fiscper+4(3).
            lv_fiscper_year  = lv_fiscper+0(4).
            CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
              EXPORTING
                I_GJAHR        = lv_fiscper_year
                I_PERIV        = 'EM'
                I_POPER        = lv_fiscper_month
              IMPORTING
                E_DATE         = T_DATE
              EXCEPTIONS
                INPUT_FALSE    = 1
                T009_NOTFOUND  = 2
                T009B_NOTFOUND = 3
                OTHERS         = 4.
            IF SY-SUBRC IS INITIAL.
              l_s_range-low    = T_DATE.
              l_s_range-sign   = 'I'.
              l_s_range-opt    = 'EQ'.
              APPEND l_s_range TO e_t_range.
            ENDIF.
          ELSE.
            CLEAR e_t_range.
          ENDIF.
    What i find is the value that i give for ZVAR_002 is not updated in the in the table RSZGLOBV. Can anybody please help me resolve this issue.
    Thanks in advance.
    Ravi.

    Hi All,
    Fixed the issue myself.
    ZVAR_002 : Fiscal year period (User entry/mandatory/single value), Ready for input.
    ZVAR_004 : Key date to derive Document Date (customer exit/mandatory/single value) used date as reference characteristic, Ready for input.
    ZVAR_005 : Key date to derive net due date (Replacement path/optional/single value) used date as reference characteristic.
    as i have mentioned about these three variables earlier, the variable ZVAR_005 was set to replacement type and gets the value from ZVAR_004, as i require them same value.
    Because my ZVAR_005 reis dependent on ZVAR_004 which inturn is dependent on ZVAR_002 the customer exit variable ZVAR_004 should be checked for ready for input and whcih inturn does not run the customer exit at step 2.

  • Problem with customer exit variable

    HI i have created a customer exit variable to rread a table based in user input and pass it to my variable , every thing works fine but i get a waring message in my WAD saying
    RANGE-LOW for customer exit variable ZVSO_PRM corrected to #   BRAIN  746
    Does any one have any idea why is it comming
    my code is as follows
    WHEN 'ZVSO_PRM'.
    IF I_STEP = 2.
    DATA: BEGIN OF ZPROD_MODEL OCCURS 0,
    I_PROD LIKE ZCURR_PM_T-/BIC/ZPRODMOD,
    END OF ZPROD_MODEL.
    DATA: BEGIN OF ZREGIO_TABLE OCCURS 0,
    REGION LIKE ZCURR_PM_T-/BIC/ZREGION,
    END OF ZREGIO_TABLE.
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZREG02'.
    CLEAR L_S_RANGE.
    ZREGIO_TABLE = LOC_VAR_RANGE-LOW.
    APPEND ZREGIO_TABLE.
    ENDLOOP.
    LOOP AT ZREGIO_TABLE.
    SELECT /BIC/ZPRODMOD FROM ZCURR_PM_T INTO TABLE ZPROD_MODEL WHERE /BIC/ZREGION = ZREGIO_TABLE-REGION.
    APPEND ZPROD_MODEL.
    ENDLOOP.
    SORT ZPROD_MODEL.
    CLEAR L_S_RANGE.
    LOOP AT ZPROD_MODEL.
    L_S_RANGE-LOW = ZPROD_MODEL-I_PROD.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDLOOP.
    ENDIF.

    Could it be that the code doesn't find any value in ZCURR_PM_T table for the specified input region?

  • Custom Exit for determining previous-year time range

    Dear all:
    I have a problem about custom exit:
    We have created a new object for combining Fiscal Year/Month and Period. So the format will be shown as " yyyymmp"
    now we have one requirement which is determining the same period but previous year based on user input. For Example, if user input start and end period as
    "2006041" and "2006111". There are should be 2 custom exit which are able to convert the user input to be "2005041" and "2005111". We created 2 custom exit for telling the previous-year period.
    Then based on this converted time range, we should be able to extract applicable data. But after testing, we cant get supposing result. The code is following:
    We will be very grateful for any input. thank you all so much
    Calculate (Start)previous year/month/period by current
    *year/month/period
    *user-entry calendar year/month/period
    WHEN 'ZFACLV19'.
          LOOP AT i_t_var_range INTO loc_var_range
          WHERE vnam = 'ZFACYMP1'.
            CLEAR l_s_range.
            LOC_YEAR = LOC_VAR_RANGE-LOW(4).
            LOC_MONTH = LOC_VAR_RANGE-LOW+4(2).
              LOC_YEAR = LOC_YEAR - 1.
            L_S_RANGE-LOW(4) = LOC_YEAR.
            L_S_RANGE-LOW+4(2) = LOC_MONTH.
            L_S_RANGE-LOW6(1) = LOC_VAR_RANGE-LOW6(1).
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            APPEND l_s_range TO e_t_range.
            EXIT.
          ENDLOOP.
    Calculate (End)previous year/month/period by current
    *year/month/period
    *user-entry calendar year/month/period
    WHEN 'ZFACLV20'.
    break ab_william.
          LOOP AT i_t_var_range INTO loc_var_range
          WHERE vnam = 'ZFACYMP2'.
            CLEAR l_s_range.
            LOC_YEAR = LOC_VAR_RANGE-LOW(4).
            LOC_MONTH = LOC_VAR_RANGE-LOW+4(2).
              LOC_YEAR = LOC_YEAR - 1.
            L_S_RANGE-LOW(4) = LOC_YEAR.
            L_S_RANGE-LOW+4(2) = LOC_MONTH.
            L_S_RANGE-LOW6(1) = LOC_VAR_RANGE-LOW6(1).
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            APPEND l_s_range TO e_t_range.
            EXIT.
          ENDLOOP.
    SzuFen

    Hi,
    Try with following modifications:
    ZYEAR1(4) = LOC_VAR_RANGE-LOW(4).
    ZYEAR1(4) = ZYEAR1(4)- 1.
    ZMONTH1(2) = LOC_VAR_RANGE-LOW+4(2).
    CONCATENATE ZYEAR1(4) ZMONTH1(2) INTO LOC_VAR_RANGE-LOW(6).
    With rgds,
    Anil Kumar Sharma .P

  • Creation of Customer Exits in release 6.00 is having some problems

    I am facing problems while creating Customer Exits in release 6.0. Since due to the introdution of enhancement spots I am not clear as what is significance of enhancement spots for the BADI. How will it affect it?
    Also, I am finding differences while creating the BADI  in 6.00 release and that of lower releases. In 6.0 release it is not creating the default implementation which the system creates itself for lower releases when the BADI is activated. I want to know if this functionality is removed in the higher release or due to some other reason?
    Kindly let me know about these nuances as it is creating much problem in 6.0 release.

    I'm just wondering if release 6.00 (I mean SAP ERP) is already available non-rampup customers?
    Peter

  • Problem in transporting the Customer exit variable

    Hi all,
    i have careated a variable to capture the current date in my report, with the processing type, Customer Exit. and, its getting populated fine in my DEV environment. basically, i have to compute the number of days, in which net due date is being compared to the current date.  when i transport this to the QA environment, the values for number of days is gettting some junk value, wherein in DEV its showing the exact values. It seems i have to take cetain measures in transportation of the Customer Exit.
    please advice.
    Thanks in advance
    Sneel

    Hello ,
               In the Quality after you run the report check in the layout option>display text elements> variables and check what value is displayed for the use exit variable , if it is correct then problem may be in the selection you gave when you run the report if the user exit variable value is wrong , then set a break point in the code and run the report from rsrt and check where the error is.
    hope it is clear
    assign points if useful

  • Query variable type Customer Exit problem

    Hi All,
    I need to set a Profit Center variable value by Customer Exit. My Exit has to results a Profit Center Hierarachy NODE value. The problem is that the Query handles my return value as a single Profit Center (10 char long) but my Profit Center Nodes are longer than 10 characters and they are truncated to 10 chars. Therefore I get an error message, namely 'XYZ... PC is not exists in PC Hierarchy ABC...'
    How can I set that the Query or the code to get my result value not as a Profit Center but a Profit Center Hierarchy NODE?
    Thanks in Advance,
    Dezso

    Hello,
    Yes, I have set the right Hierarchy. If I change the PC variable to 'Characteristic variable' and set it on the selection screen everything is OK so the Hierarchy is good.
    Thanks,
    Dezso

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

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

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

  • Customer exit problem

    hi to all experts,
    my requirement is to clear the exporting parameter . it is not getting populated in the source code of the exit it is blank but when i get out of the exit it is populated im clearing the input parameter too.

    Hi Khan,
    Please find the link below
    [Exit Problem|Re: Regarding Customer Exit]
    Hope this is helpful
    Thanks
    Kalyan.

  • Problem with Bex Customer Exit Variable

    Hi Friends,
    I have a customer exit variable which is getting filled based on the User Input.  I have written the code inside the If condition checking i_step = 2. The code is working as required.
    But the problem is when I try refreshing the query or change the user variable selection, the Customer exit variable is not changing.  I tried to debug the code and realized that the  values for the exit variable based on the previous selection is not cleared and the i_step = 2  is not being executed for the variable.
    While I close and reopen the query, the code is working fine.  
    Does anyone know why this is happening?  Please suggest..
    Thanks in advance..
    Regards,
    Priya

    Hi Binu,
    Here is the code sample.  I am trying to populate the month based on the input Week number '0I_WEKIN'
    .  For eg.  If I give 37.2011, the month value should be 08.2011.  If I give 39.2011, month should be 09.2011.
      WHEN 'ZC_MONTH'.
        IF i_step = 2.     "after the popup
            READ TABLE i_t_var_range INTO lw_var_range WITH KEY vnam =
        '0I_WEKIN'.
           IF lw_var_range-high IS NOT INITIAL.
              l_week  = lw_var_range-high.
              l_week = l_week - 3.
              CALL FUNCTION 'WEEK_GET_FIRST_DAY'
                EXPORTING
                  week = l_week
                IMPORTING
                  date = l_date.
              lw_range-low = l_date+0(6).
            ENDIF.
            lw_range-sign = 'I'.
            lw_range-opt  = 'BT'.
            APPEND lw_range TO e_t_range.
        ENDIF.
    Regards,
    Priya

Maybe you are looking for

  • Running a time machine back-up of a HD in target mode

    Hi guys Wondering if anyone can offer me some advice. My macbook pro won't start up and gets stuck in grey screen with apple logo. I have tried various troubleshooting tips as per apple support documents but cannot get it to start. Before I get to in

  • After 2.0.1

    I just wanted to see if anyone still have any issues as they did in 2.0. I am now on 2.0.1 and still when i download apps from apps store they take long to download using edge or wifi. Also sometimes my phone freezes and just turns off and back on. w

  • IPad (first gen) wont turn on

    Hi. I got an 32 gb wifi only ipad (1st gen) recently. I had taken really, really good care of it and never dropped it or got it wet or anything. Yesterday I set it down for about 20 minutes. When I came back it had turned off and would not turn back

  • URGENT !!!! I know nothing about java .... ;o)

    Hi all, here is my problem, I am working on a demo for a customer, I am business consultant and I know nothing about java and I have noone next to give a hand, so please help. I integrated a content in a Learning Management System. When launching thi

  • Replacing unicode character literals with characters.

    Hi, say i have a String like: String example = "\\u1234 llamas \\uabcd\\c0d4";etc. How would I replace all the unicode literals (\\u1234 etc.) with the actual characters? Is there an easy way to do this?