ABAP development for Sales

88511 - SD: document status and incompletion

Report SDVBUK00 attached to this note updates the document status, document flow and the statuses for the incompletion log to the currently valid status. Call up Transaction SE38 to start the program, enter the affected document numbers and remove the test flag to save the changes in the database.

Use the pricing element for account determination SD-FI

MV60AF0B_BELEG_SICHERN/BELEG_SICHERN_INTERN
  • Function RV_INVOICE_DOCUMENT_ADD
  • Function RV_ACCOUNTING_DOCUMENT_CREATE
  • Function RV_INVOICE_ACCOUNT_DETERM is called
    • Cross company: if different charts of accounts are used in the selling and in the delivering company code, internal prizes use the chart of accounts of the delivering company code
    • if Statistical and Relevant for Account Determination then both accounts must be set ( main + accural). 06.05.2021
Flow:
  • Conditions are stored in the internal table TKOMV[] filled by the standard
  • For each condition record from TKOMV
  • A routine RELEVANT_FOR_ACCOUNT_DETERM/ LV60AB30 is called to check the condition record
  • MOVE-CORRESPONDING tkomv TO kompcv.// TKOMV will contain new fields already filled in EXIT_SAPLV60B_001
  • CALL FUNCTION 'ACCOUNT_ALLOCATION' ( returning value ACCOUNT-SAKN1)
Prerequisites:
  • Extend the structure kompcv with the new fields SD_COND_TYPE, CO_SD_GROUP..
  • Extend the structrue KOMV with the new field CO_SD_GROUP
  • Implement the exit EXIT_SAPLV60B_001 to fill XKOMV table with the new CO_SD_GROUP
  • Create new cond. tables for G/L accounts determination with the new field CO_SD_GROUP
  • Create a new table and the maintenance view ( Z table )

2845160 - BAPI BAPI_SALESORDER_SIMULATE doesn't show error for all the items in return table

As outlined in the note 93091 - Information about the BAPIs in Sales and Distribution, there is a limitation with the BAPI_SALESORDER_SIMULATE that during processing, if any of the items are erroneous, the output table ORDER_ITEMS_OUT remains initial.

Instead of BAPI BAPI_SALESORDER_SIMULATE, we recommend to make use of BAPI SD_SALESDOCUMENT_CREATE with parameter TESTRUN = 'X' and BEHAVE_WHEN_ERROR = 'P'. This will result in the erroneous items being returned in RETURN table but all other item data, if configured, are displayed and will be correctly determined.

132723 - Update of data in billing document

In the billing document, via user exist you cannot change data of the billing header (XVBRK) or the billing item (XVBRP) when you save.
The following proposal is a possible solution:
Implement the attached modification proposal in the include RV60AFZZ in the subroutine USEREXIT_NUMBER_RANGE.



379269 - Preference in SD document: User exit: Setting preference indicators PREFE

As part of the preference processing in the SD document (order, billing document), the preference indicator (VBAP-PREFE, VBRP-PREFE) is set in the preference determination.
This takes place within pricing in the above SD documents by comparing the ex works price (VBAP-NETWR, WBRP-NETWR) with the preference threshold price, which is set in the condition type PREF as part of preference determination.

So that the preference indicator is set, the ex works price must be higher than or equal to the preference threshold price.
For certain business transactions (for free-of-charge deliveries, for example), the ex works price may not be filled, or this condition may not be not fulfilled or may have to be replaced by other conditions or logic.
After you implement this note, you can also fill the preference indicator (VBAP-PREFE, VBRP-PREFE) in the SD document by means of a user exit or, as of Basis Release 7.0, by means of a BAdI, in which you can then implement your own conditions.
For this, all of the information from the communication work areas of pricing is available to you:

KOMK - Pricing Communication Header
KOMP - Pricing Communication Item


In addition, the information from the billing item VBRP is available to you in the billing document.


78317 - SD text determination: User exits in VOTX or VOTXN

