DBA Data[Home] [Help]

APPS.OKI_LOAD_WBC_PVT SQL Statements

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

Line: 51

    SELECT rowid
    FROM   oki_wip_by_customers wbc
    WHERE  wbc.period_set_name   = p_period_set_name
    AND    wbc.period_name       = p_period_name
    AND    wbc.authoring_org_id  = p_authoring_org_id
    AND    wbc.customer_party_id = p_customer_id
    AND    wbc.scs_code          = p_scs_code ;
Line: 90

    SELECT oki_wip_by_customers_s1.nextval seq
    FROM dual
    ;
Line: 110

    INSERT INTO oki_wip_by_customers
    (        id
           , period_set_name
           , period_name
           , period_type
           , authoring_org_id
           , authoring_org_name
           , customer_party_id
           , customer_name
           , scs_code
           , base_forecast_amount
           , base_booked_amount
           , base_lost_amount
           , request_id
           , program_application_id
           , program_id
           , program_update_date )
    VALUES ( l_sequence
           , p_period_set_name
           , p_period_name
           , p_period_type
           , p_authoring_org_id
           , p_authoring_org_name
           , p_customer_party_id
           , p_customer_name
           , p_scs_code
           , p_base_forecast_amount
           , p_base_booked_amount
           , p_base_lost_amount
           , oki_load_wbc_pvt.g_request_id
           , oki_load_wbc_pvt.g_program_application_id
           , oki_load_wbc_pvt.g_program_id
           , oki_load_wbc_pvt.g_program_update_date ) ;
Line: 209

    UPDATE oki_wip_by_customers SET
        base_forecast_amount    = p_base_forecast_amount
      , base_booked_amount      = p_base_booked_amount
      , base_lost_amount        = p_base_lost_amount
      , request_id              = oki_load_wbc_pvt.g_request_id
      , program_application_id  = oki_load_wbc_pvt.g_program_application_id
      , program_id              = oki_load_wbc_pvt.g_program_id
      , program_update_date     = oki_load_wbc_pvt.g_program_update_date
    WHERE ROWID = p_wbc_rowid ;
Line: 291

    SELECT     NVL(SUM(shd.base_forecast_amount), 0) base_forecast_amount
    FROM       oki_sales_k_hdrs shd
    -- Contract is a renewal contract
    WHERE      shd.is_new_yn   IS NULL
    -- Contract must have undergone forecasting
    AND        shd.close_date  IS NOT NULL
    AND        shd.win_percent IS NOT NULL
    -- Expected close date is in the period
    AND        shd.close_date BETWEEN p_glpr_start_date AND p_glpr_end_date
    AND        shd.customer_party_id = p_customer_party_id
    AND        shd.authoring_org_id  = p_authoring_org_id
    AND        shd.scs_code          = p_scs_code
    ;
Line: 315

    SELECT     NVL(SUM(shd.base_contract_amount), 0) base_contract_amount
    FROM       oki_sales_k_hdrs shd
    -- Contract is a renewal contract
    WHERE      shd.is_new_yn IS NULL
    -- Contract is signed or active
    AND        shd.ste_code  IN ('SIGNED', 'ACTIVE')
    -- Lesser of the signed date or the start date falls within
    -- the period
    AND        LEAST(NVL(shd.date_signed, shd.start_date),shd.start_date)
                     BETWEEN p_glpr_start_date AND p_glpr_end_date
    AND        shd.customer_party_id = p_customer_party_id
    AND        shd.authoring_org_id  = p_authoring_org_id
    AND        shd.scs_code          = p_scs_code
    ;
Line: 340

    SELECT     NVL(SUM(cpl.base_price_negotiated), 0) base_price_negotiated
    /*11510 change removed oki_Expired_lines and joined to oki_cov_prd_lines*/
    FROM       oki_cov_prd_lines cpl
             , oki_sales_k_hdrs shd
    WHERE      shd.chr_id            = cpl.chr_id
    /*11510 change start*/
    AND        cpl.is_exp_not_renewed_yn='Y'
    /*11510 change start*/
    -- expiration date is in the period
    AND        cpl.end_date BETWEEN p_glpr_start_date AND p_glpr_end_date
    AND        shd.customer_party_id = p_customer_party_id
    AND        shd.authoring_org_id  = p_authoring_org_id
    AND        shd.scs_code          = p_scs_code ;
Line: 357

    SELECT DISTINCT(shd.customer_party_id) customer_id
           , /*11510 change*/ NULL customer_name
           , shd.authoring_org_id authoring_org_id
           , /*11510 change*/ NULL authoring_org_name
           , shd.scs_code scs_code
    FROM   oki_sales_k_hdrs shd
  ;
Line: 425

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 432

            l_loc := 'Insert the new record.' ;
Line: 455

            l_loc := 'Update the existing record.' ;
