DBA Data[Home] [Help]

APPS.PQH_COMMITMENT_POSTING SQL Statements

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

Line: 63

PROCEDURE insert_pqh_gms_interface
(
 p_budget_detail_id  IN pqh_gl_interface.budget_detail_id%TYPE,
 p_period_name       IN varchar2,
 p_project_id        IN pqh_gl_interface.project_id%TYPE,
 p_task_id	     IN pqh_gl_interface.task_id%TYPE,
 p_award_id	     IN pqh_gl_interface.award_id%TYPE,
 p_expenditure_type  IN pqh_gl_interface.expenditure_type%TYPE,
 p_organization_id   IN pqh_gl_interface.organization_id%TYPE,
 p_amount            IN pqh_gl_interface.amount_dr%TYPE,
 p_posting_type_cd   IN pqh_gl_interface.posting_type_cd%TYPE
);
Line: 76

PROCEDURE update_pqh_gms_interface
(
 p_budget_detail_id  IN pqh_gl_interface.budget_detail_id%TYPE,
 p_period_name       IN varchar2,
 p_project_id        IN pqh_gl_interface.project_id%TYPE,
 p_task_id	     IN pqh_gl_interface.task_id%TYPE,
 p_award_id	     IN pqh_gl_interface.award_id%TYPE,
 p_expenditure_type  IN pqh_gl_interface.expenditure_type%TYPE,
 p_organization_id   IN pqh_gl_interface.organization_id%TYPE,
 p_amount            IN pqh_gl_interface.amount_dr%TYPE,
 p_posting_type_cd   IN pqh_gl_interface.posting_type_cd%TYPE
) ;
Line: 126

             g_period_amt_tab.delete(cnt);
Line: 141

  Select start_time_period_id,end_time_period_id
    From pqh_budget_periods
   Where budget_period_id = p_budget_period_id;
Line: 146

   Select start_date,end_date
     From per_time_periods
    Where time_period_id = p_time_period_id;
Line: 203

SELECT bg.currency_code
FROM  per_business_groups bg,
      pqh_budgets bgt,
      pqh_budget_versions bvr
WHERE bgt.budget_id = bvr.budget_id
  AND bvr.budget_version_id = p_budget_version_id
  AND bgt.business_group_id = bg.business_group_id ;
Line: 212

SELECT bgt.currency_code
FROM  pqh_budgets  bgt,
      pqh_budget_versions bvr
WHERE bgt.budget_id = bvr.budget_id
  AND bvr.budget_version_id = g_budget_version_id;
Line: 283

  UPDATE pqh_process_log
     SET message_type_cd =  'ERROR',
         message_text   = p_message_text,
         txn_table_route_id    =  g_table_route_id_bvr
   WHERE process_log_id = pqh_process_batch_log.g_master_process_log_id;
Line: 340

 SELECT *
 FROM pqh_budget_versions
 WHERE budget_version_id = p_budget_version_id;
Line: 345

 SELECT *
 FROM pqh_budgets
 WHERE budget_id = ( SELECT budget_id
                     FROM pqh_budget_versions
                     WHERE budget_version_id = p_budget_version_id ) ;
Line: 352

 SELECT *
 FROM gl_sets_of_books
 WHERE set_of_books_id = p_set_of_books_id;
Line: 357

 SELECT *
 FROM per_shared_types
 WHERE shared_type_id = p_shared_type_id;
Line: 364

 SELECT *
 FROM gl_budget_versions
 WHERE budget_name =p_gl_budget_name  AND
       status in ('O','C');
Line: 370

 SELECT *
 FROM gl_je_sources
 WHERE je_source_name = 'Public Sector Budget';
Line: 375

 SELECT *
 FROM gl_je_categories
 WHERE je_category_name = 'Public Sector Budget';
Line: 380

 SELECT table_route_id
 FROM pqh_table_route
 WHERE table_alias =  p_table_alias;
Line: 385

 SELECT COUNT(*)
 FROM pqh_budget_gl_flex_maps
 WHERE budget_id = p_budget_id;
Line: 390

 SELECT COUNT(*)
 FROM pqh_budget_gl_flex_maps
 WHERE budget_id = p_budget_id
   AND payroll_cost_segment IS NULL;
Line: 396

 select encumbrance_type_id
 from gl_encumbrance_types
 where encumbrance_type_id = 1000;
Line: 971

  END IF; -- insert error message if l_error_flag is Y
Line: 996

  Select bst.budget_set_id,decode(p_budget_unit_seq,1,bst.budget_unit1_value,
                                                    2,bst.budget_unit2_value,
                                                      bst.budget_unit3_value)
    From pqh_budget_sets bst
   Where bst.budget_period_id = p_budget_period_id;
Line: 1003

  Select distinct bst.budget_set_id,
                       decode(p_budget_unit_seq,1,bst.budget_unit1_value,
                                                2,bst.budget_unit2_value,
                                                  bst.budget_unit3_value)
    from pqh_budget_sets bst,pqh_budget_elements bel
   Where bst.budget_period_id  = p_budget_period_id
     and bst.budget_set_id   = bel.budget_set_id
     and bel.element_type_id = p_element_type_id ;
Line: 1106

Procedure update_money_dist_table(p_budget_ratio_table  IN  t_ratio_table,
                                  p_element_type_id     IN  number,
                                  p_commitment          IN  NUMBER,
                                  p_distribution_table IN OUT NOCOPY  t_distribution_table) IS
--
cnt                  number(10);
Line: 1118

l_proc            varchar2(72) := g_package||'update_money_dist_table';
Line: 1188

End update_money_dist_table;
Line: 1192

Procedure update_distribution_table(p_budget_ratio_table  IN  t_ratio_table,
                                    p_commitment          IN  NUMBER,
                                    p_distribution_table IN OUT NOCOPY  t_distribution_table) IS
--
cnt                  number(10);
Line: 1201

l_proc            varchar2(72) := g_package||'update_distribution_table';
Line: 1267

End update_distribution_table;
Line: 1411

 Select BGT.BUDGETED_ENTITY_CD , BGT.BUSINESS_GROUP_ID
      From   PQH_BUDGETS BGT,
             PQH_BUDGET_VERSIONS BVR
      Where  BGT.BUDGET_ID = BVR.BUDGET_ID
      And    BGT.POSITION_CONTROL_FLAG ='Y'
      And    l_effective_dt BETWEEN BGT.BUDGET_START_DATE AND BGT.BUDGET_END_DATE
      And    BVR.BUDGET_VERSION_ID = P_BUDGET_VERSION_ID;
