Urgent - Customer Exit

Hi All
I am trying to write a Customer exit. But it is not working. i have created a Formula Variable (Zvar1) with customer exit to calculate Days Elapsed. This Days Elapsed should show the day which the user enters. For example if user enters 2004/06/22 when variable pop ups this days elapsed should show 22. For this i have assigned variable (ZZCALDAY) for  Calender day. Below you can see the customer exit. Exit_SAPLRRS0_001. Please help me out with the code.
*&  Include           ZXRSRU01
DATA: l_s_var TYPE rrs0_s_var_range.
DATA: l_s_range TYPE rsr_s_rangesid.
DATA: lv_date TYPE sy-datum.
DATA: lv_date1 TYPE sy-datum.
CASE i_vnam.  " Variablenname
  WHEN 'ZVAR1'.
    IF i_step = 2.
      READ TABLE i_t_var_range
      WITH KEY vnam = 'ZZcalday' INTO l_s_var.
      IF sy-subrc = 0.
        lv_date = l_s_var-low.
        lv_date1 = lv_date+6(2).
        CLEAR l_s_range.
        l_s_range-sign = 'I'.
        l_s_range-opt = 'EQ'.
        l_s_range-low =  lv_date1.
        APPEND l_s_range TO e_t_range.
      ENDIF.
    ENDIF.
ENDCASE.
Regards
Naga Yadavalli

The below program works when i debug if step=2 is uncommented. When i try to run the query it is not showing the data (No applicable data available)..
*&  Include           ZXRSRU01
DATA: l_s_var TYPE rrs0_s_var_range.
DATA: l_s_range TYPE rsr_s_rangesid.
DATA: lv_date TYPE sy-datum.
DATA: lv_date1(2) TYPE n.
CASE i_vnam.  " Variablenname
  WHEN 'ZVAR1'.
<b>*    IF i_step = 2.</b>
      READ TABLE i_t_var_range
      WITH KEY vnam = 'ZZCALDAY' INTO l_s_var.
      IF sy-subrc = 0.
        lv_date = l_s_var-low.
        lv_date1 = lv_date+6(2).
        CLEAR l_s_range.
        l_s_range-sign = 'I'.
        l_s_range-opt = 'EQ'.
       Move lv_date1 to l_s_range-low.
        APPEND l_s_range TO e_t_range.
     ENDIF.
    ENDIF.
ENDCASE.

