DBA Data[Home] [Help]

APPS.OKL_LEASE_QUOTE_SERVICE_PVT SQL Statements

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

Line: 56

    SELECT parent_object_code
    INTO   l_parent_object_code
    FROM   okl_lease_quotes_b
    WHERE  id = p_parent_object_id;
Line: 62

      SELECT currency_code
      INTO   x_currency_code
      FROM   okl_lease_opportunities_b lop,
             okl_lease_quotes_b lsq
      WHERE  lsq.parent_object_code = l_parent_object_code
      AND    lsq.parent_object_id = lop.id
      AND    lsq.id = p_parent_object_id;
Line: 70

      SELECT currency_code
      INTO   x_currency_code
      FROM   okl_lease_applications_b lap,
             okl_lease_quotes_b lsq
      WHERE  lsq.parent_object_code = l_parent_object_code
      AND    lsq.parent_object_id = lap.id
      AND    lsq.id = p_parent_object_id;
Line: 118

    SELECT
       attribute_category
      ,attribute1
      ,attribute2
      ,attribute3
      ,attribute4
      ,attribute5
      ,attribute6
      ,attribute7
      ,attribute8
      ,attribute9
      ,attribute10
      ,attribute11
      ,attribute12
      ,attribute13
      ,attribute14
      ,attribute15
      ,inv_item_id
      ,parent_object_code
      ,parent_object_id
      ,effective_from
      ,supplier_id
      ,short_description
      ,description
      ,comments
    INTO
       x_service_rec.attribute_category
      ,x_service_rec.attribute1
      ,x_service_rec.attribute2
      ,x_service_rec.attribute3
      ,x_service_rec.attribute4
      ,x_service_rec.attribute5
      ,x_service_rec.attribute6
      ,x_service_rec.attribute7
      ,x_service_rec.attribute8
      ,x_service_rec.attribute9
      ,x_service_rec.attribute10
      ,x_service_rec.attribute11
      ,x_service_rec.attribute12
      ,x_service_rec.attribute13
      ,x_service_rec.attribute14
      ,x_service_rec.attribute15
      ,x_service_rec.inv_item_id
      ,x_service_rec.parent_object_code
      ,x_service_rec.parent_object_id
      ,x_service_rec.effective_from
      ,x_service_rec.supplier_id
      ,x_service_rec.short_description
      ,x_service_rec.description
      ,x_service_rec.comments
    FROM okl_services_v
    WHERE id = p_service_id;
Line: 306

    SELECT PRICING_METHOD
    INTO lv_pricing_method
    FROM OKL_LEASE_QUOTES_B
    WHERE ID = p_quote_id;
Line: 331

        SELECT NVL(OEC, 0)
        INTO   l_asset_oec
        FROM   okl_assets_b
        WHERE  id = l_link_asset_tbl(i).source_line_id;
Line: 359

          SELECT NVL(OEC, 0)
          INTO   l_asset_oec
          FROM   okl_assets_b
          WHERE  id = l_link_asset_tbl(i).source_line_id;
Line: 460

  PROCEDURE get_deleted_assoc_assets (p_service_id              IN  NUMBER,
                                      p_assoc_asset_tbl         IN  line_relation_tbl_type,
                                      x_deleted_assoc_asset_tbl OUT NOCOPY okl_lre_pvt.lrev_tbl_type,
                                      x_return_status           OUT NOCOPY VARCHAR2) IS

    l_program_name         CONSTANT VARCHAR2(30) := 'get_deleted_assoc_assets';
Line: 469

    SELECT id
    FROM   okl_line_relationships_b
    WHERE  related_line_type = 'SERVICE'
    AND    related_line_id = p_service_id;
Line: 475

    l_delete_flag          VARCHAR2(1);
Line: 481

        l_delete_flag := 'Y';
Line: 485

              l_delete_flag := 'N';
Line: 490

        IF l_delete_flag = 'Y' THEN
          l_assoc_asset_tbl(i).id := l_db_assoc_assets.id;
