DBA Data[Home] [Help]

APPS.OM_REPORTS_COMMON_PKG SQL Statements

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

Line: 9

 SELECT nvl(wfas.end_date,sysdate)
 INTO ans_date
 FROM wf_item_activity_statuses wfas, wf_process_activities wpa
 WHERE wfas.item_key = TO_CHAR(n_line_id) and
 wfas.item_type = 'OEOL' and
 wfas.process_activity = wpa.instance_id and
 wpa.activity_item_type = 'OEOL' and
 wpa.activity_name = 'RMA_WAIT_FOR_INSPECTION';
Line: 36

  SELECT sum(decode(l.line_category_code,'RETURN',(nvl(l.ordered_quantity,0)*nvl(l.unit_selling_price,0) * (-1)),nvl(l.ordered_quantity,0)*nvl(l.unit_selling_price,0)))
  INTO ans
  FROM oe_order_lines_all l
  WHERE l.header_id=p_header  and
         l.line_id not in (
                select s.line_id from oe_sales_credits s
                 where s.header_id=p_header
                   and s.line_id is not null);
Line: 53

 SELECT
decode(
(  decode( lot_control_code, NULL, 'N', 1, 'N', 'Y') ||
   decode(serial_number_control_code, NULL, 'N', 1, 'N', 'Y')   ),
'YY', 3,
'NY', 1,
'YN', 2,
0 )
 INTO lot_serial_control
 FROM mtl_system_items
 WHERE inventory_item_id = n_inv_item_id
 AND   organization_id = n_org_id;