DBA Data[Home] [Help]

APPS.PA_OTC_API SQL Statements

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

Line: 32

    G_Trx_Inserted_Tab     Pa_Otc_Api.Trx_Inserted_Table;
Line: 36

    G_Trx_Direct_Upd_Tab   Pa_Otc_Api.Trx_Inserted_Table;
Line: 131

    G_Last_Update_Date_Tbl		Pa_Txn_Interface_Items_Pkg.Last_Update_Date_Typ;
Line: 132

    G_Last_Updated_By_Tbl		Pa_Txn_Interface_Items_Pkg.Last_Updated_By_Typ;
Line: 184

    G_Delete_op                       Varchar2(10)    :='N';
Line: 185

    G_Delete_Change                   Varchar2(10)    :='N';
Line: 380

     l_Insert_Rec_Flag      Boolean := False;
Line: 382

     l_Direct_Update_Flag   Boolean := True; /* changed for bug 13831042 */
Line: 394

     L_MAX_RECS_FOR_BULKINSERT          Number := 1000;
Line: 407

		    Select
			    h.Vendor_Id
		    Into
			    X_Vendor_Id
		    from
			    PO_Headers_All h,
		     	PO_Lines_All l
		    where
			    l.po_line_Id = P_Po_Line_Id
		    and	l.po_header_id = h.po_header_Id;
Line: 450

	    G_Stage := 'Call BulkInsertReset() procedure for reset.';
Line: 455

        Pa_Otc_Api.BulkInsertReset(P_Command => 'RESET');
Line: 463

        G_EndDateBatchName_Table.Delete;
Line: 476

     G_Trx_Inserted_Tab.Delete;
Line: 477

     G_Trx_Direct_Upd_Tab.Delete;
Line: 575

		               Hxc_User_Type_Definition_Grp.T_Detail_Bld_Blks(i).Deleted = 'Y' Then

			             G_Stage := 'Item Changed: N, Deleted: Y.';
Line: 582

			             -- Even though the building block was deleted prior to being imported into projects
                         -- appearantly attribution data is created and sent via the Generic retrieval process
                         -- via the Generic retrieval process.  Need to sequence thru to position
                         -- the global index variable for the next bb to process.
                         -- Since it was deleted means it does not need to be imported into projects.
			             -- There is also no need to look at the old pl/sql tables records.

			            G_Stage := 'Call Populate Project Record new 1 for positioning purposes only.';
Line: 604

			            l_insert_rec_flag := FALSE;
Line: 607

		                  Hxc_User_Type_Definition_Grp.T_Detail_Bld_Blks(i).Deleted = 'N' Then

			             -- If this is the condition then there is only new data to process via PopulateProjRec() procedure
			             -- and there is no need to look at the old data via the same procedure.

			             G_Stage := 'Item Changed: N, Deleted: N.';
Line: 645

				              l_insert_rec_flag := FALSE;
Line: 668

	                                -- Insert a new record.  There should be no records in either
	                        	    -- pl/sql tables t_old_detail_bld_blks or t_old_detail_attributes
	                        	    -- for this building block id.
	                        	    --

	                        	    l_insert_rec_flag := TRUE;
Line: 693

					                l_insert_rec_flag := FALSE;
Line: 701

                          Hxc_User_Type_Definition_Grp.T_Detail_Bld_Blks(i).Deleted = 'N' Then

			             G_Stage := 'Item Changed: Y, Deleted: N.';
Line: 750

					               l_insert_rec_Flag := FALSE;
Line: 795

						                l_insert_rec_Flag := FALSE;
Line: 800

			 			                -- insert record into pa_transaction_interface or update tables
			        		            -- pa_expenditure_comments and/or pa_expenditure_items_all.
						                G_Stage := 'Call Determine Direct Update 3.';
Line: 808

						                Pa_Otc_Api.DetermineDirectUpdate(
					      		             P_New_Timecard_Rec   => l_New_Timecard_Rec,
					      		             P_Old_Timecard_Rec   => l_Old_Timecard_Rec,
					      		             P_Direct_Update_Flag => l_direct_update_flag,
					      		             P_Comment_or_Dff     => l_Comment_or_Dff);
Line: 814

						                If l_direct_update_flag Then

							                 l_insert_rec_flag := FALSE;
Line: 818

                                             G_Stage := 'Direct Update of the exp item in projects.  '  ||
                                                        'Need to update (C)omment, (D)ff, (B)oth: ' || l_Comment_or_Dff;
Line: 823

							                 G_Stage := 'Direct Update get trx ref. by calling GetOrigTrxRef '||
								                        'to use to update the expenditure item.';
Line: 837

							                      G_Stage := 'Update hxc exception pl/sql tables 1.';
Line: 849

							                 G_Stage := 'Call Update Changed Original Txn 3.';
Line: 855

							                 Pa_Otc_Api.UpdateChangedOrigTxn(
				        			              P_Old_Orig_Txn_Ref => l_old_orig_trx_ref,
               							          P_New_Orig_Txn_Ref => l_new_orig_trx_ref,
               							          P_Comment_or_Dff   => l_comment_or_dff,
               							          P_Timecard_Rec     => l_new_timecard_rec,
               							          P_User_Id          => P_User_Id);
Line: 863

                                                        'in tieback process 3a for directly updated ei.';
Line: 873

							                 l_insert_rec_flag := TRUE;
Line: 910

							                      G_Stage := 'Update hxc exception pl/sql tables 2.';
Line: 948

							                 G_Trx_Inserted_Tab(Hxc_User_Type_Definition_Grp.T_Detail_Bld_Blks(i).BB_Id).BB_Index := i;
Line: 950

						                End If; -- l_direct_update_flag
Line: 1001

				              l_insert_rec_Flag := FALSE;
Line: 1006

		                  Hxc_User_Type_Definition_Grp.T_Detail_Bld_Blks(i).Deleted = 'Y' Then

			             -- The item was deleted in OTL after it was imported into Projects.
                         -- Need to Reverse out the original transaction.

			             G_Stage := 'Item Changed: Y, Deleted: Y.';
Line: 1015

			             l_insert_rec_flag := FALSE;
Line: 1165

				              G_Trx_Inserted_Tab(Hxc_User_Type_Definition_Grp.T_Detail_Bld_Blks(i).BB_Id).BB_Index := i;
Line: 1169

		            End If; -- Change/Delete flags
Line: 1171

		            If l_insert_rec_flag Then

			             G_Stage := 'Get the next available Transaction Interface Id from sequence.';
Line: 1179

			             select pa_txn_interface_s.nextval
			             into l_txn_xface_id
			             from dual;
Line: 1188

			             G_Stage := 'Store Trx Import record in pl/sql arrays for bulk insert.';
Line: 1292

                         G_Last_Update_Date_Tbl(G_Trx_Import_Index) := sysdate;
Line: 1293

                         G_Last_Updated_By_Tbl(G_Trx_Import_Index) := P_User_Id;
Line: 1333

			             G_Trx_Inserted_Tab(Hxc_User_Type_Definition_Grp.T_Detail_Bld_Blks(i).BB_Id).BB_Index := i;
Line: 1337

		            G_Stage := 'Check if need to call bulk insert.';
Line: 1342

                    If G_Txn_Rec_Count >= L_MAX_RECS_FOR_BULKINSERT Then

			             G_Stage := 'Call BulkInsertReset() procedure for insert.';
Line: 1349

                         Pa_Otc_Api.BulkInsertReset(P_Command => 'INSERT');
Line: 1351

			             G_Stage := 'Store total records inserted. Reset counter to 0.';
Line: 1403

	      G_Stage := 'Exited the loop.  Check if need to call bulk insert for any remaining pl/sql records.';
Line: 1411

		       G_Stage := 'Call bulk insert for the remaining pl/sql records.';
Line: 1416

		       Pa_Otc_Api.BulkInsertReset(P_Command => 'INSERT');
Line: 1448

	      G_Stage := 'Call Hxc_Generic_Retrieval_Pkg.Update_Transaction_Status() one last time.';
Line: 1454

          Hxc_Integration_Layer_V1_Grp.Update_Transaction_Status
               (P_Process               => 'Projects Retrieval Process',
                P_Status                => 'SUCCESS',
                P_Exception_Description => NULL);
Line: 1476

          Hxc_Integration_Layer_V1_Grp.Update_Transaction_Status
               (P_Process               => 'Projects Retrieval Process',
                P_Status                => 'ERRORS',
                P_Exception_Description => l_Error_Text);
Line: 1528

         	   Hxc_Integration_Layer_V1_Grp.Update_Transaction_Status
             			(P_Process               => 'Projects Retrieval Process',
             			 P_Status                => 'ERRORS',
             			 P_Exception_Description =>
				          substr('Pa_Otc_Api ::: ' || G_Path || ' :: ' || G_Stage || ' : ' || SQLERRM, 1, 2000));
Line: 1571

	    P_User_Id                 IN Pa_Expenditure_Items_All.Last_Updated_By%TYPE,
	    P_Orig_Exp_Txn_Reference1 IN Pa_Expenditures_All.Orig_Exp_Txn_Reference1%TYPE,
	    P_Xface_Id                IN Pa_Transaction_Interface_All.Txn_Interface_Id%TYPE )

   Is

      l_txn_rowid           RowId := Null;
