Sapass

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



Index

MWMIDO02

User Exits for IDOC Setup in WM
With this user exit, the contents and structure of IDOC WMCAID01 'Reversal request/transfer order reversal' can be influenced customer-specifically in the outbox.

General Information on IDOC Processing

Within the application, you first decide using the Customizing application whether the interface to an external system will be activated. In this case, the transfer orders are evaluated and the system creates an extract of the items relevant for this interface. In addition, you determine the partner system to which the transfer order data is to be transmitted, that is, one or several external systems are determined for the communication process. For each external system, an IDOC is created. The IDOC is set up in a function module that is assigned to the respective message type via a Customizing table. All the transfer order items that are relevant for the external system in question are passed on to this function module. This function module creates the IDOC and passes it on to the ALE interface. The ALE interface is responsible for saving the created IDOCs and for transmitting them to the external system.

General information on the reversal function in the WCU interface

A transfer order that was initiated in WM and transferred to the external system can also be reversed in WM. Since the physical transfers are processed by the external system, WM cannot determine whether the transferred transfer orders were already processed or not. For this reason, only one reversal request can be sent by WM. The external system then has to decide how to respond. That is, the external system sends a reply on the reversal request whether the transfer order item in question can be reversed or not. Thus, when the transfer order is reversed in WM, the items that were transferred to the external system are not reversed. In this case, an IDOC is set up as reversal request and sent to the respective external system. Only a positive reply from the external system on the reversal request will reverse this transfer order item.

Call transaction and other important requirements

The user exit is performed in the function module that sets up IDOC WMCAID01 as reversal request to the respective external system. This is done after the IDOC setup but before it is transferred to the ALE interface. The standard function module for setting up IDOC WMCAID01 is called L_IDOC_CREATE_WMCAID01 . The IDOC setup is part of the transfer order processing. This means that the source code can run both asynchronously in the update program and online. For this reason, all error messages must be issued as abend messages to guarantee a correct termination with rollback. Furthermore, you must not use any key words such as COMMIT WORK, ROLLBACK WORK, LEAVE, or the like.

Parameters and options

The user exit in the program is function module EXIT_SAPLLIDO_002 . In order to be able to use the user exit, you must create Include ZXLIDU02 and activate the enhancement with transaction CMOD. As parameters, you can use the TO data of the transfer order to be reversed and the IDOC data:

  • TO header (import parameter I_LTAK)
  • TO items (table parameter T_LTAP)
  • Control record of the IDOC that has been set up (import parameter X_IDOC_CONTROL)
  • Data records of the IDOC that has been set up (table parameter T_IDOC_DATA)

This user exit can basically can be used to:

  • change or redetermine the data in IDOC WMCAID01 that were determined during the standard procedure or provide partners with additional information using empty fields of this IDOC.
  • change or enhance the data for controlling the IDOC processing in the control record of the IDOC.
  • If you enhanced the basic IDOC WMCAID01 with your own segments, you have to fill these segments including the necessary data.

The user exit returns the modified IDOC data to the calling program by means of the following parameters:

  • Control record of the IDOC that has been set up (export parameter X_IDOC_CONTROL)
  • Data records of the IDOC that has been set up (table parameter T_IDOC_DATA)

The modified IDOC is passed on by the calling program to the ALE interface for sending.

Although changes to table T_LTAP are without any meaning, they should still not be made.

Examples

In the documentation of user exit MWMIDO01 you will find several
Function/Program:

  • EXIT_SAPLLIDO_002: Customer Exit of IDOC WMCAID01 (TO Cancellation Request) on Issue

02-Oct-2005