DBA Data[Home] [Help]

APPS.RCV_ACCEVENTS_PVT SQL Statements

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

Line: 141

      SELECT RT.consigned_flag,
	     RT.source_document_code,
	     RT.transaction_type,
	     RT.parent_transaction_id,
	     RT.po_header_id,
	     RT.po_line_location_id --12i Complex Work Procurement
      INTO   l_consigned_flag,
	     l_source_doc_code,
	     l_transaction_type,
	     l_parent_trx_id,
	     l_po_header_id,
	     l_po_line_location_id --12i Complex Work Procurement
      FROM   rcv_transactions RT
      WHERE  transaction_id = p_rcv_transaction_id;
Line: 169

      	SELECT  transaction_type, parent_transaction_id
      	INTO    l_parent_trx_type, l_grparent_trx_id
      	FROM    rcv_transactions
      	WHERE   transaction_id = l_parent_trx_id;
Line: 177

          SELECT  transaction_type
          INTO    l_grparent_trx_type
          FROM    rcv_transactions
          WHERE   transaction_id = l_grparent_trx_id;
Line: 197

      SELECT  shipment_type
      INTO    l_shipment_type
      FROM    po_line_locations
      WHERE   line_location_id = l_po_line_location_id;
Line: 423

   SELECT transaction_id, organization_id
   FROM   rcv_transactions
   WHERE  ( ( transaction_type = 'RECEIVE'
           and parent_transaction_id = -1 )
           or
           transaction_type = 'MATCH' )
   AND    NVL(consigned_flag,'N') <> 'Y'
   AND    po_header_id = p_po_header_id
   AND    po_line_location_id = p_po_line_location_id
   AND    NVL(po_release_id, -1) = NVL(p_po_release_id, -1);
Line: 438

   SELECT transaction_id, po_distribution_id
   FROM   rcv_transactions
   WHERE   transaction_type = 'DELIVER'
   START WITH transaction_id = l_par_txn
   CONNECT BY parent_transaction_id = prior transaction_id;
Line: 449

   SELECT POD.po_distribution_id
   FROM   po_distributions POD,
          po_line_locations POLL,
          rcv_transactions RT
   WHERE  POD.line_location_id  = POLL.line_location_id
   AND    POLL.line_location_id = RT.po_line_location_id
   AND    RT.transaction_id     = l_rcv_txn;
Line: 511

      SELECT POLL.matching_basis, POLL.shipment_type
      INTO   l_matching_basis, l_shipment_type
      FROM   po_line_locations POLL
      WHERE  POLL.line_location_id = p_po_line_location_id;
Line: 541

      SELECT org_id
      INTO   l_proc_operating_unit
      FROM   po_headers
      WHERE  po_header_id = p_po_header_id;
Line: 557

	  SELECT count(*)
	  INTO   l_rae_count
	  FROM 	 rcv_accounting_events
	  WHERE  rcv_transaction_id = c_par_txn.transaction_id;
Line: 569

             SELECT RAE.organization_id, RAE.trx_flow_header_id, NVL(RT.dropship_type_code,3)
             INTO   l_organization_id, l_trx_flow_header_id,l_drop_ship_flag
             FROM   rcv_accounting_events RAE,
		    rcv_transactions	  RT
             WHERE  RAE.rcv_transaction_id   	= c_par_txn.transaction_id
	     AND    RT.transaction_id		= RAE.rcv_transaction_id
             AND    RAE.procurement_org_flag = 'Y'
             AND    rownum = 1;
Line: 589

          SELECT nvl(po_distribution_id, -1)
          INTO   l_po_distribution_id
          FROM   rcv_transactions
          WHERE  transaction_id = c_par_txn.transaction_id;
Line: 752

         RCV_SeedEvents_PVT.Insert_RAEEvents(
                     p_api_version           => 1.0,
                     x_return_status         => l_return_status,
                     x_msg_count             => l_msg_count,
                     x_msg_data              => l_msg_data,
                     p_rcv_events_tbl        => l_rcv_events_tbl,
                     /* Support for Landed Cost Management */
                     p_lcm_flag              => 'N');
Line: 762

           l_api_message := 'Error inserting events into RAE';
Line: 1082

        SELECT po_distribution_id,destination_type_code, project_id
        FROM   po_distributions POD
        WHERE  POD.po_distribution_id	= NVL(p_po_distribution_id,POD.po_distribution_id)
        AND    POD.line_location_id 	= p_po_line_location_id;
