Skip to Content
avatar image
Former Member

how to find out the user-exits?

hi.

how to find out the user-exits?

regards

eswar.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Aug 06, 2007 at 11:39 AM

    Hi,

    <b>

    finding userexit using include name </b>

    1.Open the include in se38

    2. keep the cursor on the include name

    3. SElect where used list in the toolbar

    4. Select program name

    5. open the program

    4. you will get the exit name.

    Regards,

    Priyanka.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 06, 2007 at 11:41 AM

    Hi,

    &----


    *& Report ZEXITFINDER

    *&

    &----


    *&

    *&

    &----


    *report zexitfinder.

    &----


    *& Enter the transaction code that you want to search through in order

    *& to find which Standard SAP User Exits exists.

    *&

    &----


    &----


    *& Tables

    &----


    tables : tstc, "SAP Transaction Codes

    tadir, "Directory of Repository Objects

    modsapt, "SAP Enhancements - Short Texts

    modact, "Modifications

    trdir, "System table TRDIR

    tfdir, "Function Module

    enlfdir, "Additional Attributes for Function Modules

    tstct. "Transaction Code Texts

    &----


    *& Variables

    &----


    data : jtab like tadir occurs 0 with header line.

    data : field1(30).

    data : v_devclass like tadir-devclass.

    &----


    *& Selection Screen Parameters

    &----


    selection-screen begin of block a01 with frame title text-001.

    selection-screen skip.

    parameters : p_tcode like tstc-tcode obligatory.

    selection-screen skip.

    selection-screen end of block a01.

    &----


    *& Start of main program

    &----


    start-of-selection.

    • Validate Transaction Code

    select single * from tstc

    where tcode eq p_tcode.

    • Find Repository Objects for transaction code

    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 = enlfdir-area.

    move : tadir-devclass to v_devclass.

    endif.

    endif.

    • Find SAP Modifactions

    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.

    • Take the user to SMOD for the Exit that was selected.

    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.

    Regards

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 06, 2007 at 11:43 AM

    Hello...

    There are 3 main ways to find exits

    1) Option 1 : you don't know the name or dont have any info on user exit

    ************************************************************************************

    run T-code : SPRO

    SPRO -> Click SAP Reference IMG -> click in the relevant module eg: SD (sales and Distribution) ->System Modifications -> User exits

    You can view documentation to understand the purpose of that user exit

    It is not that always one can find the user exits under the name "System modifications" but with respect to a module definitely user exits can be found under that module in SPRO

    2) Option 2 : You know the name of the user exit

    ************************************************************************************

    Run Tcode : SMOD -> fill in the enhancement name-> click on attributes and then components or directly on components and view the include...if already a code is written in the include,then on double click of include you can see the code...if an existing code is not there and you double click on the include,SAP prompts for a request

    3)Option3: You can use the custom code..which was contributed to SDN

    *******************************************************************************************

    Create a new report program -> copy the code -> activate -> run

    on the p_tcode : give the name of the tcode for which you need to find the user exits and execute...a list of exits will be displayed...double click and follow the link

    **********************************ABAP CODE :***********************************

    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.

    .

    Reward if the suggestions were found useful

    Regards

    Byju

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 06, 2007 at 11:48 AM

    hi,

    could u tell me the diffrence between the user-exit and customer -exit?

    i will be waiting for reply.

    regards.

    eswatr

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      hi,

      User exit - A user exit is a three character code that instructs the system to access a program during system processing.

      SXX: S is for standard exits that are delivered by SAP. XX represents the 2-digit exit number.

      UXX: U is for user exits that are defined by the user. XX represents the 2-digit exit number

      Customer exit - The R/3 enhancement concept allows you to add your own functionality to SAP’s standard business applications without having to modify the original applications. SAP creates customer exits for specific programs, screens, and menus within standard R/3 applications. These exits do not contain any functionality. Instead, the customer exits act as hooks. You can hang your own add-on functionality onto these hooks.

      The program for transaction VA01 Create salesorder is SAPMV45A

      If you search for CALL CUSTOMER-FUNCTION i program

      SAPMV45A you will find ( Among other user exits):

      CALL CUSTOMER-FUNCTION '003'

      exporting

      xvbak = vbak

      xvbuk = vbuk

      xkomk = tkomk

      importing

      lvf_subrc = lvf_subrc

      tables

      xvbfa = xvbfa

      xvbap = xvbap

      xvbup = xvbup.

      The exit calls function module EXIT_SAPMV45A_003

      Development

      Creating a Project to include the enhancement

      1. Go to transaction CMOD and create a project.

      2. Enter a description for the project. Then, click on the pushbutton ‘Enhancement Assignments’ in the Application Toolbar.

      3. Enter the name of the enhancement and Save.

      4. Go to ‘Components’.

      Creating Custom Include for ANLU

      The screen shown below will appear, showing all the enhancement components under the assignment AIST0002. Double-click on the name of the Include Structure to create it.

      Create the include structure with three new fields, as required. Then, save and activate it.

      Develop the subscreen and the program

      Go to transaction SE80. For the function group XAIS, create a new subscreen 9000.

      Create it as subscreen.

      Then, go to the Layout of the screen and create three new fields from Database table ANLU.

      Drag the fields in the screen body and place them.

      Then, save and activate the screen and come back to screen flow editor.

      Create the PAI module to add validation for field “Location 2”, as required .

      Activate the whole function group and come out.

      Write code in the Function Exits to synchronize the programs

      Now, code has to be written in the function modules EXIT_SAPLAIST_002 and EXIT_SAPLAIST_003 so that data flows to and fro between the main SAP program and custom subscreen program. For that, go back to transaction CMOD and change the function exits.

      Write code in the function module EXIT_SAPLAIST_002 called once at the beginning of the transaction:

      Write code in EXIT_SAPLAIST_003 to pass the data from the subscreen to SAP main program.

      Then, activate everything – the whole project and come out.

      Complete the configuration to link the subscreen

      The development portion is complete. Now, linking of the subscreen has to be done with the subscreen area of the main program. In most of the cases, this linking can be done in the enhancement itself. But, here, requirement is a bit different. It is done by configuration using SPRO.

      Assets are created under Asset class. And for each asset class, there is a layout assigned to it. For a layout, there are multiple tab pages assigned to it. And, for each tab page, there are multiple screen groups/field groups assigned.

      Here, the requirement is to create these three custom fields in the tab page ‘General’ of asset master screen ( AS01/AS02/AS03/AS91).

      Determine the Layout

      To achieve this, first of all, we need to find out which layout is assigned to asset class 1000.For that, go to transaction AOLK( information has to be obtained from functional consultant).Select the Asset Class ‘1000’ and click on folder ‘General Assignment of Layout’.

      Here, for Asset class 1000, for all the user groups, tab layout SAP is assigned. Since layout ‘SAP’ cannot be changed, it has to be copied and manipulated to include our screen group. Later, the new layout has to be assigned over here.

      Create new tab layout

      Go to transaction AOLA. Copy the tab layout ‘SAP’ to create another layout, say, YSUB.

      System will copy all the settings and will inform you about that.

      Select your newly created layout and double-click on the folder ‘Tab page titles’.

      You want to put your custom fields in the tab page “General”. So, select this tab page entry and double-click on the folder "Position of Groups".

      Here, all the field groups currently residing in the tab-page “General” are shown. Add an entry for your newly created fields.

      Select the group box from the list. An entry will come with “U” padded with the custom subscreen prepared by you.

      Then, save and come out.

      Assign the new Layout to Asset Class

      Now, go to tcode AOLK and assign tab layout YSUB for asset class 1000.

      Save and come out.

      Test the Exit

      Everything is over. Now, go to transaction code AS01/02/03 or AS91 to deal with an asset of asset class 1000. You will see your new fields added to the screen. Add values to them…save. Then, enter into the tcodes again to see whether the values entered by you are being displayed or not.

      regards

  • avatar image
    Former Member
    Aug 06, 2007 at 02:26 PM

    hi execute this program

    you will find the user exits for perticular T-CODE

    ************************************************************************

    • Finding the user-exits of a SAP transaction code

    *

    • Enter the transaction code in which you are looking for the user-exit

    • and it will list you the list of user-exits in the transaction code.

    • Also a drill down is possible which will help you to branch to SMOD.

    *

    ************************************************************************

    *----


    • TABLES DECLARATION

    *----


    TABLES : TSTC, "SAP Transaction Codes.

    TADIR, "Directory of Repository Objects.

    MODSAPT, "SAP Enhancements - Short Texts.

    MODACT, "Modifications.

    TRDIR, "System table TRDIR.

    TFDIR, "Function Module.

    ENLFDIR, "Additional Attributes for Function Modules

    TSTCT. "Transaction Code Texts

    *----


    • INTERNAL TABLE DECLARATIONS

    *----


    DATA : ITAB LIKE TADIR OCCURS 0 WITH HEADER LINE.

    *----


    • DATA DECLARATIONS

    *----


    DATA : V_FIELD1(30).

    DATA : V_DEVCLASS LIKE TADIR-DEVCLASS.

    *----


    • INPUT SCREEN DECLARATIONS

    *----


    PARAMETERS : P_TCODE LIKE TSTC-TCODE OBLIGATORY.

    *----


    • START OF SELECTION EVENT

    *----


    START-OF-SELECTION.

    *--Read SAP Transaction Code from the given input.

    SELECT SINGLE *

    FROM TSTC

    WHERE TCODE EQ P_TCODE.

    IF SY-SUBRC EQ 0.

    *--Get the Directory of Repository Objects for the

    *---selected program name.

    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.

    *--Read System table TRDIR for the selected program name.

    SELECT SINGLE *

    FROM TRDIR

    WHERE NAME = TSTC-PGMNA.

    *--Get the function module name for the selected program name.

    IF TRDIR-SUBC EQ 'F'.

    SELECT SINGLE *

    FROM TFDIR

    WHERE PNAME = TSTC-PGMNA.

    *--Get the function group for the selected program name.

    SELECT SINGLE *

    FROM ENLFDIR

    WHERE FUNCNAME = TFDIR-FUNCNAME.

    *--Read the development class for the corresponding function group.

    SELECT SINGLE *

    FROM TADIR

    WHERE PGMID = 'R3TR' AND

    OBJECT = 'FUGR' AND

    OBJ_NAME EQ ENLFDIR-AREA.

    MOVE : TADIR-DEVCLASS TO V_DEVCLASS.

    ENDIF.

    ENDIF.

    *--Read all the entries into the internal table itab.

    SELECT *

    FROM TADIR

    INTO TABLE ITAB

    WHERE PGMID = 'R3TR' AND

    OBJECT = 'SMOD' AND

    DEVCLASS = V_DEVCLASS.

    *--Read Transaction code information from the table tstct.

    SELECT SINGLE *

    FROM TSTCT

    WHERE SPRSL EQ SY-LANGU AND

    TCODE EQ P_TCODE.

    *-- Column Headings

    FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.

    WRITE:/(19) 'Transaction Code - ',

    20(20) P_TCODE,

    45(50) TSTCT-TTEXT.

    SKIP.

    IF NOT ITAB[] 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 ITAB.

    *--Read SAP Enhancements short texts information.

    SELECT SINGLE *

    FROM MODSAPT

    WHERE SPRSL = SY-LANGU AND

    NAME = ITAB-OBJ_NAME.

    FORMAT COLOR COL_NORMAL INTENSIFIED OFF.

    WRITE:/1 SY-VLINE,

    2 ITAB-OBJ_NAME HOTSPOT ON,

    21 SY-VLINE ,

    22 MODSAPT-MODTEXT,

    95 SY-VLINE.

    ENDLOOP.

    WRITE:/(95) SY-ULINE.

    DESCRIBE TABLE ITAB.

    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 EVENT

    *----


    AT LINE-SELECTION.

    GET CURSOR FIELD V_FIELD1.

    CHECK V_FIELD1(4) EQ 'ITAB'.

    SET PARAMETER ID 'MON' FIELD SY-LISEL+1(10).

    *-- call transation SMOD : Sap Enhancement.

    CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.

    *---End of Program

    YOU WILL FOUND EXITS OF THAT TRANSACTION

    OTHER WISE SERACH FOR CALL CUSTOMER FUNCTION

    REWARD IF USE FULL

    REGARDS

    NARESH

    Add comment
    10|10000 characters needed characters exceeded