Line: 1642

	Select
		EI.Task_Id,
		EI.Project_Id, -- Changed from T.Project_Id
        E.Expenditure_Ending_Date,
		E.Incurred_By_Organization_Id,
		E.Incurred_By_Person_Id,
		EI.Expenditure_Item_Date,
        EI.Expenditure_Type,
		EI.System_Linkage_Function,
		-(EI.quantity),
		EI.Attribute_Category,
		EI.Attribute1,
		EI.Attribute2,
		EI.Attribute3,
		EI.Attribute4,
		EI.Attribute5,
		EI.Attribute6,
		EI.Attribute7,
		EI.Attribute8,
		EI.Attribute9,
		EI.Attribute10,
		EI.Assignment_Id,
		EI.Work_Type_Id,
		EI.Billable_Flag,
		PEC.Expenditure_Comment,
		-- Begin CWK changes PA.M
		EI.PO_Line_Id,
		EI.PO_Price_Type,
		E.Person_Type,
		E.Vendor_Id,
		-- End CWK changes PA.M
        -- 12i changes
        ei.org_id,
        -- bug 10253400: Payroll integration enhancement for 12.2..start
        ei.job_id,
        ei.location_id,
		ei.pay_element_type_id
        -- bug 10253400: Payroll integration enhancement for 12.2..end
    ,ei.Cbs_Element_Id -- Added for CBS Enhancement Bug 16220146
	Into
		l_Task_Id,
		l_Proj_Id,
        l_Exp_End_Date,
		l_Inc_By_Org_Id,
		l_Inc_By_Person_Id,
		l_Exp_Item_Date,
		l_Exp_Type,
		l_Sys_Link,
 		l_Quantity,
		l_Attribute_Category,
		l_Attribute1,
        l_Attribute2,
        l_Attribute3,
        l_Attribute4,
        l_Attribute5,
        l_Attribute6,
        l_Attribute7,
        l_Attribute8,
        l_Attribute9,
        l_Attribute10,
		l_Assignment_Id,
		l_Work_Type_Id,
		l_Billable_Flag,
		l_Exp_Comment,
		-- Begin CWK changes PA.M
		l_PO_Line_Id,
		l_PO_Price_Type,
		l_Person_Type,
		l_Vendor_Id,
		-- End CWK changes PA.M
        -- 12i changes
        l_org_id,
        -- bug 10253400: Payroll integration enhancement for 12.2..start
        l_job_id,
        l_location_id,
		l_pay_element_type_id
        -- bug 10253400: Payroll integration enhancement for 12.2..end
    ,l_Cbs_Element_Id -- Added for CBS Enhancement Bug 16220146
	From
		Pa_Expenditure_Items EI,
		Pa_Expenditure_Comments PEC,
		Pa_Expenditures E
-- 3457943 S.N.
		--Pa_Tasks T
-- 3457943 E.N.
	Where
-- 3457943 S.N.
		--T.Task_Id = EI.Task_Id
-- 3457943 E.N.
	    	E.Expenditure_Id = EI.Expenditure_Id
	And     EI.Expenditure_Item_Id = PEC.Expenditure_Item_Id(+)
	And    	EI.Transaction_Source = 'ORACLE TIME AND LABOR'
	And    	EI.Orig_Transaction_Reference = P_Old_Orig_Trx_Ref
	And     Nvl(EI.Net_Zero_Adjustment_Flag,'N') = 'N'
        And     EI.Adjusted_Expenditure_Item_Id is Null;
Line: 1744

        Select Pa_Txn_Interface_S.NextVal
	Into l_Txn_Xface_Id
	From Dual;
Line: 1763

        G_Stage := 'Inserting reversing item into interface table BB/Ovn: ' || P_New_Orig_Trx_Ref ||
                   ' for Resource_Id(Person_Id): ' || to_char(l_Inc_By_Person_Id);
Line: 1768

	G_Stage := 'Store record for reversing item into arrays for bulk insert later.';
Line: 1864

        G_Last_Update_Date_Tbl(G_Trx_Import_Index) := SysDate;
Line: 1865

        G_Last_Updated_By_Tbl(G_Trx_Import_Index) := P_User_Id;
Line: 1950

   Procedure  UpdateChangedOrigTxn(
               P_Old_Orig_Txn_Ref   IN Pa_Expenditure_Items_All.Orig_Transaction_Reference%TYPE,
               P_New_Orig_Txn_Ref   IN Pa_Expenditure_Items_All.Orig_Transaction_Reference%TYPE,
               P_Comment_Or_Dff     IN Varchar2,
	           P_Timecard_Rec       IN Pa_Otc_Api.Timecard_Rec,
	           P_User_Id            IN Pa_Expenditure_Items_All.Last_Updated_By%TYPE)

   Is

        l_Exp_Item_Id 	    Pa_Expenditure_Items_All.Expenditure_Item_Id%TYPE := Null;
Line: 1961

	    l_Last_Update_Login Pa_Expenditure_Items_All.Last_Update_Login%TYPE := to_Number(Fnd_Profile.Value('LOGIN_ID'));
Line: 1968

        Select
               Count(*)
        From
               Pa_Expenditure_Comments
        Where
               Expenditure_Item_Id = P_Ei_Id;
Line: 1979

	    G_Stage := 'Entering UpdateChangedOrigTxn(), add procedure to trackpath.';
Line: 1984

	    Pa_Otc_Api.TrackPath('ADD','UpdateChangedOrigTxn');
Line: 1992

	    Select
		       RowId,
		       Expenditure_Item_Id
	    Into
		       l_RowId,
		       l_Exp_Item_Id
	    From
		       Pa_Expenditure_Items_All
	    Where
		       Transaction_Source = 'ORACLE TIME AND LABOR'
	    And     Orig_Transaction_Reference = P_Old_Orig_Txn_Ref
	    And	Net_Zero_Adjustment_Flag = 'N'; -- Bug 3480159
Line: 2011

	     * faster code due to potentially less updates taking place
	     * when P_Comment_Or_Dff has a value of B.
	     */
	    G_Stage := 'What updating needs to be done.';
Line: 2025

		    G_Stage := 'P_Comment_Or_Dff Is C: Update ei table.';
Line: 2031

		    Update Pa_Expenditure_Items_All
		    Set Orig_Transaction_Reference = P_New_Orig_Txn_Ref,
		        Last_Updated_By            = P_User_Id,
		        Last_Update_Date           = SysDate,
		        Last_Update_Login          = l_Last_Update_Login,
                        Request_id                 = x_request_id,        --Added for bug 4105561
                        Program_application_id     = x_program_application_id,
                        Program_id                 = x_program_id,
                        Program_update_date        = sysdate
		    Where Rowid = l_RowId ;
Line: 2049

			    G_Stage := 'P_Comment_Or_Dff Is C: Insert record into exp comment table.';
Line: 2055

			    Insert into Pa_Expenditure_Comments
			    (  	Expenditure_Item_Id,
 				    Line_Number,
 				    Last_Update_Date,
 				    Last_Updated_By,
 				    Creation_Date,
 				    Created_By,
 				    Expenditure_Comment,
 				    Last_Update_Login,
 				    Request_Id,
 				    Program_Id,
 				    Program_Application_Id,
 				    Program_Update_Date )
			    Values (
				    l_Exp_Item_Id,
				    10,
				    SysDate,
				    P_User_Id,
				    SysDate,
				    P_User_Id,
				    P_Timecard_Rec.Expenditure_Item_Comment,
				    l_Last_Update_Login,
		       		    X_request_id,   --Added for bug 4105561
				    X_program_id,
				    X_program_application_id,
				    sysdate);
Line: 2084

			    G_Stage := 'P_Comment_Or_Dff Is C: Update exp comment table.';
Line: 2090

			    Update Pa_Expenditure_Comments
			    Set Expenditure_Comment   = P_Timecard_Rec.Expenditure_Item_Comment,
			        Last_Updated_By       = P_User_Id,
			        Last_Update_Date      = SysDate,
			        Last_Update_Login     = l_Last_Update_Login,
                                Request_id            = x_request_id,        --Added for bug 4105561
                                Program_application_id= x_program_application_id,
                                Program_id            = x_program_id,
                                Program_update_date   = sysdate
			    Where Expenditure_Item_Id = l_exp_item_id ;
Line: 2103

                G_Stage := 'P_Comment_Or_Dff Is B: Remove exp comment from table since comment has been updated to null by the user.';
Line: 2109

                Delete From Pa_Expenditure_Comments
                Where Expenditure_Item_Id = l_Exp_Item_Id ;
Line: 2118

		    G_Stage := 'P_Comment_Or_Dff Is D: Update ei table.';
Line: 2124

		    Update Pa_Expenditure_Items_All
		    Set Orig_Transaction_Reference = P_New_Orig_Txn_Ref,
		        Attribute_category         = P_Timecard_Rec.Attribute_Category,
		        Attribute1                 = P_Timecard_Rec.Attribute1,
                Attribute2                 = P_Timecard_Rec.Attribute2,
                Attribute3                 = P_Timecard_Rec.Attribute3,
                Attribute4                 = P_Timecard_Rec.Attribute4,
                Attribute5                 = P_Timecard_Rec.Attribute5,
                Attribute6                 = P_Timecard_Rec.Attribute6,
                Attribute7                 = P_Timecard_Rec.Attribute7,
                Attribute8                 = P_Timecard_Rec.Attribute8,
                Attribute9                 = P_Timecard_Rec.Attribute9,
                Attribute10                = P_Timecard_Rec.Attribute10,
	            Last_Updated_By            = P_User_Id,
                Last_Update_Date           = SysDate,
                Last_Update_Login          = l_Last_Update_Login,
                Request_id                 = x_request_id,
                Program_application_id     = x_program_application_id,
                Program_id                 = x_program_id,
		        Program_update_date        = sysdate
            Where RowId = l_RowId ;
Line: 2150

		    G_Stage := 'P_Comment_Or_Dff Is P: Update ei table.';