Line: 1116

      SELECT
              RT.po_header_id,
	      RT.po_line_id,
	      RT.po_line_location_id,
              RT.po_distribution_id,
	      RT.transaction_date,
	      nvl(RT.dropship_type_code,3),
	      POH.org_id,
	      POLL.ship_to_organization_id,
	      POL.item_id,
	      POL.category_id,
	      POL.project_id,
	      nvl(POLL.accrue_on_receipt_flag,'N'),
              POH.type_lookup_code,
              /* Support for Landed Cost Management */
	      nvl(POLL.lcm_flag, 'N')
      INTO    l_po_header_id,
	      l_po_line_id,
	      l_po_line_location_id,
	      l_po_distribution_id,
	      l_rcv_trx_date,
	      l_drop_ship_flag,
	      l_po_org_id,
	      l_rcv_organization_id,
	      l_item_id,
	      l_category_id,
	      l_project_id,
	      l_accrual_flag,
              l_po_document_type_code,
              /* Support for Landed Cost Management */
	      l_lcm_flag
      FROM    po_headers                POH,
	      po_line_locations		POLL,
	      po_lines			POL,
              rcv_transactions          RT
      WHERE   RT.transaction_id 	= p_rcv_transaction_id
      AND     POH.po_header_id 		= RT.po_header_id
      AND     POLL.line_location_id 	= RT.po_line_location_id
      AND     POL.po_line_id 		= RT.po_line_id;
Line: 1158

      SELECT  operating_unit, ledger_id
      INTO    l_rcv_org_id, l_rcv_sob_id
      FROM    cst_acct_info_v
      WHERE   organization_id = l_rcv_organization_id;
Line: 1165

      SELECT  set_of_books_id
      INTO    l_po_sob_id
      FROM    financials_system_parameters;
Line: 1541

	   SELECT decode(RT.transaction_type,'CORRECT',RCV_SeedEvents_PVT.CORRECT,
				RCV_SeedEvents_PVT.RECEIVE)
	   INTO   l_event_type_id
	   FROM   rcv_Transactions RT
	   WHERE  transaction_id = p_rcv_transaction_id;
Line: 1597

              ,'Inserting events into RAE');
Line: 1599

     RCV_SeedEvents_PVT.Insert_RAEEvents(
                  p_api_version           => 1.0,
                  x_return_status         => l_return_status,
                  x_msg_count             => l_msg_count,
                  x_msg_data              => l_msg_data,
		  p_rcv_events_tbl	  => l_rcv_events_tbl,
                  /* Support for Landed Cost Management */
                  p_lcm_flag              => l_lcm_flag);
Line: 1608

         l_api_message := 'Error inserting events into RAE';
Line: 1620

                 ,'Inserting events into MMT');
Line: 1622

        RCV_SeedEvents_PVT.Insert_MMTEvents(
                  p_api_version           => 1.0,
                  x_return_status         => l_return_status,
                  x_msg_count             => l_msg_count,
                  x_msg_data              => l_msg_data,
                  p_rcv_events_tbl        => l_rcv_events_tbl);
Line: 1629

            l_api_message := 'Error inserting events into MMT';
Line: 1810

      SELECT
              RT.po_header_id,
              RT.po_distribution_id,
              POD.destination_type_code,
              RT.transaction_date,
              nvl(RT.dropship_type_code,3),
              POH.org_id,
              POLL.ship_to_organization_id,
              POL.category_id,
              POL.project_id,
              nvl(POLL.accrue_on_receipt_flag,'N'),
              POH.type_lookup_code,
              /* Support for Landed Cost Management */
              NVL(POLL.lcm_flag,'N')
      INTO    l_po_header_id,
              l_po_distribution_id,
              l_destination_type,
              l_rcv_trx_date,
              l_drop_ship_flag,
              l_po_org_id,
              l_rcv_organization_id,
              l_category_id,
              l_project_id,
              l_accrual_flag,
              l_po_document_type_code,
              /* Support for Landed Cost Management */
              l_lcm_flag
      FROM    po_headers                POH,
              po_line_locations         POLL,
              po_lines                  POL,
              po_distributions          POD,
              rcv_transactions          RT
      WHERE   RT.transaction_id         = p_rcv_transaction_id
      AND     POH.po_header_id          = RT.po_header_id
      AND     POLL.line_location_id     = RT.po_line_location_id
      AND     POL.po_line_id            = RT.po_line_id
      AND     POD.po_distribution_id    = RT.po_distribution_id;
Line: 1851

      SELECT  operating_unit, ledger_id
      INTO    l_rcv_org_id, l_rcv_sob_id
      FROM    cst_acct_info_v
      WHERE   organization_id = l_rcv_organization_id;
Line: 1858

      SELECT  set_of_books_id
      INTO    l_po_sob_id
      FROM    financials_system_parameters;