Similar Messages

  • How to identify what customer exit variables are used in which query?

    Hi all,
    When i happened to check the CMOD transaction code i can find a list of customer exits are used. But i want to know what are those customer exist are used in which query? can anyone let me know the procedure of identifying it.
    Thanks a lot
    Pooja

    hii pooja
    check the foll links
    Very Urgent: Customer Exit Variable
    customer exit variable
    MIssing Authorisation for customer exit variable query
    Authorization variable or customer exit variables
    if it is helpful assign points
    thanks.

  • Customer Exit  - very urgent

    Hi Guru's
    I had a problem with Bex,while running the query i get the warning message
    "Warning Initial Range_sign for customer exit variable ZYEAR is corrected"
    "Warning Initial Range_opt for customer exit variable ZYEAR is corrected"
    I got solution from sdn as to switch off the Bex settings Supress warnings from server and it works fine on my system.
    But now i checked on other teamate's system and still displaying the warning message as abow.
    Please any one can give me that is there any other solution for that.
    Because if user run the query then user will get the same warnings.
    Thanks in advance..
    Regards,
    Chandu.

    Hi
    This is exit code
       WHEN 'ZYEAR'.
         IF I_STEP = 2.
           LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = '0P_FPER1'.
             CLEAR L_S_RANGE.
             L_S_RANGE-LOW = LOC_VAR_RANGE-LOW(4).
             APPEND L_S_RANGE TO E_T_RANGE.
             EXIT.
           ENDLOOP.
         ENDIF.
    I'm not authorised to access RSRT on bw prd.
    Please give me some solution for this as it's urgent.
    Thanks.
    Nani

  • Customer exit ==== Urgent

    Hi All,
    I ,  have a requirement where i have a purchasing organization to be displayed on the selection screen of the quesry and when the user executes an F4 on the selction screen he should only see the Purchasing Organization which have Classification (which is an attribute of Purchasing Organization ) which Equals to 'X'
    Can u pls help me it's urgent.
    Regards
    Rao

    Hi,
    this is for creating customer exit,
    goto CMOD> Goto ur project code> Enhancement for reporting>there u'll find the function module name>EXIT_SAPLRRS0_001> double click on this> ZXRSRU01--> it will lead to the next screen, here u have to write an ABAP code
    create a variable for purchase organization(right click on the corresponding info object-->create variable), it will be available in ur selection screen, here in the variable processing type u should customer exit as the processing type.
    then type ur ABAP code, for ur case u have to use IF condition like Purchase organisation= " " then give ur attribute name="X"..else come out of the loop.
    hope this helps...

  • Urgent - Related to generic customer exit for Query

    Hello Experts,
    We have a query whose selection screen has two user input variables, plant and fiscper. Let say user enters 001 plant adn fiscper 0012007. We have about 100 rows for this selection. Each row has three date fields D1, D2 and D3. we have requirement that out of these 100 records only those records which meet the condition that D1 falls between D2 and D3 should be displayed as query result, others should be ignored.
    Is there any generic customer exit (Like we have customer exit to manipulate virtual keyfigures) that gets called before query result is displayed where we can play around with the query result before it gets displayed? I am not talking about user exits for customer exit variables.
    Please throw some light on this.
    Thanks
    Sundar

    Hello Sundar,
    You can use conditions for the requirement mentioned.
    Create a Contition on date D1 with operator "Between" and instead of hardcoding the values for the condition use variable entries.There you can create a variable with Customer exit type - to get in the selected range of dates between D2 and D3.
    Thanks
    Sam

  • Urgent:: How to transport customer exit from dev to test system?

    Hi,
    We have created a Customer exit in our development system in the $tmp package, and we want to transport it to our test system. Can you please tell us how to proceed on this. We are not able to change the package as our package is a development package and so does not start with Y or Z.
    Best Regards,
    Charu.

    Your package is RSR right.. this is the package for the function group XRSR where in this user exit exists.
    you need to have a separate development class either starting with Y or Z. If not, ask any developer or your sap basis team to create one for you. then you can assign this development class to your user exit.
    To check this, go to SE38 - enter your program name ZXRSRU01, display, in the menu "goto", CHECK "object Directory entry", you should have this development class.
    Hope this helps.
    Shakeel.

  • Urgent - How to delete customer exit include.

    Hi, experts.
    Unintentionally I made a customer exit include by double-clicking standard customer exit.
    I tried to delete this include, but I can't delete it because of reference is alread made it.
    How can I delete it. Give me any help!!!
    Thank you in advance.

    Guess you are referring to an include.
    We can delete the object from SE38 transaction.
    1. Goto Transaction: SE38
    2. Enter the include name you created
    3. Click on Delete button from application toolbar.
    4. Confirm deletion.
    Kind Regards
    Eswar

  • URGENT: user exit& customer exit

    hi every body,
                     pls let me know the difference between USER EXIT& CUSTOMER EXIT.and How& What Type of the TICKETS are received in realtime.is there any tool for receiving the tickets in SRM.
    Generally how many USERS are must for implementing the SRM project in real time.
    which implementation scenario is best for INDIA?&Why.
    i am requesting the GURUS please send me the detailed answers asap...............points will be rewarded soon.
    thanks
    warm regards
    rakhi

    Hi,
    For difference between USER EXIT& CUSTOMER EXIT,see this very good related thread:
    Re: user exit  vs customer exit
    BR,
    Disha.
    Do reward points for useful answers.

  • Urgent!!Virtual Char & KF using customer exit!!

    Hi
    Anyone explain me in easier way the steps for Virtual char & KF & where we use it??H to use it with the help of customer exit & why??
    Pls xplain me .
    thnx
    raj.

    Hi,
    A virtual characteristic / key figure can be used to derive values at
    query run time
    The virtual characteristic / key figure must be added to the cube as a
    characteristic or key figure but not filled in update rules or transfer
    rules
    Useful for determining values that are not known or determined until
    query runtime
    You will find the Doumentation and Example in SMOD for Virtual Characterstics and Keyfigures.
    for Documentation and Example.
    Goto Tcode SMOD -> Enter Enhancement as RSR00002 ,Select the Radio button Documentation -> Click on Display
    check the thread for more info...
    what are Virtual Chars & KFs
    virtual char and keyfig

  • Need Avg sales for 90 fiscal days - thru customer exit or Offset  ? ? ? ?

    Hi Frns!
    My current report generates daily sales for fiscal period using a customer exit variable A.
    My requirement now is to have one more column having Average sales for 90 prior fiscal days when i enter a fiscal period thru the same variable A.
    As the customer exit variable is of Selection Options, I'm unable to create Offset for the same.
    Guyz do need ur help on this urgently.
    Cheers! Shana

    Any updates !!!!!!!!!!!!!

  • Help with Customer exit variable

    Hi Guys,
         I need your urgent help. I have a requirement where I need to create a variable (on CALDAY) in a report which should use the input value given for another variable (created on CALMONTH). To put in words more clearly, CALMONTH is a variable that is mandatory for input but the CALDAY variable should not appear on the selection screen. I was told that I should write a customer exit to make this happen. So can someone please explain me the process of creating a customer exit and give me the code.
    WHEN CALMONTH values are selected to be 07/2006 - 08/2006... CALDAY values should be 07/01/2006 to 08/31/2006.
    CALMONTH is user entry, mandatory, range and multiple selection variable.
      Early reply is highly appreciated and duely rewarded. Please let me know if I am not clear about the requirement. Thanks a bunch in advance.

    Let us say, user enters multiple ranges for the month, you would want corresponding date ranges for the same, right?
    data : w_date like sy-datum.
    case I_VNAM.
    when 'ZCALDAY'. " Calday var
    loop at i_t_var_range into LOC_VAR_RANGE         
         where iobjnm = 'ZCALMONTH'.
      WA_RANGE-SIGN = 'I'.     
      wa_date+2(6) = loc_var_Range-low.
      wa_date+0(2) = '01'.
      wa_range-low = wa_date.
      if loc_var_range-high eq space.
        WA_RANGE-OPT = 'EQ'.     
      else.
        wa_range-opt = 'BT'.
        wa_date+2(6) = loc_var_range-high.
        wa_date+0(2) = '01'.
        wa_date = wa_date + 31.
        wa_date+0(2) = '01'.
        wa_date = wa_date - 1.
        wa_range-high = wa_date.
       endif.
       append wa_range to e_t_range. clear wa_range.
    endloop.
    endcase.
    This should do.

  • Code (ABAP) for the Customer Exit Variable (CMOD)

    Scenario
    An employee can purchase any no of policies in a day or month.each policy will have start date and expiry date.
    My requirment
    Count all the policies(valid) by employee on a ranges basis exception reporting
    (0-10;10-20;20-30;30-40) and then able to drill down by policy start date and expiry date.
    As per the requirment is to show policies that employee had with in the give date intreval  which are not yet expired (active) i need to write a condition that will count only policies whose Expiry date is > Current calender day
    As Policy Expiry Date is a char i am converting it to KF using fourmala variable so that i can write a condition on it using current cal day formula variable sap exit
    Requirment:
    Need a code for SAP exit variable which will meet the following requirment
    There are the following 2 variables in the query
    1) A variable (User Input)(Date Range) on Policy Start Date and
    2) Authorisation Variable which is based on Authorisation Object(Analysis Authorisations)
    I need a SAP Exit variable (CMOD) that will
    BAsed on the user entered Policy Start date it has to pick all the policy exiry date of the policies and display all the policies whose expiry date is greate than Sy Date (Current Date) and also if Policy Expiry Date is blank or # it has to display
    Arun supplied me with the below code...but i think it doesn't include blank expiry date or #...as i am new to ABAP please update me with releavent code
    Policy Start Date : ZPST_DTE
    Policy Expiry Date: ZPSP_DTE
    Variable (Type:Customer Exit) on Expiry Date: ZEEXP_DTE
    Arun's Code:
    IF I_STEP = 1.
    CASE V_NAME
    WHEN 'X' " X is the variable u created for the exit
    l_s_range-low = SY-DATUM.
    l_s_range-opt = 'I'.
    l_s_range-sign = 'GT'.
    APPEND l_s_range TO e_t_range.
    END CASE.
    Please modify above code to include Blank or # values of Expiry Date
    Thanks Arun
    Please ask if you need further info as this is urgent
    Thanks

    Hi Arun,
    Thanks for the help...will definetly assign points
    (Closed the previous thread)
    Please spare bit of ur time as this is my first ABAP Code
    Can i include 2 restrictions..# and Variable (Customer Exit)...But how can i include Records with Blank Values
    As the data from Source system the expiry date is filled up with either Date or # or Blank...my requiorment is to include all 3 and
    Question:
    As there are 2 other variables defined ..one on Policy Start Date (User input date intreval) and Location (Authorization Variable..Analysis Authorisations)...Do i need to change I_STEP in the code
    (Req: Reports shows all the(still valid) policies emp has purchased between  2 give date (Variable on Policy Start date)
    IF I_STEP = 1.
    CASE V_NAME
    WHEN 'X' " X is the variable u created for the exit
    l_s_range-low = SY-DATUM.
    l_s_range-opt = 'I'.
    l_s_range-sign = 'GT'.
    APPEND l_s_range TO e_t_range.
    END CASE.

  • Copying  SAP Exit to Customer Exit

    Dear Experts,
            i need to create Customer exit for Clearing Date, Posting Date and netDuedate. For this i am going to copy the SAP EXIT Variables 0p_keydt, 0p_Keyd2, 0p_keyd3, Bcoz i had created Infoset, sothe technical name get changed, So I cant call SAP Exit variables for this new Info Object.
    What I need is Can U please Explain me how to copy these theree variables in to Customer Exit as i am very new to ABAP. After Copying the Code what i need to change to suits my requirement.
    Please help me in this regard as this is very Urgent.
    I ahve tries in searching the previous thread, i just got the Overview alone.
    Thanks in Advance

    Hi,
    I do not know if we can directly convert a SAP exit to a CMOD exit.
    What I was suggesting was that, create a CMOD exit (custom project) and in the coding part you can copy the code from the existing code and replace the varaible names.
    Check this link for more help on CMOD project creation -
    [http://wiki.sdn.sap.com/wiki/display/ABAP/CustomerExits(CMOD)]
    Hope it helps.
    Regards,
    RahulM

  • Over-writting Customer Exit Value

    Hi,
    I've a "customer exit" variable 'Z1', which is allowed "ready for input" as well. Z1 is based on 0FISCPER and I set the variable to current date using customer exit in I_STEP = 1.
    Based on the value contained in Z1, I calculate date ranges for two other customer exit variables 'Z2' and 'Z3' in I_STEP = 2, to make default criteria for report. And reports shows values of Z1, Z2, and Z3 in each column respectively.
    As Z1 is "ready for input", it allows user to enter value and change shows in Z1 column but Z2 and Z3 still being calculated on initial value of Z1.
    Please let me know how it is possible to over-write the initial value? Process flow would be: if user enters any value in Z1 it should ignore the initial values set by customer exit.
    Your urgent help would be highly appreciated.
    Regards,
    Shabbar

    Ali,
    You are on the right path. Calculate the default value of z1 in i_step = 1, and then calculate z2 and z3 in i_step =2. If the user enters the value , then z1 will have the user value.
    -Saket

  • Patch level for customer exits

    Hello Experts,
    What is the patch level required for functioning of customer exits?
    Please inform. Its urgent.
    Regards,
    KS

    Hello,
    If you are coding for TEXT, I worked this by putting the code in Attribute componet, ZXRSRU01.
    same for date, chars
    This is the Exit FM : EXIT_SAPLRRS0_001
    and the include : ZXRSRU01
    Let us check for further replies
    Happy Tony

Maybe you are looking for