Line: 1475

   update_distribution_table(p_budget_ratio_table   => l_budget_ratio_table,
                             p_commitment           => l_commitment,
                             p_distribution_table   => l_distribution_table);
Line: 1517

 Select BGT.BUDGETED_ENTITY_CD, BGT.BUSINESS_GROUP_ID
      From   PQH_BUDGETS BGT,
             PQH_BUDGET_VERSIONS BVR
      Where  BGT.BUDGET_ID = BVR.BUDGET_ID
      And    BGT.POSITION_CONTROL_FLAG ='Y'
      And    l_effective_dt BETWEEN BGT.BUDGET_START_DATE AND BGT.BUDGET_END_DATE
      And    BVR.BUDGET_VERSION_ID = P_BUDGET_VERSION_ID;
Line: 1528

Select distinct bel.element_type_id
       from pqh_budget_sets bst,pqh_budget_elements bel
 Where bst.budget_period_id = p_budget_period_id
   and bst.budget_set_id = bel.budget_set_id;
Line: 1608

      update_money_dist_table  (p_budget_ratio_table   => l_budget_ratio_table,
                                p_commitment           => l_commt_value, /* l_commitment,*/
                                p_element_type_id      => l_element_type_id,
                                p_distribution_table   => l_distribution_table);
Line: 1669

SELECT bst.budget_set_id,
       bel.budget_element_id,bel.element_type_id,bel.distribution_percentage,
       bfs.budget_fund_src_id,bfs.cost_allocation_keyflex_id,
       bfs.project_id,bfs.task_id,bfs.award_id,
       bfs.expenditure_type,bfs.organization_id,
       bfs.distribution_percentage
 FROM pqh_budget_fund_srcs bfs, pqh_budget_elements bel,
      pqh_budget_sets bst
WHERE bst.budget_period_id  = p_budget_period_id
  AND bst.budget_set_id     = bel.budget_set_id
  AND bel.budget_element_id = bfs.budget_element_id;
Line: 1682

Select bpr.budget_period_id ,
       bfs.cost_allocation_keyflex_id,
       bfs.project_id,
       bfs.task_id,
       bfs.award_id,
       bfs.expenditure_type,
       bfs.organization_id
FROM pqh_budget_fund_srcs bfs, pqh_budget_elements bel,
     pqh_budget_sets bst, pqh_budget_periods bpr
WHERE bpr.budget_detail_id  = p_budget_detail_id
  AND bpr.budget_period_id  = bst.budget_period_id
  AND bst.budget_set_id     = bel.budget_set_id
  AND bel.budget_element_id = bfs.budget_element_id
GROUP BY bpr.budget_period_id ,bfs.cost_allocation_keyflex_id,bfs.project_id,
       bfs.task_id,bfs.award_id,bfs.expenditure_type, bfs.organization_id;
Line: 1699

 Select bpr.budget_period_id
   From pqh_budget_periods bpr
  Where bpr.budget_detail_id  = p_budget_detail_id;
Line: 1711

  g_period_amt_tab.DELETE;
Line: 1755

    g_distribution_table.DELETE;
Line: 1946

 SELECT start_date
 FROM per_time_periods
 WHERE time_period_id = ( SELECT start_time_period_id
                          FROM pqh_budget_periods
                          WHERE budget_period_id = p_budget_period_id );
Line: 1953

 SELECT *
 FROM  gl_period_statuses
 WHERE application_id = g_application_id
   AND set_of_books_id = g_set_of_books_id
   AND closing_status  = 'O'
   AND p_start_date BETWEEN start_date AND end_date;
Line: 1998

PROCEDURE update_period_commitment_tab
(
 p_budget_detail_id          IN       pqh_budget_details.budget_detail_id%TYPE,
 p_post_to_period_name		 IN  gl_period_statuses.period_name%TYPE
)
IS
 --
 -- The foll procedure reads the global table g_period_amt_tab and
 -- fetches the period_name and code_combination_id corresponding to the
 -- period_id and cost_allocation_keyflex_id.If it does not find a period_name
 -- or a code_combination_id then it will populate the global variable
 -- g_detail_error to Y and we will not populate the pqh_gl_interface
 -- table for the current budget_detail_id.
 --
 l_gl_period_statuses_rec       gl_period_statuses%ROWTYPE;
Line: 2021

 l_proc                         varchar2(72) := 'update_period_commitment_tab';
Line: 2047

      		SELECT gl.start_date into l_accounting_date
      		FROM gl_period_statuses gl,  pqh_budgets bdgt
      		WHERE gl.application_id = g_application_id
      		AND gl.closing_status = 'O'
      		AND gl.set_of_books_id = g_set_of_books_id
      		AND gl.period_name = p_post_to_period_name
      		AND bdgt.budget_id = g_budget_id
      		AND gl.start_date <= bdgt.budget_end_date
      		AND gl.end_date >= bdgt.budget_start_date ;
Line: 2097

           pqh_process_batch_log.insert_log
           (
               p_message_type_cd    =>  'ERROR',
               p_message_text       =>  l_message_text
           );
Line: 2155

          pqh_process_batch_log.insert_log
          (
               p_message_type_cd    =>  'ERROR',
               p_message_text       =>  l_message_text
          );
Line: 2191

END update_period_commitment_tab;
Line: 2206

                   3         3      US   100  (update)    3         3        US   200  ( update )
                   4         4      US   100  (unchanged) 4         4        US   100  ( unchanged )
                                                          4         7        UK   100  ( new )
                                                          7         9        US   100  ( new )


***************************************************************************************************************/
--
PROCEDURE build_old_bdgt_dtls_tab
(
 p_budget_detail_id         IN pqh_budget_details.budget_detail_id%TYPE,
 p_posting_type_cd          IN varchar2
) IS
--
-- local variables
--
l_pqh_gl_interface_rec    pqh_gl_interface%ROWTYPE;
Line: 2227

SELECT *
FROM pqh_gl_interface
WHERE budget_version_id        =  g_budget_version_id
  AND budget_detail_id         =  p_budget_detail_id
  AND posting_type_cd          =  p_posting_type_cd
  AND NVL(adjustment_flag,'N') = 'N'
  AND status IS NOT NULL
  AND posting_date IS NOT NULL
  AND (NVL(amount_dr,0) > 0 OR NVL(amount_cr,0) > 0 ) ;