Line: 2030

        SELECT decode(RT.transaction_type,'CORRECT',RCV_SeedEvents_PVT.CORRECT,
                                RCV_SeedEvents_PVT.DELIVER)
        INTO   l_event_type_id
        FROM   rcv_Transactions RT
        WHERE  transaction_id = p_rcv_transaction_id;
Line: 2165

              ,'Inserting events into RAE');
Line: 2167

      RCV_SeedEvents_PVT.Insert_RAEEvents(
                  p_api_version           => 1.0,
                  x_return_status         => l_return_status,
                  x_msg_count             => l_msg_count,
                  x_msg_data              => l_msg_data,
                  p_rcv_events_tbl        => l_rcv_events_tbl,
                  /* Support for Landed Cost Management */
                  p_lcm_flag              => l_lcm_flag);
Line: 2176

         l_api_message := 'Error inserting events into RAE';
Line: 2356

      SELECT
              RT.po_header_id,
              RT.po_distribution_id,
              POD.destination_type_code,
              RT.transaction_date,
              nvl(RT.dropship_type_code,3),
              POH.org_id,
              POLL.ship_to_organization_id,
              POL.category_id,
              POL.project_id,
              nvl(POLL.accrue_on_receipt_flag,'N'),
              POH.type_lookup_code,
              /* Support for Landed Cost Management */
	      nvl(POLL.lcm_flag, 'N')
      INTO    l_po_header_id,
              l_po_distribution_id,
              l_destination_type,
              l_rcv_trx_date,
              l_drop_ship_flag,
              l_po_org_id,
              l_rcv_organization_id,
              l_category_id,
              l_project_id,
              l_accrual_flag,
              l_po_document_type_code,
              /* Support for Landed Cost Management */
              l_lcm_flag
      FROM    po_headers                POH,
              po_line_locations         POLL,
              po_lines                  POL,
              po_distributions          POD,
              rcv_transactions          RT
      WHERE   RT.transaction_id         = p_rcv_transaction_id
      AND     POH.po_header_id          = RT.po_header_id
      AND     POLL.line_location_id     = RT.po_line_location_id
      AND     POL.po_line_id            = RT.po_line_id
      AND     POD.po_distribution_id    = RT.po_distribution_id;
Line: 2397

      SELECT  operating_unit, ledger_id
      INTO    l_rcv_org_id, l_rcv_sob_id
      FROM    cst_acct_info_v
      WHERE   organization_id = l_rcv_organization_id;
Line: 2404

      SELECT  set_of_books_id
      INTO    l_po_sob_id
      FROM    financials_system_parameters;
Line: 2568

        SELECT decode(RT.transaction_type,'CORRECT',RCV_SeedEvents_PVT.CORRECT,
                                RCV_SeedEvents_PVT.RETURN_TO_RECEIVING)
        INTO   l_event_type_id
        FROM   rcv_Transactions RT
        WHERE  transaction_id = p_rcv_transaction_id;
Line: 2703

              ,'Inserting events into RAE');
Line: 2705

      RCV_SeedEvents_PVT.Insert_RAEEvents(
                  p_api_version           => 1.0,
                  x_return_status         => l_return_status,
                  x_msg_count             => l_msg_count,
                  x_msg_data              => l_msg_data,
                  p_rcv_events_tbl        => l_rcv_events_tbl,
                  /* Support for Landed Cost Management */
                  p_lcm_flag              => l_lcm_flag);
Line: 2714

         l_api_message := 'Error inserting events into RAE';
Line: 2872

        SELECT po_distribution_id,destination_type_code, project_id
        FROM   po_distributions POD
        WHERE  POD.po_distribution_id    = NVL(p_po_distribution_id,POD.po_distribution_id)
        AND    POD.line_location_id      = p_po_line_location_id;
Line: 2907

      SELECT
              RT.po_header_id,
	      RT.po_line_id,
	      RT.po_line_location_id,
              RT.po_distribution_id,
	      RT.transaction_date,
	      nvl(RT.dropship_type_code,3),
	      POH.org_id,
	      POLL.ship_to_organization_id,
	      POL.item_id,
	      POL.category_id,
	      POL.project_id,
	      nvl(POLL.accrue_on_receipt_flag,'N'),
              POH.type_lookup_code,
              /* Support for Landed Cost Management */
	      nvl(POLL.lcm_flag, 'N')
      INTO    l_po_header_id,
	      l_po_line_id,
	      l_po_line_location_id,
	      l_po_distribution_id,
	      l_rcv_trx_date,
	      l_drop_ship_flag,
	      l_po_org_id,
	      l_rcv_organization_id,
	      l_item_id,
	      l_category_id,
	      l_project_id,
	      l_accrual_flag,
	      l_po_document_type_code,
              /* Support for Landed Cost Management */
	      l_lcm_flag
      FROM    po_headers                POH,
	      po_line_locations		POLL,
	      po_lines			POL,
              rcv_transactions          RT
      WHERE   RT.transaction_id 	= p_rcv_transaction_id
      AND     POH.po_header_id 		= RT.po_header_id
      AND     POLL.line_location_id 	= RT.po_line_location_id
      AND     POL.po_line_id 		= RT.po_line_id;
