162: -- Used as a counter to bulk insert.
163: G_Txn_Rec_Count Number := Null;
164:
165: -- Handling unhandled exceptions
166: G_EXCEPT_CNT_ALLOWED Number := to_Number(Nvl(Fnd_Profile.Value('HXC_RETRIEVAL_MAX_ERRORS'),0));
167: G_Unhandled_Except_Cnt Number;
168:
169: G_BAD_OTL_DATA Exception;
170: HXC_RETRIEVAL_MAX_ERRORS Exception;
168:
169: G_BAD_OTL_DATA Exception;
170: HXC_RETRIEVAL_MAX_ERRORS Exception;
171:
172: G_Debug_Mode Varchar2(1) := Nvl(Fnd_Profile.Value('PA_DEBUG_MODE'), 'N');
173:
174: -- Begin PA.M/CWK changes
175: G_Po_Line_Id Number := Null;
176: G_Vendor_Id Number := Null;
1957: Is
1958:
1959: l_Exp_Item_Id Pa_Expenditure_Items_All.Expenditure_Item_Id%TYPE := Null;
1960: l_RowId RowId;
1961: l_Last_Update_Login Pa_Expenditure_Items_All.Last_Update_Login%TYPE := to_Number(Fnd_Profile.Value('LOGIN_ID'));
1962: --Added for bug 4105561
1963: x_request_id NUMBER(15);
1964: x_program_application_id NUMBER(15);
1965: x_program_id NUMBER(15);
5168: End If; -- l_UOM <> 'HOURS'
5169:
5170: G_Stage := 'Check for quantity being negative.';
5171: If l_Proj_Attrib_Rec.Quantity < 0 And
5172: Nvl(Fnd_Profile.Value('PA_SST_ALLOW_NEGATIVE_TXN'),'N') = 'N' Then
5173:
5174: -- If the quantity is less than 0 and the profile is set to not allow
5175: -- for negative transactions then raise error in error table.
5176: --
5955: P_Time_Attribute_Id => Null);
5956:
5957: End If;
5958:
5959: If Nvl(Fnd_Profile.Value('PA_SST_ENABLE_BUS_MSG'),'N') = 'Y' Then
5960:
5961: -- Business Message Call
5962: G_Stage := 'Calling Business Message API';
5963: Pa_Time_Client_Extn.Display_Business_Message(
6544: from per_jobs_v w
6545: where w.job_Id = P_job_Id
6546: and p_Exp_Item_Date between date_from and nvl(date_to, p_exp_item_date)
6547: and ((PA_CROSS_BUSINESS_GRP.IsCrossBGProfile = 'N' AND
6548: fnd_profile.value('PER_BUSINESS_GROUP_ID') = W.BUSINESS_GROUP_ID)
6549: OR
6550: PA_CROSS_BUSINESS_GRP.IsCrossBGProfile = 'Y');
6551:
6552: /* end bug 4766396 */
6928: Update Pa_Expenditure_Items_all --for Bug# 13519235
6929: Set
6930: Orig_Transaction_Reference = To_Char(P_BB_Id) || ':' || To_Char(l_Ovn_Check_Value),
6931: last_update_date = sysdate,
6932: last_updated_by = to_Number(Fnd_Profile.Value('USER_ID')),
6933: last_update_login = to_Number(Fnd_Profile.Value('LOGIN_ID'))
6934: Where
6935: RowId = l_RowId;
6936: /*Start-Changes for Bug:7604482 */
6929: Set
6930: Orig_Transaction_Reference = To_Char(P_BB_Id) || ':' || To_Char(l_Ovn_Check_Value),
6931: last_update_date = sysdate,
6932: last_updated_by = to_Number(Fnd_Profile.Value('USER_ID')),
6933: last_update_login = to_Number(Fnd_Profile.Value('LOGIN_ID'))
6934: Where
6935: RowId = l_RowId;
6936: /*Start-Changes for Bug:7604482 */
6937: -- Bug 10253400.. 12.2 payroll intg .. include the job, location and pay element
8428:
8429: G_Stage := 'Check Multi Org';
8430: If Pa_Utils.Pa_Morg_Implemented = 'Y' Then
8431:
8432: l_Org_Id := Fnd_Profile.Value('ORG_ID');
8433:
8434: End If;
8435:
8436: -- Insert Timecard Scope record
8856: -- R12 change
8857: -- This section of code is conditionally getting the override approver person id if the
8858: -- overriding approver flag is set to Yes and AutoApproval is set to No. This is not
8859: -- correct. We need only be concerned about the autoapproval flag.
8860: -- If Nvl(Fnd_Profile.Value('PA_ONLINE_OVERRIDE_APPROVER'),'N') = 'Y' Then
8861: If Nvl(Fnd_Profile.Value('PA_PTE_AUTOAPPROVE_TS'),'N') = 'N' Then
8862:
8863: /* This variable is being used in the summary validate and
8864: * business message section of the procedure.
8857: -- This section of code is conditionally getting the override approver person id if the
8858: -- overriding approver flag is set to Yes and AutoApproval is set to No. This is not
8859: -- correct. We need only be concerned about the autoapproval flag.
8860: -- If Nvl(Fnd_Profile.Value('PA_ONLINE_OVERRIDE_APPROVER'),'N') = 'Y' Then
8861: If Nvl(Fnd_Profile.Value('PA_PTE_AUTOAPPROVE_TS'),'N') = 'N' Then
8862:
8863: /* This variable is being used in the summary validate and
8864: * business message section of the procedure.
8865: */
9069:
9070: /* If the AutoApproval flag is Yes then there is no reason to get the business message for this
9071: * timecard.
9072: */
9073: If X_AutoApproval_Flag = 'N' and Nvl(Fnd_Profile.Value('PA_SST_ENABLE_BUS_MSG'),'N') = 'Y' Then
9074:
9075: G_Stage := 'Calling Pa_Time_Client_Extn.Display_Business_Message()';
9076: Pa_Time_Client_Extn.Display_Business_Message(
9077: P_Timecard_Table => l_Timecard_Table,
9330: */
9331: -- Bug 2773066
9332: -- We don't need to check if the profile is set at this point.
9333: -- If the overriding approver is populated then use it when appropriate.
9334: -- If Nvl(Fnd_Profile.Value('PA_ONLINE_OVERRIDE_APPROVER'),'N') = 'Y' And
9335: If l_Overriding_Approver_Id Is Not Null And
9336: P_Previous_Approver_Id Is Null Then
9337:
9338: X_Approver_Person_Id := l_Overriding_Approver_Id;
9471: G_Stage := 'Check if overriding approver exists when the scope is TIMECARD.';
9472: -- Bug 2773066
9473: -- We don't need to check the overriding approver profile.
9474: -- If it is populated then it should be picked up and used when and if needed.
9475: -- If Nvl(Fnd_Profile.Value('PA_ONLINE_OVERRIDE_APPROVER'),'N') = 'Y' And
9476: If l_Time_Building_Blocks(i).Scope = 'TIMECARD' Then
9477:
9478: G_Stage := 'Now loop thru and attribution records for the TIMECARD scope building block.';
9479: <