Line: 2403

 SELECT *
  FROM pqh_gl_interface
 WHERE budget_version_id    = g_budget_version_id
   AND budget_detail_id     = p_budget_detail_id
   AND posting_type_cd      = p_posting_type_cd
   AND period_name          = p_period_name
   AND code_combination_id  = p_code_combination_id
   AND currency_code        = p_currency_code
   AND NVL(adjustment_flag,'N') = 'N'
   AND status IS NOT NULL
   AND posting_date IS NOT NULL
   AND cost_allocation_keyflex_id is not null
  FOR UPDATE of amount_dr;
Line: 2425

   SELECT *
    FROM pqh_gl_interface
   WHERE budget_version_id        = g_budget_version_id
     AND budget_detail_id         = p_budget_detail_id
     AND posting_type_cd          = p_posting_type_cd
     AND period_name              = p_period_name
     AND project_id               = p_project_id
     AND task_id                  = p_task_id
     AND award_id                 = p_award_id
     AND expenditure_type         = p_expenditure_type
     AND organization_id          = p_organization_id
     AND currency_code            = p_currency_code
     AND NVL(adjustment_flag,'N') = 'N'
     AND status IS NOT NULL
     AND posting_date IS NOT NULL
     AND cost_allocation_keyflex_id is null
  FOR UPDATE of amount_dr;
Line: 2480

               UPDATE pqh_gl_interface
                  SET amount_dr = 0
                WHERE CURRENT OF csr_pqh_gl_interface;
Line: 2500

	       UPDATE pqh_gl_interface
	         SET amount_dr = 0
               WHERE CURRENT OF csr_pqh_gms_interface;
Line: 2509

               INSERT INTO pqh_gl_interface
               (
                          gl_interface_id,
                          budget_version_id,
                          budget_detail_id,
                          period_name,
                          accounting_date,
                          code_combination_id,
                          cost_allocation_keyflex_id,
                          project_id,
                          task_id,
                          award_id,
                          expenditure_type,
                          organization_id,
                          amount_dr,
                          amount_cr,
                          currency_code,
                          status,
                          adjustment_flag,
                          posting_type_cd,
                          posting_date
               )
               VALUES
               (
                          pqh_gl_interface_s.nextval,
                          g_budget_version_id,
                          p_budget_detail_id,
                          g_old_bdgt_dtls_tab(i).period_name,
                          g_old_bdgt_dtls_tab(i).accounting_date,
                          g_old_bdgt_dtls_tab(i).code_combination_id,
                          g_old_bdgt_dtls_tab(i).cost_allocation_keyflex_id,
                          g_old_bdgt_dtls_tab(i).project_id,
                          g_old_bdgt_dtls_tab(i).task_id,
                          g_old_bdgt_dtls_tab(i).award_id,
                          g_old_bdgt_dtls_tab(i).expenditure_type,
                          g_old_bdgt_dtls_tab(i).organization_id,
                          0,
                          NVL(l_pqh_gl_interface_rec.amount_dr,0),
                          g_old_bdgt_dtls_tab(i).currency_code,
                          null,
                          'Y',
                          'COMMITMENT',
                          null
               );
Line: 2598

SELECT *
FROM pqh_gl_interface
WHERE budget_version_id = g_budget_version_id
  AND period_name = p_period_name
  AND currency_code = p_currency_code
  AND code_combination_id = p_code_combination_id
  AND posting_type_cd = p_posting_type_cd
  AND NVL(adjustment_flag,'N') = 'Y'
  AND status IS NULL
  AND posting_date IS NULL;
Line: 2624

     UPDATE pqh_gl_interface
        SET amount_dr = NVL(amount_dr,0) -
                        NVL(l_pqh_gl_interface_rec.amount_dr,0) +
                        NVL(l_pqh_gl_interface_rec.amount_cr,0)
         WHERE budget_version_id = l_pqh_gl_interface_rec.budget_version_id
           AND budget_detail_id = l_pqh_gl_interface_rec.budget_detail_id
           AND period_name = l_pqh_gl_interface_rec.period_name
           AND currency_code = l_pqh_gl_interface_rec.currency_code
           AND code_combination_id = l_pqh_gl_interface_rec.code_combination_id
           AND posting_type_cd = p_posting_type_cd
           AND NVL(adjustment_flag,'N') = 'N'
           AND status IS NOT NULL;
Line: 2642

  UPDATE pqh_budget_details
     SET commitment_gl_status = 'ERROR'
   WHERE budget_version_id    = g_budget_version_id
     AND budget_detail_id IN
       ( SELECT distinct budget_detail_id
         FROM pqh_gl_interface
         WHERE budget_version_id = g_budget_version_id
           AND period_name = p_period_name
           AND currency_code = p_currency_code
           AND code_combination_id = p_code_combination_id
           AND posting_type_cd = p_posting_type_cd
           AND status IS NULL
           AND posting_date IS NULL
        );
Line: 2659

  DELETE FROM pqh_gl_interface
   WHERE budget_version_id = g_budget_version_id
     AND period_name = p_period_name
     AND currency_code = p_currency_code
     AND code_combination_id = p_code_combination_id
     AND posting_type_cd = p_posting_type_cd
     AND status IS NULL
     AND posting_date IS NULL;
Line: 2710

 SELECT period_name, accounting_date,
        code_combination_id, cost_allocation_keyflex_id, currency_code,
        SUM(NVL(amount_dr,0))  amount_dr,
        SUM(NVL(amount_cr,0))  amount_cr
 FROM pqh_gl_interface
 WHERE budget_version_id IN (g_budget_version_id, NVL(g_last_posted_ver,0) )
   AND status IS NULL
   AND posting_date IS NULL
   AND posting_type_cd = 'COMMITMENT'
   AND cost_allocation_keyflex_id is NOT NULL
 GROUP BY period_name, accounting_date,code_combination_id,
          cost_allocation_keyflex_id,currency_code;
Line: 2724

 SELECT gl_bc_packets_s.nextval
 FROM dual;
Line: 2728

 SELECT *
 FROM  gl_period_statuses
 WHERE application_id = g_application_id
   AND set_of_books_id = g_set_of_books_id
   AND period_name  = p_period_name;
Line: 2735

 SELECT description
 FROM gl_lookups
 WHERE lookup_type = 'FUNDS_CHECK_RESULT_CODE'
   AND lookup_code = p_lookup_code
   AND NVL(enabled_flag,'N') = 'Y';
Line: 2742

 SELECT result_code
 FROM gl_bc_packets
 WHERE packet_id = p_packet_id;
