315: if(l_group_per_in_ler_id=-1) then
316: ben_batch_utils.write('Cannot process person');
317: end if;
318:
319: if(FND_MSG_PUB.COUNT_MSG()>0) then
320: raise ben_batch_utils.g_record_error;
321: end if;
322:
323: exception
324: when others then
325: rollback to fallback;
326: ben_batch_utils.write('Run Participation Process has failed to enroll person');
327:
328: --l_err := FND_MSG_PUB.GET_DETAIL(p_msg_index => FND_MSG_PUB.G_FIRST);
329: --l_err := replace(FND_MSG_PUB.GET_DETAIL(p_msg_index => FND_MSG_PUB.G_FIRST),chr(0),' ');
330: --l_appl := rtrim(substr(l_err,0,instr(l_err,' ')));
331: --l_err := rtrim(substr(ltrim(substr(l_err,instr(l_err,' '))),0,instr(ltrim(substr(l_err,instr(l_err,' '))),' ')));
332: --fnd_message.set_name (l_appl, l_err);
325: rollback to fallback;
326: ben_batch_utils.write('Run Participation Process has failed to enroll person');
327:
328: --l_err := FND_MSG_PUB.GET_DETAIL(p_msg_index => FND_MSG_PUB.G_FIRST);
329: --l_err := replace(FND_MSG_PUB.GET_DETAIL(p_msg_index => FND_MSG_PUB.G_FIRST),chr(0),' ');
330: --l_appl := rtrim(substr(l_err,0,instr(l_err,' ')));
331: --l_err := rtrim(substr(ltrim(substr(l_err,instr(l_err,' '))),0,instr(ltrim(substr(l_err,instr(l_err,' '))),' ')));
332: --fnd_message.set_name (l_appl, l_err);
333: /*
330: --l_appl := rtrim(substr(l_err,0,instr(l_err,' ')));
331: --l_err := rtrim(substr(ltrim(substr(l_err,instr(l_err,' '))),0,instr(ltrim(substr(l_err,instr(l_err,' '))),' ')));
332: --fnd_message.set_name (l_appl, l_err);
333: /*
334: FND_MESSAGE.Set_Encoded(FND_MSG_PUB.GET_DETAIL(p_msg_index => FND_MSG_PUB.G_FIRST));
335: */
336:
337: FOR i IN 1..FND_MSG_PUB.Count_Msg LOOP
338: if(i=1) then
333: /*
334: FND_MESSAGE.Set_Encoded(FND_MSG_PUB.GET_DETAIL(p_msg_index => FND_MSG_PUB.G_FIRST));
335: */
336:
337: FOR i IN 1..FND_MSG_PUB.Count_Msg LOOP
338: if(i=1) then
339: l_index := FND_MSG_PUB.G_FIRST;
340: else
341: l_index := FND_MSG_PUB.G_NEXT;
335: */
336:
337: FOR i IN 1..FND_MSG_PUB.Count_Msg LOOP
338: if(i=1) then
339: l_index := FND_MSG_PUB.G_FIRST;
340: else
341: l_index := FND_MSG_PUB.G_NEXT;
342: end if;
343: l_err := FND_MSG_PUB.GET_DETAIL(p_msg_index => l_index);
337: FOR i IN 1..FND_MSG_PUB.Count_Msg LOOP
338: if(i=1) then
339: l_index := FND_MSG_PUB.G_FIRST;
340: else
341: l_index := FND_MSG_PUB.G_NEXT;
342: end if;
343: l_err := FND_MSG_PUB.GET_DETAIL(p_msg_index => l_index);
344: insert into ben_transaction( transaction_id
345: ,transaction_type
339: l_index := FND_MSG_PUB.G_FIRST;
340: else
341: l_index := FND_MSG_PUB.G_NEXT;
342: end if;
343: l_err := FND_MSG_PUB.GET_DETAIL(p_msg_index => l_index);
344: insert into ben_transaction( transaction_id
345: ,transaction_type
346: ,status
347: ,attribute1
350: )
351: values( BEN_TRANSACTION_S.NEXTVAL
352: ,'EMPENROLL'||l_benefit_action_id
353: ,'E'
354: --,FND_MSG_PUB.GET_DETAIL(p_msg_index => l_index)
355: ,replace(l_err,chr(0),' ')
356: ,p_person_id
357: --l_loc
358: );
380: and attribute2 = req.ARGUMENT3;
381: l_errors varchar2(240);
382: l_message varchar2(240);
383: begin
384: fnd_msg_pub.initialize;
385: open c_errors(p_request_id);
386: loop
387: fetch c_errors into l_errors;
388: EXIT WHEN c_errors%NOTFOUND;
388: EXIT WHEN c_errors%NOTFOUND;
389:
390: l_message := replace(l_errors,' ',chr(0));
391: fnd_message.set_encoded(l_message);
392: FND_MSG_PUB.ADD;
393:
394: end loop;
395: close c_errors;
396: end;