User Exits: Materials Mgmt. (Purchasing)
With the enhancement, you can
- Maintain/supply your own customer fields in the headers and items of all purchasing documents except purchase requisitions
- Update your own customer-specific tables
- Change standard fields
- Change data that depends on the document header in the items
- Change data that depends on an item in the document header
You incorporate your customer fields for the document header in the INCLUDE CI_EKKODB (in table EKKO).
You incorporate your customer fields for the document item in the INCLUDE CI_EKPODB (in table EKPO). Dynpro areas
If you use the enhancement, you must create and generate the following dynpros (even if the dynpros are not going to be used):
- SAPLXM06 0101 Subscreen header purchase order
- SAPLXM06 0201 Subscreen header outline agreement
- SAPLXM06 0301 Subscreen header RFQ
- SAPLXM06 0111 Subscreen item purchase order
- SAPLXM06 0211 Subscreen item outline agreement
- SAPLXM06 0311 Subscreen item RFQ
You must identify all dynpros as subscreens. It is not necessary that they contain fields, but it is essential that they exist in order that no program abend occurs.
The dynpros are linked to the standard program via function modules. There are function modules that provide your subscreen with data (export) and function modules that fetch data from your subscreens (import).
- Header screens:
- EXIT_SAPMM06E_006 Export data to customer subscreen for header (PBO)
- EXIT_SAPMM06E_007 Export data to customer subscreen for header (PAI)
- EXIT_SAPMM06E_008 Import data from customer subscreen for header
- Item screens:
- EXIT_SAPMM06E_016 Export data to customer subscreen for item (PBO)
- EXIT_SAPMM06E_017 Export data to customer subscreen for item (PAI)
- EXIT_SAPMM06E_018 Import data from customer subscreen for item
You can set or supply your own data fields in the PBO function modules.
You receive the current (possibly changed viz a viz the PBO call) data of the standard program in the PAI function module.
You can return your fields to the standard program in the import function modules.
There is also sufficient data available to supply the customer fields from the material master record, info record, reference documents, RFQs, contracts, or vendor master record. This is sufficient to fill customer fields in normal dialog transactions.
The same function modules are also invoked when purchase orders are created via function modules (function group EINC) (recognizable by the import parameter I_NO_SCREEN, which is then set to 'X').
If you wish to update your own tables, you can invoke function module
EXIT_SAPMM06E_013. This is invoked directly prior to "commit work" with all available data. You can carry out further checks prior to saving via the function module EXIT_SAPMM06E_012. This is processed in the case of the functions "Check document" and "Save".
If you wish to read your own tables as well, you should use function module EXIT_SAPMM06E_014. This is invoked when the purchasing document is read from the database.
To re-initialize your own data, it is essential that you also use function module EXIT_SAPMM06E_009. This function module is always
invoked when the next purchasing document is processed (when POs are created via function module).
In the header modules, you obtain the SAP transaction category via the parameter I_TRTYP:
- A Display
- V Change
- H Create
You obtain the relevant transaction/event from the SAP transaction table (e.g. quotation, scheduling agreement delivery schedule) via the parameter I_VORGA. The possible values are not stored as fixed domain values.
In the item modules, you obtain the activity category via the parameter I_AKTYP:
- EXIT_SAPMM06E_006: Export Data to Customer Subscreen for Purchasing Document Header (PBO)
- EXIT_SAPMM06E_007: Export Data to Customer Subscreen for Purchasing Document Header (PAI)
- EXIT_SAPMM06E_008: Import Data from Customer Subscreen for Purchasing Document Header
- EXIT_SAPMM06E_009: Reset Customer Data at Beginning of New Document (Without Dialog)
- EXIT_SAPMM06E_012: Check Customer-Specific Data Before Saving
- EXIT_SAPMM06E_013: Update Customer-Specific Data in Purchasing Document
- EXIT_SAPMM06E_014: Read Customer-Specific Data when Importing Purchasing Document
- EXIT_SAPMM06E_016: Export Data to Customer Subscreen for Purchasing Document Item (PBO)
- EXIT_SAPMM06E_017: Export Data to Customer Subscreen for Purchasing Document Item (PAI)
- EXIT_SAPMM06E_018: Import Data from Customer Subscreen for Purchasing Document Item
- SAPMM06E0101_CUSTSCR1_SAPLXM060101: Header Data: Purchase Order
- SAPMM06E0111_CUSTSCR1_SAPLXM060111: Item Data: Purchase Order
- SAPMM06E0201_CUSTSCR1_SAPLXM060201: Header Screen: Outline Agreement
- SAPMM06E0211_CUSTSCR1_SAPLXM060211: Item, Outline Agreement
- SAPMM06E0301_CUSTSCR1_SAPLXM060301: Header Data, RFQ
- SAPMM06E0311_CUSTSCR1_SAPLXM060311: Item Data, RFQ