You are on page 1of 3

SAP Note

303453 - User exits for shipping data determination in stock transport order
Component: LE-SHP-DL-STO (Stock-Transfer-Order), Version: 26, Released On: 21.03.2023

Symptom
Shipping data is determined as part of the creation of stock transport orders (STOs). This
SAP Note provides the option of influencing the determination of shipping data using two
user exits.
The user exits do not serve the purpose of updating shipping data that was already
determined. For this, after the function module SD_TRANSFERDATA_DETERMINE is called, a
modification of the internal table PTV may be required.

Other Terms
User exit, EKPV, VETVG, shipping data, stock transport order, STO

Reason and Prerequisites


The shipping data determination is too static in part.

Solution
Two form routines are proposed as user exits.
Implement the attached modification with the corresponding calls in the function module
SD_TRANSFERDATA_DETERMINE.

Do not implement the modification in the include MM06EFPV_PTV_FUELLEN unless you also want
the results of the user exits to be taken into account in change mode. Otherwise, these
results may cause overlapping with manual changes that were carried out at the same time for
the relevant shipping data.

First, define the form routines in connection with the form routines in the include LV50NF01
or in a user-defined include LV50NFZZ, for example.
Then regenerate SAPLV50N.
1. form zz_sales_area_determine:
In this routine, you can change the sales area that is used for delivering. Check if
SAP Note 170082 is sufficient for your purposes. (In SAP S/4HANA core systems, SAP
Note 170082 is superfluous and can be replaced by corresponding site maintenance.
See the long text of the SAP Note.) For consistency reasons, set the sales area as
fixed or determine it only depending on
the following parameters:
Issuing plant (LLWERK)
Goods recipient (LKUNWE)
The sales area determined up to now is in the following fields:
Sales organization (LVKORG)
Distribution channel (LVTWEG)
Division (LSPART)
If required, reset these fields with the sales area that you have determined.
Note that an entry exists in the distribution chain plant assignment (table TVKWZ)
for the distribution chain that have you set and the issuing plant.
In addition, note that a corresponding customer master segment (table KNVV) is
defined for the sales area.
2. Form zz_shipping_data_determine:
You can change various shipping data in this routine:
Delivery priority (FEKPV-LPRIO)
Shipping point (FEKPV-VSTEL)
Route (FEKPV-ROUTE)
Shipping condition (FEKPV-VSBED)
depending on the following parameters:
Issuing plant (LLWERK)
Goods recipient (LKUNWE)
Material (LMATNR)
Fields of the internal table FEKPV.
In particular, note that by changing the shipping condition, no new standard shipping point
determination can be started, and changing the shipping point does not result in a new
standard route determination. The values are hard-coded, as is normal in user exits.
In addition, ensure that the shipping data you have set is consistent throughout so that no
errors occur when you generate deliveries. In particular, this affects the shipping point
plant assignment (table TVSWZ) and the shipping point determination or manual assignment
(table TVSTZ).
*******************************************************************
Note that implementing the correction instructions is a modification. SAP will not provide
maintenance for this modification or for any problems that occur as a result.
*******************************************************************

Manual Activities

Attributes
Key Value

Other Components MM-PUR-PO (Purchase Orders)

Software Components
Software Component And subsequent

SAP_APPL

SAP_APPL

SAP_APPL

SAP_APPL

SAP_APPL

SAP_APPL

SAP_APPL

SAP_APPL

SAP_APPL

SAP_APPL

SAP_APPL

SAP_APPL

SAP_APPL

SAP_APPL

SAP_APPL

S4CORE

S4CORE

S4CORE
S4CORE

S4CORE

S4CORE

S4CORE

S4CORE

Correction Instructions
Software Component Number of Correction Instructions

SAP_APPL 4

S4CORE 1

Prerequisites
Software From To SAP Title Component
Component Note/KBA

SAP_APPL 605 618 2666956 Shipping folder disappears on a Stock-In-Transit Cross- MM-PUR-GF-
Company return order STO

This document refers to


SAP Note/KBA Title

769579

118321 Shipping condition in stock transport order

This document is referenced by


SAP Note/KBA Title

1908280 Shipping condition refreshed during intercompany STO

118321 Shipping condition in stock transport order

You might also like