DBA Data[Home] [Help]

PACKAGE: APPS.QA_PARENT_CHILD_COPY_PKG

Source


1 PACKAGE QA_PARENT_CHILD_COPY_PKG AUTHID CURRENT_USER as
2 /* $Header: qapccps.pls 120.0.12020000.2 2012/07/03 14:36:49 ntungare ship $ */
3 
4    --this record type is used as the value in the plan_htable below for
5    --tracking characteristics related to a copied plan
6    TYPE plan_info IS RECORD (src_name   qa_plans.name%TYPE,
7                              dest_name  qa_plans.name%TYPE,
8                              dest_id    NUMBER);
9 
10    --this htable is used to keep track of the information parsed by setup_plans
11    --from the flatstring passed to it
12    TYPE plan_htable IS TABLE OF plan_info INDEX BY BINARY_INTEGER;
13    TYPE id_htable IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
14 
15    --special processing constants that should be the same in the Java that calls SETUP_PLANS
16    SP_NCM CONSTANT VARCHAR2(3) := 'NCM';
17 
18    --record used by NCM special processing to store search text and replacment text
19    TYPE ncm_repl_info IS RECORD (search_str1 VARCHAR2(30),
20                                  repl_str1   VARCHAR2(30),
21                                  search_str2 VARCHAR2(30),
22                                  repl_str2   VARCHAR2(30),
23                                  search_str3 VARCHAR2(30),
24                                  repl_str3   VARCHAR2(30));
25    TYPE ncm_repl_htable IS TABLE OF ncm_repl_info INDEX BY BINARY_INTEGER;
26 
27    --constants for NCM special processing, string to look for during action text replacement
28    SP_NCM_COMMENT_CHAR CONSTANT VARCHAR2(1) := '/';
29    SP_NCM_DELIM_CHAR1 CONSTANT VARCHAR2(1) := '''';
30    SP_NCM_DELIM_CHAR2 CONSTANT VARCHAR2(1) := '"';
31    SP_NCM_PLAN_NAME_SUFFIX CONSTANT VARCHAR2(30) := SP_NCM_COMMENT_CHAR||'*ORA$QA_PLAN_NAME*'||SP_NCM_COMMENT_CHAR;
32    SP_NCM_VIEW_NAME_SUFFIX CONSTANT VARCHAR2(30) := SP_NCM_COMMENT_CHAR||'*ORA$QA_VIEW_NAME*'||SP_NCM_COMMENT_CHAR;
33    SP_NCM_IMPORT_NAME_SUFFIX CONSTANT VARCHAR2(30) := SP_NCM_COMMENT_CHAR||'*ORA$QA_IMPORT_NAME*'||SP_NCM_COMMENT_CHAR;
34    TYPE ncm_suffix_list_t IS TABLE OF VARCHAR(30);
35 
36    --this function copies the plan relationships, element relationships and criteria
37    --associated with the source parent/child to the target parent/child tables
38    --p_call_mapping is either fnd_api.g_true or fnd_api.g_false, it g_true then it calls the UI mapping code for
39    --the new parent plan and new child plan
40    --returns fnd_api.g_true on success, fnd_api.g_false on failure
41    PROCEDURE COPY_ALL(p_source_parent_plan_id   IN  NUMBER,
42                       p_source_child_plan_id    IN  NUMBER,
43                       p_target_parent_plan_id   IN  NUMBER,
44                       p_target_child_plan_id    IN  NUMBER,
45                       p_call_mapping            IN  VARCHAR2,
46                       x_return_status           OUT NOCOPY VARCHAR2);
47 
48 
49 
50 
51 
52    -- Bug 3926150. Performance: searching on softcoded element improved by functional indexes.
53    -- Added new OUT parameter x_index_drop_list, which is a comma seperated list of collection
54    -- element names whose functional index must be dropped/regenerated.
55    -- Please see bugdb/design document for more details.
56    -- srhariha. Tue Nov 30 11:59:20 PST 2004
57 
58    --This function is used by the self-service schema copy application to
59    --perform the actual copy operations.
60    --PARAMETERS:
61    -- p_src_org_id         => source orgnization_id
62    -- p_dest_org_code      => destination organization_code(code instead of name to match copy plan api)
63    -- p_plans_flatstring   => an encoded string of the form:
64    --                         <SrcPlanId1>=<SrcPlanName1>,<DestPlanName1>@<SrcPlanId2>=
65    --                         <SrcPlanName2>,<DestPlanName2>@etc..
66    -- p_root_plan_src_id   => plan_id of the root source plan
67    -- x_root_plan_dest_id  => plan_id of the newly created destination root plan
68    -- p_special_proc_field => string of the form <SpecialProc1>@<SpecialProc2>... containing special
69    --                         processing identifiers that need to be applied to the duplicate schema
70    -- p_disable_plans      => values: Y/N, if Y then set the 'Effective To' on all new plans to the past
71    -- x_return_msg         => return message text that's useful when the function returns -1
72    -- x_index_drop_list    => return comma sepearated list of collection element names whose
73    --                         functional index must be dropped/regenerated.
74 
75    -- returns 0 on success, -1 on error
76    FUNCTION SETUP_PLANS(p_src_org_id            IN  VARCHAR2,
77                         p_dest_org_code         IN  VARCHAR2,
78                         p_plans_flatstring      IN  VARCHAR2,
79                         p_root_plan_src_id      IN  VARCHAR2,
80                         x_root_plan_dest_id     OUT NOCOPY NUMBER,
81                         p_special_proc_field    IN  VARCHAR2,
82                         p_disable_plans         IN  VARCHAR2 DEFAULT NULL,
83                         x_return_msg            OUT NOCOPY VARCHAR2,
84                         x_index_drop_list       OUT NOCOPY VARCHAR2)
85                         RETURN INTEGER;
86 
87 END QA_PARENT_CHILD_COPY_PKG;