الانتقال إلى المحتوى
View in the app

A better way to browse. Learn more.

مجموعة مستخدمي أوراكل العربية

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

هل هناك Function أو جملة Select تقوم بإرجاع الكمية المحجوزة التي تظهر في شاشة ال OnHand

Featured Replies

بتاريخ:

هل هناك Function أو جملة Select تقوم بإرجاع الكمية المحجوزة التي تظهر في شاشة ال OnHand

حاولت البحث عنها ولكن دون جدوى

ومحتاجها في تقرير ضروري لو تكرمتم تساعدوني

محتاج اعرف بدلالة كل من الأورج والمخزن الفرعي والأيتم

الشغل واقف عليها لو تكرمتم

وجزاكم الله كل خير

بتاريخ:

SELECT


mp.organization_code
,si.secondary_inventory_name subinv
,msi.segment1 Item
,msi.description item_description
,mil.segment1 LOCATOR
,si.description subinv_desc
--,moqd.revision item_revision
,msi.primary_uom_code uom_code
,SUM(NVL(moqd.primary_transaction_quantity,0)) item_qty
FROM mtl_system_items_b msi
,apps.mtl_onhand_quantities_detail moqd
,mtl_secondary_inventories si
,mtl_item_locations mil
,mtl_parameters mp
WHERE 1=1
AND si.secondary_inventory_name = moqd.subinventory_code(+)
AND si.organization_id = moqd.organization_id (+)
AND moqd.organization_id = msi.organization_id(+)
AND moqd.inventory_item_id = msi.inventory_item_id (+)
AND moqd.locator_id = mil.inventory_location_id(+)
AND moqd.organization_id = mil.organization_id(+)
AND si.quantity_tracked = 1
AND mp.organization_id=msi.organization_id
AND mp.organization_code = &org_code
GROUP BY
mp .organization_code
,si.secondary_inventory_name
,msi.segment1
,msi.description
,mil.segment1
,si.description
--,moqd.revision
,msi.primary_uom_code

بتاريخ:

فى بريسديور جاخز ممكن يجبلك ال onhand وكميات تانية
inv_quantity_tree_pub.query_quantities


CREATE OR REPLACE FUNCTION APPS.xx_get_item_quantity (
  p_item_id	   VARCHAR2,
  p_org_id	    VARCHAR2,
  p_sub_code	  VARCHAR2,
  p_kind_return   NUMBER
)
  RETURN NUMBER
IS
  x_return_status		 VARCHAR2 (50);
  x_msg_count			 VARCHAR2 (50);
  x_msg_data			  VARCHAR2 (50);
  DATA				    VARCHAR2 (50);
  v_item_id			   NUMBER;
  v_org_id			    NUMBER;
  v_qoh				   NUMBER;
  v_rqoh				  NUMBER;
  v_atr				   NUMBER;
  v_att				   NUMBER;
  v_qr				    NUMBER;
  v_qs				    NUMBER;
  v_lot_control_code	  BOOLEAN;
  v_serial_control_code   BOOLEAN;
