Variable declaration in user exit?

Hi,
How can i declare variable in user exit? Is it the same way we declare in report?
Thanks & Regards,
Abhijit

Well Vamshi,
I got a question regarding user_exit. How can u declare the variable in Save_Document_prepare user exit? How can you import or export fields in to that subroutine?  And also if version changed then whether the user exit, customer exit and screen exit will work properly?
Thanks & Regards,
Abhijit
Edited by: Abhijit Mandal on May 4, 2009 11:41 AM

Similar Messages

  • Numeric value variable problem with user exit

    Dear experts,
    I've created a variable (numeric value, user exit) and I want to get the value of variable from an user exit.
    Actually, I want to convert "0calyear" to a number to be albe to calculate (multiplying, dividing etc).
    If there is a possible solution only in FOX, the solution will be the best. However I couldn't find anything.
    So, the next solution I am trying is user-exit. But I am in stuck here.
    The problem is that I have no idea whether the numeric value variable has any sturcture like other variables(char. value) or not. If yes, what structure it has?
    I know, the characterisc value variables have the structure as blow,
        ls_varsel-chanm =
        ls_varsel-seqno =
        ls_varsel-sign  =
        ls_varsel-opt   =
        ls_varsel-low   =
    I've tried several times with the same way like above, but it doesn't work when I call the variable in "BPS0" or "UPSPL".
    How can I solve it? Please let me know.
    I am using SEM_BW 4.00.
    Many Thanks.
    Bruce

    Hi Ravi,
    Sorry, there's a correction. <b>var2 is used for getting the first month of the year selected by the user in var1</b>. If the user doesn't enter a value for var1, then var2 should take first month of current year from var1 which has by default last month of current year (populated in i_step1 from sy-datum). The user can select the value of var1 according to his requirement. Then var 2 should get first month of the year selected. That's why I'm using two exit variables.
    It works fine during the initial run of the query. But when the user clicks on the variable button in the toolbar and executes the query, var1 is not being displayed and an error message <i>No value could be determined for var2</i> is shown. All other variables used in the query are displayed except var1.
    Krzys, Is the option <i>Can be changed in Query Navigation</i>  available for Exit variables. I'll check that and get back to you.
    Boujema, Thanks for the OSS note.
    Thanks
    Hari

  • Calculating with formula variables of type user exit

    I created the following query:
    Rows: Characteristic = Employee
    Column: KYF = Status
    Filter: Year, Month
    The KYF ist a formula containing a formula variable. This variable of type user exit should return a value recording to the value of employee and has to be read in a customizing (data-) table by the user exit.
    Is it possible to read the values of employee row by row from the internal table which contains the amount of data before processing to output screen and fill the 'Status'-KYF or should I create a virtual keyfigure for this case.
    Thanks for all your feedback,
    Angelika

    Hi,
    It seems like Status is master data of Employee.
    As per your process, if you do either formula variable or virtual keyfigure you will face query performance problem. More over you cant simply access record by record characteristic value in formula variable. It will be another complex process like you have to call the characteristic value via replacement path.
    You have the following choices:
    You mentioned master data is availabe in custom table. Try to pull the custom table master data into employee info object. Maintain  status as one of the attribute of the master data. Then you can display Status value simply in the report. This will be global access like you use this Status value n number of info providers which is having Employee as one of the info object in the info provider.
    If the previous way is not possible, include the Status in the info provider level and write a simple update routine to populate the values. This will be info provider level.
    I am not sure whether you are in development environment or productive. If developement, then you can choose simply any one of the above ways.
    Regards,
    Vivek

  • Variable of type user exit

    Hi all,
    I have a variable of type user exit which is used to let the user enter a characteristic value in a popup-box.
    I am able to display the box and let the user enter a value, but then I'm stuck. Where does this value go?? How can I make sure that this value actually is used in the variable??
    I am attaching my current code cause I feel like something is missing with regards to exporting the correct value.
    Thanks and regards,
    TM
    DATA: i_sval Like sval occurs 0 with Header Line.
    data: v_subrc like sy-subrc.
    i_sval-tabname = 'ZASSET_AREA'.
    i_sval-fieldname = 'AREA'.
    i_sval-fieldtext = 'Asset Area'.
    i_sval-field_obl = 'X'.
    append i_sval.
    CALL FUNCTION 'POPUP_GET_VALUES'
    EXPORTING
    NO_VALUE_CHECK = ' '
    POPUP_TITLE = 'Asset Area'
    START_COLUMN = '5'
    START_ROW = '5'
    IMPORTING
    RETURNCODE = v_subrc
    TABLES
    FIELDS = i_sval
    EXCEPTIONS
    ERROR_IN_FIELDS = 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.
    ENDIF.

    Hi,
    From the code you have written, I observe that after capturing the value in the pop-up, you are not passing the value back to the variable table.
    What I would suggest is, pass the variable value to the upc_var_cha_act table explicitly. This might resolve the problem.
    Sunil

  • Variable to find user-exit name???

    Hello everyone,
    I have a simple query for user-exits. Suppose we are executing a main program SAPLZ*** which has multiple user-exits(ZXVV**02, ZXVV**03, ZXVV**04, ZXVV**05), Is there any standard variable defined to know the name of the user-exit currently running or executing?? I tried with variable sy-repid but it gives the name of the main program i.e. SAPLZ***, we are executing and not the name of the user-exit ZXVV**02/03/04...
    Any help would be highly appreciated...

    Thanks Glen, I actually want to know is the name of the exit is captured in any variable. As my motive here is I will be putting a SELECT query in that user-exit and the table will have entries for multiple user-exits. So when selecting the data from table I don't wants to hardcode the exit name in WHERE clause and hence looking forth that is there any variable which captures the exit name automatically, and I can use that variable.
    tried with sy-cprog and sy-repid but they gives the name of the main prog, not useful here.

  • Global data declaration in user exit 'MV45AFZZ ' for VA01

    Hi folks,
    i  am using USEREXIT_PRICING_PREPARE_TKOMP  in MV45AFZZ for VA01 pricing modification.i need to declare one Global internal table for this exit.i tried to do this one in MV45ATZZ.but i can not save as it is asking access key.
      how can i achieve this one?
    ur answers will be rewarded.
    Thanks
    pabi

    Hi Pabitra,
    You can find the parent program and use an enhancement point to declare a global internal table mainly in the top include of the program
    ed: if t-code ABC is executed then the program for the t-code ABC is your parent program...
    Here SAPMV45A is your parent program for VA01
    and in INCLUDE MV45ATOP.
    use ENHANCEMENT-POINT MV45ATOP_02 SPOTS ES_SAPMV45A STATIC. to declare the global internal table
    Once the table is declared,also check in the user exit by debugging if the table is made available..
    i have done the above technique to use an internal table in userexit_save_document after declaring table in the mentioned enhancement point and it worked for me...
    Pls check and revert
    Reward if useful
    Regards
    Byju

  • BPS Attribute as Variable filled with User-Exit

    Hello,
    how is it possible to set a variable from the type "attribute" in BPS with an User-Exit?
    Example: Characteristic = Material, Attribute = Material class
    How can I set valid entries for Material class in a User-Exit?
    Thanks for help in advance
    Eckhard

    Eckhard,
    You can solve this by using characteristic relationship type exit. there you can put a function where you can find the values for the attribute material class.
    greets,
    Jeroen

  • Global Variable in a User Exit

    Folks, I have a small problem. I have a Exit and there are several includes with in the exit. Due to modularization they have written Forms in One Include and actual call is happening at someother include. I need to code in a logic based on a value of variable. The variable is flag which is updated at Form Include.
    I couldnt add the field at the top include and it does not allow me to due a Implicit enhancement at Beginning or the end.
    Can you please suggest how to add this field which could be visible through out the function group.
    Thanks,
    Balakumar

    Hi,
    Access the variable using dynamic referencing.
    constant: field(50) type c value '(program name)flag'.
    here program name is main where variable is declared.
      field-symbols: <flag>.
    * Assign an individual variable
      assign (field) to <flag>.
    if <flag> is assigned.
    endif,

  • BEX User exit variables in WEBI

    Hi Experts,
    Need your help please.
    I have a report in BEX with a user exit variable wich depends on other manual input variable.
    In BEX it works properly but in WEBI it doesn't recognize the user exit variable.
    It displays the error message: Not possible to determine the value for ZPD_YEAR_DAY variable
    Error in DB.​ ​Error message is​:​ ​failure to execute the query ​M​D​X​ ​S​E​L​E​C​T​ ​ ​{​ ​[​M​e​a​s​u​r​e​s​]​.​[​D​9​C​S​1​W​7​F​A​8​F​E​O​H​J​3​T​3​2​H​4​Q​D​Z​4​]​,​ ​[​M​e​a​s​u​r​e​s​]​.​[​D​9​D​H​9​K​1​N​I​T​C​Z​E​4​U​Y​3​J​4​U​A​E​T​Z​4​]​,​ ​[​M​e​a​s​u​r​e​s​]​.​[​D​9​D​H​9​K​1​N​I​T​D​R​2​R​6​P​F​2​K​G​C​U​8​8​W​]​,​ ​[​M​e​a​s​u​r​e​s​]​.​[​D​9​C​S​1​W​7​F​A​8​E​M​Z​V​7​C​H​J​M​V​2​A​Z​P​C​]​,​ ​[​M​e​a​s​u​r​e​s​]​.​[​D​9​C​S​1​W​7​F​A​8​K​0​S​7​H​N​Q​B​O​5​J​A​R​L​S​]​,​ ​[​M​e​a​s​u​r​e​s​]​.​[​D​9​C​S​1​W​7​F​A​8​G​6​D​3​U​V​4​M​I​3​7​5​S​8​W​]​,​ ​[​M​e​a​s​u​r​e​s​]​.​[​D​9​C​S​1​W​7​F​A​8​H​P​Q​C​I​D​R​P​D​B​C​0​K​S​G​]​,​ ​[​M​e​a​s​u​r​e​s​]​.​[​D​9​C​S​1​W​7​F​A​8​I​H​E​Y​U​5​3​8​S​X​E​F​Z​2​8​]​,​ ​[​M​e​a​s​u​r​e​s​]​.​[​D​9​D​H​2​8​D​W​V​F​6​7​4​2​E​6​4​Z​O​L​8​F​X​3​4​]​ ​}​ ​ ​O​N​ ​C​O​L​U​M​N​S​ ​,​ ​N​O​N​ ​E​M​P​T​Y​ ​C​R​O​S​S​J​O​I​N​(​ ​C​R​O​S​S​J​O​I​N​(​ ​C​R​O​S​S​J​O​I​N​(​ ​C​R​O​S​S​J​O​I​N​(​ ​C​R​O​S​S​J​O​I​N​(​ ​C​R​O​S​S​J​O​I​N​(​ ​C​R​O​S​S​J​O​I​N​(​ ​C​R​O​S​S​J​O​I​N​(​ ​C​R​O​S​S​J​O​I​N​(​ ​ ​{​ ​[​0​C​A​L​Y​E​A​R​]​.​[​2​0​1​0​]​ ​}​ ​,​ ​ ​{​ ​[​0​H​A​P​_​D​O​C​_​I​D​_​_​Z​A​P​_​S​U​B​S​T​]​.​[​5​0​]​,​ ​[​0​H​A​P​_​D​O​C​_​I​D​_​_​Z​A​P​_​S​U​B​S​T​]​.​[​7​0​]​ ​}​ ​ ​)​,​ ​[​0​I​N​F​O​P​R​O​V​]​.​[​L​E​V​E​L​0​1​]​.​M​E​M​B​E​R​S​ ​)​,​ ​[​Z​D​A​T​E​_​A​T​]​.​[​L​E​V​E​L​0​1​]​.​M​E​M​B​E​R​S​ ​)​,​ ​ ​{​ ​[​Z​C​P​M​]​.​[​X​]​ ​}​ ​ ​)​,​ ​[​Z​P​R​O​M​O​C​A​O​]​.​[​L​E​V​E​L​0​1​]​.​M​E​M​B​E​R​S​ ​)​,​ ​[​Z​R​E​S​P​_​A​V​L​_​_​Z​N​I​V​_​C​A​R​R​]​.​[​L​E​V​E​L​0​1​]​.​M​E​M​B​E​R​S​ ​)​,​ ​[​Z​R​E​S​P​_​A​V​L​]​.​[​L​E​V​E​L​0​1​]​.​M​E​M​B​E​R​S​ ​)​,​ ​[​Z​N​I​V​_​C​A​R​R​]​.​[​L​E​V​E​L​0​1​]​.​M​E​M​B​E​R​S​ ​)​,​ ​[​0​E​M​P​L​O​Y​E​E​]​.​[​L​E​V​E​L​0​1​]​.​M​E​M​B​E​R​S​ ​)​ ​D​I​M​E​N​S​I​O​N​ ​P​R​O​P​E​R​T​I​E​S​ ​M​E​M​B​E​R​_​N​A​M​E​,​ ​M​E​M​B​E​R​_​C​A​P​T​I​O​N​,​ ​[​0​E​M​P​L​O​Y​E​E​]​.​[​2​0​E​M​P​L​O​Y​E​E​]​,​ ​[​0​E​M​P​L​O​Y​E​E​]​.​[​4​0​E​M​P​L​O​Y​E​E​]​,​ ​[​0​H​A​P​_​D​O​C​_​I​D​_​_​Z​A​P​_​S​U​B​S​T​]​.​[​2​0​H​A​P​_​D​O​C​_​I​D​_​_​Z​A​P​_​S​U​B​S​T​]​,​ ​[​Z​R​E​S​P​_​A​V​L​]​.​[​2​Z​R​E​S​P​_​A​V​L​]​ ​O​N​ ​R​O​W​S​ ​F​R​O​M​ ​[​Z​A​V​D​P​_​M​0​1​/​Z​P​D​_​G​P​S​_​V​A​R​I​A​V​E​L​_​0​0​2​]​ ​ ​with error:​ Not possible to determine the value for ZPD_YEAR_DAY variable​.​ ​(​W​I​S​ ​1​0​9​0​1​)
    This ZPD_YEAR_DAY variable​ is the user exit variable.
    Thanks in advance,
    José Simões

    Hi!
    I am following up to this post to see if there is something I am missing.
    We have bex query with user exit variable and webi bi4sp04.4
    In bex the user exit variable works correctly, in webi, it is ignored  (the webi results are not filtered as they are in bex web results)
    I have tried moving the variable to the char restrictions and removed ready for input - so there are now no prompts in bex query.
    I have reviewed note 1611185 as well as other info on restrictions of BICS and webi, but cannot find a clear answer if bex user exit variables are supported in BI4 clients or not.
    Lee Lewis

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

  • User exit code required for manadatory variable

    we have vendor in rows  and sales in columns, the requirement is there is a mandatory  variable for retrieving the sales between months, that is if
    customer gives calmonth january as <b>from</b> and march as<b> to</b> the sales should be from Jan to March, if the customer only gives <b>from</b> month and nothing for<b> to</b> month, only <b>from</b> month should be calculated, if the customer gives only<b> to</b> month and no <b>from</b> month, the <b>to</b> month should be calculated. Remember the variable is mandatory.

    Hi,
    Let s say
    var1 is from varaible
    var2 is to variable
    var3 is user exit variable
    USe the code like this:
    DATA:
    l_s_range TYPE rsr_s_rangesid,
    l_s_var TYPE rrs0_s_var_range.
    DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.
    DATA: LOC_VAR_RANGE2 LIKE RRRANGEEXIT.
    WHEN 'VAR3'.
        IF I_STEP = 2.
          LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
            WHERE VNAM = 'VAR1'.
          LOOP AT I_T_VAR_RANGE2 INTO LOC_VAR_RANGE
            WHERE VNAM = 'VAR2'.
            CLEAR L_S_RANGE.
            L_S_RANGE-LOW = LOC_VAR_RANGE-LOW(8).
            L_S_RANGE-HIGH = LOC_VAR_RANGE2-LOW(8).
    IF LOC_VAR_RANGE2(8) = '00000000'.
            L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW(8).
    ENDIF.
    IF LOC_VAR_RANGE(8) = '00000000'.
            L_S_RANGE-LOW = LOC_VAR_RANGE2-LOW(8).
    ENDIF.
            L_S_RANGE-SIGN = 'I'.
            L_S_RANGE-OPT  = 'BT'.
            APPEND L_S_RANGE TO E_T_RANGE.
          EXIT.
          ENDLOOP.
          EXIT.
          ENDLOOP.
        ENDIF.
    With rgds,
    Anil Kumar Sharma .P

  • How to find if 1000 variables have user exit or not

    Hi could you please let me know  any table
    to find if a list of variables In bex have a user exit or not .
    actually i have 7000 variables and want to document if these variables have a user exit or not for Reporting Documentation
    Wuld really appreciate your help
    Thanks and regards
    Novino

    Hi,
    See following tables related to Rpeorts, so check in that tables to find the Variables and properties
    Use RSZGLOBV table and there give OBJVERS = A and VPROCTP = 3 or 4 then execute it and se eth variables, all that are SAP/Customer Exit varaibles.
    RSZELTDIR Directory of the reporting component elements
    RSZELTTXT Texts of reporting component elements
    RSZELTXREF Directory of query element references
    RSRREPDIR Directory of all reports (Query GENUNIID)
    RSZCOMPDIR Directory of reporting components
    RSZRANGE Selection specification for an element
    RSZSELECT Selection properties of an element
    RSZELTDIR Directory of the reporting component elements
    RSZCOMPIC Assignment reuseable component <-> InfoCube
    RSZELTPRIO Priorities with element collisions
    RSZELTPROP Element properties (settings)
    RSZELTATTR Attribute selection per dimension element
    RSZCALC Definition of a formula element
    RSZCEL Query Designer: Directory of Cells
    RSZGLOBV Global Variables in Reporting
    Thanks
    Reddy

  • Questions about authorization variable customer user exit

    Dear all,
    To reduce the authorization maintenance effort, I found from the web that we can use authorization variable with customer user exit RSR00001.
    When I use the transaction CMOD to display the maintain the user exit RSR00001, the user exit does not found. I would like to know how can I use thie user-exit?
    My SAP version is R/3 4.7
    The information of authorization variable  from web is as follow:
    http://help.sap.com/saphelp_nw04/helpdata/en/6d/58f438114ee836e10000000a114084/frameset.htm
    Would anyone have some ideas to solve my questions?
    Many thanks
    Sunny
    Edited by: LI Sunny on Aug 3, 2010 12:08 PM

    Dear Bala Duvvuri,
    Firstly, many thanks of your reply.
    Actually, what I want to do is to call some user-exit when performing authorization checking. I want to add some logic to the authorization checking and the user exit can be called automatically when performing authorization checking.
    I mainly use this checking in the FI module.
    Are there any ways I can perform this checking?
    One more findings, I have another machine containing SAP XI, I can search the user exit RSR00001. but it doesn't exit in SAP R/3 4.7. Is it version issue or my SAP R/3 4.7 doesn't contain the BI module?
    Many Thanks again.
    Sunny

  • Information on user exits

    hi all ,
           i want to learn user exits , how to  use them and what are the uses of user exit ... can any one tell me the best link or documentation to learn user exits from the basics..
    it will be great favour and person will be rewarded with points
    Thanks and regards
    nikesh kumar

    check the foll link,
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    also refer
    http://www.sap-img.com/abap/what-is-user-exits.htm
    Creating menu exits
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/19762743b111d1896f0000e8322d00/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/83/7a18cbde6e11d195460000e82de14a/frameset.htm
    For screen exits.
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    chech these links for user exists its usefull
    http://www.allsaplinks.com/user_exit.html
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/561602545a11d1a7020000e829fd11/frameset.htm
    http://www.sap-basis-abap.com/sapab013.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    refer
    just refer to the link below for step by step procedure with screen shots
    http://www.sapmaterial.com/?gclid=CN322K28t4sCFQ-WbgodSGbK2g
    Check this link:
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975e643b111d1896f0000e8322d00/frameset.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/52/670ba2439b11d1896f0000e8322d00/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb2d40358411d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/10/e7dbde82ba11d295a40000e8353423/content.htm
    http://fuller.mit.edu/tech/dialog_programming.html
    http://sap.mis.cmich.edu/sap-abap/abap09/index.htm
    http://sap.mis.cmich.edu/sap-abap/abap09/sld011.htm
    Also, refer this:
    Overview
    R/3 provides three "customization spots" that allow you to enhance FI/CO features without modifying the standard code. Although often collectively referred to as "user exits," two of the three have different names. SAP Enhancements are used to expand the standard functionality within SAP. Enhancements use function modules and are called from the standard SAP code. Each module in the system has a set of delivered enhancements that help companies expand the standard functionality where they need it. Enhancements were new in release 3.0.
    The Open FI Interfaces or Business Transaction Events are also used to expand the standard functionality within SAP. These events are defined in the IMG. Business Transaction Events were new in release 4.0. They are not available for all modules and are not called on all integrated transactions into FI as of release 4.5B. This will change with each release and should be retested.
    The older User Exits in FI/CO are "Z" programs that are defined in table T80D for client-dependent user exits, and in table T80I for client-independent user exits. These are also used to expand the standard functionality within the FI/CO modules. These User Exits have been available since the early releases of SAP. All of these FI/CO User Exits are listed in this document in the Configuring User Exits (Older). The list is included because these User Exits are not a part of the Enhancements or Business Transaction Events and do not have an Info System for searching.
    Benefits• Standard SAP functionality can be enhanced without modification to the standard code.
    • Upgrades do not erase the functionality and it does not have to be re-transported or re-entered into the system. The enhancements should be thoroughly tested when upgrading to ensure the system will still work as implemented.
    Configuring SAP Enhancements
    Basic Steps in Configuring an Enhancement
    • Find the appropriate Enhancement.
    • Enter the ABAP code in the "Z" program within the function module.
    • Create a project.
    • Add the Enhancement to the project.
    • Activate the project.
    Example Business Scenario for Enhancements
    Company A has a requirement to validate all customer master records created with a U.S. address. The U.S. entity reports on the industry field on the customer master. This is only a U.S. requirement and should not be required for the other countries, so the field status would not work. To accomplish this requirement, Company A will need to set up an Enhancement for the customer master transaction. The necessary steps are detailed below with screenprints. This example was configured in a 4.6C system.
    Detailed Steps
    1. Tools ABAP Workbench Utilities Enhancements Definition Utilities List Enhancements
    2. Do not execute this without any parameters! There are too many Enhancements and it will probably time out. You’re searching for a customer master exit. Enter mast in the short text (see Figure 1). You’ll start there. Searching for an exit can be tricky, so make sure you try several things before giving up.
    3. Execute the search.
    Start Your Search for a Master Exit Here
    4. Look through the list until you find the Enhancement for User exits: Customer Master Data.
    5. Double-click on the enhancement SAPMF02D. This will take you to the details of the Enhancement and list the function modules included in the Enhancement.
    6. To continue, double-click on the function module EXIT_SAPMF02D_001
    7. This will take you to the source code for the function module. Click on the Import tab to review the tables/fields that are available for the Enhancement
    The Tables That Are Available for the Enhancement
    8. To view the tables/fields that can be changed in the function module, click on the Export and Changing tabs. For this function module, these tabs are empty because you can only validate data. You cannot change any fields in this enhancement.
    9. Return to the Source Code tab.
    10. Scroll down until you see the Include statement in the program. The "Z" program listed after the Include is where your code will be written
    Your Program Will Begin After the Include Statement
    11. Double-click on the Include. You will be prompted to create the include. Click on Yes to create.
    12. At this point you will be prompted to enter a development class and to create a transport request. If you do not know which development class to use, please contact your technical team.
    13. Enter the following ABAP code into the program
    User exit to ensure that all US customers have a group key
    entered on the customer master.
    if i_kna1-land1 = 'US' and
    i_kna1-brsch = ' '.
    message e001(F2).
    endif.
    The ABAP Code You Need to Enter
    14. Note that the table name matches the table name in the import tab tables.
    15. In this example you are using the standard message class F2 with message number 001. Normally, you will create your own message within your own message class. All customer message classes must begin with a "Z" and are created in transaction SE91.
    16. Save the program.
    17. The next step is to create the project. Go to transaction code CMOD or follow menu path: Tools ABAP Workbench Utilities Enhancements Project Management.
    18. Enter the project name; begin the name with a "Z."
    19. Click on the Create button.
    Click on Create After You Type in the Project Name
    20. Enter in a description for the project.
    21. Click on the Enhancement Assignments button.
    22. You will be prompted to save the enhancement. Click on Yes.
    23. At this point you will be asked for a development class and to create a transport for the project. You may use the same one created when adding the ABAP code to the function module.
    24. Enter the name of the enhancement SAPMF02D (see Figure 6).
    Enter the Name of the Enhancement Here
    25. Save the project.
    26. Back out of the enhancement assignment.
    27. Activate the project by hitting the Activate button.
    The SAP Enhancement is ready to be tested! Try creating a customer with U.S. as the country and a blank group key. Be sure to test one with a group key to make sure the message is not displayed in error as well.
    Configuring Business Transaction Events
    Basic Steps in Configuring an Event
    • Make sure the application is active for Business Transaction Events.
    • Copy the sample interface function module into a "Z" function module.
    • Enter the ABAP code into the source code section of the new "Z" function module. You may choose to create a "Z" program to enter the code into and then insert the "Z" program into your function module source code.
    • Activate the function module.
    • Assign the function module to the event, country and application.
    Example Business Scenario for Business Transaction Events
    Company A would like to copy the group key field from the vendor master into the allocation field on all the line items within a vendor invoice and payments, including the vendor lines. This requirement assumes only one vendor is posted to in a document.
    To accomplish this requirement, Company A will use the Business Transaction Event 1130, Post Document: SAP Internal Field Substitution.
    1. IMG Menu Path: Financial Accounting Financial Accounting Global Settings Use Business Transaction Events Environment Infosystem (Processes).
    2. Find the correct Business Event. You are updating a field, so you select the Processes Info System instead of the Publish and Subscribe Info System.
    3. Execute the search with the defaults.
    4. Find the correct interface for updating a document: Post Document: SAP- Internal Field Substitution
    Find the Correct Interface for the Business Event
    5. Put your cursor on the event and click on the Sample Function Module button.
    6. You are now in transaction SE37 – Function Builder. This is the function module (sample_process_00001130) you will need to copy into a "Z" name function module for your coding
    Figure 8. This Is the Function Module You Need to Copy Your "Z" Name Function Module
    7. Click on the Copy button.
    8. Enter the "Z" function module name in the To Function Module field
    9. Enter a Function Group. If you need to create a "Z" function group, go to transaction code SE37 and follow menu path: Go to Function Groups Create Group. A function group is a logical grouping of function modules, and the ABAP code is generated for function groups. You will be prompted for a development class and transport when creating the function group.
    Enter Your "Z" Function Module Name Here
    10. In Function Builder (transaction SE37), enter the new "Z" function module. Click on the Change button.
    11. The system will default into the source code screen where you may enter your ABAP code.
    12. Notice the tables available for the code. Additional tables may be declared if necessary.
    13. Enter the following source code
    tables: lfa1.
    data: z_groupkey like lfa1-konzs.
    z_groupkey = ' '.
    loop at t_bseg.
    check for vendor lines. If one is found, read the vendor master and
    retrieve the group key field.
    if t_bseg-koart eq 'K'.
    select single konzs from lfa1 into z_groupkey
    where lifnr = t_bseg-lifnr.
    endif.
    Move the group key field into all line items allocation field.
    loop at t_bsegsub.
    t_bsegsub-zuonr = z_groupkey.
    modify t_bsegsub index sy-tabix.
    endloop. "t_bsegsub
    endloop. "t_bseg
    The Screen Where You Enter Your Source Code
    14. Save the function module.
    15. Back out to the main Function Builder screen by clicking on the green arrow button.
    16. Activate the function module by clicking on the Activate button
    . Activate the Function Module from This Screen
    17. Assign the function module to the event in the IMG: Financial Accounting Financial Accounting Global Settings Business Transaction Events Settings Process Function Modules of an SAP Appl.
    18. Hit enter past the warning messages that this is SAP data.
    19. Click on the New Entries button.
    20. Enter the process for your interface. In your example it is 00001130.
    21. Enter the country the interface is valid for. If it is valid for all countries, leave this field blank.
    22. Enter the application the interface should be called for. If it should be called for all applications, leave this field blank. Please note that not all integrated transactions are programmed to go through these interfaces! You will need to test to find out!
    23. Enter the new "Z" function module
    Enter Your New "Z" Function Module Here
    24. Save the settings. At this point you will be prompted for a CTS number for the configuration change.
    25. The Business Transaction Event is complete! You are ready for testing.
    Configuring User Exits (Older)
    Basic Steps in Configuring an User Exit
    • Create a "Z" program for the User Exits and enter the necessary ABAP code.
    • Enter the new program name into table T80D.
    • Configure the application to call the User Exit.
    List of User Exits
    • Variable Field Movements
    • Substitutions in FI, CO, PCA
    • Validations in FI, CO, PCA
    • Rollups in SPL
    • Fixed Field Movements in SPL
    • Cost Center Summarization on Detail Screen
    • Sets Formula Variables
    Example Business Scenario for User Exits
    Company A would like to add a "Z" field in the Special Purpose Ledger to capture a Business Unit field for reporting. They have used all the standard SAP fields such as Business Area and Profit Center. The field will only be used for reporting and is only needed in the Special Purpose Ledger. You created a special ledger table (ZZSPL1) with field Z_BUNIT and need to populate this field based on a combination of G/L account, fund and functional area.
    To accomplish this requirement, Company A will use the Variable Field Movement User Exit. To make maintenance easier, table ZZBUSUNIT was created with the G/L account, fund and functional area fields as key fields, and the business unit field as a non-key field. You generated the table maintenance so the table could be updated using transaction SM30. SAP users update the business unit determination rules in table ZZBUSUNIT by entering the G/L account, fund and functional area, and then the business unit that combination should be posting to. The User Exit will read table ZZBUSUNIT using the G/L account, fund and functional area from the posting transaction and determine the business unit. The steps for using the user exit are detailed below. This example was created on a 4.6C system.
    1. Copy the delivered template User Exit program RGIVU000_TEMPLATE into a "Z" program. Follow menu path Tools ABAP Workbench Development ABAP Editor (transaction code SE38). In early releases, the delivered program was RGIVU000.
    2. You will be prompted for a development class and a transport. Please check with the technical team for the correct development class.
    3. At the initial ABAP Editor screen, enter your new "Z" program name, select the Source Code button and click on Change
    To Enter Your New Code, Select Source Code and Click on the Change Button
    4. Enter the following code in the User Exit (Figure 14):
    FORM E01_MVC USING FROM_FIELD TO_FIELD.
    to_field = 'CORP'. "Set a default business unit.
    read table zzbusunit to determine the business unit field.
    select single z_bunit from zzbusunit into to_field
    where hkont = accit_glx-hkont and
    geber = accit_glx-geber and
    fkber = accit_glx-fkber.
    ENDFORM.
    Figure 14. Enter Your New Code at This Screen.
    5. Activate the program by clicking on the Activate button.
    6. Change the configuration in the User Exit table to point to your new "Z" program.
    7. Follow the IMG menu path: Financial Accounting Special Purpose Ledger Basic Settings User Exits Maintain Client Specific User Exits.
    8. The entry to maintain is application area GIMV: Variable Field Movement. Enter your "Z" program
    Enter Your "Z" Program in the Application Area GIMV: Variable Field Movement
    9. Save the changes.
    10. The final configuration step is to assign the User Exit in the variable field movement for your special ledger table. In the IMG: Financial Accounting &#61664; Special Purpose Ledger &#61664; Basic Settings &#61664; Master Data &#61664; Maintain Field Movements. Field movements control how the fields in a special ledger table are populated. They can be populated straight from other fields in a posting or through User Exits.
    After You Assign the Business Unit Field and the G/L Account, the Exit Field Should Contain U01.
    11. Assign the business unit field as a receiver and the G/L account as the sender. The Exit field should contain U01 (see Figure 16).
    12. The User Exit number U01 calls User Exit E01_MVC form in the "Z" program.
    13. Save the field movement.
    14. You are ready to test your User Exit!
    Reward points if useful.

  • User exits & varients in SAP

    hi
      i want to know conceptually what are User Exits and  varients , what is the purpose of using these .
       iAftr learing that i want to a practical example on both topics then , if any one have some good material on these plz send me on [email protected]
    thanx

    Hi
    User Exits in FI/CO
    R/3 provides three "customization spots" that allow you to enhance FI/CO features without modifying the standard code. Although often collectively referred to as "user exits," two of the three have different names. SAP Enhancements are used to expand the standard functionality within SAP. Enhancements use function modules and are called from the standard SAP code. Each module in the system has a set of delivered enhancements that help companies expand the standard functionality where they need it. Enhancements were new in release 3.0.
    The Open FI Interfaces or Business Transaction Events are also used to expand the standard functionality within SAP. These events are defined in the IMG. Business Transaction Events were new in release 4.0. They are not available for all modules and are not called on all integrated transactions into FI as of release 4.5B. This will change with each release and should be retested.
    The older User Exits in FI/CO are "Z" programs that are defined in table T80D for client-dependent user exits, and in table T80I for client-independent user exits. These are also used to expand the standard functionality within the FI/CO modules. These User Exits have been available since the early releases of SAP. All of these FI/CO User Exits are listed in this document in the Configuring User Exits (Older). The list is included because these User Exits are not a part of the Enhancements or Business Transaction Events and do not have an Info System for searching.
    Benefits
    •     Standard SAP functionality can be enhanced without modification to the standard code.
    •     Upgrades do not erase the functionality and it does not have to be re-transported or re-entered into the system. The enhancements should be thoroughly tested when upgrading to ensure the system will still work as implemented.
    Configuring SAP Enhancements
    Basic Steps in Configuring an Enhancement
    •     Find the appropriate Enhancement.
    •     Enter the ABAP code in the "Z" program within the function module.
    •     Create a project.
    •     Add the Enhancement to the project.
    •     Activate the project.
    Example Business Scenario for Enhancements
    Company A has a requirement to validate all customer master records created with a U.S. address. The U.S. entity reports on the industry field on the customer master. This is only a U.S. requirement and should not be required for the other countries, so the field status would not work. To accomplish this requirement, Company A will need to set up an Enhancement for the customer master transaction. The necessary steps are detailed below with screenprints. This example was configured in a 4.6C system.
    Detailed Steps
    1.     Tools   ABAP Workbench   Utilities   Enhancements   Definition   Utilities   List Enhancements
    2.     Do not execute this without any parameters! There are too many Enhancements and it will probably time out. You’re searching for a customer master exit. Enter mast in the short text (see Figure 1). You’ll start there. Searching for an exit can be tricky, so make sure you try several things before giving up.
    3.     Execute the search.
    Figure 1. Start Your Search for a Master Exit Here
    4.     Look through the list until you find the Enhancement for User exits: Customer Master Data.
    5.     Double-click on the enhancement SAPMF02D. This will take you to the details of the Enhancement and list the function modules included in the Enhancement.
    6.     To continue, double-click on the function module EXIT_SAPMF02D_001
    7.     This will take you to the source code for the function module. Click on the Import tab to review the tables/fields that are available for the Enhancement (see Figure 2).
    Figure 2. The Tables That Are Available for the Enhancement
    8.     To view the tables/fields that can be changed in the function module, click on the Export and Changing tabs. For this function module, these tabs are empty because you can only validate data. You cannot change any fields in this enhancement.
    9.     Return to the Source Code tab.
    10.     Scroll down until you see the Include statement in the program. The "Z" program listed after the Include is where your code will be written (see Figure 3).
    Figure 3. Your Program Will Begin After the Include Statement
    11.      Double-click on the Include. You will be prompted to create the include. Click on Yes to create.
    12.      At this point you will be prompted to enter a development class and to create a transport request. If you do not know which development class to use, please contact your technical team.
    13.     Enter the following ABAP code into the program (Figure 4):
    User exit to ensure that all US customers have a group key
    entered on the customer master.
    if i_kna1-land1 = 'US' and
    i_kna1-brsch = ' '.
    message e001(F2).
    endif.
    Figure 4. The ABAP Code You Need to Enter
    14.      Note that the table name matches the table name in the import tab tables.
    15.      In this example you are using the standard message class F2 with message number 001. Normally, you will create your own message within your own message class. All customer message classes must begin with a "Z" and are created in transaction SE91.
    16.     Save the program.
    17.     The next step is to create the project. Go to transaction code CMOD or follow menu path: Tools   ABAP Workbench   Utilities   Enhancements   Project Management.
    18.     Enter the project name; begin the name with a "Z."
    19.     Click on the Create button.
    Figure 5. Click on Create After You Type in the Project Name
    20.      Enter in a description for the project.
    21.      Click on the Enhancement Assignments button.
    22.      You will be prompted to save the enhancement. Click on Yes.
    23.      At this point you will be asked for a development class and to create a transport for the project. You may use the same one created when adding the ABAP code to the function module.
    24.     Enter the name of the enhancement SAPMF02D (see Figure 6).
    Figure 6. Enter the Name of the Enhancement Here
    25.     Save the project.
    26.     Back out of the enhancement assignment.
    27.     Activate the project by hitting the Activate button.
    The SAP Enhancement is ready to be tested! Try creating a customer with U.S. as the country and a blank group key. Be sure to test one with a group key to make sure the message is not displayed in error as well.
    Configuring Business Transaction Events
    Basic Steps in Configuring an Event
    •     Make sure the application is active for Business Transaction Events.
    •     Copy the sample interface function module into a "Z" function module.
    •     Enter the ABAP code into the source code section of the new "Z" function module. You may choose to create a "Z" program to enter the code into and then insert the "Z" program into your function module source code.
    •     Activate the function module.
    •     Assign the function module to the event, country and application.
    Example Business Scenario for Business Transaction Events
    Company A would like to copy the group key field from the vendor master into the allocation field on all the line items within a vendor invoice and payments, including the vendor lines. This requirement assumes only one vendor is posted to in a document.
    To accomplish this requirement, Company A will use the Business Transaction Event 1130, Post Document: SAP Internal Field Substitution.
    1.     IMG Menu Path: Financial Accounting   Financial Accounting Global Settings   Use Business Transaction Events   Environment   Infosystem (Processes).
    2.     Find the correct Business Event. You are updating a field, so you select the Processes Info System instead of the Publish and Subscribe Info System.
    3.     Execute the search with the defaults.
    4.     Find the correct interface for updating a document: Post Document: SAP- Internal Field Substitution (see Figure 7).
    Figure 7. Find the Correct Interface for the Business Event
    5.     Put your cursor on the event and click on the Sample Function Module button.
    6.     You are now in transaction SE37 – Function Builder. This is the function module (sample_process_00001130) you will need to copy into a "Z" name function module for your coding (see Figure 8).
    Figure 8. This Is the Function Module You Need to Copy Your "Z" Name Function Module
    7.     Click on the Copy button.
    8.     Enter the "Z" function module name in the To Function Module field (see Figure 9).
    9.     Enter a Function Group. If you need to create a "Z" function group, go to transaction code SE37 and follow menu path: Go to   Function Groups   Create Group. A function group is a logical grouping of function modules, and the ABAP code is generated for function groups. You will be prompted for a development class and transport when creating the function group.
    Figure 9. Enter Your "Z" Function Module Name Here
    10.     In Function Builder (transaction SE37), enter the new "Z" function module. Click on the Change button.
    11.     The system will default into the source code screen where you may enter your ABAP code.
    12.     Notice the tables available for the code. Additional tables may be declared if necessary.
    13.     Enter the following source code (see Figure 10):
    tables: lfa1.
    data: z_groupkey like lfa1-konzs.
    z_groupkey = ' '.
    loop at t_bseg.
    check for vendor lines. If one is found, read the vendor master and
    retrieve the group key field.
    if t_bseg-koart eq 'K'.
      select single konzs from lfa1 into z_groupkey
        where lifnr = t_bseg-lifnr.
    endif.
    Move the group key field into all line items allocation field.
    loop at t_bsegsub.
      t_bsegsub-zuonr = z_groupkey.
      modify t_bsegsub index sy-tabix.
    endloop. "t_bsegsub
    endloop. "t_bseg
    Figure 10. The Screen Where You Enter Your Source Code
    14.     Save the function module.
    15.     Back out to the main Function Builder screen by clicking on the green arrow button.
    16.     Activate the function module by clicking on the Activate button (see Figure 11).
    Figure 11. Activate the Function Module from This Screen
    17.     Assign the function module to the event in the IMG: Financial Accounting   Financial Accounting Global Settings   Business Transaction Events   Settings   Process Function Modules   of an SAP Appl.
    18.     Hit enter past the warning messages that this is SAP data.
    19.     Click on the New Entries button.
    20.     Enter the process for your interface. In your example it is 00001130.
    21.     Enter the country the interface is valid for. If it is valid for all countries, leave this field blank.
    22.     Enter the application the interface should be called for. If it should be called for all applications, leave this field blank. Please note that not all integrated transactions are programmed to go through these interfaces! You will need to test to find out!
    23.     Enter the new "Z" function module (see Figure 12).
    Figure 12. Enter Your New "Z" Function Module Here
    24.     Save the settings. At this point you will be prompted for a CTS number for the configuration change.
    25.     The Business Transaction Event is complete! You are ready for testing.
    Configuring User Exits (Older)
    Basic Steps in Configuring an User Exit
    •     Create a "Z" program for the User Exits and enter the necessary ABAP code.
    •     Enter the new program name into table T80D.
    •     Configure the application to call the User Exit.
    List of User Exits
    •     Variable Field Movements
    •     Substitutions in FI, CO, PCA
    •     Validations in FI, CO, PCA
    •     Rollups in SPL
    •     Fixed Field Movements in SPL
    •     Cost Center Summarization on Detail Screen
    •     Sets Formula Variables
    Example Business Scenario for User Exits
    Company A would like to add a "Z" field in the Special Purpose Ledger to capture a Business Unit field for reporting. They have used all the standard SAP fields such as Business Area and Profit Center. The field will only be used for reporting and is only needed in the Special Purpose Ledger. You created a special ledger table (ZZSPL1) with field Z_BUNIT and need to populate this field based on a combination of G/L account, fund and functional area.
    To accomplish this requirement, Company A will use the Variable Field Movement User Exit. To make maintenance easier, table ZZBUSUNIT was created with the G/L account, fund and functional area fields as key fields, and the business unit field as a non-key field. You generated the table maintenance so the table could be updated using transaction SM30. SAP users update the business unit determination rules in table ZZBUSUNIT by entering the G/L account, fund and functional area, and then the business unit that combination should be posting to. The User Exit will read table ZZBUSUNIT using the G/L account, fund and functional area from the posting transaction and determine the business unit. The steps for using the user exit are detailed below. This example was created on a 4.6C system.
    1.     Copy the delivered template User Exit program RGIVU000_TEMPLATE into a "Z" program. Follow menu path Tools   ABAP Workbench   Development   ABAP Editor (transaction code SE38). In early releases, the delivered program was RGIVU000.
    2.     You will be prompted for a development class and a transport. Please check with the technical team for the correct development class.
    3.     At the initial ABAP Editor screen, enter your new "Z" program name, select the Source Code button and click on Change (see Figure 13).
    Figure 13. To Enter Your New Code, Select Source Code and Click on the Change Button
    4.     Enter the following code in the User Exit (Figure 14):
    FORM E01_MVC USING FROM_FIELD TO_FIELD.
    to_field = 'CORP'. "Set a default business unit.
    read table zzbusunit to determine the business unit field.
    select single z_bunit from zzbusunit into to_field
       where hkont = accit_glx-hkont and
        geber = accit_glx-geber and
        fkber = accit_glx-fkber.
    ENDFORM.
    Figure 14. Enter Your New Code at This Screen.
    5.     Activate the program by clicking on the Activate button.
    6.     Change the configuration in the User Exit table to point to your new "Z" program.
    7.     Follow the IMG menu path: Financial Accounting   Special Purpose Ledger   Basic Settings   User Exits   Maintain Client Specific User Exits.
    8.     The entry to maintain is application area GIMV: Variable Field Movement. Enter your "Z" program (see Figure 15).
    Figure 15. Enter Your "Z" Program in the Application Area GIMV: Variable Field Movement
    9.     Save the changes.
    10.     The final configuration step is to assign the User Exit in the variable field movement for your special ledger table. In the IMG: Financial Accounting &#61664; Special Purpose Ledger &#61664; Basic Settings &#61664; Master Data &#61664; Maintain Field Movements. Field movements control how the fields in a special ledger table are populated. They can be populated straight from other fields in a posting or through User Exits.
    Figure 16. After You Assign the Business Unit Field and the G/L Account, the Exit Field Should Contain U01.
    11.     Assign the business unit field as a receiver and the G/L account as the sender. The Exit field should contain U01 (see Figure 16).
    12.     The User Exit number U01 calls User Exit E01_MVC form in the "Z" program.
    13.     Save the field movement.
    14.     You are ready to test your User Exit!

Maybe you are looking for

  • New ABAP ENGINE NSP  6.40 and BSP error

    Hi, after a clean new install that went nearly perfect, I'll managed to get a license and a developer key (Kudo's to all who worked on the new release, the new system looks really like a smooth runner). I'll activated the BSP services with SICF, stil

  • In regards to typing in snow leopard what has taken over the spell checking task

    in regards to typing in snow leopard what has taken over the spell checking task?

  • Kernel panics with external mouse in clamshell mode

    Have had more than 6 kernel panics; usually after waking; always in clamshell mode when using a Logitech wireless mouse (with or w/o software loaded) or Kensington USB trackball (with driver loaded but not worth using w/o driver). Does not happen wit

  • Problems bitmap filters FlashBuilder 4.7 / Air3.4 - Help!

    Yesterday, I purchased and installed FlashBuilder 4.7, 64 bit windows version. With it, I built my project for ios, and installed an export release (air3.4 for ios) on my IPad 1 for testing. Two "unforgivable" problems showed up: 1. Most of the artwo

  • A Private Message

    Someone with the username ejike.jesus1 sent me a private message saying: Hello my name is Miss Daliyah, I saw your profile here on Skype, i have something important to tell u i don't have much time to chat, please contact my email immediately so that