DBA Data[Home] [Help]

APPS.OKL_QUICK_QUOTES_PVT SQL Statements

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

Line: 15

      SELECT 'x'
      FROM okl_quick_quotes_b
      WHERE  reference_number = p_qqhv_rec_type.reference_number
      AND    id <> NVL(p_qqhv_rec_type.id, -9999);
Line: 120

    okl_qqh_pvt.insert_row(p_api_version
                          ,okl_api.g_false
                          ,l_return_status
                          ,x_msg_count
                          ,x_msg_data
                          ,lp_qqhv_rec_type
                          ,lx_qqhv_rec_type);  -- write to log
Line: 131

                             ,'okl_qqh_pvt.insert_row returned with status ' ||
                              l_return_status ||
                              ' x_msg_data ' ||
                              x_msg_data);
Line: 225

      okl_qql_pvt.insert_row(p_api_version
                            ,okl_api.g_false
                            ,l_return_status
                            ,x_msg_count
                            ,x_msg_data
                            ,lp_qqlv_tbl_type
                            ,lx_qqlv_tbl_type);  -- write to log
Line: 236

                               ,'okl_qql_pvt.insert_row returned with status ' ||
                                l_return_status ||
                                ' x_msg_data ' ||
                                x_msg_data);
Line: 426

  PROCEDURE update_qqh (p_api_version   IN             NUMBER
                      ,p_init_msg_list  IN             VARCHAR2     DEFAULT okl_api.g_false
                      ,x_return_status     OUT NOCOPY  VARCHAR2
                      ,x_msg_count         OUT NOCOPY  NUMBER
                      ,x_msg_data          OUT NOCOPY  VARCHAR2
                      ,p_qqhv_rec_type  IN             qqhv_rec_type
                      ,x_qqhv_rec_type     OUT NOCOPY  qqhv_rec_type) IS
    lp_qqhv_rec_type               qqhv_rec_type;
Line: 435

    l_module              CONSTANT fnd_log_messages.module%TYPE := 'okl.plsql.OKL_QUICK_QUOTES_PVT.UPDATE_QQH';
Line: 439

    l_api_name            CONSTANT VARCHAR2(30) := 'update_qqh';
Line: 451

                             ,'begin debug OKLRQQHB.pls call update_qqh');
Line: 489

    okl_qqh_pvt.update_row(p_api_version
                          ,okl_api.g_false
                          ,l_return_status
                          ,x_msg_count
                          ,x_msg_data
                          ,lp_qqhv_rec_type
                          ,lx_qqhv_rec_type);  -- write to log
Line: 500

                             ,'okl_qqh_pvt.update_row returned with status ' ||
                              l_return_status ||
                              ' x_msg_data ' ||
                              x_msg_data);
Line: 521

                             ,'end debug OKLRQQHB.pls call update_qqh');
Line: 546

  END update_qqh;
Line: 604

    okl_qqh_pvt.update_row(p_api_version
                          ,okl_api.g_false
                          ,l_return_status
                          ,x_msg_count
                          ,x_msg_data
                          ,lp_qqhv_rec_type
                          ,lx_qqhv_rec_type);  -- write to log
Line: 615

                             ,'okl_qqh_pvt.update_row returned with status ' ||
                              l_return_status ||
                              ' x_msg_data ' ||
                              x_msg_data);
Line: 668

  PROCEDURE update_qql (p_api_version   IN             NUMBER
                      ,p_init_msg_list  IN             VARCHAR2     DEFAULT okl_api.g_false
                      ,x_return_status     OUT NOCOPY  VARCHAR2
                      ,x_msg_count         OUT NOCOPY  NUMBER
                      ,x_msg_data          OUT NOCOPY  VARCHAR2
                      ,p_qqlv_tbl_type  IN             qqlv_tbl_type
                      ,x_qqlv_tbl_type     OUT NOCOPY  qqlv_tbl_type) IS

    lp_qqlv_tbl_type               qqlv_tbl_type := p_qqlv_tbl_type;  --dkagrawa assigned the in value