Line: 2156

		    Update Pa_Expenditure_Items_All
		    Set pay_element_type_id        = P_Timecard_Rec.Pay_Element_Type_Id,
		        Orig_Transaction_Reference = P_New_Orig_Txn_Ref,
	            Last_Updated_By            = P_User_Id,
                Last_Update_Date           = SysDate,
                Last_Update_Login          = l_Last_Update_Login,
                Request_id                 = x_request_id,
                Program_application_id     = x_program_application_id,
                Program_id                 = x_program_id,
		        Program_update_date        = sysdate
            Where RowId = l_RowId ;
Line: 2170

	    G_Stage := 'Leaving UpdateChangedOrigTxn(), strip procedure from trackpath.';
Line: 2171

	    Pa_Otc_Api.TrackPath('STRIP','UpdateChangedOrigTxn');
Line: 2181

   End UpdateChangedOrigTxn;
Line: 2218

	Select To_Number(Substr(Orig_Transaction_Reference,1,Instr(Orig_Transaction_Reference,':') - 1)) Detail_BB_Id,
	       Transaction_Status_Code,
	       Transaction_Rejection_Code,
	       Txn_Interface_Id,
	       Expenditure_Id,
	       Expenditure_Item_Id,
	       Orig_Transaction_Reference,
	       Person_Id
	From
	       Pa_Transaction_Interface
	Where
	       Interface_Id = P_Interface_Id
	And    Transaction_Source = 'ORACLE TIME AND LABOR'
	And    Transaction_Status_Code in ('I','R')
	And    Pa_Otc_Api.TrxInCurrentChunk(To_Number(Substr(Orig_Transaction_Reference,1,Instr(Orig_Transaction_Reference,':') - 1))) = 'Y'
	Order by 7,3; -- Bug 3355510
Line: 2272

                    G_Stage := 'Update Detail Status to SUCCESS for BB_Id: ' || to_char(TrxRecord.Detail_BB_Id) ||
                               ' Index position is: ' || to_char((G_Trx_Inserted_Tab(TrxRecord.Detail_BB_Id).BB_Index));
Line: 2278

		    Hxc_User_Type_Definition_Grp.T_Tx_Detail_Status(G_Trx_Inserted_Tab(TrxRecord.Detail_BB_Id).BB_Index) :=
										'SUCCESS';
Line: 2283

                    G_Stage := 'Update Detail Status to ERRORS for BB_Id: ' || to_char(TrxRecord.Detail_BB_Id) ||
                               ' Index position is: ' || to_char((G_Trx_Inserted_Tab(TrxRecord.Detail_BB_Id).BB_Index));
Line: 2291

		     * more than it currently is.  We have to make sure that we don't try to update rejected
		     * Trx records from other loops that have already been ran.  They are at a status of 'R'
		     * So we check to first see if it exists in the pl/sql table and then if it does
		     * we update the otl pl/sql table accordingly run.
		     */

                   Hxc_User_Type_Definition_Grp.T_Tx_Detail_Status(G_Trx_Inserted_Tab(TrxRecord.Detail_BB_Id).BB_Index) := 'ERRORS';
Line: 2302

		   	Hxc_User_Type_Definition_Grp.T_Tx_Detail_Exception(G_Trx_Inserted_Tab(TrxRecord.Detail_BB_Id).BB_Index) :=
 					Substr(Fnd_Message.Get,1,2000);
Line: 2334

	G_Stage := 'Update the Transaction_Status_Code for successful transactions in interface table.';
Line: 2340

	Update Pa_Transaction_Interface
	Set
              Transaction_Status_Code = 'A'
	Where
              Interface_Id = P_Xface_Id
	And   Transaction_Status_Code = 'I';
Line: 2347

	G_Stage := 'Loop thru and flag as success those building blocks where we directly updated the eis.';
Line: 2365

			 * records that were inserted.
			 * DO NOT CHANGE THIS SO WE DO NOT GET ANY NO_DATA_FOUND ERRORS.
			 */
			j := G_Trx_Direct_Upd_Tab.Next(j);
Line: 2372

                G_Stage := 'Update Detail Status to SUCCESS for direct updated ei BB_Id: ' || to_char(j) ||
                           '  Index position is: ' || to_char((G_Trx_Direct_Upd_Tab(j).BB_Index));
Line: 2386

	G_Stage := 'Call OTL API to update transactions';
Line: 2393

	Hxc_Integration_Layer_V1_Grp.Update_Transaction_Status (
				    P_Process               => 'Projects Retrieval Process',
                                    P_Status                => 'SUCCESS',
                                    P_Exception_Description => NULL);
Line: 2419

                Hxc_Integration_Layer_V1_Grp.Update_Transaction_Status (
                                    P_Process               => 'Projects Retrieval Process',
                                    P_Status                => 'ERRORS',
                                    P_Exception_Description => Pa_Debug.G_err_Stage);
Line: 2466

  Procedure DetermineDirectUpdate(
			P_New_Timecard_Rec   IN         Pa_Otc_Api.Timecard_Rec,
			P_Old_Timecard_Rec   IN         Pa_Otc_Api.Timecard_Rec,
                        P_Direct_Update_Flag OUT NOCOPY Boolean,
                        P_Comment_Or_Dff     OUT NOCOPY Varchar2) IS

	l_Others_Changed  Boolean := False;
Line: 2479

	P_Direct_Update_Flag := True; /*Added for bug 13831042*/
Line: 2481

	G_Stage := 'Entering DetermineDirectUpdate(), add procedure to trackpath.';
Line: 2486

	Pa_Otc_Api.TrackPath('ADD','DetermineDirectUpdate');
Line: 2570

		G_Stage := 'No Direct Update.';
Line: 2575

		/* No direct update since other columns have been updated besides
		 * the comments and DFFs.
		 */
		P_Direct_Update_Flag := FALSE;
Line: 2583

		-- Looks like the comment or DFFS where updated in
		-- OTL so will do direct updating of the tables instead of
		-- using TRX_IMPORT.
		--

		G_Stage := 'Direct Update.';
Line: 2594

		P_Direct_Update_Flag := TRUE;
Line: 2664

	G_Stage := 'Leaving DetermineDirectUpdate(), strip procedure from trackpath.';
Line: 2669

	Pa_Otc_Api.TrackPath('STRIP','DetermineDirectUpdate');
Line: 2675

  End DetermineDirectUpdate;
Line: 2998

						    Select Proj_Element_Id, Cbs_Element_Id
							Into l_Actual_Task_Id, l_Cbs_Element_Id
							From Pa_Alternate_Tasks
							Where Alt_Task_Id = P_Timecard_Rec.Task_Id;
Line: 3657

						    Select Proj_Element_Id, Cbs_Element_Id
							Into l_Actual_Task_Id, l_Cbs_Element_Id
							From Pa_Alternate_Tasks
							Where Alt_Task_Id = P_Timecard_Rec.Task_Id;
Line: 4280

/* UPDATE and VALIDATION ROUTINES */

-- ========================================================================
-- Start Of Comments
-- API Name      : Projects_Retrieval_Process
-- Type          : Public
-- Pre-Reqs      : None
-- Type          : Function
-- Return        : Varchar2
-- Function      : This function is called to provide the retrieval process name so that the appropriate
--                 attribution is retrieved for validation.
--

/*--------------------------------------------------------------------------*/


   Function Projects_Retrieval_Process RETURN Varchar2

   Is

        l_retrieval_process Hxc_Time_Recipients.Application_Retrieval_Function%TYPE;
Line: 4329

  Procedure Update_Otc_Data
            (P_Operation            IN Varchar2)

  Is

	l_Blocks     Hxc_User_Type_Definition_Grp.Timecard_Info;
Line: 4342

        G_Stage := 'Entering Update_Otc_Data() procedure.';
Line: 4343

        Pa_Otc_Api.TrackPath('ADD','Update_Otc_Data');
Line: 4353

		G_Stage := 'Call the Upate_Process() to update the billable flag.';
Line: 4354

		Pa_Otc_Api.Update_Process (
					P_Operation       => P_Operation,
                    P_Building_Blocks => l_Blocks,
                    P_Attribute_Table => l_Attributes);
Line: 4367

        G_Stage := 'Leaving Update_Otc_Data() procedure.';
Line: 4368

        Pa_Otc_Api.TrackPath('STRIP','Update_Otc_Data');
Line: 4374

  End Update_Otc_Data;
Line: 4403

  Procedure Update_Process(
                      P_Operation         IN     Varchar2,
                      P_Building_Blocks   IN OUT NOCOPY Hxc_User_Type_Definition_Grp.Timecard_Info, -- 2672653
                      P_Attribute_Table   IN OUT NOCOPY Hxc_User_Type_Definition_Grp.App_Attributes_Info) -- 2672653

  Is

	    l_Proj_Attrib_Rec           Pa_Otc_Api.Project_Attribution_Rec;
Line: 4416

        l_BB_Detail_Deleted         Varchar2(1)    := 'N';  -- The OTL item has been deleted.
Line: 4418

        l_Data_Conflict_Flag        Varchar2(1)    := 'N';  -- If attempt to delete,update after already saved change or
Line: 4445

	G_Stage := 'Entering procedure Update_Process().';
Line: 4446

        Pa_Otc_Api.TrackPath('ADD','Update_Process');
Line: 4496

                        P_Mode                 => 'UPDATE',
                        P_Process_Flag         => P_Building_Blocks(i).Process,
                        X_BB_Detail_Changed    => l_BB_Detail_Changed,
                        X_Data_Conflict_Flag   => l_Data_Conflict_Flag,
                        X_BB_Detail_Deleted    => l_BB_Detail_Deleted,
                        X_Adj_in_Projects_Flag => l_Adjusted_In_Projects);
