DBA Data[Home] [Help]

APPS.IGC_CC_OPEN_INTERFACE_PKG SQL Statements

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

Line: 122

        SELECT igc_cc_headers_s.nextval
            INTO P_Header_Id FROM DUAL;
Line: 133

        SELECT igc_cc_acct_lines_s.nextval
            INTO P_Acct_Line_Id FROM DUAL;
Line: 144

        SELECT igc_cc_det_pf_s.nextval
            INTO P_Det_Pf_Line_Id FROM DUAL;
Line: 165

        INSERT INTO IGC_CC_INTERFACE_ERRORS
                      ( batch_id,
                        interface_header_id,
                        interface_acct_line_id,
                        interface_det_pf_line_id,
                        org_id,
                        set_of_books_id,
                        error_message )
              VALUES  ( g_batch_id,
                        P_Interface_Header_Id,
                        P_Interface_Acct_Line_Id,
                        P_Interface_Det_Pf_Line_Id,
                        P_Org_Id,
                        P_Set_of_Books_Id,
                        P_Error_Message);
Line: 186

  PROCEDURE INSERT_ORPHAN_RECORDS
      ( P_X_Error_Status IN OUT NOCOPY VARCHAR2 )
      IS
        l_interface_header_id   NUMBER;
Line: 195

            SELECT ICALI.interface_header_id,
                   ICALI.interface_acct_line_id
              FROM igc_cc_acct_lines_interface ICALI
             WHERE ICALI.batch_id = g_batch_Id
               AND NOT EXISTS (SELECT ICALI1.interface_header_id
                                 FROM igc_cc_headers_interface ICALI1
                                WHERE ICALI1.batch_id           = g_batch_id
                                  AND ICALI.interface_header_id = ICALI1.interface_header_id);
Line: 205

            SELECT ICDPI.interface_acct_line_id,
                   ICDPI.interface_det_pf_line_id
              FROM igc_cc_det_pf_interface ICDPI
             WHERE ICDPI.batch_id = g_batch_id
               AND NOT EXISTS (SELECT ICALI.interface_acct_line_id
                                 FROM igc_cc_headers_interface    ICHI,
                                      igc_cc_acct_lines_interface ICALI
                                WHERE ICHI.batch_id                = g_batch_id
                                  AND ICHI.batch_id                = ICALI.batch_id
                                  AND ICHI.interface_header_id     = ICALI.interface_header_id
                                  AND ICDPI.interface_acct_line_id = ICALI.interface_acct_line_id);
Line: 282

                SELECT cch.cc_header_id INTO P_Parent_Header_Id
                FROM igc_cc_headers cch, igc_cc_headers_interface cchi
                WHERE cchi.interface_header_id = P_Interface_Parent_Header_Id
                AND cchi.cc_num = cch.cc_num
                AND cchi.org_id = cch.org_id;
Line: 292

                SELECT cca.cc_acct_line_id INTO P_Parent_Acct_Line_Id
                FROM igc_cc_acct_lines cca, igc_cc_acct_lines_interface ccai
                WHERE ccai.interface_acct_line_id = P_Interface_Parent_AcctLine_Id
                AND cca.cc_header_id = P_Parent_Header_Id
                AND ccai.cc_acct_line_num = cca.cc_acct_line_num;
Line: 302

                SELECT ccd.cc_det_pf_line_id INTO P_Parent_Det_Pf_Id
                FROM igc_cc_det_pf ccd, igc_cc_det_pf_interface ccdi
                WHERE ccdi.interface_det_pf_line_id = P_Interface_Parent_Det_Pf_Id
                AND ccd.cc_acct_line_id = P_Parent_Acct_Line_Id
                AND ccdi.cc_det_pf_line_num = ccd.cc_det_pf_line_num;
Line: 341

            SELECT  Nvl(cc_bc_enable_flag,'N')
            INTO    p_cc_bc_enable_flag
            FROM    igc_cc_bc_enable
            WHERE   set_of_books_id = p_set_of_books_id;
Line: 353

             SELECT  NVL(enable_budgetary_control_flag,'N')
             INTO    p_sbc_enable_flag
             FROM    gl_sets_of_books
             WHERE   set_of_books_id = p_set_of_books_id;
Line: 371

		 SELECT
--		          req_encumbrance_type_id,
--                       purch_encumbrance_type_id,
--                       inv_encumbrance_type_id,
			  req_encumbrance_flag,
			  purch_encumbrance_flag
                 INTO
--		          l_ap_req_encmbrnc_type_id,
--                       l_ap_purch_encmbrnc_type_id,
--                       p_inv_encumbrance_type_id,
			  p_sb_prov_encmbrnc_flag,
			  p_sb_conf_encmbrnc_flag
                 FROM     financials_system_parameters;