BEGIN
  -- Set the variable values
  v_item_id := p_item_id;										  --'6566';
  v_org_id := p_org_id;											    --61;
  v_qoh := NULL;
  v_rqoh := NULL;
  v_atr := NULL;
  v_lot_control_code := FALSE;
  v_serial_control_code := FALSE;
  -- Set the org context
  fnd_client_info.set_org_context (1);
  -- Call API
  inv_quantity_tree_pub.query_quantities
		   (p_api_version_number	   => 1.0,
		    p_init_msg_lst			 => 'F',
		    x_return_status		    => x_return_status,
		    x_msg_count			    => x_msg_count,
		    x_msg_data				 => x_msg_data,
		    p_organization_id		  => v_org_id,
		    p_inventory_item_id	    => v_item_id,
		    p_tree_mode			    => apps.inv_quantity_tree_pub.g_transaction_mode,
		    -- or 3
		    p_is_revision_control	  => FALSE,
		    p_is_lot_control		   => v_lot_control_code,
		    -- is_lot_control,
		    p_is_serial_control	    => v_serial_control_code,
		    p_revision				 => NULL,			 -- p_revision,
		    p_lot_number			   => NULL,		   -- p_lot_number,
		    p_lot_expiration_date	  => SYSDATE,
		    p_subinventory_code	    => p_sub_code,
												   -- p_subinventory_code,
		    p_locator_id			   => NULL,		   -- p_locator_id,
		    -- p_cost_group_id		    => NULL,	   -- cg_id,
		    p_onhand_source		    => 3,
		    x_qoh					  => v_qoh,	   -- Quantity on-hand
		    x_rqoh					 => v_rqoh,
		    --reservable quantity on-hand
		    x_qr					   => v_qr,
		    x_qs					   => v_qs,
		    x_att					  => v_att,  -- available to transact
		    x_atr					  => v_atr    -- available to reserve
		   );
  DBMS_OUTPUT.put_line ('On-Hand Quantity: ' || v_qoh);
  DBMS_OUTPUT.put_line ('Available to reserve: ' || v_atr);
  DBMS_OUTPUT.put_line ('Quantity Reserved: ' || v_qr);
  DBMS_OUTPUT.put_line ('Quantity Suggested: ' || v_qs);
  DBMS_OUTPUT.put_line ('Available to Transact: ' || v_att);
  DBMS_OUTPUT.put_line ('Available to Reserve: ' || v_atr);
  RETURN v_qoh;
EXCEPTION
  WHEN OTHERS
  THEN
  DBMS_OUTPUT.put_line ('ERROR: ' || SQLERRM);
END;
/
-------------------------------
select apps.xx_get_item_quantity('19015','220',:ssss,'')  quan from dual;
--------------------------------------
:MTL_TRX_LINE.SUBINVENTORY_CODE
:MTL_TRX_LINE.INVENTORY_ITEM_ID
:MTL_TRX_LINE.ORGANIZATION_ID
-----------------------------------
MAINTAIN.PER_ATTRIBUTE2_V   1
MAINTAIN.PER_ATTRIBUTE3_V   2
select add_months(MAINTAIN.PER_ATTRIBUTE2_V,8*12)  from dual

بتاريخ:
  • كاتب الموضوع

جزاك الله كل خير اخي hossam160
الحقيقه فانكشن رائعة
حلت لي المشكلة جزاك الله خير وبارك لك كل اعمالك
وجعلة الله في ميزان حسناتك
أمييييييين

تم تعديل بواسطة ahmed_orcl

بتاريخ:

السلام عليكم ورحمة الله وبركاته
اخى الكريم حسام ازاى ممكن اوصل للباكجز الجاهزه اللى زى كده

بتاريخ:

SELECT


mp.organization_code
,si.secondary_inventory_name subinv
,msi.segment1 Item
,msi.description item_description
,mil.segment1 LOCATOR
,si.description subinv_desc
--,moqd.revision item_revision
,msi.primary_uom_code uom_code
,SUM(NVL(moqd.primary_transaction_quantity,0)) item_qty
FROM mtl_system_items_b msi
,apps.mtl_onhand_quantities_detail moqd
,mtl_secondary_inventories si
,mtl_item_locations mil
,mtl_parameters mp
WHERE 1=1
AND si.secondary_inventory_name = moqd.subinventory_code(+)
AND si.organization_id = moqd.organization_id (+)
AND moqd.organization_id = msi.organization_id(+)
AND moqd.inventory_item_id = msi.inventory_item_id (+)
AND moqd.locator_id = mil.inventory_location_id(+)
AND moqd.organization_id = mil.organization_id(+)
AND si.quantity_tracked = 1
AND mp.organization_id=msi.organization_id
AND mp.organization_code = &org_code
GROUP BY
mp .organization_code
,si.secondary_inventory_name
,msi.segment1
,msi.description
,mil.segment1
,si.description
--,moqd.revision
,msi.primary_uom_code




فى بريسديور جاخز ممكن يجبلك ال onhand وكميات تانية
inv_quantity_tree_pub.query_quantities


CREATE OR REPLACE FUNCTION APPS.xx_get_item_quantity (
  p_item_id	   VARCHAR2,
  p_org_id		VARCHAR2,
  p_sub_code	  VARCHAR2,
  p_kind_return   NUMBER
)
  RETURN NUMBER
