848: l_order_type_id NUMBER := NULL;
849: l_document_set_id NUMBER := NULL;
850: l_sub_inventory VARCHAR2(30) := '';
851:
852: --Parameters for WSH_DELIVERY_DETAILS_PUB.Update_Shipping_Attributes.
853: source_code VARCHAR2(15);
854: changed_attributes Wsh_Delivery_Details_Pub.ChangedAttributeTabType;
855:
856: /* Handle exceptions */
850: l_sub_inventory VARCHAR2(30) := '';
851:
852: --Parameters for WSH_DELIVERY_DETAILS_PUB.Update_Shipping_Attributes.
853: source_code VARCHAR2(15);
854: changed_attributes Wsh_Delivery_Details_Pub.ChangedAttributeTabType;
855:
856: /* Handle exceptions */
857: fail_api EXCEPTION;
858: -- Added Mtl_Sytem_items_B to get serial_number_control_Code for the item that is being
866: mtl.serial_number_control_code
867: FROM csd_repairs cr,
868: mtl_system_items_b mtl,
869: cs_estimate_details ced,
870: wsh_delivery_details wdd,
871: --Changed to view from table, bug: 4341784
872: wsh_delivery_assignments_v wda
873: WHERE cr.repair_line_id = ced.original_source_id
874: AND ced.original_source_code = 'DR'
979: changed_attributes(1)
980: .shipped_quantity);
981: Csd_Gen_Utility_Pvt.ADD('Calling Update_Shipping_Attributes');
982: END IF;
983: --Call to WSH_DELIVERY_DETAILS_PUB.Update_Shipping_Attributes.
984: Wsh_Delivery_Details_Pub.Update_Shipping_Attributes(p_api_version_number => 1.0,
985: p_init_msg_list => p_init_msg_list,
986: p_commit => p_commit,
987: x_return_status => x_return_status,
980: .shipped_quantity);
981: Csd_Gen_Utility_Pvt.ADD('Calling Update_Shipping_Attributes');
982: END IF;
983: --Call to WSH_DELIVERY_DETAILS_PUB.Update_Shipping_Attributes.
984: Wsh_Delivery_Details_Pub.Update_Shipping_Attributes(p_api_version_number => 1.0,
985: p_init_msg_list => p_init_msg_list,
986: p_commit => p_commit,
987: x_return_status => x_return_status,
988: x_msg_count => x_msg_count,
1287: l_shipped_serial_number VARCHAR2(30);
1288: l_lot_number VARCHAR2(80); -- fix for bug#4625226
1289: l_SN_at_SO_new_SN_number BOOLEAN; /*This flag is true when user provide new SN for serialized item at SO */
1290:
1291: --Parameters for WSH_DELIVERY_DETAILS_PUB.Update_Shipping_Attributes.
1292: source_code VARCHAR2(15);
1293: changed_attributes Wsh_Delivery_Details_Pub.ChangedAttributeTabType;
1294:
1295: /*Handle exceptions*/
1289: l_SN_at_SO_new_SN_number BOOLEAN; /*This flag is true when user provide new SN for serialized item at SO */
1290:
1291: --Parameters for WSH_DELIVERY_DETAILS_PUB.Update_Shipping_Attributes.
1292: source_code VARCHAR2(15);
1293: changed_attributes Wsh_Delivery_Details_Pub.ChangedAttributeTabType;
1294:
1295: /*Handle exceptions*/
1296: fail_api EXCEPTION;
1297:
1330: a.organization_id,
1331: a.inventory_item_id,
1332: c.segment1 item_name,
1333: p.organization_code
1334: FROM wsh_delivery_details a,
1335: --Changed to view from table, bug: 4341784
1336: wsh_delivery_assignments_v b,
1337: mtl_system_items c,
1338: mtl_parameters p
1367:
1368: --bug#6071005
1369: cursor get_delivery_detail_id(p_order_header_id IN NUMBER, p_order_line_id IN NUMBER) IS
1370: select delivery_detail_id
1371: from wsh_Delivery_Details
1372: where source_header_id = p_order_header_id and source_line_id = p_order_line_id;
1373:
1374:
1375: BEGIN
1819: Debug('Calling Update_Shipping_Attributes',
1820: l_mod_name,
1821: 1);
1822:
1823: --Call to WSH_DELIVERY_DETAILS_PUB.Update_Shipping_Attributes.
1824: Wsh_Delivery_Details_Pub.Update_Shipping_Attributes(p_api_version_number => 1.0,
1825: p_init_msg_list => p_init_msg_list,
1826: p_commit => p_commit,
1827: x_return_status => x_return_status,
1820: l_mod_name,
1821: 1);
1822:
1823: --Call to WSH_DELIVERY_DETAILS_PUB.Update_Shipping_Attributes.
1824: Wsh_Delivery_Details_Pub.Update_Shipping_Attributes(p_api_version_number => 1.0,
1825: p_init_msg_list => p_init_msg_list,
1826: p_commit => p_commit,
1827: x_return_status => x_return_status,
1828: x_msg_count => x_msg_count,
1849: If Item is Reservable then
1850: Check if item is Serial Controlled @ SO Issue
1851: ( This is existing solution and it will continue to stay
1852: If item is serial controlled at Sales Order issue then
1853: Call API WSH_DELIVERY_DETAILS_PUB.Update_Shipping_Attributes
1854: and update with serial_number and quantity.
1855: End If;
1856: Else If Item is Non-Reservable
1857: If Item is serial Controlled then
1857: If Item is serial Controlled then
1858: Get Lot_Number, Revision, Sub Inventory Information from
1859: Mtl_Serial_numbers for a given serial_number, item_id,organization_id
1860:
1861: Call API WSH_DELIVERY_DETAILS_PUB.Update_Shipping_Attributes and
1862: Update Serial_Number, Quantity ( will be 1 for serial controlled
1863: items), lot_number, Revision and subinventory
1864: Else if item is non serial controlled then
1865: Call API WSH_DELIVERY_DETAILS_PUB.Update_Shipping_Attributes
1861: Call API WSH_DELIVERY_DETAILS_PUB.Update_Shipping_Attributes and
1862: Update Serial_Number, Quantity ( will be 1 for serial controlled
1863: items), lot_number, Revision and subinventory
1864: Else if item is non serial controlled then
1865: Call API WSH_DELIVERY_DETAILS_PUB.Update_Shipping_Attributes
1866: Values for Quantity, Lot_Number, Revision and Sub Inventory
1867: should be pulled from UI.
1868: Update Quantity, Lot_Number, Revision and Sub-Inventory
1869: End If ;
1891: csd_gen_utility_pvt.ADD('Calling Update_Shipping_Attributes');
1892: END IF;
1893:
1894:
1895: --Call to WSH_DELIVERY_DETAILS_PUB.Update_Shipping_Attributes.
1896: WSH_DELIVERY_DETAILS_PUB.Update_Shipping_Attributes(
1897: p_api_version_number => 1.0,
1898: p_init_msg_list => p_init_msg_list,
1899: p_commit => p_commit,
1892: END IF;
1893:
1894:
1895: --Call to WSH_DELIVERY_DETAILS_PUB.Update_Shipping_Attributes.
1896: WSH_DELIVERY_DETAILS_PUB.Update_Shipping_Attributes(
1897: p_api_version_number => 1.0,
1898: p_init_msg_list => p_init_msg_list,
1899: p_commit => p_commit,
1900: x_return_status => x_return_status,
2039: csd_gen_utility_pvt.ADD('shipped_quantity ='||changed_attributes(1).shipped_quantity );
2040: csd_gen_utility_pvt.ADD('Calling Update_Shipping_Attributes');
2041: END IF;
2042:
2043: WSH_DELIVERY_DETAILS_PUB.Update_Shipping_Attributes(
2044: p_api_version_number => 1.0,
2045: p_init_msg_list => p_init_msg_list,
2046: p_commit => p_commit,
2047: x_return_status => x_return_status,
3658:
3659: BEGIN
3660: SELECT released_status
3661: INTO l_release_status
3662: FROM wsh_delivery_details
3663: WHERE source_line_id = l_order_line_id
3664: AND SOURCE_CODE = 'OE'; /*Fixed for bug#5846054 */
3665: EXCEPTION
3666: WHEN NO_DATA_FOUND THEN
3699:
3700: BEGIN
3701: SELECT released_status
3702: INTO l_release_status
3703: FROM wsh_delivery_details
3704: WHERE source_line_id = l_order_line_id
3705: AND SOURCE_CODE = 'OE'; /*Fixed for bug#5846054 */
3706: EXCEPTION
3707: WHEN NO_DATA_FOUND THEN
3812:
3813: BEGIN
3814: SELECT requested_quantity, released_status
3815: INTO l_ship_qty, l_release_status
3816: FROM wsh_delivery_details
3817: WHERE source_header_id =
3818: l_order_rec.order_header_id
3819: AND source_line_id = l_order_rec.order_line_id
3820: AND SOURCE_CODE = 'OE'; /*Fixed for bug#5685341*/
8126: WHERE product_transaction_id = p_prod_txn_id;
8127:
8128: CURSOR released_lines_cur(p_order_header_id IN NUMBER, p_Order_Line_id IN NUMBER) IS
8129: SELECT source_header_id, source_line_id, released_status
8130: FROM wsh_delivery_details
8131: WHERE source_header_id = p_order_header_id
8132: AND Source_line_id = p_Order_line_id
8133: AND SOURCE_CODE = 'OE' /*Fixed for bug#5846054*/
8134: AND released_status = C_Staged_PickConfirmed;
8134: AND released_status = C_Staged_PickConfirmed;
8135:
8136: CURSOR shipped_lines_cur(p_order_header_id IN NUMBER, p_Order_Line_Id IN NUMBER) IS
8137: SELECT source_header_id, source_line_id, released_status
8138: FROM wsh_delivery_details
8139: WHERE source_header_id = p_order_header_id
8140: AND Source_line_id = p_Order_line_id
8141: AND SOURCE_CODE = 'OE' /*Fixed for bug#5846054*/
8142: AND released_status = C_Shipped;
8532: -- check released_status column value for the delivery line, if even one record is found
8533: -- with status ready_for_release or backordered then whole order header needs to be pick released
8534: SELECT 'Y'
8535: INTO l_order_to_be_pickreleased
8536: FROM wsh_delivery_details a
8537: WHERE a.source_header_id =
8538: x_product_txn_rec.order_header_id
8539: AND a.source_line_id =
8540: x_product_txn_rec.order_line_id
8599: -- order line id, if so line is not eligible to stamp for 'Released' status.
8600: BEGIN
8601: SELECT 'Y'
8602: INTO l_order_to_Be_PickReleased
8603: FROM wsh_Delivery_Details
8604: WHERE source_header_id =
8605: x_product_txn_rec.order_header_id
8606: AND source_line_id =
8607: x_product_txn_Rec.Order_line_id
8728: -- select C_Yes
8729: -- into l_allow_ship
8730: SELECT Released_Status
8731: INTO l_Released_Status
8732: FROM wsh_delivery_details
8733: WHERE source_header_id =
8734: l_order_rec.order_header_id
8735: AND source_line_id = l_order_rec.order_line_id
8736: AND released_status IN (C_Staged_PickConfirmed,
8803: -- product txn lines with Shipped status, if not then update product txn table
8804: BEGIN
8805: SELECT 'Y'
8806: INTO l_order_to_Be_Shipped
8807: FROM wsh_Delivery_Details
8808: WHERE source_header_id =
8809: x_product_txn_rec.order_header_id
8810: AND source_line_id =
8811: x_product_txn_Rec.Order_line_id