Question & Answer
Question
API getInventorySnapshot calls readDemandUnionSummarizedDemandAddnl method multiple times when MaximumNumberOfItems=1000 in the input XML
Answer
When invoked the API getInventorySnapShot calls
readSupplyUnionSummarizedSupplyAddnlEx and readDemandUnionSummarizedDemandAddnl
methods with the clause: Inventory_Item_Key >= Last InventoryItemKey' to fetch
only 1000 supply and demand records at a time. It then processes these
supply/demand records.
If InventoryItems for these 1000
supply or demands records are less than MaximumNumberOfItems, then the API
calls the above methods again for the next 1000 supply or demand for remaining
Inventory Items. It then processes these supply and demands records.
This continues until it finds all Supply/Demand records for all
InventoryItems equal to MaximumNumberOfItems.
To
illustrate with an example, assume that there are 1000 Inventory Items and
these have 10,000 supply records.
The
getInventorySnapShot API invokes readSupplyUnionSummarizedSupplyAddnlEx to get
1000 supplies. Suppose, only 100 Inventory Items hold these supplies. The API
will then invoke readSupplyUnionSummarizedSupplyAddnlEx again for the next 1000
supplies. Supposing that only 100 Inventory Items hold the supply for these
Inventory Items, the cycle continues until it reads all 10,000 supplies.
This means that the API calls
readSupplyUnionSummarizedSupplyAddnlEx 10 times and fires the query 10
times.
A similar pattern occurs in case of Demand
records as well.
In order to optimize memory usage the
design of getInventorySnapShot API is such that, it gets chunks of 1000
supply/demand records.
Additional Info
If the attribute MaximumNumberOfItems in input XML of getInventorySnapShot
API is < 1000, then the batch size of the
readSupplyUnionSummarizedSupplyAddnlEx and readDemandUnionSummarizedDemandAddnl
methods equals the value of MaximumNumberOfItems.</div> <div> </div> <div>If
the attribute MaximumNumberOfItems in input XML of getInventorySnapShot API is
>= 1000 or if it does not have the MaximumNumberOfItems attribute, then the
batch size of the readSupplyUnionSummarizedSupplyAddnlEx and
readDemandUnionSummarizedDemandAddnl methods equals 1000.
The readSupplyUnionSummarizedSupplyAddnlEx and
readDemandUnionSummarizedDemandAddnl methods are called in batches to avoid out
of memory error. The logic explained above determines the size of the batch.
The maximum size of the batch is 1000, to avoid out of memory errors.
[{"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Not Applicable","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]
Historical Number
FAQ4516
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21517882