DBA Data[Home] [Help]

PACKAGE: APPS.GCS_INTERCO_PROCESSING_PKG

Source


1 PACKAGE GCS_INTERCO_PROCESSING_PKG as
2 /* $Header: gcsicpes.pls 120.1 2005/10/30 05:18:45 appldev noship $ */
3 
4  -- Definition of Global Data Types and Variables
5   --
6   -- Procedure
7   --   interco_process_main
8   -- Purpose
9   --   This is the main routine in the intercompany elimination entry
10   --   processing engine.
11   --   Important steps in this routine.
12 	-- 1)	Get the period information.
13 	-- 2)	Get the consolidation entity information like currency,
14         --      matching rule.
15         -- 3)	Get all the subsidiaries for the given consolidation entity.
16      	-- 4)	Based on the mode of consolidation run possible values
17         --      are Full and Incremental, populate GCS_INTERCO_HDR_GT
18         --      with corresponding information. In the same table also
19         --      populate previous consolidation run intercompany entry
20         --      header id and new rows information.
21 	-- 5)   Copy all the Intercompany transactions into the
22 	--      GCS_ENTRY_LINES by calling Insr_Interco_Lines routine.
23 	-- 6)   After successful suspense plug-in insert the header
24         --      entries into the GCS_ENTRY_HEADERS table by calling
25         --      the Insert Header procedure.
26         -- 7)   Maintain the GCS_CONS_ENG_RUN_DTLS table.
27         -- 8)   All the above processing has to be completed in one
28         --      commit cycle. So here we may COMMIT.
29         -- 10)  After inserting elimination headers, call the
30         --      delete procedure to delete all the processed rows
31         --      from the GCS_INTERCO_ELM_TRX table.
32 
33   -- Arguments
34   -- Notes
35 
36   PROCEDURE interco_process_main(p_hierarchy_id IN NUMBER,
37                                  p_cal_period_id IN NUMBER,
38 				 p_entity_id IN NUMBER,
39 				 p_balance_type  VARCHAR2,
40 				 p_elim_mode  IN VARCHAR2,
41 				 p_currency_code IN VARCHAR2,
42                                  p_run_name IN VARCHAR2,
43                                  p_translation_required IN VARCHAR2,
44                                  x_errbuf OUT NOCOPY VARCHAR2,
45                                  x_retcode OUT NOCOPY VARCHAR2);
46 
47  --
48   -- Function
49   --   insr_interco_hdrs
50   -- Purpose
51   --   This routine is responsible for inserting distinct pairs of entities
52   --   for each intercompany rule into the global temporary table
53   --   GCS_INTERCO_HDR_GT.
54 
55  FUNCTION  INSR_INTERCO_HDRS   ( p_hierarchy_id IN NUMBER,
56                                  p_cal_period_id IN NUMBER,
57                                  p_entity_id IN NUMBER,
58 				 p_balance_type  VARCHAR2,
59 				 p_elim_mode  IN VARCHAR2,
60                                  p_xlation_required IN VARCHAR2,
61 				 p_currency_code IN VARCHAR2) RETURN BOOLEAN;
62 
63 
64 
65 
66  --
67   -- Function
68   --   insr_elimination_hdrs
69   -- Purpose
70   --  Inserts elimination entry headers into GCS_ENTRY_HEADERS.
71   --
72 
73   -- Process steps are as follows:
74      --  If the threshold currency of a intercompnay rule is diffrent from
75      --  consolidation entity currency, then get the conversion rate for the
76      --  target currency.
77 
78      --  Then insert elimination entries headers into GCS_ENTRY_HEADERS.
79 
80      --  Then raise a warning if suspense exceeded for a pair of entities.
81 
82 
83   FUNCTION  INSR_ELIMINATION_HDRS(p_hierarchy_id IN NUMBER,
84                                   p_cal_period_id IN NUMBER,
85                                   p_entity_id IN NUMBER,
86 				  p_balance_type  VARCHAR2,
87 				  p_currency_code IN VARCHAR2)
88             RETURN BOOLEAN;
89 
90 
91   END GCS_INTERCO_PROCESSING_PKG;