Steps for Variable User Exit

Hi All,
I have to do some coding in my variable exit. I have followed the follwing steps to create a project a write the code. Anyone please confirm if my steps are correct or missing anything.
1. Go to CMOD, give project name and Click on create.
2. Enhancements -> give RSR00001. and click on Components.
3. Double click on 'EXIT_SAPLRRS0_001'. This will bring up the functionmodule in which we can find an include.
4. Double click on 'ZXRSRU01' Include.
5. Press Enter for the warning message.
6. It gave me a message saying that 'the Include doesnot exist, Do you want to create it'. Click Yes. This will bring up a blank ABAP editor.
7. Write the required code using CASE Statement.
Am I missing anything here?
I would be grateful if someone can send me any documents relating to the variable User Exits.
Best Rgds,
James.

Hi,
Directly go se38 and execute ZXRSRU01 program. Then write a case statement. below is the sample code to calculate default year month variable.
case v_name.
  when 'ZYRMTH'.
    if i_step = 1.
      read table i_t_var_range
      with key vnam = 'ZYRMTH'
           into ld_s_var_range.
      if sy-subrc ne 0.   " no value exists, assigns default
        c_year = sy-datum(4).
        c_month = sy-datum+4(2).
        if c_month = 1.
          c_year = c_year - 1.
          c_month = 12.
        else.
          c_month = c_month - 1.
        endif.
        concatenate c_year c_month into c_monyr.
        l_s_range-low = c_monyr.
        clear e_t_range.
        l_s_range-sign = 'I'.
        l_s_range-opt  = 'EQ'.
        append l_s_range to e_t_range.
      endif.
    endif. 
endcase.
Regards,
Malli