Line: 502

    x_deleted_assoc_asset_tbl := l_assoc_asset_tbl;
Line: 525

  END get_deleted_assoc_assets;
Line: 563

    okl_lre_pvt.insert_row (
      p_api_version   => G_API_VERSION
     ,p_init_msg_list => G_FALSE
     ,x_return_status => x_return_status
     ,x_msg_count     => x_msg_count
     ,x_msg_data      => x_msg_data
     ,p_lrev_tbl      => l_assoc_assets_tbl
     ,x_lrev_tbl      => lx_assoc_assets_tbl
     );
Line: 605

  PROCEDURE update_line_associations (
     p_service_id                  IN  NUMBER
    ,p_assoc_assets_tbl        IN  line_relation_tbl_type
    ,x_return_status           OUT NOCOPY VARCHAR2
    ,x_msg_count               OUT NOCOPY NUMBER
    ,x_msg_data                OUT NOCOPY VARCHAR2 ) IS

    l_program_name         CONSTANT VARCHAR2(30) := 'update_line_associations';
Line: 616

    l_assoc_update_tbl          okl_lre_pvt.lrev_tbl_type;
Line: 620

    l_deleted_assoc_assets_tbl  okl_lre_pvt.lrev_tbl_type;
Line: 626

    get_deleted_assoc_assets (
      p_service_id              => p_service_id
     ,p_assoc_asset_tbl         => l_line_relation_tbl
     ,x_deleted_assoc_asset_tbl => l_deleted_assoc_assets_tbl
     ,x_return_status           => x_return_status
     );
Line: 639

    IF l_deleted_assoc_assets_tbl.COUNT > 0 THEN
      okl_lre_pvt.delete_row (
                              p_api_version   => G_API_VERSION
                             ,p_init_msg_list => G_FALSE
                             ,x_return_status => x_return_status
                             ,x_msg_count     => x_msg_count
                             ,x_msg_data      => x_msg_data
                             ,p_lrev_tbl      => l_deleted_assoc_assets_tbl );
Line: 660

          IF UPPER(l_line_relation_tbl(i).record_mode) = 'UPDATE' THEN

            l_assoc_update_tbl(i).id                    := l_line_relation_tbl(i).id;
Line: 663

            l_assoc_update_tbl(i).object_version_number := l_line_relation_tbl(i).object_version_number;
Line: 664

            l_assoc_update_tbl(i).related_line_id       := p_service_id;
Line: 665

            l_assoc_update_tbl(i).related_line_type     := l_line_relation_tbl(i).related_line_type;
Line: 666

            l_assoc_update_tbl(i).source_line_type      := l_line_relation_tbl(i).source_line_type;
Line: 667

            l_assoc_update_tbl(i).source_line_id        := l_line_relation_tbl(i).source_line_id;
Line: 668

            l_assoc_update_tbl(i).amount                := l_line_relation_tbl(i).amount;
Line: 686

    IF l_assoc_update_tbl.COUNT > 0 THEN

      okl_lre_pvt.update_row (
        p_api_version   => G_API_VERSION
       ,p_init_msg_list => G_FALSE
       ,x_return_status => x_return_status
       ,x_msg_count     => x_msg_count
       ,x_msg_data      => x_msg_data
       ,p_lrev_tbl      => l_assoc_update_tbl
       ,x_lrev_tbl      => lx_assoc_assets_tbl
       );
Line: 708

      okl_lre_pvt.insert_row (
        p_api_version   => G_API_VERSION
       ,p_init_msg_list => G_FALSE
       ,x_return_status => x_return_status
       ,x_msg_count     => x_msg_count
       ,x_msg_data      => x_msg_data
       ,p_lrev_tbl      => l_assoc_create_tbl
       ,x_lrev_tbl      => lx_assoc_assets_tbl
       );
Line: 748

  END update_line_associations;
