Sapass

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



Index

MWMIDO10

User Exits for IDOC Setup in WM
You can use this user exit to influence the processing of IDOCs of the message type WMTORD (create transport order) that are sent to SAP from external systems via 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, which processes the IDOCs of the message type WMTORD after the IDOC has been removed and checked. The direct processing in the application, however, has not yet been initiated. That means that the data for creating a transfer order for the reported movement has already been 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 WMTORD is called L_IDOC_INPUT_WMTORD. The IDOC is processed online, which means that the source code is also executed online.

If an error occurs, messages should not be issued since processing is carried out in the background and the processing result must always be returned to the ALE interface. Therefore, no language elements such as MESSAGE, COMMIT WORK, LEAVE, and so on may be used. If errors that should be passed on to the ALE interface or influence the processing result 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 the user exit).

Parameters and Options

The user exit in the program is the function module EXIT_SAPLLMDE_004. In order to be able to use it, include ZXLIDU12 must be created and the enhancement has to be activated by means of transaction CMOD. As parameters, you can use the following data:

  • Transfer order data for creating the reported movement, already determined from the received IDOC:
    • Warehouse number (import parameter I_LGNUM)
    • WM movement type (import parameter X_BWLVS)
    • Requirement type (import parameter X_BETYP)
    • Requirement tracking number (import parameter X_BENUM)
    • Additional reference number for transfer (import parameter X_LZNUM)
    • Indicator 'Do not print transfer order' (import parameter X_NO_PRINT)
    • Print indicator for printing transfer order (import parameter X_DRUKZ)
    • User ID for transfer order creation (import parameter X_CUSER)
    • X_SOLEX : Planned TO processing time determined externally
    • X_PERNR : Personnel number of processor who executed the TOat
    • Data of the transfer order item (import parameter X_LTAP_CR)
  • 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 basically be used:

  • to influence the determined data for the transfer order creation of the reported movement.
  • to analyze and process data that is transferred using customer-specific segments.
  • to access additional activities.

Examples

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
Function/Program:

  • EXIT_SAPLLMDE_004: Exit for Message WMTORD (Generate TO) on Receipt (MDE/LSR)

02-Oct-2005