Application Development 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: 

how to find user exit and customer exit for sales order

Former Member
0 Kudos

Hi Experts,

Could you please tell me the STEPS for the following...

1. I want to find the user exits for sales order (SAPMV45A)

2. I want to find the customer exits for the sales order (SAPMV45A) with out referring tran code CMOD.....

Thanks in advance........

Regards

Doss

16 REPLIES 16

Former Member
0 Kudos

Hi ,

Check SPRO.

SPRO---->Sales & Distribution ->System Modifications->user exit.

or

programs--->

MV45AFZ*

regards

Prabhu

0 Kudos

thank you

any other way to find user exit ?

And also please let me know the steps to find customer exit for SAPMV45A with out referring tran code CMOD.

Thank you

0 Kudos

Hi ,

u wont find any useful Enhancements for S&D modules thru CMOD, for SO,Delivery,Billing u need to find out User Exits/Routines given by SAP , no need to create a projects for these.

Regards

Prabhu

former_member181995
Active Contributor
0 Kudos

Use this program for finding exit:

report ZTEST.
TABLES : TSTC,
TADIR,
MODSAPT,
MODACT,
TRDIR,
TFDIR,
ENLFDIR,
SXS_ATTRT ,
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,
P_PGMNA LIKE TSTC-PGMNA .

DATA wa_tadir type tadir.

START-OF-SELECTION.

IF NOT P_TCODE IS INITIAL.
SELECT SINGLE * FROM TSTC WHERE TCODE EQ P_TCODE.

ELSEIF NOT P_PGMNA IS INITIAL.
TSTC-PGMNA = P_PGMNA.
ENDIF.

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 in ('SMOD', 'SXSD')
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:/(105) SY-ULINE.
FORMAT COLOR COL_HEADING INTENSIFIED ON.



*Sorting the internal Table
sort jtab by OBJECT.
data : wf_txt(60) type c,
wf_smod type i ,
wf_badi type i ,
wf_object2(30) type C.
clear : wf_smod, wf_badi , wf_object2.

*Get the total SMOD.

LOOP AT JTAB into wa_tadir.
at first.
FORMAT COLOR COL_HEADING INTENSIFIED ON.

WRITE:/1 SY-VLINE,
2 'Enhancement/ Business Add-in',
41 SY-VLINE ,
42 'Description',
105 SY-VLINE.
WRITE:/(105) SY-ULINE.
endat.
clear wf_txt.
at new object.
if wa_tadir-object = 'SMOD'.
wf_object2 = 'Enhancement' .
elseif wa_tadir-object = 'SXSD'.
wf_object2 = ' Business Add-in'.

endif.
FORMAT COLOR COL_GROUP INTENSIFIED ON.

WRITE:/1 SY-VLINE,

2 wf_object2,
105 SY-VLINE.
endat.

case wa_tadir-object.
when 'SMOD'.
wf_smod = wf_smod + 1.
SELECT SINGLE MODTEXT into wf_txt
FROM MODSAPT
WHERE SPRSL = SY-LANGU
AND NAME = wa_tadir-OBJ_NAME.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.

when 'SXSD'.


*For BADis
wf_badi = wf_badi + 1 .
select single TEXT into wf_txt
from SXS_ATTRT
where sprsl = sy-langu
and EXIT_NAME = wa_tadir-OBJ_NAME.
FORMAT COLOR COL_NORMAL INTENSIFIED ON.

endcase.


WRITE:/1 SY-VLINE,
2 wa_tadir-OBJ_NAME hotspot on,
41 SY-VLINE ,
42 wf_txt,
105 SY-VLINE.
AT END OF object.
write : /(105) sy-ULINE.
ENDAT.


ENDLOOP.

WRITE:/(105) SY-ULINE.



SKIP.
FORMAT COLOR COL_TOTAL INTENSIFIED ON.
WRITE:/ 'No.of Exits:' , wf_smod.
WRITE:/ 'No.of BADis:' , wf_badi.

ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(105) 'No userexits or BADis exist'.
ENDIF.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(105) 'Transaction does not exist'.
ENDIF.

AT LINE-SELECTION.

data : wf_object type tadir-object.
clear wf_object.


GET CURSOR FIELD FIELD1.
CHECK FIELD1(8) EQ 'WA_TADIR'.
read table jtab with key obj_name = sy-lisel+1(20).
move jtab-object to wf_object.

case wf_object.
when 'SMOD'.
SET PARAMETER ID 'MON' FIELD SY-LISEL+1(10).

CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
when 'SXSD'.
SET PARAMETER ID 'EXN' FIELD SY-LISEL+1(20).
CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.
endcase.

0 Kudos

the results (exits) came out of the program are user exits ?

If so, how to find the customer exit, could u please help me

i got confused in between user and customer exit

Former Member
0 Kudos

Hello There.

To find user exits and customer exits,

1. User exits are mainly contained in the Standard Program itself.

For example, Standard program SAPMV45A.

You can clearly see the user exits.

(say) "include mv45aozz". Check out for more.

2. Customer exits are found in Transaction SMOD.

The basic way is these steps for any module you wish to find for,

(a) Go To Transaction SMOD.

(b) Press F4 in the Enhancement name.

(c) Click on SAP Applications.

(d) There you will find list of modules with nodes on their left side.

(e) Just go deep into the desired module nodes till all are over.

(f) There you go - All the Customer exits for that specific section or sub-module will be displayed.

One more thing,

These customer exits have to be implemented in Transaction CMOD.

Good Luck & Regards.

Harsh Dave

0 Kudos

thanks dave.

As you mentioned , 1 is for user exits and 2 is for customer exit ?