Line: 2949

      SELECT  operating_unit, ledger_id
      INTO    l_rcv_org_id, l_rcv_sob_id
      FROM    cst_acct_info_v
      WHERE   organization_id = l_rcv_organization_id;
Line: 2956

      SELECT  set_of_books_id
      INTO    l_po_sob_id
      FROM    financials_system_parameters;
Line: 3274

	SELECT decode(RT.transaction_type,'CORRECT',RCV_SeedEvents_PVT.CORRECT,
		RCV_SeedEvents_PVT.RETURN_TO_VENDOR)
	INTO   l_event_type_id
	FROM   rcv_Transactions RT
	WHERE  transaction_id = p_rcv_transaction_id;
Line: 3329

              ,'Inserting events into RAE');
Line: 3331

     RCV_SeedEvents_PVT.Insert_RAEEvents(
                  p_api_version           => 1.0,
                  x_return_status         => l_return_status,
                  x_msg_count             => l_msg_count,
                  x_msg_data              => l_msg_data,
		  p_rcv_events_tbl	  => l_rcv_events_tbl,
                  /* Support for Landed Cost Management */
                  p_lcm_flag              => l_lcm_flag);
Line: 3340

         l_api_message := 'Error inserting events into RAE';
Line: 3352

                 ,'Inserting events into MMT');
Line: 3354

        RCV_SeedEvents_PVT.Insert_MMTEvents(
                  p_api_version           => 1.0,
                  x_return_status         => l_return_status,
                  x_msg_count             => l_msg_count,
                  x_msg_data              => l_msg_data,
                  p_rcv_events_tbl        => l_rcv_events_tbl);
Line: 3361

            l_api_message := 'Error inserting events into MMT';
Line: 3580

      SELECT
	      RT.consigned_flag,
              RT.source_document_code,
              RT.transaction_type,
	      RT.parent_transaction_id,
              RT.po_header_id,
	      RT.po_line_id,
	      RT.po_line_location_id,
              RT.po_distribution_id,
              POD.destination_type_code,
              RT.transaction_date,
              nvl(RT.dropship_type_code,3),
              POH.org_id,
              POLL.ship_to_organization_id,
              POL.item_id,
              POL.category_id,
              POL.project_id,
              nvl(POLL.accrue_on_receipt_flag,'N'),
              /* Support for Landed Cost Management */
	      nvl(POLL.lcm_flag, 'N')
      INTO    l_consigned_flag,
              l_source_doc_code,
              l_transaction_type,
	      l_parent_trx_id,
	      l_po_header_id,
	      l_po_line_id,
	      l_po_line_location_id,
              l_po_distribution_id,
              l_destination_type,
              l_rcv_trx_date,
              l_drop_ship_flag,
              l_po_org_id,
              l_rcv_organization_id,
              l_item_id,
              l_category_id,
              l_project_id,
              l_accrual_flag,
              /* Support for Landed Cost Management */
	      l_lcm_flag
      FROM    po_headers                POH,
              po_line_locations         POLL,
              po_lines                  POL,
              po_distributions          POD,
              rcv_transactions          RT
      WHERE   RT.transaction_id         = p_rcv_transaction_id
      AND     POH.po_header_id          = RT.po_header_id
      AND     POLL.line_location_id     = RT.po_line_location_id
      AND     POL.po_line_id            = RT.po_line_id
      AND     POD.po_distribution_id    = RT.po_distribution_id;
Line: 3639

	SELECT transaction_type
	INTO   l_parent_trx_type
	FROM   rcv_transactions PARENT
	WHERE  PARENT.transaction_id = l_parent_trx_id;
Line: 3656

      SELECT  operating_unit, ledger_id
      INTO    l_rcv_org_id, l_rcv_sob_id
      FROM    cst_acct_info_v
      WHERE   organization_id = l_rcv_organization_id;
Line: 3662

      SELECT  set_of_books_id
      INTO    l_po_sob_id
      FROM    financials_system_parameters;
Line: 3819

      SELECT nvl(clearing_account_id, receiving_account_id)
      INTO   l_clearing_acct_id
      FROM   rcv_parameters
      WHERE  organization_id = l_rcv_organization_id;