DBA Data[Home] [Help]

APPS.OE_SHIPPING_INTEGRATION_PUB SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 46

        select count(*)
          into l_count
          from wf_item_activity_statuses wias,
               wf_process_activities wpa
         where wias.item_type = 'OEOL'
           and wias.item_key = to_char(p_line_id)
           and wias.ACTIVITY_STATUS = 'NOTIFIED'
           and wias.process_activity = wpa.instance_id
           and wpa.activity_name = 'SHIP_LINE';
Line: 81

	updated or a non-shippable line reaches the SHIP_LINE activity.
*/

PROCEDURE Complete_Ship_Line_Activity
(   p_api_version_number		IN      NUMBER
,   p_line_id                   IN      NUMBER
,   p_result_code				IN		VARCHAR2
,   x_return_status             OUT NOCOPY /* file.sql.39 change */     VARCHAR2
,   x_msg_count                 OUT NOCOPY /* file.sql.39 change */     NUMBER
,   x_msg_data                  OUT NOCOPY /* file.sql.39 change */     VARCHAR2
) IS
	l_api_version_number	CONSTANT	NUMBER := 1.0;
Line: 341

,	 x_update_tolerance_flag	OUT NOCOPY /* file.sql.39 change */ VARCHAR2
,	 x_ship_tolerance			OUT NOCOPY /* file.sql.39 change */ NUMBER
,	 x_ship_beyond_tolerance	OUT NOCOPY /* file.sql.39 change */	VARCHAR2
,	 x_shipped_within_tolerance	OUT NOCOPY /* file.sql.39 change */ VARCHAR2
,	 x_config_broken			OUT NOCOPY /* file.sql.39 change */ VARCHAR2
,    x_return_status			OUT NOCOPY /* file.sql.39 change */ VARCHAR2
,	 x_msg_count				OUT NOCOPY /* file.sql.39 change */ NUMBER
,	 x_msg_data					OUT NOCOPY /* file.sql.39 change */ VARCHAR2
)
IS
	l_api_version_number		CONSTANT NUMBER := 1.0;
Line: 388

	x_update_tolerance_flag := FND_API.G_FALSE;
Line: 575

				-- Tolerance needs to be updated so that ship confirm can result
				-- in split.

				l_temp_line_tbl := l_line_tbl;
Line: 683

					x_update_tolerance_flag := FND_API.G_TRUE;
Line: 716

                SELECT  count(*)
                INTO    l_count_unshipped
                FROM    oe_order_lines
                WHERE   line_set_id = l_line_rec.line_set_id
                AND     shipped_quantity IS NULL
                AND     line_id <> l_line_rec.line_id ;
Line: 731

                    SELECT nvl(sum(shipped_quantity),0)
                    INTO   l_del_shipping_quantity
                    FROM   wsh_delivery_details
                    where  source_line_id in (SELECT line_id
                                              FROM   oe_order_lines
                                              WHERE  line_set_id = l_line_rec.line_set_id
                                              AND     shipped_quantity IS NULL
                                              AND     line_id <> l_line_rec.line_id)
                    and   source_code = 'OE'
                    and   released_status = 'C'
                    group by requested_quantity_uom;
Line: 795

			-- Tolerance needs to be updated so that ship confirm can result
			-- in split.

			l_shipped_quantity := 0;
Line: 871

			x_update_tolerance_flag := FND_API.G_TRUE;
Line: 989

	SELECT	SUM(ordered_quantity)
		,	SUM(shipped_quantity)
		,	SUM(shipping_quantity)
	INTO	l_x_ordered_quantity
		,	l_x_shipped_quantity
		,	l_x_shipping_quantity
	FROM	oe_order_lines
	WHERE 	line_set_id	= p_line_set_id;
Line: 1057