Similar Messages

  • Problem with step 2 in user exit.

    Hello collegues,
    I have a problem with the variables user exit in the bex analyzer. I have created a variable user exit and this is used as user authorization, and this variables is optional and enabled to entry . When i debugg the user exit, i put the break point in the step 1, in the step 0 and in the step 2, i can check the step1 and 0 but in the step 2 don´t stop. 
    Why does this happen?
    Thanks for your collaboration.

    Variable enabled to entry are not are not candidate to step 2. This step is only called once per exit variable not enabled to entry.
    Regards,
    Fred

  • Determine which validation step called the user exit, possible?

    Hello all,
    We have a a validation with different steps that use the  same user exit in their respective check.
    My functional analyst asked me if there is a way to programmatically determine in the user exit which step is executing the user exit.
    So I am asking the same question here.
    As an example:
    Validation FI100 has step 001,  002, and 003.
    Each of these steps use the user exit U100 from module pool ZGGBR001 in their check.
    I haven't found a way in the code of U100 to determine which step called U100.
    Does anyone know if this can be done?
    I have used the following technique to get a variable from the program's call stack.
    data: var_name(30) type c value '(Z_CALLING)VARIABLE' .
    field-symbols: <fs> type any.
      assign (var_name) to <fs>.
      write: / 'Variable from Z_CALLING', <fs>.
    But I'm not sure how this might work with validation steps/user exits.
    Thanks
    Bruce

    Vinod,
    I did some debugging after I posted my question.  I came to the same solution, use FM 'SYSTEM_CALLSTACK'.
    VALCHCK_2FI100##001
    loop at i_callstack into w_callstack
                        where EVENTNAME+0(9) = 'VALCHCK_2'.
    FI110 is the validation
    001    is the step
    Thomas,
    Thanks for the caveats. 
    Bruce

  • Filters with variables user-exits on queries

    Is it possible to define complex selection criteria by using the EXIT_SAPLRRSO_001?. Something similar to what we may do a select for Sap:
    Select * from table where ((field1 = value1 and field2 = value2) or (field1 = value3 and field2 = Value4)).
    I guess not, it seems that only allows a range for output as a single variable ...
    If this is not possible, is there any way to filter the data before the show?. I do not care who is among the infoprovider and Bex, who between Bex and Excel ...
    Filters with variables user-exits on queries

    The variable can take any combination that can be specified in a select-option. The criteria used to select these values to be populated for the variable can be as complex as any ABAP program. So all combinations in a select statement are allowed.

  • How can i do a variable User exit that present the values before execute

    Hi Gurus,
    How can i do a variable User exit that present the values before execute, i need this:
    a variable that calculate SYS-DATUM until 30 days before (I got the code) but this  variable run automatic because is user exit, i want this variable but first present the values, not execute automatic, this is because the users want the report that automatic present the values , help

    Hi,
    Refer the below links,
    http://documentation.softwareag.com/natural/nat424mf/pdf/ops_mf/conf_usrex.pdf
    http://www.erpgenie.com/component/content/article/1097
    http://www.apentia-online.at/UP/Apentia/files/Article/SAP_BW_User_Exits_and_BAdIs.pdf
    Hope it helps you,
    Regards,
    Ravindra.

  • General Steps in Creating User Exits

    Can someone give me outline of the Steps involved in Userexits...

    For information on Exits, check these links
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    http://www.planetsap.com/userexit_main_page.htm
    Raja T
    Message was edited by:
            Raja Thangamani

  • Selection screen values in global variable user exit

    Hi all,
    I made a project report global variable of type 3 (User Exit) and I develop the related code in enhancement KKDR0001 component EXIT_SAPLKYP1_003. In this code I need the value of project definition that user entered on selection screen.
    Does anybody know how can I get this data?
    Thanks!

    Hi,
    You can do the following for getting project in Earlier screen
    Data: l_string(20) type c
    Field-symbols: <fs> type any.
    l_string = '(Screen)variable name'.
    assign l_string to <FS>.
    Just try above...

  • Variable user exit question

    Hi all,
    i m looking for a code to make an User exit variable  to select the actual month and the previous month , for example in this moment ( september and October )

    Hi,
    Use Tcode: CMOD, funtion module :EXIT_SAPLRRS0_001 double click on the program ZXRSRU01, start writing ur code. The code which i gave u is for Calculate Month to date, similarly u have change the code as per ur requirement.
    Regarding User exits:
    http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a56f5e09411d2acb90000e829fbfe/frameset.htm
    to calculate "month to date" user input is "Calday" Key Date
    sample code:
    WHEN 'ZPUTMNTH'.
    IF I_STEP = 2. "after the popup
    LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
    WHERE VNAM = 'ZPDATE'.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW = LOC_VAR_RANGE-LOW(6). "low value, e.g.YYYYMM (200606) part of key date (20060625)
    L_S_RANGE-LOW+6(2) = '01'. “ low value e..g. YYYYMM01 (20060601)
    L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW. "high value = input
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'BT'.
    APPEND L_S_RANGE TO E_T_RANGE.
    EXIT.
    ENDLOOP.
    ENDIF.

  • Formula variable user exit.

    Hello experts;
    I will provide max points for help with this.
    In query designer can I access a key figure from another cube and use it in a formula?
    I cannot use multi-cube in this solution so I was looking into creating a formula variable using a user exit to access a key figure stored in a different cube.
    Ex:
    I have a Tracings cube with customer and material cost information.
    I need to calculate the cost per patient for Absorbent material.
    I can get the customer cost for Absorbent material but the number of patients is stored in a different cube called Census information.
    Since the Census information is not related to a material (only customer) I cannot get the number of patients together with the cost of the absorbent material. I was hoping to access the Census information (number of patients) from the query calculating the cost per patient.
    Thanks
    Den

    I really don't see how you can implement it using exit variable even if you can read data from other cube in exit. If you still want to explore it, refer the following thread - How to read data from an InfoCube in BI 7.0?
    Why can't you build a multiprovider - these kind of requirements are precisely the reason why multiprovider is there (when you need information present in multiple infoproviders in the same report)

  • Steps to create user exit Macro

    Hello,
    Can any share the step by Step procedure to create user exit macro for APO DP planning book.
    Regards,
    Manish

    Hi Manish,
    Please see OSS note 418801.
    Regards,
    Alexander

  • What is the name of the table for finding user exit !

    What is the table name to find the user exit !

    Hi,
    Goto to the table tstc and enter the transaction code for
    which u want to find out the User-Exits. Check out the
    program name from the result. Goto SE38 and dee that
    program in display mode. Then search for the string Call
    Cutomer-Funtion. All the result of search are the user
    exits defined there for that transaction.
    SAP user exits (enhancement names that we see in SMOD transaction) are all stored in the table MODSAP. The field NAME contains the enhancement name and the field MEMBER contains the name of the function module that will be called if the customer enhancement exists and is active. The customer enhancement projects are stored in the table MODACT. There, the NAME field is the name of the project and MEMBER is the name of SAP enhancement (that from the MODSAP).
    So, if you are in some include, you can use where-used-list to get to the function module name. Then you find the SAP enhancement name from the MODSAP by supplying the function module. And finally, you find the customer enhancement projects by querying the MODACT with the SAP enhancement in the field MEMBER.
    cheers,
    vasavi.
    kindly reward if helpful.

  • Error in creating include for the user exit "EXIT_SAPMP56T_002"

    Hi,
    "treat it as high priority"
    when i db click on the include i am got the follwing error message :-
    Program names ZX... are reserved for includes of exit function groups
    Message no. DS027
    Diagnosis
    You attempted to create a program name beginning with ZX but this name range is reserved only for includes of exit function groups (function groups containing only function exits).
    If you want to create a program ZXaaabbb, note the following for program type I (Include).
    1. The program is an include of the function group Xaaa:
    In this case, the INCLUDE ZXaaabbb statement should not be inserted in the main program SAPLXaaa, but in the program ZXaaaZZZ .
    2. The program is not an include of the function group Xaaa:
    Since the syntax check for includes of this name range searches for the global data in the program LXaaaTOP (not ZXaaaTOP), you may not be able to check the include in isolation (--> check main program).
    Procedure
    Choose a different program name.
    cld u please help me out how to further proceed...
    awaiting for u r replies...
    apprecitaed with points...
    regards,
    ravi ganji

    Hello,
    1)That is not Error msg it is just warning - first db click then press enter if there is any msg again press enter off course all these things will happen only your user exit Active.
    2)see the import,export and changing parameters if you are new to user exit let us know which user exit you are trying to use.
    **********Poorna*********

  • Problem in triggering the code for CO02 User Exit

    Hi,
    I am using the code for the Tcode CO02 (User Exit) and i am facing a problem that when i am using the code as a normal program it is executing fine and displaying the pop up window and showing the data in it.
    But when i am using that code in the USER EXIT code it is not trigerring that pop up window.
    I am using the enhancement:-
    *PPCO0007 * - Exit when saving production order
    And the include in which i am writing the code is :-
    INCLUDE ZXCO1U06
    plzz provide me guidelines for solving this problem.

    hi ,
    i am using the following: -
    Enhancement No.  ->  PPCO0007 (Exit when saving production order)
    When i click on the enhancement the following is displayed:-
    Function exit  ->   *EXIT_SAPLCOZV_001 *
    When i double click the function exit  the code i had written in the following include:-
    INCLUDE ZXCO1U06
    plzz tell me whether i am doing it right or worng?

  • ABAP program to search for FM/User-Exit lookups

    Hi everyone,
    I have a need to find any and all Function Modules and User Exits that may have been written in BW that are used to do a lookup of data from one InfoProvider to another.   I have found the following program from Lijo John which works for Update Rules and Transfer Rules but I need the same type program that digs into Function Modules, DTP's and any other User-Exit type code where a lookup could be performed.   These are noted as the limitations in the program Lijo John created and I was hoping maybe someone has a solution for these as well.
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/bi/abapprogramtofindBIlookupsandcodePatterns
    If someone has a program that they could share that would do this it would be greatly appreciated.  
    Thank you,
    Dave

    Thank you Ashish.  This was somewhat helpful.   I guess if there isn't an ABAP program available like I need then the next best thing would be for me to know the BW table names that holds the actual Function Module and DTP source code so that I can then create my own ABAP program that would query them for the existence of the InfoProvider name anywhere in the code. 
    The goal with all of this is to find ANY lookup from ANYWHERE in BW for a specific InfoProvider so that we will know what will have to be "disconnected" if we decide to get ride of that specific InfoProvider. 
    So, if anyone can tell me the tables that contain the BW Function Module and DTP ABAP source code I would appreciate it.
    Thank you,
    Dave

  • Enhancement for a User Exit

    Hi Experts.
    Can anyone tell me how to know the enhancement for a particular user-exit.
    Rgds,
    Simran

    Hi,
    If you know the User-Exit name for eg:EXIT_SAPFP50M_002, Goto SE11 and check the table MODSAPVIEW giving this (EXIT_SAPFP50M_002) in the MEMBER field, you will find the Enhacement Name in the Name filed.
    But is the thing you need to know or finding an user exit for a SAP transaction..?
    SK