Line: 678

    l_module              CONSTANT fnd_log_messages.module%TYPE := 'okl.plsql.OKL_QUICK_QUOTES_PVT.UPDATE_QQL';
Line: 682

    l_api_name            CONSTANT VARCHAR2(30) := 'update_qql';
Line: 694

                             ,'begin debug OKLRQQHB.pls call update_qql');
Line: 712

        okl_qql_pvt.update_row(p_api_version
                              ,okl_api.g_false
                              ,l_return_status
                              ,x_msg_count
                              ,x_msg_data
                              ,lp_qqlv_tbl_type
                              ,lx_qqlv_tbl_type);  -- write to log
Line: 722

                                 ,'okl_qql_pvt.update_row returned with status ' ||
                                  l_return_status ||
                                  ' x_msg_data ' ||
                                  x_msg_data);
Line: 745

                             ,'end debug OKLRQQHB.pls call update_qql');
Line: 770

  END update_qql;
Line: 772

  PROCEDURE update_quick_qte(p_api_version      IN             NUMBER
			      ,p_init_msg_list  IN             VARCHAR2     DEFAULT okl_api.g_false
			      ,x_return_status     OUT NOCOPY  VARCHAR2
			      ,x_msg_count         OUT NOCOPY  NUMBER
			      ,x_msg_data          OUT NOCOPY  VARCHAR2
			      ,p_qqhv_rec_type  IN             qqhv_rec_type
			      ,x_qqhv_rec_type      OUT NOCOPY qqhv_rec_type
			      ,p_qqlv_tbl_type  IN             qqlv_tbl_type
			      ,x_qqlv_tbl_type     OUT NOCOPY  qqlv_tbl_type) IS

    lp_qqhv_rec_type               qqhv_rec_type;
Line: 786

    l_module              CONSTANT fnd_log_messages.module%TYPE := 'okl.plsql.OKL_QUICK_QUOTES_PVT.UPDATE_QUICK_QTE';
Line: 790

    l_api_name            CONSTANT VARCHAR2(30) := 'update_quick_qte';
Line: 802

                             ,'begin debug OKLRQQHB.pls call update_quick_qte');
Line: 821

	okl_quick_quotes_pvt.update_qqh(
	         p_api_version   => p_api_version
		,p_init_msg_list => okl_api.g_false
		,x_return_status => l_return_status
		,x_msg_count     => x_msg_count
		,x_msg_data      => x_msg_data
		,p_qqhv_rec_type => lp_qqhv_rec_type
		,x_qqhv_rec_type => lx_qqhv_rec_type
		);
Line: 834

                             ,'okl_quick_quotes_pvt.update_qqh returned with status ' ||
                              l_return_status ||
                              ' x_msg_data ' ||
                              x_msg_data);
Line: 846

	okl_quick_quotes_pvt.update_qql(
	           p_api_version   => p_api_version
		  ,p_init_msg_list => okl_api.g_false
		  ,x_return_status => l_return_status
		  ,x_msg_count     => x_msg_count
		  ,x_msg_data      => x_msg_data
		  ,p_qqlv_tbl_type => lp_qqlv_tbl_type
		  ,x_qqlv_tbl_type => lx_qqlv_tbl_type
		  );
Line: 859

                                 ,'okl_quick_quotes_pvt.update_qql returned with status ' ||
                                  l_return_status ||
                                  ' x_msg_data ' ||
                                  x_msg_data);
Line: 880

                             ,'end debug OKLRQQHB.pls call update_quick_qte');
Line: 905

  END update_quick_qte;
Line: 907

  PROCEDURE delete_qql(p_api_version    IN             NUMBER
                      ,p_init_msg_list  IN             VARCHAR2     DEFAULT okl_api.g_false
                      ,x_return_status     OUT NOCOPY  VARCHAR2
                      ,x_msg_count         OUT NOCOPY  NUMBER
                      ,x_msg_data          OUT NOCOPY  VARCHAR2
                      ,p_qqlv_rec_type   IN            qqlv_rec_type) IS

  l_api_name		CONSTANT VARCHAR2(30) := 'delete_qql';