Line: 562

    SELECT     NVL(SUM(shd.base_forecast_amount), 0) base_forecast_amount
    FROM       oki_sales_k_hdrs shd
    -- Contract is a renewal contract
    WHERE      shd.is_new_yn   IS NULL
    -- Contract must have undergone forecasting
    AND        shd.close_date  IS NOT NULL
    AND        shd.win_percent IS NOT NULL
    -- Expected close date is in the period
    AND        shd.close_date BETWEEN p_glpr_start_date AND p_glpr_end_date
    AND        shd.customer_party_id = p_customer_party_id
    AND        shd.scs_code          = p_scs_code
    ;
Line: 584

    SELECT     NVL(SUM(shd.base_contract_amount), 0) base_contract_amount
    FROM       oki_sales_k_hdrs shd
    -- Contract is a renewal contract
    WHERE      shd.is_new_yn IS NULL
    -- Contract is signed or active
    AND        shd.ste_code  IN ('SIGNED', 'ACTIVE')
    -- Lesser of the signed date or the start date falls within
    -- the period
    AND        LEAST(NVL(shd.date_signed, shd.start_date), shd.start_date)
                     BETWEEN p_glpr_start_date AND p_glpr_end_date
    AND        shd.customer_party_id = p_customer_party_id
    AND        shd.scs_code          = p_scs_code
    ;
Line: 607

    SELECT     NVL(SUM(cpl.base_price_negotiated), 0) base_price_negotiated
    /*11510 change removed oki_Expired_lines and joined to oki_cov_prd_lines*/
    FROM       oki_cov_prd_lines cpl
             , oki_sales_k_hdrs shd
    -- expiration date is in the period
    WHERE      shd.chr_id            = cpl.chr_id
   /*11510 change start*/
    AND        cpl.is_exp_not_renewed_yn  = 'Y'
  /*11510 change end*/
    AND        cpl.end_date BETWEEN p_glpr_start_date AND p_glpr_end_date
    AND        shd.customer_party_id = p_customer_party_id
    AND        shd.scs_code          = p_scs_code
    ;
Line: 624

    SELECT DISTINCT(shd.customer_party_id) customer_id
           , /*11510 change*/NULL customer_name
           , shd.scs_code
    FROM   oki_sales_k_hdrs shd ;
Line: 686

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 693

            l_loc := 'Insert the new record.' ;
Line: 716

            l_loc := 'Update the existing record.' ;
Line: 821

    SELECT     NVL(SUM(shd.base_forecast_amount), 0) base_forecast_amount
    FROM       oki_sales_k_hdrs shd
    -- Contract is a renewal contract
    WHERE      shd.is_new_yn   IS NULL
    -- Contract must have undergone forecasting
    AND        shd.close_date  IS NOT NULL
    AND        shd.win_percent IS NOT NULL
    -- Expected close date is in the period
    AND        shd.close_date BETWEEN p_glpr_start_date AND p_glpr_end_date
    AND        shd.customer_party_id = p_customer_party_id
    ;
Line: 840

    SELECT     NVL(SUM(shd.base_contract_amount), 0) base_contract_amount
    FROM       oki_sales_k_hdrs shd
    -- Contract is a renewal contract
    WHERE      shd.is_new_yn IS NULL
    -- Contract is signed or active
    AND        shd.ste_code  IN ('SIGNED', 'ACTIVE')
    -- Lesser of the signed date or the start date falls within
    -- the period
    AND        LEAST(NVL(shd.date_signed, shd.start_date), shd.start_date)
                     BETWEEN p_glpr_start_date AND p_glpr_end_date
    AND        shd.customer_party_id = p_customer_party_id
    ;
Line: 860

    SELECT     NVL(SUM(cpl.base_price_negotiated), 0)  base_price_negotiated
    /*11510 change removed oki_Expired_lines and joined to oki_cov_prd_lines*/
    FROM       oki_cov_prd_lines cpl
             , oki_sales_k_hdrs shd
    -- expiration date is in the period
    WHERE      shd.chr_id            = cpl.chr_id
   /*11510 change start*/
    AND        cpl.is_exp_not_renewed_yn  = 'Y'
  /*11510 change end*/
    AND        cpl.end_date BETWEEN p_glpr_start_date AND p_glpr_end_date
    AND        shd.customer_party_id = p_customer_party_id
    ;
Line: 876

    SELECT DISTINCT(shd.customer_party_id) customer_id,
           /*11510 Change*/ NULL customer_name
    FROM   oki_sales_k_hdrs shd
    ;
Line: 935

        l_loc := 'Opening cursor to determine if insert or update should occur.'  ;
Line: 943

            l_loc := 'Insert the new record.' ;
Line: 966

            l_loc := 'Update the existing record.' ;
Line: 1120

    oki_refresh_pvt.update_oki_refresh( l_table_name, l_retcode ) ;
Line: 1177

  g_program_update_date    :=  SYSDATE ;