Line: 4504

			G_Delete_op      := l_BB_Detail_Deleted;
Line: 4505

			G_Delete_Change  := l_Logical_Rec_Changed;
Line: 4508

		     If  /* l_BB_Detail_Deleted = 'N' and  */  -- again commented for 11656282 /* removed the comments for bug 10033549 */--Commented for  bug 8546092  / 8284884
		       (l_BB_Detail_Deleted = 'N' OR (l_BB_Detail_Deleted = 'Y'
			and l_Proj_Attrib_Rec.Quantity is null)) and /*Added for bug#13803367 */
		       (l_BB_Detail_Changed = 'Y' or P_Building_Blocks(i).New = 'Y') and
		        l_Adjusted_In_Projects = 'N' and
		        l_Data_Conflict_Flag = 'N' Then

			/*Start changes for bug#13803367 */

			IF (l_BB_Detail_Deleted = 'Y' and
			l_Proj_Attrib_Rec.Quantity is null) THEN
			--{
				l_calling_module  :='PAXVOTCBDEL';
Line: 4609

		End If;  -- Detail building block not deleted and has changed.
Line: 4618

	G_Stage := 'Leaving procedure Update_Process().';
Line: 4619

	Pa_Otc_Api.TrackPath('STRIP','Update_Process');
Line: 4625

  End Update_Process;
Line: 4738

        l_BB_Detail_Deleted         Varchar2(1) := 'N';  -- The OTL item has been deleted.
Line: 4739

        l_Data_Conflict_Flag        Varchar2(1) := 'N';  -- If attempt to delete,update after already saved change or
Line: 4807

        Select
               Meaning
        From
               Fnd_Lookups
        Where
               Lookup_Type = 'YES_NO'
        And    Lookup_Code = P_Lookup_Code;
Line: 4817

		select max(person_id) from per_all_assignments_f paf,per_assignment_status_types past
		where paf.person_id = p_person_id
		and  paf.assignment_status_type_id = past.assignment_status_type_id
		and  past.per_system_status = 'TERM_ASSIGN';
Line: 4972

				     Select
						'Y'
						into l_closed_proj_flag from  dual
						where  exists  (select 1
				    From
				        Pa_Expenditure_Items_All ei,
					pa_projects_all  ppa
				    Where
					    ei.project_id <>  l_Proj_Attrib_Rec.PROJECT_ID  and
				        ei.project_id =  ppa.project_id and
						nvl(ei.net_zero_adjustment_flag, 'N') <> 'Y' and
				        ei.Transaction_Source = 'ORACLE TIME AND LABOR' and
				        ei.Orig_Transaction_Reference like l_bbid
		               --and ppa.project_status_code = 'CLOSED'
			         AND PA_PROJECT_UTILS.check_prj_stus_action_allowed(ppa.PROJECT_STATUS_CODE, 'NEW_TXNS') = 'N' --Bug 8532951
			       );
Line: 5024

			       X_BB_Detail_Deleted    => l_BB_Detail_Deleted,
                   X_Adj_in_Projects_Flag => l_Adjusted_In_Projects);
Line: 5044

		   	      If l_BB_Detail_Deleted = 'Y' Then

				       G_Stage := 'Building Block has been deleted.';
Line: 5053

					        G_Stage := 'Not allowed to delete Item In OTL data conflict - Inserting error rec.';
Line: 5055

                            G_Msg_Tokens_Table.Delete;
Line: 5069

					        G_Stage := 'Not allowed to Delete Item In OTL - Inserting error rec.';
Line: 5070

					        G_Msg_Tokens_Table.Delete;
Line: 5084

			      End If; -- l_BB_Detail_Deleted is Y
Line: 5086

                  If l_BB_Detail_Changed = 'Y' and l_BB_Detail_Deleted = 'N' Then

				       If l_Data_Conflict_Flag = 'Y' Then

					        -- Really don't need to process this record any further.
					        -- The timecard cannot be save due to this.  Period!

                            G_Stage := 'Not allowed to Adjust Item In OTL confict - Inserting error rec.';
Line: 5094

					        G_Msg_Tokens_Table.Delete;
Line: 5108

					        G_Stage := 'Not allowed to Adjust Item In OTL - Inserting error rec.';
Line: 5110

					        G_Msg_Tokens_Table.Delete;
Line: 5124

                  End If;  -- l_BB_Detail_Changed is Y and l_BB_Detail_Deleted is N
Line: 5128

		     If  /* l_BB_Detail_Deleted = 'N' and  */  -- again commented for 11656282 /* removed the comments for bug 10033549 */--Commented for  bug 8546092  / 8284884
		       (l_BB_Detail_Deleted = 'N' OR (l_BB_Detail_Deleted = 'Y'
                      and l_Proj_Attrib_Rec.Quantity is null)) and --Added for bug#13803367
			l_Adjusted_In_Projects = 'N' and
		        ( l_BB_Detail_Changed = 'Y' or P_Building_Blocks(i).New = 'Y') Then

			/*Added for bug#13803367*/
			IF (l_BB_Detail_Deleted = 'Y' and
			l_Proj_Attrib_Rec.Quantity is null) THEN
			--{
				l_calling_module  :='PAXVOTCBDEL';
Line: 5154

                       G_Stage := 'Cannot have data where UOM is not HOURS - Inserting error rec.';
Line: 5156

                       G_Msg_Tokens_Table.Delete;
Line: 5180

                       G_Stage := 'Negative quantity not allowed In OTL - Inserting error rec.';
Line: 5181

                       G_Msg_Tokens_Table.Delete;
Line: 5198

	                   G_Stage := 'Invalid Person Type - Inserting error rec.';
Line: 5199

        	           G_Msg_Tokens_Table.Delete;
Line: 5218

	                        G_Stage := 'Project organization does not allow CWK timecards - Inserting error rec.';
Line: 5219

        	                G_Msg_Tokens_Table.Delete;
Line: 5239

	                                  G_Stage := 'Price Type is null - Inserting error rec.';
Line: 5240

        	                          G_Msg_Tokens_Table.Delete;
Line: 5254

	                                  G_Stage := 'Derived Vendor Id is null - Inserting error rec.';
Line: 5255

        	                          G_Msg_Tokens_Table.Delete;
Line: 5287

				       G_Stage := 'Get Project Number - Inserting error rec.';
Line: 5288

                       G_Msg_Tokens_Table.Delete;
Line: 5314

				       G_Stage := 'Get Task Number - Inserting error rec.';
Line: 5315

                       G_Msg_Tokens_Table.Delete;
Line: 5340

				       G_Stage := 'Get Work Type Info - Inserting error rec.';
Line: 5341

                       G_Msg_Tokens_Table.Delete;
Line: 5366

				       G_Stage := 'Get Job Info - Inserting error rec.';
Line: 5367

                       G_Msg_Tokens_Table.Delete;
Line: 5392

				       G_Stage := 'Get Location Info - Inserting error rec.';
Line: 5393

                       G_Msg_Tokens_Table.Delete;
Line: 5420

				       G_Stage := 'Validate the exp type and syst link func - Inserting error rec.';
Line: 5423

                       G_Msg_Tokens_Table.Delete;
Line: 5452

				       G_Stage := 'Invalid sys link func - Inserting error rec.';
Line: 5455

				       G_Msg_Tokens_Table.Delete;
Line: 5478

				       G_Stage := 'Get Inc by Org Id - Inserting error rec.';
Line: 5479

                       G_Msg_Tokens_Table.Delete;
Line: 5521

                            G_Msg_Tokens_Table.Delete;
Line: 5527

                            G_Stage := 'Check Job Id - Inserting error rec.';
Line: 5597

  					        G_Msg_Tokens_Table.Delete;
Line: 5687

					        G_Stage := 'Patc returned status that is Not Null - Inserting error rec.';
Line: 5688

                            G_Msg_Tokens_Table.Delete;
Line: 5775

                                  * in update phase of validation logic and billable no longer
                                  * matches what patc returns.
                                  */

                                  G_Stage := 'Get translated value for Billable_flag code using fnd_lookups.';
Line: 5791

                                  G_Stage := 'Invalid external change of billable flag  - Inserting error rec.';
Line: 5792

                                  G_Msg_Tokens_Table.Delete;
Line: 5821

					         * in update phase of validation logic and billable no longer
					         * matches what patc returns.
					         */

					        G_Stage := 'Get translated value for Billable_flag code using fnd_lookups.';
Line: 5837

                            G_Stage := 'Invalid external change of billable flag  - Inserting error rec.';
Line: 5838

	                        G_Msg_Tokens_Table.Delete;
Line: 5858

             End If; -- l_Adjusted_In_Projects = 'N' and l_BB_Detail_Changed = 'Y' and l_BB_Detail_Deleted = 'N'
Line: 5860

             If P_Message_Table.Count = 0 and l_BB_Detail_Deleted = 'N' Then

			      -- Add ei record to l_Timecard_Table
			      G_Stage := 'Add ei record to l_Timecard_Table for use by extensions.';
Line: 5912

			      G_Stage := 'Reset variable used for table insert';
Line: 5945

			G_Stage := 'Calling Summary-validation Extension - Insert Error Rec.';
Line: 5946

            G_Msg_Tokens_Table.Delete;
Line: 5980

                  G_Stage := 'Calling Business Message API - Insert Business Rec Msg.';
Line: 5981

		          G_Msg_Tokens_Table.Delete;
Line: 6076

	Select
                Project_Number
	From
                Pa_Online_Projects_V
	Where
                Project_Id = P_Proj_Id; */
Line: 6084

    select
          p.segment1
    from  Pa_Online_Projects_V pp,
          pa_projects_all p
    where pp.Project_Id = P_Proj_Id
    and   pp.project_id = p.project_id;
Line: 6188

	Select
              Task_Number
	From
              Pa_Online_Tasks_V
	Where
              Task_Id    = P_Tsk_Id
	And       Project_Id = P_Prj_Id; */
Line: 6198

    select
          t.task_number
    from  pa_online_tasks_v tt,
          pa_tasks t
    where
          tt.task_id    = P_Tsk_Id
    and   tt.project_id = P_Prj_Id
    and   t.task_id     = tt.task_id;
Line: 6307

      Select
             System_Linkage_Function,
             Expenditure_Type
      From
             Pa_Online_Expenditure_Types_V
      Where
             System_Linkage_Function = P_Sys_Link_Func
      And    Expenditure_Type        = P_Exp_Type
      And    P_Exp_Item_Date Between Sys_Link_Start_Date_Active
				                 And Nvl(Sys_Link_End_Date_Active,P_EI_Date)
      And    P_Exp_Item_Date Between Expnd_Typ_Start_Date_Active
				                 And Nvl(Expnd_Typ_End_Date_Active,P_EI_Date)
      And    system_linkage_function in ('ST','OT'); -- bug 5020394
Line: 6401

      		Select
                        Distinct
			Person_Id
      		Into
			X_Approver_Id
      		From
			Pa_Exp_Ovrrde_Approver_V
      		Where
			Person_Id = P_Approver_Id;
Line: 6463

    select
          name
    from  pa_work_types_v w
    where w.work_type_Id = P_Work_Type_Id
      and p_Exp_Item_Date between start_date_active and nvl(end_date_active, p_exp_item_date);
Line: 6542

    select
          name
    from  per_jobs_v w
    where w.job_Id = P_job_Id
      and p_Exp_Item_Date between date_from and nvl(date_to, p_exp_item_date)
      and ((PA_CROSS_BUSINESS_GRP.IsCrossBGProfile = 'N' AND
          fnd_profile.value('PER_BUSINESS_GROUP_ID') = W.BUSINESS_GROUP_ID)
          OR
          PA_CROSS_BUSINESS_GRP.IsCrossBGProfile = 'Y');
Line: 6626

    select l.location_code
      from hr_locations l
     where location_id = P_Location_Id
       and p_exp_item_date <= nvl(l.inactive_date, p_exp_item_date)
       and l.location_use = 'HR';
Line: 6713

		X_BB_Detail_Deleted    OUT NOCOPY Varchar2,
		X_Adj_in_Projects_Flag OUT NOCOPY Varchar2)

   Is

	l_Orig_Trx_Ref     Pa_Expenditure_Items_All.Orig_Transaction_Reference%TYPE := Null;