PROCEDURE Update_Shipping_Interface
(
	 p_api_version_number		IN	NUMBER
,    p_line_id					IN	NUMBER
,	 p_shipping_interfaced_flag	IN 	VARCHAR2
,    x_return_status			OUT NOCOPY /* file.sql.39 change */ VARCHAR2
,	 x_msg_count				OUT NOCOPY /* file.sql.39 change */ NUMBER
,	 x_msg_data					OUT NOCOPY /* file.sql.39 change */ VARCHAR2
)
IS
l_line_tbl			OE_Order_PUB.Line_Tbl_Type;
Line: 1082

	    oe_debug_pub.add(  'ENTERING OE_SHIPPING_INTEGRATION_PUB.UPDATE_SHIPPING_INTERFACE' , 1 ) ;
Line: 1124

	SAVEPOINT Update_Shipping_Interface;
Line: 1126

	update 	oe_order_lines
	set		shipping_interfaced_flag = p_shipping_interfaced_flag,
            firm_demand_flag = NVL(l_firm_flag,firm_demand_flag),
			last_update_date = SYSDATE,
			last_updated_by = FND_GLOBAL.USER_ID,
			last_update_login = FND_GLOBAL.LOGIN_ID,
			lock_control = lock_control + 1
	where 	line_id	= p_line_id;
Line: 1160

	    l_line_tbl(1).last_update_date := SYSDATE;
Line: 1161

	    l_line_tbl(1).last_updated_by := FND_GLOBAL.USER_ID;
Line: 1162

	    l_line_tbl(1).last_update_login := FND_GLOBAL.LOGIN_ID;
Line: 1169

			oe_debug_pub.add('Do not update flow status ');
Line: 1171

			oe_debug_pub.add('Update flow status ');
Line: 1179

             Update oe_order_lines_all
             Set    firm_demand_flag = 'Y'
             Where  top_model_line_id = l_line_tbl(1).top_model_line_id;
Line: 1190

             Update oe_order_lines_all
             Set    firm_demand_flag = 'Y'
             Where  ato_line_id = l_line_tbl(1).ato_line_id;
Line: 1206

          OE_ORDER_UTIL.Update_Global_Picture(p_Upd_New_Rec_If_Exists =>False,
                                 p_header_id =>l_line_tbl(1).header_id,
                                 p_old_line_rec => l_old_line_tbl(1),
                                 p_line_rec =>l_line_tbl(1),
                                 p_line_id => p_line_id,
                                 x_index => l_index,
                                 x_return_status => x_return_status);
Line: 1214

             oe_debug_pub.add(  'UPDATE_GLOBAL RETURN STATUS FROM OE_SHIPPING_INTEGRATION_PUB IS:' || X_RETURN_STATUS ) ;
Line: 1249

             OE_ORDER_UTIL.g_line_tbl(l_index).last_update_date := SYSDATE;
Line: 1250

             OE_ORDER_UTIL.g_line_tbl(l_index).last_updated_by := FND_GLOBAL.USER_ID;
Line: 1251

             OE_ORDER_UTIL.g_line_tbl(l_index).last_update_login := FND_GLOBAL.LOGIN_ID;
Line: 1252

             OE_ORDER_UTIL.g_line_tbl(l_index).last_update_login := FND_GLOBAL.LOGIN_ID;
Line: 1279

          Select ato_line_id ,
                 item_type_code,
                 ship_model_complete_flag,
                 top_model_line_id
          Into   l_ato_line_id,
                 l_item_type_code,
                 l_smc_flag,
                 l_top_model_line_id
          From   oe_order_lines_all
          Where  line_id = p_line_id;
Line: 1292

             Update oe_order_lines_all
             Set    firm_demand_flag = 'Y'
             Where  top_model_line_id = l_top_model_line_id;
Line: 1301

             Update oe_order_lines_all
             Set    firm_demand_flag = 'Y'
             Where  ato_line_id = l_ato_line_id;
Line: 1314

	    oe_debug_pub.add(  'EXITING OE_SHIPPING_INTEGRATION_PUB.UPDATE_SHIPPING_INTERFACE' , 1 ) ;
Line: 1323

        ROLLBACK TO Update_Shipping_Interface;
Line: 1334

        ROLLBACK TO Update_Shipping_Interface;