Line: 420

        SELECT  count(*)
        INTO    l_COUNT
        FROM    fnd_application      app,
                gl_sets_of_books     sob,
                gl_period_statuses gl,
                igc_cc_periods       cp
        WHERE   sob.set_of_books_id        = p_set_of_books_id
        AND     gl.set_of_books_id         = sob.set_of_books_id
        AND     gl.application_id          = app.application_id
        AND     app.application_short_name = 'SQLGL'
        AND     cp.org_id                  = p_org_id
        AND     cp.period_set_name         = sob.period_set_name
        AND     cp.period_name             = gl.period_name
        AND     cp.cc_period_status        IN ('O', 'F')
        AND     gl.closing_status          IN ('O', 'F')
        AND     gl.adjustment_period_flag  = 'N'
        AND     (p_date BETWEEN gl.start_date AND gl.end_date);
Line: 543

            SELECT MIN(cc_start_date)
            INTO   l_min_rel_start_date
            FROM   igc_cc_headers_interface
            WHERE  interface_parent_header_id = p_interface_header_id;
Line: 611

            SELECT MAX(cc_end_date)
            INTO   l_max_rel_end_date
            FROM   igc_cc_headers_interface
            WHERE  interface_parent_header_id = p_interface_header_id;
Line: 997

                SELECT cc_det_pf_date
                INTO   l_cover_cc_det_pf_date
                FROM   igc_cc_det_pf_interface
                WHERE  interface_det_pf_line_id = p_interface_parent_det_pf_id;
Line: 1177

    SELECT gp.period_name,
           gp.period_num,
           gp.period_year
    FROM   gl_periods gp,
           gl_sets_of_books sob
    WHERE  gp.period_set_name       = sob.period_set_name
    AND    gp.period_type           = sob.accounted_period_type
    AND    sob.set_of_books_id     = p_sob_id
    AND    p_date BETWEEN gp.start_date AND gp.end_date
    AND    gp.adjustment_period_flag = 'N';
Line: 1250

           g_pa_fc_com_rec_tab( l_index ).last_update_date            := SYSDATE;
Line: 1251

           g_pa_fc_com_rec_tab( l_index ).last_updated_by             := FND_GLOBAL.user_id;
Line: 1254

           g_pa_fc_com_rec_tab( l_index ).last_update_login           := FND_GLOBAL.login_id;
Line: 1316

           g_pa_fc_pay_rec_tab( l_index ).last_update_date            := SYSDATE;
Line: 1317

           g_pa_fc_pay_rec_tab( l_index ).last_updated_by             := FND_GLOBAL.user_id;
Line: 1320

           g_pa_fc_pay_rec_tab( l_index ).last_update_login           := FND_GLOBAL.login_id;
Line: 1409

            SELECT * FROM igc_cc_headers_interface
            WHERE batch_id = P_Batch_Id
            ORDER BY cc_type DESC;
Line: 1418

        SELECT MIN(start_date) start_date, MAX(end_date) end_date
        FROM    GL_PERIODS GP,
                GL_SETS_OF_BOOKS GB
        WHERE
              GP.period_set_name          = GB.period_set_name       AND
              GP.period_type              = GB.accounted_period_type AND
              GB.set_of_books_id          = P_Sob_Id                 AND
              TO_CHAR(start_date, 'YYYY') = to_char(sysdate, 'YYYY') AND
              TO_CHAR(end_date, 'YYYY')   = to_char(sysdate, 'YYYY') AND
              GP.adjustment_period_flag   = 'N';
Line: 1430

        SELECT gl_bc_packets_s.nextval
        FROM dual;
Line: 1438

      SELECT meaning
      INTO l_option_name
      FROM igi_lookups
      WHERE lookup_code = 'CC'
      AND lookup_type = 'GCC_DESCRIPTION';
Line: 1469

        DELETE IGC_CC_INTERFACE_ERRORS;
Line: 1475

        g_pa_fc_com_rec_tab.DELETE;
Line: 1476

        g_pa_fc_pay_rec_tab.DELETE;
Line: 1502

        SELECT NVL(cc_bc_enable_flag,'N') INTO l_cbc_enable_flag
        FROM igc_cc_bc_enable
        WHERE set_of_books_id = l_current_set_of_books_id;
Line: 1510

        SELECT currency_code INTO l_func_currency_code
        FROM gl_sets_of_books
        WHERE set_of_books_id = l_current_set_of_books_id;