Line: 918

  l_module		CONSTANT fnd_log_messages.module%TYPE := 'okl.plsql.OKL_QUICK_QUOTES_PVT.DELETE_QQL';
Line: 931

                             ,'begin debug OKLRQQHB.pls call delete_qql');
Line: 947

      okl_qql_pvt.delete_row(
        p_api_version   => p_api_version,
        p_init_msg_list => p_init_msg_list,
        x_return_status => l_return_status,
        x_msg_count     => x_msg_count,
        x_msg_data      => x_msg_data,
        p_qqlv_rec      => l_qqlv_rec);
Line: 958

                             ,'okl_qql_pvt.delete_row returned with status ' ||
                              l_return_status ||
                              ' x_msg_data ' ||
                              x_msg_data);
Line: 977

                             ,'end debug OKLRQQHB.pls call delete_qql');
Line: 1002

  END delete_qql;
Line: 1004

  PROCEDURE delete_qql(p_api_version    IN             NUMBER
                      ,p_init_msg_list  IN             VARCHAR2     DEFAULT okl_api.g_false
                      ,x_return_status     OUT NOCOPY  VARCHAR2
                      ,x_msg_count         OUT NOCOPY  NUMBER
                      ,x_msg_data          OUT NOCOPY  VARCHAR2
                      ,p_qqlv_tbl_type  IN             qqlv_tbl_type) IS

  l_api_name		CONSTANT VARCHAR2(30) := 'delete_qql';
Line: 1015

  l_module		CONSTANT fnd_log_messages.module%TYPE := 'okl.plsql.OKL_QUICK_QUOTES_PVT.DELETE_QQL';
Line: 1028

                             ,'begin debug OKLRQQHB.pls call delete_qql');
Line: 1044

      okl_qql_pvt.delete_row(
        p_api_version   => p_api_version,
        p_init_msg_list => p_init_msg_list,
        x_return_status => l_return_status,
        x_msg_count     => x_msg_count,
        x_msg_data      => x_msg_data,
        p_qqlv_tbl      => l_qqlv_tbl);
Line: 1055

                             ,'okl_qql_pvt.delete_row returned with status ' ||
                              l_return_status ||
                              ' x_msg_data ' ||
                              x_msg_data);
Line: 1074

                             ,'end debug OKLRQQHB.pls call delete_qql');
Line: 1099

  END delete_qql;
Line: 1146

  l_update_cfh_rec      cashflow_hdr_rec;
Line: 1147

  l_update_cfl_tbl      cashflow_level_tbl;
Line: 1148

  l_cf_update_flag      VARCHAR2(1):='N';
Line: 1178

  SELECT hdr.frequency_code, ver.srt_rate
  FROM okl_fe_std_rt_tmp_all_b hdr, okl_fe_Std_rt_tmp_vers ver
  WHERE ver.std_rate_tmpl_ver_id = template_id AND
           hdr.std_rate_tmpl_id = ver.std_rate_tmpl_id;
Line: 1185

   SELECT hdr.frq_code, ver.arrears_yn
   FROM okl_ls_rt_fctr_sets_v hdr,
         okl_fe_rate_set_versions_v ver
    WHERE ver.rate_set_id = hdr.id
     AND  ver.rate_set_version_id = rate_card_id;
Line: 1193

   SELECT category_concat_segs item_name,
          description description
   FROM   mtl_categories_v
   WHERE  category_id  = cp_category_id;