Line: 2747

 SELECT description
 FROM gl_lookups
 WHERE lookup_type = 'FUNDS_CHECK_STATUS_CODE'
   AND lookup_code = p_lookup_code
   AND NVL(enabled_flag,'N') = 'Y';
Line: 2763

     hr_utility.set_location('Inserting into GL_BC_PACKETS',10);
Line: 2899

             pqh_process_batch_log.insert_log
                 (
                  p_message_type_cd    =>  'ERROR',
                  p_message_text       =>  l_packet_status_code||' : '||l_fc_message
                 );
Line: 2905

             hr_utility.set_location('Inserted Error and calling reverse txn ',140);
Line: 2927

    hr_utility.set_location('Inserting into GL_INTERFACE',200);
Line: 2937

        INSERT INTO gl_interface
               (status,
                set_of_books_id,
                user_je_source_name,
                user_je_category_name,
                currency_code,
                date_created,
                created_by,
                actual_flag,
                accounting_date,
                period_name,
                code_combination_id,
                chart_of_accounts_id,
                entered_dr,
                entered_cr,
                encumbrance_type_id,
                reference1,
                reference2)
           VALUES
               ('NEW',
                g_set_of_books_id,
                g_user_je_source_name,
                g_user_je_category_name,
                l_currency_code,
                sysdate,
                8302,
                'E',
                l_accounting_date,
                l_period_name,
                l_code_combination_id,
                g_chart_of_accounts_id,
                NVL(l_amount_dr,0),
                NVL(l_amount_cr,0),
                1000, -- encumbrance_type_id
                g_budget_version_id,
                l_cost_allocation_keyflex_id);
Line: 2991

PROCEDURE update_commitment_gl_status
IS
--
-- This procedure will update the gl_status of pqh_budget_versions,
-- pqh_budget_details and update the pqh_gl_interface table
-- We always update the TRANSFERED_TO_GL_FLAG = Y to indicate this is the
-- latest budget_version that is posted to GL
-- gl_status = POST or ERROR
--
-- local variables
--
 l_budget_details_rec           pqh_budget_details%ROWTYPE;
Line: 3006

 SELECT *
 FROM pqh_budget_details
 WHERE budget_version_id = g_budget_version_id
   AND NVL(commitment_gl_status,'X') <> 'ERROR'
  FOR UPDATE OF commitment_gl_status;
Line: 3013

 SELECT COUNT(*)
 FROM pqh_budget_details
  WHERE budget_version_id = g_budget_version_id
   AND NVL(commitment_gl_status,'ERROR') = 'ERROR';
Line: 3018

 l_proc                         varchar2(72) := g_package||'update_commitment_gl_status';
Line: 3031

      UPDATE pqh_budget_details
         SET commitment_gl_status = 'POST'
       WHERE CURRENT OF csr_budget_details;
Line: 3048

     UPDATE pqh_budget_versions
        SET commitment_gl_status = 'POST'
      WHERE budget_version_id = g_budget_version_id;
Line: 3060

     UPDATE pqh_budget_versions
        SET commitment_gl_status = 'ERROR'
      WHERE budget_version_id = g_budget_version_id;
Line: 3074

   UPDATE pqh_gl_interface
      SET posting_date = sysdate,
          status       = 'POST'
   WHERE budget_version_id = g_budget_version_id
     AND posting_type_cd = 'COMMITMENT'
     AND posting_date IS NULL
     AND status       IS NULL;
Line: 3084

   UPDATE pqh_gl_interface
   SET posting_date = sysdate,
       status       = 'POST'
   WHERE budget_version_id = NVL(g_last_posted_ver,0)
     AND posting_type_cd = 'COMMITMENT'
     AND posting_date IS NULL
     AND status       IS NULL;
Line: 3100

END update_commitment_gl_status;
Line: 3119

 SELECT *
 FROM pqh_budget_details
 WHERE budget_detail_id = p_budget_detail_id ;
Line: 3152

PROCEDURE insert_pqh_gl_interface
(
 p_budget_detail_id            IN  pqh_gl_interface.budget_detail_id%TYPE,
 p_period_name                 IN  pqh_gl_interface.period_name%TYPE,
 p_accounting_date             IN  pqh_gl_interface.accounting_date%TYPE,
 p_code_combination_id         IN  pqh_gl_interface.code_combination_id%TYPE,
 p_cost_allocation_keyflex_id  IN  pqh_gl_interface.cost_allocation_keyflex_id%TYPE,
 p_amount                      IN  pqh_gl_interface.amount_dr%TYPE,
 p_currency_code               IN  pqh_gl_interface.currency_code%TYPE,
 p_posting_type_cd             IN pqh_gl_interface.posting_type_cd%TYPE
 ) IS
 --
 -- This procedure will insert record into pqh_gl_interface
 -- If the same UOM is repeated more then once then we would update the unposted txn.
 --
 CURSOR csr_pqh_gl_interface IS
 SELECT COUNT(*)
  FROM pqh_gl_interface
 WHERE budget_version_id    = g_budget_version_id
   AND budget_detail_id     = p_budget_detail_id
   AND period_name          = p_period_name
   AND code_combination_id  = p_code_combination_id
   AND currency_code        = p_currency_code
   AND posting_type_cd    = p_posting_type_cd
   AND NVL(adjustment_flag,'N') = 'N'
   AND status IS NULL
   AND posting_date IS NULL
   AND cost_allocation_keyflex_id is not null;
Line: 3183

 l_proc                         varchar2(72) := g_package||'insert_pqh_gl_interface';
Line: 3196

 hr_utility.set_location('l_count in Insert pqh_gl_interface : '||l_count,10);
Line: 3202

    UPDATE pqh_gl_interface
       SET AMOUNT_DR = NVL(AMOUNT_DR,0) + NVL(p_amount,0)
     WHERE budget_version_id    = g_budget_version_id
       AND budget_detail_id     = p_budget_detail_id
       AND period_name          = p_period_name
       AND code_combination_id  = p_code_combination_id
       AND currency_code        = p_currency_code
       AND posting_type_cd      = p_posting_type_cd
       AND NVL(adjustment_flag,'N') = 'N'
       AND status IS NULL
       AND posting_date IS NULL;
Line: 3219

    INSERT INTO pqh_gl_interface
    (
       gl_interface_id,
       budget_version_id,
       budget_detail_id,
       period_name,
       accounting_date,
       code_combination_id,
       cost_allocation_keyflex_id,
       amount_dr,
       amount_cr,
       currency_code,
       status,
       adjustment_flag,
       posting_date,
       posting_type_cd
    )
    VALUES
    (
       pqh_gl_interface_s.nextval,
       g_budget_version_id,
       p_budget_detail_id,
       p_period_name,
       p_accounting_date,
       p_code_combination_id,
       p_cost_allocation_keyflex_id,
       NVL(p_amount,0),
       0,
       p_currency_code,
       null,
       null,
       null,
       p_posting_type_cd
    );