Line: 1615

            IGC_CC_HEADERS_PKG.Insert_Row(
                       1.0,
                       FND_API.G_TRUE,
                       FND_API.G_FALSE,
                       FND_API.G_VALID_LEVEL_FULL,
                       l_return_status,
                       l_msg_count,
                       l_msg_data,
                       l_row_id,
                       l_header_id,
                       l_interface_header_record.Org_Id,
                       l_interface_header_record.CC_Type,
                       l_interface_header_record.CC_Num,
                       NVL(l_interface_header_record.CC_Version_num, 0) + 1,
                       l_parent_header_id,
                       l_interface_header_record.CC_State,
                       l_interface_header_record.CC_Ctrl_status,
                       l_interface_header_record.CC_Encmbrnc_Status,
                       l_interface_header_record.CC_Apprvl_Status,
                       l_interface_header_record.Vendor_Id,
                       l_interface_header_record.Vendor_Site_Id,
                       l_interface_header_record.Vendor_Contact_Id,
                       l_interface_header_record.Term_Id,
                       l_interface_header_record.Location_Id,
                       l_interface_header_record.Set_Of_Books_Id,
                       l_interface_header_record.CC_Acct_Date,
                       l_interface_header_record.CC_Desc,
                       l_interface_header_record.CC_Start_Date,
                       l_interface_header_record.CC_End_Date,
                       l_interface_header_record.CC_Owner_User_Id,
                       l_interface_header_record.CC_Preparer_User_Id,
                       l_interface_header_record.Currency_Code,
                       l_interface_header_record.Conversion_Type,
                       l_interface_header_record.Conversion_Date,
                       l_interface_header_record.Conversion_Rate,
                       sysdate,
                       l_current_user_id,
                       l_current_login_id,
                       NVL(l_interface_header_record.Created_By, l_current_user_id),
                       NVL(l_interface_header_record.Creation_Date, sysdate),
                       l_interface_header_record.CC_Current_User_Id,
                       l_interface_header_record.Wf_Item_Type,
                       l_interface_header_record.Wf_Item_Key,
                       l_interface_header_record.Attribute1,
                       l_interface_header_record.Attribute2,
                       l_interface_header_record.Attribute3,
                       l_interface_header_record.Attribute4,
                       l_interface_header_record.Attribute5,
                       l_interface_header_record.Attribute6,
                       l_interface_header_record.Attribute7,
                       l_interface_header_record.Attribute8,
                       l_interface_header_record.Attribute9,
                       l_interface_header_record.Attribute10,
                       l_interface_header_record.Attribute11,
                       l_interface_header_record.Attribute12,
                       l_interface_header_record.Attribute13,
                       l_interface_header_record.Attribute14,
                       l_interface_header_record.Attribute15,
                       l_interface_header_record.Context,
                       Nvl(l_interface_header_record.CC_Guarantee_Flag,'N'),
                       l_flag);
Line: 1734

                        SELECT count(interface_det_pf_line_id)
                        INTO   l_curr_year_pf_lines
                        FROM   igc_cc_det_pf_interface b
                        WHERE b.cc_det_pf_date <= l_end_date
			AND b.interface_acct_line_id IN (SELECT interface_acct_line_id
                                                  FROM igc_cc_acct_lines_interface a
                                                  WHERE a.interface_header_id = l_interface_header_record.Interface_Header_Id);
Line: 1777

                IGC_CC_PO_INTERFACE_PKG.UPDATE_PO_APPROVED_FLAG
                    ( 1.0,
                       FND_API.G_TRUE,
                       FND_API.G_FALSE,
                       FND_API.G_VALID_LEVEL_FULL,
                       l_return_status,
                       l_msg_count,
                       l_msg_data,
                       l_header_id);
Line: 1812

		IGC_CC_ACTIONS_PKG.Insert_Row(
                        1.0,
                        FND_API.G_TRUE,
                        FND_API.G_FALSE,
                        FND_API.G_VALID_LEVEL_FULL,
                        l_return_status,
                        l_msg_count,
                        l_msg_data,
                        l_row_id,
              	        l_header_id,
	                NVL(l_interface_header_record.CC_Version_num, 0) + 1,
	                'EN',
	                l_interface_header_record.CC_State,
	                l_interface_header_record.CC_ctrl_status,
	                l_interface_header_record.CC_Apprvl_Status,
			l_history_message,
	                sysdate,
	                l_current_user_id,
	                l_current_login_id,
	                sysdate,
	                l_current_user_id );
Line: 1855

		IGC_CC_ACTIONS_PKG.Insert_Row(
                        1.0,
                        FND_API.G_TRUE,
                        FND_API.G_FALSE,
                        FND_API.G_VALID_LEVEL_FULL,
                        l_return_status,
                        l_msg_count,
                        l_msg_data,
                        l_row_id,
              	        l_header_id,
	                NVL(l_interface_header_record.CC_Version_num, 0) + 1,
	                'EC',
	                l_interface_header_record.CC_State,
	                l_interface_header_record.CC_ctrl_status,
	                l_interface_header_record.CC_Apprvl_Status,
			l_history_message,
	                sysdate,
	                l_current_user_id,
	                l_current_login_id,
	                sysdate,
	                l_current_user_id );
