Warehouse Order Processing
Warehouse Order Processing
2
TABLE OF CONTENTS
1. INTRODUCTION .............................................................................................................................. 4
1.1 Structure and Content ................................................................................................................... 4
2. BUSINESS OBJECTS IN WAREHOUSE CORE AND HOW TO ACCESS THEM
PROGRAMMATICALLY ................................................................................................................................... 4
2.1 Transaction Handling in Extended Warehouse Management ................................................... 4
2.2 Waves .............................................................................................................................................. 6
2.2.1 Wave Database Tables................................................................................................................... 7
2.2.2 Function Modules for Waves ........................................................................................................ 7
2.3 Warehouse Tasks ......................................................................................................................... 10
2.3.1 Warehouse Task Database Tables ............................................................................................. 14
2.3.2 Function Modules for Warehouse Tasks ................................................................................... 15
2.3.3 Methods for Warehouse Tasks ................................................................................................... 20
2.4 Warehouse Orders ....................................................................................................................... 21
2.4.1 Warehouse Order Database Tables ............................................................................................ 23
2.4.2 Function Modules for Warehouse Orders ................................................................................. 23
2.5 Handling Units .............................................................................................................................. 25
2.5.1 HU Database Tables ..................................................................................................................... 25
2.5.2 Function Modules for Handling Units ........................................................................................ 26
2.5.3 Methods to Process Handling Units ........................................................................................... 27
2.6 Stock .............................................................................................................................................. 30
2.6.1 Stock Database Tables ................................................................................................................ 31
2.6.2 Function Modules for Stock ........................................................................................................ 32
2.6.3 Methods for Stock ........................................................................................................................ 35
2.7 OData APIs .................................................................................................................................... 36
2.7.1 OData APIs for Sidecar Apps ...................................................................................................... 36
2.7.2 APIs Using the /SCWM/IF_API Concept ..................................................................................... 36
3. EXTENSIBILITY ............................................................................................................................. 37
3.1 Enhancement of Warehouse Task Structures .......................................................................... 37
3.2 Enhancement of Warehouse Order Structures ......................................................................... 37
3.3 Enhancement of Handling Unit Structures ................................................................................ 37
3.4 Enhancement of Stock Structures ............................................................................................. 37
3.5 General Recommendations for BAdIs ....................................................................................... 38
3.6 BAdIs During Wave Processing ................................................................................................. 39
3.7 BAdIs During Warehouse Task Creation ................................................................................... 43
3.8 BAdIs During Warehouse Task Confirmation ........................................................................... 54
3.9 BAdIs During Warehouse Order Creation ................................................................................. 57
3.10 BAdIs During Stock Update ........................................................................................................ 61
4. ADDITIONAL CONSIDERATIONS ............................................................................................... 62
4.1 General .......................................................................................................................................... 62
4.2 Performance ................................................................................................................................. 63
4.3 EWM Check Cockpit ..................................................................................................................... 64
4.4 Reference Guides ......................................................................................................................... 66
3
1. INTRODUCTION
This guide describes what you need to consider when you create custom developments involving the
business objects for warehouse order processing in the Extended Warehouse Management (EWM)
component of SAP S/4HANA 2022 or later. This guide is intended for consultants and developers planning
or working in EWM projects. It can also serve as a guide for solution architects that are aligning customer
requirements and solution design to the standard functionality provided in warehouse order processing,
identifying functional gaps, and seeking extensibility options.
This guide contains some sample codes. All of them are only examples and aren't intended to be used in a
productive system environment. The code is only intended to better explain and visualize the syntax and
phrasing rules of certain coding. SAP doesn't guarantee the correctness and completeness of the code and
can't be held liable for errors or damages caused by using the code, except if such damages were caused by
SAP intentionally or by gross negligence.
In this chapter, we introduce the main business objects of Extended Warehouse Management (EWM) Core.
For each of them, we list the main database tables, function modules, and methods useful for custom
developments.
For all function modules and methods listed in this guide, we mention whether they're allowed multiple times
or a single time in an SAP logical unit of work (LUW). An SAP LUW is a logical unit consisting of dialog
steps, whose changes are written to the database in a single database LUW. A database LUW is the
mechanism used by the database to ensure that its data is always consistent. An application program
(transaction) may consist of several SAP LUWs. Usually (for example, in a radio frequency (RF) screen), a
user can perform multiple LUWs one after the other (for example, confirm a warehouse task, pack stock, and
load a handling unit (HU)).
Unlike a database LUW, an SAP LUW can span multiple dialog steps and be performed using a series of
different work processes. If an SAP LUW contains database changes, you should either write all of them or
none of them to the database. To ensure that this happens, you must include a database commit when your
transaction has ended successfully and a database rollback if the program detects an error. For more
information about SAP LUWs, see SAP Library for SAP NetWeaver on SAP Help Portal at
http://help.sap.com/nw.
4
Note: Do NOT change the warehouse number inside a process.
2. Lock.
Ensure that the objects (such as HUs) that you want to change are locked by the methods you're
using.
3. Update.
Objects can now be updated, for example, HUs and warehouse tasks. Ensure that you're using the
appropriate functions or methods. Don't directly access the database to change data. Direct database
changes may lead to severe data inconsistencies and may not trigger some automated processes (for
example, Post Processing Framework (PPF) actions and status updates).
Function modules or methods to update business objects (for example, warehouse tasks and HUs)
create the update records, which describe the data changes determined in an LUW. Update records
are processed at the end of the LUW by the COMMIT WORK statement. Update records can be
processed synchronously or asynchronously as follows:
▪ With synchronous updates, the program that outputs the statement COMMIT WORK AND
WAIT waits until the update work process outputs the status of the update. The program can
then respond to errors separately.
▪ In asynchronous updating, the program that issued the COMMIT WORK statement simply
forwards the update to the update system and doesn't wait for a response from the update
process.
A function module call using statement CALL FUNCTION … IN UPDATE TASK instead creates an
update request. The function module isn't executed immediately but is scheduled for execution in a
special work process (update work process). The actual execution is triggered by the statement
COMMIT WORK.
4. Check errors.
Evaluate the exceptions and messages that are returned by these functions or methods. It's essential
to evaluate this information to establish whether or not a data change was successful. Not using this
information may lead to data inconsistencies if data is saved later for any reason.
▪ No error occurred: Usually a success message, no message, or an exception indicates that the
data change was successful. Now you can save the data and end the LUW. First call the
posting methods or functions of the objects you changed. When a service provider is used for
deliveries, this is usually a SAVE method.
If the SAVE method didn't return errors or exceptions (evaluate the return parameters), then
you can do a COMMIT WORK (or COMMIT WORK AND WAIT if you want to continue working on
these objects).
▪ Error occurred. If the SAVE method returned an error or exception, proceed as if errors
occurred. For example, if application objects were changed and errors or exceptions occurred,
or the changes should not be saved. Usually an E- or A- message or an exception indicates
that the data change wasn't successful. Typically, you don't know which data the system
changed and whether everything is consistent. Therefore, you mustn't continue the process;
first you must end the LUW and return to a consistent state.
First call a ROLLBACK WORK to get rid of UPDATE TASK functions and any other updates that
may be registered. This is also necessary to undo changes to persistent classes.
5. Cleanup.
After a successful SAVE and COMMIT or ROLLBACK WORK, you need to call the CLEANUP method if
you're using a service provider. Otherwise, use /SCWM/CL_TM => CLEANUP. It's mandatory to call
this method. Otherwise, the system is not yet consistent. For example, the locks have not all been
released and the buffered data may still contain changes and not reflect the database state.
When you need to call more than one function module or method allowed once in an LUW (for example,
creating a wave using function module /SCWM/WAVE_CREATE_EXT, and releasing it using function module
/SCWM/WAVE_RELEASE_EXT – see chapter Wave Database Tables), you must follow the pattern explained
5
above. Also make sure that the COMMIT WORK statement and CLEANUP statement are called before
proceeding with the next function module or method in the next LUW.
For more information, see the guide How to Do Transaction Handling in Extended Warehouse Management
(EWM).
2.2 Waves
Wave management is a core functionality in EWM. A wave is the logical grouping of several warehouse
requests that fulfill common criteria. Usually, these requests should be fulfilled in the same time frame. For
example, all outbound delivery orders that are scheduled on the same day for a specific route. EWM allows
you to group the following warehouse requests in a wave: outbound delivery order items, internal stock
transfers, and posting changes. At the moment, production material requests are not supported.
Although the warehouse requests are potentially destined for different recipients, the warehouse tasks
created from a wave can be bundled into warehouse orders. Certain products might be requested from
several customers. Then when the requests are scheduled for the same route and bundled into the same
warehouse order, travel time can be saved if several picks of the same product from the same bin are
bundled into the same warehouse order as well.
You create waves using wave templates in the Maintain Wave Templates app (transaction
/SCWM/WAVETMP). Wave templates contain preset configuration for waves that occur regularly in a
warehouse, for example, for a daily shipment in the afternoon.
Warehouse request items can be assigned automatically or manually to waves, which can then be released
automatically or manually to create warehouse tasks. An automatic assignment of a warehouse request item
is done based on the condition technique (transaction /SCWM/WDGCM) to determine the suitable wave
template. Alternatively, it’s possible to automatically assign outbound delivery order items through report
Background Wave Generation (/SCWM/R_WAVE_PLAN_BACKGROUND). This report can be scheduled as a
background job.
Two-step picking is a special variant of wave management in which stock is first picked together for all
warehouse request items of the wave (sharing the same material and its attributes) and brought to an
intermediate storage bin. This step is called the withdrawal step. The second step is called the allocation
step in which picking for individual warehouse request items takes place from the intermediate storage bin.
You can simulate the results of a wave release. Simulating the wave gives the warehouse clerk an overview
of the wave release in terms of warehouse tasks, warehouse orders, pick-HUs, and workload without actually
releasing the wave. In this way, the warehouse clerk is able to identify errors that would occur during wave
release, for example, missing products.
With wave release, the system creates the warehouse tasks and warehouse orders to fulfill the warehouse
request items. Wave release can be manually performed, or alternatively you can define an automatic wave
release. In this case, a release time should be specified in the corresponding wave template option. For
example, you can define a cut-off time at 12:00 to collect all the relevant warehouse requests and a
subsequent release time at 12:10. Moreover, in the wave template you can define a retry interval in terms of
minutes. If the wave is released with errors (for example, there isn't enough stock for one of the wave items),
the system automatically schedules a new wave release job using the retry interval.
In the graphic below, you can see how flexibly the warehouse request items can be grouped into waves
depending on the customer-specific context.
6
For example, WR 100, 200, and 300 should be fulfilled in the same time frame. However you might need to
group the items according to the picking zone. The picking zone (for example, source storage type) can be
automatically determined by rough bin determination. Rough bin determination is triggered for the outbound
delivery order when a warehouse request is generated and the system determines the source storage data
based on the stock removal strategies. Depending on the time frame and source storage data, the system
may group the items in more than one wave accordingly.
Table /SCWM/WAVEITM contains the warehouse request item reference (fields RDOCID, RITMID, and
SPLIT_ID). When creating the warehouse task by wave release, the system updates the wave item
reference in table /SCWM/ORDIM_O. The information is kept in tables /SCWM/ORDIM_L and
/SCWM/ORDIM_C too. Field L2SKA in tables /SCWM/ORDIM_O, /SCWM/ORDIM_L, and /SCWM/ORDIM_C is
used to specify which step the warehouse task in a two-step picking scenario is for (for example, withdrawal,
allocation, or direct picking). For information about these tables, see chapter Warehouse Task Database
Tables.
Selection of Waves
The following function modules can be used for additional developments to select waves:
7
/SCWM/WAVE_SELECT_EXT Select multiple waves based on different n times
attributes (for example, product or
warehouse request).
Processing of Waves
The following function modules can be used for additional developments to process waves:
8
COMMIT WORK or ROLLBACK needs to
be called after processing this function
module.
This function module creates update
task records.
/SCWM/WAVE_MERGE_EXT Merge two or more waves together. As 1 time
a result, the system creates a new
wave that includes all the items of the
source waves.
COMMIT WORK or ROLLBACK needs to
be called after processing this function
module.
This function module creates update
task records.
/SCWM/WAVE_SPLIT_EXT Split wave items from the current wave 1 time
and assign them to a new one.
COMMIT WORK or ROLLBACK needs to
be called after processing this function
module.
This function module creates update
task records.
/SCWM/WAVE_RELEASE_EXT Release one or more waves. 1 time
COMMIT WORK or ROLLBACK needs to
be called after processing this function
module.
This function module creates update
task records.
/SCWM/WAVE_SIMULATE_EXT Return the results of the wave release 1 time
simulation for one or more waves.
Note that most of the above listed function modules provide the possibility to manage the COMMIT WORK as a
parameter.
Sample Coding
Wave selection, run wave simulation to display data on a custom user interface (UI), and release wave
based on user decision.
REPORT zewm_test_wave_rel.
PARAMETERS:
DATA:
ls_wave TYPE /scwm/s_wave_no,
lt_wave TYPE /scwm/tt_wave_no,
lt_wavehdr TYPE /scwm/tt_wavehdr_int,
lt_waveitem TYPE /scwm/tt_waveitm_int,
lt_ltap_vb TYPE /scwm/tt_ltap_vb,
lt_missing TYPE /scwm/tt_missing_sim,
lt_ordim_o TYPE /scwm/tt_ordim_o_int,
lv_severity TYPE bapi_mtype,
lt_bapiret TYPE bapirettab.
START-OF-SELECTION.
9
CALL FUNCTION '/SCWM/WAVE_SELECT_EXT'
EXPORTING
iv_lgnum = p_lgnum
iv_rdoccat = wmegc_doccat_pdo
it_wave = lt_wave
IMPORTING
et_wavehdr = lt_wavehdr
et_bapiret = lt_bapiret
ev_severity = lv_severity.
IF lv_severity CA 'EA' OR lt_wavehdr IS INITIAL.
"wave doesn't exit
MESSAGE e003(/scwm/wave) WITH p_lgnum p_wave.
RETURN.
ENDIF.
* Show results on UI
"show WTs(lt_ltap_vb) and missing items(lt_missing) in your own UI
10
Warehouse process categories 1 (Putaway), 2 (Stock Removal), 3 (Internal Warehouse Movement), and 8
(Cross-Line Stock Putaway) correspond to warehouse tasks. Warehouse process categories 4 (Physical
Inventory), 5 (Goods Receipt Posting), 6 (Goods Issue Posting), and 7 (Posting Change) correspond to
goods movements.
Depending on the process scenario (for example, putaway or stock removal), the system runs the putaway
or picking strategies to determine the optimal destination or source data during warehouse task creation:
• Putaway strategies: The putaway strategies are used to determine the best destination bin for a
putaway process or an internal warehouse goods movement. The strategies run during warehouse
task creation. For more information, see Storage Bin Determination for Putaway.
• Removal strategies: The removal strategies are used to determine a storage bin and quants for stock
removal. They run during warehouse task creation, rough bin determination, posting changes, and to
show the stock that can be possibly removed during warehouse task creation for outbound delivery
orders. The determination of the suitable storage bins occurs after the system determines a storage
type based on the storage type search process set in Customizing. The search for a quant occurs
within a storage type or within a storage type group (the storage type group is commonly used in the
strict FEFO/FIFO removal strategy). For more information, see Storage Bin Determination for Stock
Removal.
The putaway strategy and stock removal strategy results can be influenced using the quantity classification.
The quantity classification represents the packaging level according to the warehouse task quantity (for
example, a full pallet or cartons). For example, you might need to pick full pallets from a rack storage type
and the carton quantities from a pick-face storage type. In this case, the packaging levels and their quantity
classifications can be specified using the packaging specifications. In Customizing, it’s possible to determine
different storage type search sequences and stock removal rules depending on the quantity classification.
11
If you don't use packaging specifications, the quantity classification can be determined based on the product
unit of measures. In Customizing, it’s indeed possible to assign a quantity classification to these unit of
measures.
Storage Control
In a warehouse, many of the movements are complex and they often require several interim storage bins.
There are various possible reasons for this complexity, for example, additional processes may be needed or
the layout of the warehouse mightn't allow a direct movement.
For more information, see Process-Oriented Storage Control (putaway) and Process-Oriented Storage
Control (stock removal).
Layout-oriented storage control is normally used when stock movements in the warehouse don't travel
directly from a source storage bin to a destination bin. Instead, stock movements travel through one or
several intermediate storage bins. This might be because of the physical layout of the warehouse or because
an automated storage retrieval system (AS/RS) is in use. For example, layout-oriented storage control is
used in the material flow system to define conveyor segments.
12
Layout-oriented storage control requires HUs.
Example:
When moving a HU from Bin_A to Bin_Z, you need to move it initially to BIN_B and then to BIN_C due to
physical layout constraints. Each segment (BIN_A → BIN_B, BIN_B → BIN_C, and BIN_C → BIN_Z) may be
performed by different RF resources. To fulfill this scenario, you create Customizing entries for layout-
oriented storage control as follows:
For simplicity, we directly used the storage bins. However, in the system you can also use source or
destination storage types or storage groups.
In step 1, when the system creates the HU warehouse task from BIN_A to BIN_Z, the system creates an
active warehouse task from BIN_A to BIN_B (WT2) and an inactive warehouse task (status B: Waiting)
towards BIN_Z (WT1).
In step 2, when the WT2 is confirmed in BIN_B, the system updates WT1 with the source bin as BIN_B and
tries to activate WT1 towards BIN_Z. However, the system checks the layout-oriented storage control entries
again and creates a new open WT3 from BIN_B to BIN_C.
In step 3, when the WT3 is confirmed in BIN_C, the system updates WT1 with the source bin as BIN_C and
the system tries to activate WT1 towards BIN_Z. As there are no other relevant entries in layout-oriented
storage control, the WT1 status is set to Open.
13
For more information, see Layout-Oriented Storage Control.
DB Table Description/Comment
/SCWM/ORDIM_CS Confirmed warehouse tasks and goods movement documents for serial numbers
/SCWM/ORDIM_E Exception codes for warehouse tasks (in case of more than one exception code)
Database tables /SCWM/ORDIM_O, /SCWM/ORDIM_C, and /SCWM/ORDIM_L also contain the wave item
reference for the corresponding warehouse tasks.
In the graphics below, you can see how database table /SCWM/ORDIM_C is filled when a warehouse task is
confirmed by a resource in the RF environment:
14
In step 1, the resource picks up the pallet. The system creates an entry in /SCWM/ORDIM_C with position 1
(TAPOS = 0001) with BIN_A as the source storage bin and the resource as the destination. In addition, the
system updates the open warehouse task in /SCWM/ORDIM_O, changing the source data from BIN_A to the
resource.
In step 2, the resource drops off the pallet at the destination bin and the system confirms the warehouse task
by creating a second entry in /SCWM/ORDIM_C (TAPOS = 0002) using the resource as the source and
BIN_B as the destination storage bin. The entry in table /SCWM/ORDIM_O is deleted.
15
Selection of Warehouse Tasks
The following function modules can be used for additional developments to select warehouse tasks:
For customer reports and monitor nodes, for example, the use of function module /SCWM/TO_GET_WIP is
preferred instead of direct database access. Function modules /SCWM/TO_READ_* can be used only if the
warehouse task number is available.
16
This function module creates update task
records.
Function modules that are allowed multiple (n) times in a LUW are the preparation function modules to
create warehouse tasks on the UI. Until then, the warehouse tasks are only in the buffer. A single call of
function module /SCWM/TO_POST is needed inside a LUW to save them in the database. This concept is
valid for all the function modules *_INT listed in this chapter.
Sample Coding
Create warehouse tasks in the memory, show warehouse tasks on the UI, and save the warehouse tasks.
REPORT zewm_test_create_wt_whr.
PARAMETERS:
p_lgnum TYPE /scwm/lgnum MEMORY ID /scwm/lgn OBLIGATORY.
DATA:
lv_docno TYPE /scdl/dl_docno_int,
ls_read_options TYPE /scwm/dlv_query_contr_str,
ls_include_data TYPE /scwm/dlv_query_incl_str_prd,
ls_prepare_whr_int TYPE /scwm/s_to_prepare_whr_int,
lt_prepare_whr_int TYPE /scwm/tt_to_prepare_whr_int,
lt_ltap_vb TYPE /scwm/tt_ltap_vb,
lv_severity TYPE bapi_mtype,
lt_bapiret TYPE bapirettab,
lt_selection TYPE /scwm/dlv_selection_tab,
ls_selection TYPE /scwm/dlv_selection_str,
lt_items TYPE /scwm/dlv_item_out_prd_tab.
FIELD-SYMBOLS:
<fs_items> TYPE /scwm/dlv_item_out_prd_str.
SELECT-OPTIONS:
s_docno FOR lv_docno OBLIGATORY.
START-OF-SELECTION.
17
EXPORTING iv_whno = p_lgnum
iv_doccat = /scdl/if_dl_doc_c=>sc_doccat_out_prd
it_selection = lt_selection
is_read_options = ls_read_options
is_include_data = ls_include_data
IMPORTING et_items = lt_items ).
CATCH /scdl/cx_delivery.
RETURN. "#EC NO_HANDLER
ENDTRY.
* Create WT to be shown in UI
LOOP AT lt_items ASSIGNING <fs_items>.
ls_prepare_whr_int-rdoccat = <fs_items>-doccat.
ls_prepare_whr_int-rdocid = <fs_items>-docid.
ls_prepare_whr_int-ritmid = <fs_items>-itemid.
APPEND ls_prepare_whr_int TO lt_prepare_whr_int.
ENDLOOP.
* Show WTs in UI
"Show WTs(lt_ltap_vb) and errors(lt_bapiret) in your own program
"In this example we simply use class cl_demo_output as illustration
cl_demo_output=>display( lt_ltap_vb ).
* The user decided to save the results using your custom UI.
* We proceed saving the WTs on Database.
CALL FUNCTION '/SCWM/TO_POST'
EXPORTING
iv_update_task = abap_true
iv_commit_work = abap_true
IMPORTING
et_bapiret = lt_bapiret
ev_severity = lv_severity.
IF lv_severity CA wmegc_severity_ea.
"error handling
"inform the user about issues during posting of WTs in your program (e.g. MESSAGE…)
ROLLBACK WORK.
/scwm/cl_tm=>cleanup( ).
ENDIF.
/scwm/cl_tm=>cleanup( ).
18
COMMIT WORK or ROLLBACK needs to be
called after processing this function
module.
This function module creates update task
records.
/SCWM/TO_CREATE_INT Create and save one or multiple n times
warehouse tasks only in the memory.
This function module is intended to show
the result on a UI. On the UI, the user can
decide whether to save the result or not.
This function module doesn't create
update task records.
/SCWM/TO_CREATE_MOVE_HU Create and save one or multiple HU 1 time
warehouse tasks.
COMMIT WORK or ROLLBACK needs to be
called after processing this function
module.
This function module creates update task
records.
/SCWM/TO_CREA_HU_INT Create and save one or multiple HU n times
warehouse tasks only in the memory.
This function module is intended to show
the result on a UI. On the UI, the user can
decide whether to save the result or not.
This function module doesn't create
update task records.
/SCWM/TO_POST 1 time
Save the warehouse tasks and update the
delivery documents.
This function module creates update task
records.
Recommendation: In Business Add-In (BAdI) implementations, you shouldn't use function modules with
only one call allowed per LUW (for example, because the first step within the function modules is to initialize
the internal memory). However, you can call the function modules with the addition AS SEPARATE UNIT
and send them as a qRFC (Queued Remote Function Call) in a separate LUW (see the sample code below).
Sample Coding
This sample code shows how a warehouse task is created with function module /SCWM/TO_CREATE using a
separate queue. For the queue name, the prefix WMZZ is proposed here. The EWM standard uses the queue
prefixes WMTH, WMTR, and WMTP, for example. An entire list can be found in type group WMEGC. In rare cases,
it may make sense to use a standard queue prefix for your customer implementation. If you decide to use
your own prefix, either use WM* or check in the queue monitor (transaction SMQR) to determine whether your
queue prefix is registered.
METHOD demo_move_hu.
"IMPORTING
"iv_lgnum TYPE /scwm/lgnum
"is_to_crea TYPE /scwm/s_to_create_int .
19
APPEND is_to_crea TO lt_create.
MOVE:
'WMZZ' TO ls_queue-queue,
iv_lgnum TO ls_queue-queue+4,
is_to_crea-vlenr TO ls_queue-queue+8.
ls_queue-mandt = sy-mandt.
COMMIT WORK.
ENDMETHOD.
20
Warehouse Number, source
HUs, or warehouse orders.
Selection result is buffered.
In Customizing, you can configure warehouse order creation rules, which represent the flexible bundling
options of warehouse orders in standard EWM. The overall concept is depicted in the following graphic:
21
(1) Warehouse tasks are created in the system (for example, manually or by wave release).
(2) (3) The system groups the warehouse tasks by queue and activity area, and determines possible
warehouse order creation rules according to the settings made in the Customizing activity Define Search
Sequence of Creation Rules for Activity Areas.
(4) The system tries to apply the warehouse order creation rule according to the sequence specified in the
Customizing activity Define Search Sequence of Creation Rules for Activity Areas.
(5) The system sorts all the warehouse tasks based on the inbound sorting criteria of the warehouse order
creation rule.
(6) (7) At this stage, the system checks whether the sorted warehouse tasks pass the filter of the warehouse
order creation rule on item level and on subtotal level.
(8) The warehouse tasks that have passed the filters are considered when applying the limits specified in the
warehouse order creation rule.
(9) All the warehouse tasks that belong to one warehouse order are passed for packing proposal
determination according to the packing profile of the warehouse order creation rule.
At this stage, the minimum limit values specified in the limit profile of the warehouse order creation rule are
also applied. As a result of the packing proposal determination, the system determines the creation of pick-
HUs, the splitting of warehouse tasks (for example, to fit in a pick-HU), and the exclusion of warehouse tasks
from the current warehouse order.
(10) Finally, the warehouse tasks that belong to the current warehouse order are sorted according to the
sorting rule of the warehouse order creation rule.
(11) After all the warehouse tasks have been checked against the warehouse order creation rule, the
warehouse tasks that have not been bundled are checked against the next warehouse order creation rule
defined in Customizing.
If a warehouse task doesn't fit to any warehouse order creation rule, it's bundled with the rule Undefined
(UNDE), together with all the other warehouse tasks that don’t fit to any warehouse order creation rule.
22
If the system can’t find a warehouse order creation rule for an activity area in Customizing, the warehouse
tasks are bundled with the warehouse order creation rule Default (DEF). This means that all the warehouse
tasks for one delivery are bundled together if they are in the same activity area, except for the putaway
warehouse tasks where the system creates one warehouse order for each putaway-HU warehouse task
(fields FLGHUTO = X and TRART = wmegc_trart_put (1)).
Warehouse Order Execution in RF Environment
As described above, a warehouse order always contains warehouse tasks for the same activity area and
queue. The queue plays an important role for the execution in the RF environment. An RF resource is
assigned to a resource group, which contains all the relevant queues that the group is allowed to process. In
this way, a resource is able to process only warehouse orders that belong to a set of allowed queues.
A warehouse order can be directly assigned to a resource, for example, by the warehouse manager, or the
resource can manually select a warehouse order. When working in system-guided mode, the system
automatically selects and assigns the next warehouse order to an RF resource. In this way, a resource can
work on warehouse orders one after the other continuously. For more information about resource
management, see Resource Management.
For customer reports and monitor nodes, for example, using function module /SCWM/WHO_GET is preferable
to direct database access. Function module /SCWM/WHO_SELECT can be used only if the warehouse order
number is available.
Creation of Warehouse Orders
The following function modules can be used for additional developments to create warehouse orders:
23
be achieved using import parameter
IV_SIMULATE. The results are displayed
by setting parameter IV_SHOW_RESULT.
Recommendation: When dealing with the creation of warehouse tasks in custom developments, it’s
normally not required to create or manipulate warehouse orders with the function modules described above
because the system already creates them when posting warehouse tasks (that is, with function module
/SCWM/TO_POST). The system applies the warehouse order creation rule when posting the warehouse tasks
in the same LUW. For more information about how to influence warehouse order creation using BAdIs, see
chapter BAdIs During Warehouse Order Creation.
Processing Warehouse Orders
The following function modules can be used for additional developments for processing warehouse orders:
24
COMMIT WORK or ROLLBACK needs to be
called after processing this function
module.
This function module creates update task
records.
/SCWM/WHO_TO_UNASSIGN Unassign warehouse tasks from a 1 time
warehouse order.
COMMIT WORK or ROLLBACK needs to be
called after processing this function
module.
This function module creates update task
records.
Recommendation: There are several available BAdIs that are called during warehouse order creation (see
chapter BAdIs During Warehouse Order Creation). Most of the common customer requirements can be
covered by implementing these BAdIs to obtain the suitable warehouse orders.
25
Each HU can have multiple statuses, achieved by using a status object in table /SCWM/HUSTOBJ and a
status in table /SCWM/HUSSTAT. If a HU contains delivery-related stock, the reference to the delivery header
is also stored in table /SCWM/HUREF for performance reasons.
The HU item is the stock and specific inventory attributes. The HU item can be found in table /SCWM/QUAN
(see chapter Stock Database Tables). Each goods receipt or goods issue creates an entry in table
/SCWM/GMHUHDR, which stores the attributes of the HU at the time of the goods movement. There are also
corresponding /SCWM/GMHU* tables for the other tables, where quantity and hierarchy information is stored.
Planned shipping HUs are saved in different tables: header information is stored in table /SCWM/POHUHDR,
item information in /SCWM/POHUITM, alternative identifications in /SCWM/POHUIDENT, and reference to the
delivery header in /SCWM/HUREF.
Sample Coding
In the sample code, the user enters a stock identification number. According to the value entered, the HU
and its items are determined using function module /SCWM/HU_SELECT_GEN.
For more information about using stock identification, see Stock Identification.
REPORT zewm_test_hu_selection.
DATA:
lt_huhdr TYPE /scwm/tt_huhdr_int,
lt_huitm TYPE /scwm/tt_huitm_int,
lr_idplate TYPE rseloption,
ls_quan_att TYPE /scwm/s_quan_att.
SELECT-OPTIONS:
sr_idplt FOR ls_quan_att-idplate.
START-OF-SELECTION.
/scwm/cl_tm=>set_lgnum( p_lgnum ).
26
iv_filter_items = 'X'
IMPORTING
et_huhdr = lt_huhdr
et_huitm = lt_huitm
EXCEPTIONS
wrong_input = 1
not_possible = 2
error = 3
OTHERS = 99.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
RETURN.
ENDIF.
/scwm/cl_tm=>cleanup( ).
27
EMPTY_HU Instance Empty a HU, unpacking the HU items n times
to the current HU bin, a different bin, or
into another HU.
PRINT_HU_LABEL Instance Print the label for a HU. n times
SAVE Instance Save all actions in the database. 1 time
Sample Coding
The following is an example of how to repack stock from a source HU (P_SRC_HU) to a new HU. The system
uses the packaging material and work center specified as parameters. To execute the repacking activity, use
method EMPTY_HU, specifying the newly created HU as the destination.
REPORT zewm_test_repack_stock.
PARAMETERS:
p_lgnum TYPE /scwm/lgnum MEMORY ID /scwm/lgn OBLIGATORY,
p_src_hu TYPE /scwm/huident OBLIGATORY,
p_pkgmat TYPE /scmb/mdl_matnr OBLIGATORY,
p_wrkc TYPE /scwm/de_workstation OBLIGATORY.
DATA:
ls_wrkc TYPE /scwm/tworkst,
lv_matnr TYPE /scwm/de_matnr,
lv_matid TYPE /scwm/de_matid,
ls_huhdr TYPE /scwm/s_huhdr_int.
DATA:
lo_matid_converter TYPE REF TO /scwm/cl_ui_stock_fields.
28
IF sy-subrc <> 0.
"error handling
ROLLBACK WORK.
/scwm/cl_tm=>cleanup( ).
RETURN.
ENDIF.
* Read source HU
lo_packing->get_hu(
EXPORTING
iv_huident = p_src_hu
IMPORTING
es_huhdr = DATA(ls_src_hu)
et_huitm = DATA(lt_huitm) ).
* Save Results
lo_packing->/scwm/if_pack_bas~save(
EXPORTING
iv_commit = abap_true
iv_wait = abap_true
EXCEPTIONS
error = 1
OTHERS = 2 ).
IF sy-subrc <> 0.
"error handling
ROLLBACK WORK.
/scwm/cl_tm=>cleanup( ).
RETURN.
ENDIF.
/scwm/cl_tm=>cleanup( ).
29
2.6 Stock
EWM manages stock quantities through quants. A quant is the stock of a specific product with the same
characteristics in one storage bin, resource, transportation unit, or HU. The system manages different
batches of a product as different quants.
Quants are created and deleted in the EWM system by warehouse movements, such as goods receipts,
goods issues, posting changes, or warehouse tasks. The quantity of a quant is increased when stock of the
same material with the same properties (for example, the same stock type, same batch, and same owner) is
moved to the same location in the warehouse (for example, to the same HU or storage bin with unpacked
stock). In this case, the two separate quants merge into one. This is also called merging of quants.
The quantity of a quant is reduced by moving a subset of this quant to another location or by defining quant-
separating properties for a subset of this quant with a posting change. For example, a posting change from
free stock (F2) to blocked stock (B6).
The system creates a new quant when a product is put away in an empty bin. When you clear the stock from
the warehouse, the system automatically deletes the associated quant. EWM saves, among other things, the
following information in the data record of the quant:
• Product
• Batch
• Owner
• Party Entitled to Dispose
• Stock Type
• Reference to Special Stock (for example, sales order, project, or vendor consignment)
• Quality Inspection Document Reference
If even one field of the key stock attributes of a quant to be stored differs from the existing quant, the two
quants can't be merged.
Physical Stock and Available Stock
Physical stock shows the quants currently in a location (storage bin, resource, or transportation unit). Each
quant is listed individually, and the full quantity is displayed, completely independently of open warehouse
tasks. The physical stock represents the basis for the calculation of the available stock.
The available stock is the stock that is available for the creation of warehouse tasks.
Example: If there are ten pieces of physical stock of a material and there's already an open (or inactive)
warehouse task for six pieces of this stock, four pieces are still available for creating additional warehouse
tasks. Therefore, the available stock is four pieces.
The available stock can have different aggregation levels, depending on the following Customizing settings
in the corresponding storage type:
30
• Level of available quantity (field /SCWM/T331-AVQLVL): The level of the available quantity can be at
either storage bin level or the highest-level HU level.
The stock removal strategies deal with the available quantity. If this is at storage bin level, the system
creates the warehouse task without reference to a HU. This means that the created warehouse task
doesn't contain a specific HU. You must enter the HU during warehouse task confirmation. The
warehouse employee can select any HU from the given source storage bin. This scenario could be valid
for a bulk storage type, for example.
If the available quantity is defined at the highest-level HU level, then the source HU is determined as soon
as you create the warehouse task. The warehouse employee then needs to remove the product from this
HU. This scenario could be valid for normal racks and work centers, for example.
• Available quantity for batches (field /SCWM/T331-AVQBTC): The available quantity for batches specifies
whether the available quantities are saved with or without reference to each batch.
If the available quantity is not batch-specific, this means that the warehouse requests should also be non-
batch-specific. If you generally create warehouse requests for specific batches, then you should manage
the available quantity for specific batches. For non-batch-specific available quantities, the warehouse task
is also created as non-batch-specific, and the batch has to be entered when confirming the warehouse
task.
For packed stock, the GUID_PARENT is always the lowest-level HU, that is, the HU that directly contains the
stock. The GUID_PARENT is the GUID_HU of the HU that is assigned to the HU number in LIME index table
/SCWM/HU_IW01 and in HU header table /SCWM/HUHDR. For more information, see chapter HU Database
Tables).
For unpacked quants on storage bins, the GUID_PARENT is related to a dummy HU (with the virtual HU
indicator VHI = A in table /SCWM/HUHDR).
Available Stock
GUID_PARENT and GUID_STOCK is also the technical stock key for table /SCWM/AQUA (Available
Quantities). However, the available quantities can be managed at different levels than physical stock (see
section Physical Stock and Available Stock in chapter Stock). Therefore, you must never take the
GUID_PARENT and GUID_STOCK of the physical stock to read the available stock and vice versa.
List of Database Tables
31
Index table for products (with
/SCWM/STOCK_IW03 or without batch) that are
assigned to a delivery or
inventory document
/SCWM/LOC_IW02 Resources
In general, reading the stock tables directly in a custom development is not recommended because there are
function modules and methods that can easily extract the required stock data.
Physical Stock
Function Module Use Case Allowed Calls per LUW
/SCWM/SELECT_STOCK Select physical stock using different n times
selection criteria (for example, product,
batch, or storage bins).
Available Quantities
32
Function Module Use Case Allowed Calls per LUW
/SCWM/AQUA_READ_MAT Read available stock for a given material n times
and stock attributes (for example, stock
type).
/SCWM/AQUA_SELECT Select available quantities using different n times
selection criteria (for example, product,
batch, or storage bins).
Change Stock
To create a posting change, for example, to change the stock type of a quant, use the following function
module:
For more information about managing stock repacking activities, see chapter Methods to Process Handling
Units.
Sample Coding
The following is an example of how to change the stock type from free to blocked for all the items of a HU.
REPORT zewm_test_change_stock_type.
PARAMETERS:
p_lgnum TYPE /scwm/lgnum MEMORY ID /scwm/lgn OBLIGATORY,
p_hu TYPE /scwm/huident OBLIGATORY,
p_cat TYPE /scwm/de_cat OBLIGATORY.
DATA:
lt_huitm TYPE /scwm/tt_huitm_int,
ls_header TYPE /scwm/s_gmheader,
lt_sitem TYPE /scwm/tt_spitem,
ls_sitem TYPE /scwm/s_spitem,
ls_quan TYPE /scwm/s_quan,
lv_severity TYPE bapi_mtype,
lt_bapiret TYPE TABLE OF bapiret2,
lv_item_id TYPE /lime/line_item_id.
* Read HU Data
CALL FUNCTION '/SCWM/HU_READ'
EXPORTING
iv_appl = wmegc_huappl_wme
iv_lgnum = p_lgnum
iv_huident = p_hu
IMPORTING
et_huitm = lt_huitm
33
EXCEPTIONS
deleted = 1
not_found = 2
error = 3.
IF sy-subrc <> 0.
"error handling
ENDIF.
lv_item_id = lv_item_id + 1.
ls_sitem-id = lv_item_id.
ls_sitem-id_group = '000001'.
ls_sitem-direction = wmegc_lime_post_transfer. "Movement: Transfer 'T'
ls_sitem-squant_set = 'X'.
ls_sitem-guid_hu = ls_huitem-guid_parent.
" Quantities
IF NOT ls_huitem-quan_t IS INITIAL.
ls_sitem-t_quan = ls_huitem-quan_t.
ELSE.
CLEAR ls_quan.
ls_quan-unit = ls_huitem-meins.
ls_quan-quan = ls_huitem-quan.
APPEND ls_quan TO ls_sitem-t_quan.
ENDIF.
ls_sitem-t_serid = ls_huitem-serid.
IF lv_severity CA wmegc_severity_ea.
ROLLBACK WORK.
/scwm/cl_tm=>cleanup( EXPORTING iv_lgnum = p_lgnum ).
"Error Handling
ELSE.
COMMIT WORK AND WAIT.
/scwm/cl_tm=>cleanup( EXPORTING iv_lgnum = p_lgnum ).
34
ENDIF.
Sample Coding
The following is an example of how to get available stock quantities for a product.
REPORT zewm_get_avl_stock.
PARAMETERS:
p_lgnum TYPE /scwm/lgnum MEMORY ID /scwm/lgn OBLIGATORY.
CLEAR lt_stock_mon.
* Show WTs in UI
35
"Show results in your own program
"In this example we simply use class cl_demo_output as illustration
cl_demo_output=>display( lt_stock_mon ).
36
3. EXTENSIBILITY
37
3.5 General Recommendations for BAdIs
The following chapters list the main BAdIs relevant for warehouse order processing. To avoid issues while
implementing these BAdIs, the following general recommendations are relevant:
• Ensure that you don’t implement “dangerous” coding
The following coding statements will cause side effects and are therefore forbidden:
− COMMIT WORK or ROLLBACK WORK: These statements (partly) end the logical unit of work (LUW).
Data inconsistencies may occur.
− CLEANUP: Any CLEANUP method is forbidden because it clears internal buffers.
− MESSAGE: Any MESSAGE commands (without using INTO) are forbidden because they will end the
program flow and can cause inconsistencies. For returning messages, use the proper exporting
parameter if provided (for example, ET_BAPIRET) or the log parameter if available (for example,
IO_LOG / IO_PROT).
− SAVE: Any standard SAVE method call from a BAdI is forbidden (because this could post data at a time
when it is not supposed to).
• Use a filter for the warehouse number
Normally BAdIs provide a filter that you can use to restrict a BAdI implementation to one or more
warehouse numbers.
• Check for a fallback class
Some BAdIs have a fallback class that's called if no active implementation or default implementation
exists for the BAdI definition with the current filter restriction. Therefore, when creating a custom BAdI
implementation, make sure that the fallback class is called at the beginning or at the end of it.
• Check for example classes
Some BAdIs provide example classes that can be used as reference. Example classes are useful for
understanding how a BAdI can be used. Furthermore, check whether an example class that covers your
specific business case is already available.
• Check the BAdI and method documentation
Read the BAdI and the method documentation for further details about the specific BAdI.
BAdI documentation is available in Customizing and in transaction SE18.
38
3.6 BAdIs During Wave Processing
Enhancement Spot: /SCWM/ES_WAVE
BAdIs: Wave Management
/SCWM/EX_WAVE_CAPA Capacity Check for Waves This BAdI allows you to influence
and change the capacity check
during the assignment of delivery
items to waves.
The BAdI is called for waves that
have a wave capacity profile in the
following situations:
• Wave creation
• Assignment or reassignment of
items to existing waves
• Automatic wave assignment
(pre-check)
• Changes to wave attributes
/SCWM/EX_WAVE_PARALLEL Influence on Parallelization of You can use this BAdI to influence
Waves whether the wave release and the
wave simulation occur in parallel.
/SCWM/EX_WAVE_PLAN Automatic Wave Assignment You can use this BAdI to influence
the automatic assignment of
warehouse request items to waves.
/SCWM/EX_WAVE_PLAN_BACKGRO Extension of You can use this BAdI to enhance
UND /SCWM/R_WAVE_PLAN_BACKGR the selection screen and the logic
OUND of the Background Wave
Generation report
(/SCWM/R_WAVE_PLAN_BACKGRO
UND).
An example implementation is
available in class
/SCWM/CL_EI_WAVE_PLAN_BG. It
demonstrates how to enhance the
selection of both the warehouse
request and the just-in-time (JIT)
call. The class also contains
example coding for a report that
39
contains the required sub-screen
for the additional fields in method
SCREEN_ENHANCEMENT_EXAMPLE.
In the example, the fields Priority
and Control Cycle are added to the
selection screen as custom fields.
They are ready for input when the
document category is WMR (stock
transfer), otherwise they are read-
only. When the user runs the
report, the selections from the
custom fields are stored in the
instance of
/SCWM/CL_EI_WAVE_PLAN_BG.
Report
/SCWM/R_WAVE_PLAN_BACKGROU
ND then calls this instance of the
BAdI implementation, which adapts
the selection criteria to consider the
custom fields.
/SCWM/EX_WAVE_RELEASE_RETR Control of Automatic Wave You can use this BAdI to control the
Y Release Retry system automatically trying to
release a wave again based on the
wave's header and item data.
When a wave is released with
errors, the system can try to
release the wave again
automatically at a later point in
time. In the standard system, you
can define one retry interval per
wave template. With this BAdI, it’s
possible to define whether the wave
release should be retried
automatically and the period of time
the system should wait before
retrying.
/SCWM/EX_WAVE_SAVE Change Wave Data When When waves are saved, you can
Saving use this BAdI to change the data of
the wave headers and wave items.
For this, the system transfers the
tables of the wave headers and
wave items to this BAdI. Using
export parameter EV_CHANGED, the
system is informed that changes
have been made in the BAdI.
You can change only non-critical
fields. If fields that are contained in
structures
/SCWM/S_WAVEHDR_NOCHG (for the
wave header) or
/SCWM/S_WAVEITM_NOCHG (for
the wave item) are changed, the
system doesn't copy these changes
to the wave. You also can't add any
new wave headers or wave items,
or delete existing entries.
40
You must consider the consistency
of the changed data when making
changes. For example, the wave
category and wave type can be
changed in the BAdI. However, the
system doesn't check whether the
changed wave category or wave
type already exists. For this reason,
you must implement ad-hoc checks
within this BAdI.
/SCWM/EX_WAVE_SIMULATE Processing After Wave You can use this BAdI to add
Simulation additional messages in the wave
simulation log and influence the
simulation status of the wave
header.
You can also use this BAdI to
trigger follow-on actions after the
wave simulation.
An example implementation is
available for this BAdI
(/SCWM/CL_EI_WAVE_SIMULATE
). You can use this example
implementation to unassign
unfulfilled wave items, that is, any
wave item without the simulation
status Wave Can Be Fulfilled. Only
successfully simulated wave items
remain in the wave. The wave
header simulation status is set to
green.
/SCWM/EX_WAVE_UI_SELECTION Enhancement of Selection of You can use this BAdI to enhance
WRs in Wave UI the selection screens with user-
defined fields for the selection of
warehouse requests in transaction
/SCWM/WAVE (Maintain Waves).
41
warehouse process type based on
custom logic. It’s required to enable
automatic wave creation for the
new warehouse process type,
otherwise an error is raised.
/SCWM/EX_WAVE_2STEP_OPT_CH Change of Optimization for Two- You can use this BAdI to influence
G Step Picking the optimization of two-step picking.
Method DISABLE_OPTIMIZATION
allows you to skip the optimization
for a wave, to provide a list of
products that should not be
optimized, and to filter the units of
measure that can be used in
optimization.
Note: Don't add additional units of
measure to changing parameter
CT_UOMS_PER_PRODUCT.
Method
CHANGE_TWO_STEP_PICKING
allows you to change the two-step
picking status for each wave item
after optimization, as well as to set
or reset the optimization status of
the wave. Field
CV_WAVE_OPTIMIZATION_STATU
S must be set to X to take over the
changes to the two-step picking
indicator in changing parameter
CT_WAVE_ITEM_TWO_STEP. If you
clear
CV_WAVE_OPTIMIZATION_STATU
S, all updates in
CT_WAVE_ITEM_TWO_STEP are
disregarded.
This method is called even if the
optimization from the first method is
skipped. Therefore, you can
implement a simple optimization
algorithm with this BAdI by always
skipping the optimization and
programming specific logic in
method
CHANGE_TWO_STEP_PICKING.
An example class is also available
for this BAdI
(/SCWM/CL_EI_WAVE_2STEP_OP
T_CHG).
42
logic is to pick larger units of
measure.
For more information, see the BAdI
documentation.
/SCWM/EX_WAVE_WITHDRAW_WPT Change of Warehouse Process You can use this BAdI to change
Type for Withdrawal Task the warehouse process type for the
warehouse tasks that are created
for the withdrawal step of the two-
step picking process. The BAdI is
called during wave release for the
withdrawal step, during wave
simulation for waves that are
relevant for two-step picking, and
during the optimization of two-step
picking.
Example class
/SCWM/CL_EI_WAVE_WITHDRAW_
WPT is also available.
43
/SCWM/EX_DLV_TOWHR_PTDL_DET Determine Putaway Delay You can use this BAdI to
redetermine the time for a
putaway delay during
warehouse task creation.
/SCWM/EX_DLV_TOWHR_PTDL_JOB Creation of Warehouse Task in If you work with putaway delays,
a Job Through Putaway Delay you can use this BAdI to
reassemble the packages of
warehouse tasks generated in a
job.
/SCWM/EX_DLV_TOWHR_PTO_CREA Transfer of Additional Data of You can use this BAdI to
Warehouse Request to transfer additional data from the
Product WT Generation delivery to the product
warehouse task creation.
/SCWM/EX_DLV_TO_BD_CREA_WT Bin Denial: Decide Whether In a pick denial scenario, you
Alternative Warehouse Tasks can use this BAdI to suppress or
Should Be Created or Not allow the alternative warehouse
task creation.
/SCWM/EX_CORE_CR_ABORT Termination of Warehouse You can use this BAdI to suppress the
Task Creation creation of a product warehouse task.
For example, depending on specific
business conditions, it’s possible to
avoid the creation of a pick warehouse
task that would trigger an under-delivery
scenario. For a concrete example, see
class
/SCWM/CL_EI_WT_CR_ABORT_PACK.
/SCWM/EX_CORE_CR_AQUA_DATA Data Filling for Available You can use this BAdI to fill user-defined
Quantities fields in table /SCWM/AQUA, which
represent the available quantities.
/SCWM/EX_CORE_CR_DEL_ITM Prevent Deletion of Items This BAdI is executed when the system
deletes a warehouse task that was
created temporarily. You can update
your own temporary table if required or
reset updates that have already
occurred when creating the temporary
warehouse task.
/SCWM/EX_CORE_CR_INT_CR Internal Warehouse Task You can use this BAdI to update
Creation customer-specific fields at warehouse
task level.
/SCWM/EX_CORE_CR_POST Update Created WTs This BAdI is triggered during the posting
of the warehouse task creation in the
database. The BAdI is intended to
enable the triggering of follow-up
44
actions, for example, using qRFC
technology.
/SCWM/EX_CORE_CR_SCRAP_ZER Create WTs for Scrapping You can use this BAdI to enable the
O Without Picking Quantity creation of warehouse tasks for
scrapping without picking quantities.
/SCWM/EX_CORE_CR_SN_COMBIN Combine Quants for Serial You can use this BAdI when searching
E Numbers According to for specific serial numbers. If the system
Available Qty finds quants for the specified serial
numbers, this BAdI enables the system
to combine the quants corresponding to
the level of available quantity (storage
bin or HU) set in the storage type or
corresponding to the set available
quantity for batches (batch-specific or
non-batch-specific).
/SCWM/EX_CORE_CR_STOCK_ID Number Assignment for In the standard system, the stock
Stock Identification identification is formed from the
warehouse number and the current
warehouse task number, or a
warehouse task number drawn from a
number range. You can use this BAdI to
make your own number assignments
(for example, an SSCC number).
/SCWM/EX_CORE_CR_UPD_TAB_D Update Tables When This BAdI is executed when a
I Deleting a WT Created temporarily created warehouse task is
Internally deleted.
Putaway
Composite Enhancement Spot: /SCWM/ESC_CORE
Subordinate Enhancement Spot: /SCWM/ES_CORE_PTS Putaway Strategies
BAdI Definitions:
/SCWM/EX_CORE_PTS_BINGEN Change Generic You can use this BAdI to change the
Destination Storage Bin Customizing setting WT Generic for a
Search During WT storage type when creating warehouse
Creation tasks. The BAdI is called during the
creation of every single warehouse task
to influence the Customizing setting for
a warehouse task individually.
/SCWM/EX_CORE_PTS_BTSQ Search Sequence of Bin You can use this BAdI to control which
Type bin types are considered during
warehouse task creation for destination
storage bin determination.
/SCWM/EX_CORE_PTS_CAPACHECK Determination of Capacity Capacity check is a warehouse core
Check Result (for Whse function that is used during creation or
Task) change of a warehouse task to
determine whether the destination bin
or destination HU has enough free
capacity, such as, weight, volume, and
capacity factor. The early capacity
45
check is used to search for possible
storage bin types before the actual
storage bin is determined.
/SCWM/EX_CORE_PTS_DET_PRIO Specify Priority of Storage You can use this BAdI to influence the
Type/Stor.Section/Stor.Bin priority with which storage types,
Type storage sections, and bin types are
retained or changed when creating
warehouse tasks in the destination
storage bin determination. This defines
which storage types, storage sections,
and bin types are checked for a
matching destination storage bin, and
the sequence in which they are
checked.
/SCWM/EX_CORE_PTS_EMPTY_BIN Empty Bin Determination You can use this BAdI to select empty
bins according to customer-specific
requirements. The BAdI method is
called before the standard putaway
strategy for empty bins is performed.
/SCWM/EX_CORE_PTS_FILT_SORT Filter and Sort Possible You can use this BAdI to filter and sort
Storage Bins destination bin candidates for storage
types in different contexts.
This BAdI is called with normal or bulk
storage behavior when the system
searches for bins for additional
quantities. In this case, you can sort or
filter the available stock that was found
in storage bin candidates. You can't
append additional destination data in
this context.
This BAdI is also called when searching
for empty destination bins, to sort or
filter the list of candidates based on
data that was either selected from the
database or from a buffered table if
multiple requests are handled within the
same LUW. In both cases, you can sort
or filter the candidates, you can't
append additional destination data in
this context.
When using a near fixed bin scenario,
the BAdI is called to allow you to sort or
filter storage bin candidates that are
located in the reserve storage type of
the putaway strategy used. You can
append additional destination data in
this context. For example, this can be
used to assign a reserve bin in an aisle
that differs from the aisle of the related
fixed bin.
The different contexts can be
distinguished by the changing
parameters provided. The system runs
this BAdI when a warehouse task is
created.
46
When searching for empty bins, the
system uses a buffer when calling the
BAdI for identical destination data
multiple times in the same LUW. As a
result, any filtered candidates that were
removed in a BAdI implementation will
not be provided again in the next calls
in the same LUW.
/SCWM/EX_CORE_PTS_MD_ADDBIN Multi-Depth Bin You can use this BAdI to determine a
Determination for Addition storage bin that the current warehouse
to Stock task should add the HU to. The HU is
then placed in front of the last HU in the
storage bin.
/SCWM/EX_CORE_PTS_MIX Mixed Storage This BAdI runs when a warehouse task
is created. You can control whether an
addition to stock for a given quant is
allowed for a storage bin.
For example, when dealing with
additional custom attributes at quant
level (see chapter Enhancement of
Stock Structures), this BAdI can be
used to compare the attributes in
source and destination data. This
avoids mixing stock with different
properties. When adding a quant to an
existing quant, the custom attributes
are not relevant for keeping the quants
separated (see chapter Stock) and the
additional attributes might be lost due
to the merging of the quants.
/SCWM/EX_CORE_PTS_NBIN_BLK Determine Destination You can use this BAdI to influence the
Bin: Putaway Behavior: determination of a destination storage
Bulk Storage bin for the storage behavior bulk
storage.
/SCWM/EX_CORE_PTS_NBIN_NRM Determine Destination You can use this BAdI to influence the
Storage Bin: Putaway determination of a destination storage
Behavior: Normal bin for the storage behavior standard
warehouse.
/SCWM/EX_CORE_PTS_NBIN_PAL Determine Destination You can use this BAdI to influence the
Bin: Putaway Behavior: determination of a destination storage
Pallet bin for the storage behavior pallet
storage.
/SCWM/EX_CORE_PTS_NEAR_FB Near Fix Bin - Determine You can use this BAdI to filter and sort
Fix Bin the fixed bins that are considered as
bins that the reserve bin should be near
to in the picking storage type. The
system runs this BAdI when you create
a warehouse task for storage types with
a Near to Fixed Bin search rule for
empty bins.
/SCWM/EX_CORE_PTS_SECSQ Change Storage Section You can use this BAdI to influence
Search Sequence which storage areas are considered
when creating a warehouse task for
destination storage bin determination.
47
/SCWM/EX_CORE_PTS_SMAQ Decide Whether Maximum This BAdI can be used to influence the
Storage Type Quantity Is check for the maximum quantity in the
Considered storage type during the creation of
putaway warehouse tasks and internal
warehouse tasks.
The maximum quantity of a product in a
given storage type can be maintained
in the storage type view in the EWM
product master data.
/SCWM/EX_CORE_PTS_SRTSQ Change Putaway Search You can use this BAdI to influence the
Sequences sequence in which the system
searches for storage types, storage
sections, and storage bin types when
creating warehouse tasks for the
destination storage bin determination.
For this, the contents of import table
IT_SORTTAB must be copied into
export table ET_SORTTAB, and you
must assign a priority for each entry,
using field EVALPOS.
/SCWM/EX_CORE_PTS_TYPSQ Change Storage Type You can use this BAdI to influence
Search Sequence and which storage types (in terms of the
Putaway Rule storage type search sequence) are
considered when creating warehouse
tasks for destination storage bin
determination.
The putaway rule can be influenced
too.
In addition, the BAdI allows you to
update user-defined fields added as an
append to structure
/SCWM/INCL_EEW_S_ORDIM_PS.
48
The BAdI also allows you to update
user-defined fields added as an append
to structure
/SCWM/INCL_EEW_S_ORDIM_PS.
Stock Removal
Composite Enhancement Spots: /SCWM/ESC_CORE
Subordinate Enhancement Spot: /SCWM/ES_CORE_RMS Stock Removal Strategy
BAdI Definitions:
/SCWM/EX_CORE_RMS_DETERMINE Filter and/or This BAdI allows you to redetermine and re-sort
Sort Quants the available stock quantities, which allows you to
influence the results of the stock removal
strategies.
The BAdI is always called after the standard stock
determination and sorting, so that it’s possible to
predict what the standard stock removal strategies
would have done and influence the strategy
results when needed.
The BAdI also allows you to update user-defined
fields added as an append to structure
/SCWM/INCL_EEW_S_ORDIM_PS.
Be aware that there’s a fallback class that runs if
there’s no implementation for this BAdI. When
creating a custom implementation, the fallback
class and method should be called at the
beginning or at the end of it.
/SCWM/EX_CORE_RMS_DELETE Delete Quant You can use this BAdI to delete the internal buffer
Buffer for the available quantities. To do so, the
parameter EV_DELETE must be set to X.
The BAdI is run during warehouse task creation.
The BAdI allows you to update user-defined fields
added as an append to structure
/SCWM/INCL_EEW_S_ORDIM_PS.
/SCWM/EX_CORE_RMS_HUTYP Change HU You can use this BAdI to change the determined
Type HU type of a warehouse task. To do so, the HU
type must be set in parameter EV_HUTYP.
The BAdI also allows you to update user-defined
fields added as an append to structure
/SCWM/INCL_EEW_S_ORDIM_PS.
/SCWM/EX_CORE_RMS_HU_QUAN Change You can use this BAdI to change the quantity of
Quantity of a an HU, the alternative unit of measure of a
HU warehouse task, and the rounding level. It is also
possible to decide to skip the current quant.
The quantity for the HU is used only to round the
quantity of the warehouse task.
49
The BAdI also allows you to update user-defined
fields added as an append to structure
/SCWM/INCL_EEW_S_ORDIM_PS.
/SCWM/EX_CORE_RMS_OPUNIT Change You can use this BAdI to change the alternative
Operative unit of measure of a warehouse task. To do so,
Unit of the alternative unit of measure must be set in
Measure parameter EV_OPUNIT.
The BAdI also allows you to update user-defined
fields added as an append to structure
/SCWM/INCL_EEW_S_ORDIM_PS.
/SCWM/EX_CORE_RMS_QCLA_STR Change You can use this BAdI to change the quantity
Quantity classification that is used for the storage type
Classifier for search sequence determination. To do so, the
Storage Type quantity classification has to be set in parameter
Search CV_QUANCLA.
Sequence
The BAdI also allows you to update user-defined
fields added as an append to structure
/SCWM/INCL_EEW_S_ORDIM_PS.
/SCWM/EX_CORE_RMS_QUANTITY Change You can use this BAdI to change the required
Requested quantity (for under-deliveries and over-deliveries),
Quantity the HU type, and the alternative unit of measure
of the warehouse task. To do so you have to set
the parameter EV_SET to X.
For example, if a warehouse task for stock
removal is created for a small quantity and a
source pallet is determined in a rack, you can use
this BAdI to increase the quantity to be removed
in specific business conditions, so that the whole
HU is picked. However, the corresponding
outbound delivery order item should allow the
over-picking scenario.
The BAdI also allows you to update user-defined
fields added as an append to structure
/SCWM/INCL_EEW_S_ORDIM_PS.
/SCWM/EX_CORE_RMS_STRATEGY Change You can use this BAdI to change the determined
Storage Type stock removal search sequence and the
Search determined stock removal rule. To do so, set
Sequence parameters EV_REM_SSEQ and EV_REM_RULE.
and Stock To apply the stock removal rule, parameter
Removal EV_REM_RULE_SET must be set to X.
Rule
The BAdI also allows you to update user-defined
fields added as append to structure
/SCWM/INCL_EEW_S_ORDIM_PS.
50
/SCWM/EX_CORE_RMS_VERIFY Storage Bin You can use this BAdI to run a last check on a
Check storage bin that is chosen for stock removal. It’s
possible to prevent the system from using this
storage bin for stock removal. To do so, insert a
message in table ET_BAPIRET and set parameter
EV_SEVERITY to E or A. The system continues
with the next available quantity.
Sample Coding
In this example for BAdI /SCWM/EX_CORE_RMS_DETERMINE (BAdI: Filtering and/or Sorting of Quants), the
system considers only the full pallets as available. This excludes any partial pallets in a storage type. The
default packaging specification of the material is read to retrieve the quantity related to a full pallet.
This example can’t be use in a productive environment as it is. It must be adapted according to customer-
specific needs. For example, it could be necessary to restrict the execution only to specific source storage
types or warehouse process types.
METHOD full_pallet_filter.
DATA:
lv_tabix TYPE i,
ls_packspec TYPE /scwm/s_packspec_nested,
lv_message TYPE string,
ls_packspec_header TYPE /scwm/s_ps_header_int,
ls_pallet_level TYPE /scwm/s_ps_level_int,
lt_qmat TYPE /scwm/tt_aqua_int,
ls_qmat TYPE /scwm/s_aqua_int,
ct_qmat TYPE /scwm/tt_aqua_int,
lv_removed TYPE xfeld.
FIELD-SYMBOLS:
<ls_qmat> TYPE /scwm/s_aqua_int.
CLEAR: lv_tabix.
51
lv_tabix = sy-tabix.
IF lv_removed = abap_true.
" Set exporting parameters
et_qmat_cus = lt_qmat.
ev_set = abap_true.
" Handle a message (instruction MESSAGE … INTO …) for the UI and call method
“ io_log->add_message( EXPORTING ip_row = iv_row ).
ENDIF.
ENDMETHOD.
METHOD get_pack_spec.
DATA:
ls_condition TYPE /scwm/s_ps_cond,
ls_fields TYPE /scwm/pak_com_i,
ls_t300md TYPE /scwm/s_t300_md.
ls_fields-pak_locid = ls_t300md-scuguid.
ls_fields-pak_matid = iv_matid.
ENDMETHOD.
52
BAdI Definitions:
/SCWM/EX_CORE_LSC_CAPA Capacity Check in Layout- You can use this BAdI to conduct a
Oriented Storage Control capacity check in layout-oriented
storage control.
For example, in the context of a
material flow system (but not for case
conveyor logic), before the warehouse
task creation for the next
communication point, the system
checks the capacity of the segment
and communication point.
You can perform a customer-specific
capacity check for the segment
determined by layout-oriented storage
control and exclude it when creating a
warehouse task for the next
communication point, so the system
searches for alternative routes.
/SCWM/EX_CORE_LSC_LAYOUT Layout-Oriented Storage In the context of layout-oriented
Control storage control, you can use this BAdI
to change the determined destination
data or to prevent the redirection of the
warehouse task to an intermediate
point.
To prevent the usage of an
intermediate bin, clear parameters
CV_ILTYP, CV_ILBER, and
CV_ILPLA.
/SCWM/EX_CORE_PSC_PRCES Set Process Profile This BAdI runs if the storage control of
all packed stock of a HU is not the
same. The standard system
determines the storage control for a
HU from the first stock item in it. With
this BAdI, you can influence this
behavior.
53
/SCWM/EX_CORE_PSC_PROCESS Process-Oriented Storage You can use this BAdI in process-
Control oriented storage control to change the
determined destination data, to change
the warehouse process type, to skip
the intended process step, or to abort
warehouse task creation.
Example 1: In an outbound scenario,
the system might use a storage
process that includes the picking (for
example, OB01) and packing (for
example, OB02) process steps. If there
are several packing stations available,
you can use this BAdI to determine a
suitable one that the pick-HU should
be addressed to (according to
customer-specific needs).
Example 2: In inbound processing, the
system might use a storage process
that includes inbound packing and
putaway process steps. Depending on
the contents of the HU (mixed or
homogeneous HU), you can use this
BAdI to dynamically skip the inbound
packing step.
54
BAdI Definitions Description Use Case
stock belonging to the Available
Quantity table, which can improve the
performance for storage bins with a
large number of stock items, while
calculating the available quantity at bin
level.
Caution: These fields might be relevant
for the stock removal strategies, for
example, the goods receipt date for the
first-in first-out (FIFO) stock removal
rule. Set the export parameter in the
BAdI only if the stock removal strategy
doesn't take any of the listed fields into
account and the data isn't required for
any overviews (for example, stock
overview).
All other fields of the Available
Quantity table, such as the quantity,
location, and HU data, are updated as
usual.
/SCWM/EX_CORE_CO_CHECK_CONF Check During With this BAdI, you can prevent the
Confirmation warehouse task confirmation or
cancellation based on customer-
specific criteria.
/SCWM/EX_CORE_CO_HU_PSHUREF Control Planned HU You can use this BAdI to overrule the
Reference for Full Pallet standard check for the decision to add
Withdrawal the reference to the planned shipping
HU to the HU being withdrawn. The
standard check happens at full pallet
withdrawal.
The standard decision to add the
planned shipping HU to the HU as a
reference upon full pallet withdrawal is
based on the equality of the HU and
the planned shipping HU, based on
packaging material, dimensions, and
quantities. It’s also possible to optimize
these checks according to customer-
specific needs in the Customizing
activity Control Planned HU Reference
for Full Pallet Withdrawal, which allows
the deactivation of some of the
standard checks.
/SCWM/EX_CORE_CO_HU_SAVE HU Updates When You can use this BAdI to update
Saving customer-specific data in the HUs due
to warehouse task confirmation.
This BAdI is called when posting
warehouse task confirmations.
/SCWM/EX_CORE_CO_IMPORT Change Import This BAdI runs when a warehouse task
Parameters When is being confirmed. You can change
Confirming WT the import parameters that are
transferred.
/SCWM/EX_CORE_CO_POST Posting of Confirmed You can use this BAdI to update
Warehouse Tasks customer specific data or to trigger
follow-up actions.
55
BAdI Definitions Description Use Case
Note that BAdI /SCWM/EX_CORE_CR_AQUA_DATA (BAdI: Data Filling for Available Quantities) can be called
during the warehouse task confirmation too because the warehouse task confirmation can create a new
entry in table /SCWM/AQUA (or add to an existing one). In addition, it's possible to update the user-defined
fields in table /SCWM/AQUA.
Also note that the following BAdIs aren't called if a warehouse task is created with immediate confirmation:
56
• /SCWM/EX_CORE_CO_IMPORT (BAdI: Change Import Parameters When Confirming WT)
• /SCWM/EX_CORE_CO_CHECK_CONF (BAdI: Check During Confirmation)
• /SCWM/EX_CORE_CO_SN_FORCE (BAdI: Force Serial Number Input During Confirmation)
57
BAdI Definitions Description Use Case
58
BAdI Definitions Description Use Case
59
BAdI Definitions Description Use Case
/SCWM/EX_WHO_PACK_DIM Check for Length, You can use this BAdI to check
Width, Height whether a warehouse task fits into the
proposed packaging material based on
length, width, and height.
/SCWM/EX_WHO_PACK_DSTGRP Check Whether You can use this BAdI when the
Warehouse Task Is to consolidation group of the warehouse
Be Skipped Where task deviates from the consolidation
DSTGRP Varies groups already intended for a
packaging material and the maximum
number of consolidation groups for a
packaging material has already been
reached (that is, the limit value per HU
set in Customizing).
You can use this BAdI to ensure that
the assignment of the warehouse task
to this packaging material is not
canceled, but continued with the next
warehouse task. The BAdI is linked to
the configuration option Skip WT of the
packing profile of the warehouse order
creation rule.
Note: The system considers the
warehouse tasks one by one according
to the sorting rule specified in
Customizing. It’s possible to sort the
warehouse tasks according to
consolidation group.
/SCWM/EX_WHO_HDR_PROCTY Overwrite Warehouse You can use this BAdI to overwrite the
Process Type on WO warehouse process type determined
Level on warehouse order level by
warehouse order creation. The value is
saved in table field /SCWM/WHO-
HDR_PROCTY.
If this BAdI is not implemented, on
warehouse order level, the system
considers the warehouse process type
of the first warehouse task contained in
the warehouse order.
/SCWM/EX_WHO_LOGPOS_EXT_DET Determination of You can use this BAdI to update the
Planned HU Positions warehouse tasks in a warehouse order
for Picking with a planned HU position (field
DLOGPOS_EXT_WT).
This field is displayed in the RF picking
transaction and helps to choose the
correct HU position on distribution
equipment. The position in the
warehouse task can contain the
position IDs of several nested HUs if
they are used. When working with
nested HUs, you can define and use a
60
BAdI Definitions Description Use Case
Note that BAdI /SCWM/EX_CORE_PSC_PROCESS (BAdI: Process-Oriented Storage Control) is also called
during the application of warehouse order creation rules in order to redetermine the destination data for the
corresponding warehouse tasks.
Example:
In an outbound scenario, three warehouse tasks are created by the wave release. All the warehouse tasks
initially have the staging bay as the destination bin according to the staging area determination that took
place at outbound delivery item level. During the posting of the warehouse tasks, the system determines the
suitable warehouse order creation rule and groups all of them together in the same warehouse order, based
on the warehouse order creation rule’s settings. A storage process is specified in Customizing for the
warehouse order creation rule, and it includes the following process steps: Picking (OB01), Packing (OB02),
and Staging (OB03). For the packing step, a default destination bin is specified in Customizing relevant for
process-oriented storage control. Therefore, when applying the warehouse order creation rule, the system
changes the destination data for all three warehouse tasks. However, at this stage, the system calls BAdI
/SCWM/EX_CORE_PSC_PROCESS to influence the destination data of the warehouse tasks.
The layout-oriented storage control BAdI can also be used during the execution of the pick warehouse order
used. With the first pick warehouse task confirmation into a pick-HU, the system creates the HU warehouse
task to move the HU to the destination previously determined. Here, the system reads the layout-oriented
storage control Customizing to determine an intermediate bin and you can use BAdI
/SCWM/EX_CORE_LSC_LAYOUT to influence it.
61
BAdI Definitions Description Use Case
'MESSAGE ... INTO text' should
be output so that the system fields are
filled for outputting the error message.
In this case, the processing of the
goods movement is terminated, and
the error message is displayed.
An example class is also available:
/SCWM/CL_EI_CORE_GM_STOCK.
4. ADDITIONAL CONSIDERATIONS
4.1 General
• We recommend using dedicated function modules or methods to read or update warehouse order
processing objects. We don't recommend reading or updating warehouse order processing objects directly in
database tables.
• Don't use function modules belonging to function group /SCWM/L03A (EWM Kernel) in customer programs.
• Don't use function modules that are configured as an update module in customer programs.
• When creating a warehouse task for a delivery (for example, a handling unit (HU) loading task for an
outbound delivery), don’t use function module /SCWM/TO_CREATE or function
module/SCWM/TO_CREATE_MOVE_HU. Instead, use function module /SCWM/TO_CREATE_WHR.
• For posting changes, use only function module /SCWM/STOCK_CHANGE. Function module
/SCWM/GM_CREATE is not intended for customer use.
• Don’t use data from table /SCWM/AQUA to read tables for physical stock, especially as table fields
GUID_PARENT or GUID_STOCK might not be the same in tables for the same stock reference. Similarly,
don’t use the keys from tables for physical stock to read table /SCWM/AQUA.
• Don't change the source or destination storage bin or the source or destination HU of an existing warehouse
task except with designated Business Add-Ins (BAdIs). Source or destination data can be consistently
influenced by BAdIs belonging to enhancement spots /SCWM/ES_CORE_PTS (for putaway) and
/SCWM/ES_CORE_RMS (for stock removals).
62
• Although the BAdIs related to work centers (composite enhancement spot /SCWM/ESC_WRKC) are not listed
in chapter Extensibility, it's worth mentioning that BAdI /SCWM/EX_WRKC_UI_AFTER_SAVE (BAdI: Method
Called After Save) has a fallback implementation in implementation class
/SCWM/CL_EI_WRKC_UI_AFTER_SAVE. This fallback implementation is necessary to trigger the follow-up
warehouse task creation (according to the Customizing settings for process-oriented storage control) if the
HU is closed (either from the standard user interface (UI) or radio frequency (RF) UI, or from custom
development).
When dealing with a custom implementation of this BAdI, it’s necessary to include the call of method
AFTER_SAVE of fallback class /SCWM/CL_EI_WRKC_UI_AFTER_SAVE at the start or at the end of the BAdI
implementation. Otherwise, the follow-up warehouse task according to the settings for process-oriented
storage control is no longer automatically created.
• All BAdIs belonging to enhancement spot /SCWM/ES_WHO should only be used for their given purpose. For
example, don't change the source bin of an open warehouse task, but use the proper BAdI to influence the
source storage bin (for example, /SCWM/EX_CORE_RMS_DETERMINE (BAdI: Filtering and/or Sorting of
Quants)).
• Be aware that there are some limitations when dealing with layout-oriented storage control and process-
oriented storage control. For example:
o Layout-oriented storage control is not triggered for warehouse tasks with immediate confirmation.
o Although it’s possible to define alternative routes in Customizing for layout-oriented storage control (for
example, this can be useful in a material flow system), only the first entry is considered by the standard
Extended Warehouse Management (EWM) system. You must implement BAdI
/SCWM/EX_CORE_LSC_LAYOUT (BAdI: Layout-Oriented Storage Control ) to determine the proper
alternative.
o Once a HU has reached a certain process step of process-oriented storage control, you can't revert it to
a previous step using standard transactions. For example, if a process-oriented storage control includes
the steps picking, packing, and staging, and a HU has reached the staging step because it has been
placed in an outbound staging bay, you can't revert the process step back to packing using a warehouse
task.
In certain scenarios, layout-oriented storage control can be imitated by process-oriented storage control
with an external step that doesn't have an internal step assigned to it.
• You can’t initially call method /SCWM/CL_WM_PACKING->CHANGE_HUHDR and then function module
/SCWM/TO_CONFIRM in the same logical unit of work (changes to table /SCWM/HUHDR are not taken over if
a warehouse task is confirmed into that HU).
4.2 Performance
• Follow the performance best practices mentioned in the SAP Notes below:
1423066 – Optimization of the Performance in EWM
1896480 – High Throughput Processes - Best Practices
2091466 – Long Runtimes During GR, GI, or WT Confirmation when There Are Many Quants on One Bin
• When dealing with high-volume picking operations in an RF environment, activate the asynchronous delivery
update. In addition, evaluate whether it’s possible to activate the asynchronous pick warehouse task
confirmation and the asynchronous creation of pick-HU warehouse tasks. For more information, see
Improving Performance.
63
• Function modules such as /SCWM/TO_CREATE_WHR, /SCWM/TO_CONFIRM, and
/SCWM/TO_PREP_WHR_UI_INT have parameters of the type Tables. Avoid calling them in a loop because
that leads to performance issues.
• Make sure that custom Customizing tables that are accessed frequently by custom code are correctly
buffered. Frequently accessing custom unbuffered Customizing tables could lead to unnecessary database
load and performance can be affected.
Note:
When this checkbox is selected for a storage type, the following details are no longer updated for the storage
bins:
• Occupied weight
• Volume
• Free capacity
• Number of HUs
• Empty checkbox
Consequently, there is no further need for database locks on these bins and lock conflicts no longer occur.
• When dealing with storage types with the available quantity set at bin level, carefully evaluate the reading of
physical stock in BAdIs (for example, to influence the available stock using BAdI
/SCWM/EX_CORE_RMS_DETERMINE (BAdI: Filtering and/or Sorting of Quants)) because it may lead to
performance issues.
• If not already available in your current system release, implement SAP Note 2524109 to improve
performance during warehouse task confirmation to a storage bin with a large number of unpacked products.
• Use WAIT statements carefully. When processing a large number of objects, a WAIT instruction can
significantly affect performance if used incorrectly (for example, in a loop).
A new ATC (ABAP Test Cockpit) check category for EWM was introduced in SAP S/4HANA 2022 so that it’s
possible to improve custom developments.
64
The new ATC checks are grouped under this new category in the Code Inspector or ATC Check transaction,
as shown in the graphic below:
EWM-specific checks are available for deliveries, warehouse order processing, and PPF actions. The
following checks are relevant for the warehouse order processing area:
1. Function module call configured as update module: As mentioned in chapter General, function
modules configured as an update module should not be used in customer programs.
3. EWM PPF actions – schedule condition: A PPF action that runs independently from an application
context may lead to a double assignment if the action is called from another context. This may lead
to performance issues. The new ATC check is developed to check whether the application context
has been called and checked in the schedule condition.
An example where the context is called and checked is in the standard scheduling condition
/SCWM/WHR_VEH_CREATE_NEW for the PPF action /SCWM/PRD_CREATE_VEH (action profile
/SCWM/PRD_OUT).
65
EXPORTING
ip_problemclass = sppf_pclass_1
ip_handle = ip_protocol.
EXIT.
ENDIF.
IF NOT io_context->applctn = /scwm/if_dl_c=>sc_ppf_applctn_dlv.
* not a delivery application relevant object
ep_rc = 99.
MESSAGE e020(/scwm/delivery) WITH flt_val ip_ttype io_context->applctn flt_val
INTO lv_msg_dummy.
5. Check for calling WAIT statement in custom code: In custom code, avoid calling a WAIT
statement as it leads to performance issues.
Additional information about what to consider in your own programs can be found in the following guides:
How-to guides for EWM as part of SAP S/4HANA are available at the following link: EWM How-to Guides
66
www.sap.com/contactsap
© 2022 SAP SE or an SAP affiliate company. All rights reserved.
No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an SAP affiliate company.
The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors.
National product specifications may vary.
These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP or its affiliated companies shall not be liable
for errors or omissions with respect to the materials. The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty statements
accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.
In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related presentation, or to develop or release any functionality
mentioned therein. This document, or any related presentation, and SAP SE’s or its affiliated companies’ strategy and possible future developments, products, and/or platform directions and functionality are
all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason without notice. The information in this document is not a commitment, promise, or legal obligation
to deliver any material, code, or functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ materially from expectations. Readers are
cautioned not to place undue reliance on these forward-looking statements, and they should not be relied upon in making purchasing decisions.
SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other
countries. All other product and service names mentioned are the trademarks of their respective companies. See www.sap.com/trademark for additional trademark information and notices.