- The following work areas are available. However, in the standard system, they
are not filled in their entirety, so they
might need to be filled explicitly by the customer.
- FTVCOM - communication block
- FXTHEAD - text headers
- FXVBPA - partner
- REFERENZ - work area for text module to be reference

2399773 - How to enhance the SD Document Flow

This document describes the user exits and enhancement points that may be used to modify the display of the document flow for sales and distribution documents (such as orders, deliveries and billing documents). The document flow provides a representation of the relationship between documents. For example, the following document flow shows that delivery 80317471 includes one or more items from sales order 17402.

By means of the user exits and enhancement points described here, it is possible to add additional documents (additional to those included automatically by the standard code) into the representation of the document flow. This document also describes how to add or modify the attributes displayed for each custom document in the flow (attributes such as the creation date and status, as can be seen above).

Terminology and Basic Behavior
  • Document Tree
    • The visual depiction of the document flow where rows represent individual documents (or document items) and indentation is used to represent the connections between those documents (or document items).
  • Document Detail ALV
    • The grid displayed at the bottom of the document flow screen (below the document tree) is used to display some details of the document or document item selected in the document tree. The details are displayed when an entry in the document tree is double-clicked or the “Details (F2)” ( ) button is pressed.
  • Header Level View
    • A document tree representing a composite view of the document flow of all items in the root document.
    • It is important to understand this aspect of document flow: There is no separate record of document flow at the header level. It is simply a composite view of the individual item level flows. This composite view is determined at runtime.
  • Item Level View
    • A document tree representing the document flow of either one or all items in the root document.
  • Root Document
    • The sales and distribution document used as the starting point for determination of the document flow. This document is identified in the document tree by an arrow ( ) and color highlighting (as can be seen in the document tree screen shot, above).
  • Root Document Item
    • The item within a sales and distribution document used as the starting point for determination of the document flow. This item is identified in the document tree by an arrow ( ) and color highlighting.
Supported Document Flow Enhancements
  • 1. Add documents that come before the root document item(s).
  • 2. Add documents that follow on from the root document item(s).
  • 3. Add custom fields to the document tree display.
  • 4. Populate custom fields with data and supply or modify the data for standard fields.
  • 5. Also explained is the method for displaying a document when one is selected from the document tree and either Environment -> Display document (F8) is selected from the menu or the Display document button ( ) is pressed.




118573 - User exits for foreign trade data in SD and MM documents

Various user exits are available in SD and MM document processing for the foreign trade area.

As of Release 30D:
Several user exits for the proposal of export data exist in SD document processing. These can be found using transaction CMOD for the SAP enhancement V50EPROP.
EXIT_SAPLV50E_001 SD document header: Proposal of foreign trade header data
EXIT_SAPLV50E_003: SD Documents - Item: User Exit for Export Item
Data Default
EXIT_SAPLV50E_005: SD Documents - Header:
User Exit for Default of Foreign Trade
Header Data
EXIT_SAPLV50E_006: Foreign Trade Data - Item:
User Exit:
Check Completeness of Data.

As of Release 40A:
As of Release 40, there are additional user exits for MM documents:
EXIT_SAPLV50E_002: MM Documents - Header: User Exit for Default of Import Header Data
EXIT_SAPLV50E_004: MM Document - Item: User Exit for Import Item Data Default
Note
The following information CANNOT be overwritten with the aforementioned user exits for data consistency reasons:
The following fields in the table EIKP (Foreign Trade Header Data):

MANDT - Client
EXNUM - Number of foreign trade data in MM and SD documents
GRWCU - Currency of statistical values for foreign trade
AUSOK - Status: Document data in foreign trade complete (system)
The following fields in the table EIPO (Foreign Trade Item Data):

MANDT - Client
EXNUM - Number of foreign trade data in MM and SD documents
EXPOS - Internal item number for foreign trade data in MM and SD
GRWRT - Statistical value for foreign trade
AUSOK - Status: Document data in foreign trade complete (system)

2908499 - VA02 - Restricting certain users from deleting line items

Two possible solutions exist. However, both of them are modifications to the standard system.
Enhancement in program MV45AFZZ, form USEREXIT_SAVE_DOCUMENT_PREPARE.