Line: 1902

        INSERT_ORPHAN_RECORDS
                ( l_error_status );
Line: 2007

                 ELSE -- insert into pa_bc_packet unsuccessfull.
                     l_pa_cb_funds_check_pass := FALSE;
Line: 2144

                 ELSE -- insert into pa_bc_packet unsuccessfull.
                     -- Log Interface error;
Line: 2418

          DELETE IGC.igc_cc_headers_interface
                WHERE batch_id = P_Batch_Id;
Line: 2420

          DELETE IGC.igc_cc_acct_lines_interface
                WHERE batch_id = P_Batch_Id;
Line: 2422

          DELETE IGC.igc_cc_det_pf_interface
                WHERE batch_id = P_Batch_Id;
Line: 2685

         SELECT COUNT(*) INTO l_count
         FROM igc_cc_headers
         WHERE org_id = P_Org_Id
         AND cc_num = P_Cc_Num;
Line: 2760

                SELECT interface_header_id, cc_start_date, cc_end_date, currency_code, conversion_type, conversion_rate, conversion_date
                INTO l_interface_parent_header_id, l_start_date, l_end_date, l_curr_code, l_conversion_type, l_conversion_rate, l_conversion_date
                FROM igc_cc_headers_interface
                WHERE interface_header_id = P_Interface_Parent_Header_Id
		AND cc_type = 'C';
Line: 2908

                SELECT vendor_id INTO l_vendor_id
                FROM po_vendors
                WHERE vendor_id = P_Vendor_Id
                AND enabled_flag = 'Y'
                AND sysdate BETWEEN NVL(start_date_active, sysdate-1)
                                AND NVL(end_date_active, sysdate+1);
Line: 2948

                SELECT vendor_site_id INTO l_vendor_site_id
                FROM po_vendor_sites_all
                WHERE vendor_site_id = P_Vendor_Site_Id
                AND vendor_id = P_Vendor_Id
                AND purchasing_site_flag = 'Y'
                AND NVL(inactive_date, sysdate+1) > sysdate;
Line: 2986

                SELECT vendor_contact_id INTO l_vendor_contact_id
                FROM po_vendor_contacts
                WHERE vendor_site_id = P_Vendor_Site_Id
                AND vendor_contact_id = P_Vendor_Contact_Id
                AND NVL(inactive_date, sysdate+1) > sysdate;
Line: 3011

                SELECT term_id INTO l_term_id
                FROM ap_terms_val_v
                WHERE term_id = P_Term_Id;
Line: 3046

                SELECT location_id INTO l_location_id
                FROM hr_locations
                WHERE location_id = P_location_Id
                AND bill_to_site_flag = 'Y'
                AND NVL(inactive_date, sysdate+1) > sysdate;
Line: 3104

                    SELECT 1 INTO l_count
                    FROM igc_cc_periods ccp, gl_sets_of_books sob, gl_periods glp
                    WHERE sob.set_of_books_id = P_Set_of_Books_Id
                    AND sob.period_set_name = glp.period_set_name
                    AND sob.accounted_period_type = glp.period_type
                    AND glp.adjustment_period_flag = 'N'
                    AND ccp.period_set_name = glp.period_set_name
                    AND ccp.period_name = glp.period_name
                    AND ccp.org_id = P_Org_Id
                    AND P_Cc_Acct_Date BETWEEN glp.start_date AND glp.end_date
                    AND ccp.cc_period_status IN ('O','F');
Line: 3145

                SELECT fu.user_id
                INTO l_user_id
                FROM   fnd_user fu,
                       per_all_people_f p,
                       per_all_assignments_f a,
                       per_assignment_status_types past
                WHERE fu.user_id =  P_Cc_Owner_User_Id
                AND   sysdate BETWEEN NVL(fu.start_date, sysdate)
                AND   NVL(fu.end_date, sysdate)
                AND   fu.employee_id IS NOT NULL
                AND   fu.employee_id = p.person_id
/*                AND   p.business_group_id = (select nvl(max(fsp.business_group_id),0) from financials_system_parameters fsp) */
		AND   p.business_group_id = (Decode (FND_PROFILE.VALUE('HR_CROSS_BUSINESS_GROUP') , 'Y' , p.business_group_id , (select nvl(max(fsp.business_group_id),0) from financials_system_parameters fsp)))
                AND   p.employee_number is not null
                AND   trunc(sysdate) between p.effective_start_date and p.effective_end_date
                AND   a.person_id = p.person_id
                AND   a.primary_flag = 'Y'
                AND   trunc(sysdate) between a.effective_start_date
                AND   a.effective_end_date
                AND   a.assignment_status_type_id = past.assignment_status_type_id
                AND   past.per_system_status in ('ACTIVE_ASSIGN','SUSP_ASSIGN')
                AND   a.assignment_type = 'E';
