×

[PR]この広告は3ヶ月以上更新がないため表示されています。
ホームページを更新後24時間以内に表示されなくなります。




Sapass

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



Index

MWMTO009

User Exits for TO Processing
The deletion of TO items can be prevented by means of this user exit.

General information about transfer order processing

Transfer order processing and confirmation in the WM system are divided into the following programs:

  1. SAPML03T Screens, transactions
  2. SAPLL03A Item creation (TO core)
  3. SAPLL03B Function modules for external purposes
  4. SAPLL03T Update tasks

These four programs work together as follows:

SAPML03T contains all the transfer order processing screens. All related transactions are initiated using screens from this program. All corresponding data is read, checked and recorded here (transportation requirements in transfer order: transportation requirements, transfer order: confirmation, etc.)

Actual creation or confirmation of items occurs via function modules in SAPLL03A , where the transfer orders are first created and recorded internally as the putaway and picking strategies and several checks are run. Changes in storage location, storage unit or stock that may arise from individual transfer order items are simulated in internal tables.
Item creation and confirmation occurs in two steps. First, the item is generated internally and all checks are carried out. Then, the internal tables are updated via a second function module and the transfer order items are added internally. You can view this two-step process by running transfer order creation in the foreground (screen SAPML03T 102). First, the system generates the transfer order item, then issues a warning. If entries are made on the screen, the system regenerates the transfer order item (including all checks) and the previous one is discarded. The internal tables are updated after the warning disappears.
The confirmation process follows a similar procedure.

User action 'post' in SAPML03T is carried out after an item is created or confirmed, which in turn calls up function module SAPLL03A , which then activates the update function modules in SAPLL03T. These function modules are normally processed asynchronously (supplement IN UPDATE TASK), but can also occur synchronously (see below). All changes in storage location, storage unit, stock, transportation requirements or transfer orders are made in these function modules.

SAPLL03B contains function modules for creating and confirming transfer orders which can be used instead of transactions. First, the normal screen run of the parameters transmitted is reviewed. Reading, checking and recording of the data and part of the flow logic occurs via external performs in SAPML03T and in a common data area, to avoid redundant code. Item creation and confirmation takes place in function modules found in SAPLL03A.
Function modules L_TO_CREATE_TR and L_TO_CREATE_DN, for example, are used in collective processing in the SAP standard system. Updating occurs synchronously in this case.

Transactions in SAPLL03A and SAPML03T

Some checks within the transfer order creation and confirmation processes depend on the transaction concerned. This transaction (field VORGA) is placed at the disposal of all user exits so that the system can react as required for the transaction involved.

Relevant values:

  1. "TB" Transfer order for transfer requirement
  2. "LF" Transfer order for delivery note
  3. "TL" Transfer complete storage unit

Homogeneous storage units can also be transferred explicitly. In this case, the value of the field is LTAP-HOMVE = 'X'.

  1. "IV" Clear inventory
  2. "U1" Create first item for posting change
  3. "U2" Create second item for posting change
  4. "QB" Confirm storage unit for stock removal from SU-managed block storage area

Within the SU-managed block storage ares, the item type (POSTY) of a TO item is of interest. It is set when the source data is determined and can have the following values:

  1. " " Normal transfer order item
  2. "1" Quant-neutral stock removal that requires verification of storage units during the confirmation process
  3. "2" Storage unit verified during confirmation

Items with item type "1" are deleted as soon as confirmation is complete.

Call transaction and other important requirements

The user exit is performed on the 'Place into stock' preparation screen and on the 'Remove from stock' preparation screen. A table of the items the user wants to delete is transferred. This deletion can be prevented, which is useful for example if, due to other user exits, several items were created which are consistent and a "middle" item may not be deleted.
Only A or S messages may be issued.

Parameters and options

The user exit in the program is the function module EXIT_SAPML03T_004 . In order to be able to use it, the include ZXLTOU15 must be created and the enhancement must be activated by means of transaction CMOD.
The following parameters are available

Import parameters

  1. I_LTAK the respective TO header from which reference documents, for example, follow such as transfer requirement tracking number, and the like.

For more information on filled fields in I_LTAK, please refer to the interface documentation of the function module L_TO_PREPARE_ITEM_INT.

  1. I_MLVS Material master
  2. I_MGEF Hazardous material master
  3. I_T333 Movement type with which the TO is created
  4. I_T340D Warehouse number control
  5. I_VORGA Transaction within TO processing

Export parameters

E_SUBRC Return code of processing with the following values

  1. R_CUS_OK => Deletion may be performed
  2. R_CUS_EXIT => Deletion must not be performed

Table parameters

T_LTAPL Table of the TO items to be deleted

Each table entry consists of three fields. XPNUM is the current number on the corresponding preparation screen; XTAPS specifies whether a TO item has already been created for this line ('X'). In case an item has already been
Function/Program:

  • EXIT_SAPML03T_004: Prevent Deletion of Items

02-Oct-2005