DBA Data[Home] [Help]

APPS.GMD_STATUS_PUB dependencies on GMD_STATUS

Line 1: PACKAGE BODY GMD_STATUS_PUB AS

1: PACKAGE BODY GMD_STATUS_PUB AS
2: /* $Header: GMDPSTSB.pls 120.6.12000000.2 2007/02/19 19:14:38 rajreddy ship $ */
3:
4: --Bug 3222090, NSRIVAST 20-FEB-2004, BEGIN
5: --Forward declaration.

Line 106: l_from_status gmd_status_b.status_code%TYPE;

102: l_form_id NUMBER;
103: l_org_id NUMBER;
104: l_prod_exec_enabled VARCHAR2(1);
105:
106: l_from_status gmd_status_b.status_code%TYPE;
107: l_from_status_type gmd_status_b.status_type%TYPE;
108: l_from_status_desc gmd_status.description%TYPE;
109: l_to_status_type gmd_status_b.status_type%TYPE;
110: l_to_status_desc gmd_status.description%TYPE;

Line 107: l_from_status_type gmd_status_b.status_type%TYPE;

103: l_org_id NUMBER;
104: l_prod_exec_enabled VARCHAR2(1);
105:
106: l_from_status gmd_status_b.status_code%TYPE;
107: l_from_status_type gmd_status_b.status_type%TYPE;
108: l_from_status_desc gmd_status.description%TYPE;
109: l_to_status_type gmd_status_b.status_type%TYPE;
110: l_to_status_desc gmd_status.description%TYPE;
111:

Line 108: l_from_status_desc gmd_status.description%TYPE;

104: l_prod_exec_enabled VARCHAR2(1);
105:
106: l_from_status gmd_status_b.status_code%TYPE;
107: l_from_status_type gmd_status_b.status_type%TYPE;
108: l_from_status_desc gmd_status.description%TYPE;
109: l_to_status_type gmd_status_b.status_type%TYPE;
110: l_to_status_desc gmd_status.description%TYPE;
111:
112: l_target_status gmd_status_next.target_status%TYPE;

Line 109: l_to_status_type gmd_status_b.status_type%TYPE;

105:
106: l_from_status gmd_status_b.status_code%TYPE;
107: l_from_status_type gmd_status_b.status_type%TYPE;
108: l_from_status_desc gmd_status.description%TYPE;
109: l_to_status_type gmd_status_b.status_type%TYPE;
110: l_to_status_desc gmd_status.description%TYPE;
111:
112: l_target_status gmd_status_next.target_status%TYPE;
113: l_rework_status gmd_status_next.rework_status%TYPE;

Line 110: l_to_status_desc gmd_status.description%TYPE;

106: l_from_status gmd_status_b.status_code%TYPE;
107: l_from_status_type gmd_status_b.status_type%TYPE;
108: l_from_status_desc gmd_status.description%TYPE;
109: l_to_status_type gmd_status_b.status_type%TYPE;
110: l_to_status_desc gmd_status.description%TYPE;
111:
112: l_target_status gmd_status_next.target_status%TYPE;
113: l_rework_status gmd_status_next.rework_status%TYPE;
114: l_pending_status gmd_status_next.pending_status%TYPE;

Line 112: l_target_status gmd_status_next.target_status%TYPE;

108: l_from_status_desc gmd_status.description%TYPE;
109: l_to_status_type gmd_status_b.status_type%TYPE;
110: l_to_status_desc gmd_status.description%TYPE;
111:
112: l_target_status gmd_status_next.target_status%TYPE;
113: l_rework_status gmd_status_next.rework_status%TYPE;
114: l_pending_status gmd_status_next.pending_status%TYPE;
115: l_mesg_text VARCHAR2(1000);
116:

Line 113: l_rework_status gmd_status_next.rework_status%TYPE;

109: l_to_status_type gmd_status_b.status_type%TYPE;
110: l_to_status_desc gmd_status.description%TYPE;
111:
112: l_target_status gmd_status_next.target_status%TYPE;
113: l_rework_status gmd_status_next.rework_status%TYPE;
114: l_pending_status gmd_status_next.pending_status%TYPE;
115: l_mesg_text VARCHAR2(1000);
116:
117: l_eSignature_status VARCHAR2(10);

Line 114: l_pending_status gmd_status_next.pending_status%TYPE;

110: l_to_status_desc gmd_status.description%TYPE;
111:
112: l_target_status gmd_status_next.target_status%TYPE;
113: l_rework_status gmd_status_next.rework_status%TYPE;
114: l_pending_status gmd_status_next.pending_status%TYPE;
115: l_mesg_text VARCHAR2(1000);
116:
117: l_eSignature_status VARCHAR2(10);
118: l_check_vr NUMBER;