Line: 3195

                SELECT fu.user_id
                INTO l_user_id
                FROM   fnd_user fu,
                       per_all_people_f p,
                       per_all_assignments_f a,
                       per_assignment_status_types past
                WHERE fu.user_id =  P_Cc_Preparer_User_Id
                AND   sysdate BETWEEN NVL(fu.start_date, sysdate)
                AND   NVL(fu.end_date, sysdate)
                AND   fu.employee_id IS NOT NULL
                AND   fu.employee_id = p.person_id
/*                AND   p.business_group_id = (select nvl(max(fsp.business_group_id),0) from financials_system_parameters fsp) */
		AND   p.business_group_id = (Decode (FND_PROFILE.VALUE('HR_CROSS_BUSINESS_GROUP') , 'Y' , p.business_group_id , (select nvl(max(fsp.business_group_id),0) from financials_system_parameters fsp)))
                AND   p.employee_number is not null
                AND   trunc(sysdate) between p.effective_start_date and p.effective_end_date
                AND   a.person_id = p.person_id
                AND   a.primary_flag = 'Y'
                AND   trunc(sysdate) between a.effective_start_date
                AND   a.effective_end_date
                AND   a.assignment_status_type_id = past.assignment_status_type_id
                AND   past.per_system_status in ('ACTIVE_ASSIGN','SUSP_ASSIGN')
                AND   a.assignment_type = 'E';
Line: 3249

		SELECT currency_code INTO l_currency_code
		FROM fnd_currencies_vl
		WHERE enabled_flag = 'Y'
		AND currency_flag = 'Y'
		AND currency_code = P_Currency_Code;
Line: 3304

                SELECT user_id INTO l_user_id
                FROM fnd_user
                WHERE user_id = P_Created_By;
Line: 3335

                SELECT fu.user_id
                INTO l_user_id
                FROM   fnd_user fu,
                       per_all_people_f p,
                       per_all_assignments_f a,
                       per_assignment_status_types past
                WHERE fu.user_id =  P_Cc_Current_User_Id
                AND   sysdate BETWEEN NVL(fu.start_date, sysdate)
                AND   NVL(fu.end_date, sysdate)
                AND   fu.employee_id IS NOT NULL
                AND   fu.employee_id = p.person_id
/*                AND   p.business_group_id = (select nvl(max(fsp.business_group_id),0) from financials_system_parameters fsp) */
		AND   p.business_group_id = (Decode (FND_PROFILE.VALUE('HR_CROSS_BUSINESS_GROUP') , 'Y' , p.business_group_id , (select nvl(max(fsp.business_group_id),0) from financials_system_parameters fsp)))
                AND   p.employee_number is not null
                AND   trunc(sysdate) between p.effective_start_date and p.effective_end_date
                AND   a.person_id = p.person_id
                AND   a.primary_flag = 'Y'
                AND   trunc(sysdate) between a.effective_start_date
                AND   a.effective_end_date
                AND   a.assignment_status_type_id = past.assignment_status_type_id
                AND   past.per_system_status in ('ACTIVE_ASSIGN','SUSP_ASSIGN')
                AND   a.assignment_type = 'E';
Line: 3414

            SELECT * FROM igc_cc_acct_lines_interface
            WHERE batch_id = g_batch_id
            AND interface_header_id = P_Interface_Header_Id;