and also, could u explain more about point number 1 please .....

Thanks in advance

Regards

Doss

Former Member
0 Kudos

Hi Doss

there are different methods for findng the exit.

1.) find out the package of the prog thru attributes and then go to the SMOD and press f4->information systems->and give ur package name,u get list of exits...

2.) go to se80 & give package there u get on exits....

0 Kudos

i wish to know for both user and customer exits

i think, you are saying for user exit

Former Member
0 Kudos

we work with customer exits only for enhancements, user exits asks for the access key to work with and are associated with include

where as customer exits do not asks for key and are associated with function modules.

prior to ecc 6.0 it was not possible to work with user exits but in ECC 6 we can work using ENHANCEMENT SPOTS..

0 Kudos

ahmed

i understood your point,

if so, how to find the customer exits associated with either sales order or purchase order............

how to find customer exits exist for purchase order

i hope u could understand wat i try to convey

thanks in advance

Former Member
0 Kudos

dear doss,

we have to follow the same procedure as i had mentoned earlier to find out exits.

once u get the package u get list of exits,then choose any one and go to cmod transaction,type the exit name and select the components radio button it will give u the list....

in prog find out the zinclude and write ur code over there

hope this helps u..

0 Kudos

sorry to interrupt u again.....

i want to confirm the following

1. *User Exits and customer Exits for sales order*

1.1 Customer Exits

SE80 ->Repository info system ->Enhancements ->Customer Exits ->Enhancements -> (Package:VA (for sales order))

1.2 - User Exits

SPRO ->Sales Distribution -> System modifications -> User Exits -> User Exits in Sales - >

User Exits (Right click -> View documentation)

2. User Exits and customer Exits for Purchase order

2.1 Customer Exits

SE80 ->Repository info system ->Enhancements ->Customer Exits ->Enhancements -> (Package:ME (for purchase order))

2.2 - how to find user exits for purchase order.... If any standard approach is available, please let me know

If I am correct in 1.1, 1.2 and 2.1, please tell me the step for 2.2

I need your help.... Thanking you

0 Kudos

Hello There.

I agree that by package name we can get customer exits.

But, It becomes difficult to sort out which one belongs to the main program.

This is a suggestion which I have tried out and it turned out to be the most easiest way to get in case for you want to fetch by the program name as described in your First question,

You can search in the main program as well as includes with "CALL CUSTOMER-FUNCTION 002" (002 can be optional).

The results for this are all the customer exits in the program.

Alternatively,

Firstly, as a convention.

The exit function module has a general syntax,

EXIT_<Program name/Include name>_<Three digit Id>.

It is a function module, so we can get it in SE37.

I suggest a few steps,

1. Throughly see all the include name (say) "include mv45aozz"

2. Go To SE37.

3. Enter as a query -


> EXIT_SAPMV* or EXIT_SAPFV* depending on the include name.

4. Press F4.

There you go with all the exits.

If it still doesn' t work. Give feedback.

Good Luck & Regards.

Harsh Dave

0 Kudos

Dave

Thank you very much for quick response

But I could not able to understand your explanation.

I am new to exits,

1.Could you please tell me the steps in simple way to find CUSTOMER EXITS for particular program .... say example :SAPMV45A....

2. And also, i want to find the USER EXITS of purchase order .

Thanks in Advance........ Waiting for your reply.....

Sorry to interrupt you again in this regard....

Regards

Doss

0 Kudos

Hello Doss.

Firstly, You must clearly know the difference between both (User and Customer Exits).

In customer exits, we provide additional functionality to the ABAP code. This functionality of customer exits is obtained by using function modules. These modules allow us to call the functionality rather than using it directly in the code as like in user exits. This is very usefull during an upgrade.

I hope you agree to this.

Back to finding customer exits,

It is not necessary that the user/customer exits are available in the program. Finally a transaction calls a program if you might have observed.

There are alltogether many ways of doing that, Few are here.

(A) To find user exit using search in SE38 (program) itself.

According to the SAP conventions, the customer exits start with the statement "CALL FUNCTION-EXIT NNN".

As it is calling of a Function module. NNN is a 3 digit number.

So, to search. Enter the name "CALL FUNCTION-EXIT" only as you don't know the 3 digit number.

It will prompt for include names, do go in each of them.

Till your final result is displayed.

Example: It looks like this.

CALL CUSTOMER-FUNCTION '920'    "SODK003166 SK
  EXPORTING   I_VBAK     = KOMKBV1   "SODK003166 SK
  
  CHANGING    C_DO_CHECK =        L_DO_CHECK.              "SODK003166 SK

This is the most commonly used procedure. But very time consuming.

(B) Other way is by transaction SMOD.

1. Press F4 in place of Enhancement.

2. Enter the package name "VA" for "SAPMV45A" which you get in the attributes of the program.

3. Double click on "V45A0001" which is an customer exit.

4. Click Display.

5. You get the description of that exit.

6. Click on Components.

7. The function module used in that customer exit is shown.

It has a standard convention - EXIT_SAPFV45S_001 for the exit "V45A0001".

This also good to correlate the exit and the program/include it is used in for easy maintenance.

You can go to that function module and estimate its functionality.

Hope that is clear now.

(C) To find user-exits for purchase order.

For example if you want for creating purchase order.

1. Go To Transaction "ME21N".

2. Go To Environment and then status.

3. Take the program name "SAPLMEGUI".

4. Go To the program and then do it the similar way as for the previous one.

If you don't find any user exits in the program, then go by the SMOD package way.

Hope this solves your problem.

Good Luck & Regards.

Harsh Dave