Register Login

Adjust availability check for delivery creation

Updated May 18, 2018

The availability check is executed for all delivery items, even though this is not at all necessary. The availability check is not required, for example, for deliveries that come from the (Retail) function Merchandise Distribution.

In the standard system, you can control the availability check using the delivery item category. The solution therefore consists of using customer-specific item categories, for which the availability check is switched off. This category can then be assigned to each delivery item.

In the detail area, the following steps are required:

    1. Copy the standard delivery item category, for example, to ZZNC or ZZNL.

    2. Switch off the availability check in the copy.

    3. Determine the new delivery item category.

              Set up a new copy routine at item level

              e.g. DATEN_KOPIEREN_902 (transaction VOFN, class LDAT) *--------------------------------------------------------------------
*       FORM daten_kopieren_902
*       ........
FORM daten_kopieren_902.

* Standard copy
  PERFORM daten_kopieren_302.

* Only if there is a item type
  IF NOT  ( lips-pstyv IS INITIAL ) .

* Realize here your own conditions
*   AND...

* Find the new item type
    IF lips-pstyv = 'NLC'.
      MOVE 'ZZNC' TO lips-pstyv.
    ELSEIF lips-pstyv = 'NLN'.
      MOVE 'ZZNL' TO lips-pstyv.

* Read the new item type
    PERFORM tvlp_select(sapmv50a) USING lips-pstyv
    IF sy-subrc NE 0.
      PERFORM message_handling(sapmv50a) USING xkomdlgn-rfpos



  • The change does not contain any modifications.
  • The change is valid in the example both for internal company code and for cross-company-code stock transport orders. You can, however, specify that only one of the two variants is possible.
  • Fields from XKOMDLGN and LIPS are available for the query. For example, if XKOMDLGN-WERKS contains the supplying plant, XKOMDLGN-SITUA helps the system differentiate between cross-docking and replenishment deliveries. You can of course select other data, however, you should consider any possible performance issues in each case.