Maybe you are looking for

  • Outlook Mail is Malfunctioning in Mail App, Running Mavericks

    I downloaded Mavericks back in June, and I haven't had any problems with my Outlook mail in the Mail App until the past couple of days. Some of the problems I'm having include:           - Duplicate emails in my "Sent" mailbox           - Emails will

  • How to play VIDEO_TS.VOB files?

    I have a tv show that I would like to watch on my MacBook Air. I inserted the DVD in my external dvd drive and an image of a cd showed up on my desktop. I opened it and it had two folders (AUDIO_TS and VIDEO_TS). The AUDIO_TS folder is empty but the

  • 11g Application Navigator

    Both Eclipse and Netbeans have support for cut/copy/paste and dragging and dropping files in the project explorer. Are there any plans for JDeveloper to support this? Is there a way to simply copy a file to another project without going to the file s

  • Can only start up in "safe boot"

    Yesterday my iMacG5 (Mac OS X Leopard) started making a loud noise (fan) and would not respond to mouse/keyboard, so we shut it off manually. Since then the only way I can start it is in "safe boot" mode by holding down the shift key during start up.

  • My apple tv worked fine till i got new Panasonic 55 plasma. now the tv doesnt recognized the hdmi unless i unplug and replug the apple tv.

    my gen 2 apple tv worked fine on my 5 yo Panasonic Viera with HDMI cable. i bought new 55 inch Panasonic and new hdmi cables. the apple tv works fine but...if i turn off the tv and leave it off for a while, then try to watch apple tv, the apple tv is