IS
  x_return_status		 VARCHAR2 (50);
  x_msg_count			 VARCHAR2 (50);
  x_msg_data			  VARCHAR2 (50);
  DATA					VARCHAR2 (50);
  v_item_id			   NUMBER;
  v_org_id				NUMBER;
  v_qoh				   NUMBER;
  v_rqoh				  NUMBER;
  v_atr				   NUMBER;
  v_att				   NUMBER;
  v_qr					NUMBER;
  v_qs					NUMBER;
  v_lot_control_code	  BOOLEAN;
  v_serial_control_code   BOOLEAN;
BEGIN
  -- Set the variable values
  v_item_id := p_item_id;										  --'6566';
  v_org_id := p_org_id;												--61;
  v_qoh := NULL;
  v_rqoh := NULL;
  v_atr := NULL;
  v_lot_control_code := FALSE;
  v_serial_control_code := FALSE;
  -- Set the org context
  fnd_client_info.set_org_context (1);
  -- Call API
  inv_quantity_tree_pub.query_quantities
		   (p_api_version_number	   => 1.0,
			p_init_msg_lst			 => 'F',
			x_return_status			=> x_return_status,
			x_msg_count				=> x_msg_count,
			x_msg_data				 => x_msg_data,
			p_organization_id		  => v_org_id,
			p_inventory_item_id		=> v_item_id,
			p_tree_mode				=> apps.inv_quantity_tree_pub.g_transaction_mode,
			-- or 3
			p_is_revision_control	  => FALSE,
			p_is_lot_control		   => v_lot_control_code,
			-- is_lot_control,
			p_is_serial_control		=> v_serial_control_code,
			p_revision				 => NULL,			 -- p_revision,
			p_lot_number			   => NULL,		   -- p_lot_number,
			p_lot_expiration_date	  => SYSDATE,
			p_subinventory_code		=> p_sub_code,
												   -- p_subinventory_code,
			p_locator_id			   => NULL,		   -- p_locator_id,
			-- p_cost_group_id			=> NULL,	   -- cg_id,
			p_onhand_source			=> 3,
			x_qoh					  => v_qoh,	   -- Quantity on-hand
			x_rqoh					 => v_rqoh,
			--reservable quantity on-hand
			x_qr					   => v_qr,
			x_qs					   => v_qs,
			x_att					  => v_att,  -- available to transact
			x_atr					  => v_atr	-- available to reserve
		   );
  DBMS_OUTPUT.put_line ('On-Hand Quantity: ' || v_qoh);
  DBMS_OUTPUT.put_line ('Available to reserve: ' || v_atr);
  DBMS_OUTPUT.put_line ('Quantity Reserved: ' || v_qr);
  DBMS_OUTPUT.put_line ('Quantity Suggested: ' || v_qs);
  DBMS_OUTPUT.put_line ('Available to Transact: ' || v_att);
  DBMS_OUTPUT.put_line ('Available to Reserve: ' || v_atr);
  RETURN v_qoh;
EXCEPTION
  WHEN OTHERS
  THEN
  DBMS_OUTPUT.put_line ('ERROR: ' || SQLERRM);
END;
/
-------------------------------
select apps.xx_get_item_quantity('19015','220',:ssss,'')  quan from dual;
--------------------------------------
:MTL_TRX_LINE.SUBINVENTORY_CODE
:MTL_TRX_LINE.INVENTORY_ITEM_ID
:MTL_TRX_LINE.ORGANIZATION_ID
-----------------------------------
MAINTAIN.PER_ATTRIBUTE2_V   1
MAINTAIN.PER_ATTRIBUTE3_V   2
select add_months(MAINTAIN.PER_ATTRIBUTE2_V,8*12)  from dual





مشكورين يا جماعة على المشاركة وعلى الكود ... والله المستعان

انضم إلى المناقشة

يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.

زائر
أضف رد على هذا الموضوع...

برجاء الإنتباه

بإستخدامك للموقع فأنت تتعهد بالموافقة على هذه البنود: سياسة الخصوصية

Account

Navigation

البحث

إعداد إشعارات المتصفح الفورية

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.