Professional Documents
Culture Documents
1
Last Login: November 12, 2021 2:43 PM IST Rajasekaran (Available) (0) Contact Us Help
PowerView is On
Dashboard Knowledge Service Requests Patches & Updates Community
Give Feedback...
Copyright (c) 2021, Oracle. All rights reserved. Oracle Confidential.
Check Onhand With PL/SQL: Review Stock Picture For An Item in a Given Organization / Subinventory [Video] To Bottom
(Doc ID 268974.1)
Goal Yes
No
Solution
SQL Script
Document Details
Video
Script
Type:
Example Output HOWTO
Status:
PUBLISHED
References Last Major
Update: May 6, 2016
Last Oct 1, 2021
Update: English
APPLIES TO: Language:
Information Centers
How does one check onhand quantity levels with PL/SQL? Information Center: Oracle
Inventory Management
This script will provide snapshot for stock(material) for Item in an Organization / Subinventory. [1381258.2]
The script output will provide details with the following results:
Document References
Title Explanation Item Search Screen In 11.5.10
Do Not Show On Hand
Quantity on hand Onhand Quantity for the Item Quantity [296015.1]
Note : Do not enter input parameters in quotes, such as subinventory when prompted 'Stores',
SOLUTION
SQL Script
Video
https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=459011520045944&id=268974.1&displayIndex=10&_afrWindowMode=0&_adf.ct… 1/3
11/12/21, 5:16 PM Document 268974.1
Video - Step thru API call (02:59) Trouble seeing this video?
Script
set serveroutput on
prompt Enter
Inventory_item_id
accept item_id
DECLARE
L_api_return_status VARCHAR2(1);
l_qty_oh NUMBER;
l_qty_res_oh NUMBER;
l_qty_res NUMBER;
l_qty_sug NUMBER;
l_qty_att NUMBER;
l_qty_atr NUMBER;
l_msg_count NUMBER;
l_msg_data VARCHAR2(1000);
BEGIN
apps.inv_quantity_tree_grp.clear_quantity_cache;
dbms_output.put_line('Transaction Mode');
(
apps.INV_Quantity_Tree_PUB.Query_Quantities
p_api_version_number => 1.0
, p_is_revision_control=> false
, p_is_lot_control => FALSE
res oh :'||to_char(l_qty_res_oh));
dbms_output.put_line('Quantity res :'||to_char(l_qty_res));
https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=459011520045944&id=268974.1&displayIndex=10&_afrWindowMode=0&_adf.ct… 2/3
11/12/21, 5:16 PM Document 268974.1
dbms_output.put_line('Quantity ATR :'||to_char(l_qty_atr));
end;
/
Note: For p_tree_mode : Either reservation mode (1), Transaction mode, (2), Loose Only mode (3) or No LPN Reservation
mode (4). See the Oracle Manufacturing
details.
APIs and Open Interfaces Manual for more
Example Output
SQL> @onhand
Enter Organization_id
207
Inventory_item_id
Enter
163744
, p_organization_id => &org_id
old 22:
new 22: , p_organization_id => 207
=> '&Subinventory'
new 31: , p_subinventory_code => ''
Transaction Mode
Quantity on hand
:2390
Quantity res oh :2390
Quantity res :0
Quantity sug :0
Note: If there is onhand quantity in expired lots, the API will consider the expired lots as unavailable only if the parameter
"p_lot_expiration_date" is passed. This is mentioned in Bug 10281811
REFERENCES
Related
Products
Oracle E-Business Suite > Logistics > Logistics > Oracle Inventory Management > Material Status > Material Status
Keywords
API; AVAILABLE TO RESERVE; AVAILABLE TO TRANSACT; FND_API; INV_QUANTITY_TREE_PUB; ON HAND QUANTITY; ONHAND QUANTITY; OPEN INTERFACES; PARAMETER;
QUANTITY; STOCK ON HAND; SUBINVENTORY
Translations
Back to Top
Copyright (c) 2021, Oracle. All rights reserved. Legal Notices and Terms of Use Privacy Statement
https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=459011520045944&id=268974.1&displayIndex=10&_afrWindowMode=0&_adf.ct… 3/3