Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

User Exits:

Simha_
Product and Topic Expert
Product and Topic Expert
0 Likes
567

HiAll,

Can u provide some examples on all types of User-Exits.

Transaction and the type of exit present in it.

Ex: Whether it is a field exit, scren exit or menu exit.

I'm on version 4.7E .

Plesae provide the examples on each type of exit..

just for tutorial purpose..

I didnt find tutorial for this..

Cheers,

Simha

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
525

Hi,

You can go to SMOD Transaction Code and go into any standard project, then view its components then you can fin there which are the Function Exit, Screen Exit, Table Exit etc.

Thanks,

Prashant Singhal

4 REPLIES 4
Read only

Former Member
0 Likes
526

Hi,

You can go to SMOD Transaction Code and go into any standard project, then view its components then you can fin there which are the Function Exit, Screen Exit, Table Exit etc.

Thanks,

Prashant Singhal

Read only

Former Member
0 Likes
525

SAP creates customer exits with transaction SMOD. From these customer exits, customers then use transaction CMOD to choose the enhancements they want to process, assign them to enhancement projects, edit the components, and activate the relevant projects.

Types of Exits

There are several different types of customer exits. Each of these exits acts as hooks where you can attach or "hang" your own add-ons.

Menu Exits

Menu exits add items to the pulldown menus in standard SAP applications. You can use these menu items to call up your own screens or to trigger entire add-on applications.

SAP creates menu exits by defining special menu items in the Menu Painter. These special entries have function codes that begin with "+" (a plus sign). You specify the menu item’s text when activating the item in an add-on project.

Screen Exits

Screen exits add fields to screens in R/3 applications. SAP creates screen exits by placing special subscreen areas on a standard R/3 screen and calling a customer subscreen from the standard screen’s flow logic.

Function Module Exits

Function module exits add functions to R/3 applications. Function module exits play a role in both menu and screen exits. When you add a new menu item to a standard pulldown menu, you use a function module exit to define the actions that should take place once your menu is activated. Function module exits also control the data flow between standard programs and screen exit fields.

SAP application developers create function module exits by writing calls to customer functions into the source code of standard R/3 programs. These calls have the following syntax: CALL CUSTOMER-FUNCTION ‘001’.

An add-on project contains a series of exits, as well as the add-ons that you develop to attach to these exits (like menu entries or function modules). To create an add-on project from within the ABAP Workbench menu, choose Utilities ® Enhancements ® Project management.

Before you begin defining a project, you need to decide which application, application component, or specific standard transaction you would like to add your own functionality to. Give your project a name that indicates the type of functions it contains and that shows which transactions are affected. It may be useful to agree upon a company-wide naming convention for enhancement projects.

There are two factors you need to keep in mind when you create an add-on project. First, you can include an SAP enhancement package and the customer exits it contains in one project only. The same SAP enhancement may not appear in two separate customer projects.

Second, in order to make your add-ons, such as menu items or screen fields, appear in standard R/3 applications, you must activate your add-on project. When you activate a project, all of the add-ons created within this project are activated as well. For this reason, you should ensure that the exits you include in your project contain functions that can be activated simultaneously. It is not possible to activate exits individually.

After you have specified the name of your new project, proceed as follows:

Choose Create.

Describe the nature of the project by providing a short descriptive text.

Choose Save.

The system then prompts you to assign a change request. This assignment allows you to transport the project and its components into a productive system once you have completed it.

Specify which SAP enhancement packages you want to include in your project by choosing SAP enhancements.

Enter the names of these SAP enhancements in the spaces provided.

You should choose enhancement packages that logically belong together. For example, if you are planning to use several enhancements that deal with Materials Management modules, you can include all of these enhancements in the same project. If you are working on enhancements that deal with different applications, or if the enhancements are not logically related, you should include these enhancements in separate projects.

Once you have identified the SAP enhancements you want to include in your project, you can begin adding your own functions to the exits offered in the enhancements. To display the individual components of the SAP enhancements, return to the main screen of the Project Management transaction and choose Enhancement components The system displays all of the exits included in the enhancements assigned to your project.

After you have attached add-on functionality to the exits in your project, you need to activate the project. Activating a project turns on all your add-ons. You also need to activate your project after you have transported it from a development system into a productive system.

When you activate your project, the system turns on all add-ons that the project contains. You cannot activate individual add-ons separately. To activate an add-on project, proceed as follows:

Call the Project management transaction.

Choose Activate project.

The system displays a message confirming that the project was activated.

You can now call up any standard SAP transaction that contains an exit you used in your add-on project. The newly added add-on function(s) should appear.

