Scenerios for using I_STEP parameter for creating customer exit variables.

Hi All,
I need to create a customer exit variable.
Please explain the different scenerios for using each i_step parameters.
For eg. in which practical scenerio i_step 3 is used?

Hi Shobhit,
You can find plenty of info on this in the forums, So i suggest you to do a small search with imp Key words. Anyways below is the std usage of I_STEP
I_STEP = 1
Call takes place directly before variable entry. Can be used to pre populate selection variables
I_STEP = 2
Call takes place directly after variable entry. This step is only started up when the same variable is not input ready and could not be filled at I_STEP=1.
I_STEP = 3 In this call, you can check the values of the variables. Triggering an exception (RAISE) causes the variable screen to appear once more. Afterwards, I_STEP=2 is also called again.
I_STEP = 0
The enhancement is not called from the variable screen. The call can come from the authorization check or from the Monitor. This is where you want to put the mod for populating the authorization object.
This is basic info from help.sap.com.
regards,
Gaurav
Edited by: Gaurav Kothari on Aug 4, 2011 2:18 PM

Similar Messages

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

  • Query - Replacement Path for a Customer Exit Variable

    Hi
    New to the field and the board.  Any and All help is greatly appreciated.
    I have created a query which runs based on a date selection. The query have few customer exit variables whose values are set in ABAP. All Key Figures in the query are brought depending on the date ranges that each of the CE returns. Ex - one column is sales for first 10 days, 2nd for second 10 days, 3rd for first quarter, 4th for 2nd quarter and such.  There are about 20 - 25 columns with KF in the query and all are Customer Exit date driven.
    The challenge:- Each column heading should have the name of the month. I tried using Replacement Path. But it works when the selection is based on a constant value but not on value based on variable which is a customer exit. Ex - If I say restrict Cal/Month for July 2013, the replacement path for the Col Heading works fine. But if I say restrict Cal/Month for "ZVAR_SecondQtr_First_Month" the replacement path doesn't work.
    Help Please
    Thanks
    Vidya

    In the text variable that you are using , i guess you have a replacement path. In this instead of using your characteristic for specifying how the value has to replace, use the variable option and give the variable name there
    http://help.sap.com/saphelp_nw70/helpdata/EN/43/565cd22fc95f6ce10000000a1553f6/content.htm
    Hope it helps
    Regards,
    Rathy

  • Looking for an ABAP-code for the customer-Exit Variable

    Hello,
    I have defined a Variable (Interval) which should be processed through Customer-Exit on characteristic Supplier-Date (date format). This Customer-Exit Variable is called ZDATE.
    We have another time characteristic Fiscal year / period (0FISCPER) which has single mandatory input variable for ex.  003.2011. This input variable is called ZFISCPER.
    Now I have to write an ABAP-Code where the customer exit variable ZDATE is derived (fiscal last year to last period) from input variable ZFISCPER in INCLUDE ZXRSRU01.
    Means when the input variable (ZFISCPER) is 003.2011 then the customer exit variable ZDATE should be calculated in INCLUDE ZXRSRU01 as 01.01.2010 u2013 28.02.2011 (fiscal last year to last period).
    Since I am quite new in ABAP, I will be grateful if you could write me sample ABAP for this.
    Many thanks.

    Hi,
    should be something like:
    DATA: l_s_range TYPE rsr_s_rangesid,
    input LIKE sy-datum.
    When 'ZDATE'
    CONCATENATE '0101' 0FISCPER+3(4)-1 into l_s_range-low. "You get 01012010
    CONCATENATE '01' Fiscper+1(6) into input.                            "You get 01032011
    l_s_range-high = input-1.                                                     "You get 28022011
    APPEND l_s_range TO e_t_range.
    Greetings
    Roman

  • 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

  • How to create customer exit variable

    Hi guys,
    please any one can help for how to create customer exit variabel.
    Regards.

    Hi!
    welcome to SDN.
       its very simple.just go to Bex query designer. there u can use the following <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/ac/789b3c4d4d8d15e10000000a114084/content.htm">Link</a> to create a variable.. but use the processing type user exit.
    after that go to transaction SE37 in BW and opent he function module EXIT_SAPLRRS0_001
    and in that there is a include  ZXRSRU01.... just double click on it and edit that...
    there u can write code for your variable ,...for example write code inside
    case "ZMY_VARIABLE"
    *code for ur variable
    endcase
    u can use the following
    <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/f1/0a56f5e09411d2acb90000e829fbfe/content.htm">link for help</a>

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

  • Need logic to find Year to Date for customer exit variable

    Hi to all,
    I am creating customer exit variable for query .
    query should display data according to current system year from jan till current system date.
    here senario is like that user never enter year and query will automatically will fetch the data according to current year starting from jan to current system date.
    example.
    current year 2010 and today is system date is sep 29 2010, so query will display data from jan 2010 to current data sep 29 2010.
    please can any one provide me logic for that.
    any code .
    regards
    pavneet rana

    Hi,
    You need to create the characteristic customer exit variable of type select-options. Restrict your keyfigure based on this variable.
    In the logic in CMOD,
    write as below
    i_step =2.
    case i_vnam.
    When 'exit variable'.
    temp = sy-datum+0(4).
    concatenate temp '0101' into temp1.
    l_s_range-low= temp1.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'BT'.
    l_s_range-high= sy-datum.
    append APPEND l_s_range TO e_t_range.
    endcase.
    For any further help on customer exit based variable, please refer below article.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20f119d9-922d-2c10-88af-8c016638bd90?quicklink=index&overridelayout=true
    Edited by: Rahul K Rai on Sep 29, 2010 3:09 PM

  • ABAP code Help for Customer Exit variable

    Hello All,
    Can anyone provide ABAP code for a customer exit variable please?
    Requirement:
    0CALYEAR(InfoObject) - ZCALCYR (Variable) <b>Calender year with default value actual year</b>.
    Proiperties of variable: single value,mandatory,ready for input,can'be changed in query navigation.
    i have read some docs on customet exit variables which i got from SDN but i found it's difficult for me to get this as i am not that good in ABAP.
    Thanks,
    Rakesh.

    Hi,
       Just check the below code. You just need to make slight changes I believe. Hope this helps you.
    In CMOD………..
    Sample code
      INCLUDE LXRSRF01                                                   *
    data: l_s_range type rsr_s_rangesid.
    case i_vnam.
      when 'ZCALCYR'.
        if i_step = 1.
         l_s_range-low = sy-datum+0(4).
            append l_s_range to e_t_range.
        Endif.
    Endcase.

  • How to create Customer exit ?

    Hello,
    I am new to BI 7 and working on same.
    I wanted to create a Customer exit as per the requirements for a Text variable so as to do proper display.
    Can any one suggest step by step to do that .
    I use T code in Bi server
    What i see are the option of
    New project etc.
    But i dont see any option for Customer exit.
    Can any one provide step by step guide or some thorough example for creating Customer exit , it will be really helpful.
    Thanks

    if you are looking for BEx user exit.. Go to CMOD .. you need to create a project say for eg: ZBIVAREX. Assign enhancement as RSR00001 (BI: Enhancements for Global Variables in Reporting).
    go thru the example given :
    http://help.sap.com/saphelp_nw04s/helpdata/en/1d/ca10d858c2e949ba4a152c44f8128a/content.htm

  • Create customer exit on 0calday

    Hi ,
    My requirement is i have to create customer exit variable on 0calday(characterstic). Default this value to current Monday of the week and popup to user.Validate User input with the Monday of the week.If its not a Monday give an error asking to enter Monday of that week
    For ex: if i give date like 20.09.2007 it should display from starting of the week (i.e monday) to till that date.
    PLz give me the instructions how to create
    Thanks and Regards,
    Madhavi

    The below code will check wether the user input is monday or not. If it is not monday it will identify the monday's date in that week.
    DATA: WEEKDAY LIKE SCAL-INDICATOR.
    CALL FUNCTION 'DATE_COMPUTE_DAY'
                    EXPORTING
                    DATE   = <calday>
               IMPORTING
                    DAY    = WEEKDAY
               EXCEPTIONS
                    OTHERS = 1.
          CASE WEEKDAY.
            WHEN '1'.  "Mon
              RESULT = <calday>.
            WHEN '2'.  "Tue
              RESULT = <calday> - 1.
            WHEN '3'.  "Wed
              RESULT = <calday> - 2.
            WHEN '4'.  "Thur
              RESULT = <calday> - 3.
            WHEN '5'.  "Fri
              RESULT = <calday> - 4.
            WHEN '6'.  "Sat
              RESULT = <calday> - 5.
            WHEN '7'.  "Sun
              RESULT = <calday> - 6.
          ENDCASE.

  • Customer Exit Variable - Sunday of Last Week

    Hi experts,
    I have written the following code for a customer exit variable. I created a formula variable in BEx called ZV_SUNLASTWEEK. I am then returning the result of this formula variable as a calculated key figure. The expected behaviour is that based on the current date (system date) I will return the date of the sunday of the previous. For example, if I run the report today (19th Jan) I would get the 16.01.2011. However, I get 00/00/0000. Any ideas please?!
    WHEN 'ZV_SUNLASTWEEK'.
    Data: zfdcw TYPE datum.
    CALL FUNCTION 'BWSO_DATE_GET_FIRST_WEEKDAY'
      EXPORTING
        date_in         = sy-datum
      IMPORTING
        date_out        = zfdcw
      EXCEPTIONS
        date_invalid    = 1
        others          = 2.
    IF sy-subrc <> 0.
    ENDIF.
    CLEAR l_s_range.
    l_s_range-low  = zfdcw - 1.
    *l_s_range-high = sy-datum.
    l_s_range-sign = 'I'.
    l_s_range-opt  = 'EQ'.
    APPEND l_s_range TO e_t_range.
    ENDCASE.

    Try using the below code...
    WHEN 'ZV_SUNLASTWEEK'.
    Data: zfdcw TYPE dats,
    l_currentdate type dats,
    l_date type sy-datum.
    l_currentdate = sy-datum.
    CALL FUNCTION 'BWSO_DATE_GET_FIRST_WEEKDAY'
      EXPORTING
        date_in         = l_currentdate
      IMPORTING
        date_out        = zfdcw
      EXCEPTIONS
        date_invalid    = 1
        others          = 2.
    IF sy-subrc  0.
    ENDIF.
    CLEAR l_s_range.
    l_date = zfdcw.
    l_date = l_date - 1.
    l_s_range-low  = l_date.
    l_s_range-sign = 'I'.
    l_s_range-opt  = 'EQ'.
    APPEND l_s_range TO e_t_range.
    ENDCASE.
    rgds, Ghuru

  • Customer Exit Variable

    Hi Experts,
    Good Morning all.
    I am using BI 7.0 Reporting, Customer Exit  variable where should be check, which place available, how to build the abap code.
    How to used customer exit varaible, which scenerio, how to work.
    Please provide the solutions ASAP.
    Thanks & Regards,
    Vijaay.

    Hi ,
    Customer exists are used when you want to populate values in restriction dynamically. Like for example you want to your report to run for the current date. At that time you can write a customer exit variable which will fetch the system date and pass that value to report.
    check this below link
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20f119d9-922d-2c10-88af-8c016638bd90?quicklink=index&overridelayout=true
    Hope this will help.
    -Jaimin

  • Customer Exit variable on Hierarchy Node

    Hello Experts
    I am in the process of creating a Customer Exit variable on a Hierarchy node. This will be populated at run time based on the value of a Characteristic variable.
    The Hierarchy is activated and included in the roes of the report. I would like the end result to be exactly the same as it would if I had manually entered a variable in Hierarchy node variable
    I have written exits before for Characteristic variables, however, I am unable to get this to work for Hierarchy Node variables. Please find below the code I have prepared so far. I follow the approach of creating a seperate executable program for each Customer Exit variable. This Program will be called by the Exit.
    DATA: l_s_range TYPE rrrangesid.
      DATA:l_s_var_range TYPE rrrangeexit.
      FIELD-SYMBOLS : <fs_var_range> TYPE rrrangeexit.
      IF i_step = 2.
        READ TABLE i_t_var_range
        ASSIGNING <fs_var_range>
        WITH KEY vnam = 'ZMO_WBS_LVL2'.  " Characteristic variable
        IF sy-subrc = 0.
          l_s_range-low = <fs_var_range>-low.
         l_s_range-high = '0HIER_NODE'.*
          l_s_range-sign = 'I'.
          l_s_range-opt = 'EQ'.
          APPEND l_s_range TO e_t_range.
        endif.
      endif.
    I would be obliged if anyone can help me understand what is being overlooked. The Query is presently returning "No Applicable data found"
    Thanks in advance
    Regards
    Zubin Kurian

    Hello
    I have made the changes. Please refer the Code below for reference. This code will function display only those Nodes at and below the WBS element(s) that were entered into the variable ZMM_WBS_ELEMT
    IF i_step = 2.
      SORT i_t_var_range BY VNAM.
        LOOP AT i_t_var_range ASSIGNING <fs_var_range>
             WHERE
                  VNAM = 'ZMM_WBS_ELEMT'. " Multiple Value, & Mandatory
           IF <fs_var_range> IS ASSIGNED.
             CLEAR: l_s_range.
                l_s_range-low  = <fs_var_range>-low.
                l_s_range-high = '0WBS_ELEMT'.
                l_s_range-sign = 'I'.
                l_s_range-opt  = 'BT'.
                APPEND l_s_range TO e_t_range.
                ZVAR_COUNT = 1.
           ENDIF.
        ENDLOOP.
    Edited by: Zubin Kurian on May 10, 2011 4:38 PM

  • 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

Maybe you are looking for

  • Music DVD

    Can I download music from a music DVD,  to iTunes (on a PC), then on to my iPoc classic? If so, how? Thanks

  • My iphoto 09 won't open' ?

    ?error message says I made changes using a newer version and must use new version to open. I have deleted and reinstalled iLife09 from disc and downloaded all software updates for iphoto8.

  • Finding the transaction of an abap runtime error

    hello, is it possible to find out the corresponding transaction to an abap runtime error? till now i've got all informations like they are shown in ST22 in my abap program. but i'd also like to have the transaction code, not only the corresponding de

  • How do i install photoshop elements 8 from a bundle?

    I have a photoshop/premiere elements 8 bundle pack. Premiere has installed, but whenever i try to intall photoshop, it only offers me a 30 day trial. As things stand the premiere program was a bonus. Photoshop is the progam I wanted most of all. Plea

  • How to "re install"???

    My old computer died. I bought a new one (Mac). I was able to "migrate" from the old computer, but now a couple of applications are missing pieces. How do I re-install without un-installing first?