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

calling a std user exit from a user defined user exit

Former Member
0 Likes
1,124

hi

I have a standard User Exit. I want to call it from a User Exit created by me something like zaaabbbb.

Can you please tell me the procedure how to do it ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
937

In your custom UE, use this syntax:

PERFORM Name_of_the_std_UE in program SAP_PROG_NAME_HERE if found.

hi

I have a standard User Exit. I want to call it from a User Exit created by me something like zaaabbbb.

Can you please tell me the procedure how to do it ?

3 REPLIES 3
Read only

Former Member
0 Likes
937

Hi,

eg: see function module VB_NEXT_BATCH_NUMBER.

there you'll find CALL CUSTOMER-FUNCTION '001'. If you double click now on this customer exit you see it is function module EXIT_SAPLV01Z_001.

In your Z program you can call the EXIT_SAPLV01Z_001. Or for this example you create in the include ZXVBZU01 a perform routine with all importing/exporting/changing parameters and call this in your report.

Rgds,

JP

Read only

Former Member
0 Likes
938

In your custom UE, use this syntax:

PERFORM Name_of_the_std_UE in program SAP_PROG_NAME_HERE if found.

Read only

Former Member
0 Likes
937

Hi,

If the user exit is a Z include in a function module then you can call the function module like any other function module passing the required parameters. For example CALL CUSTOMER-FUNCTION '002' in transaction VA01 corresponds to function module EXIT_SAPMV45A_002. You can call this function module like you do any other function module.

CALL FUNCTION 'EXIT_SAPMV45A_002'
  EXPORTING
    i_tvak        =
    i_tvta        =
    i_vkgrp       =
    i_vkbur       =
* IMPORTING
*   E_KUNNR       = 
          .

If the user exit is a subroutine in an include in SAP name space (For example subroutine userexit_delete_document in include mv45afzz), then find out the main program in which the include is included (for example mv45afzz is included in program sapmv45a). Once you have done that you can using the following statement to call the subroutine.

PERFORM <subroutine name> IN PROGRAM <program name>.

For Examaple

PERFORM userexit_delete_document IN PROGRAM sapmv45a.

Please make sure that you use the main program name (In our example sapmv45a) and not the include name (in our example mv45afzz).