Line: 1200

  SELECT levels.id LEVEL_ID,
         levels.amount AMOUNT,
         levels.number_of_periods NUMBER_OF_PERIODS,
         levels.stub_days STUB_DAYS,
         levels.stub_amount STUB_AMOUNT,
         levels.start_date START_DATE,
         levels.object_version_number ovn,
         ql.basis BASIS,
         flow.cft_code CFT_CODE,
         obj.id OBJ_ID,
         flow.id FLOW_ID,
         ql.id LINE_ID,
         levels.rate,
         ql.value VALUE
  FROM okl_cash_flow_objects obj, okl_cash_flows flow, okl_cash_flow_levels levels,
  okl_quick_quotes_b qh, okl_quick_quote_lines_b ql
  where obj.id= flow.cfo_id
  AND flow.id= levels.caf_id
  AND qh.id= ql.quick_quote_id
  AND obj.source_table='OKL_QUICK_QUOTE_LINES_B'
  AND obj.source_id= ql.id
  AND (ql.basis='ASSET_COST' or ql.basis='RENT')
  AND qh.id=p_qqh_id;
Line: 1227

  SELECT NVL(cur.precision,0) precision
  FROM fnd_currencies cur
  WHERE cur.currency_code = p_currency_code;
Line: 1234

  SELECT oty_code FROM okl_cash_flow_objects
  WHERE source_table= 'OKL_QUICK_QUOTE_LINES_B' AND source_id= qql_id;
Line: 1238

  SELECT id FROM okl_quick_quote_lines_b where quick_quote_id=qqh_id;
Line: 1248

  SELECT levels.amount AMOUNT,
         levels.number_of_periods NUMBER_OF_PERIODS,
         levels.start_date START_DATE,
         ql.TYPE TYPE
  FROM okl_cash_flow_objects obj, okl_cash_flows flow, okl_cash_flow_levels levels,
  okl_quick_quotes_b qh, okl_quick_quote_lines_b ql
  where obj.id= flow.cfo_id
  AND flow.id= levels.caf_id
  AND qh.id= ql.quick_quote_id
  AND obj.source_table='OKL_QUICK_QUOTE_LINES_B'
  AND obj.source_id= ql.id
  AND ql.type IN ('FEE_EXPENSE','FEE_PAYMENT','INSURANCE','TAX','SERVICE')
  AND qh.id=p_qqh_id;
Line: 1263

 SELECT LEVELS.AMOUNT AMOUNT, LEVELS.NUMBER_OF_PERIODS NUMBER_OF_PERIODS,
         LEVELS.START_DATE START_DATE, QL.TYPE TYPE
  FROM
    OKL_QUICK_QUOTES_B QH,
    OKL_QUICK_QUOTE_LINES_B QL,
    OKL_CASH_FLOW_OBJECTS OBJ,
    OKL_CASH_FLOWS FLOW,
    OKL_CASH_FLOW_LEVELS LEVELS,
    FND_LOOKUPS  LKP
  WHERE OBJ.ID= FLOW.CFO_ID
   AND FLOW.ID= LEVELS.CAF_ID
   AND QH.ID= QL.QUICK_QUOTE_ID
   AND LKP.LOOKUP_TYPE = 'OKL_CF_OBJECT_TYPE'
   /* The following 3 obj columns are part of the composite index CFO_COMP_I */
   AND OBJ.OTY_CODE = LKP.LOOKUP_CODE
   AND OBJ.SOURCE_TABLE='OKL_QUICK_QUOTE_LINES_B'
   AND OBJ.SOURCE_ID= QL.ID
   AND QL.TYPE IN ('FEE_EXPENSE','FEE_PAYMENT','INSURANCE','TAX','SERVICE')
   AND QH.ID=p_qqh_id;
Line: 1441

			update_qqh(l_api_version,
                   p_init_msg_list,
                   x_return_status,
                   x_msg_count,
                   x_msg_data,
                   l_qqhv_rec_type,
                   lx_qqhv_rec_type);
Line: 1462

      okl_qql_pvt.delete_row(p_api_version,
                             p_init_msg_list,
                             x_return_status,
                             x_msg_count,
                             x_msg_data,
                             lxx_qqlv_tbl_type);