Line: 6740

	Select
		RowId,
		Expenditure_Item_Id,
                Net_Zero_Adjustment_Flag,
		Orig_Transaction_Reference
        From
                Pa_Expenditure_Items_All
        Where
                Transaction_Source = 'ORACLE TIME AND LABOR'
        And     Orig_Transaction_Reference like l_orig_trx_ref
	Order By Orig_Transaction_Reference;
Line: 6753

        Select
		'Y'
        From
		Pa_Expenditure_Items_All ei,
                Pa_Expenditure_Comments c
	Where
          	ei.Expenditure_Item_Id            =  c.Expenditure_Item_Id(+)
	And    (ei.Task_Id                        <> nvl(P_Proj_Attribute_Rec.Task_Id,-99)
        Or      ei.Expenditure_Type               <> nvl(P_Proj_Attribute_Rec.Expenditure_Type,'-999999999')
        Or      ei.System_Linkage_Function        <> nvl(P_Proj_Attribute_Rec.Sys_Linkage_Func,'-99')
        Or      ei.Quantity                       <> nvl(P_Proj_Attribute_Rec.Quantity,-99)
        Or      nvl(ei.Attribute_Category,'-99')  <> nvl(P_Proj_Attribute_Rec.Attrib_Category,'-99')
        Or      nvl(ei.Attribute1,'-99')          <> nvl(P_Proj_Attribute_Rec.Attribute1,'-99')
        Or      nvl(ei.Attribute2,'-99')          <> nvl(P_Proj_Attribute_Rec.Attribute2,'-99')
        Or      nvl(ei.Attribute3,'-99')          <> nvl(P_Proj_Attribute_Rec.Attribute3,'-99')
        Or      nvl(ei.Attribute4,'-99')          <> nvl(P_Proj_Attribute_Rec.Attribute4,'-99')
        Or      nvl(ei.Attribute5,'-99')          <> nvl(P_Proj_Attribute_Rec.Attribute5,'-99')
        Or      nvl(ei.Attribute6,'-99')          <> nvl(P_Proj_Attribute_Rec.Attribute6,'-99')
        Or      nvl(ei.Attribute7,'-99')          <> nvl(P_Proj_Attribute_Rec.Attribute7,'-99')
        Or      nvl(ei.Attribute8,'-99')          <> nvl(P_Proj_Attribute_Rec.Attribute8,'-99')
        Or      nvl(ei.Attribute9,'-99')          <> nvl(P_Proj_Attribute_Rec.Attribute9,'-99')
        Or      nvl(ei.Attribute10,'-99')         <> nvl(P_Proj_Attribute_Rec.Attribute10,'-99')
        Or      nvl(c.Expenditure_Comment,'-99')  <> nvl(P_Proj_Attribute_Rec.Expenditure_Item_Comment,'-99')
        Or      nvl(ei.PO_Line_Id,-99)            <> nvl(P_Proj_Attribute_Rec.PO_Line_Id,-99)
        Or      nvl(ei.PO_Price_Type,'-99')       <> nvl(P_Proj_Attribute_Rec.PO_Price_Type,'-99')
        -- Bug 10253400.. 12.2 payroll intg .. start
        Or      nvl(ei.job_id, -99)               <> nvl(P_Proj_Attribute_Rec.Job_Id, nvl(ei.job_id, -99))
        Or      nvl(ei.location_id, -99)          <> nvl(P_Proj_Attribute_Rec.Location_Id, nvl(ei.location_id, -99))
        Or      nvl(ei.pay_element_type_id, -99)     <> nvl(P_Proj_Attribute_Rec.Pay_Element_Type_Id, nvl(ei.pay_element_type_id, -99))
        -- Bug 10253400.. 12.2 payroll intg .. end
        Or      nvl(ei.Cbs_Element_Id, -99)     <> nvl(P_Proj_Attribute_Rec.Cbs_Element_Id, nvl(ei.Cbs_Element_Id, -99))) -- Added for CBS Enhancement Bug 16220146
        And     ei.RowId                          =  P_RowId;
Line: 6800

        X_BB_Detail_Deleted    := 'N';
Line: 6803

        G_Stage := 'Check for deleted detail bb.';
Line: 6806

		G_Stage := 'Detail bb block has been deleted.';
Line: 6807

               	X_BB_Detail_Deleted := 'Y';
Line: 6811

	-- If an item has been deleted in OTL then P_BB_Changed = Y as well.

	G_Stage := 'Check and setting the ovn value to scan Project ei table with';
Line: 6820

	ElsIf X_BB_Detail_Deleted = 'Y' Then

        G_Stage := 'The detail scope bb is being deleted.';
Line: 6925

				   X_BB_Detail_Deleted = 'N' Then

			   	   	G_Stage := 'Only Ovn has changed.  Update the orig_transaction_reference of the ei.';
Line: 6928

                    Update Pa_Expenditure_Items_all  --for Bug# 13519235
                    Set
                         Orig_Transaction_Reference = To_Char(P_BB_Id) || ':' || To_Char(l_Ovn_Check_Value),
                         last_update_date = sysdate,
                         last_updated_by = to_Number(Fnd_Profile.Value('USER_ID')),
                         last_update_login = to_Number(Fnd_Profile.Value('LOGIN_ID'))
                    Where
                         RowId = l_RowId;
Line: 6939

 	                   select  project_id , task_id, expenditure_type,
                               job_id, location_id, pay_element_type_id, cbs_element_id
 	                      into    l_Proj_Id , l_task_id , l_Exp_Type,
                               l_job_id, l_location_id, l_pay_element_type_id, l_Cbs_Element_Id
 	                    from Pa_Expenditure_Items_all  --for Bug# 13519235
 	                    where RowId = l_RowId;
Line: 6964

			      /* Bug 2283011  The changed_flag is coming in as 'N' for deleted items not 'Y' so
                                 we don't need to consider it value then.
		 		ElsIf P_BB_Changed = 'Y' and */
				ElsIf X_BB_Detail_Deleted = 'Y' and
				      l_Net_Zero_flag = 'Y' Then

					G_Stage := 'BB/EI has been already changed in Projects, so cannot delete.';
Line: 6985

				   	If P_BB_Changed = 'N' and X_BB_Detail_Deleted = 'N' Then

				   		G_Stage := 'Data conflict exists.';
Line: 7348

						      Select Proj_Element_Id, Cbs_Element_Id
							  Into l_Actual_Task_Id, l_Cbs_Element_Id
							  From Pa_Alternate_Tasks
							  Where Alt_Task_Id = X_Proj_Attrib_Rec.Task_Id;
Line: 7788

						      Select Proj_Element_Id, Cbs_Element_Id
							  Into l_Actual_Task_Id, l_Cbs_Element_Id
							  From Pa_Alternate_Tasks
							  Where Alt_Task_Id = X_Proj_Attrib_Rec.Task_Id;
