Sample: Implementing custom shortage reasons
A store implementer must be able to set up custom shortage reasons to suit business requirements, which allows store associates to choose the appropriate shortage reason while recording shortage for products during batch pick.
About this task
A store implementer can add custom shortage reasons in Sterling Business Center. The default, and only provided shortage reason is "Inventory Shortage".
When
a store associate selects a custom shortage reason in the RECORD
SHORTAGE window, the recordShortageForBatchPick
API
is run and the YCDhandleShortageForBatchLineUE
user
exit is invoked.
To implement your own logic to handle custom shortage reasons, refer to the sample code
available in the
<INSTALL_DIR>/jar/COM_Add-in/9.5_9.5/ycdbe.jar/com/yantra/pca/ycd/demo/
directory.
By default, the YCDhandleShortageForBatchLineUE
user
exit provides the logic to handle two sample shortage reasons: "Damaged"
and "Pick Later". The getCommonCodeList
API is called
with the CodeType
as YCD_PICK_SHORT_RESOL
to
retrieve the shortage reasons. You must configure the codeValue
for YCD_PICK_SHORT_RESOL
common
code as damaged
and picklater
for
"Damaged" and "Pick Later" shortage reasons respectively. When the
store associate applies the "Damaged" shortage reason, the behaviour
of the application is same as that for "Inventory Shortage". However,
when the "Pick Later" shortage reason is applied, all the batch related
attributes in the YFS_SHIPMENT_LINE
table, mainly StoreBatchKey
and BatchPickPriority
are
blanked out, which means the shipment line is removed from the batch.
To implement the YCDhandleShortageForBatchLineUE
user
exit, follow the procedure:
Procedure
- Select Applications Platform in Applications Manager.
- Select System Administration.
- Select User Exit Management.
- Select the
YCDhandleShortageForBatchLineUE
user exit. - Click the add icon to input the user exit implementation.
- In the Implement As a Java Class field that corresponds to the user exit, enter the fully qualified class name.
- Click Save.
Results
When a store associate selects a custom shortage reason while picking a product in a batch in
Sterling Store Engagement, the recordShortageForBatchPick
API validates the
shortage reason against the YCD_PICK_SHORT_RESOL
code type and then calls the user
exit.
For more information about user exits, see IBM® Sterling Order Management System: Javadoc.