This form is called on save event, after item is deleted. You can force an error message, but user will be forced to exit from the document, and any other change made will be gone.

2. Enhancement in program MV45AFZB, form USEREXIT_CHECK_XVBAP_FOR_DELET.

This form is called when user tries to delete an item from the sales document or by clicking Delete button and confirming the popup or tries to delete the order from the header by selecting Sales document -> Delete. This way, user will be informed immediately that item cannot be deleted.

301077 - User exits for the Accounting Interface

For the transfer to accounting (function group V60B), the following user exits are available for you in the program SAPLV60B:
  • EXIT_SAPLV60B_001: Change of header data in structure ACCHD
  • In this exit, you can influence the header information of the accounting document. For example, here you can influence the business transaction, the time of entry, the 'Created by' entry, or the transaction used to create the document.
  • EXIT_SAPLV60B_002: Changes the ACCIT customer line.
  • In this exit, you can influence the customer line of the accounting document. This exit is processed from the document header VBRK after the structure ACCIT is filled.
  • EXIT_SAPLV60B_003: Change of customer line for POS update
  • For POS accounting, the customer line is filled differently. For this, you can influence the structure ACCIT in user exit 003.
  • EXIT_SAPLV60B_004: Change of the ACCIT G/L account line.
  • Additions for the G/L account line, for example, using quantity specifications are possible in user exit 004.
  • EXIT_SAPLV60B_005: User exit for accruals
  • After all relevant data for accruals is stored in the G/L account line, you can add to this information in user exit 005.
  • EXIT_SAPLV60B_006: Change for the ACCIT tax line
  • Additions for the tax account line are possible in user exit 006.
  • EXIT_SAPLV60B_007: Change of the installment plan parameters
  • Additions to the installment plan parameters in the G/L account line are possible in user exit 007.
  • EXIT_SAPLV60B_008: Change transfer structures ACCCR and ACCIT.
  • After all data is filled in the accounting document, you can finally influence it in user exit 008.
  • EXIT_SAPLV60B_010: Item table for customer lines
  • In user exit 010 you can influence the contents of the customer line before it is created.
  • EXIT_SAPLV60B_011: Change of the parameters for cash account determination or reconciliation account determination
In this user exit you can influence account determination by means of changes to inbound parameters.

User exit partner determ. for invoice lists & User exit partner determination for billing documents

For this function, copy the program components from Notes 43296 and 43091.

Problem in sales order creation using BAPI_SALESORDER_CREATEFROMDAT2 for BOM (Bill of Material)

When there is BOM (bill of material) for any material that will explode when creating the sales order with those materials. Sometime it can be happen that the material has more than 9 sub items (bill of material). In this case if we pass the item number as 10, 20, 30, 40 format externally into the BAPI, then the item (which have more than 9 sub item) will over write on the next item and there will be problem in sales order creation.

Pass the parameter INT_NUMBER_ASSIGNMENT with value ‘X’ into the BAPI. It will internally generates and assign the next suitable item number and avoid the overwriting of items.

MRP areas and storage location determination in user exit

387482 - MRP areas and storage location determination in user exit

To determine the storage location, use user exit USEREXIT_SOURCE_DETERMINATION (MV45AFZB) instead of user exit USEREXIT_MOVE_FIELD_TO_VBAP. If the storage location is filled here, the system can fill the MRP area correctly; that is, depending on the storage location.
However, a plant must be known for this. You may also have to ensure that the plant is determined in the user exit. FV45PF0V_VBAP-WERKS_ERMITTELN may be useful.

Storage location determination for SD order item.

Also, storage location determination in sales documents is not possible in the standard ERP system. If you want storage location to be determined for a sales document then you have to implement your own system logic in a user exit. SAP recommends to use USEREXIT_SOURCE_DETERMINATION in include MV45AFZB. From a technical point of view, it is possible to use USEREXIT_MOVE_FIELD_TO_VBAP (include MV45AFZZ), but this user exit is not recommended to carry out a storage location determination. Using this user exit for a storage location determination can lead to problems / inconsistencies. Please consider SAP Note 387482.