Line: 3476

            IGC_CC_ACCT_LINES_PKG.Insert_Row(
                1.0,
                FND_API.G_TRUE,
                FND_API.G_FALSE,
                FND_API.G_VALID_LEVEL_FULL,
                l_return_status,
                l_msg_count,
                l_msg_data,
                l_row_id,
                l_acct_line_id,
                P_Header_Id,
                P_Parent_Header_Id,
                l_parent_acct_line_id,
                l_interface_acct_line_record.CC_Charge_Code_Combination_Id,
                l_interface_acct_line_record.CC_Acct_Line_Num,
                l_interface_acct_line_record.CC_Budget_Code_Combination_Id,
                l_interface_acct_line_record.CC_Acct_Entered_Amt,
                l_interface_acct_line_record.CC_Acct_Func_Amt,
                l_interface_acct_line_record.CC_Acct_Desc,
	        l_interface_acct_line_record.CC_Acct_Billed_Amt,
	        l_interface_acct_line_record.CC_Acct_Unbilled_Amt,
	        l_interface_acct_line_record.CC_Acct_Taxable_Flag,
		NULL,-- modified for Ebtax uptake for CC (Bug No-6472296)   l_interface_acct_line_record.Tax_Id
	        l_interface_acct_line_record.CC_Acct_Encmbrnc_Amt,
                l_interface_acct_line_record.CC_Acct_Encmbrnc_Date,
                l_interface_acct_line_record.CC_Acct_Encmbrnc_Status,
                l_interface_acct_line_record.Project_Id,
                l_interface_acct_line_record.Task_Id,
                l_interface_acct_line_record.Expenditure_Type,
                l_interface_acct_line_record.Expenditure_Org_Id,
                l_interface_acct_line_record.Expenditure_Item_Date,
	        sysdate,
                P_User_Id,
                P_Login_Id,
	        NVL(l_interface_acct_line_record.Creation_Date, sysdate),
                NVL(l_interface_acct_line_record.Created_By, P_User_Id),
                l_interface_acct_line_record.Attribute1,
                l_interface_acct_line_record.Attribute2,
                l_interface_acct_line_record.Attribute3,
                l_interface_acct_line_record.Attribute4,
                l_interface_acct_line_record.Attribute5,
                l_interface_acct_line_record.Attribute6,
                l_interface_acct_line_record.Attribute7,
                l_interface_acct_line_record.Attribute8,
                l_interface_acct_line_record.Attribute9,
                l_interface_acct_line_record.Attribute10,
                l_interface_acct_line_record.Attribute11,
                l_interface_acct_line_record.Attribute12,
                l_interface_acct_line_record.Attribute13,
                l_interface_acct_line_record.Attribute14,
                l_interface_acct_line_record.Attribute15,
                l_interface_acct_line_record.Context,
                Nvl(l_interface_acct_line_record.CC_Func_Withheld_Amt,0),
                Nvl(l_interface_acct_line_record.CC_Ent_Withheld_Amt,0),
                l_flag,
		l_interface_acct_line_record.tax_classif_code); -- modified for Ebtax uptake (Bug No-6472296)
Line: 3550

            ELSE -- Insert was successfull.
                -- The insert into igc_cc_acct_lines has been sucessfull
                -- Call procedure to populate PLSQL table for PA
                -- The call should be made -
                -- If budgetary control is enabled in the commitment budget
                -- And ((CC is provisIonal,
                --       CC is already encumbered,
                --       Provisional CCs are being encumbered)
                -- Or  (CC is confirmed,
                --      CC is already encumbered,
                --      Confirmed CCs are being encumbered))
                -- And (CC acct line is attached to a project
                -- And project is budgetary controlled)
                -- And cc is of type Cover or Standard
                -- Bug 2871052
                IF g_cc_bc_enable_flag = 'Y'
                AND ((g_cc_state = 'PR'
                    AND l_interface_acct_line_record.CC_Acct_Encmbrnc_Status = 'P'
                     /* Bug No : 6341012. SLA uptake. cc_flags no more exists  AND g_cc_prov_encmbrnc_flag = 'Y' */    )
                OR  (g_cc_state = 'CM'
                    AND l_interface_acct_line_record.CC_Acct_Encmbrnc_Status = 'C'
                     /* Bug No : 6341012. SLA uptake. cc_flags no more exists  AND g_cc_conf_encmbrnc_flag = 'Y' */
		     ))
                AND p_cc_type IN ('C', 'S')
                AND (l_interface_acct_line_record.project_id IS NOT NULL
                    AND PA_BUDGET_FUND_PKG.Is_bdgt_intg_enabled
                           (p_project_id =>  l_interface_acct_line_record.project_id,
                            p_mode       => 'C' ))
                THEN
                    g_pa_cb_funds_check_required := TRUE;
Line: 3601

            END IF; -- insert into igc_cc_acct_line successfull
Line: 3765

                SELECT interface_acct_line_id
                INTO l_interface_parent_acctline_id
                FROM igc_cc_acct_lines_interface
                WHERE interface_acct_line_id = P_Interface_Parent_AcctLine_Id
		AND interface_header_id = P_Interface_Parent_Header_Id;
Line: 3846

        SELECT code_combination_id INTO l_code_combination_id
        FROM gl_code_combinations
        WHERE code_combination_id = P_Charge_Code_Combination_Id
        AND enabled_flag = 'Y'
        AND P_Cc_Acct_Date BETWEEN NVL(start_date_active, P_Cc_Acct_Date)
                               AND NVL(end_date_active, P_Cc_Acct_Date);
Line: 3853

        SELECT code_combination_id INTO l_code_combination_id
        FROM gl_code_combinations
        WHERE code_combination_id = P_Charge_Code_Combination_Id
        AND enabled_flag = 'Y';
Line: 3877

        SELECT code_combination_id INTO l_code_combination_id
        FROM gl_code_combinations
        WHERE code_combination_id = P_Budget_Code_Combination_Id
        AND enabled_flag = 'Y'
        AND P_Cc_Acct_Date BETWEEN NVL(start_date_active, P_Cc_Acct_Date)
                               AND NVL(end_date_active, P_Cc_Acct_Date);
