DBA Data[Home] [Help]

PACKAGE: APPS.PAY_NL_IZA_UPLOAD

Source


1 PACKAGE PAY_NL_IZA_UPLOAD AS
2 /* $Header: pynlizau.pkh 120.0 2005/05/29 06:55:53 appldev noship $ */
3 level_cnt NUMBER;
4 
5 c_default_action_if_exists   CONSTANT VARCHAR2 (1)  := 'R';
6 
7 
8 
9 /*--------------------------------------------------------------------
10 |Name       : iza_upload              	                             |
11 |Type	    : Procedure				                     |
12 |Description: This Procedure initiates the IZA upload process. It    |
13 |	      takes in the parameters passed from the information in |
14 |	      concurrent program definition and calls various        |
15 |	      procedures for inserting data into pay_batch_headers   |
16 |             and pay_batch_lines table.                             |
17 ----------------------------------------------------------------------*/
18 
19 
20 PROCEDURE iza_upload(	errbuf                     OUT NOCOPY   VARCHAR2,
21 			retcode                    OUT NOCOPY   NUMBER,
22 			p_file_name                IN       VARCHAR2,
23 			p_batch_name               IN       VARCHAR2,
24 			p_effective_date           IN       VARCHAR2,
25 			p_business_group_id        IN       per_business_groups.business_group_id%TYPE,
26 			p_action_if_exists         IN       VARCHAR2 DEFAULT NULL,
27 			p_dummy_action_if_exists   IN	    VARCHAR2 DEFAULT NULL,
28 			p_date_effective_changes   IN       VARCHAR2 DEFAULT NULL
29 		      ) ;
30 
31 
32 /*-----------------------------------------------------------------------
33 |Name       : iza_validation                                            |
34 |Type	    : Procedure				                        |
35 |Description: Procedure to validate the Data Record. This procedure     |
36 |	      decides if the record needs to be processed or rejected   |
37 |	      If the record needs to rejected, this Procedure           |
38 |	      sets the value of the OUT parameter p_reject_reason_code  |
39 |             equalt to the reject reason code as given in the          |
40 |             NL_IZA_REJECT_REASON lookup. Else the p_reject_reason_code|
41 |             is set to '00'                                            |
42 -----------------------------------------------------------------------*/
43 
44 PROCEDURE iza_validation(p_business_group_id	IN NUMBER
45 		        ,p_period_start_date 	IN DATE
46 		        ,p_period_end_date 	IN DATE
47 		        ,p_exchange_number 	IN VARCHAR2
48 		        ,p_client_num		IN VARCHAR2
49 		        ,p_sub_emplr_num	IN VARCHAR2
50 			,p_org_id		IN NUMBER
51 			,p_org_struct_version_id IN NUMBER
52 		        ,p_person_id		OUT NOCOPY NUMBER
53 		        ,p_assignment_id	OUT NOCOPY NUMBER
54 		        ,p_assignment_num	OUT NOCOPY VARCHAR2
55 		        ,p_reject_reason_code	OUT NOCOPY VARCHAR2) ;
56 
57 
58 
59 /*--------------------------------------------------------------------
60 |Name       : val_create_batch_line              	             |
61 |Type	    : Procedure				                     |
62 |Description: This procedure will take in the Data Record, validates |
63 |	      it and decides if it needs to be processed or rejected |
64 |	      by calling the function iza_validation.                |
65 |	      After validation it calls the wrapper procedure        |
66 |             create_batch_line to create a record in pay_batch_lines|
67 |             It also creates the record in the table                |
68 |             PAY_NL_IZA_UPLD_STATUS table for Rejected and Processed|
69 |             records.                                               |
70 ----------------------------------------------------------------------*/
71 
72 Procedure val_create_batch_line( p_line_read IN VARCHAR2
73 		    		,p_batch_id IN NUMBER
74 		    		,p_batch_seq IN NUMBER
75 		    		,p_process_yr_mm IN VARCHAR2
76 		    		,p_payroll_center IN VARCHAR2
77 		    		,p_org_id IN NUMBER
78 		    		,p_org_struct_version_id IN NUMBER
79 		    		,p_bg_id IN NUMBER
80 		    		,p_eff_date IN DATE
81 		    		,p_batch_line_id OUT NOCOPY NUMBER
82 		    		,p_bl_ovn OUT NOCOPY NUMBER);
83 
84 
85 /*--------------------------------------------------------------------
86 |Name       : create_batch_header              	                     |
87 |Type	    : Procedure				                     |
88 |Description: This procedure is a wrapper over the core              |
89 |             create_batch_header procedure defined in               |
90 |             PAY_BATCH_ELEMENT_ENTRY_API                            |
91 ----------------------------------------------------------------------*/
92 
93 
94 PROCEDURE create_batch_header (p_effective_date           IN       	DATE
95 			      ,p_name                     IN       	VARCHAR2
96 			      ,p_bg_id                    IN       	NUMBER
97 			      ,p_action_if_exists         IN       	VARCHAR2 DEFAULT c_default_action_if_exists
98 			      ,p_date_effective_changes   IN		VARCHAR2 DEFAULT NULL
99 			      ,p_batch_id                 OUT NOCOPY  	NUMBER
100 			      ,p_ovn                      OUT NOCOPY  	NUMBER
101 			      );
102 
103 
104 
105 /*--------------------------------------------------------------------
106 |Name       : create_batch_line              	                     |
107 |Type	    : Procedure				                     |
108 |Description: This procedure is a wrapper over the core              |
109 |	      create_batch_line procedure defined in                 |
110 |	      PAY_BATCH_ELEMENT_ENTRY_API                            |
111 ----------------------------------------------------------------------*/
112 
113 
114 PROCEDURE create_batch_line (p_session_date                  DATE
115 			    ,p_batch_id                      pay_batch_lines.batch_id%TYPE
116 			    ,p_assignment_id                 pay_batch_lines.assignment_id%TYPE
117 			    ,p_assignment_number             pay_batch_lines.assignment_number%TYPE
118 			    ,p_batch_sequence                pay_batch_lines.batch_sequence%TYPE
119 			    ,p_effective_date                pay_batch_lines.effective_date%TYPE
120 			    ,p_date_earned                   pay_batch_lines.date_earned%TYPE
121 			    ,p_element_name                  pay_batch_lines.element_name%TYPE
122 			    ,p_element_type_id               pay_batch_lines.element_type_id%TYPE
123 			    ,p_value_1                       pay_batch_lines.value_1%TYPE
124 			    ,p_bline_id     		     OUT NOCOPY  NUMBER
125 			    ,p_obj_vn			     OUT NOCOPY  NUMBER
126 			    );
127 
128 
129 
130 /*-----------------------------------------------------------------------
131 |Name       : purge_iza_process_status              	                |
132 |Type	    : Procedure				                        |
133 |Description: Driving Procedure for the concurrent program for          |
134 |             IZA Upload Purge Process. This Procedure will purge all   |
135 |             the records from the Process Status table that are no     |
136 |             longer required                                           |
137 -----------------------------------------------------------------------*/
138 
139 
140 procedure purge_iza_process_status (p_errbuf            OUT     NOCOPY  VARCHAR2
141 				   ,p_retcode		OUT     NOCOPY  VARCHAR2
142 				   ,p_business_group_id IN      NUMBER
143 				   ,p_month_from 	IN      VARCHAR2
144 				   ,p_month_to	    	IN      VARCHAR2
145 				   ,p_org_struct_id	IN	NUMBER
146 				   ,p_employer_id	IN      NUMBER
147 				   ) ;
148 
149 END PAY_NL_IZA_UPLOAD;
150 
151