Pricing 

1. New table PRCD_ELEMENTS

A new database table called PRCD_ELEMENTS is introduced to replace the KONV table to store all SD document conditions. It is of type Transparent table.

The data is no longer stored in the KONV table. You need to use new table PRCD_ELEMENTS in custom code to SELECT pricing conditions.

2. CDS view V_KONV

Further to the table and a new ABAP CDS view V_KONV is also available to get the price conditions. CDS view V_KONV can be used in custom CDS views.

In addition to the CDS view, an API is also available to Get, Update and Delete the pricing conditions.3. New API

The factory class CL_PRC_RESULT_FACTORY is used to retrieve the pricing data.

Following methods are provided within the API to read, write and delete the data.
GET_PRICE_ELEMENT_DBGet price elements from DB
GET_PRICE_ELEMENT_DB_BY_KEYGet price elements from DB by semantic key
SAVE_PRICE_ELEMENT_DBSave price elements on DB
DELETE_PRICE_ELEMENT_DB_BY_KEYDelete price element from DB by semantic key (one document)
DELETE_PRICE_ELEMENT_DBDelete price elements from DB (multiple documents)
DELETE_PRICE_ELEMENTS_DBDelete list of dedicated price elements (multiple documents)
Now you know quite a bit about data model changes to KONV. Its time to see the how we can migrate our custom code to S/4 HANA system compatible.


TRY.
cl_prc_result_factory=>get_instance( )->get_prc_result( )->get_price_element_db(
EXPORTING
it_selection_attribute = VALUE #(
( fieldname = 'KNUMV' value = vbak_knumv ) )
IMPORTING
et_prc_element_classic_format = data(lk) ).
CATCH cx_prc_result.
sy-subrc = 4.
ENDTRY.



At some times we need to enhance KONV table with custom fields catering to the customer requirements. This is usually achieved using append structure to the database table KONV

In S/4 HANA system, you should NOT append directly to PRCD_ELEMENTS table.

Instead add append structure to the new structure PRCS_ELEMENTS_DATA which is included in database table PRCD_ELEMENTS.

Subsequently to PRCD_ELEM_DRAFT which is included in database table PRCD_ELEM_DRAFT(used to temporarily store pricing results as a draft prior to save)

Similarly ABAP CDS view V_KONV can also be used to get pricing data, therefore it is necessary to enhance the CDS view.

Custom Fields and Logic

You, as a business expert or implementation consultant, can use this app to create your own fields and enhancement implementations to customize applications and their UIs, reports, email templates, and form templates.

https://help.sap.com/viewer/7b24a64d9d0941bda1afa753263d9e39/2020.000/en-US/66a2f4107e754be68a458408eb332d91.html

BAdIs for Business Data Field Modifications in Sales Documents

With this feature, you can now change certain business data, such as the pricing date, during sales order processing by using the new Business Add-Ins (BAdIs) Sales Header Business Data Modification (SD_SLS_MODIFY_HEAD_BUSINESS) and Sales Item Business Data Modification (SD_SLS_MODIFY_ITEM_BUSINESS). As a key user, you can set values for business data fields at the sales document header and item level by creating new custom logic in the Custom Fields and Logic app.

BAdIs for Tax Field Modifications in Sales Documents

With this feature, you can set up custom logic to determine the correct tax settings in a sales document by using the new Business Add-Ins (BAdIs), Sales Header Tax Fields Modification (SD_SLS_MODIFY_HEAD_TAX) and Sales Item Tax Fields Modification (SD_SLS_MODIFY_ITEM_TAX). As a key user, you can set values for tax relevant fields at the sales document header and item level by creating new custom logic in the Custom Fields and Logic app.

BADI-s

Flexible Billing Document Numbering

You can use the filter-enabled Business Add-In (BAdI) SD_BIL_FLEX_NUMBERING to allocate newly created billing documents of a given billing document type to custom number range intervals (and, optionally, number range prefixes). This enables a flexible allocation of billing documents to number range intervals and prefixes that is dependent on one or more attributes (header fields) of the billing document that is to be created.

