Simplify SAP R/3 development with Excel VBA/VB RFC  
Home> UserExit>MWMIDI06



User Exits for IDOC Setup in WM
You can use this user exit to influence the processing of IDOCs (of the message type WMSUMO: move storage unit) that are sent to SAP from external systems via the MM-MOB or WM-LSR interfaces. It is also possible to 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 message type WMSUMO after the IDOC has been removed and checked, but before direct processing in the application has been initiated. (This means that the data for creating the transfer order for reported storage unit was already determined and edited, but the function module for creating the transfer order has not yet been accessed.) The standard function module for processing the message type WMSUMO is called L_IDOC_INPUT_WMSUMO. The IDOCs is processed online, which means that the source code is also executed online.

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 so on should not be used. If errors that should be passed on to the ALE interface or influence the result of processing are encountered in the user exit, you must also use the user exit MWMIDI01 (EXIT_SAPLLIDI_001) since it alone can be used to take your errors into account (see documentation of this user exit).

Parameters and Options

The user exit in the program is the function module EXIT_SAPLLIDI_006. Before you can use it, you must create Include ZXLIDU14 and activate the enhancement with transaction CMOD. As parameters, you can access the following data:

  • Transfer order data already determined for creating the reported movement already determined from the IDOC that was received:
    • Storage unit number (import parameter I_LENUM)
    • WM movement type (import parameter X_BWLVS)
    • Additional reference number for transfer (import parameter X_LZNUM)
    • Destination storage type (import parameter X_NLTYP)
    • Destination storage section (import parameter X_NLBER)
    • Destination storage bin (import parameter X_NLPLA)
    • Item in the destination storage bin (import parameter X_NPPOS)
    • 'Confirm transfer order immediately' indicator (import parameter X_SQUIT)
    • Storage unit type (import parameter X_LETYP)
    • 'Do not print transfer order' indicator (import parameter X_NO_PRINT)
    • Print indicator for printing transfer order (import parameter X_DRUKZ)
    • Name of printer (import parameter X_LDEST)
    • User ID for transfer order creation (import parameter X_CUSER)
    • X_SOLEX : Planned TO processing time determined externally
    • X_PERNA : Personnel number of the processor executing the TO
  • Data of the received IDoc:
    • Control record of the IDoc (import parameter I_IDOC_CONTROL)
    • Data records of the IDoc (table parameter T_IDOC_DATA)

This user exit can be used to:

  • influence the data determined for creating the transfer order of the reported storage unit.
  • valuate and process data that was transferred via customer-specific segments.
  • Access additional activities.


In the documentation of the user exit MWMIDI02 , you will find several examples of how a user exit is to be programmed upon receipt of

  • EXIT_SAPLLIDI_006: Customer Exit for IDOC WMSUID01 (Movement Storage Unit) on Receipt