[Home] [Help]
PACKAGE BODY: APPS.GMD_SS_ERES_PKG
Source
1 PACKAGE BODY GMD_SS_ERES_PKG AS
2 /* $Header: GMDQSERB.pls 115.1 2003/04/30 14:09:40 hsaleeb noship $ */
3
4 /* ######################################################################## */
5
6 PROCEDURE GET_TO_STATUS(
7 /* procedure to get target status desc */
8 p_instatus IN NUMBER,
9 p_outstatus_desc OUT NOCOPY VARCHAR2
10 ) is
11
12 target_status number;
13 target_status_desc VARCHAR2(240);
14
15 cursor c is
16 select meaning
17 from gmd_qc_status_tl
18 where status_code = target_status
19 and entity_type = 'STABILITY'
20 and language = USERENV('LANG') ;
21
22 begin
23
24 if (p_instatus = 400) then
25 /* requesting Approval */
26 target_status := 200;
27 elsif (p_instatus = 700) then
28 /* requesting Launch */
29 target_status := 500;
30 elsif (p_instatus = 1000) then
31 /* requesting Cancel */
32 target_status := 900;
33 end if;
34
35
36 open c;
37 fetch c into target_status_desc;
38 close c;
39
40 p_outstatus_desc := target_status_desc ;
41
42 end GET_TO_STATUS;
43
44
45 PROCEDURE GET_RESOURCE_DESC(
46 /* procedure to get Resource Description */
47 p_se_id IN NUMBER,
48 p_resource_desc OUT NOCOPY VARCHAR2
49 ) IS
50
51 Cursor C1 is
52 SELECT cr.resource_desc
53 from cr_rsrc_mst cr,
54 gmp_resource_instances ri,
55 cr_rsrc_dtl rd,
56 gmd_sampling_events samples
57 WHERE samples.sampling_event_id = p_se_id
58 and ri.inactive_ind = 0
59 and rd.resource_id = ri.resource_id
60 and rd.orgn_code = Samples.orgn_code
61 and cr.resources = samples.resources
62 and rd.resources = samples.resources
63 and ri.instance_id = samples.instance_id
64 and cr.delete_mark = 0 ;
65
66
67 begin
68
69 open c1;
70 fetch c1 into p_resource_desc ;
71 close c1;
72
73 end GET_RESOURCE_DESC ;
74
75
76
77
78 END GMD_SS_ERES_PKG ;