Change SD document ( sales ) during processing

Us the BAdI Interface IF_EX_BADI_SD_SALES

  • DELETE_DOCUMENT Replacement for User Exit DELETE_DOCUMENT
  • DOCUMENT_INIT Replacement for User Exit REFRESH_DOCUMENT (after saving)
  • READ_DOCUMENT Replacement for User Exit READ_DOCUMENT
  • SAVE_DOCUMENT_PREPARE_PART2 Call after Processing BELEG_ENDE
  • TRANSACTION_INIT Unlike Document_Init at Start of New Transaction
  • SAVE_DOCUMENT_PREPARE Replacement for User Exit SAVE_DOCUMENT_PREPARE
  • SAVE_DOCUMENT Replacement for User Exit SAVE_DOCUMENT

User exits

User Exits In Sales Document Processing

This IMG step describes additional installation-specific processing in sales document processing. In particular, the required INCLUDES and user exits are described.

System modifications for sales document processing affect different areas. Depending on the modification, you make the changes in the program components provided:


MV45ATZZ
For entering metadata for sales document processing. User-specific metadata must start with "ZZ".

MV45AOZZ
For entering additional installation-specific modules for sales document processing which are called up by the screen and run under PBO (Process Before Output) prior to output of the screen. The modules must start with "ZZ".

MV45AIZZ
For entering additional installation-specific modules for sales document processing. These are called up by the screen and run under PAI (Process After Input) after data input (for example, data validation). The modules must start with "ZZ".

MV45AFZZ and MV45EFZ1
For entering installation-specific FORM routines and for using user exits, which may be required and can be used if necessary. These program components are called up by the modules in MV45AOZZ or MV45AIZZ.

User exits in the program MV45AFZZ

The user exits which you can use for modifications in sales document processing are listed below.


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.
For example, if an additional table is filled with the name of the person in charge (ERNAM) during order entry, this data can also be deleted after the sales order has been deleted.
The user exit is called up at the end of the FORM routine BELEG_LOESCHEN shortly before the routine BELEG_SICHERN.

USEREXIT_FIELD_MODIFICATION
This user exit can be used to modify the attributes of the screen fields.
To do this, the screen fields are allocated to so-called modification groups 1 - 4 and can be edited together during a modification in ABAP. If a field has no field name, it cannot be allocated to a group.
The usage of the field groups (modification group 1-4) is as follows:
Modification group 1: Automatic modification with transaction MFAW
Modification group 2: It contains 'LOO' for step loop fields
Modification group 3: For modifications which depend on check tables or on other fixed information
Modification group 4: is not used
The FORM routine is called up for every field of a screen. If you require changes to be made, you must make them in this user exit.
This FORM routine is called up by the module FELDAUSWAHL.
See the Screen Painter manual for further information on structuring the interface.

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".
The user exit is called up at the end of the FORM routine VBAK_FUELLEN.

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".
The user exit is called up at the end of the FORM routine VBAP_FUELLEN.

USEREXIT_MOVE_FIELD_TO_VBEP
Use this user exit to assign values to new fields at the level of the sales document schedule lines.
The user exit is called up at the end of the FORM routine VBEP_FUELLEN.

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".
The user exit is called up at the end of the FORM routine VBKD_FUELLEN.

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.

USEREXIT_PRICING_PREPARE_TKOMK
Use this user exit if you 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 you 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
You use this user exit if further additional tables are to be read when importing TA01 or TA02.
The user exit is called up at the end of the FORM routine BELEG_LESEN.

USEREXIT_SAVE_DOCUMENT
Use this user exit to fill user-specific statistics update tables.
The user exit is called up by the FORM routine BELEG-SICHERN before the COMMIT command.
Note
If a standard field is changed, the field r185d-dataloss is set to X. The system queries this indicator at the beginning of the safety routine. This is why this indicator must also be set during the maintenance of user-specific tables that are also to be saved.

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.
The user exit is carried out at the beginning of the FORM routine BELEG_SICHERN.

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. This is described in detail in the section "New fields for 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. This is described in detail in the section "New fields for 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. This is described in detail in the section "New fields for listing/exclusion".

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. This is described in detail in the section "New fields for listing/exclusion".

