Ansicht
Dokumentation

MWMTO003 - Own stock placement strategy

MWMTO003 - Own stock placement strategy

ABAP Short Reference   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.
SAP E-Book

With this user exit, you can integrate your own stock placement strategy into TO processing.

The modification consists of four user exits in SAPLL03A. The respective function modules are EXIT_SAPLL03A_001 through EXIT_SAPLL03A_004. In addition to the activation in transaction SMOD, you have to select the stock placement strategy in the storage type control. The standard stock placement strategy is usually " ". If no updates are required at storage bin level, you can use this stock placement strategy in connection with the SAP stock placement strategies B or P.
The function modules have the following meaning:

  • Function module EXIT_SAPLL03A_001 is called in order to find an appropriate storage bin for a given storage type. As an option, it is also possible to find an additional appropriate storage unit providing I_LTAP-NLENR is still initial. If no storage unit is transferred, the normal storage unit specification is used. The found storage bin must be blocked (block object ELLAGPE) before it is returned. Storage bins that cannot be blocked are not used. Abend messages and system messages may be issued directly whereas warning messages and error messages must be issued via the interface (see below).
  • Function module EXIT_SAPLL03A_002 is called in order to check a storage bin that is generally given by the user. As an option, it is also possible to find an additional appropriate storage unit providing I_LTAP-NLENR is still initial. This function module is not called if function module EXIT_SAPLL03A_001 was performed directly before, that is, the latest determined locations are no longer checked. Because of the division in the TO creation described above, it is still possible that a storage bin is determined and proposed to the user. If some interaction is performed on the screen now, the items are created again. If you cancel the proposed storage bin, function module EXIT_SAPLL03A_001 is performed. If you confirm or overwrite the storage bin, this definite storage bin is checked with function module EXIT_SAPLL03A_002. Abend messages and system messages may be issued directly whereas warning messages and error messages must be issued via the interface (see below).
  • Function module EXIT_SAPLL03A_003 is called if the TO item in question is created internally, for example, to update your own internal tables. (Second part of the item creation). No error messages may be issued here.
  • Function module EXIT_SAPLL03A_004 is called if the TO item in question is deleted internally, for example, to update your own internal tables or cancel updates with function module EXIT_SAPLL03A_003. No error messages may be issued here.

In order to be able to use the function module, you must create Include ZXLTOU03.
The following parameters are available:

Import parameters

  1. I_LTAK The respective TO header that contains, for example, the reference documents such as the transfer requirement number and so on.
  2. I_LTAP The TO item that has been created so far (check the source data)
Please refer to the interface documentation of function module L_TO_PREPARE_ITEM_INT for more information on the filled fields in I_LTAK and I_LTAP.
  1. I_MLVS Material master
  2. I_MGEF Hazardous material master
  3. I_T331 Control data of the storage type in which a storage bin is searched for
  4. I_T333 Movement type with which the TO is created
  5. I_T340D Warehouse number control
  6. I_VORGA Transaction within the TO processing (see above)

Export parameters

  1. E_NLPLA Found storage bin
  2. E_NPPOS Item in storage bin found. This parameter is optional and only relevant in connection with strategy P.
  3. E_NKDYN Indicator that the found storage bin is a dynamic storage bin, that is, it possibly does not exist in the database and should be created in the update program.
  4. E_NLENR Found storage unit. This parameter is optional. It is not used if I_LTAP-NLENR is filled. If no storage unit is found, the common storage unit specification is performed. (one SU per storage bin at the most => search for and use it, if available, several SUs per storage bin are permitted => create new ones)
  5. E_SUBRC Processing return code with the following values
    1. R_CUS_OK => Use transferred storage bin
    2. R_CUS_EXIT => Continue storage bin search in the next storage type
    3. R_CUS_STEIN_L => Search for empty storage bin in this storage type
    4. R_CUS_WARNING => Use transferred storage bin and send a warning message
    5. R_CUS_ERROR => Send an error message
  6. E_MSGID Message ID for the error message
  7. E_MSGNO Number of the error message
  8. E_MSGV1 First variable in the error message
  9. E_MSGV2 Second variable in the error message
  10. E_MSGV3 Third variable in the error message
  11. E_MSGV4 Fourth variable in the error message

In order to be able to use the function module, you must create Include ZXLTOU04.
The description of the parameters basically corresponds to the descriptions of function module EXIT_SAPLL03A_001. Below, only the differences are described.

Import parameters

  1. I_LTAP The TO item that has been created so far (check the source data), the destination bin location is filled (I_LTAP-NLPLA)
  2. I_T331 Control data of the storage type of the storage bin that is checked

Export parameters

  1. E_NPPOS Position in the storage bin to be checked. This parameter is optional and only relevant in connection with strategy P. It is not used if I_LTAP-NPPOS is filled.
  2. E_NKDYN Indicator that the checked storage bin is a dynamic storage bin, that is, it possibly does not exist in the database and should be created in the update program.
  3. E_NLENR Found storage unit. This parameter is optional. It is not used if I_LTAP-NLENR is filled. If no storage unit is found, the common storage unit specification is performed. (one SU per storage bin at the most => search for and use it, if available, several SUs per storage bin are permitted => create new ones)
  4. E_SUBRC Processing return code with the following values
    1. R_CUS_OK => Use checked storage bin
    2. R_CUS_WARNING => Use checked storage bin and send a warning message
    3. R_CUS_ERROR => Do not use checked storage bin and send an error message
  5. E_MSGID Message ID for the error message
  6. E_MSGNO Number of the error message
  7. E_MSGV1 First variable in the error message
  8. E_MSGV2 Second variable in the error message
  9. E_MSGV3 Third variable in the error message
  10. E_MSGV4 Fourth variable in the error message

Parameter E_NLPLA is no longer applicable. No new destination bin location can be set.

EXIT_SAPLL03A_003: Updating your own internal tables when you create an item.

To fill the function module with data, create the include ZXLTOV05.
The following parameters are available:

Import parameters

  1. I_LTAK The respective TO header
  2. I_LTAP The complete TO item that is now included in the internal tables of SAPLL03A including all its characteristics
  3. I_VORGA Transaction within the TO processing

There are no export parameters.

If table TAP is read at this time, the item to be currently created is not yet contained.

To fill the function module with data, you must create Include ZXLTOU06.
The following parameters are available:

Import parameters

  1. I_LTAK The respective TO header
  2. I_LTAP The complete TO item that is deleted from the internal tables including all its characteristics
  3. I_VORGA Transaction within the TO processing

There are no export parameters.

If table TAP is read at this time, the item to be currently deleted is no longer available.






CL_GUI_FRONTEND_SERVICES - Frontend Services   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.

Length: 8691 Date: 20240425 Time: 055943     sap01-206 ( 146 ms )