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

FInding user exit for SD module

Former Member
0 Likes
10,149

Hi All,

Kindly help me in finding USER exit(for ex MV45AFZZ) for SD module.

ALso kindly guide which form is appropriate in these user exits.

12 REPLIES 12
Read only

Former Member
0 Likes
6,776

Hi San,

Identify the package name (from the Attribute) of the T-code or the program for which you're willing to find out the User-Exit.

1. Go to CMOD transaction.

2. From the menu select Enhancements.

3. Enter Package name & execute.

You will be able to see the list of user exits, if existed.

Also selection of user exits will be completely based on your requirement.

Thanks & Regards,

Venugopal M N

Read only

0 Likes
6,776

Hello San,

Follow the steps suggested by Venu. In addition to this, to find out exactly which user exit would be appropriate to you is : Put break-points in all the user exists of the program, execute the program, using debugging, understand when the particular exit is called and in which exit you want to code so that the particular functionality is achieved.

Other ways of finding exits in SD module: Goto SE80, in Repository Information System-Enhancements->Business Add-ins, Customer Exits.

Get to know list of packages of SD module and provide the same in this screen, you will get list of user exits. The user exits generally is a FM and it starts with EXIT* or *EXIT* .

Hope it will be helpful!

Thanks.

Read only

Former Member
0 Likes
6,776

Hi San,

          copy that report program and activate in SE38.

Its a report program to write list of USER EXITS for an particular Tcode.

Say for example if you want to know all USER EXITS for VA01 tcode.

give input as VA01 it will list out all USER EXITS for that tcode

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

REPORT z_find_userexit NO STANDARD PAGE HEADING.

*&---------------------------------------------------------------------*

*&  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.

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

Thanks & Regards

Arun prasath

Read only

uppu_narayan
Active Participant
0 Likes
6,776

Hi san,

       To find user exit in sd module go to se80(object navigator) select development class from the list and enter VMOD in it since all the user exits of SD module are contained in the development class VMOD.

        Press enter and you will find all the includes which contain user exits in SD for

different functions like PRICING, ORDER PROCESSING etc. Select the user exit according to the requirement and read the comment inserted in it and start coding .

thanks and regards,

narayan

Read only

0 Likes
6,776

Hi San,

Please open MV45AFZZ in SE38. You will find a lot of Forms such as

 

USEREXIT_DELETE_DOCUMENT

USEREXIT_FIELD_MODIFICATION

USEREXIT_MOVE_FIELD_TO_VBAK and many more.

If you want to add code in any of these forms, you need to click on 'Enhance' button which is in between 'Other Object' and 'Check button'. This will show you places where you can add the code in between your forms. For the first time editing, you may require an access key which your basis team will provide. At every click on VA01,VA02 or VA03, one of these forms from this exit is triggered. So you can put a break point in these form and check which one will be suitable for you. For Sales Order transactions, MV45AF* includes are only used. Hope this helps!

Read only

Former Member
Read only

Former Member
0 Likes
6,776

Hi San,

What is your requirement. based on the requirement we can tell you whsich is appropriate. before posting mention the requirement . It can help you to solve resolve the isuue in ASAP.

Thanks,

Sravan

Read only

pankaj_sandanshi
Product and Topic Expert
Product and Topic Expert
0 Likes
6,776

Hi San,

Go to Tcode SE80 i.e. Object Navigator and in drop down select Package.

In field below that enter VMOD.

This VMOD package contains all user exits for SD module. Based on their short description you can select appropriate user exit for your requirement.

Regards

Pankaj

Read only

0 Likes
6,776

This is the proper way to find the user exits

Read only

RaymondGiuseppi
Active Contributor
0 Likes
6,776

Look at help.sap.com for those old User Exits-> User Exits In  Sales Document Processing and User Exits For  Billing. Those links qre already provided in many threads/discussions at scn. (FAQ) -> Read the Rules of Engagement of the forums.

.

Regards,

Raymond

PS: These are "user exit", not "customer exit" SMOD/CMOD, so tools and tricks for package/dev. classes wont help.

Read only

0 Likes
6,776

Hi Raymond,

I need to know that what all customer exits, user exits, BAdI, Implicit and explicit enhancement

are used in my a particular T-code. So is there a way of finding that.

I have seen the table MODACT & MODSAP tables but it does not show the correct information.

Regards,

Paavan

Read only

6,776

Often (not always alas) customer-exit, BAdI or enhancement framework objects are in the same package than the main program, so many snippet analyze table TADIR for the package and pgmid = 'R3TR', object  = 'SMOD', 'SXSD', 'ENHS'

Then look for respective tables to display some text information

  • 'SMOD' -> customer exit : MODSAP, MODSAPT
  • 'SXSD' -> BaDi : SXS_ATTR, SXS_ATTRT
  • 'ENHS' -> use of methods cl_enh_factory=>get_enhancement_spot and if_enh_object_docu~get_shorttext

Use search tool, there are already some samples to start with at scn...

But sometimes the enhancement were created in another package, so try usual search for some class, code or even SQL trace to find those.

Old user-exits cannot be identified by program, those are standard include that SAP allows us to modify (with a sscr key or implicit enhanecement options) so can only be found in online and customizing documentation. Note this documentation must be read usually.

Regards,

Raymond