255: and nvl(business_group_id, p_business_group_id) = p_business_group_id;
256:
257:
258: BEGIN
259: ---hr_utility.trace_on('Y', 'PREGEN');
260: g_use_pre_gen_suspense := FND_PROFILE.VALUE('PSP_USE_PREGEN_SUSPENSE'); -- Bug 2007521
261: FND_MSG_PUB.Initialize;
262: --dbms_output.PUT_LINE('................0');
263:
348: fetch autopop_config_cur into g_suspense_autopop, g_pregen_autopop;
349: close autopop_config_cur;
350:
351: if g_pregen_autopop ='Y' then --- changed to new option for 5080403
352: hr_utility.trace('Calling Autopop');
353: Autopop(
354: X_Batch_name => p_batch_name,
355: X_Set_of_Books_Id =>p_set_of_books_id,
356: X_Business_Group_ID =>p_business_group_id,
2008: raise FND_API.G_EXC_UNEXPECTED_ERROR;
2009: end if;
2010:
2011: elsif g_pregen_rec.project_id is not null then /* Bug fix 2985061 */
2012: hr_utility.trace('project_id is not null');
2013: -- elsif (NVL(g_pregen_rec.project_id,0) <> 0) then
2014:
2015: /********************************************************************************************************
2016:
2089: end if;
2090: end if;
2091: else
2092: -- Call Auto-Population for a new expenditure type.
2093: hr_utility.trace('Calling Autopop for Exp type');
2094: psp_autopop.main(p_acct_type => 'E',
2095: p_person_id => g_pregen_rec.person_id,
2096: p_assignment_id => g_pregen_rec.assignment_id,
2097: p_element_type_id => g_pregen_rec.element_type_id,