Make your own free website on Tripod.com
 

SAP ABAP Programming, Functional and Basis Components Books


SAP User Exits Routine

User exits are routine which SAP allows you to add in additional customized programs process without affecting the standard SAP programs.

SAP user exit are usually declare as a form routine :-

form userexit_xxxxx
       ........................
endform

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

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.

Back to Previous

Return to SAP Hints and Tips on Configuration and ABAP/4 Programming