User Exits for IDOC Setup in WM
With this user exit, you can influence the IDOC processing of message type WMCATO (Cancel Transfer Order) that is sent to SAP from external systems via the MM-MOB or WM-LSR interfaces. A customer-specific processing can also be accessed 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 IDOC of message type WMCATO directly after the IDOC has been taken and checked, but processing in the application was not yet initiated. That is, the data for the transfer order cancellation has already been
determined and edited, but the function module for the cancellation was not yet accessed. The standard function module for processing message type WMTOCO is called L_IDOC_INPUT_WMCATO. The IDOC is processed online which means that the source code is also executed online.
If an error occurs, no messages may be issued because the processing is executed in the background and the processing result must always be returned to the ALE interface. Therefore no key words such as MESSAGE, COMMIT WORK, LEAVE or the like may be used. If errors are found in the
user exit that should be passed on to the ALE interface or that influence the processing result, you must use user exit MWMIDI01 (EXIT_SAPLLIDI_001) because errors can only be considered by means of thsi user exit (see the documentation on the user exit).
Parameters and options
The user exit in the program is function module EXIT_SAPLLIDI_003 . In order to be able to use the user exit, you must create Include ZXLIDU06 and activate the enhancement with
transaction CMOD. As parameters, you can access the following data:
- Transfer order data for the cancellation that has already been determined from the received IDOC:
- Warehouse number (import parameter I_LGNUM)
- Transfer order number (import parameter I_TANUM)
- User ID for the cancellation (import parameter X_CUSER)
- Planned TO processing time by external (import parameter X_SOLEX)
- Table of items to be cancelled (table parameter T_LTAP_CANCL)
- Data in the received IDOCs:
- Control record of the IDOCs (import parameter I_IDOC_CONTROL)
- Data records of the IDOCs (table parameter T_IDOC_DATA)
This user exit can basically be used:
- To influence the determined data for the transfer order cancellation. In this case, only the user ID can be changed for the cancellation (export parameter X_CUSER ). There is no order item data that it is useful to change because it only contains the item to be cancelled (table parameter
- To analyze and process data that is transferred via user-defined segments.
- To access additional activities.
You can find several examples of how to program a user exit when
- EXIT_SAPLLIDI_003: Customer Exit for IDOC WMCAI01 (Cancel TO) on Receipt