DBA Data[Home] [Help]

APPS.QP_SOURCING_API_PUB SQL Statements

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

Line: 19

    SELECT distinct profile_class_id
    FROM   HZ_CUSTOMER_PROFILES
    WHERE  cust_account_id = cust_id_in;
Line: 23

    SELECT RELATED_CUST_ACCOUNT_ID
    FROM  HZ_CUST_ACCT_RELATE
    WHERE  cust_account_id = cust_id_in;
Line: 40

    	SELECT customer_class_code, sales_channel_code
    	INTO   G_Customer_Info.customer_class_code, G_Customer_Info.sales_channel_code
	FROM   hz_cust_accounts
    	WHERE  cust_account_id = p_cust_id;
Line: 55

        SELECT NVL(gsa_indicator,'N')
        INTO G_Customer_Info.gsa_indicator
        FROM hz_cust_site_uses hsu
        WHERE site_use_id = OE_ORDER_PUB.G_HDR.invoice_to_org_id
        --added for moac
        and hsu.org_id = QP_ATTR_MAPPING_PUB.G_ORG_ID;
Line: 88

           SELECT NVL(gsa_indicator_flag,'N')
           into G_Customer_Info.gsa_indicator
           from hz_parties hp,hz_cust_accounts hca
           where hp.party_id = hca.party_id
           and hca.cust_account_id = p_cust_id ;
Line: 113

    SELECT distinct customer_profile_class_id
    FROM   AR_CUSTOMER_PROFILES
    WHERE  customer_id = p_cust_id;
Line: 136

    SELECT RELATED_CUSTOMER_ID
    FROM   RA_CUSTOMER_RELATIONSHIPS
    WHERE  customer_id = p_cust_id;
Line: 262

    SELECT agreement_id
    FROM   oe_agreements_vl
    WHERE  name = name_in;
Line: 268

select name into l_name
from oe_agreements_vl
WHERE agreement_id = p_agreement_id
AND ROWNUM=1;
Line: 275

    SELECT agreement_id
    FROM   oe_agreements_vl
    WHERE  name = l_name;
Line: 311

	SELECT 	segment1,segment2,segment3,segment4,segment5,
		segment6,segment7,segment8,segment9,segment10,
	  	segment11,segment12,segment13,segment14,segment15,
		segment16,segment17,segment18,segment19,segment20
	INTO  	G_Item_Segments.segment1,G_Item_Segments.segment2,G_Item_Segments.segment3,
	  	G_Item_Segments.segment4,G_Item_Segments.segment5,G_Item_Segments.segment6,
	  	G_Item_Segments.segment7,G_Item_Segments.segment8,G_Item_Segments.segment9,
	  	G_Item_Segments.segment10,G_Item_Segments.segment11,G_Item_Segments.segment12,
	  	G_Item_Segments.segment13,G_Item_Segments.segment14,G_Item_Segments.segment15,
	  	G_Item_Segments.segment16,G_Item_Segments.segment17,G_Item_Segments.segment18,
		G_Item_Segments.segment19,G_Item_Segments.segment20
	FROM   	mtl_system_items
	WHERE  	inventory_item_id = p_inventory_item_id
	AND    	organization_id = l_org_id;
Line: 447

  SELECT SUM(nvl(ordered_quantity,0)*(unit_list_price)),
	 SUM(nvl(ordered_quantity,0))
  INTO  orders_total_amt, orders_total_qty
  FROM oe_order_lines
  WHERE header_id=p_header_id
  AND (cancelled_flag='N' OR cancelled_flag IS NULL)
  AND (line_category_code<>'RETURN' OR line_category_code IS NULL)
  GROUP BY header_id;
Line: 465

  SELECT SUM(nvl(ordered_quantity,0)*(unit_list_price)),
	 SUM(nvl(ordered_quantity,0))
  INTO  returns_total_amt, returns_total_qty
  FROM oe_order_lines
  WHERE header_id=p_header_id
  AND (cancelled_flag='N' OR cancelled_flag IS NULL)
  AND line_category_code='RETURN'
  GROUP BY header_id;
Line: 483

  SELECT  nvl(sum(decode(line_category_code,'RETURN',
                  nvl(ordered_quantity,0)*(unit_list_price),0)),0),
          nvl(sum(decode(line_category_code,'RETURN',0,
                  nvl(ordered_quantity,0)*(unit_list_price))),0),
          nvl(sum(decode(line_category_code,'RETURN',
                  nvl(ordered_quantity,0),0)),0),
          nvl(sum(decode(line_category_code,'RETURN',0,
                  nvl(ordered_quantity,0))),0)
  INTO  returns_total_amt,
        orders_total_amt,
        returns_total_qty,
        orders_total_qty
  FROM oe_order_lines
  WHERE header_id=p_header_id
  AND (cancelled_flag='N' OR cancelled_flag IS NULL)
  AND charge_periodicity_code is null;     --  added for recurring charges Bug 4465168
Line: 562

    	SELECT agreement_type_code
    	INTO   G_Agreement_Info.agreement_type_code
    	FROM   oe_agreements
    	WHERE  agreement_id = p_agreement_id;
Line: 600

    	SELECT inventory_item_id
    	INTO   G_MODEL_ID
    	FROM   oe_order_lines_all
    	WHERE  line_id = p_top_model_line_id;
Line: 642

    SELECT period1_ordered_quantity, primary_uom_code
    INTO   x_item_quantity, l_puom
    FROM   oe_item_cust_vols
    WHERE  sold_to_org_id = p_cust_id
    AND    inventory_item_id = p_inventory_item_id;
Line: 696

    SELECT period2_ordered_quantity, primary_uom_code
    INTO   x_item_quantity, l_puom
    FROM   oe_item_cust_vols
    WHERE  sold_to_org_id = p_cust_id
    AND    inventory_item_id = p_inventory_item_id;