USEREXIT_REFRESH_DOCUMENT
With this user exit, you can reset certain customer-specific fields as soon as processing of a sales document is finished and before the following document is edited.
For example, if the credit limit of the sold-to party is read during document processing, in each case it must be reset again before processing the next document so that the credit limit is not used for the sold-to party of the following document.
The user exit is executed when a document is saved if you leave the processing of a document with F3 or F15.
The user exit is called up at the end of the FORM routine BELEG_INITIALISIEREN.

User-Exits in program MV45AFZB


USEREXIT_CHECK_XVBAP_FOR_DELET
In this user exit, you 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_DELET
In this user exit, you 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. The system could, for example, check whether certain shipping conditions are allowed for a particular customer group.

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, you 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
You 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, you can enter additional criteria for deletion of the serial number. If the criteria are met, the serial number is not deleted (unlike in the standard system).

USEREXIT_FILL_VBAP_FROM_HVBAP
You 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
You can use this user exit to influence text determination for header texts. For example, you can include new fields for text determination or fill fields that already exist with a new value.

USEREXIT_MOVE_FIELD_TO_TVCOM_I
You can use this user exit to influence text determination for item texts. For example, you can include new fields for text determination or fill fields that already exist with a new value.

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. You 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
You 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 you want to use a different rule, then you must enter it in this user exit.

USEREXIT_MOVE_FIELD_TO_ME_REQ
With this user exit you 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
You can use this user exit to format additional work areas for the variant configuration. You 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.
Note
Only use the user exits if the names/fields do NOT have the same name.
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
You can use this user exit to include fields in structure VBSN (scheduling agreement-related change status).

USEREXIT_MOVE_FIELD_TO_KOMKH
You can use this user exit to include new fields for batch determination (document header).

USEREXIT_MOVE_FIELD_TO_KOMPH
You can use this user exit to include new fields for batch determination (document item).

USEREXIT_CUST_MATERIAL_READ
You 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). Further information in MV45AFZB.

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). Further information in MV45AFZB.

User-Exits in Program MV45AFZD

USEREXIT_CONFIG_DATE_EXPLOSION
The BOM is exploded in the order with the entry date. You 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 you want to change this configuration in the standard system, you can define certain requirements in order to protect your 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 you can you 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 you can you 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
You can use this user exit to influence billing status at header level.

User exits in the screens


Additional header data is on screen SAPMV45A 0309, additional item data on screen SAPMV45A 0459. These screens contain the Include screens SAPMV45A 8309 or SAPMV45A 8459 as user exits.

Fields which are also to be included in the sales document for a specific installation should be included on the Include screens for maintaining. If an application-specific check module is needed for the fields, this can be included in the Include MV45AIZZ. The module is called up in the processing logic of the Include screens.

For field transports, you do not have to make changes or adjustments.

Example
A new field, VBAK-ZZKUN, should be included in table VBAK.

If the check is defined via the Dictionary (fixed values or check table) the field must be included with the fullscreen editor in the Include screen SAPMV45A 8309. In this case, no change has to be made to the processing logic.


User Exits in Program MV45AFZ4


USEREXIT_MOVE_FIELD_TO_KOMK
You can use this user exit to add or edit additional header fields in the communication structure - KOMK- for free goods determination. For more information, see the New Fields for Free Goods Determination IMG activity.

USEREXIT_MOVE_FIELD_TO_KOMP
You can use this user exit to add or edit additional item fields in the communication structure KOMP for free goods determination. For more information see the New Fields for Free Goods Determination IMG activity.

User Exits in the SAPFV45PF0E and SAPFV45PF0C Programs

EXIT_SAPFV45P_001
You can use this user exit to decide whether intercompany billing data is used in the profitability segment for cross-company code sales, or whether the data comes from external billing (external customer, sales data from the selling company code.

Comments