Line 132: FROM gmd_status a, gmd_status_next b

128: -- Checks if there is a target status for current status */
129: CURSOR validate_To_status(vStatus_to VARCHAR2
130: ,vStatus_from VARCHAR2) IS
131: SELECT a.status_type, a.description, b.target_status
132: FROM gmd_status a, gmd_status_next b
133: WHERE a.status_code = vStatus_from
134: AND b.target_status = vStatus_to
135: AND a.status_code = b.current_status;
136:

Line 139: FROM gmd_status

135: AND a.status_code = b.current_status;
136:
137: CURSOR get_To_status_details(vStatus_to VARCHAR2) IS
138: SELECT status_type, description
139: FROM gmd_status
140: WHERE status_code = vStatus_to;
141:
142: -- Gets the recipe details and its current status code
143: CURSOR get_curr_recipe_status(vRecipe_id NUMBER

Line 217: FROM gmd_status s, gmd_recipe_validity_rules v

213: Cursor check_val_rules_800(vEntity_id NUMBER) IS
214: SELECT 1 from sys.dual
215: WHERE EXISTS (
216: SELECT recipe_validity_rule_id
217: FROM gmd_status s, gmd_recipe_validity_rules v
218: WHERE recipe_id = vEntity_id
219: AND v.validity_rule_status = s.status_code
220: AND (to_number(s.status_type) < to_number('800')
221: OR s.status_type = '900') );

Line 228: FROM gmd_status s, gmd_recipe_validity_rules v

224: Cursor check_val_rules_900(vEntity_id NUMBER) IS
225: SELECT 1 from sys.dual
226: WHERE EXISTS (
227: SELECT recipe_validity_rule_id
228: FROM gmd_status s, gmd_recipe_validity_rules v
229: WHERE recipe_id = vEntity_id
230: AND v.validity_rule_status = s.status_code
231: AND to_number(s.status_type) < to_number('800') );
232:

Line 238: FROM gmd_status s, gmd_recipe_validity_rules v

234: Cursor check_val_rules_1000(vEntity_id NUMBER) IS
235: SELECT 1 from sys.dual
236: WHERE EXISTS (
237: SELECT recipe_validity_rule_id
238: FROM gmd_status s, gmd_recipe_validity_rules v
239: WHERE recipe_id = vEntity_id
240: AND v.validity_rule_status = s.status_code
241: AND to_number(s.status_type) < to_number('1000') );
242:

Line 288: FROM gmd_status

284: -- defining internal functions
285: FUNCTION get_status_meaning(P_status_code IN VARCHAR2) RETURN VARCHAR2 IS
286: CURSOR Cur_get IS
287: SELECT meaning
288: FROM gmd_status
289: WHERE status_code = P_status_code;
290:
291: l_meaning gmd_status.meaning%TYPE;
292: BEGIN

Line 291: l_meaning gmd_status.meaning%TYPE;

287: SELECT meaning
288: FROM gmd_status
289: WHERE status_code = P_status_code;
290:
291: l_meaning gmd_status.meaning%TYPE;
292: BEGIN
293: OPEN Cur_get;
294: FETCH Cur_get INTO l_meaning;
295: CLOSE Cur_get;

Line 325: IF NOT FND_API.compatible_api_call ( GMD_STATUS_PUB.m_api_version

321: RAISE setup_failure;
322: END IF;
323:
324: /* Make sure we have call compatibility */
325: IF NOT FND_API.compatible_api_call ( GMD_STATUS_PUB.m_api_version
326: ,p_api_version
327: ,l_api_name
328: ,GMD_STATUS_PUB.m_pkg_name) THEN
329: x_return_status := FND_API.G_RET_STS_ERROR;

Line 328: ,GMD_STATUS_PUB.m_pkg_name) THEN

324: /* Make sure we have call compatibility */
325: IF NOT FND_API.compatible_api_call ( GMD_STATUS_PUB.m_api_version
326: ,p_api_version
327: ,l_api_name
328: ,GMD_STATUS_PUB.m_pkg_name) THEN
329: x_return_status := FND_API.G_RET_STS_ERROR;
330: RAISE invalid_version;
331: END IF;
332:

Line 622: IF (NOT gmd_status_code.check_parent_status(l_entity_name

618: IF (l_debug = 'Y') THEN
619: gmd_debug.put_line('Checking the Parent status dependency for '||l_entity_name);
620: END IF;
621: IF (to_number(l_to_status_type) IN (800, 1000)) THEN
622: IF (NOT gmd_status_code.check_parent_status(l_entity_name
623: ,l_entity_id)) THEN
624: SELECT DECODE(l_entity_name,
625: 'FORMULA','GMD_FORMULA_INUSE',
626: 'RECIPE','GMD_RECIPE_BTCH_DEP',

Line 662: IF NOT ( GMD_STATUS_CODE.CHECK_DEPENDENT_STATUS

658: 'ROUTING',4,
659: 'VALIDITY',5) INTO l_entity_value
660: FROM sys.dual;
661:
662: IF NOT ( GMD_STATUS_CODE.CHECK_DEPENDENT_STATUS
663: (l_entity_value,
664: l_entity_id,
665: l_from_status,
666: P_to_status) ) THEN

Line 674: FND_MESSAGE.SET_NAME('GMD', 'GMD_STATUS_DEPEND_NOT_APPROVED');

670: * least one operation which is not approved. The function
671: * returns TRUE if entity does not have dependents (formula,
672: * operation) or if to_status does not require the check
673: * (frozen, on-hold, obsolete, some version of New). */
674: FND_MESSAGE.SET_NAME('GMD', 'GMD_STATUS_DEPEND_NOT_APPROVED');
675: FND_MSG_PUB.ADD;
676: x_return_status := FND_API.g_ret_sts_error;
677: RAISE status_update_failure;
678: ELSE

Line 762: l_pending_status := GMD_STATUS_CODE.get_pending_status

758: IF (l_debug = 'Y') THEN
759: gmd_debug.put_line('About to get the pending and rework status ');
760: END IF;
761: /* Added the following code as part of ERES Implementation */
762: l_pending_status := GMD_STATUS_CODE.get_pending_status
763: (p_from_status => l_from_status
764: ,p_to_status => P_to_status);
765:
766: l_rework_status := GMD_STATUS_CODE.get_rework_status

Line 766: l_rework_status := GMD_STATUS_CODE.get_rework_status

762: l_pending_status := GMD_STATUS_CODE.get_pending_status
763: (p_from_status => l_from_status
764: ,p_to_status => P_to_status);
765:
766: l_rework_status := GMD_STATUS_CODE.get_rework_status
767: (p_from_status => l_from_status
768: ,p_to_status => P_to_status);
769:
770: IF (l_debug = 'Y') THEN

Line 795: gmd_debug.put_line('In GMD Status Pub - About call ERES Util for update Recipe ');

791:
792: ELSIF (l_entity_name = 'RECIPE') THEN
793:
794: IF l_debug = 'Y' THEN
795: gmd_debug.put_line('In GMD Status Pub - About call ERES Util for update Recipe ');
796: END IF;
797:
798: GMD_ERES_UTILS.update_recipe_status
799: (p_recipe_id => l_entity_id

Line 810: gmd_debug.put_line('In GMD Status Pub - After call ERES Util for update Recipe ');

806: ,p_called_from_form => 'T'
807: ,x_return_status => l_eSignature_status);
808:
809: IF l_debug = 'Y' THEN
810: gmd_debug.put_line('In GMD Status Pub - After call ERES Util for update Recipe ');
811: END IF;
812:
813: ELSIF(l_entity_name = 'OPERATION') THEN
814:

Line 853: gmd_debug.put_line('In GMD Status Pub - About call ERES Util for update substitution ');

849: -- Bug 5394532
850: ELSIF (l_entity_name = 'SUBSTITUTION') THEN
851:
852: IF l_debug = 'Y' THEN
853: gmd_debug.put_line('In GMD Status Pub - About call ERES Util for update substitution ');
854: END IF;
855:
856: GMD_ERES_UTILS.update_substitution_status
857: (p_substitution_id => l_entity_id

Line 866: gmd_debug.put_line('In GMD Status Pub - After call ERES Util for update substitution ');

862: ,p_called_from_form => 'T'
863: ,x_return_status => l_eSignature_status);
864:
865: IF l_debug = 'Y' THEN
866: gmd_debug.put_line('In GMD Status Pub - After call ERES Util for update substitution ');
867: END IF;
868: END IF;
869:
870: IF (l_debug = 'Y') THEN

Line 955: fnd_msg_pub.add_exc_msg (gmd_status_pub.m_pkg_name, l_api_name);

951: ,p_encoded => FND_API.g_false
952: ,p_data => x_message_list);
953: WHEN OTHERS THEN
954: ROLLBACK TO SAVEPOINT modify_status;
955: fnd_msg_pub.add_exc_msg (gmd_status_pub.m_pkg_name, l_api_name);
956: IF (l_debug = 'Y') THEN
957: gmd_debug.put_line (m_pkg_name||'.'||l_api_name||':'||'When others exception:'||SQLERRM);
958: END IF;
959: fnd_msg_pub.count_and_get (

Line 966: END GMD_STATUS_PUB;

962: ,p_data => x_message_list);
963: x_return_status := FND_API.g_ret_sts_unexp_error;
964: END Modify_status;
965:
966: END GMD_STATUS_PUB;