Line: 3884

        SELECT code_combination_id INTO l_code_combination_id
        FROM gl_code_combinations
        WHERE code_combination_id = P_Budget_Code_Combination_Id
        AND enabled_flag = 'Y';
Line: 3963

        SELECT NVL(SUM(cc_det_pf_entered_amt), 0) INTO l_entered_amt
        FROM igc_cc_det_pf_interface
        WHERE interface_acct_line_id = P_Interface_Acct_Line_Id;
Line: 3993

        SELECT NVL(SUM(cc_acct_func_amt), 0) INTO l_func_amt
        FROM igc_cc_acct_lines_interface
        WHERE interface_parent_acct_line_id = P_Interface_Acct_Line_Id;
Line: 4081

            SELECT project_id INTO l_project_id
            FROM pa_projects
            WHERE project_id = P_Project_Id;
Line: 4130

            SELECT task_id INTO l_task_id
            FROM pa_tasks
            WHERE task_id = P_Task_Id
            AND project_id = P_Project_Id;
Line: 4179

				--	select expenditure_type from pa_expenditure_types_expend_v et
				--	where system_linkage_function = 'VI'
				--	and et.project_id is null
				--	and et.expenditure_type = P_Expenditure_Type
				--	and (sysdate between expnd_typ_start_date_active and
				--			nvl(expnd_typ_end_date_active, sysdate))
				--	and (sysdate between sys_link_start_date_active and
				--			nvl(sys_link_end_date_active,sysdate))
				 --    );
Line: 4190

               SELECT expenditure_type
               INTO   l_expenditure_type
               FROM   pa_expenditure_types_expend_v et
               WHERE  system_linkage_function = 'VI'
               AND    (sysdate between expnd_typ_start_date_active
                      AND nvl(expnd_typ_end_date_active, sysdate))
               AND    (sysdate between sys_link_start_date_active
                      AND nvl(sys_link_end_date_active,sysdate))
               AND    expenditure_type = p_expenditure_type;
Line: 4233

	    -- SELECT organization_id INTO l_expenditure_org_id
	    -- FROM pa_organizations_expend_v
	    -- WHERE active_flag = 'Y'
	    -- AND organization_id = P_Expenditure_Org_Id
	    -- AND sysdate between date_from and nvl(date_to, sysdate);
Line: 4239

	    SELECT a.organization_id INTO l_expenditure_org_id
            FROM   hr_all_organization_units a,
                   pa_all_organizations b
            WHERE  a.organization_id = b.organization_id
	    AND    sysdate between a.date_from and nvl(a.date_to, sysdate)
            AND    b.pa_org_use_type = 'EXPENDITURES'
            AND    b.inactive_date IS NULL
            AND    b.organization_id = P_Expenditure_Org_Id;
Line: 4304

        SELECT cc_charge_code_combination_id, cc_budget_code_combination_id,
	       project_id, task_id, expenditure_type,
	       expenditure_org_id, expenditure_item_date
 	INTO l_charge_ccid, l_budget_ccid, l_cov_project_id, l_cov_task_id,
	     l_cov_expenditure_type, l_cov_expenditure_org_id, l_cov_expenditure_item_date
        FROM igc_cc_acct_lines_interface
        WHERE interface_acct_line_id = P_Interface_Parent_AcctLine_Id;
Line: 4437

                SELECT user_id INTO l_user_id
                FROM fnd_user
                WHERE user_id = P_Created_By;
Line: 4498

            SELECT * FROM igc_cc_det_pf_interface
            WHERE batch_id = g_batch_id
            AND interface_acct_line_id = P_Interface_Acct_Line_Id;