Line: 3264

END insert_pqh_gl_interface;
Line: 3267

PROCEDURE update_pqh_gl_interface
(
p_budget_detail_id           IN pqh_gl_interface.budget_detail_id%TYPE,
p_period_name                IN pqh_gl_interface.period_name%TYPE,
p_accounting_date            IN pqh_gl_interface.accounting_date%TYPE,
p_code_combination_id        IN pqh_gl_interface.code_combination_id%TYPE,
p_cost_allocation_keyflex_id IN pqh_gl_interface.cost_allocation_keyflex_id%TYPE,
p_amount                     IN pqh_gl_interface.amount_dr%TYPE,
p_currency_code              IN pqh_gl_interface.currency_code%TYPE,
p_posting_type_cd            IN pqh_gl_interface.posting_type_cd%TYPE
) IS
--
-- This procedure will update pqh_gl_interface and create a adjustment record
--
--
-- local variables
--
 l_proc                         varchar2(72) := g_package||'update_pqh_gl_interface';
Line: 3292

 SELECT *
  FROM pqh_gl_interface
 WHERE budget_version_id    = g_budget_version_id
   AND budget_detail_id     = p_budget_detail_id
   AND period_name          = p_period_name
   AND code_combination_id  = p_code_combination_id
   AND currency_code        = p_currency_code
   AND posting_type_cd      = p_posting_type_cd
   AND NVL(adjustment_flag,'N') = 'N'
   AND status IS NOT NULL
   AND posting_date IS NOT NULL
   AND cost_allocation_keyflex_id is not null
  FOR UPDATE of amount_dr;
Line: 3331

  UPDATE pqh_gl_interface
  SET amount_dr = NVL(p_amount,0)
  WHERE CURRENT OF csr_pqh_gl_interface;
Line: 3341

     INSERT INTO pqh_gl_interface
     (
         gl_interface_id,
         budget_version_id,
         budget_detail_id,
         period_name,
         accounting_date,
         code_combination_id,
         cost_allocation_keyflex_id,
         amount_dr,
         amount_cr,
         currency_code,
         status,
         adjustment_flag,
         posting_date,
         posting_type_cd
     )
     VALUES
     (
         pqh_gl_interface_s.nextval,
         g_budget_version_id,
         p_budget_detail_id,
         p_period_name,
         p_accounting_date,
         p_code_combination_id,
         p_cost_allocation_keyflex_id,
         NVL(l_amount_dr,0),
         NVL(l_amount_cr,0),
         p_currency_code,
         null,
         'Y',
         null,
         p_posting_type_cd
     );
Line: 3376

  END IF; -- create i.e insert a adjustment record ONLY if l_amount_diff <> 0
Line: 3386

END update_pqh_gl_interface;
Line: 3411

 SELECT COUNT(*)
 FROM pqh_gl_interface
 WHERE budget_version_id    = p_budget_version_id
   AND budget_detail_id     = p_budget_detail_id
   AND period_name          = p_period_name
   AND code_combination_id  = p_code_combination_id
   AND currency_code        = p_currency_code
   AND posting_type_cd      = p_posting_type_cd
   AND NVL(adjustment_flag,'N') = 'N'
   AND status IS NOT NULL
   AND posting_date IS NOT NULL
   AND cost_allocation_keyflex_id is not null;
Line: 3457

          update_pqh_gl_interface
          (
          p_budget_detail_id          => p_budget_detail_id,
          p_period_name               => g_period_amt_tab(i).period_name,
          p_accounting_date           => g_period_amt_tab(i).accounting_date,
          p_code_combination_id       => g_period_amt_tab(i).code_combination_id,
          p_cost_allocation_keyflex_id=> g_period_amt_tab(i).cost_allocation_keyflex_id,
          p_amount                    => g_period_amt_tab(i).commitment1,
          p_posting_type_cd           => p_posting_type_cd,
          p_currency_code             => g_currency_code1
          );
Line: 3473

          insert_pqh_gl_interface
          (
          p_budget_detail_id            => p_budget_detail_id,
          p_period_name                 => g_period_amt_tab(i).period_name,
          p_accounting_date             => g_period_amt_tab(i).accounting_date,
          p_code_combination_id         => g_period_amt_tab(i).code_combination_id,
          p_cost_allocation_keyflex_id  => g_period_amt_tab(i).cost_allocation_keyflex_id,
          p_amount                      => g_period_amt_tab(i).commitment1,
          p_posting_type_cd           => p_posting_type_cd,
          p_currency_code               => g_currency_code1
          );
Line: 3503

          update_pqh_gl_interface
          (
          p_budget_detail_id          => p_budget_detail_id,
          p_period_name               => g_period_amt_tab(i).period_name,
          p_accounting_date           => g_period_amt_tab(i).accounting_date,
          p_code_combination_id       => g_period_amt_tab(i).code_combination_id,
          p_cost_allocation_keyflex_id=> g_period_amt_tab(i).cost_allocation_keyflex_id,
          p_amount                    => g_period_amt_tab(i).commitment2,
          p_posting_type_cd           => p_posting_type_cd,
          p_currency_code             => g_currency_code2
          );
Line: 3518

          insert_pqh_gl_interface
          (
          p_budget_detail_id            => p_budget_detail_id,
          p_period_name                 => g_period_amt_tab(i).period_name,
          p_accounting_date             => g_period_amt_tab(i).accounting_date,
          p_code_combination_id         => g_period_amt_tab(i).code_combination_id,
          p_cost_allocation_keyflex_id  => g_period_amt_tab(i).cost_allocation_keyflex_id,
          p_amount                      => g_period_amt_tab(i).commitment2,
          p_posting_type_cd           => p_posting_type_cd,
          p_currency_code               => g_currency_code2
          );
Line: 3550

          update_pqh_gl_interface
          (
          p_budget_detail_id          => p_budget_detail_id,
          p_period_name               => g_period_amt_tab(i).period_name,
          p_accounting_date           => g_period_amt_tab(i).accounting_date,
          p_code_combination_id       => g_period_amt_tab(i).code_combination_id,
          p_cost_allocation_keyflex_id=> g_period_amt_tab(i).cost_allocation_keyflex_id,
          p_amount                    => g_period_amt_tab(i).commitment3,
          p_posting_type_cd           => p_posting_type_cd,
          p_currency_code             => g_currency_code3
          );
