DBA Data[Home] [Help]

PACKAGE BODY: APPS.QA_SS_ATTACHMENT

Source


1 PACKAGE BODY qa_ss_attachment AS
2 /* $Header: qltssatb.plb 115.5 2002/11/27 19:30:32 jezheng ship $ */
3 
4     --
5     -- Some useful constants
6     --
7 
8     QUERY_ONLY constant varchar2(1) := 'Y';   -- set to 'N' if writable.
9 
10     QA_PLANS_FUNCTION constant varchar2(10) := 'QAPLMDF';
11     QA_PLANS_ENTITY   constant varchar2(10) := 'QA_PLANS';
12 
13     QA_SPECS_FUNCTION constant varchar2(10) := 'QASPECF';
14     QA_SPECS_ENTITY   constant varchar2(10) := 'QA_SPECS';
15 
16 
17 
18     --
19     -- Attachment Entry Points for Collection Plans.
20     --
21 
22     --
23     -- This function whether there is attachment for the plan.
24     -- Returns DISABLED if there is attachment cannot be used.
25     --         FULL if attachment can be used and there is an attachment.
26     --         EMPTY if attachment can be used but there is no attachment.
27     --
28     FUNCTION qa_plans_attachment_status(plan_id number) RETURN varchar2 IS
29         status varchar2(20);
30     BEGIN
31         fnd_webattch.GetSummaryStatus(
32 	    x_function_name => QA_PLANS_FUNCTION,
33 	    x_entity_name => QA_PLANS_ENTITY,
34 	    x_pk1_value => to_char(plan_id),      -- PK values 1 to 5
35 	    attchmt_status => status);
36         RETURN status;
37     END qa_plans_attachment_status;
38 
39     --
40     -- This function calls the fnd_webattach.ReloadSummary procedure to start
41     -- viewing the attachment.  If from_url is specified, then the Back
42     -- icon in the attachment form will take user back to this URL.
43     --
44     PROCEDURE qa_plans_view_attachment(plan_id number,
45         from_url varchar2 DEFAULT null) IS
46     BEGIN
47         fnd_webattch.ReloadSummary(
48 	    function_name => QA_PLANS_FUNCTION,
49 	    entity_name => QA_PLANS_ENTITY,
50 	    pk1_value => to_char(plan_id),
51 	    from_url => from_url,
52 	    query_only => QUERY_ONLY);
53     END qa_plans_view_attachment;
54 
55 
56     --
57     -- Attachment Entry Points for Specifications.
58     --
59 
60     --
61     -- This function whether there is attachment for the spec.
62     -- Returns DISABLED if there is attachment cannot be used.
63     --         FULL if attachment can be used and there is an attachment.
64     --         EMPTY if attachment can be used but there is no attachment.
65     --
66     FUNCTION qa_specs_attachment_status(spec_id number) RETURN varchar2 IS
67         status varchar2(20);
68     BEGIN
69         fnd_webattch.GetSummaryStatus(
70 	    x_function_name => QA_SPECS_FUNCTION,
71 	    x_entity_name => QA_SPECS_ENTITY,
72 	    x_pk1_value => to_char(spec_id),      -- PK values 1 to 5
73 	    attchmt_status => status);
74         RETURN status;
75     END qa_specs_attachment_status;
76 
77     --
78     -- This function calls the fnd_webattach.ReloadSummary procedure to start
79     -- viewing the attachment.  If from_url is specified, then the Back
80     -- icon in the attachment form will take user back to this URL.
81     --
82     PROCEDURE qa_specs_view_attachment(spec_id number,
83         from_url varchar2 DEFAULT null) IS
84     BEGIN
85         fnd_webattch.ReloadSummary(
86 	    function_name => QA_SPECS_FUNCTION,
87 	    entity_name => QA_SPECS_ENTITY,
88 	    pk1_value => to_char(spec_id),
89 	    from_url => from_url,
90 	    query_only => QUERY_ONLY);
91     END qa_specs_view_attachment;
92 
93 END qa_ss_attachment;
94