Line: 8067

                  select mc.segment
                  Into   G_Billable_Segment
                  from hxc_mapping_components mc,
                  hxc_bld_blk_info_types bbit
                  where mc.field_name = 'BILLABLE_FLAG'
                  and bbit.bld_blk_info_type_id = mc.bld_blk_info_type_id
                  and bbit.bld_blk_info_type = 'PROJECTS';
Line: 8091

                  P_Attribute_Table(billable_index).updated := 'N';
Line: 8251

	Select
		FI.Project_Id,
		P.Segment1,
		FI.Item_Date,
		FI.Expenditure_Type,
		FI.Expenditure_Type_Class,
		FI.Item_Quantity
	From
		Pa_Forecast_Items FI,
		Pa_Projects_All P,
		Pa_Project_Assignments PPA
	Where
		Person_Id = P_Emp_Id
	And	Item_Date Between P_Start_Date
	                      And P_Stop_Date
	And Forecast_Item_Type in ('A','U')
    And FI.Project_Id = P.Project_Id
	And PPA.assignment_id = FI.assignment_id
	And FI.delete_flag = 'N'
	And Nvl(FI.expenditure_org_id,-99) = Nvl(P_Exp_Org_Id,-99)
	And Nvl(FI.Item_Quantity,0) <> 0
    Order by 2,4,3; -- project/exp_type/item_date
Line: 8281

    Select
            FI.Project_Id,
            P.Segment1,
            FI.Item_Date,
            FI.Expenditure_Type,
            FI.Expenditure_Type_Class,
            FI.Item_Quantity
    From
            Pa_Forecast_Items FI,
            Pa_Projects_All P
    Where
            Person_Id = P_Emp_Id
    And Item_Date Between P_Start_Date
                      And P_Stop_Date
    And Forecast_Item_Type = 'A'
    And FI.Project_Id = P.Project_Id
    And FI.delete_flag = 'N'
    And FI.expenditure_org_id = P_Exp_Org_Id
    And FI.Item_Quantity <> 0
    Order by 2,4,3; -- project/exp_type/item_date
Line: 8309

    Select
            FI.Project_Id,
            P.Segment1,
            FI.Item_Date,
            FI.Expenditure_Type,
            FI.Expenditure_Type_Class,
            FI.Item_Quantity
    From
            Pa_Forecast_Items FI,
            Pa_Projects_All P,
            Pa_Resource_Txn_Attributes PTA
    Where
            PTA.Person_Id = P_Emp_Id
    And FI.Resource_id = PTA.Resource_id
    And FI.Item_Date Between P_Start_Date
                     And P_Stop_Date
    And FI.Forecast_Item_Type = 'A'
    And FI.Project_Id = P.Project_Id
    And FI.delete_flag = 'N'
    And FI.expenditure_org_id = P_Exp_Org_Id
    And FI.Item_Quantity <> 0
    Order by 2,4,3; -- project/exp_type/item_date
Line: 8352

	-- Select
	-- 	'Y'
	-- From
	-- 	Pa_Online_Projects_V
	-- Where
    -- 	Project_Id = P_Project_Id;
Line: 8378

	l_Message_Table.Delete;
Line: 8379

    l_Building_Blocks_Table.Delete;
Line: 8380

    l_Attribute_Table.Delete;
Line: 8381

    l_dummy_bb_Table.Delete;
Line: 8382

    l_dummy_Attrib_Table.Delete;
Line: 8400

             G_Msg_Tokens_Table.Delete;
Line: 8436

		-- Insert Timecard Scope record
		G_Stage := 'Build/Insert Timecard Scope BB record.';
Line: 8459

		-- Insert Day Scope records.
		G_Stage := 'Build/Insert day scope records using loop based on the number of days in timecard period.';
Line: 8543

				G_Stage := 'Building and insert detail scope record.';
Line: 8582

				G_Stage := 'Building and insert detail scope attribution records.';
Line: 8585

				G_Stage := 'Building and insert detail scope attribution record project_Id.';
Line: 8592

                l_Attribute_Table(l_Attrib_Index).Updated := 'N';
Line: 8598

				G_Stage := 'Building and insert detail scope attribution record Expenditure Type.';
Line: 8605

                l_Attribute_Table(l_Attrib_Index).Updated := 'N';
Line: 8611

				G_Stage := 'Building and insert detail scope attribution record Expenditure_Type_Class.';
Line: 8618

                l_Attribute_Table(l_Attrib_Index).Updated := 'N';
Line: 8625

				G_Msg_Tokens_Table.Delete;
Line: 8751

	     select hrp.period_type
	       from hxc_recurring_periods hrp
	      where hrp.recurring_period_id = p_rec_id;
Line: 8756

	      Select max(effective_end_date) from per_people_f
	      where person_id = p_person_id and
	      effective_end_date <= p_stop_date and
	      (current_employee_flag = 'Y' or current_npw_flag = 'Y');
Line: 8763

              Select '1' from per_assignments_f where
              person_id = p_person_id and
              trunc(p_stop_date) + 1 between effective_start_date and effective_end_date
              and  assignment_status_type_id in (select assignment_status_type_id
              from PER_ASSIGNMENT_STATUS_TYPES where per_system_status = 'SUSP_ASSIGN');
Line: 8832

				IF (G_Detail_Change = 'N' and  G_Delete_Change = 'Y') Then

				           X_Pass_Val_Flag := 'N';
Line: 8835

				           G_Msg_Tokens_Table.Delete;
Line: 8905

                                     G_Stage := 'Validate Overriding Approver - Inserting error rec.';
Line: 8906

				                     G_Msg_Tokens_Table.Delete;
Line: 8937

                           G_Msg_Tokens_Table.Delete;
Line: 9031

        l_Timecard_Table.delete;
Line: 9032

	l_Message_Table.delete;
Line: 9057

		G_Msg_Tokens_Table.Delete;
Line: 9093

                         G_Msg_Tokens_Table.Delete;
Line: 9206

        l_Timecard_Table.Delete;
Line: 9252

                	G_Msg_Tokens_Table.Delete;
Line: 9361

				G_Msg_Tokens_Table.Delete;
Line: 9377

				G_Msg_Tokens_Table.Delete;
Line: 9461

	X_Timecard_Table.delete;
Line: 9596

	Select
               distinct 'Y' -- Bug#9374217: Added distinct clause to avoid the ORA-1422 error.
	Into
               l_Exists_Flag
	From
               Pa_Expenditure_Items_All
	Where
               Transaction_Source = 'ORACLE TIME AND LABOR'
	And    Orig_Transaction_Reference = P_Orig_Transaction_Reference;
Line: 9764

        	Select
                       To_Char(P_Exp_End_Date,'YYMMDD')
        	Into
                       l_Date_String
        	From
                       Dual;
Line: 9777

        	SELECT
                       Mod(Pa_Expenditure_Groups_S.NextVal,1000)
        	INTO
                       l_Sequence_No
        	FROM
                       Dual;
Line: 9903

	Select
		Orig_Transaction_Reference
	Into
		X_OrigTrxRef
	From
		Pa_Expenditure_Items_All
	Where
		Orig_Transaction_Reference like l_Search
	And   	Transaction_Source = 'ORACLE TIME AND LABOR'
	And     Nvl(Net_Zero_Adjustment_Flag,'N') = 'N'
	And     Adjusted_Expenditure_Item_Id is Null
	And 	to_number(substr(Orig_Transaction_Reference,instr(Orig_Transaction_Reference,':') + 1)) = (
		Select
		    	Max(to_Number(Substr(Orig_Transaction_Reference,instr(Orig_Transaction_Reference,':') + 1)))
		From
		    	Pa_Expenditure_Items_All
		Where
		    	Orig_Transaction_Reference like l_Search
		And 	Transaction_Source = 'ORACLE TIME AND LABOR'
                And     Nvl(Net_Zero_Adjustment_Flag,'N') = 'N'
		And     Adjusted_Expenditure_Item_Id is Null);
Line: 10053

  Procedure BulkInsertReset (P_Command IN Varchar2)

  Is

  Begin

	G_Stage := 'Entering BulkInsertReset(), add procedure to trackpath.';
Line: 10062

	   pa_cc_utils.log_message('BulkInsertReset: ' || Pa_Debug.G_Err_Stage,0);
Line: 10064

	Pa_Otc_Api.TrackPath('ADD','BulkInsertReset');
Line: 10066

	If P_Command = 'INSERT' Then

		G_Stage := 'Bulk Insert records into Interface table via Pa_Txn_Interface_Items_Pkg.Bulk_Insert().';
Line: 10071

		   pa_cc_utils.log_message('BulkInsertReset: ' || Pa_Debug.G_Err_Stage,0);
