417: -- Insert the comment text if comments exist
418: --
419: If (p_rec.comments is not null and p_rec.comment_id is null) then
420: --
421: hr_comm_api.ins(p_comment_id => p_rec.comment_id
422: ,p_source_table_name => 'PAY_ALL_PAYROLLS_F'
423: ,p_comment_text => p_rec.comments
424: );
425: -- Update the comments if they have changed
426: ElsIf (p_rec.comment_id is not null and p_rec.comments <>
427: pay_pay_shd.g_old_rec.comments) then
428: --
429:
430: hr_comm_api.upd(p_comment_id => p_rec.comment_id
431: ,p_source_table_name => 'PAY_ALL_PAYROLLS_F'
432: ,p_comment_text => p_rec.comments
433: );
434:
443: -- when the comment_text is changed
444: -- so, whenever the comment_text is changed then we call this ins proc
445: -- to generate a new comment_id.
446: -- 5144323 / 5609830 starts
447: hr_comm_api.ins(p_comment_id => p_rec.comment_id
448: ,p_source_table_name => 'PAY_ALL_PAYROLLS_F'
449: ,p_comment_text => p_rec.comments
450: );
451: --5144323 / 5609830 ends