Line: 764

      SELECT
         attribute_category
        ,attribute1
        ,attribute2
        ,attribute3
        ,attribute4
        ,attribute5
        ,attribute6
        ,attribute7
        ,attribute8
        ,attribute9
        ,attribute10
        ,attribute11
        ,attribute12
        ,attribute13
        ,attribute14
        ,attribute15
        ,source_line_type
        ,source_line_id
        ,related_line_type
        ,related_line_id
        ,amount
        ,short_description
        ,description
        ,comments
      from okl_line_relationships_v
      where source_line_type = 'ASSET'
  	  and related_line_id = p_source_service_id;
Line: 861

  SELECT id
  FROM OKL_ASSETS_B
  WHERE ORIG_ASSET_ID = p_source_asset_id;
Line: 887

      okl_lre_pvt.insert_row (
        p_api_version   => G_API_VERSION
       ,p_init_msg_list => G_FALSE
       ,x_return_status => x_return_status
       ,x_msg_count     => x_msg_count
       ,x_msg_data      => x_msg_data
       ,p_lrev_tbl      => l_lrship_tbl
       ,x_lrev_tbl      => lx_lrship_tbl );
Line: 948

    okl_svc_pvt.insert_row (
      p_api_version    => G_API_VERSION
     ,p_init_msg_list  => G_FALSE
     ,x_return_status  => x_return_status
     ,x_msg_count      => x_msg_count
     ,x_msg_data       => x_msg_data
     ,p_svcv_rec       => p_service_rec
     ,x_svcv_rec       => lx_service_rec
     );
Line: 992

  PROCEDURE update_header (
    p_service_rec             IN  okl_svc_pvt.svcv_rec_type
   ,x_return_status           OUT NOCOPY VARCHAR2
   ,x_msg_count               OUT NOCOPY NUMBER
   ,x_msg_data                OUT NOCOPY VARCHAR2
   ) IS

    l_program_name         CONSTANT VARCHAR2(30) := 'update_header';
Line: 1006

    okl_svc_pvt.update_row (
      p_api_version    => G_API_VERSION
     ,p_init_msg_list  => G_FALSE
     ,x_return_status  => x_return_status
     ,x_msg_count      => x_msg_count
     ,x_msg_data       => x_msg_data
     ,p_svcv_rec       => p_service_rec
     ,x_svcv_rec       => lx_service_rec
     );
Line: 1042

  END update_header;
Line: 1113

  PROCEDURE update_payment (
     p_service_id                  IN  NUMBER
    ,p_payment_header_rec      IN  okl_lease_quote_cashflow_pvt.cashflow_header_rec_type
    ,p_payment_level_tbl       IN  okl_lease_quote_cashflow_pvt.cashflow_level_tbl_type
    ,x_return_status           OUT NOCOPY VARCHAR2
    ,x_msg_count               OUT NOCOPY NUMBER
    ,x_msg_data                OUT NOCOPY VARCHAR2
    ) IS

    l_program_name         CONSTANT VARCHAR2(30) := 'update_payment';
Line: 1133

    okl_lease_quote_cashflow_pvt.update_cashflow (
      p_api_version          => G_API_VERSION
     ,p_init_msg_list        => G_FALSE
     ,p_transaction_control  => G_FALSE
     ,p_cashflow_header_rec  => l_payment_header_rec
     ,p_cashflow_level_tbl   => l_payment_level_tbl
     ,x_return_status        => x_return_status
     ,x_msg_count            => x_msg_count
     ,x_msg_data             => x_msg_data
     );
Line: 1170

  END update_payment;
Line: 1240

  PROCEDURE update_expense (
     p_service_id              IN  NUMBER
    ,p_expense_header_rec      IN  okl_lease_quote_cashflow_pvt.cashflow_header_rec_type
    ,p_expense_level_tbl       IN  okl_lease_quote_cashflow_pvt.cashflow_level_tbl_type
    ,x_return_status           OUT NOCOPY VARCHAR2
    ,x_msg_count               OUT NOCOPY NUMBER
    ,x_msg_data                OUT NOCOPY VARCHAR2
    ) IS

    l_program_name         CONSTANT VARCHAR2(30) := 'update_expense';