Line: 10074

		Pa_Txn_Interface_Items_Pkg.Bulk_Insert(
			   P_Txn_Interface_Id_Tbl               => G_Txn_Interface_Id_Tbl,
			   P_Transaction_Source_Tbl             => G_Transaction_Source_Tbl,
			   P_User_Transaction_Source_Tbl        => G_User_Transaction_Source_Tbl,
			   P_Batch_Name_Tbl                     => G_Batch_Name_Tbl,
			   P_Expenditure_End_Date_Tbl           => G_Expenditure_End_Date_Tbl,
			   P_Person_Bus_Grp_Name_Tbl            => G_Person_Bus_Grp_Name_Tbl,
			   P_Person_Bus_Grp_Id_Tbl              => G_Person_Bus_Grp_Id_Tbl,
			   P_Employee_Number_Tbl                => G_Employee_Number_Tbl,
			   P_Person_Id_Tbl                      => G_Person_Id_Tbl,
			   P_Organization_Name_Tbl              => G_Organization_Name_Tbl,
			   P_Organization_Id_Tbl                => G_Organization_Id_Tbl,
			   P_Expenditure_Item_Date_Tbl          => G_Expenditure_Item_Date_Tbl,
			   P_Project_Number_Tbl                 => G_Project_Number_Tbl,
			   P_Project_Id_Tbl                     => G_Project_Id_Tbl,
			   P_Task_Number_Tbl                    => G_Task_Number_Tbl,
			   P_Task_Id_Tbl                        => G_Task_Id_Tbl,
			   P_Expenditure_Type_Tbl               => G_Expenditure_Type_Tbl,
			   P_System_Linkage_Tbl                 => G_System_Linkage_Tbl,
			   P_Non_Labor_Resource_Tbl             => G_Non_Labor_Resource_Tbl,
			   P_Non_Labor_Res_Org_Name_Tbl         => G_Non_Labor_Res_Org_Name_Tbl,
			   P_Non_Labor_Res_Org_Id_Tbl           => G_Non_Labor_Res_Org_Id_Tbl,
			   P_Quantity_Tbl                       => G_Quantity_Tbl,
			   P_Raw_Cost_Tbl                       => G_Raw_Cost_Tbl,
			   P_Raw_Cost_Rate_Tbl                  => G_Raw_Cost_Rate_Tbl,
			   P_Burden_Cost_Tbl                    => G_Burden_Cost_Tbl,
			   P_Burden_Cost_Rate_Tbl               => G_Burden_Cost_Rate_Tbl,
			   P_Expenditure_Comment_Tbl            => G_Expenditure_Comment_Tbl,
			   P_Gl_Date_Tbl                        => G_Gl_Date_Tbl,
			   P_Transaction_Status_Code_Tbl        => G_Transaction_Status_Code_Tbl,
			   P_Trans_Rejection_Code_Tbl           => G_Trans_Rejection_Code_Tbl,
			   P_Orig_Trans_Reference_Tbl           => G_Orig_Trans_Reference_Tbl,
			   P_Unmatched_Neg_Txn_Flag_Tbl         => G_Unmatched_Neg_Txn_Flag_Tbl,
			   P_Expenditure_Id_Tbl                 => G_Expenditure_Id_Tbl,
			   P_Attribute_Category_Tbl             => G_Attribute_Category_Tbl,
			   P_Attribute1_Tbl                     => G_Attribute1_Tbl,
			   P_Attribute2_Tbl                     => G_Attribute2_Tbl,
			   P_Attribute3_Tbl                     => G_Attribute3_Tbl,
			   P_Attribute4_Tbl                     => G_Attribute4_Tbl,
			   P_Attribute5_Tbl                     => G_Attribute5_Tbl,
			   P_Attribute6_Tbl                     => G_Attribute6_Tbl,
			   P_Attribute7_Tbl                     => G_Attribute7_Tbl,
			   P_Attribute8_Tbl                     => G_Attribute8_Tbl,
			   P_Attribute9_Tbl                     => G_Attribute9_Tbl,
			   P_Attribute10_Tbl                    => G_Attribute10_Tbl,
			   P_Dr_Code_Combination_Id_Tbl         => G_Dr_Code_Combination_Id_Tbl,
			   P_Cr_Code_Combination_Id_Tbl         => G_Cr_Code_Combination_Id_Tbl,
			   P_Cdl_System_Reference1_Tbl          => G_Cdl_System_Reference1_Tbl,
			   P_Cdl_System_Reference2_Tbl          => G_Cdl_System_Reference2_Tbl,
			   P_Cdl_System_Reference3_Tbl          => G_Cdl_System_Reference3_Tbl,
			   P_Interface_Id_Tbl                   => G_Interface_Id_Tbl,
			   P_Receipt_Currency_Amount_Tbl        => G_Receipt_Currency_Amount_Tbl,
			   P_Receipt_Currency_Code_Tbl          => G_Receipt_Currency_Code_Tbl,
			   P_Receipt_Exchange_Rate_Tbl          => G_Receipt_Exchange_Rate_Tbl,
			   P_Denom_Currency_Code_Tbl            => G_Denom_Currency_Code_Tbl,
			   P_Denom_Raw_Cost_Tbl                 => G_Denom_Raw_Cost_Tbl,
			   P_Denom_Burdened_Cost_Tbl            => G_Denom_Burdened_Cost_Tbl,
			   P_Acct_Rate_Date_Tbl                 => G_Acct_Rate_Date_Tbl,
			   P_Acct_Rate_Type_Tbl                 => G_Acct_Rate_Type_Tbl,
			   P_Acct_Exchange_Rate_Tbl             => G_Acct_Exchange_Rate_Tbl,
			   P_Acct_Raw_Cost_Tbl                  => G_Acct_Raw_Cost_Tbl,
			   P_Acct_Burdened_Cost_Tbl             => G_Acct_Burdened_Cost_Tbl,
			   P_Acct_Exch_Rounding_Limit_Tbl       => G_Acct_Exch_Rounding_Limit_Tbl,
			   P_Project_Currency_Code_Tbl          => G_Project_Currency_Code_Tbl,
			   P_Project_Rate_Date_Tbl              => G_Project_Rate_Date_Tbl,
			   P_Project_Rate_Type_Tbl              => G_Project_Rate_Type_Tbl,
			   P_Project_Exchange_Rate_Tbl          => G_Project_Exchange_Rate_Tbl,
			   P_Orig_Exp_Txn_Reference1_Tbl        => G_Orig_Exp_Txn_Reference1_Tbl,
			   P_Orig_Exp_Txn_Reference2_Tbl        => G_Orig_Exp_Txn_Reference2_Tbl,
			   P_Orig_Exp_Txn_Reference3_Tbl        => G_Orig_Exp_Txn_Reference3_Tbl,
			   P_Orig_User_Exp_Txn_Ref_Tbl          => G_Orig_User_Exp_Txn_Ref_Tbl,
			   P_Vendor_Number_Tbl                  => G_Vendor_Number_Tbl,
			   P_Vendor_Id_Tbl                      => G_Vendor_Id_Tbl,
			   P_Override_To_Org_Name_Tbl           => G_Override_To_Org_Name_Tbl,
			   P_Override_To_Org_Id_Tbl             => G_Override_To_Org_Id_Tbl,
			   P_Reversed_Orig_Txn_Ref_Tbl          => G_Reversed_Orig_Txn_Ref_Tbl,
			   P_Billable_Flag_Tbl                  => G_Billable_Flag_Tbl,
			   P_ProjFunc_Currency_Code_Tbl         => G_ProjFunc_Currency_Code_Tbl,
			   P_ProjFunc_Cost_Rate_Date_Tbl        => G_ProjFunc_Cost_Rate_Date_Tbl,
			   P_ProjFunc_Cost_Rate_Type_Tbl        => G_ProjFunc_Cost_Rate_Type_Tbl,
			   P_ProjFunc_Cost_Exch_Rate_Tbl        => G_ProjFunc_Cost_Exch_Rate_Tbl,
			   P_Project_Raw_Cost_Tbl               => G_Project_Raw_Cost_Tbl,
			   P_Project_Burdened_Cost_Tbl          => G_Project_Burdened_Cost_Tbl,
			   P_Assignment_Name_Tbl                => G_Assignment_Name_Tbl,
			   P_Assignment_Id_Tbl                  => G_Assignment_Id_Tbl,
			   P_Work_Type_Name_Tbl                 => G_Work_Type_Name_Tbl,
			   P_Work_Type_Id_Tbl                   => G_Work_Type_Id_Tbl,
			   P_Cdl_System_Reference4_Tbl          => G_Cdl_System_Reference4_Tbl,
			   P_Accrual_Flag_Tbl                   => G_Accrual_Flag_Tbl,
			   P_Last_Update_Date_Tbl               => G_Last_Update_Date_Tbl,
			   P_Last_Updated_By_Tbl                => G_Last_Updated_By_Tbl,
			   P_Creation_Date_Tbl                  => G_Creation_Date_Tbl,
			   P_Created_By_Tbl                     => G_Created_By_Tbl,
			   P_PO_Number_Tbl			            => G_PO_Number_Tbl,
			   P_PO_Header_Id_Tbl			        => G_PO_Header_Id_Tbl,
			   P_PO_Line_Num_Tbl			        => G_PO_Line_Num_Tbl,
			   P_PO_Line_Id_Tbl                     => G_PO_Line_Id_Tbl,
			   P_PO_Price_Type_Tbl                  => G_PO_Price_Type_Tbl,
			   P_Person_Type_Tbl                    => G_Person_Type_Tbl,
			   P_Inventory_Item_Id_Tbl              => G_Inventory_Item_Id_Tbl,
			   P_WIP_Resource_Id_Tbl		        => G_WIP_Resource_Id_Tbl,
    		   P_Unit_Of_Measure_Tbl		        => G_Unit_Of_Measure_Tbl,
               P_Org_Id_Tbl                         => G_OU_Tbl,
               -- Bug 10253400.. 12.2 payroll intg .. start
               P_Job_Id_Tbl                         => G_Job_Id_Tbl,
               p_Job_Name_Tbl                       => G_Job_Name_Tbl,
               p_location_Code_tbl                  => G_Location_Code_Tbl,
               p_pay_element_Type_Id_tbl            => G_Pay_Element_Type_Id_Tbl,
               P_Location_Id_Tbl                    => G_Location_ID_Tbl
               -- Bug 10253400.. 12.2 payroll intg .. end
			   -- Start: Added for CBS Enhancement Bug 16220146
			   ,P_Cbs_Element_Id_Tbl                 => G_Cbs_Element_Id_Tbl
			   ,P_Cbs_Element_Name_Tbl               => G_Cbs_Element_Name_Tbl
			   -- End: Added for CBS Enhancement Bug 16220146
			   );