If you need to make changes to any of your add-ons, you must first deactivate the project that contains that add-on. Deactivating a project turns off all of that project’s add-ons. To deactivate an add-on project, proceed as follows:

Call the Project management transaction.

Choose Deactivate.

The system confirms that the project was deactivated.

Once the project is turned off, you can make changes to the project’s add-ons or build new functions and attach them to other exits in the project

You can find the same in help.sap.com

http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm

http://www.sapgenie.com/abap/code/abap26.htm

Read only

Former Member
0 Likes
525

Simha,

Use the below code for finding a user-exit. It will take you to the COMOD transaction and further to the User-exit.

Also check this link for all the list and some help.

www.easymarketplace.de/userexit.php

help.sap.com/saphelp_46c/helpdata/ en/1c/f62c7dd435d1118b3f0060b03ca329/content.htm

Rgds,

TM.

REPORT zuserexit NO STANDARD PAGE HEADING.
TABLES : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
TABLES : tstct.
DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
DATA : field1(30).
DATA : v_devclass LIKE tadir-devclass.
PARAMETERS : p_tcode LIKE tstc-tcode OBLIGATORY.

SELECT SINGLE * FROM tstc WHERE tcode EQ p_tcode.
IF sy-subrc EQ 0.
  SELECT SINGLE * FROM tadir WHERE pgmid = 'R3TR'
                   AND object = 'PROG'
                   AND obj_name = tstc-pgmna.
  MOVE : tadir-devclass TO v_devclass.
  IF sy-subrc NE 0.
    SELECT SINGLE * FROM trdir WHERE name = tstc-pgmna.
    IF trdir-subc EQ 'F'.
      SELECT SINGLE * FROM tfdir WHERE pname = tstc-pgmna.
      SELECT SINGLE * FROM enlfdir WHERE funcname =
      tfdir-funcname.
      SELECT SINGLE * FROM tadir WHERE pgmid = 'R3TR'
                         AND object = 'FUGR'
                         AND obj_name EQ enlfdir-area.

      MOVE : tadir-devclass TO v_devclass.
    ENDIF.
  ENDIF.
  SELECT * FROM tadir INTO TABLE jtab
                WHERE pgmid = 'R3TR'
                  AND object = 'SMOD'
                  AND devclass = v_devclass.
  SELECT SINGLE * FROM tstct WHERE sprsl EQ sy-langu AND
                                   tcode EQ p_tcode.
  FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
  WRITE:/(19) 'Transaction Code - ',
       20(20) p_tcode,
       45(50) tstct-ttext.
  SKIP.
  IF NOT jtab[] IS INITIAL.
    WRITE:/(95) sy-uline.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    WRITE:/1 sy-vline,
           2 'Exit Name',
          21 sy-vline ,
          22 'Description',
          95 sy-vline.
    WRITE:/(95) sy-uline.
    LOOP AT jtab.
      SELECT SINGLE * FROM modsapt
             WHERE sprsl = sy-langu AND
                    name = jtab-obj_name.
      FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
      WRITE:/1 sy-vline,
             2 jtab-obj_name HOTSPOT ON,
            21 sy-vline ,
            22 modsapt-modtext,
            95 sy-vline.
    ENDLOOP.
    WRITE:/(95) sy-uline.
    DESCRIBE TABLE jtab.
    SKIP.
    FORMAT COLOR COL_TOTAL INTENSIFIED ON.
    WRITE:/ 'No of Exits:' , sy-tfill.
  ELSE.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(95) 'No User Exit exists'.
  ENDIF.
ELSE.
  FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
  WRITE:/(95) 'Transaction Code Does Not Exist'.
ENDIF.

AT LINE-SELECTION.
  GET CURSOR FIELD field1.
  CHECK field1(4) EQ 'JTAB'.
  SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).
  CALL TRANSACTION 'SMOD' AND SKIP FIRST   SCREEN.

Read only

Former Member
0 Likes
525

HI

GOOD

THERE IS A REPORT IN WWW.ITTOOLBOX.COM WHICH WILL GIVE YOU ALL THE USEREXITS OF EACH AND EVERY TCODES.

OTHER THAN THAT HERE WITH I AM GIVING SOME LINKS WHICH WILL GIVE YOU SOME BRIEF IDEA ABOUT THE USEREXITS.

BUT I DONT HAVE ANY EXAMPLSE WHICH CAN SOLVE YOUR 3RD QUESTION

http://www.planetsap.com/userexit_main_page.htm

http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci982756,00.html

http://www.sap-img.com/abap/what-is-user-exits.htm

http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm

http://www.sappoint.com/faq/faqusrext.pdf

THANKS

MRUTYUN