Line: 4546

            IGC_CC_DET_PF_PKG.Insert_Row(
                1.0,
                FND_API.G_TRUE,
                FND_API.G_FALSE,
                FND_API.G_VALID_LEVEL_FULL,
                l_return_status,
                l_msg_count,
                l_msg_data,
                l_row_id,
                l_det_pf_id,
                l_interface_det_pf_record.CC_Det_PF_Line_Num,
                P_Acct_Line_Id,
                l_parent_acct_line_id,
                l_parent_det_pf_id ,
                l_interface_det_pf_record.CC_Det_PF_Entered_Amt,
                l_interface_det_pf_record.CC_Det_PF_Func_Amt,
                l_interface_det_pf_record.CC_Det_PF_Date,
                l_interface_det_pf_record.CC_Det_PF_Billed_Amt,
                l_interface_det_pf_record.CC_Det_PF_Unbilled_Amt,
                l_interface_det_pf_record.CC_Det_PF_Encmbrnc_Amt,
                l_interface_det_pf_record.CC_Det_PF_Encmbrnc_Date,
                l_interface_det_pf_record.CC_Det_PF_Encmbrnc_Status,
	        sysdate,
                P_User_Id,
                P_Login_Id,
	        NVL(l_interface_det_pf_record.Creation_Date, sysdate),
                NVL(l_interface_det_pf_record.Created_By, P_User_Id),
                l_interface_det_pf_record.Attribute1,
                l_interface_det_pf_record.Attribute2,
                l_interface_det_pf_record.Attribute3,
                l_interface_det_pf_record.Attribute4,
                l_interface_det_pf_record.Attribute5,
                l_interface_det_pf_record.Attribute6,
                l_interface_det_pf_record.Attribute7,
                l_interface_det_pf_record.Attribute8,
                l_interface_det_pf_record.Attribute9,
                l_interface_det_pf_record.Attribute10,
                l_interface_det_pf_record.Attribute11,
                l_interface_det_pf_record.Attribute12,
                l_interface_det_pf_record.Attribute13,
                l_interface_det_pf_record.Attribute14,
                l_interface_det_pf_record.Attribute15,
                l_interface_det_pf_record.Context,
                l_flag);
Line: 4607

            ELSE -- Insert was successfull.
                -- The insert into igc_cc_acct_lines has been sucessfull
                -- Call procedure to populate PLSQL table for PA
                -- The call should be made -
                -- If budgetary control is enabled in the standard budget
                -- And ((CC is provisIonal,
                --       CC is already encumbered,
                --       Provisional CCs are being encumbered)
                -- Or  (CC is confirmed,
                --      CC is already encumbered,
                --      Confirmed CCs are being encumbered))
                -- And (CC acct line is attached to a project
                -- And project is budgetary controlled)
                -- And cc is of type Cover or Standard
                -- Bug 2871052
                IF g_sbc_enable_flag = 'Y'
                AND ((g_cc_state = 'PR' AND l_interface_det_pf_record.CC_Det_PF_Encmbrnc_Status = 'P')
                     /* Bug No : 6341012. SLA uptake. cc_flags no more exists  AND g_cc_prov_encmbrnc_flag = 'Y' */
                      OR  (g_cc_state = 'CM'  AND l_interface_det_pf_record.CC_Det_PF_Encmbrnc_Status = 'C'))
                     /* Bug No : 6341012. SLA uptake. cc_flags no more exists  AND g_cc_conf_encmbrnc_flag = 'Y' */
                AND p_cc_type IN ('C', 'S')
                AND (p_project_id IS NOT NULL
                    AND PA_BUDGET_FUND_PKG.Is_bdgt_intg_enabled
                           (p_project_id =>  p_project_id,
                            p_mode       => 'S' ))
                THEN
                    g_pa_sb_funds_check_required := TRUE;
Line: 4655

              END IF; -- Insert into igc_cc_det_pf was sucessfull.
Line: 4713

   SELECT application_id
     INTO l_gl_application_id
     FROM fnd_application
    WHERE application_short_name = 'SQLGL';
Line: 4783

                SELECT interface_det_pf_line_id
                INTO l_interface_parent_det_pf_id
                FROM igc_cc_det_pf_interface
                WHERE interface_det_pf_line_id = P_Interface_Parent_Det_Pf_Id;
Line: 4867

        SELECT NVL(SUM(cc_det_pf_func_amt), 0) INTO l_func_amt
        FROM igc_cc_det_pf_interface
        WHERE interface_par_det_pf_line_id = P_Interface_Det_Pf_Id;
Line: 4955

           SELECT 1 INTO l_count
           FROM igc_cc_periods ccp, gl_sets_of_books sob, gl_period_statuses glp
           WHERE sob.set_of_books_id = P_Set_of_Books_Id
           AND sob.set_of_books_id = glp.set_of_books_id
           AND sob.accounted_period_type = glp.period_type
           AND sob.period_set_name = ccp.period_set_name
           AND glp.adjustment_period_flag = 'N'
           AND glp.application_id = l_gl_application_id
           AND ccp.period_name = glp.period_name
           AND ccp.org_id = P_Org_Id
           AND P_Cc_Det_Pf_Encmbrnc_Date BETWEEN glp.start_date AND glp.end_date
           AND ccp.cc_period_status IN ('O','F')
           AND glp.closing_status IN ('O','F');
Line: 4987

                SELECT cc_det_pf_encmbrnc_date INTO l_det_pf_date
                FROM igc_cc_det_pf_interface
                WHERE interface_det_pf_line_id = P_Interface_Parent_Det_Pf_Id;
Line: 5031

                SELECT user_id INTO l_user_id
                FROM fnd_user
                WHERE user_id = P_Created_By;