Line: 1260

    okl_lease_quote_cashflow_pvt.update_cashflow (
      p_api_version          => G_API_VERSION
     ,p_init_msg_list        => G_FALSE
     ,p_transaction_control  => G_FALSE
     ,p_cashflow_header_rec  => l_expense_header_rec
     ,p_cashflow_level_tbl   => l_expense_level_tbl
     ,x_return_status        => x_return_status
     ,x_msg_count            => x_msg_count
     ,x_msg_data             => x_msg_data
     );
Line: 1297

  END update_expense;
Line: 1543

      SELECT
      	 id
        ,object_version_number
        ,source_line_type
		,source_line_id
		,related_line_type
		,related_line_id
		,amount
        ,short_description
        ,description
        ,comments
      FROM okl_line_relationships_v
      WHERE related_line_id = p_service_id;
Line: 1597

  PROCEDURE update_service_assets (
    p_api_version             IN  NUMBER
   ,p_init_msg_list           IN  VARCHAR2
   ,p_transaction_control     IN  VARCHAR2
   ,p_quote_id                IN  NUMBER
   ,p_service_id              IN  NUMBER
   ,x_return_status           OUT NOCOPY VARCHAR2
   ,x_msg_count               OUT NOCOPY NUMBER
   ,x_msg_data                OUT NOCOPY VARCHAR2 ) IS

    l_program_name         CONSTANT VARCHAR2(30) := 'update_service_assets';
Line: 1638

	SELECT LVL.AMOUNT * LVL.NUMBER_OF_PERIODS
	INTO ln_service_amount
	FROM OKL_CASH_FLOW_OBJECTS CFO,
    	 OKL_CASH_FLOWS CFL,
	     OKL_CASH_FLOW_LEVELS LVL
	WHERE CFO.SOURCE_ID =    p_service_id
	AND CFO.OTY_CODE = 'QUOTED_SERVICE'
	AND CFO.SOURCE_TABLE = 'OKL_SERVICES_B'
	AND CFL.CFT_CODE = 'OUTFLOW_SCHEDULE'
	AND CFL.CFO_ID = CFO.ID
	AND LVL.CAF_ID = CFL.ID;
Line: 1685

        okl_lre_pvt.update_row (
         	 p_api_version    => G_API_VERSION
	         ,p_init_msg_list => G_FALSE
    	     ,x_return_status => x_return_status
        	 ,x_msg_count     => x_msg_count
	         ,x_msg_data      => x_msg_data
    	     ,p_lrev_tbl      => l_line_relation_tbl
        	 ,x_lrev_tbl      => lx_line_relation_tbl);
Line: 1742

  END update_service_assets ;
Line: 1747

  PROCEDURE update_service (
     p_api_version             IN  NUMBER
    ,p_init_msg_list           IN  VARCHAR2
    ,p_transaction_control     IN  VARCHAR2
    ,p_service_rec             IN  okl_svc_pvt.svcv_rec_type
    ,p_assoc_asset_tbl         IN  line_relation_tbl_type
    ,p_payment_header_rec      IN  okl_lease_quote_cashflow_pvt.cashflow_header_rec_type
    ,p_payment_level_tbl       IN  okl_lease_quote_cashflow_pvt.cashflow_level_tbl_type
    ,p_expense_header_rec      IN  okl_lease_quote_cashflow_pvt.cashflow_header_rec_type
    ,p_expense_level_tbl       IN  okl_lease_quote_cashflow_pvt.cashflow_level_tbl_type
    ,x_return_status           OUT NOCOPY VARCHAR2
    ,x_msg_count               OUT NOCOPY NUMBER
    ,x_msg_data                OUT NOCOPY VARCHAR2
    ) IS

    l_program_name         CONSTANT VARCHAR2(30) := 'update_service';