Line: 3565

          insert_pqh_gl_interface
          (
          p_budget_detail_id            => p_budget_detail_id,
          p_period_name                 => g_period_amt_tab(i).period_name,
          p_accounting_date             => g_period_amt_tab(i).accounting_date,
          p_code_combination_id         => g_period_amt_tab(i).code_combination_id,
          p_cost_allocation_keyflex_id  => g_period_amt_tab(i).cost_allocation_keyflex_id,
          p_amount                      => g_period_amt_tab(i).commitment3,
          p_posting_type_cd             => p_posting_type_cd,
          p_currency_code               => g_currency_code3
          );
Line: 3585

     UPDATE pqh_budget_details
        SET commitment_gl_status = ''
      WHERE budget_detail_id = p_budget_detail_id;
Line: 3594

     UPDATE pqh_budget_details
        SET commitment_gl_status = 'ERROR'
      WHERE budget_detail_id = p_budget_detail_id;
Line: 3639

 SELECT *
 FROM pqh_budget_details
 WHERE budget_version_id  = p_budget_version_id
 AND NVL(commitment_gl_status,'X') <> 'POST';
Line: 3648

    Select 1
    From   PQH_BUDGETS BGT,
           PQH_BUDGET_VERSIONS BVR
    Where  BGT.BUDGET_ID = BVR.BUDGET_ID
    And    BGT.POSITION_CONTROL_FLAG ='Y'
    And    l_effective_dt BETWEEN BGT.BUDGET_START_DATE AND BGT.BUDGET_END_DATE
    And    BVR.BUDGET_VERSION_ID = P_BUDGET_VERSION_ID;
Line: 3747

      update_period_commitment_tab
      (
           p_budget_detail_id => l_budget_details_rec.budget_detail_id,
           p_post_to_period_name => p_post_to_period_name
      );
Line: 3840

     update_commitment_gl_status;
Line: 3874

PROCEDURE insert_pqh_gms_interface
(
 p_budget_detail_id  IN pqh_gl_interface.budget_detail_id%TYPE,
 p_period_name       IN varchar2,
 p_project_id        IN pqh_gl_interface.project_id%TYPE,
 p_task_id	     IN pqh_gl_interface.task_id%TYPE,
 p_award_id	     IN pqh_gl_interface.award_id%TYPE,
 p_expenditure_type  IN pqh_gl_interface.expenditure_type%TYPE,
 p_organization_id   IN pqh_gl_interface.organization_id%TYPE,
 p_amount            IN pqh_gl_interface.amount_dr%TYPE,
 p_posting_type_cd   IN pqh_gl_interface.posting_type_cd%TYPE
) IS
 /*
  This procedure will insert record into pqh_gl_interface
  If the same UOM is repeated more then once then we would update the unposted txn.
 */
 --
-- local variables
--
 l_proc                         varchar2(72) := g_package||'.insert_pqh_gms_interface';
Line: 3897

 Select COUNT(*)
 From   pqh_gl_interface
 Where budget_version_id        = g_budget_version_id
   AND budget_detail_id         = p_budget_detail_id
   AND p_period_name            = p_period_name
   AND posting_type_cd          = p_posting_type_cd
   AND project_id               = p_project_id
   AND task_id	   	        = p_task_id
   AND award_id	   	        = p_award_id
   AND expenditure_type	        = p_expenditure_type
   AND organization_id 	        = p_organization_id
   AND NVL(adjustment_flag,'N') = 'N'
   AND status IS NULL
   AND posting_date IS NULL
   AND cost_allocation_keyflex_id is null;
Line: 3922

  hr_utility.set_location('l_count in Insert pqh_gl_interface : '||l_count,10);
Line: 3927

    UPDATE pqh_gl_interface
       SET AMOUNT_DR                = NVL(AMOUNT_DR,0) + NVL(p_amount,0)
     WHERE budget_version_id        = g_budget_version_id
       AND budget_detail_id         = p_budget_detail_id
       AND p_period_name            = p_period_name
       AND posting_type_cd          = p_posting_type_cd
       AND project_id               = p_project_id
       AND task_id	   	    = p_task_id
       AND award_id	   	    = p_award_id
       AND expenditure_type	    = p_expenditure_type
       AND organization_id 	    = p_organization_id
       AND NVL(adjustment_flag,'N') = 'N'
       AND status IS NULL
       AND posting_date IS NULL;
Line: 3945

     INSERT INTO pqh_gl_interface
     (
       gl_interface_id,
       budget_version_id,
       budget_detail_id,
       period_name,
       project_id,
       task_id,
       award_id,
       expenditure_type,
       organization_id,
       amount_dr,
       amount_cr,
       currency_code,
       status,
       adjustment_flag,
       posting_date,
       posting_type_cd
     )
     VALUES
     (
       pqh_gl_interface_s.nextval,
       g_budget_version_id,
       p_budget_detail_id,
       p_period_name,
       p_project_id,
       p_task_id,
       p_award_id,
       p_expenditure_type,
       p_organization_id,
       NVL(p_amount,0),
       0,
       g_bgt_currency_code,
       null,
       null,
       null,
       p_posting_type_cd
     );
Line: 3995

END insert_pqh_gms_interface;
Line: 3998

PROCEDURE update_pqh_gms_interface
(
 p_budget_detail_id  IN pqh_gl_interface.budget_detail_id%TYPE,
 p_period_name       IN varchar2,
 p_project_id        IN pqh_gl_interface.project_id%TYPE,
 p_task_id	     IN pqh_gl_interface.task_id%TYPE,
 p_award_id	     IN pqh_gl_interface.award_id%TYPE,
 p_expenditure_type  IN pqh_gl_interface.expenditure_type%TYPE,
 p_organization_id   IN pqh_gl_interface.organization_id%TYPE,
 p_amount            IN pqh_gl_interface.amount_dr%TYPE,
 p_posting_type_cd   IN pqh_gl_interface.posting_type_cd%TYPE
) IS
 /*
  This procedure will update pqh_gl_interface and create a adjustment record
 */
 --
-- local variables
--
 l_proc                         varchar2(72) := g_package||'.update_pqh_gms_interface';
