593: l_history_flag BOOLEAN;
594: l_range_name VARCHAR2(80);
595: l_proc varchar2(61) := 'app_next_user';
596: BEGIN
597: hr_utility.set_location('inside'||l_proc,10);
598: pqh_workflow.applicable_next_user
599: (p_trans_id => p_trans_id
600: ,p_tran_cat_id => p_tran_cat_id
601: ,p_cur_user_id => p_cur_user_id
628: ,p_status_flag => p_status_flag
629: ,p_history_flag => l_history_flag
630: ,p_range_name => l_range_name
631: ,p_can_approve => l_can_approve);
632: hr_utility.set_location('status returned is'||p_status_flag,20);
633: if nvl(p_status_flag,0) <> 0 then
634: hr_utility.set_location('error returned',25);
635: else
636: hr_utility.set_location('got the next user ',30);
630: ,p_range_name => l_range_name
631: ,p_can_approve => l_can_approve);
632: hr_utility.set_location('status returned is'||p_status_flag,20);
633: if nvl(p_status_flag,0) <> 0 then
634: hr_utility.set_location('error returned',25);
635: else
636: hr_utility.set_location('got the next user ',30);
637: if(l_can_approve) then
638: p_can_approve:=0;
632: hr_utility.set_location('status returned is'||p_status_flag,20);
633: if nvl(p_status_flag,0) <> 0 then
634: hr_utility.set_location('error returned',25);
635: else
636: hr_utility.set_location('got the next user ',30);
637: if(l_can_approve) then
638: p_can_approve:=0;
639: hr_utility.set_location('approver yes ',35);
640: else
635: else
636: hr_utility.set_location('got the next user ',30);
637: if(l_can_approve) then
638: p_can_approve:=0;
639: hr_utility.set_location('approver yes ',35);
640: else
641: p_can_approve:=1;
642: hr_utility.set_location('approver no',40);
643: end if;
638: p_can_approve:=0;
639: hr_utility.set_location('approver yes ',35);
640: else
641: p_can_approve:=1;
642: hr_utility.set_location('approver no',40);
643: end if;
644: hr_utility.set_location('getting user name',50);
645: hr_utility.set_location('member_cd is '||p_member_cd,60);
646: hr_utility.set_location('position_id is '||p_position_id,62);
640: else
641: p_can_approve:=1;
642: hr_utility.set_location('approver no',40);
643: end if;
644: hr_utility.set_location('getting user name',50);
645: hr_utility.set_location('member_cd is '||p_member_cd,60);
646: hr_utility.set_location('position_id is '||p_position_id,62);
647: hr_utility.set_location('assignment_id is '||p_assignment_id,64);
648: hr_utility.set_location('user_id is '||p_member_user_id,66);
641: p_can_approve:=1;
642: hr_utility.set_location('approver no',40);
643: end if;
644: hr_utility.set_location('getting user name',50);
645: hr_utility.set_location('member_cd is '||p_member_cd,60);
646: hr_utility.set_location('position_id is '||p_position_id,62);
647: hr_utility.set_location('assignment_id is '||p_assignment_id,64);
648: hr_utility.set_location('user_id is '||p_member_user_id,66);
649: hr_utility.set_location('role_id is '||p_member_role_id,68);
642: hr_utility.set_location('approver no',40);
643: end if;
644: hr_utility.set_location('getting user name',50);
645: hr_utility.set_location('member_cd is '||p_member_cd,60);
646: hr_utility.set_location('position_id is '||p_position_id,62);
647: hr_utility.set_location('assignment_id is '||p_assignment_id,64);
648: hr_utility.set_location('user_id is '||p_member_user_id,66);
649: hr_utility.set_location('role_id is '||p_member_role_id,68);
650: FND_NEXT_USER(p_member_cd => p_member_cd,
643: end if;
644: hr_utility.set_location('getting user name',50);
645: hr_utility.set_location('member_cd is '||p_member_cd,60);
646: hr_utility.set_location('position_id is '||p_position_id,62);
647: hr_utility.set_location('assignment_id is '||p_assignment_id,64);
648: hr_utility.set_location('user_id is '||p_member_user_id,66);
649: hr_utility.set_location('role_id is '||p_member_role_id,68);
650: FND_NEXT_USER(p_member_cd => p_member_cd,
651: p_position_id => p_position_id,
644: hr_utility.set_location('getting user name',50);
645: hr_utility.set_location('member_cd is '||p_member_cd,60);
646: hr_utility.set_location('position_id is '||p_position_id,62);
647: hr_utility.set_location('assignment_id is '||p_assignment_id,64);
648: hr_utility.set_location('user_id is '||p_member_user_id,66);
649: hr_utility.set_location('role_id is '||p_member_role_id,68);
650: FND_NEXT_USER(p_member_cd => p_member_cd,
651: p_position_id => p_position_id,
652: p_assignment_id => p_assignment_id,
645: hr_utility.set_location('member_cd is '||p_member_cd,60);
646: hr_utility.set_location('position_id is '||p_position_id,62);
647: hr_utility.set_location('assignment_id is '||p_assignment_id,64);
648: hr_utility.set_location('user_id is '||p_member_user_id,66);
649: hr_utility.set_location('role_id is '||p_member_role_id,68);
650: FND_NEXT_USER(p_member_cd => p_member_cd,
651: p_position_id => p_position_id,
652: p_assignment_id => p_assignment_id,
653: p_member_role_id => p_member_role_id,
653: p_member_role_id => p_member_role_id,
654: p_member_user_id => p_member_user_id,
655: p_next_name_display => p_next_user_display,
656: p_next_name => p_next_user);
657: hr_utility.set_location('user_name is '||p_next_user,70);
658: hr_utility.set_location('display_name is '||p_next_user_display,75);
659: end if;
660: END APP_NEXT_USER;
661:
654: p_member_user_id => p_member_user_id,
655: p_next_name_display => p_next_user_display,
656: p_next_name => p_next_user);
657: hr_utility.set_location('user_name is '||p_next_user,70);
658: hr_utility.set_location('display_name is '||p_next_user_display,75);
659: end if;
660: END APP_NEXT_USER;
661:
662: procedure get_next_user(p_member_cd in pqh_transaction_categories.member_cd%type,
692: p_next_role_id => p_next_role_id,
693: p_next_user_id => p_next_user_id,
694: p_next_assignment_id => p_next_assignment_id,
695: p_status_flag => p_status_flag);
696: hr_utility.set_location('getting user name',50);
697: hr_utility.set_location('member_cd is '||p_member_cd,60);
698: hr_utility.set_location('position_id is '||p_next_position_id,62);
699: hr_utility.set_location('assignment_id is '||p_next_assignment_id,64);
700: hr_utility.set_location('user_id is '||p_next_user_id,66);
693: p_next_user_id => p_next_user_id,
694: p_next_assignment_id => p_next_assignment_id,
695: p_status_flag => p_status_flag);
696: hr_utility.set_location('getting user name',50);
697: hr_utility.set_location('member_cd is '||p_member_cd,60);
698: hr_utility.set_location('position_id is '||p_next_position_id,62);
699: hr_utility.set_location('assignment_id is '||p_next_assignment_id,64);
700: hr_utility.set_location('user_id is '||p_next_user_id,66);
701: hr_utility.set_location('role_id is '||p_next_role_id,68);
694: p_next_assignment_id => p_next_assignment_id,
695: p_status_flag => p_status_flag);
696: hr_utility.set_location('getting user name',50);
697: hr_utility.set_location('member_cd is '||p_member_cd,60);
698: hr_utility.set_location('position_id is '||p_next_position_id,62);
699: hr_utility.set_location('assignment_id is '||p_next_assignment_id,64);
700: hr_utility.set_location('user_id is '||p_next_user_id,66);
701: hr_utility.set_location('role_id is '||p_next_role_id,68);
702: FND_NEXT_USER(p_member_cd => p_member_cd,
695: p_status_flag => p_status_flag);
696: hr_utility.set_location('getting user name',50);
697: hr_utility.set_location('member_cd is '||p_member_cd,60);
698: hr_utility.set_location('position_id is '||p_next_position_id,62);
699: hr_utility.set_location('assignment_id is '||p_next_assignment_id,64);
700: hr_utility.set_location('user_id is '||p_next_user_id,66);
701: hr_utility.set_location('role_id is '||p_next_role_id,68);
702: FND_NEXT_USER(p_member_cd => p_member_cd,
703: p_position_id => p_next_position_id,
696: hr_utility.set_location('getting user name',50);
697: hr_utility.set_location('member_cd is '||p_member_cd,60);
698: hr_utility.set_location('position_id is '||p_next_position_id,62);
699: hr_utility.set_location('assignment_id is '||p_next_assignment_id,64);
700: hr_utility.set_location('user_id is '||p_next_user_id,66);
701: hr_utility.set_location('role_id is '||p_next_role_id,68);
702: FND_NEXT_USER(p_member_cd => p_member_cd,
703: p_position_id => p_next_position_id,
704: p_assignment_id => p_next_assignment_id,
697: hr_utility.set_location('member_cd is '||p_member_cd,60);
698: hr_utility.set_location('position_id is '||p_next_position_id,62);
699: hr_utility.set_location('assignment_id is '||p_next_assignment_id,64);
700: hr_utility.set_location('user_id is '||p_next_user_id,66);
701: hr_utility.set_location('role_id is '||p_next_role_id,68);
702: FND_NEXT_USER(p_member_cd => p_member_cd,
703: p_position_id => p_next_position_id,
704: p_assignment_id => p_next_assignment_id,
705: p_member_role_id => p_next_role_id,
705: p_member_role_id => p_next_role_id,
706: p_member_user_id => p_next_user_id,
707: p_next_name_display => p_next_user_display,
708: p_next_name => p_next_user);
709: hr_utility.set_location('user_name is '||p_next_user,70);
710: end get_next_user;
711:
712: PROCEDURE FND_NEXT_USER(p_member_cd IN pqh_transaction_categories.member_cd%type,
713: p_position_id IN pqh_position_transactions.position_id%type,
724: select user_name
725: into p_next_name
726: from fnd_user
727: where user_id=p_member_user_id;
728: hr_utility.set_location('user_name is '||p_next_name,10);
729: l_next_name := hr_general.decode_lookup(p_lookup_type => 'PQH_BPR_ROUTING',
730: p_lookup_code => 'USER');
731: hr_utility.set_location('prefix is '||l_next_name,20);
732: p_next_name_display := l_next_name ||':'||p_next_name ;
727: where user_id=p_member_user_id;
728: hr_utility.set_location('user_name is '||p_next_name,10);
729: l_next_name := hr_general.decode_lookup(p_lookup_type => 'PQH_BPR_ROUTING',
730: p_lookup_code => 'USER');
731: hr_utility.set_location('prefix is '||l_next_name,20);
732: p_next_name_display := l_next_name ||':'||p_next_name ;
733: hr_utility.set_location('name is '||p_next_name_display,30);
734: ELSIF p_member_role_id is not null then
735: select role_name
729: l_next_name := hr_general.decode_lookup(p_lookup_type => 'PQH_BPR_ROUTING',
730: p_lookup_code => 'USER');
731: hr_utility.set_location('prefix is '||l_next_name,20);
732: p_next_name_display := l_next_name ||':'||p_next_name ;
733: hr_utility.set_location('name is '||p_next_name_display,30);
734: ELSIF p_member_role_id is not null then
735: select role_name
736: into p_next_name
737: from pqh_roles
735: select role_name
736: into p_next_name
737: from pqh_roles
738: where role_id= p_member_role_id;
739: hr_utility.set_location('user_name is '||p_next_name,40);
740: l_next_name := hr_general.decode_lookup(p_lookup_type => 'PQH_BPR_ROUTING',
741: p_lookup_code => 'ROLE');
742: hr_utility.set_location('prefix is '||l_next_name,50);
743: p_next_name_display := l_next_name ||':'||p_next_name ;
738: where role_id= p_member_role_id;
739: hr_utility.set_location('user_name is '||p_next_name,40);
740: l_next_name := hr_general.decode_lookup(p_lookup_type => 'PQH_BPR_ROUTING',
741: p_lookup_code => 'ROLE');
742: hr_utility.set_location('prefix is '||l_next_name,50);
743: p_next_name_display := l_next_name ||':'||p_next_name ;
744: p_next_name := 'PQH_ROLE:'||p_member_role_id;
745: hr_utility.set_location('name is '||p_next_name_display,60);
746: else
741: p_lookup_code => 'ROLE');
742: hr_utility.set_location('prefix is '||l_next_name,50);
743: p_next_name_display := l_next_name ||':'||p_next_name ;
744: p_next_name := 'PQH_ROLE:'||p_member_role_id;
745: hr_utility.set_location('name is '||p_next_name_display,60);
746: else
747: hr_utility.set_location('member_cd R but null values',70);
748: p_next_name := null;
749: p_next_name_display := null;
743: p_next_name_display := l_next_name ||':'||p_next_name ;
744: p_next_name := 'PQH_ROLE:'||p_member_role_id;
745: hr_utility.set_location('name is '||p_next_name_display,60);
746: else
747: hr_utility.set_location('member_cd R but null values',70);
748: p_next_name := null;
749: p_next_name_display := null;
750: END IF;
751: ELSIF (p_member_cd = 'P') THEN
750: END IF;
751: ELSIF (p_member_cd = 'P') THEN
752: select hr_general.DECODE_POSITION_LATEST_NAME (p_position_id)
753: into p_next_name from dual;
754: hr_utility.set_location('user_name is '||p_next_name,80);
755: l_next_name := hr_general.decode_lookup(p_lookup_type => 'PQH_BPR_ROUTING',
756: p_lookup_code => 'POSITION');
757: hr_utility.set_location('prefix is '||l_next_name,90);
758: p_next_name_display := l_next_name ||':'||p_next_name ;
753: into p_next_name from dual;
754: hr_utility.set_location('user_name is '||p_next_name,80);
755: l_next_name := hr_general.decode_lookup(p_lookup_type => 'PQH_BPR_ROUTING',
756: p_lookup_code => 'POSITION');
757: hr_utility.set_location('prefix is '||l_next_name,90);
758: p_next_name_display := l_next_name ||':'||p_next_name ;
759: p_next_name := 'POS:'||p_position_id;
760: hr_utility.set_location('name is '||p_next_name_display,100);
761: ELSIF (p_member_cd = 'S') THEN
756: p_lookup_code => 'POSITION');
757: hr_utility.set_location('prefix is '||l_next_name,90);
758: p_next_name_display := l_next_name ||':'||p_next_name ;
759: p_next_name := 'POS:'||p_position_id;
760: hr_utility.set_location('name is '||p_next_name_display,100);
761: ELSIF (p_member_cd = 'S') THEN
762: select person_id into l_person_id
763: from per_assignments
764: where assignment_id = p_assignment_id;
761: ELSIF (p_member_cd = 'S') THEN
762: select person_id into l_person_id
763: from per_assignments
764: where assignment_id = p_assignment_id;
765: hr_utility.set_location('person_id is '||l_person_id,110);
766: select user_name
767: into p_next_name
768: from fnd_user
769: where employee_id=l_person_id;
766: select user_name
767: into p_next_name
768: from fnd_user
769: where employee_id=l_person_id;
770: hr_utility.set_location('user_name is '||p_next_name,120);
771: l_next_name := hr_general.decode_lookup(p_lookup_type => 'PQH_BPR_ROUTING',
772: p_lookup_code => 'USER');
773: hr_utility.set_location('prefix is '||l_next_name,130);
774: p_next_name_display := l_next_name ||':'||p_next_name ;
769: where employee_id=l_person_id;
770: hr_utility.set_location('user_name is '||p_next_name,120);
771: l_next_name := hr_general.decode_lookup(p_lookup_type => 'PQH_BPR_ROUTING',
772: p_lookup_code => 'USER');
773: hr_utility.set_location('prefix is '||l_next_name,130);
774: p_next_name_display := l_next_name ||':'||p_next_name ;
775: hr_utility.set_location('name is '||p_next_name_display,140);
776: ELSE
777: hr_utility.set_location('invalid member_cd',150);
771: l_next_name := hr_general.decode_lookup(p_lookup_type => 'PQH_BPR_ROUTING',
772: p_lookup_code => 'USER');
773: hr_utility.set_location('prefix is '||l_next_name,130);
774: p_next_name_display := l_next_name ||':'||p_next_name ;
775: hr_utility.set_location('name is '||p_next_name_display,140);
776: ELSE
777: hr_utility.set_location('invalid member_cd',150);
778: p_next_name := null;
779: p_next_name_display := null;
773: hr_utility.set_location('prefix is '||l_next_name,130);
774: p_next_name_display := l_next_name ||':'||p_next_name ;
775: hr_utility.set_location('name is '||p_next_name_display,140);
776: ELSE
777: hr_utility.set_location('invalid member_cd',150);
778: p_next_name := null;
779: p_next_name_display := null;
780: END IF;
781: EXCEPTION
779: p_next_name_display := null;
780: END IF;
781: EXCEPTION
782: WHEN OTHERS THEN
783: hr_utility.set_location('data issues',420);
784: p_next_name := null;
785: p_next_name_display := null;
786: END FND_NEXT_USER;
787:
804: FROM pqh_budget_pools
805: WHERE pool_id = p_transaction_id;
806: l_pool_rec csr_pool_dtls%ROWTYPE;
807: BEGIN
808: hr_utility.set_location('Entering '||l_proc,10);
809: --calling routine for enabling multi-message detection --kgowripe
810: hr_multi_message.enable_message_list;
811: --
812: OPEN csr_pool_dtls;
814: CLOSE csr_pool_dtls;
815: -- Added by krmahade for Bug#3036405
816: l_transaction_category_id := l_pool_rec.wf_transaction_category_id;
817: -- End krmahade
818: hr_utility.set_location('txn_cat is '||l_transaction_category_id||l_proc,12);
819: --Before Applying a Budget Reallocation Transaction, apply all the Business Rules
820: pqh_cbr_engine.apply_rules(p_transaction_type => 'REALLOCATION'
821: ,p_transaction_id => p_transaction_id
822: ,p_business_group_id => l_pool_rec.business_group_id
821: ,p_transaction_id => p_transaction_id
822: ,p_business_group_id => l_pool_rec.business_group_id
823: ,p_effective_date => hr_general.effective_date
824: ,p_status_flag => l_status);
825: hr_utility.set_location('status returned is '||l_status||l_proc,20);
826:
827: IF NVL(l_status,'S') <> 'E'and p_validate_only = 'NO' THEN
828: hr_utility.set_location('for folder approval '||l_proc,22);
829: pqh_budget_pools_api.update_reallocation_folder(p_effective_date=> hr_general.effective_date
824: ,p_status_flag => l_status);
825: hr_utility.set_location('status returned is '||l_status||l_proc,20);
826:
827: IF NVL(l_status,'S') <> 'E'and p_validate_only = 'NO' THEN
828: hr_utility.set_location('for folder approval '||l_proc,22);
829: pqh_budget_pools_api.update_reallocation_folder(p_effective_date=> hr_general.effective_date
830: ,p_folder_id => p_transaction_id
831: ,p_object_version_number=>l_pool_rec.object_version_number
832: ,p_business_group_id => l_pool_rec.business_group_id
831: ,p_object_version_number=>l_pool_rec.object_version_number
832: ,p_business_group_id => l_pool_rec.business_group_id
833: ,p_approval_status=> 'A'
834: ,p_wf_transaction_category_id => l_pool_rec.wf_transaction_category_id );
835: hr_utility.set_location('folder approved '||l_proc,26);
836: ELSIF l_status = 'E' THEN
837: hr_utility.set_location('error encountered '||l_proc,28);
838: l_return := 'FAILURE';
839: fnd_message.set_name(8302,'PQH_CBR_FAILED_ERROR');
833: ,p_approval_status=> 'A'
834: ,p_wf_transaction_category_id => l_pool_rec.wf_transaction_category_id );
835: hr_utility.set_location('folder approved '||l_proc,26);
836: ELSIF l_status = 'E' THEN
837: hr_utility.set_location('error encountered '||l_proc,28);
838: l_return := 'FAILURE';
839: fnd_message.set_name(8302,'PQH_CBR_FAILED_ERROR');
840: fnd_message.raise_error;
841: END IF;
841: END IF;
842: -- Addd by KGOWRIPE for fixing bug# 2896852
843: IF NVL(l_status,'S') = 'W' THEN
844: l_return := 'WARNING';
845: hr_utility.set_location('Warning at '||l_proc,29);
846: /* commented by mvankada for fixing the bug : 293577
847:
848: pqh_wf.set_apply_error(p_transaction_category_id => l_transaction_category_id,
849: p_transaction_id => p_transaction_id,
854: ELSE
855: l_return := 'SUCCESS';
856: END IF;
857: -- end fix for 2896852
858: hr_utility.set_location('Leaving '||l_proc,30);
859: --
860: RETURN l_return;
861: Exception
862: --added by kgowripe
865:
866: When Others THEN
867:
868: IF SQLERRM IS NOT NULL THEN
869: hr_utility.set_location('setting wf error '||l_proc,40);
870: pqh_wf.set_apply_error(p_transaction_category_id => l_transaction_category_id,
871: p_transaction_id => p_transaction_id,
872: p_apply_error_mesg => SQLERRM,
873: p_apply_error_num => SQLCODE);
873: p_apply_error_num => SQLCODE);
874: l_return := 'FAILURE';
875: END IF;
876: --
877: hr_utility.set_location('Leaving '||l_proc,30);
878: return l_return;
879: --
880: End apply_transaction;
881:
927: hr_general.decode_lookup('PQH_REALLOC_TXN_STATUS',approval_status)
928: from pqh_budget_pools
929: where pool_id = p_transaction_id;
930: BEGIN
931: hr_utility.set_location('inside respond notification'||l_proc,10);
932: open csr_pool_dtls;
933: fetch csr_pool_dtls into l_folder_name,l_entity_desc,l_unit,l_transaction_status;
934: close csr_pool_dtls;
935: hr_utility.set_location('pool dtls fetched '||l_proc,20);
931: hr_utility.set_location('inside respond notification'||l_proc,10);
932: open csr_pool_dtls;
933: fetch csr_pool_dtls into l_folder_name,l_entity_desc,l_unit,l_transaction_status;
934: close csr_pool_dtls;
935: hr_utility.set_location('pool dtls fetched '||l_proc,20);
936: --
937: hr_utility.set_message(8302,'PQH_BPL_WF_RESPOND_NOTICE');
938: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
939: hr_utility.set_message_token('ENTITY',l_entity_desc);
933: fetch csr_pool_dtls into l_folder_name,l_entity_desc,l_unit,l_transaction_status;
934: close csr_pool_dtls;
935: hr_utility.set_location('pool dtls fetched '||l_proc,20);
936: --
937: hr_utility.set_message(8302,'PQH_BPL_WF_RESPOND_NOTICE');
938: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
939: hr_utility.set_message_token('ENTITY',l_entity_desc);
940: hr_utility.set_message_token('UNIT',l_unit);
941: hr_utility.set_message_token('TRANSACTION_STATUS',l_transaction_status);
934: close csr_pool_dtls;
935: hr_utility.set_location('pool dtls fetched '||l_proc,20);
936: --
937: hr_utility.set_message(8302,'PQH_BPL_WF_RESPOND_NOTICE');
938: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
939: hr_utility.set_message_token('ENTITY',l_entity_desc);
940: hr_utility.set_message_token('UNIT',l_unit);
941: hr_utility.set_message_token('TRANSACTION_STATUS',l_transaction_status);
942: l_document := hr_utility.get_message;
935: hr_utility.set_location('pool dtls fetched '||l_proc,20);
936: --
937: hr_utility.set_message(8302,'PQH_BPL_WF_RESPOND_NOTICE');
938: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
939: hr_utility.set_message_token('ENTITY',l_entity_desc);
940: hr_utility.set_message_token('UNIT',l_unit);
941: hr_utility.set_message_token('TRANSACTION_STATUS',l_transaction_status);
942: l_document := hr_utility.get_message;
943: return l_document;
936: --
937: hr_utility.set_message(8302,'PQH_BPL_WF_RESPOND_NOTICE');
938: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
939: hr_utility.set_message_token('ENTITY',l_entity_desc);
940: hr_utility.set_message_token('UNIT',l_unit);
941: hr_utility.set_message_token('TRANSACTION_STATUS',l_transaction_status);
942: l_document := hr_utility.get_message;
943: return l_document;
944: exception
937: hr_utility.set_message(8302,'PQH_BPL_WF_RESPOND_NOTICE');
938: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
939: hr_utility.set_message_token('ENTITY',l_entity_desc);
940: hr_utility.set_message_token('UNIT',l_unit);
941: hr_utility.set_message_token('TRANSACTION_STATUS',l_transaction_status);
942: l_document := hr_utility.get_message;
943: return l_document;
944: exception
945: when others then
938: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
939: hr_utility.set_message_token('ENTITY',l_entity_desc);
940: hr_utility.set_message_token('UNIT',l_unit);
941: hr_utility.set_message_token('TRANSACTION_STATUS',l_transaction_status);
942: l_document := hr_utility.get_message;
943: return l_document;
944: exception
945: when others then
946: hr_utility.set_message(8302,'PQH_BPL_WF_RESPOND_FAIL');
942: l_document := hr_utility.get_message;
943: return l_document;
944: exception
945: when others then
946: hr_utility.set_message(8302,'PQH_BPL_WF_RESPOND_FAIL');
947: hr_utility.set_message_token('TRANSACTION_ID',p_transaction_id);
948: l_document := hr_utility.get_message;
949: return l_document;
950: END respond_notification;
943: return l_document;
944: exception
945: when others then
946: hr_utility.set_message(8302,'PQH_BPL_WF_RESPOND_FAIL');
947: hr_utility.set_message_token('TRANSACTION_ID',p_transaction_id);
948: l_document := hr_utility.get_message;
949: return l_document;
950: END respond_notification;
951:
944: exception
945: when others then
946: hr_utility.set_message(8302,'PQH_BPL_WF_RESPOND_FAIL');
947: hr_utility.set_message_token('TRANSACTION_ID',p_transaction_id);
948: l_document := hr_utility.get_message;
949: return l_document;
950: END respond_notification;
951:
952: FUNCTION url_builder(p_transaction_id in number) Return VARCHAR2 IS
958: WHERE pool_id = p_transaction_id;
959: l_business_group_id Number(15);
960: l_proc varchar2(80) := g_package||'url_builder';
961: BEGIN
962: hr_utility.set_location('Entering '||l_proc,10);
963: OPEN csr_folder_status;
964: FETCH csr_folder_status INTO l_business_group_id,l_status;
965: CLOSE csr_folder_status;
966: l_url := 'JSP:/OA_HTML/OA.jsp?page=/oracle/apps/pqh/budgetreallocation/webui/BprReallocPG'||'&'||'retainAM=Y'||'&'||'P_FolderId='||p_transaction_id||'&'||'fromNotify=Y'||'&'||'approvalStatusFlag='||l_status||'&'||'P_BGId='||l_business_group_id;
963: OPEN csr_folder_status;
964: FETCH csr_folder_status INTO l_business_group_id,l_status;
965: CLOSE csr_folder_status;
966: l_url := 'JSP:/OA_HTML/OA.jsp?page=/oracle/apps/pqh/budgetreallocation/webui/BprReallocPG'||'&'||'retainAM=Y'||'&'||'P_FolderId='||p_transaction_id||'&'||'fromNotify=Y'||'&'||'approvalStatusFlag='||l_status||'&'||'P_BGId='||l_business_group_id;
967: hr_utility.set_location('URL '||substr(l_url,1,50),15);
968: hr_utility.set_location('URL2 '||substr(l_url,51,100),15);
969: hr_utility.set_location('Leaving '||l_proc,20);
970: RETURN l_url;
971: END url_builder;
964: FETCH csr_folder_status INTO l_business_group_id,l_status;
965: CLOSE csr_folder_status;
966: l_url := 'JSP:/OA_HTML/OA.jsp?page=/oracle/apps/pqh/budgetreallocation/webui/BprReallocPG'||'&'||'retainAM=Y'||'&'||'P_FolderId='||p_transaction_id||'&'||'fromNotify=Y'||'&'||'approvalStatusFlag='||l_status||'&'||'P_BGId='||l_business_group_id;
967: hr_utility.set_location('URL '||substr(l_url,1,50),15);
968: hr_utility.set_location('URL2 '||substr(l_url,51,100),15);
969: hr_utility.set_location('Leaving '||l_proc,20);
970: RETURN l_url;
971: END url_builder;
972: FUNCTION warning_notification (p_transaction_id in number) RETURN varchar2
965: CLOSE csr_folder_status;
966: l_url := 'JSP:/OA_HTML/OA.jsp?page=/oracle/apps/pqh/budgetreallocation/webui/BprReallocPG'||'&'||'retainAM=Y'||'&'||'P_FolderId='||p_transaction_id||'&'||'fromNotify=Y'||'&'||'approvalStatusFlag='||l_status||'&'||'P_BGId='||l_business_group_id;
967: hr_utility.set_location('URL '||substr(l_url,1,50),15);
968: hr_utility.set_location('URL2 '||substr(l_url,51,100),15);
969: hr_utility.set_location('Leaving '||l_proc,20);
970: RETURN l_url;
971: END url_builder;
972: FUNCTION warning_notification (p_transaction_id in number) RETURN varchar2
973: is
983: hr_general.decode_lookup('PQH_REALLOC_TXN_STATUS',approval_status)
984: from pqh_budget_pools
985: where pool_id = p_transaction_id;
986: BEGIN
987: hr_utility.set_location('inside warning notification'||l_proc,10);
988: open csr_pool_dtls;
989: fetch csr_pool_dtls into l_folder_name,l_entity_desc,l_unit,l_transaction_status;
990: close csr_pool_dtls;
991: hr_utility.set_location('pool dtls fetched '||l_proc,20);
987: hr_utility.set_location('inside warning notification'||l_proc,10);
988: open csr_pool_dtls;
989: fetch csr_pool_dtls into l_folder_name,l_entity_desc,l_unit,l_transaction_status;
990: close csr_pool_dtls;
991: hr_utility.set_location('pool dtls fetched '||l_proc,20);
992: --
993: hr_utility.set_message(8302,'PQH_BPL_WF_WARN_NOTICE');
994: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
995: hr_utility.set_message_token('ENTITY',l_entity_desc);
989: fetch csr_pool_dtls into l_folder_name,l_entity_desc,l_unit,l_transaction_status;
990: close csr_pool_dtls;
991: hr_utility.set_location('pool dtls fetched '||l_proc,20);
992: --
993: hr_utility.set_message(8302,'PQH_BPL_WF_WARN_NOTICE');
994: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
995: hr_utility.set_message_token('ENTITY',l_entity_desc);
996: hr_utility.set_message_token('UNIT',l_unit);
997: hr_utility.set_message_token('TRANSACTION_STATUS',l_transaction_status);
990: close csr_pool_dtls;
991: hr_utility.set_location('pool dtls fetched '||l_proc,20);
992: --
993: hr_utility.set_message(8302,'PQH_BPL_WF_WARN_NOTICE');
994: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
995: hr_utility.set_message_token('ENTITY',l_entity_desc);
996: hr_utility.set_message_token('UNIT',l_unit);
997: hr_utility.set_message_token('TRANSACTION_STATUS',l_transaction_status);
998: l_document := hr_utility.get_message;
991: hr_utility.set_location('pool dtls fetched '||l_proc,20);
992: --
993: hr_utility.set_message(8302,'PQH_BPL_WF_WARN_NOTICE');
994: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
995: hr_utility.set_message_token('ENTITY',l_entity_desc);
996: hr_utility.set_message_token('UNIT',l_unit);
997: hr_utility.set_message_token('TRANSACTION_STATUS',l_transaction_status);
998: l_document := hr_utility.get_message;
999: return l_document;
992: --
993: hr_utility.set_message(8302,'PQH_BPL_WF_WARN_NOTICE');
994: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
995: hr_utility.set_message_token('ENTITY',l_entity_desc);
996: hr_utility.set_message_token('UNIT',l_unit);
997: hr_utility.set_message_token('TRANSACTION_STATUS',l_transaction_status);
998: l_document := hr_utility.get_message;
999: return l_document;
1000: exception
993: hr_utility.set_message(8302,'PQH_BPL_WF_WARN_NOTICE');
994: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
995: hr_utility.set_message_token('ENTITY',l_entity_desc);
996: hr_utility.set_message_token('UNIT',l_unit);
997: hr_utility.set_message_token('TRANSACTION_STATUS',l_transaction_status);
998: l_document := hr_utility.get_message;
999: return l_document;
1000: exception
1001: when others then
994: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
995: hr_utility.set_message_token('ENTITY',l_entity_desc);
996: hr_utility.set_message_token('UNIT',l_unit);
997: hr_utility.set_message_token('TRANSACTION_STATUS',l_transaction_status);
998: l_document := hr_utility.get_message;
999: return l_document;
1000: exception
1001: when others then
1002: hr_utility.set_message(8302,'PQH_BPL_WF_WARN_FAIL');
998: l_document := hr_utility.get_message;
999: return l_document;
1000: exception
1001: when others then
1002: hr_utility.set_message(8302,'PQH_BPL_WF_WARN_FAIL');
1003: hr_utility.set_message_token('TRANSACTION_ID',p_transaction_id);
1004: l_document := hr_utility.get_message;
1005: return l_document;
1006: END warning_notification;
999: return l_document;
1000: exception
1001: when others then
1002: hr_utility.set_message(8302,'PQH_BPL_WF_WARN_FAIL');
1003: hr_utility.set_message_token('TRANSACTION_ID',p_transaction_id);
1004: l_document := hr_utility.get_message;
1005: return l_document;
1006: END warning_notification;
1007: FUNCTION reject_notification (p_transaction_id in number) RETURN varchar2
1000: exception
1001: when others then
1002: hr_utility.set_message(8302,'PQH_BPL_WF_WARN_FAIL');
1003: hr_utility.set_message_token('TRANSACTION_ID',p_transaction_id);
1004: l_document := hr_utility.get_message;
1005: return l_document;
1006: END warning_notification;
1007: FUNCTION reject_notification (p_transaction_id in number) RETURN varchar2
1008: is
1018: hr_general.decode_lookup('PQH_REALLOC_TXN_STATUS',approval_status)
1019: from pqh_budget_pools
1020: where pool_id = p_transaction_id;
1021: BEGIN
1022: hr_utility.set_location('Entering'||l_proc,10);
1023: open csr_pool_dtls;
1024: fetch csr_pool_dtls into l_folder_name,l_entity_desc,l_unit,l_transaction_status;
1025: close csr_pool_dtls;
1026: hr_utility.set_location('pool dtls fetched '||l_proc,20);
1022: hr_utility.set_location('Entering'||l_proc,10);
1023: open csr_pool_dtls;
1024: fetch csr_pool_dtls into l_folder_name,l_entity_desc,l_unit,l_transaction_status;
1025: close csr_pool_dtls;
1026: hr_utility.set_location('pool dtls fetched '||l_proc,20);
1027: --
1028: hr_utility.set_message(8302,'PQH_BPL_WF_REJECT_NOTICE');
1029: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
1030: hr_utility.set_message_token('ENTITY',l_entity_desc);
1024: fetch csr_pool_dtls into l_folder_name,l_entity_desc,l_unit,l_transaction_status;
1025: close csr_pool_dtls;
1026: hr_utility.set_location('pool dtls fetched '||l_proc,20);
1027: --
1028: hr_utility.set_message(8302,'PQH_BPL_WF_REJECT_NOTICE');
1029: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
1030: hr_utility.set_message_token('ENTITY',l_entity_desc);
1031: hr_utility.set_message_token('UNIT',l_unit);
1032: hr_utility.set_message_token('TRANSACTION_STATUS',l_transaction_status);
1025: close csr_pool_dtls;
1026: hr_utility.set_location('pool dtls fetched '||l_proc,20);
1027: --
1028: hr_utility.set_message(8302,'PQH_BPL_WF_REJECT_NOTICE');
1029: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
1030: hr_utility.set_message_token('ENTITY',l_entity_desc);
1031: hr_utility.set_message_token('UNIT',l_unit);
1032: hr_utility.set_message_token('TRANSACTION_STATUS',l_transaction_status);
1033: l_document := hr_utility.get_message;
1026: hr_utility.set_location('pool dtls fetched '||l_proc,20);
1027: --
1028: hr_utility.set_message(8302,'PQH_BPL_WF_REJECT_NOTICE');
1029: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
1030: hr_utility.set_message_token('ENTITY',l_entity_desc);
1031: hr_utility.set_message_token('UNIT',l_unit);
1032: hr_utility.set_message_token('TRANSACTION_STATUS',l_transaction_status);
1033: l_document := hr_utility.get_message;
1034: hr_utility.set_location('Leaving'||l_proc,10);
1027: --
1028: hr_utility.set_message(8302,'PQH_BPL_WF_REJECT_NOTICE');
1029: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
1030: hr_utility.set_message_token('ENTITY',l_entity_desc);
1031: hr_utility.set_message_token('UNIT',l_unit);
1032: hr_utility.set_message_token('TRANSACTION_STATUS',l_transaction_status);
1033: l_document := hr_utility.get_message;
1034: hr_utility.set_location('Leaving'||l_proc,10);
1035: return l_document;
1028: hr_utility.set_message(8302,'PQH_BPL_WF_REJECT_NOTICE');
1029: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
1030: hr_utility.set_message_token('ENTITY',l_entity_desc);
1031: hr_utility.set_message_token('UNIT',l_unit);
1032: hr_utility.set_message_token('TRANSACTION_STATUS',l_transaction_status);
1033: l_document := hr_utility.get_message;
1034: hr_utility.set_location('Leaving'||l_proc,10);
1035: return l_document;
1036: exception
1029: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
1030: hr_utility.set_message_token('ENTITY',l_entity_desc);
1031: hr_utility.set_message_token('UNIT',l_unit);
1032: hr_utility.set_message_token('TRANSACTION_STATUS',l_transaction_status);
1033: l_document := hr_utility.get_message;
1034: hr_utility.set_location('Leaving'||l_proc,10);
1035: return l_document;
1036: exception
1037: when others then
1030: hr_utility.set_message_token('ENTITY',l_entity_desc);
1031: hr_utility.set_message_token('UNIT',l_unit);
1032: hr_utility.set_message_token('TRANSACTION_STATUS',l_transaction_status);
1033: l_document := hr_utility.get_message;
1034: hr_utility.set_location('Leaving'||l_proc,10);
1035: return l_document;
1036: exception
1037: when others then
1038: hr_utility.set_message(8302,'PQH_BPL_WF_REJECT_FAIL');
1034: hr_utility.set_location('Leaving'||l_proc,10);
1035: return l_document;
1036: exception
1037: when others then
1038: hr_utility.set_message(8302,'PQH_BPL_WF_REJECT_FAIL');
1039: hr_utility.set_message_token('TRANSACTION_ID',p_transaction_id);
1040: l_document := hr_utility.get_message;
1041: END reject_notification;
1042: FUNCTION apply_notification (p_transaction_id in number) RETURN varchar2
1035: return l_document;
1036: exception
1037: when others then
1038: hr_utility.set_message(8302,'PQH_BPL_WF_REJECT_FAIL');
1039: hr_utility.set_message_token('TRANSACTION_ID',p_transaction_id);
1040: l_document := hr_utility.get_message;
1041: END reject_notification;
1042: FUNCTION apply_notification (p_transaction_id in number) RETURN varchar2
1043: is
1036: exception
1037: when others then
1038: hr_utility.set_message(8302,'PQH_BPL_WF_REJECT_FAIL');
1039: hr_utility.set_message_token('TRANSACTION_ID',p_transaction_id);
1040: l_document := hr_utility.get_message;
1041: END reject_notification;
1042: FUNCTION apply_notification (p_transaction_id in number) RETURN varchar2
1043: is
1044: l_document varchar2(4000);
1053: hr_general.decode_lookup('PQH_REALLOC_TXN_STATUS',approval_status)
1054: from pqh_budget_pools
1055: where pool_id = p_transaction_id;
1056: BEGIN
1057: hr_utility.set_location('Entering'||l_proc,10);
1058: open csr_pool_dtls;
1059: fetch csr_pool_dtls into l_folder_name,l_entity_desc,l_unit,l_transaction_status;
1060: close csr_pool_dtls;
1061: hr_utility.set_location('pool dtls fetched '||l_proc,20);
1057: hr_utility.set_location('Entering'||l_proc,10);
1058: open csr_pool_dtls;
1059: fetch csr_pool_dtls into l_folder_name,l_entity_desc,l_unit,l_transaction_status;
1060: close csr_pool_dtls;
1061: hr_utility.set_location('pool dtls fetched '||l_proc,20);
1062: --
1063: hr_utility.set_message(8302,'PQH_BPL_WF_APPLY_NOTICE');
1064: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
1065: hr_utility.set_message_token('ENTITY',l_entity_desc);
1059: fetch csr_pool_dtls into l_folder_name,l_entity_desc,l_unit,l_transaction_status;
1060: close csr_pool_dtls;
1061: hr_utility.set_location('pool dtls fetched '||l_proc,20);
1062: --
1063: hr_utility.set_message(8302,'PQH_BPL_WF_APPLY_NOTICE');
1064: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
1065: hr_utility.set_message_token('ENTITY',l_entity_desc);
1066: hr_utility.set_message_token('UNIT',l_unit);
1067: hr_utility.set_message_token('TRANSACTION_STATUS',l_transaction_status);
1060: close csr_pool_dtls;
1061: hr_utility.set_location('pool dtls fetched '||l_proc,20);
1062: --
1063: hr_utility.set_message(8302,'PQH_BPL_WF_APPLY_NOTICE');
1064: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
1065: hr_utility.set_message_token('ENTITY',l_entity_desc);
1066: hr_utility.set_message_token('UNIT',l_unit);
1067: hr_utility.set_message_token('TRANSACTION_STATUS',l_transaction_status);
1068: l_document := hr_utility.get_message;
1061: hr_utility.set_location('pool dtls fetched '||l_proc,20);
1062: --
1063: hr_utility.set_message(8302,'PQH_BPL_WF_APPLY_NOTICE');
1064: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
1065: hr_utility.set_message_token('ENTITY',l_entity_desc);
1066: hr_utility.set_message_token('UNIT',l_unit);
1067: hr_utility.set_message_token('TRANSACTION_STATUS',l_transaction_status);
1068: l_document := hr_utility.get_message;
1069: hr_utility.set_location('Leaving'||l_proc,10);
1062: --
1063: hr_utility.set_message(8302,'PQH_BPL_WF_APPLY_NOTICE');
1064: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
1065: hr_utility.set_message_token('ENTITY',l_entity_desc);
1066: hr_utility.set_message_token('UNIT',l_unit);
1067: hr_utility.set_message_token('TRANSACTION_STATUS',l_transaction_status);
1068: l_document := hr_utility.get_message;
1069: hr_utility.set_location('Leaving'||l_proc,10);
1070: return l_document;
1063: hr_utility.set_message(8302,'PQH_BPL_WF_APPLY_NOTICE');
1064: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
1065: hr_utility.set_message_token('ENTITY',l_entity_desc);
1066: hr_utility.set_message_token('UNIT',l_unit);
1067: hr_utility.set_message_token('TRANSACTION_STATUS',l_transaction_status);
1068: l_document := hr_utility.get_message;
1069: hr_utility.set_location('Leaving'||l_proc,10);
1070: return l_document;
1071: exception
1064: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
1065: hr_utility.set_message_token('ENTITY',l_entity_desc);
1066: hr_utility.set_message_token('UNIT',l_unit);
1067: hr_utility.set_message_token('TRANSACTION_STATUS',l_transaction_status);
1068: l_document := hr_utility.get_message;
1069: hr_utility.set_location('Leaving'||l_proc,10);
1070: return l_document;
1071: exception
1072: when others then
1065: hr_utility.set_message_token('ENTITY',l_entity_desc);
1066: hr_utility.set_message_token('UNIT',l_unit);
1067: hr_utility.set_message_token('TRANSACTION_STATUS',l_transaction_status);
1068: l_document := hr_utility.get_message;
1069: hr_utility.set_location('Leaving'||l_proc,10);
1070: return l_document;
1071: exception
1072: when others then
1073: hr_utility.set_message(8302,'PQH_BPL_WF_APPLY_FAIL');
1069: hr_utility.set_location('Leaving'||l_proc,10);
1070: return l_document;
1071: exception
1072: when others then
1073: hr_utility.set_message(8302,'PQH_BPL_WF_APPLY_FAIL');
1074: hr_utility.set_message_token('TRANSACTION_ID',p_transaction_id);
1075: l_document := hr_utility.get_message;
1076: END apply_notification;
1077:
1070: return l_document;
1071: exception
1072: when others then
1073: hr_utility.set_message(8302,'PQH_BPL_WF_APPLY_FAIL');
1074: hr_utility.set_message_token('TRANSACTION_ID',p_transaction_id);
1075: l_document := hr_utility.get_message;
1076: END apply_notification;
1077:
1078: function reject_transaction
1071: exception
1072: when others then
1073: hr_utility.set_message(8302,'PQH_BPL_WF_APPLY_FAIL');
1074: hr_utility.set_message_token('TRANSACTION_ID',p_transaction_id);
1075: l_document := hr_utility.get_message;
1076: END apply_notification;
1077:
1078: function reject_transaction
1079: ( p_transaction_id in NUMBER,
1091: FROM pqh_budget_pools
1092: WHERE pool_id = p_transaction_id;
1093: l_pool_rec csr_pool_dtls%ROWTYPE;
1094: BEGIN
1095: hr_utility.set_location('Entering '||l_proc,10);
1096: --added by kgowripe
1097: hr_multi_message.enable_message_list;
1098: --end changes by kgowripe
1099: OPEN csr_pool_dtls;
1112: ,p_wf_transaction_category_id => l_pool_rec.wf_transaction_category_id
1113: ,p_validate => l_validate );
1114:
1115: l_return := 'SUCESS';
1116: hr_utility.set_location('Leaving '||l_proc,30);
1117: --
1118: RETURN l_return;
1119: Exception
1120: --added by kgowripe
1131: p_apply_error_num => SQLCODE);
1132: l_return := 'FAILURE';
1133: END IF;
1134: --
1135: hr_utility.set_location('Leaving '||l_proc,30);
1136: return l_return;
1137: --
1138: End reject_transaction;
1139:
1182: l_max_seq_no number(15);
1183:
1184:
1185: Begin
1186: hr_utility.set_location('Entering '||l_proc,10);
1187: Open csr_bg_id;
1188: Fetch csr_bg_id into l_business_group_id;
1189: Close csr_bg_id;
1190: hr_utility.set_location('Business Group id '||l_business_group_id||l_proc,12);
1186: hr_utility.set_location('Entering '||l_proc,10);
1187: Open csr_bg_id;
1188: Fetch csr_bg_id into l_business_group_id;
1189: Close csr_bg_id;
1190: hr_utility.set_location('Business Group id '||l_business_group_id||l_proc,12);
1191: l_transaction_category_id := pqh_workflow.get_txn_cat
1192: (p_short_name => 'PQH_BPR'
1193: ,p_business_group_id => l_business_group_id);
1194: hr_utility.set_location('transaction category id '||l_transaction_category_id||l_proc,15);
1190: hr_utility.set_location('Business Group id '||l_business_group_id||l_proc,12);
1191: l_transaction_category_id := pqh_workflow.get_txn_cat
1192: (p_short_name => 'PQH_BPR'
1193: ,p_business_group_id => l_business_group_id);
1194: hr_utility.set_location('transaction category id '||l_transaction_category_id||l_proc,15);
1195:
1196: Open csr_bgt_manager_rls(l_business_group_id);
1197: loop
1198: fetch csr_bgt_manager_rls into l_role_id,l_role_name;
1196: Open csr_bgt_manager_rls(l_business_group_id);
1197: loop
1198: fetch csr_bgt_manager_rls into l_role_id,l_role_name;
1199: exit when csr_bgt_manager_rls%notfound;
1200: hr_utility.set_location('Transaction id '||p_transaction_id||l_proc,20);
1201: hr_utility.set_location('Transaction name '||p_transaction_name||l_proc,25);
1202: hr_utility.set_location('Role Id '||l_role_id||l_proc,30);
1203: hr_utility.set_location('Role Name '||l_role_name||l_proc,35);
1204:
1197: loop
1198: fetch csr_bgt_manager_rls into l_role_id,l_role_name;
1199: exit when csr_bgt_manager_rls%notfound;
1200: hr_utility.set_location('Transaction id '||p_transaction_id||l_proc,20);
1201: hr_utility.set_location('Transaction name '||p_transaction_name||l_proc,25);
1202: hr_utility.set_location('Role Id '||l_role_id||l_proc,30);
1203: hr_utility.set_location('Role Name '||l_role_name||l_proc,35);
1204:
1205: -- Get the maximun Sequence number
1198: fetch csr_bgt_manager_rls into l_role_id,l_role_name;
1199: exit when csr_bgt_manager_rls%notfound;
1200: hr_utility.set_location('Transaction id '||p_transaction_id||l_proc,20);
1201: hr_utility.set_location('Transaction name '||p_transaction_name||l_proc,25);
1202: hr_utility.set_location('Role Id '||l_role_id||l_proc,30);
1203: hr_utility.set_location('Role Name '||l_role_name||l_proc,35);
1204:
1205: -- Get the maximun Sequence number
1206: Open csr_seq_no(l_transaction_category_id);
1199: exit when csr_bgt_manager_rls%notfound;
1200: hr_utility.set_location('Transaction id '||p_transaction_id||l_proc,20);
1201: hr_utility.set_location('Transaction name '||p_transaction_name||l_proc,25);
1202: hr_utility.set_location('Role Id '||l_role_id||l_proc,30);
1203: hr_utility.set_location('Role Name '||l_role_name||l_proc,35);
1204:
1205: -- Get the maximun Sequence number
1206: Open csr_seq_no(l_transaction_category_id);
1207: Fetch csr_seq_no into l_max_seq_no;
1210: l_max_seq_no := 1;
1211: else
1212: l_max_seq_no := l_max_seq_no + 1;
1213: end if;
1214: hr_utility.set_location('Max Seq No '||l_max_seq_no||l_proc,37);
1215: pqh_wf.process_user_action( P_TRANSACTION_CATEGORY_ID => l_transaction_category_id,
1216: P_TRANSACTION_ID => p_transaction_id,
1217: P_USER_ACTION_CD => 'PQH_BPR',
1218: p_workflow_seq_no => l_max_seq_no,
1221: P_TRANSACTION_NAME => p_transaction_name,
1222: P_APPLY_ERROR_MESG => l_apply_error_mesg,
1223: P_APPLY_ERROR_NUM => l_apply_error_num);
1224: If (l_apply_error_num <> 0) then
1225: hr_utility.set_location('error encountered '||l_proc,40);
1226: fnd_message.set_name(8302,'PQH_BPR_PROCESS_LOG_ERROR');
1227: fnd_message.raise_error;
1228: End if;
1229:
1228: End if;
1229:
1230: End loop;
1231: Close csr_bgt_manager_rls;
1232: hr_utility.set_location('Leaving '||l_proc,50);
1233:
1234: End notify_bgt_manager_users;
1235:
1236: FUNCTION fyi_notification (p_transaction_id in number) RETURN varchar2
1247: hr_general.decode_lookup('PQH_REALLOC_TXN_STATUS',approval_status)
1248: from pqh_budget_pools
1249: where pool_id = p_transaction_id;
1250: BEGIN
1251: hr_utility.set_location('inside fyi notification'||l_proc,10);
1252: open c0;
1253: fetch c0 into l_folder_name,l_entity_type, l_budget_unit, l_approval_status;
1254: close c0;
1255: hr_utility.set_location('Folder name, Approval Status fetched '||l_proc,20);
1251: hr_utility.set_location('inside fyi notification'||l_proc,10);
1252: open c0;
1253: fetch c0 into l_folder_name,l_entity_type, l_budget_unit, l_approval_status;
1254: close c0;
1255: hr_utility.set_location('Folder name, Approval Status fetched '||l_proc,20);
1256: --
1257: hr_utility.set_message(8302,'PQH_BPR_WF_FYI_NOTICE');
1258: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
1259: hr_utility.set_message_token('ENTITY_TYPE',l_entity_type);
1253: fetch c0 into l_folder_name,l_entity_type, l_budget_unit, l_approval_status;
1254: close c0;
1255: hr_utility.set_location('Folder name, Approval Status fetched '||l_proc,20);
1256: --
1257: hr_utility.set_message(8302,'PQH_BPR_WF_FYI_NOTICE');
1258: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
1259: hr_utility.set_message_token('ENTITY_TYPE',l_entity_type);
1260: hr_utility.set_message_token('BUDGET_UNIT',l_budget_unit);
1261: hr_utility.set_message_token('APPROVAL_STATUS',l_approval_status);
1254: close c0;
1255: hr_utility.set_location('Folder name, Approval Status fetched '||l_proc,20);
1256: --
1257: hr_utility.set_message(8302,'PQH_BPR_WF_FYI_NOTICE');
1258: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
1259: hr_utility.set_message_token('ENTITY_TYPE',l_entity_type);
1260: hr_utility.set_message_token('BUDGET_UNIT',l_budget_unit);
1261: hr_utility.set_message_token('APPROVAL_STATUS',l_approval_status);
1262: l_document := hr_utility.get_message;
1255: hr_utility.set_location('Folder name, Approval Status fetched '||l_proc,20);
1256: --
1257: hr_utility.set_message(8302,'PQH_BPR_WF_FYI_NOTICE');
1258: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
1259: hr_utility.set_message_token('ENTITY_TYPE',l_entity_type);
1260: hr_utility.set_message_token('BUDGET_UNIT',l_budget_unit);
1261: hr_utility.set_message_token('APPROVAL_STATUS',l_approval_status);
1262: l_document := hr_utility.get_message;
1263: return l_document;
1256: --
1257: hr_utility.set_message(8302,'PQH_BPR_WF_FYI_NOTICE');
1258: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
1259: hr_utility.set_message_token('ENTITY_TYPE',l_entity_type);
1260: hr_utility.set_message_token('BUDGET_UNIT',l_budget_unit);
1261: hr_utility.set_message_token('APPROVAL_STATUS',l_approval_status);
1262: l_document := hr_utility.get_message;
1263: return l_document;
1264: exception
1257: hr_utility.set_message(8302,'PQH_BPR_WF_FYI_NOTICE');
1258: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
1259: hr_utility.set_message_token('ENTITY_TYPE',l_entity_type);
1260: hr_utility.set_message_token('BUDGET_UNIT',l_budget_unit);
1261: hr_utility.set_message_token('APPROVAL_STATUS',l_approval_status);
1262: l_document := hr_utility.get_message;
1263: return l_document;
1264: exception
1265: when others then
1258: hr_utility.set_message_token('FOLDER_NAME',l_folder_name);
1259: hr_utility.set_message_token('ENTITY_TYPE',l_entity_type);
1260: hr_utility.set_message_token('BUDGET_UNIT',l_budget_unit);
1261: hr_utility.set_message_token('APPROVAL_STATUS',l_approval_status);
1262: l_document := hr_utility.get_message;
1263: return l_document;
1264: exception
1265: when others then
1266: hr_utility.set_message(8302,'PQH_BPR_WF_FYI_FAIL');
1262: l_document := hr_utility.get_message;
1263: return l_document;
1264: exception
1265: when others then
1266: hr_utility.set_message(8302,'PQH_BPR_WF_FYI_FAIL');
1267: hr_utility.set_message_token('TRANSACTION_ID',p_transaction_id);
1268: l_document := hr_utility.get_message;
1269: return l_document;
1270: END fyi_notification;
1263: return l_document;
1264: exception
1265: when others then
1266: hr_utility.set_message(8302,'PQH_BPR_WF_FYI_FAIL');
1267: hr_utility.set_message_token('TRANSACTION_ID',p_transaction_id);
1268: l_document := hr_utility.get_message;
1269: return l_document;
1270: END fyi_notification;
1271:
1264: exception
1265: when others then
1266: hr_utility.set_message(8302,'PQH_BPR_WF_FYI_FAIL');
1267: hr_utility.set_message_token('TRANSACTION_ID',p_transaction_id);
1268: l_document := hr_utility.get_message;
1269: return l_document;
1270: END fyi_notification;
1271:
1272: PROCEDURE update_folder_approval_status (p_transaction_id in number, p_action_flag in varchar2)
1284: l_proc varchar2(72) := g_package||'update_folder_approval_status';
1285: l_transaction_category_id number;
1286:
1287: BEGIN
1288: hr_utility.set_location('Entering '||l_proc,10);
1289: --added by kgowripe
1290: hr_multi_message.enable_message_list;
1291: --end changes by kgowripe
1292: OPEN csr_pool_dtls;
1291: --end changes by kgowripe
1292: OPEN csr_pool_dtls;
1293: FETCH csr_pool_dtls INTO l_pool_rec;
1294: CLOSE csr_pool_dtls;
1295: hr_utility.set_location('Txn Cat Id '||l_transaction_category_id ,15);
1296:
1297: if ( l_pool_rec.approval_status = 'T' and (p_action_flag = 'I' OR
1298: p_action_flag = 'F' ))
1299: then
1327: l_proc varchar2(72) := g_package ||'bgt_dummy_folder_delete';
1328:
1329: BEGIN
1330:
1331: hr_utility.set_location(' Entering:' || l_proc,10);
1332: --added by kgowripe
1333: hr_multi_message.enable_message_list;
1334: --end changes by kgowripe
1335: Open csr_approval_status_T_folders;
1333: hr_multi_message.enable_message_list;
1334: --end changes by kgowripe
1335: Open csr_approval_status_T_folders;
1336: loop
1337: hr_utility.set_location('Folder Id :' || l_folder_id ,20);
1338: fetch csr_approval_status_T_folders into l_folder_id;
1339: exit when csr_approval_status_T_folders%NOTFOUND;
1340: If l_folder_id is Not Null Then
1341: /* In the procedure pqh_budget_pools_swi.bgt_realloc_delete
1352: END;
1353: End If;
1354: end loop;
1355: close csr_approval_status_T_folders;
1356: hr_utility.set_location(' Leaving:' || l_proc,30);
1357: Exception
1358: When others Then
1359: Null;
1360: END bgt_dummy_folder_delete;
1421:
1422: l_effective_date date;
1423: --end krmahade
1424: BEGIN
1425: hr_utility.set_location(' Entering:' || l_proc,10);
1426:
1427: --Added by krmahade
1428: OPEN csr_get_bdgt_start_dt;
1429: FETCH csr_get_bdgt_start_dt into l_effective_date;
1437: if (p_user_action_cd = 'REJECT') then
1438: --
1439: l_return := pqh_bdgt_realloc_utility.reject_transaction(p_transaction_id);
1440: --
1441: hr_utility.set_location(' Action Rejection Status :' || l_return,26);
1442: --
1443: end if;
1444: -- End Svorugan
1445:
1442: --
1443: end if;
1444: -- End Svorugan
1445:
1446: hr_utility.set_location(' before call warning :' || g_warning,15);
1447:
1448: pqh_wf.process_user_action(
1449: p_transaction_id => p_transaction_id
1450: ,p_transaction_category_id => p_transaction_category_id
1468: ,p_transaction_name => p_transaction_name
1469: ,p_apply_error_mesg => p_apply_error_mesg
1470: ,p_apply_error_num => p_apply_error_num
1471: );
1472: hr_utility.set_location(' after call warning :' || g_warning,25);
1473: p_warning_mesg := g_warning;
1474: hr_utility.set_location(' leaving:' || l_proc,40);
1475: END bpr_process_user_action;
1476:
1470: ,p_apply_error_num => p_apply_error_num
1471: );
1472: hr_utility.set_location(' after call warning :' || g_warning,25);
1473: p_warning_mesg := g_warning;
1474: hr_utility.set_location(' leaving:' || l_proc,40);
1475: END bpr_process_user_action;
1476:
1477: -- ----------------------------------------------------------------------------
1478: -- |----------------------< check_approver_skip >-------------------------|
1524: p_role_template_id => p_role_template_id,
1525: p_status_flag => p_status_flag );
1526:
1527: if (p_status_flag <> 0 and hr_multi_message.exception_add ) then
1528: hr_utility.raise_error;
1529: end if;
1530:
1531: -- Get the return status and disable multi-messaging
1532: l_result := hr_multi_message.get_return_status_disable;