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 EXIT

former_member510894
Participant
0 Likes
685

HI

How to find out userexit for va01

sunil

7 REPLIES 7
Read only

Former Member
0 Likes
661

Hi,

Use the MV45AFZZ include program of sales order main program SAPMV45A

and write the code in the required FORM..ENDFORM..in the SAVE document

There are some exit for checking order

User exits in the program MV45AFZZ :

  • USEREXIT_SAVE_DOCUMENT_PREPARE

Use this user exit to make certain changes or checks immediately before saving a document. It is the last possibility for changing or checking a document before posting.

The user exit is carried out at the beginning of the FORM routine BELEG_SICHERN.

User-Exits in program MV45AFZB :

  • USEREXIT_CHECK_VBAK

This user exit can be used to carry out additional checks (e.g. for completion) in the document header. The system could, for example, check whether certain shipping conditions are allowed for a particular customer group.

  • USEREXIT_CHECK_VBAP

This user exit can be used to carry out additional checks (e.g. for completion) at item level.

etc.

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

Regards,

Priyanka.

Read only

former_member188827
Active Contributor
0 Likes
661

the user exitf for va01are in includes of sapmv45a.we mostly use the include MV45AFZZ...

wat is r requirement?

Read only

former_member404244
Active Contributor
0 Likes
661

Hi,

goto VA01...in the menu slect SYSTEM->STATUS->Double click on the program name and then CTRL+F4 ,give there CALL CUSTOMER ,u will find lot of call customer funtions,which are nothng but userexits..

else...

in smod give package as VA and then execute , u iwll get list of userexits..

Reward points if u find useful

Regards,

Nagaraj

Read only

Former Member
0 Likes
661

Hi

execute this program u will get all the user exits available for this tcode

reward if usefull

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

  • 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

Read only

Former Member
0 Likes
661

Hi,

Use this program to find the Exits.

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.

<b>Reward Points if Useful</b>

Regards

Gokul

<b></b>

Read only

Former Member
0 Likes
661

Hi

Use this program to find the Exits.

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.

<b>Reward Points if Useful</b>

Regards

Gokul

Read only

0 Likes
661

to find out exits for any transaction fallowing methods used

1. goto SMOD transaction and press F4 and give the <b>package name or application name</b> to find out the package goto the program of the transaction and goto attributes and package form the avilable Exits choose the one which matches your requirment.

2. goto the program of the transaction and globally find out CALL CUSTOMER-FUNCTION.

3. from SPRO.

4 From SQL TRACE.(ST05)

<b>if helpful reward points.</b>