Line: 4024

 SELECT *
  FROM pqh_gl_interface
 WHERE budget_version_id        = g_budget_version_id
   AND budget_detail_id         = p_budget_detail_id
   AND period_name              = p_period_name
   AND posting_type_cd          = p_posting_type_cd
   AND project_id               = p_project_id
   AND task_id	   	        = p_task_id
   AND award_id	   	        = p_award_id
   AND expenditure_type	        = p_expenditure_type
   AND organization_id 	        = p_organization_id
   AND NVL(adjustment_flag,'N') = 'N'
   AND status IS NOT NULL
   AND posting_date IS NOT NULL
   AND cost_allocation_keyflex_id is  null
  FOR UPDATE of amount_dr;
Line: 4059

     UPDATE pqh_gl_interface
       SET amount_dr = NVL(p_amount,0)
      WHERE CURRENT OF csr_pqh_gms_interface;
Line: 4068

       INSERT INTO pqh_gl_interface
       (
         gl_interface_id,
         budget_version_id,
         budget_detail_id,
         period_name,
         project_id,
	 task_id,
	 award_id,
	 expenditure_type,
         organization_id,
         amount_dr,
         amount_cr,
         currency_code,
         status,
         adjustment_flag,
         posting_date,
         posting_type_cd
       )
       VALUES
       (
         pqh_gl_interface_s.nextval,
         g_budget_version_id,
         p_budget_detail_id,
         p_period_name,
         p_project_id,
	 p_task_id,
	 p_award_id,
	 p_expenditure_type,
         p_organization_id,
         NVL(l_amount_dr,0),
         NVL(l_amount_cr,0),
         g_bgt_currency_code,
         null,
         'Y',
         null,
         p_posting_type_cd
       );
Line: 4107

     END IF; -- create i.e insert a adjustment record ONLY if l_amount_diff <> 0
Line: 4118

END update_pqh_gms_interface;
Line: 4131

  This procedure will update or insert GMS records into pqh_gl_interface if there was no error for
  the current budget detail record i.e g_detail_error = N
  if g_detail_error = Y then update the pqh_budget_details record with gl_status = ERROR

  Also it will Deduct a similar amount from Budget Commitments.
  If a Bduget Commitment for that Detail/Period is not available error is thrown and program is
  aborted
*/
--
-- local variables
--
 l_proc                           varchar2(72) := g_package||'.populate_pqh_gms_interface';
Line: 4160

 Select *
 From pqh_gl_interface
 Where budget_version_id  = p_budget_version_id
   AND budget_detail_id   = p_budget_detail_id
   AND period_name        = p_period_name
   AND posting_type_cd    = p_posting_type_cd
   AND project_id	  = p_project_id
   AND task_id		  = p_task_id
   AND award_id		  = p_award_id
   AND expenditure_type	  = p_expenditure_type
   AND organization_id	  = p_organization_id
   AND NVL(adjustment_flag,'N') = 'N'
   AND cost_allocation_keyflex_id is  null
   AND nvl(status,'X')='POST'
   AND posting_date IS NOT NULL
   AND cost_allocation_keyflex_id is null
   FOR UPDATE of amount_dr;
Line: 4180

Select
hr_general.decode_shared_type(budget_unit1_id) UOM1,
hr_general.decode_shared_type(budget_unit2_id) UOM2,
hr_general.decode_shared_type(budget_unit3_id) UOM3
From
pqh_budgets
Where budget_id=g_budget_id;
Line: 4253

       update_pqh_gms_interface
              (
               p_budget_detail_id  => p_budget_detail_id,
               p_period_name       => g_period_amt_tab(i).period_name,
               p_project_id        => g_period_amt_tab(i).project_id,
	       p_task_id	   => g_period_amt_tab(i).task_id,
	       p_award_id	   => g_period_amt_tab(i).award_id,
	       p_expenditure_type  => g_period_amt_tab(i).expenditure_type,
               p_organization_id   => g_period_amt_tab(i).organization_id,
               p_amount            => l_amount,
               p_posting_type_cd   => p_posting_type_cd
              );
Line: 4267

       insert_pqh_gms_interface
                     (
                      p_budget_detail_id  => p_budget_detail_id,
                      p_period_name       => g_period_amt_tab(i).period_name,
                      p_project_id        => g_period_amt_tab(i).project_id,
       	              p_task_id	          => g_period_amt_tab(i).task_id,
       	              p_award_id	  => g_period_amt_tab(i).award_id,
       	              p_expenditure_type  => g_period_amt_tab(i).expenditure_type,
                      p_organization_id   => g_period_amt_tab(i).organization_id,
                      p_amount            => l_amount,
                      p_posting_type_cd   => p_posting_type_cd
              );
Line: 4286

       UPDATE pqh_gl_interface
              SET amount_dr = amount_dr - l_amount
       WHERE CURRENT OF csr_pqh_gms_interface;
Line: 4297

              INSERT INTO pqh_gl_interface
              (
                gl_interface_id,
                budget_version_id,
                budget_detail_id,
                period_name,
                project_id,
       	        task_id,
       	        award_id,
       	        expenditure_type,
                organization_id,
                amount_dr,
                amount_cr,
                currency_code,
                status,
                adjustment_flag,
                posting_date,
                posting_type_cd
              )
              VALUES
              (
                pqh_gl_interface_s.nextval,
                g_budget_version_id,
                p_budget_detail_id,
                g_period_amt_tab(i).period_name,
                g_period_amt_tab(i).project_id,
       	        g_period_amt_tab(i).task_id,
       	        g_period_amt_tab(i).award_id,
       	        g_period_amt_tab(i).expenditure_type,
                g_period_amt_tab(i).organization_id,
                l_amount_dr,
                l_amount_cr,
                g_bgt_currency_code,
                null,
                'Y',
                null,
                'BUDGET'
              );
Line: 4336

     END IF; -- create i.e insert a adjustment record ONLY if l_amount_diff <> 0
Line: 4338

      END IF; -- Insert only GMS records
Line: 4342

      UPDATE pqh_budget_details
         SET commitment_gl_status  = ''
       WHERE budget_detail_id = p_budget_detail_id;
Line: 4351

      UPDATE pqh_budget_details
         SET commitment_gl_status = 'ERROR'
       WHERE budget_detail_id = p_budget_detail_id;
Line: 4388

  This procedure Inserts in gl_bc_packets , commits so that the data is available
  for the autonomous funds checker and runs funds checker returns as argument funds
  checker return code and success flag
*/
--
-- local variables
--
 l_proc                       varchar2(72) := g_package||'.ins_gl_bc_run_fund_check';
