My Oracle Support Banner

SCHEDULE_ROP_DISTRIBUTION.SH Batch is Exiting with Status Code '1' When ROP Request is Already Queued (Doc ID 2500892.1)

Last updated on DECEMBER 04, 2019

Applies to:

Oracle Retail Warehouse Management System - Version 16.0 to 16.0.1 [Release 16.0]
Information in this document applies to any platform.


As documented in RWMS 16.0 Operations Guide, SCHEDULE_ROP_DISTRIBUTION.SH is expected to run every 5 minutes and RUN_DISTRIBUTION.SH runs every 15 minutes, there are times when a record in already present in DISTRIBUTION_QUEUE table for ROP (Re-Order Point) distribution and due to this data condition, SCHEDULE_ROP_DISTRIBUTION.SH batch exits which is expected behavior. But the script returns status code '1' (failure condition) and blocks the batch scheduler, expecting the business user to correct the error condition.

Expected Behavior: if a record exists in the DISTRIBUTION_QUEUE, it is expected behavior to exit immediately and therefore the shell script should exit the process with a "exit 0" (successful condition).

Steps To Recreate:
1. Ensure that DISTRIBUTION_QUEUE is empty,
2. Execute the SCHEDULE_ROP_DISTRIBUTION.SH. the process will execute successfully by adding a record in the table DISTRIBUTION_QUEUE.
3. Check output of command echo $? - the result is 0, meaning ended with success, without error.
4. Execute SCHEDULE_ROP_DISTRIBUTION.SH again. It exits after displaying "Error: ROP Replenishment has already been scheduled. Exitting..."..
5. Check output of command echo $? - the result is 1, which is wrong, it should be 0 so that it does not affect the batch scheduler execution.




To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.