User Exit in Sales Document Processing
While implementing SAP R/3 System, we often using user exit or system modification
to suit our company’s specific requirements. Sometime we may be necessary to create
new data fields or to use standard existing fields in functions in addition. We may also
have to develop new requirements and routines.
In my experiences, sales and distribution is one of module that has many variants
business process. No wonder, SAP provides more user exits and routines for SD module
than others.
Here are some user exit that I often used to meet the business process:
User exits in the program MV45AFZZ
USEREXIT DELETE DOCUMENT
This user exit can be used for deleting data which was stored in a separate table during
sales document creation, for example, if the sales document is deleted.
USEREXIT FIELD MODIFICATION
This user exit can be used to modify the attributes of the screen fields.
USEREXIT MOVE FIELD TO VBAK
Use this user exit to assign values to new fields at sales document header level. It is
described in the section “Transfer of the customer master fields into the sales document”.
USEREXIT MOVE FIELD TO VBAP
Use this user exit to assign values to new fields at sales document item level. It is
described in the section “Copy customer master fields into the sales document”.
USEREXIT MOVE FIELD TO VBEP
Use this user exit to assign values to new fields at the level of the sales document
schedule lines.
USEREXIT MOVE FIELD TO VBKD
Use this user exit to assign values to new fields for business data of the sales document. It
is described in the section “Copy customer master fields into sales document”.
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 We want to define the number range
depending on the sales organization (VKORG) or on the selling company (VKBUR), use
this user exit.
USEREXIT PRICING PREPARE TKOMK
Use this user exit if We want to include and assign a value to an additional header field in
the communication structure KOMK taken as a basis for pricing.
USEREXIT PRICING PREPARE TKOMP
Use this user exit if We want to include or assign a value to an additional item field in the
communication structure KOMP taken as a basis for pricing.
USEREXIT READ DOCUMENT
We use this user exit if further additional tables are to be read when importing TA01 or
TA02.
USEREXIT SAVE DOCUMENT
Use this user exit to fill user-specific statistics update tables.
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.
User exits in the program MV45AFZA
USEREXIT MOVE FIELD TO KOMKD
Use this user exit to include or assign values to additional header fields in the
communication structure KOMKD taken as a basis for the material determination.
USEREXIT MOVE FIELD TO KOMPD
Use this user exit to include or assign values to additional item fields in the
communication structure KOMPD taken as a basis for the material determination.
USEREXIT MOVE FIELD TO KOMKG
Use this user exit to include or assign values to additional fields in the communication
structure KOMKG taken as a basis for material determination and material listing.
USEREXIT MOVE FIELD TO KOMPG
Use this user exit to include or assign values to additional fields in the communication
structure KOMPG taken as a basis for material determination and material listung.
USEREXIT REFRESH DOCUMENT
With this user exit, We can reset certain customer-specific fields as soon as processing of
a sales document is finished and before the following document is edited.
User Exits in program MV45AFZB
USEREXIT CHECK XVBAP FOR_DELET
In this user exit, We can enter additional data for deletion of an item. If the criteria are
met, the item is not deleted (unlike in the standard system).
USEREXIT CHECK XVBEP FOR DELETE
In this user exit, We can enter additional data for deletion of a schedule line. If the
criteria are met, the schedule line is not deleted (unlike in the standard system).
USEREXIT CHECK VBAK
This user exit can be used to carry out additional checks (e.g. for completion) in the
document header.
USEREXIT CHECK VBAP
This user exit can be used to carry out additional checks (e.g. for completion) at item
level.
USEREXIT CHECK VBKD
The user exit can be used to carry out additional checks (e.g. for completion) on the
business data in the order.
USEREXIT CHECK VBEP
This user exit can be use to carry out additional checks (e.g. for completion) on the
schedule line. During BOM explosion, for example, We may want certain fields to be
copied from the main item to the sub-items (as for billing block in the standard system).
USEREXIT CHECK VBSN
We can use this user exit to carry out additional checks (e.g. for completion) on the serial
number.
USEREXIT CHECK XVBSN FOR DELET
In this user exit, We can enter additional criteria for deletion of the serial number.
USEREXIT FILL VBAP FROM HVBAP
We can use this user exit to fill additional fields in the sub-item with data from the main
item.
USEREXIT MOVE FIELD TO TVCOM H
We can use this user exit to influence text determination for header texts.
USEREXIT MOVE FIELD TO TVCOM I
We can use this user exit to influence text determination for item texts.
User-Exits for product allocation:
The following user exits all apply to structure COBL, in which the data for account
determination is copied to item level.
USEREXIT MOVE FIELD TO COBL
Option to include new fields in structure COBL.
USEREXIT COBL RECEIVE VBAK
Option to assign values from the document header to the new fields.
USEREXIT COBL RECEIVE VBAP
Option to supply values from the item to the new fields.
USEREXIT COBL SEND ITEM
A changed field can be copied from the structure into the item. We could use the user exit
to display a certain field in the account assignment block (see also MV45AFZB).
USEREXIT COBL SEND HEADER
A changed field can be copied from the structure to the header (see source text
MV45AFZB)
USEREXIT SOURCE DETERMINATION
We can use this user exit to determine which plant will be used for the delivery. In the
standard system, the delivering plant is copied from the customer master or the customer-
material info record. If We want to use a different rule, then We must enter it in this user
exit.
USEREXIT MOVE FIELD TO ME REQ
With this user exit We can include additional fields for the following fields:
• EBAN (purchase requisition)
• EBKN (purchase requisition-account assignment)
USEREXIT GET FIELD FROM SDCOM
Option to include new fields for the variant configuration. Fields that are included in
structure SDCOM can be processed and then returned to the order.
USEREXIT MOVE WORKAREA TO SDWA
We can use this user exit to format additional work areas for the variant configuration.
We will find notes on the user exit in MV45AFZB.
User-Exits for first data transfer:
The following user exits can only be used for the first data transfer.
USEREXIT MOVE FIELD TO VBAKKOM
Option to include additional fields in structure VBAKKOM (communiction fields for
maintaining the sales document header)
USEREXIT MOVE FIELD TO VBAPKOM
Option to include additional fields in structure VBAPKOM (communication fields for
maintaining a sales item)
USEREXIT MOVE FIELD TO VBEPKOM
Option to include additional fields in structure VBEPKOM (communication fields for
maintaining a sales document schedule line)
USEREXIT MOVE FIELD TO VBSN
We can use this user exit to include fields in structure VBSN (scheduling agreement-
related change status).
USEREXIT MOVE FIELD TO KOMKH
We can use this user exit to include new fields for batch determination (document
header).
USEREXIT MOVE FIELD TO KOMPH
We can use this user exit to include new fields for batch determination (document item).
USEREXIT CUSTOMER MATERIAL READ
We can use this user exit to set another customer number in the customer material info
record (e.g. with a customer hierarchy)
USEREXIT NEW PRICING VBAP
Option for entry of preconditions for carrying out pricing again (e.g. changes made to a
certain item field could be used as the precondition for pricing to be carried out again).
USEREXIT NEW PRICING VBKD
Option for entry of preconditions for carrying out pricing again (e.g. changes to the
customer group or price group could be set as the preconditions for the system to carry
out pricing again).
User-Exits in Program MV45AFZD
USEREXIT CONFIGURE DATE EXPLOSION
The BOM is exploded in the order with the entry date. We can use this user exit to
determine which data should be used to explode the BOM (explosion with required
delivery date, for example).
User exits in the program FV45EFZ1
USEREXIT CHANGE SALES ORDER
In the standard SAP R/3 System, the quantity and confirmed date of the sales document
schedule line is changed automatically if a purchase requisition is allocated, and it or the
sales document is changed (for example, quantity, date).
If We want to change this configuration in the standard system, We can define certain
requirements in order to protect Wer sales orders from being changed automatically. Use
this user exit for this purpose. Decide at this point whether the schedule lines are to be
changed.
User-Exits in Program RV45PFZA
USEREXIT SET STATUS VBUK
In this user exit We can We can store a specification for the reserve fields in VBUK
(header status). Reserve field UVK01 could, for example, be used for an additional order
status (as for rejections status, etc.).
The following workareas are available for this user exit:
• VBUK (header status)
• FXVBUP (item status)
• FXVBUV (Incompletion)
USEREXIT SET STATUS VBUP
In this user exit We can We can store a specification for the reserve fields for VBUP
(item status).
The following workareas are available for this user exit:
• FXVBAP (Item data)
• FXVBAPF (Dynamic part of order item flow)
• FXVBUV (Incompletion)
USEREXIT STATUS VBUK INVOICE
We can use this user exit to influence billing status at header level.