13: -- wait for 6000 seconds for the concurrent request to complete.
14: g_total_request_time CONSTANT NUMBER := 6000;
15:
16: -- Bug 3684073. Modified the constants to VARCHAR2 below.
17: -- We are no longer using mfg_lookups to derive the lookup_code.
18: -- g_lookup_yes CONSTANT NUMBER := 1; -- 1 is lookup_code for 'YES' in mfg_lookups.
19: -- g_lookup_no CONSTANT NUMBER := 2; -- 2 is lookup_code for 'NO' in mfg_lookups.
20:
21: g_lookup_yes CONSTANT VARCHAR2(3) := 'YES';
14: g_total_request_time CONSTANT NUMBER := 6000;
15:
16: -- Bug 3684073. Modified the constants to VARCHAR2 below.
17: -- We are no longer using mfg_lookups to derive the lookup_code.
18: -- g_lookup_yes CONSTANT NUMBER := 1; -- 1 is lookup_code for 'YES' in mfg_lookups.
19: -- g_lookup_no CONSTANT NUMBER := 2; -- 2 is lookup_code for 'NO' in mfg_lookups.
20:
21: g_lookup_yes CONSTANT VARCHAR2(3) := 'YES';
22: g_lookup_no CONSTANT VARCHAR2(3) := 'NO';
15:
16: -- Bug 3684073. Modified the constants to VARCHAR2 below.
17: -- We are no longer using mfg_lookups to derive the lookup_code.
18: -- g_lookup_yes CONSTANT NUMBER := 1; -- 1 is lookup_code for 'YES' in mfg_lookups.
19: -- g_lookup_no CONSTANT NUMBER := 2; -- 2 is lookup_code for 'NO' in mfg_lookups.
20:
21: g_lookup_yes CONSTANT VARCHAR2(3) := 'YES';
22: g_lookup_no CONSTANT VARCHAR2(3) := 'NO';
23:
32: -------------------------------------------------------------------------------
33: -- Forward declaration of Local functions.
34: -------------------------------------------------------------------------------
35:
36: FUNCTION get_mfg_lookups_value (p_meaning VARCHAR2,
37: p_lookup_type VARCHAR2) RETURN NUMBER;
38:
39: FUNCTION get_organization_id (p_organization_code VARCHAR2) RETURN NUMBER;
40: FUNCTION get_plan_id(p_plan_name VARCHAR2) RETURN NUMBER;
198:
199: -- Get the value entered in confirm_action Collection element.
200:
201: -- Bug 3684073. We should not derive the lookup_code value from
202: -- mfg_lookups because the value passed to this api would be the
203: -- qa_plan_char_value_lookups.short_code, which is not a translated
204: -- column. The mfg_lookups view would have the lookup meaning in the
205: -- language used in the current session.
206: --
200:
201: -- Bug 3684073. We should not derive the lookup_code value from
202: -- mfg_lookups because the value passed to this api would be the
203: -- qa_plan_char_value_lookups.short_code, which is not a translated
204: -- column. The mfg_lookups view would have the lookup meaning in the
205: -- language used in the current session.
206: --
207: -- Commented the below piece of code and compared p_launch_action
208: -- and p_action_fired parameters below with the new constants to resolve
207: -- Commented the below piece of code and compared p_launch_action
208: -- and p_action_fired parameters below with the new constants to resolve
209: -- the value entered. kabalakr.
210:
211: -- l_launch_action := get_mfg_lookups_value(p_launch_action,'SYS_YES_NO');
212: -- l_action_fired := get_mfg_lookups_value(p_action_fired,'SYS_YES_NO');
213:
214: -- The Action Code should get executed only if
215: -- Launch_action is 'Yes' and Action_fired is 'No'
208: -- and p_action_fired parameters below with the new constants to resolve
209: -- the value entered. kabalakr.
210:
211: -- l_launch_action := get_mfg_lookups_value(p_launch_action,'SYS_YES_NO');
212: -- l_action_fired := get_mfg_lookups_value(p_action_fired,'SYS_YES_NO');
213:
214: -- The Action Code should get executed only if
215: -- Launch_action is 'Yes' and Action_fired is 'No'
216:
647:
648: -- Get the value entered in confirm_action Collection element.
649:
650: -- Bug 3684073. We should not derive the lookup_code value from
651: -- mfg_lookups because the value passed to this api would be the
652: -- qa_plan_char_value_lookups.short_code, which is not a translated
653: -- column. The mfg_lookups view would have the lookup meaning in the
654: -- language used in the current session.
655: --
649:
650: -- Bug 3684073. We should not derive the lookup_code value from
651: -- mfg_lookups because the value passed to this api would be the
652: -- qa_plan_char_value_lookups.short_code, which is not a translated
653: -- column. The mfg_lookups view would have the lookup meaning in the
654: -- language used in the current session.
655: --
656: -- Commented the below piece of code and compared p_launch_action
657: -- and p_action_fired parameters below with the new constants to resolve
656: -- Commented the below piece of code and compared p_launch_action
657: -- and p_action_fired parameters below with the new constants to resolve
658: -- the value entered. kabalakr.
659:
660: -- l_launch_action := get_mfg_lookups_value(p_launch_action,'SYS_YES_NO');
661: -- l_action_fired := get_mfg_lookups_value(p_action_fired,'SYS_YES_NO');
662:
663: -- The Action Code should get executed only if
664: -- Launch_action is 'Yes' and relaunch_flag is 'No'
657: -- and p_action_fired parameters below with the new constants to resolve
658: -- the value entered. kabalakr.
659:
660: -- l_launch_action := get_mfg_lookups_value(p_launch_action,'SYS_YES_NO');
661: -- l_action_fired := get_mfg_lookups_value(p_action_fired,'SYS_YES_NO');
662:
663: -- The Action Code should get executed only if
664: -- Launch_action is 'Yes' and relaunch_flag is 'No'
665:
682: l_item_id := qa_flex_util.get_item_id(l_organization_id, p_item);
683:
684: -- Get transaction_id and lookup code for the Intraoperation step.
685:
686: l_to_step := get_mfg_lookups_value(p_to_intra_step,'WIP_INTRAOPERATION_STEP');
687: l_from_step := get_mfg_lookups_value(p_from_intra_step,'WIP_INTRAOPERATION_STEP');
688:
689: -- IF the To Intraoperation step is not 'SCRAP', do not execute the action.
690: -- Write back INT_ERROR and RETURN.
683:
684: -- Get transaction_id and lookup code for the Intraoperation step.
685:
686: l_to_step := get_mfg_lookups_value(p_to_intra_step,'WIP_INTRAOPERATION_STEP');
687: l_from_step := get_mfg_lookups_value(p_from_intra_step,'WIP_INTRAOPERATION_STEP');
688:
689: -- IF the To Intraoperation step is not 'SCRAP', do not execute the action.
690: -- Write back INT_ERROR and RETURN.
691:
1094:
1095: -- Get the value entered in confirm_action Collection element.
1096:
1097: -- Bug 3684073. We should not derive the lookup_code value from
1098: -- mfg_lookups because the value passed to this api would be the
1099: -- qa_plan_char_value_lookups.short_code, which is not a translated
1100: -- column. The mfg_lookups view would have the lookup meaning in the
1101: -- language used in the current session.
1102: --
1096:
1097: -- Bug 3684073. We should not derive the lookup_code value from
1098: -- mfg_lookups because the value passed to this api would be the
1099: -- qa_plan_char_value_lookups.short_code, which is not a translated
1100: -- column. The mfg_lookups view would have the lookup meaning in the
1101: -- language used in the current session.
1102: --
1103: -- Commented the below piece of code and compared p_launch_action
1104: -- and p_action_fired parameters below with the new constants to resolve
1103: -- Commented the below piece of code and compared p_launch_action
1104: -- and p_action_fired parameters below with the new constants to resolve
1105: -- the value entered. kabalakr.
1106:
1107: -- l_launch_action := get_mfg_lookups_value(p_launch_action,'SYS_YES_NO');
1108: -- l_action_fired := get_mfg_lookups_value(p_action_fired,'SYS_YES_NO');
1109:
1110: -- The Action Code should get executed only if
1111: -- launch_action is 'Yes' and action_fired is 'No'
1104: -- and p_action_fired parameters below with the new constants to resolve
1105: -- the value entered. kabalakr.
1106:
1107: -- l_launch_action := get_mfg_lookups_value(p_launch_action,'SYS_YES_NO');
1108: -- l_action_fired := get_mfg_lookups_value(p_action_fired,'SYS_YES_NO');
1109:
1110: -- The Action Code should get executed only if
1111: -- launch_action is 'Yes' and action_fired is 'No'
1112:
1544:
1545: -- Get the value entered in confirm_action Collection element.
1546:
1547: -- Bug 3684073. We should not derive the lookup_code value from
1548: -- mfg_lookups because the value passed to this api would be the
1549: -- qa_plan_char_value_lookups.short_code, which is not a translated
1550: -- column. The mfg_lookups view would have the lookup meaning in the
1551: -- language used in the current session.
1552: --
1546:
1547: -- Bug 3684073. We should not derive the lookup_code value from
1548: -- mfg_lookups because the value passed to this api would be the
1549: -- qa_plan_char_value_lookups.short_code, which is not a translated
1550: -- column. The mfg_lookups view would have the lookup meaning in the
1551: -- language used in the current session.
1552: --
1553: -- Commented the below piece of code and compared p_launch_action
1554: -- and p_action_fired parameters below with the new constants to resolve
1553: -- Commented the below piece of code and compared p_launch_action
1554: -- and p_action_fired parameters below with the new constants to resolve
1555: -- the value entered. kabalakr.
1556:
1557: -- l_launch_action := get_mfg_lookups_value(p_launch_action,'SYS_YES_NO');
1558: -- l_action_fired := get_mfg_lookups_value(p_action_fired,'SYS_YES_NO');
1559:
1560: -- The Action Code should get executed only if
1561: -- Launch_action is 'Yes' and Action_fired is 'No'
1554: -- and p_action_fired parameters below with the new constants to resolve
1555: -- the value entered. kabalakr.
1556:
1557: -- l_launch_action := get_mfg_lookups_value(p_launch_action,'SYS_YES_NO');
1558: -- l_action_fired := get_mfg_lookups_value(p_action_fired,'SYS_YES_NO');
1559:
1560: -- The Action Code should get executed only if
1561: -- Launch_action is 'Yes' and Action_fired is 'No'
1562:
1903:
1904: -- Get the value entered in confirm_action Collection element.
1905:
1906: -- Bug 3684073. We should not derive the lookup_code value from
1907: -- mfg_lookups because the value passed to this api would be the
1908: -- qa_plan_char_value_lookups.short_code, which is not a translated
1909: -- column. The mfg_lookups view would have the lookup meaning in the
1910: -- language used in the current session.
1911: --
1905:
1906: -- Bug 3684073. We should not derive the lookup_code value from
1907: -- mfg_lookups because the value passed to this api would be the
1908: -- qa_plan_char_value_lookups.short_code, which is not a translated
1909: -- column. The mfg_lookups view would have the lookup meaning in the
1910: -- language used in the current session.
1911: --
1912: -- Commented the below piece of code and compared p_launch_action
1913: -- and p_action_fired parameters below with the new constants to resolve
1912: -- Commented the below piece of code and compared p_launch_action
1913: -- and p_action_fired parameters below with the new constants to resolve
1914: -- the value entered. kabalakr.
1915:
1916: -- l_launch_action := get_mfg_lookups_value(p_launch_action,'SYS_YES_NO');
1917: -- l_action_fired := get_mfg_lookups_value(p_action_fired,'SYS_YES_NO');
1918:
1919: -- The Action Code should get executed only if
1920: -- launch_action is 'Yes' and action_fired is 'No'
1913: -- and p_action_fired parameters below with the new constants to resolve
1914: -- the value entered. kabalakr.
1915:
1916: -- l_launch_action := get_mfg_lookups_value(p_launch_action,'SYS_YES_NO');
1917: -- l_action_fired := get_mfg_lookups_value(p_action_fired,'SYS_YES_NO');
1918:
1919: -- The Action Code should get executed only if
1920: -- launch_action is 'Yes' and action_fired is 'No'
1921:
2128:
2129: -- Get the value entered in confirm_action Collection element.
2130:
2131: -- Bug 3684073. We should not derive the lookup_code value from
2132: -- mfg_lookups because the value passed to this api would be the
2133: -- qa_plan_char_value_lookups.short_code, which is not a translated
2134: -- column. The mfg_lookups view would have the lookup meaning in the
2135: -- language used in the current session.
2136: --
2130:
2131: -- Bug 3684073. We should not derive the lookup_code value from
2132: -- mfg_lookups because the value passed to this api would be the
2133: -- qa_plan_char_value_lookups.short_code, which is not a translated
2134: -- column. The mfg_lookups view would have the lookup meaning in the
2135: -- language used in the current session.
2136: --
2137: -- Commented the below piece of code and compared p_launch_action
2138: -- and p_action_fired parameters below with the new constants to resolve
2137: -- Commented the below piece of code and compared p_launch_action
2138: -- and p_action_fired parameters below with the new constants to resolve
2139: -- the value entered. kabalakr.
2140:
2141: -- l_launch_action := get_mfg_lookups_value(p_launch_action,'SYS_YES_NO');
2142: -- l_action_fired := get_mfg_lookups_value(p_action_fired,'SYS_YES_NO');
2143:
2144:
2145: -- The Action Code should get executed only if
2138: -- and p_action_fired parameters below with the new constants to resolve
2139: -- the value entered. kabalakr.
2140:
2141: -- l_launch_action := get_mfg_lookups_value(p_launch_action,'SYS_YES_NO');
2142: -- l_action_fired := get_mfg_lookups_value(p_action_fired,'SYS_YES_NO');
2143:
2144:
2145: -- The Action Code should get executed only if
2146: -- launch_action is 'Yes' and action_fired is 'No'
2569:
2570: -- Get the value entered in confirm_action Collection element.
2571:
2572: -- Bug 3684073. We should not derive the lookup_code value from
2573: -- mfg_lookups because the value passed to this api would be the
2574: -- qa_plan_char_value_lookups.short_code, which is not a translated
2575: -- column. The mfg_lookups view would have the lookup meaning in the
2576: -- language used in the current session.
2577: --
2571:
2572: -- Bug 3684073. We should not derive the lookup_code value from
2573: -- mfg_lookups because the value passed to this api would be the
2574: -- qa_plan_char_value_lookups.short_code, which is not a translated
2575: -- column. The mfg_lookups view would have the lookup meaning in the
2576: -- language used in the current session.
2577: --
2578: -- Commented the below piece of code and compared p_launch_action
2579: -- and p_action_fired parameters below with the new constants to resolve
2578: -- Commented the below piece of code and compared p_launch_action
2579: -- and p_action_fired parameters below with the new constants to resolve
2580: -- the value entered. kabalakr.
2581:
2582: -- l_launch_action := get_mfg_lookups_value(p_launch_action,'SYS_YES_NO');
2583: -- l_action_fired := get_mfg_lookups_value(p_action_fired,'SYS_YES_NO');
2584:
2585: -- The Action Code should get executed only if
2586: -- Launch_action is 'Yes' and relaunch_flag is 'No'
2579: -- and p_action_fired parameters below with the new constants to resolve
2580: -- the value entered. kabalakr.
2581:
2582: -- l_launch_action := get_mfg_lookups_value(p_launch_action,'SYS_YES_NO');
2583: -- l_action_fired := get_mfg_lookups_value(p_action_fired,'SYS_YES_NO');
2584:
2585: -- The Action Code should get executed only if
2586: -- Launch_action is 'Yes' and relaunch_flag is 'No'
2587:
2604: l_item_id := qa_flex_util.get_item_id(l_organization_id, p_item);
2605:
2606: -- Get transaction_id and lookup code for the Intraoperation step.
2607:
2608: l_to_step := get_mfg_lookups_value(p_to_intra_step,'WIP_INTRAOPERATION_STEP');
2609: l_from_step := get_mfg_lookups_value(p_from_intra_step,'WIP_INTRAOPERATION_STEP');
2610:
2611: UPDATE_STATUS(l_plan_id,p_collection_id,p_occurrence);
2612:
2605:
2606: -- Get transaction_id and lookup code for the Intraoperation step.
2607:
2608: l_to_step := get_mfg_lookups_value(p_to_intra_step,'WIP_INTRAOPERATION_STEP');
2609: l_from_step := get_mfg_lookups_value(p_from_intra_step,'WIP_INTRAOPERATION_STEP');
2610:
2611: UPDATE_STATUS(l_plan_id,p_collection_id,p_occurrence);
2612:
2613: OPEN txn_cur;
2937:
2938: -- Get the value entered in confirm_action Collection element.
2939:
2940: -- Bug 3684073. We should not derive the lookup_code value from
2941: -- mfg_lookups because the value passed to this api would be the
2942: -- qa_plan_char_value_lookups.short_code, which is not a translated
2943: -- column. The mfg_lookups view would have the lookup meaning in the
2944: -- language used in the current session.
2945: --
2939:
2940: -- Bug 3684073. We should not derive the lookup_code value from
2941: -- mfg_lookups because the value passed to this api would be the
2942: -- qa_plan_char_value_lookups.short_code, which is not a translated
2943: -- column. The mfg_lookups view would have the lookup meaning in the
2944: -- language used in the current session.
2945: --
2946: -- Commented the below piece of code and compared p_launch_action
2947: -- and p_action_fired parameters below with the new constants to resolve
2946: -- Commented the below piece of code and compared p_launch_action
2947: -- and p_action_fired parameters below with the new constants to resolve
2948: -- the value entered. kabalakr.
2949:
2950: -- l_launch_action := get_mfg_lookups_value(p_launch_action,'SYS_YES_NO');
2951: -- l_action_fired := get_mfg_lookups_value(p_action_fired,'SYS_YES_NO');
2952:
2953: -- The Action Code should get executed only if
2954: -- Launch_action is 'Yes' and Action_fired is 'No'
2947: -- and p_action_fired parameters below with the new constants to resolve
2948: -- the value entered. kabalakr.
2949:
2950: -- l_launch_action := get_mfg_lookups_value(p_launch_action,'SYS_YES_NO');
2951: -- l_action_fired := get_mfg_lookups_value(p_action_fired,'SYS_YES_NO');
2952:
2953: -- The Action Code should get executed only if
2954: -- Launch_action is 'Yes' and Action_fired is 'No'
2955:
3813:
3814: /*
3815: CURSOR lookup_cur(l_lookup_code NUMBER) IS
3816: SELECT substr(ltrim(rtrim(meaning)),1,20)
3817: FROM mfg_lookups
3818: WHERE lookup_type = 'SYS_YES_NO'
3819: AND lookup_code = l_lookup_code ;
3820: */
3821:
3944: COMMIT;
3945:
3946: END WRITE_BACK;
3947:
3948: FUNCTION get_mfg_lookups_value (p_meaning VARCHAR2,
3949: p_lookup_type VARCHAR2)
3950: RETURN NUMBER IS
3951:
3952: l_lookup_code VARCHAR2(2);
3952: l_lookup_code VARCHAR2(2);
3953:
3954: CURSOR meaning_cur IS
3955: SELECT lookup_code
3956: FROM mfg_lookups
3957: WHERE lookup_type = p_lookup_type
3958: AND upper(meaning) = upper(ltrim(rtrim(p_meaning)));
3959:
3960: BEGIN
3964: CLOSE meaning_cur;
3965:
3966: RETURN l_lookup_code;
3967:
3968: END get_mfg_lookups_value;
3969:
3970: FUNCTION get_plan_id(p_plan_name VARCHAR2)
3971: RETURN NUMBER IS
3972: