User Exits for IDOC Setup in WM
You can use this user exit to influence the processing of IDOCs of the message type WMMBXY (goods movements) that are sent to SAP from external systems via the MM-MOB or WM-LSR interfaces. You can also access customer-specific processing in this case.
General information on IDOC processing during receipt The IDOCS set up in the external system are passed on to the SAP application. The ALE interface is responsible for receiving this data and for saving it in the SAP System. Using the Customizing tables, you
determine how the incoming IDOCs are to be processed. In the case of the MM-MOB and WM-LSR interfaces, the IDOCs are processed immediately by the application as soon as they are received. The IDOCS are processed in a function module that is determined and controlled by ALE
via the message type. The processing results are returned to ALE by the application so that the IDOCS can be marked accordingly and error processing can be activated, if required. Call transaction and other important requirements
The user exit is performed in the function module that processes the IDOCs of the message type WMMBXY, after the IDOC is withdrawn and checked but before direct processing in the application has been initiated. (That is, the data for the goods movement has already been determined and edited, but the function
module for updating this has not yet been accessed. The standard function module for processing the message type WMMBXY is called L_IDOC_INPUT_WMMBXY. The IDOC is processed in an update task, which means that the source code is also executed in the update.
If an error arises, then messages should not be issued since processing is being carried out in the background and the result of processing must always be returned to the ALE interface. For this reason language elements such as MESSAGE, COMMIT WORK, LEAVE and the like should not be used. If errors that should be passed
on to the ALE interface or that affect the result of processing are found in the user exit, you should also use the user exit MWMIDI07(EXIT_SAPLLMDE_001) since it alone can be used to take your errors into account (see documentation of the user exit).
Parameters and options The user exit in the program is the function module EXIT_SAPLLMDE_002. In order to be able to use it, you must first create Include zxlidu10 and activate the enhancement by means of transaction CMOD. As parameters, you can use the following data:
- Goods movement data already determined from the received IDOC:
- Transaction code that is given along with the application function module (see interface description (import parameter X_TCODE).
- Indicator: post only if all items o.k. (import parameter X_XALLP ). This indicator must be set by default, to enable IDOC error
processing.
- Indicator: Reset all tables (as primary call) (import parameter X_XALLR). This indicator is not set by default to enable the processing of several IDOCs. Normally you will not change these two indicators.
- Goods movement items table (table parameter T_IMSEG)
- Received IDOC data:
- IDOC control record (import parameter I_IDOC_CONTROL)
- IDOC data records (table parameter T_IDOC_DATA)
This user exit can be used to: - Influence the determined data for the goods movements. All data can be changed in this case.
- Analyze and process data that is transferred using customer-specific segments.
- Access additional activities.
Examples A number of potential applications are described below. - You want to inform a user by mail when the goods movements of certain vendors or customers take place.
- You want to start your own label printout, for example at goods receipt.
- You want to update your own tables, for example statistical data.
- You want to analyze a missing parts table at goods receipt and redirect the goods receipt correspondingly.
Function/Program:- EXIT_SAPLLMDE_002: Exit for Message WMMBXY (Goods Movement) Receipt (MDE)
|