cancel
Showing results for 
Search instead for 
Did you mean: 

example of user exit

Former Member
0 Kudos

hi SAP gurus...

I know all general info about user exit.. like searching them and enhancing them by creating project... But can anybody give me an example of some SD exit n how u used it...

Here<b> i m interested in the logic to select the proper functional exit for achieving the functional requirement</b>

Wil appreciate it. Thx- Prashant

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi check this

In VL01 - Create Delivery Order, standard program SAPMV50A, the standard program did not check for storage location equal to space, and delivery quantity less than one when the user click the save button. Therefore I have to insert the additional checking into the userexit routine.

Steps:-

Goto transaction VL01 to pick a Sales Order for delivery (you don't have to save the data)

In the initial screen, click System -> Status -> Double click on Program (Screen)

In the dialog program SAPMV50A, click Edit -> Search/replace

Type userexit in the Find field, then click the In program radio button and hit Enter

A number of userexit routine will be display. You'll have to roughly decide which is the correct userexit routine to used.

form userexit_save_document_prepare.

case xlips-pstyv.

when 'TAX' or 'REX'.

  • Accept this two Delivery item category

when 'REN'.

if xlips-lgort = space.

  • Reject this Delivery item category

message e001.

endif.

when others.

if xlips-matnr <> space.

  • Check storage location not space

if xlips-lgort = space.

message e002.

endif.

  • Check delivery quantity not zero

if xlips-pikmg < 1.

message e003.

endif.

endif.

endcase.

endform.

Answers (3)

Answers (3)

Former Member
0 Kudos
Former Member
0 Kudos

Here's an example

Mostly in SAP SD- Invoice numbering will start with the digit "9............."

but say your Org. wants that Invoicing for Delhi Region should start with digit "2..."

Bombay region should start with digit "11......"

chennai region should start with a "C1......"

as this is a deviation from the default SAP working, people resort to user exits.

Hope this provides some insight into 'real use' of user exits.

In Sales Order & Billing, if we want to have different number range may be plant wise or sales office wise, then we use user exit.

For Sales Order:

USEREXIT_NUMBER_RANGE

Use this user exit to define the number ranges for internal document

number assignment depending on the required fields. For example, if

you want to define the number range depending on the sales

organization (VKORG) or on the selling company (VKBUR), use this

user exit.

The user exit is called up in the FORM routine BELEG_SICHERN.

For Billing:

USEREXIT_NUMBER_RANGE (Module pool SAPLV60A, program RV60AFZZ)

The internal number range used in the standard system is specified

in the billing type table and can be changed in this user exit. This

user exit is only called when the billing documents is created.

Similarly there may be different requirement, for which different User Exit can be identified & used.

IMG (SPRO) --> Sales and Distribution --> System Modifications --> User Exits -->

Former Member
0 Kudos

Hi,

The SD User exits are form of Subroutines which will be called in the Program, you will have to register this objects with SAP and take the access key and do the modifcation with in the Sub routine. For Example MV45AFZZ,MV50AFZZ,RV60AFZZ.

The enahancements can be activated by creating the Project in CMOD.

Regards,

Murali