Line: 1481

            okl_qql_pvt.insert_row(p_api_version
                            ,okl_api.g_false
                            ,x_return_status
                            ,x_msg_count
                            ,x_msg_data
                            ,l_qqlv_tbl_type(l_count)
                            ,lx_qqlv_tbl_type(l_count));
Line: 1504

         OKL_LEASE_QUOTE_CASHFLOW_PVT.delete_cashflows (
          l_api_version
         ,p_init_msg_list
         ,OKL_API.G_FALSE
         ,l_oty_code    --dkagrawa changed source table name to soucrce object code
         ,l_qqlv_tbl_type(i).id
         ,x_return_status
         ,x_msg_count
         ,x_msg_data
        );
Line: 1524

      OKL_LEASE_QUOTE_CASHFLOW_PVT.delete_cashflows (
         l_api_version
        ,p_init_msg_list
        ,OKL_API.G_FALSE
        ,'QUICK_QUOTE'        --dkagrawa changed source table name to soucrce object code
        ,l_qqhv_rec_type.id
        ,x_return_status
        ,x_msg_count
        ,x_msg_data
        );
Line: 1543

      /*delete_qql(l_api_version,
                   p_init_msg_list,
                   x_return_status,
                   x_msg_count,
                   x_msg_data,
                   l_qqlv_tbl_type);
Line: 1557

      okl_qqh_pvt.delete_row(l_api_version,
                   p_init_msg_list,
                   x_return_status,
                   x_msg_count,
                   x_msg_data,
                   l_qqhv_rec_type);
Line: 1666

          l_cf_update_flag := 'Y';
Line: 1671

          l_cf_update_flag := 'Y';
Line: 1819

            okl_qql_pvt.insert_row(p_api_version
                            ,okl_api.g_false
                            ,x_return_status
                            ,x_msg_count
                            ,x_msg_data
                            ,lp_qqlv_rec
                            ,lx_qqlv_rec);
Line: 2003

    IF (l_cf_update_flag='Y') THEN
      FOR cashflow_dtl_rec IN get_cashflow_dtls(lx_qqhv_rec_type.id) LOOP
         IF (cashflow_dtl_rec.cft_code = 'OUTFLOW_SCHEDULE') THEN
           l_update_cfh_rec.TYPE_code :='OUTFLOW';
Line: 2008

           l_update_cfh_rec.TYPE_code :='INFLOW';
Line: 2010

         l_update_cfh_rec.arrears_flag:=l_qqhv_rec_type.TARGET_ARREARS;
Line: 2011

         l_update_cfh_rec.frequency_code:= l_frequency;
Line: 2013

         l_update_cfh_rec.parent_object_id:=cashflow_dtl_rec.line_id;
Line: 2014

         l_update_cfh_rec.quote_type_code:= 'QQ';
Line: 2015

         l_update_cfh_rec.quote_id :=lx_qqhv_rec_type.id;
Line: 2016

         l_update_cfh_rec.cashflow_header_id:=cashflow_dtl_rec.flow_id;
Line: 2017

         l_update_cfh_rec.cashflow_object_id:=cashflow_dtl_rec.obj_id;
Line: 2018

         l_update_cfh_rec.cashflow_header_ovn:=1;
Line: 2020

         l_update_cfl_tbl(1).cashflow_level_id:=cashflow_dtl_rec.level_id;
Line: 2021

         l_update_cfl_tbl(1).start_date:=cashflow_dtl_rec.start_date;
Line: 2022

         l_update_cfl_tbl(1).rate:=cashflow_dtl_rec.rate;
Line: 2023

         l_update_cfl_tbl(1).stub_amount:=cashflow_dtl_rec.stub_amount;
Line: 2024

         l_update_cfl_tbl(1).stub_days:=cashflow_dtl_rec.stub_days;
Line: 2025

         l_update_cfl_tbl(1).periods:=cashflow_dtl_rec.number_of_periods;
Line: 2027

           l_update_cfl_tbl(1).periodic_amount:=cashflow_dtl_rec.value * .01
                                               *pricing_results_table(line_number).financed_amount;
Line: 2030

           l_update_cfl_tbl(1).periodic_amount:=cashflow_dtl_rec.value * .01*l_total_rent_payment
                                                /cashflow_dtl_rec.number_of_periods;
Line: 2033

         l_update_cfl_tbl(1).cashflow_level_ovn:=1;
Line: 2034

         l_update_cfl_tbl(1).record_mode:='UPDATE';
Line: 2038

         OKL_LEASE_QUOTE_CASHFLOW_PVT.update_cashflow(l_api_version,
                                                    p_init_msg_list,
                                                    OKL_API.G_FALSE,
                                                    l_update_cfh_rec,
                                                    l_update_cfl_tbl,
                                                    x_return_status,
                                                    x_msg_count,
                                                    x_msg_data
                                                    );
Line: 2074

      update_quick_qte(l_api_version,
                   p_init_msg_list,
                   x_return_status,
                   x_msg_count,
                   x_msg_data,
                   lx_qqhv_rec_type,
                   x_qqhv_rec_type,
                   lx_qqlv_tbl_type,
                   x_qqlv_tbl_type);
Line: 2100

          l_cfl_tbl_type(t).record_mode := 'UPDATE';
Line: 2102

          OKL_LEASE_QUOTE_CASHFLOW_PVT.update_cashflow(l_api_version,
                                                    p_init_msg_list,
                                                    OKL_API.G_FALSE,
                                                    l_cfh_rec_type,
                                                    l_cfl_tbl_type,
                                                    x_return_status,
                                                    x_msg_count,
                                                    x_msg_data
                                                    );
Line: 2163

		SELECT id,
			object_version_number,
			attribute_category,
			attribute1,
			attribute2,
			attribute3,
			attribute4,
			attribute5,
			attribute6,
			attribute7,
			attribute8,
			attribute9,
			attribute10,
			attribute11,
			attribute12,
			attribute13,
			attribute14,
			attribute15,
			reference_number,
			expected_start_date,
			org_id,
			inv_org_id,
			currency_code,
			term,
			end_of_term_option_id,
			pricing_method,
			lease_opportunity_id,
			originating_vendor_id,
			program_agreement_id,
			sales_rep_id,
			sales_territory_id,
			structured_pricing,
			line_level_pricing,
			rate_template_id,
			rate_card_id,
			lease_rate_factor,
			target_rate_type,
			target_rate,
			target_amount,
			target_frequency,
			target_arrears,
			target_periods,
			iir,
			sub_iir,
			booking_yield,
			sub_booking_yield,
			pirr,
			sub_pirr,
			airr,
			sub_airr,
			sts_code,
			short_description,
			description,
			comments
		FROM   okl_quick_quotes_v
		WHERE  id = p_id;
Line: 2221

		SELECT id,
					 object_version_number,
					 attribute_category,
					 attribute1,
					 attribute2,
					 attribute3,
					 attribute4,
					 attribute5,
					 attribute6,
					 attribute7,
					 attribute8,
					 attribute9,
					 attribute10,
					 attribute11,
					 attribute12,
					 attribute13,
					 attribute14,
					 attribute15,
					 quick_quote_id,
					 type,
					 basis,
					 value,
					 end_of_term_value_default,
					 end_of_term_value,
					 percentage_of_total_cost,
					 item_category_id,
					 item_category_set_id,
					 lease_rate_factor,
					 short_description,
					 description,
					 comments
		FROM   okl_quick_quote_lines_v
		WHERE  quick_quote_id = p_id;
Line: 2319

	 --SELECT OKL_QQH_REF_SEQ.nextval INTO x_qqhv_rec.reference_number FROM DUAL;
Line: 2402

    SELECT ID FROM OKL_QUICK_QUOTES_B
    WHERE LEASE_OPPORTUNITY_ID = l_lopp_id;