Line: 1350

        ROLLBACK TO Update_Shipping_Interface;
Line: 1356

            ,   'Update_Shipping_Interface'
            );
Line: 1372

END Update_Shipping_Interface;
Line: 1534

  SELECT  oel.line_id
    INTO  l_line_id
    FROM  oe_order_lines_all oel,
          mtl_system_items msi
  WHERE  oel.header_id = p_header_id
  AND    (oel.ship_set_id = p_ship_set_id OR
          (oel.top_model_line_id = p_top_model_line_id AND
           oel.ship_model_complete_flag = 'Y'))
  AND    oel.inventory_item_id = msi.inventory_item_id
  and    oel.ship_from_org_id = msi.organization_id
  AND    oel.ordered_quantity > 0
  and    ((p_transactable_flag = 'N') OR
          (p_transactable_flag = 'Y' AND
           msi.mtl_transactions_enabled_flag = 'Y'))
  AND    oel.shipping_interfaced_flag = 'N'
  AND    (oel.shippable_flag = 'Y' OR
          (EXISTS (SELECT 'Y'
                   FROM   oe_order_lines_all oel1
                   WHERE  oel1.header_id = p_header_id
                   AND    (oel1.ship_set_id = p_ship_set_id OR
                                 (oel1.top_model_line_id = p_top_model_line_id AND
                                  oel1.ship_model_complete_flag = 'Y'))
                   AND    oel1.ato_line_id = oel1.line_id
                   AND    oel1.item_type_code in ('MODEL','CLASS')
		   AND    oel1.ordered_quantity > 0
                   AND    NOT EXISTS (SELECT 'Y'
                                      FROM  oe_order_lines_all oel2
                                      WHERE oel2.top_model_line_id
                                            = oel1.top_model_line_id
                                      AND   oel2.ato_line_id
                                            = oel1.ato_line_id
                                      AND   oel2.item_type_code = 'CONFIG'))))
  AND ROWNUM = 1;
Line: 1609

      OE_MSG_PUB.Update_Msg_Context(p_attribute_code => null);
Line: 1616

	SELECT line_id
	INTO l_config_line_id
	FROM oe_order_lines
        WHERE header_id = OE_LINE_SECURITY.g_record.header_id
        AND ato_line_id = OE_LINE_SECURITY.g_record.line_id
        AND item_type_code = 'CONFIG';
Line: 1628

	SELECT 1
        INTO config_line_ship_notified
	FROM wf_item_activity_statuses wias, wf_process_activities wpa
	WHERE wias.item_type='OEOL'
	AND wias.item_key=l_config_line_id
	AND wpa.activity_name='SHIP_LINE'
	AND wias.activity_status='NOTIFIED'
	AND wias.PROCESS_ACTIVITY = wpa.INSTANCE_ID;
Line: 1688

   SELECT oel.line_id
   INTO   l_line_id
   FROM   oe_order_lines_all oel
   WHERE  oel.header_id = l_header_id
   AND    (oel.ship_set_id = l_ship_set_id OR
           oel.top_model_line_id = l_top_model_line_id)
   AND    oel.shipping_interfaced_flag = 'N'
   AND    (oel.shippable_flag = 'Y' OR
          (EXISTS (SELECT 'Y'
                   FROM   oe_order_lines_all oel1
                   WHERE  oel1.header_id = l_header_id
                   AND    (oel1.ship_set_id = l_ship_set_id OR
                           oel1.top_model_line_id = l_top_model_line_id)
                   AND    oel1.ato_line_id = oel1.line_id
                   AND    oel1.item_type_code in ('MODEL','CLASS')
                   AND    NOT EXISTS (SELECT 'Y'
                                      FROM  oe_order_lines_all oel2
                                      WHERE oel2.top_model_line_id
                                            = oel1.top_model_line_id
                                      AND   oel2.ato_line_id
                                            = oel1.ato_line_id
                                      AND   oel2.item_type_code = 'CONFIG'))))
   AND    ROWNUM = 1;