Line: 1855

    update_header (
      p_service_rec   => p_service_rec
     ,x_return_status => l_return_status
     ,x_msg_count     => x_msg_count
     ,x_msg_data      => x_msg_data
     );
Line: 1870

      update_line_associations (
        p_service_id         => p_service_rec.id
       ,p_assoc_assets_tbl   => l_line_relation_tbl
       ,x_return_status      => l_return_status
       ,x_msg_count          => x_msg_count
       ,x_msg_data           => x_msg_data
       );
Line: 1898

      update_payment (
        p_service_id          => p_service_rec.id
       ,p_payment_header_rec  => p_payment_header_rec
       ,p_payment_level_tbl   => p_payment_level_tbl
       ,x_return_status       => l_return_status
       ,x_msg_count           => x_msg_count
       ,x_msg_data            => x_msg_data
       );
Line: 1915

    update_expense (
      p_service_id          => p_service_rec.id
     ,p_expense_header_rec  => p_expense_header_rec
     ,p_expense_level_tbl   => p_expense_level_tbl
     ,x_return_status       => l_return_status
     ,x_msg_count           => x_msg_count
     ,x_msg_data            => x_msg_data
     );
Line: 1970

  END update_service;
Line: 2140

    SELECT quote.expected_start_date,
           quote.product_id,
           quote.end_of_term_option_id
    INTO ld_src_start_date, ln_src_pdt_id, ln_src_eot_id
    FROM
           okl_services_b srv,
           okl_lease_quotes_b quote
    WHERE
       	 srv.id = p_source_service_id
     AND srv.parent_object_id = quote.id
     AND srv.parent_object_code = 'LEASEQUOTE';
Line: 2152

    SELECT expected_start_date,
           product_id,
           end_of_term_option_id
    INTO ld_tgt_start_date, ln_tgt_pdt_id, ln_tgt_eot_id
    FROM
         okl_lease_quotes_b
    WHERE
       	 id = p_target_quote_id;
Line: 2249

  PROCEDURE delete_service (
     p_api_version             IN  NUMBER
    ,p_init_msg_list           IN  VARCHAR2
    ,p_transaction_control     IN  VARCHAR2
    ,p_service_id              IN  NUMBER
    ,x_return_status           OUT NOCOPY VARCHAR2
    ,x_msg_count               OUT NOCOPY NUMBER
    ,x_msg_data                OUT NOCOPY VARCHAR2
    ) IS

    l_program_name         CONSTANT VARCHAR2(30) := 'delete_service';
Line: 2267

      SELECT id
      FROM   okl_line_relationships_b
      WHERE  related_line_type = 'SERVICE'
      AND    related_line_id = p_service_id;
Line: 2290

      okl_lre_pvt.delete_row (
        p_api_version   => G_API_VERSION
       ,p_init_msg_list => G_FALSE
       ,x_return_status => x_return_status
       ,x_msg_count     => x_msg_count
       ,x_msg_data      => x_msg_data
       ,p_lrev_tbl      => l_lrev_tbl
       );
Line: 2307

    okl_lease_quote_cashflow_pvt.delete_cashflows (
      p_api_version          => G_API_VERSION
     ,p_init_msg_list        => G_FALSE
     ,p_transaction_control  => G_FALSE
     ,p_source_object_code   => 'QUOTED_SERVICE'
     ,p_source_object_id     => p_service_id
     ,x_return_status        => x_return_status
     ,x_msg_count            => x_msg_count
     ,x_msg_data             => x_msg_data
    );
Line: 2326

    okl_svc_pvt.delete_row (
      p_api_version   => G_API_VERSION
     ,p_init_msg_list => G_FALSE
     ,x_return_status => x_return_status
     ,x_msg_count     => x_msg_count
     ,x_msg_data      => x_msg_data
     ,p_svcv_rec      => l_svcv_rec
     );
Line: 2381

  END delete_service;