Line: 4404

   INSERT INTO  gl_bc_packets
        (packet_id,
         ledger_id,
         je_source_name,
         je_category_name,
         code_combination_id,
         actual_flag,
         period_name,
         period_year,
         period_num,
         quarter_num,
         currency_code,
         status_code,
         last_update_date,
         last_updated_by,
         entered_dr,
         entered_cr,
         accounted_dr,
         accounted_cr,
         encumbrance_type_id,
         reference1,
         reference2 )
    VALUES
      (p_packet_id,
       g_set_of_books_id,
       g_user_je_source_name,
       g_user_je_category_name,
       p_code_combination_id,
       'E',
       p_period_name,
       p_period_year,
       p_period_num,
       p_quarter_num,
       p_currency_code,
       'P',
       sysdate,
       8302,
       p_entered_dr,
       p_entered_cr,
       p_accounted_dr,
       p_accounted_cr,
       1000, -- encumbrance_type_id
       g_budget_version_id,
       p_cost_allocation_keyflex_id );
Line: 4506

 Select
  'PQH'||to_char(pqh_gms_batch_name_s.nextval) INTO p_gms_batch_name
 From  dual;
Line: 4518

  Select pa_txn_interface_s.nextval
         INTO l_txn_interface_id
  From dual;
Line: 4524

  INSERT INTO PA_TRANSACTION_INTERFACE_ALL
  (
    TXN_INTERFACE_ID
   ,TRANSACTION_SOURCE
   ,BATCH_NAME
   ,EXPENDITURE_ENDING_DATE
   ,ORGANIZATION_NAME
   ,EXPENDITURE_ITEM_DATE
   ,PROJECT_NUMBER
   ,TASK_NUMBER
   ,EXPENDITURE_TYPE
   ,QUANTITY
   ,TRANSACTION_STATUS_CODE
   ,ORIG_TRANSACTION_REFERENCE
   ,ORG_ID
   ,DENOM_CURRENCY_CODE
   ,DENOM_RAW_COST
  )
  VALUES
  (
    l_txn_interface_id
   ,g_gms_import_tab(cnt).TRANSACTION_SOURCE
   ,p_gms_batch_name
   ,g_gms_import_tab(cnt).EXPENDITURE_ENDING_DATE
   ,g_gms_import_tab(cnt).ORGANIZATION_NAME
   ,g_gms_import_tab(cnt).EXPENDITURE_ITEM_DATE
   ,g_gms_import_tab(cnt).PROJECT_NUMBER
   ,g_gms_import_tab(cnt).TASK_NUMBER
   ,g_gms_import_tab(cnt).EXPENDITURE_TYPE
   ,g_gms_import_tab(cnt).QUANTITY
   ,'P'
   ,g_gms_import_tab(cnt).ORIG_TRANSACTION_REFERENCE
   ,g_gms_import_tab(cnt).ORG_ID
   ,g_gms_import_tab(cnt).DENOM_CURRENCY_CODE
   ,g_gms_import_tab(cnt).amount
  );
Line: 4642

In case of failure the status in pqh_gl_interface is updated to error
*/
--
-- Cursor to get records rejected by import process
--
CURSOR gms_tie_back_reject_cur IS
SELECT
 nvl(transaction_rejection_code,'P') rejection_code,
 orig_transaction_reference,
 transaction_status_code
FROM   pa_transaction_interface_all
WHERE  transaction_source = 'GMSEPQHC '
  AND  batch_name = p_gms_batch_name
  AND  transaction_status_code in ('R', 'PI', 'PR', 'PO');
Line: 4672

 SELECT
  count(*)  into l_cnt
 FROM  pa_transaction_interface_all
 WHERE transaction_source = 'GMSEPQHC '
   And batch_name = p_gms_batch_name
   And transaction_status_code in ('P', 'I');
Line: 4709

   UPDATE pqh_gl_interface
     SET status='ERROR',posting_date=sysdate
   WHERE period_name      =g_gms_import_tab(l_int_id).period_name And
         project_id       =g_gms_import_tab(l_int_id).project_id And
         task_id          =g_gms_import_tab(l_int_id).task_id And
         award_id         =g_gms_import_tab(l_int_id).award_id And
         expenditure_type =g_gms_import_tab(l_int_id).expenditure_type And
         organization_id  =g_gms_import_tab(l_int_id).organization_id;
Line: 4738

 UPDATE pqh_budget_details
  SET gl_status = 'ERROR'
 Where budget_detail_id in (select budget_detail_id from pqh_gl_interface where
                            budget_version_id=g_budget_version_id
                            And cost_allocation_keyflex_id is null
                            And status='ERROR'
                           );
Line: 4783

 DELETE pa_transaction_interface_all
 WHERE  batch_name = p_gms_batch_name
    And transaction_source = 'GMSEPQHC ';
Line: 4787

 hr_utility.set_location('Deleted pa_transaction_interface_all:',20);
Line: 4789

 DELETE gms_transaction_interface_all
 WHERE  batch_name = p_gms_batch_name
    And transaction_source = 'GMSEPQHC ';
Line: 4793

 hr_utility.set_location('Deleted gms_transaction_interface_all:',30);
Line: 4839

Select business_group_id
From pqh_budgets
Where budget_id=g_budget_id;
Line: 4844

Select transaction_source
From   pa_transaction_sources
Where  transaction_source = 'GMSEPQHC ';
Line: 4849

Select period_name,project_id,award_id,task_id,
       expenditure_type,organization_id,
       currency_code,
       SUM(NVL(amount_dr,0))  amount_dr,
       SUM(NVL(amount_cr,0))  amount_cr
From   pqh_gl_interface
Where  budget_version_id        = g_budget_version_id
   AND posting_type_cd          = 'COMMITMENT'
   AND status IS NULL
   AND posting_date IS NULL
   AND cost_allocation_keyflex_id IS NULL
   group by
   period_name,project_id,award_id,task_id,
   expenditure_type,organization_id,currency_code;
Line: 4866

Select name
From   hr_organization_units
Where  organization_id   = p_organization_id
  AND  business_group_id = l_bg_id;
Line: 4872

Select segment1,org_id
From   pa_projects_all
Where  project_id = p_project_id;
Line: 4878

Select task_number
From   pa_tasks
Where  task_id = p_task_id;
Line: 4968

   select pqh_gms_orig_txn_reference_s.nextval
   into   ref_cnt
   from   dual;
Line: 5052

          pqh_process_batch_log.insert_log
            (
            p_message_type_cd    =>  'ERROR',
            p_message_text       =>  fnd_message.get
            );