Line: 750

    SELECT period3_ordered_quantity, primary_uom_code
    INTO   x_item_quantity, l_puom
    FROM   oe_item_cust_vols
    WHERE  sold_to_org_id = p_cust_id
    AND    inventory_item_id = p_inventory_item_id;
Line: 805

    SELECT period1_total_amount
    INTO   x_amount
    FROM   oe_item_cust_vols
    WHERE  sold_to_org_id = p_cust_id
    AND    inventory_item_id = p_inventory_item_id;
Line: 823

       SELECT name, chart_of_accounts_id, currency_code
       INTO l_sob_name, l_coa_id, l_sob_currency
       FROM gl_ledgers_public_v
       WHERE ledger_id = l_sob_id;
Line: 890

    SELECT period2_total_amount
    INTO   x_amount
    FROM   oe_item_cust_vols
    WHERE  sold_to_org_id = p_cust_id
    AND    inventory_item_id = p_inventory_item_id;
Line: 909

       SELECT name, chart_of_accounts_id, currency_code
       INTO l_sob_name, l_coa_id, l_sob_currency
       FROM gl_ledgers_public_v
       WHERE ledger_id = l_sob_id;
Line: 975

    SELECT period3_total_amount
    INTO   x_amount
    FROM   oe_item_cust_vols
    WHERE  sold_to_org_id = p_cust_id
    AND    inventory_item_id = p_inventory_item_id;
Line: 993

       SELECT name, chart_of_accounts_id, currency_code
       INTO l_sob_name, l_coa_id, l_sob_currency
       FROM gl_ledgers_public_v
       WHERE ledger_id = l_sob_id;
Line: 1070

    SELECT period1_total_amount
    INTO   x_total_amount
    FROM   oe_cust_total_amts
    WHERE  sold_to_org_id = p_cust_id;
Line: 1087

       SELECT name, chart_of_accounts_id, currency_code
       INTO l_sob_name, l_coa_id, l_sob_currency
       FROM gl_ledgers_public_v
       WHERE ledger_id = l_sob_id;
Line: 1153

    SELECT period2_total_amount
    INTO   x_total_amount
    FROM   oe_cust_total_amts
    WHERE  sold_to_org_id = p_cust_id;
Line: 1170

       SELECT name, chart_of_accounts_id, currency_code
       INTO l_sob_name, l_coa_id, l_sob_currency
       FROM gl_ledgers_public_v
       WHERE ledger_id = l_sob_id;
Line: 1235

    SELECT period3_total_amount
    INTO   x_total_amount
    FROM   oe_cust_total_amts
    WHERE  sold_to_org_id = p_cust_id;
Line: 1252

       SELECT name, chart_of_accounts_id, currency_code
       INTO l_sob_name, l_coa_id, l_sob_currency
       FROM gl_ledgers_public_v
       WHERE ledger_id = l_sob_id;
Line: 1309

 SELECT party_id
 FROM   hz_cust_accounts
 WHERE  cust_account_id = l_sold_to_org_id;
Line: 1331

 SELECT a.party_site_id
 FROM   hz_cust_acct_sites a,
        hz_cust_site_uses b
 WHERE  a.cust_acct_site_id = b.cust_acct_site_id
 AND    b.site_use_id       = l_ship_to_org_id
 AND    b.site_use_code     = 'SHIP_TO';
Line: 1356

 SELECT a.party_site_id
 FROM   hz_cust_acct_sites a,
        hz_cust_site_uses b
 WHERE  a.cust_acct_site_id = b.cust_acct_site_id
 AND    b.site_use_id       = l_bill_to_org_id
 AND    b.site_use_code     = 'BILL_TO';
Line: 1442

      SELECT ordered_quantity,order_quantity_uom,inventory_item_id
      FROM   oe_order_lines_all
      WHERE  header_id = header_id_in;
Line: 1553

    SELECT count(*)
    INTO  x_count
    FROM  oe_order_lines_all
    WHERE shippable_flag = 'Y'
    AND   header_id = p_header_id
    AND   rownum < 2;
Line: 1626

    SELECT distinct profile_class_id
    FROM   HZ_CUSTOMER_PROFILES
    WHERE  cust_account_id = cust_id_in;
Line: 1630

    SELECT RELATED_CUST_ACCOUNT_ID
    FROM   HZ_CUST_ACCT_RELATE
    WHERE  cust_account_id = cust_id_in;
Line: 1643

    	SELECT customer_class_code, sales_channel_code
    	INTO   G_Customer_Info.customer_class_code, G_Customer_Info.sales_channel_code
	FROM   hz_cust_accounts
    	WHERE  cust_account_id = p_cust_id;
Line: 1658

        SELECT NVL(gsa_indicator,'N')
        INTO G_Customer_Info.gsa_indicator
        FROM hz_cust_site_uses hsu
        WHERE site_use_id = invoice_to_org_id
        --added for moac
        and hsu.org_id = QP_ATTR_MAPPING_PUB.G_ORG_ID;
Line: 1683

           SELECT NVL(gsa_indicator_flag,'N')
           into G_Customer_Info.gsa_indicator
           from hz_parties hp,hz_cust_accounts hca
           where hp.party_id = hca.party_id
           and hca.cust_account_id = p_cust_id ;
Line: 1703

    SELECT distinct customer_profile_class_id
    FROM   AR_CUSTOMER_PROFILES
    WHERE  customer_id = p_cust_id;
Line: 1726

    SELECT RELATED_CUSTOMER_ID
    FROM   RA_CUSTOMER_RELATIONSHIPS
    WHERE  customer_id = p_cust_id;