Line: 10192

	If P_Command in ( 'INSERT', 'RESET' ) Then

        G_Stage := 'Reset all pl/sql table arrays used for bulk insert.';
Line: 10197

             pa_cc_utils.log_message('BulkInsertReset: ' || Pa_Debug.G_Err_Stage,0);
Line: 10200

		G_Txn_Interface_Id_Tbl.Delete;
Line: 10201

		G_Transaction_Source_Tbl.Delete;
Line: 10202

		G_User_Transaction_Source_Tbl.Delete;
Line: 10203

		G_Batch_Name_Tbl.Delete;
Line: 10204

		G_Expenditure_End_Date_Tbl.Delete;
Line: 10205

		G_Person_Bus_Grp_Name_Tbl.Delete;
Line: 10206

		G_Person_Bus_Grp_Id_Tbl.Delete;
Line: 10207

		G_Employee_Number_Tbl.Delete;
Line: 10208

		G_Person_Id_Tbl.Delete;
Line: 10209

		G_Organization_Name_Tbl.Delete;
Line: 10210

		G_Organization_Id_Tbl.Delete;
Line: 10211

		G_Expenditure_Item_Date_Tbl.Delete;
Line: 10212

		G_Project_Number_Tbl.Delete;
Line: 10213

		G_Project_Id_Tbl.Delete;
Line: 10214

		G_Task_Number_Tbl.Delete;
Line: 10215

		G_Task_Id_Tbl.Delete;
Line: 10216

		G_Expenditure_Type_Tbl.Delete;
Line: 10217

		G_System_Linkage_Tbl.Delete;
Line: 10218

		G_Non_Labor_Resource_Tbl.Delete;
Line: 10219

		G_Non_Labor_Res_Org_Name_Tbl.Delete;
Line: 10220

		G_Non_Labor_Res_Org_Id_Tbl.Delete;
Line: 10221

		G_Quantity_Tbl.Delete;
Line: 10222

		G_Raw_Cost_Tbl.Delete;
Line: 10223

		G_Raw_Cost_Rate_Tbl.Delete;
Line: 10224

		G_Burden_Cost_Tbl.Delete;
Line: 10225

		G_Burden_Cost_Rate_Tbl.Delete;
Line: 10226

		G_Expenditure_Comment_Tbl.Delete;
Line: 10227

		G_Gl_Date_Tbl.Delete;
Line: 10228

		G_Transaction_Status_Code_Tbl.Delete;
Line: 10229

		G_Trans_Rejection_Code_Tbl.Delete;
Line: 10230

		G_Orig_Trans_Reference_Tbl.Delete;
Line: 10231

		G_Unmatched_Neg_Txn_Flag_Tbl.Delete;
Line: 10232

		G_Expenditure_Id_Tbl.Delete;
Line: 10233

		G_Attribute_Category_Tbl.Delete;
Line: 10234

		G_Attribute1_Tbl.Delete;
Line: 10235

		G_Attribute2_Tbl.Delete;
Line: 10236

		G_Attribute3_Tbl.Delete;
Line: 10237

		G_Attribute4_Tbl.Delete;
Line: 10238

		G_Attribute5_Tbl.Delete;
Line: 10239

		G_Attribute6_Tbl.Delete;
Line: 10240

		G_Attribute7_Tbl.Delete;
Line: 10241

		G_Attribute8_Tbl.Delete;
Line: 10242

		G_Attribute9_Tbl.Delete;
Line: 10243

		G_Attribute10_Tbl.Delete;
Line: 10244

		G_Dr_Code_Combination_Id_Tbl.Delete;
Line: 10245

		G_Cr_Code_Combination_Id_Tbl.Delete;
Line: 10246

		G_Cdl_System_Reference1_Tbl.Delete;
Line: 10247

		G_Cdl_System_Reference2_Tbl.Delete;
Line: 10248

		G_Cdl_System_Reference3_Tbl.Delete;
Line: 10249

		G_Interface_Id_Tbl.Delete;
Line: 10250

		G_Receipt_Currency_Amount_Tbl.Delete;
Line: 10251

		G_Receipt_Currency_Code_Tbl.Delete;
Line: 10252

		G_Receipt_Exchange_Rate_Tbl.Delete;
Line: 10253

		G_Denom_Currency_Code_Tbl.Delete;
Line: 10254

		G_Denom_Raw_Cost_Tbl.Delete;
Line: 10255

		G_Denom_Burdened_Cost_Tbl.Delete;
Line: 10256

		G_Acct_Rate_Date_Tbl.Delete;
Line: 10257

		G_Acct_Rate_Type_Tbl.Delete;
Line: 10258

		G_Acct_Exchange_Rate_Tbl.Delete;
Line: 10259

		G_Acct_Raw_Cost_Tbl.Delete;
Line: 10260

		G_Acct_Burdened_Cost_Tbl.Delete;
Line: 10261

		G_Acct_Exch_Rounding_Limit_Tbl.Delete;
Line: 10262

		G_Project_Currency_Code_Tbl.Delete;
Line: 10263

		G_Project_Rate_Date_Tbl.Delete;
Line: 10264

		G_Project_Rate_Type_Tbl.Delete;
Line: 10265

		G_Project_Exchange_Rate_Tbl.Delete;
Line: 10266

		G_Orig_Exp_Txn_Reference1_Tbl.Delete;
Line: 10267

		G_Orig_Exp_Txn_Reference2_Tbl.Delete;
Line: 10268

		G_Orig_Exp_Txn_Reference3_Tbl.Delete;
Line: 10269

		G_Orig_User_Exp_Txn_Ref_Tbl.Delete;
Line: 10270

		G_Vendor_Number_Tbl.Delete;
Line: 10271

		G_Vendor_Id_Tbl.Delete;
Line: 10272

		G_Override_To_Org_Name_Tbl.Delete;
Line: 10273

		G_Override_To_Org_Id_Tbl.Delete;
Line: 10274

		G_Reversed_Orig_Txn_Ref_Tbl.Delete;
Line: 10275

		G_Billable_Flag_Tbl.Delete;
Line: 10276

		G_ProjFunc_Currency_Code_Tbl.Delete;
Line: 10277

		G_ProjFunc_Cost_Rate_Date_Tbl.Delete;
Line: 10278

		G_ProjFunc_Cost_Rate_Type_Tbl.Delete;
Line: 10279

		G_ProjFunc_Cost_Exch_Rate_Tbl.Delete;
Line: 10280

		G_Project_Raw_Cost_Tbl.Delete;
Line: 10281

		G_Project_Burdened_Cost_Tbl.Delete;
Line: 10282

		G_Assignment_Name_Tbl.Delete;
Line: 10283

		G_Assignment_Id_Tbl.Delete;
Line: 10284

		G_Work_Type_Name_Tbl.Delete;
Line: 10285

		G_Work_Type_Id_Tbl.Delete;
Line: 10286

		G_Cdl_System_Reference4_Tbl.Delete;
Line: 10287

		G_Accrual_Flag_Tbl.Delete;
Line: 10288

		G_Last_Update_Date_Tbl.Delete;
Line: 10289

		G_Last_Updated_By_Tbl.Delete;
Line: 10290

		G_Creation_Date_Tbl.Delete;
Line: 10291

		G_Created_By_Tbl.Delete;
Line: 10293

		G_PO_Number_Tbl.Delete;
Line: 10294

		G_PO_Header_Id_Tbl.Delete;
Line: 10295

		G_PO_Line_Num_Tbl.Delete;
Line: 10296

		G_PO_Line_Id_Tbl.Delete;
Line: 10297

		G_PO_Price_Type_Tbl.Delete;
Line: 10298

		G_Person_Type_Tbl.Delete;
Line: 10300

		G_Inventory_Item_Id_Tbl.Delete;
Line: 10301

		G_WIP_Resource_Id_Tbl.Delete;
Line: 10302

    	G_Unit_Of_Measure_Tbl.Delete;
Line: 10304

        G_OU_Tbl.Delete;
Line: 10306

        G_Job_Id_Tbl.delete;
Line: 10307

        G_Location_Id_Tbl.delete;
Line: 10308

        G_Job_Name_Tbl.delete;
Line: 10309

        G_Location_Code_Tbl.delete;
Line: 10310

        G_Pay_Element_Type_Id_Tbl.delete;
Line: 10314

		G_Cbs_Element_Id_Tbl.delete;
Line: 10315

		G_Cbs_Element_Name_Tbl.delete;
Line: 10320

    G_Stage := 'Leaving BulkInsertReset(), strip procedure from trackpath.';
Line: 10323

         Pa_Cc_Utils.Log_Message('BulkInsertReset: ' || Pa_Debug.G_Err_Stage,0);
Line: 10325

    Pa_Otc_Api.TrackPath('STRIP','BulkInsertReset');
Line: 10331

  End BulkInsertReset;
Line: 10359

        If G_Trx_Inserted_Tab.Exists(P_Detail_BB_Id) Then

                Return ( 'Y' );
Line: 10434

	Select
		Decode(Current_Npw_Flag,'Y','CWK','EMP')
	Into
		X_Person_Type
	From
		Per_People_F
	Where
		P_Ei_Date between Effective_Start_Date
			      and Effective_End_Date
	And	Person_Id = P_Person_Id;
Line: 10485

		Select
			h.Vendor_Id,
			h.Po_Header_Id
		Into
			l_Vendor_Id,
			l_Po_Header_Id
		from
			PO_Headers_All h,
		     	PO_Lines_All l
		where
			l.po_line_Id = P_Po_Line_Id
		and	l.po_header_id = h.po_header_Id;