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

exact user exit

Former Member
0 Likes
932

Hi everybody,

could anybody tell me the exact user exit for ml81n transaction while creating entry sheets

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
881

"Keep this code for your reference ...save and activate this code and run. 
"It'll ask you to enter t-code.in your case enter ml81n  and run.. you'll get all available 
"userexits. just double click on required exit it'll navigate to SMOD screen. 

REPORT  zfind_user_exits 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.

Hi everybody,

could anybody tell me the exact user exit for ml81n transaction while creating entry sheets

6 REPLIES 6
Read only

former_member156446
Active Contributor
0 Likes
881

SRVESI Data conversion entry sheet interface

Read only

0 Likes
881

hi jay,

In that enhancement i kept breakpoints in includes of

EXIT_SAPLMLSX_002

EXIT_SAPLMLSX_003

but cant able to fire when i used ml81n and clicked on create button

actually my need is for some purchse orders which has gr message checked should allow us to create another entry sheet has to get error msg while creating an entry sheet for the PO vth gr checked

Plz respond

Read only

0 Likes
881

Hi list of all the user exits available:

Award points if helpful

SRVDET User screen on tab strip of service detail screen

SRVEDIT Service list control (maintenance/display)

SRVENTRY Unplanned part of entry sheet (obsolete since Rel. 3.1G)

SRVESI Data conversion entry sheet interface

SRVESKN Set account assignment in service line

SRVESLL Service line checks

SRVESSR Set entry sheet header data

SRVEUSCR User screen on entry sheet tabstrip

SRVKNTTP Setting the account assgnmt category when reading in, if "U"

SRVLIMIT Limit check

SRVMAIL1 Processing of mail before generation of sheet

SRVMSTLV Conversion of data during importing of standard service cat.

SRVPOWEB Purchase order for service entry in Web

SRVQUOT Service export/import for inquiry/quotations

SRVREL Changes to comm. structure for release of entry sheet

SRVSEL Service selection from non-SAP systems

SRV_FRM SRV: Formula calculation (obsolete since 4.0A!)

INTERFAC Interface for data transfer

Read only

Former Member
0 Likes
882

"Keep this code for your reference ...save and activate this code and run. 
"It'll ask you to enter t-code.in your case enter ml81n  and run.. you'll get all available 
"userexits. just double click on required exit it'll navigate to SMOD screen. 

REPORT  zfind_user_exits 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

0 Likes
881

hi perez,

there i found all the exits .i tried srvedit,srvesi,srventry,srvessr,srveuscr,srpoweb but cant able to firl ml81n while clicking on create .how to that

what i did is i activated all the includes in the user exits and add some write statements kept an breakpoint there .

vth in another session in transaction ml81n clicked on create but cant able to fire

could u help vth this

Read only

Former Member
0 Likes
881

When clicked on create SRVEUSCR and MB_DOCUMENT_BADI IS TRIGGERED.