DBA Data[Home] [Help]

APPS.EC_OUTBOUND dependencies on EC_UTILS

Line 19: The Cursor handles are stored in the ec_utils.g_int_levels(i).cursor_handle.

15: c_local_chr_13 varchar2(1) := fnd_global.local_chr(13);
16:
17: /**
18: Build and Parses the Insert Statement for insert into ece_stage for each Level.
19: The Cursor handles are stored in the ec_utils.g_int_levels(i).cursor_handle.
20: **/
21: procedure parse_insert_statement
22: (
23: i_level in pls_integer

Line 48: for i in ec_utils.g_int_levels(i_level).file_start_pos..ec_utils.g_int_levels(i_level).file_end_pos

44: cValue_stmt := cValue_stmt||':a1 ,:a2 ,:a3 ,:a4 ,:a5,:a6,:a7,:a8,:a9 ,';
45: cValue_stmt := cValue_stmt||':w1 ,:w2 ,:w3 ,:w4 ,';
46:
47: --- Add Variable Columns for the Record
48: for i in ec_utils.g_int_levels(i_level).file_start_pos..ec_utils.g_int_levels(i_level).file_end_pos
49: loop
50: if ec_utils.g_file_tbl(i).staging_column is not null
51: then
52: --- Build Insert Statement

Line 50: if ec_utils.g_file_tbl(i).staging_column is not null

46:
47: --- Add Variable Columns for the Record
48: for i in ec_utils.g_int_levels(i_level).file_start_pos..ec_utils.g_int_levels(i_level).file_end_pos
49: loop
50: if ec_utils.g_file_tbl(i).staging_column is not null
51: then
52: --- Build Insert Statement
53: cInsert_stmt := cInsert_stmt||' '||ec_utils.g_file_tbl(i).staging_column|| ',';
54: cValue_stmt := cvalue_stmt || ':b'||i||',';

Line 53: cInsert_stmt := cInsert_stmt||' '||ec_utils.g_file_tbl(i).staging_column|| ',';

49: loop
50: if ec_utils.g_file_tbl(i).staging_column is not null
51: then
52: --- Build Insert Statement
53: cInsert_stmt := cInsert_stmt||' '||ec_utils.g_file_tbl(i).staging_column|| ',';
54: cValue_stmt := cvalue_stmt || ':b'||i||',';
55: end if;
56: end loop;
57:

Line 77: ec_utils.g_ext_levels(i_level).cursor_handle := i_insert_cursor;

73: if ec_debug.G_debug_level = 3 then
74: ec_debug.pl(3,'i_insert_cursor',i_insert_cursor);
75: end if;
76:
77: ec_utils.g_ext_levels(i_level).cursor_handle := i_insert_cursor;
78:
79: begin
80: dbms_sql.parse(i_Insert_Cursor,cInsert_stmt,dbms_sql.native);
81: exception

Line 86: ec_utils.i_ret_code :=2;

82: when others then
83: error_position := dbms_sql.last_error_position;
84: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_OUTBOUND.PARSE_INSERT_STATEMENT');
85: ece_error_handling_pvt.print_parse_error (error_position,cInsert_stmt);
86: ec_utils.i_ret_code :=2;
87: raise EC_UTILS.PROGRAM_EXIT;
88: end;
89: if ec_debug.G_debug_level >= 2 then
90: ec_debug.pop('EC_OUTBOUND.PARSE_INSERT_STATEMENT');

Line 87: raise EC_UTILS.PROGRAM_EXIT;

83: error_position := dbms_sql.last_error_position;
84: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_OUTBOUND.PARSE_INSERT_STATEMENT');
85: ece_error_handling_pvt.print_parse_error (error_position,cInsert_stmt);
86: ec_utils.i_ret_code :=2;
87: raise EC_UTILS.PROGRAM_EXIT;
88: end;
89: if ec_debug.G_debug_level >= 2 then
90: ec_debug.pop('EC_OUTBOUND.PARSE_INSERT_STATEMENT');
91: end if;

Line 94: WHEN EC_UTILS.PROGRAM_EXIT then

90: ec_debug.pop('EC_OUTBOUND.PARSE_INSERT_STATEMENT');
91: end if;
92:
93: EXCEPTION
94: WHEN EC_UTILS.PROGRAM_EXIT then
95: raise;
96: WHEN OTHERS THEN
97: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_OUTBOUND.PARSE_INSERT_STATEMENT');
98: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);

Line 99: ec_utils.i_ret_code :=2;

95: raise;
96: WHEN OTHERS THEN
97: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_OUTBOUND.PARSE_INSERT_STATEMENT');
98: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
99: ec_utils.i_ret_code :=2;
100: raise EC_UTILS.PROGRAM_EXIT;
101: END parse_insert_statement;
102:
103: /**

Line 100: raise EC_UTILS.PROGRAM_EXIT;

96: WHEN OTHERS THEN
97: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_OUTBOUND.PARSE_INSERT_STATEMENT');
98: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
99: ec_utils.i_ret_code :=2;
100: raise EC_UTILS.PROGRAM_EXIT;
101: END parse_insert_statement;
102:
103: /**
104: Prepares the Select statement for the ec_views on the base Oracle Applications tables.

Line 120: iRow_count pls_integer := ec_utils.g_file_tbl.COUNT;

116: cDATE VARCHAR2(40) := ',''YYYYMMDD HH24MISS'')';
117: cWord1 VARCHAR2(20) := ' ';
118: cWord2 VARCHAR2(40) := ' ';
119:
120: iRow_count pls_integer := ec_utils.g_file_tbl.COUNT;
121:
122: BEGIN
123: if ec_debug.G_debug_level >= 2 then
124: EC_DEBUG.PUSH('EC_OUTBOUND.SELECT_CLAUSE');

Line 128: For i in ec_utils.g_int_levels(i_level).file_start_pos..ec_utils.g_int_levels(i_level).file_end_pos

124: EC_DEBUG.PUSH('EC_OUTBOUND.SELECT_CLAUSE');
125: EC_DEBUG.PL(3, 'i_level',i_level);
126: end if;
127:
128: For i in ec_utils.g_int_levels(i_level).file_start_pos..ec_utils.g_int_levels(i_level).file_end_pos
129: loop
130: -- **************************************
131: -- apply appropriate data conversion
132: -- convert everything to VARCHAR

Line 135: if 'DATE' = ec_utils.g_file_tbl(i).data_type Then

131: -- apply appropriate data conversion
132: -- convert everything to VARCHAR
133: -- **************************************
134:
135: if 'DATE' = ec_utils.g_file_tbl(i).data_type Then
136: cWord1 := cTO_CHAR;
137: cWord2 := cDATE;
138:
139: elsif 'NUMBER' = ec_utils.g_file_tbl(i).data_type Then

Line 139: elsif 'NUMBER' = ec_utils.g_file_tbl(i).data_type Then

135: if 'DATE' = ec_utils.g_file_tbl(i).data_type Then
136: cWord1 := cTO_CHAR;
137: cWord2 := cDATE;
138:
139: elsif 'NUMBER' = ec_utils.g_file_tbl(i).data_type Then
140: cWord1 := cTO_CHAR;
141: cWord2 := ')';
142: else
143: cWord1 := NULL;

Line 149: nvl(ec_utils.g_file_tbl(i).base_column_Name,'NULL') || cWord2 || ',';

145: END if;
146:
147: -- build SELECT statement
148: cSelect_stmt := cSelect_stmt || ' ' || cWord1 ||
149: nvl(ec_utils.g_file_tbl(i).base_column_Name,'NULL') || cWord2 || ',';
150: End Loop;
151:
152: -- build FROM, WHERE statements
153:

Line 154: cFrom_stmt := cFrom_Stmt||' '||ec_utils.g_int_levels(i_level).base_table_name;

150: End Loop;
151:
152: -- build FROM, WHERE statements
153:
154: cFrom_stmt := cFrom_Stmt||' '||ec_utils.g_int_levels(i_level).base_table_name;
155:
156: cSelect_stmt := RTRIM(cSelect_stmt, ',');
157: i_Where_string := cSelect_stmt||' '||cFrom_stmt||' '||cWhere_Stmt;
158:

Line 168: ec_utils.i_ret_code :=2;

164: exception
165: when others then
166: EC_DEBUG.PL(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_OUTBOUND.SELECT_CLAUSE');
167: EC_DEBUG.PL(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
168: ec_utils.i_ret_code :=2;
169: raise EC_UTILS.PROGRAM_EXIT;
170: END select_clause;
171:
172: /**

Line 169: raise EC_UTILS.PROGRAM_EXIT;

165: when others then
166: EC_DEBUG.PL(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_OUTBOUND.SELECT_CLAUSE');
167: EC_DEBUG.PL(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
168: ec_utils.i_ret_code :=2;
169: raise EC_UTILS.PROGRAM_EXIT;
170: END select_clause;
171:
172: /**
173: Loads the Objects required by the Outbound transaction. This includes

Line 187: for i in 1..ec_utils.g_int_levels.COUNT

183: if ec_debug.G_debug_level >= 2 then
184: ec_debug.push('EC_OUTBOUND.LOAD_OBJECTS');
185: end if;
186:
187: for i in 1..ec_utils.g_int_levels.COUNT
188: LOOP
189: select_clause
190: (
191: i,

Line 192: ec_utils.g_int_levels(i).sql_stmt

188: LOOP
189: select_clause
190: (
191: i,
192: ec_utils.g_int_levels(i).sql_stmt
193: );
194:
195: ec_utils.execute_stage_data
196: (

Line 195: ec_utils.execute_stage_data

191: i,
192: ec_utils.g_int_levels(i).sql_stmt
193: );
194:
195: ec_utils.execute_stage_data
196: (
197: 10,
198: i
199: );

Line 203: ec_utils.g_int_levels(i).Cursor_handle := dbms_sql.open_cursor;

199: );
200:
201:
202: -- Open Cursor For Each level and store the handles in the PL/SQL table.
203: ec_utils.g_int_levels(i).Cursor_handle := dbms_sql.open_cursor;
204: if ec_debug.G_debug_level = 3 then
205: ec_debug.pl(3,'Cursor handle',ec_utils.g_int_levels(i).Cursor_handle);
206: end if;
207:

Line 205: ec_debug.pl(3,'Cursor handle',ec_utils.g_int_levels(i).Cursor_handle);

201:
202: -- Open Cursor For Each level and store the handles in the PL/SQL table.
203: ec_utils.g_int_levels(i).Cursor_handle := dbms_sql.open_cursor;
204: if ec_debug.G_debug_level = 3 then
205: ec_debug.pl(3,'Cursor handle',ec_utils.g_int_levels(i).Cursor_handle);
206: end if;
207:
208: -- Parse the Select Statement for Each level
209: BEGIN

Line 211: ec_utils.g_int_levels(i).cursor_handle,

207:
208: -- Parse the Select Statement for Each level
209: BEGIN
210: dbms_sql.parse (
211: ec_utils.g_int_levels(i).cursor_handle,
212: ec_utils.g_int_levels(i).sql_stmt,
213: dbms_sql.native
214: );
215: EXCEPTION

Line 212: ec_utils.g_int_levels(i).sql_stmt,

208: -- Parse the Select Statement for Each level
209: BEGIN
210: dbms_sql.parse (
211: ec_utils.g_int_levels(i).cursor_handle,
212: ec_utils.g_int_levels(i).sql_stmt,
213: dbms_sql.native
214: );
215: EXCEPTION
216: WHEN OTHERS THEN

Line 220: ec_utils.g_int_levels(i).sql_stmt

216: WHEN OTHERS THEN
217: ece_error_handling_pvt.print_parse_error
218: (
219: dbms_sql.last_error_position,
220: ec_utils.g_int_levels(i).sql_stmt
221: );
222: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_OUTBOUND.LOAD_OBJECTS');
223: ec_debug.pl(0,'EC','ECE_PARSE_VIEW_ERROR','LEVEL',i);
224: raise EC_UTILS.PROGRAM_EXIT;

Line 224: raise EC_UTILS.PROGRAM_EXIT;

220: ec_utils.g_int_levels(i).sql_stmt
221: );
222: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_OUTBOUND.LOAD_OBJECTS');
223: ec_debug.pl(0,'EC','ECE_PARSE_VIEW_ERROR','LEVEL',i);
224: raise EC_UTILS.PROGRAM_EXIT;
225: END;
226:
227: i_counter :=0;
228: -- Define Columns for Each Level

Line 229: FOR k in ec_utils.g_int_levels(i).file_start_pos..ec_utils.g_int_levels(i).file_end_pos

225: END;
226:
227: i_counter :=0;
228: -- Define Columns for Each Level
229: FOR k in ec_utils.g_int_levels(i).file_start_pos..ec_utils.g_int_levels(i).file_end_pos
230: LOOP
231: i_counter := i_counter + 1;
232: dbms_sql.define_column
233: (

Line 234: ec_utils.g_int_levels(i).Cursor_Handle,

230: LOOP
231: i_counter := i_counter + 1;
232: dbms_sql.define_column
233: (
234: ec_utils.g_int_levels(i).Cursor_Handle,
235: i_counter,
236: ec_utils.g_int_levels(i).sql_stmt,
237: ece_extract_utils_PUB.G_MaxColWidth
238: );

Line 236: ec_utils.g_int_levels(i).sql_stmt,

232: dbms_sql.define_column
233: (
234: ec_utils.g_int_levels(i).Cursor_Handle,
235: i_counter,
236: ec_utils.g_int_levels(i).sql_stmt,
237: ece_extract_utils_PUB.G_MaxColWidth
238: );
239: END LOOP;
240:

Line 243: ec_utils.i_stage_data := ec_utils.i_tmp2_stage_data; -- 2920679

239: END LOOP;
240:
241: END LOOP;
242:
243: ec_utils.i_stage_data := ec_utils.i_tmp2_stage_data; -- 2920679
244:
245: for i in 1..ec_utils.g_ext_levels.COUNT
246: LOOP
247: -- Parse the Insert Statement for Staging table.

Line 245: for i in 1..ec_utils.g_ext_levels.COUNT

241: END LOOP;
242:
243: ec_utils.i_stage_data := ec_utils.i_tmp2_stage_data; -- 2920679
244:
245: for i in 1..ec_utils.g_ext_levels.COUNT
246: LOOP
247: -- Parse the Insert Statement for Staging table.
248: parse_insert_statement
249: (

Line 258: WHEN EC_UTILS.PROGRAM_EXIT then

254: ec_debug.pop('EC_OUTBOUND.LOAD_OBJECTS');
255: end if;
256:
257: EXCEPTION
258: WHEN EC_UTILS.PROGRAM_EXIT then
259: raise;
260: WHEN OTHERS THEN
261: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_OUTBOUND.LOAD_OBJECTS');
262: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);

Line 263: ec_utils.i_ret_code :=2;

259: raise;
260: WHEN OTHERS THEN
261: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_OUTBOUND.LOAD_OBJECTS');
262: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
263: ec_utils.i_ret_code :=2;
264: raise EC_UTILS.PROGRAM_EXIT;
265: end load_objects;
266:
267:

Line 264: raise EC_UTILS.PROGRAM_EXIT;

260: WHEN OTHERS THEN
261: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_OUTBOUND.LOAD_OBJECTS');
262: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
263: ec_utils.i_ret_code :=2;
264: raise EC_UTILS.PROGRAM_EXIT;
265: end load_objects;
266:
267:
268: /**

Line 276: i_Insert_Cursor pls_integer := ec_utils.g_ext_levels(i_level).cursor_handle;

272: (
273: i_level in pls_integer
274: )
275: is
276: i_Insert_Cursor pls_integer := ec_utils.g_ext_levels(i_level).cursor_handle;
277: dummy pls_integer;
278: error_position pls_integer;
279: i_status ece_stage.status%TYPE := 'NEW';
280: ins_value varchar2(32000);

Line 289: dbms_sql.bind_variable (i_Insert_Cursor,'a1',to_number(ec_utils.g_ext_levels(i_level).Stage_Id));

285: end if;
286:
287: begin
288: -- Bind values for Mandatory Columns
289: dbms_sql.bind_variable (i_Insert_Cursor,'a1',to_number(ec_utils.g_ext_levels(i_level).Stage_Id));
290: dbms_sql.bind_variable (i_Insert_Cursor,'a2',to_number(ec_utils.g_ext_levels(i_level).Document_Id));
291: dbms_sql.bind_variable (i_Insert_Cursor,'a3',ec_utils.g_transaction_type);
292: dbms_sql.bind_variable (i_Insert_Cursor,'a4',to_number(i_level));
293: dbms_sql.bind_variable (i_Insert_Cursor,'a5',to_number(ec_utils.g_ext_levels(i_level).Line_Number));

Line 290: dbms_sql.bind_variable (i_Insert_Cursor,'a2',to_number(ec_utils.g_ext_levels(i_level).Document_Id));

286:
287: begin
288: -- Bind values for Mandatory Columns
289: dbms_sql.bind_variable (i_Insert_Cursor,'a1',to_number(ec_utils.g_ext_levels(i_level).Stage_Id));
290: dbms_sql.bind_variable (i_Insert_Cursor,'a2',to_number(ec_utils.g_ext_levels(i_level).Document_Id));
291: dbms_sql.bind_variable (i_Insert_Cursor,'a3',ec_utils.g_transaction_type);
292: dbms_sql.bind_variable (i_Insert_Cursor,'a4',to_number(i_level));
293: dbms_sql.bind_variable (i_Insert_Cursor,'a5',to_number(ec_utils.g_ext_levels(i_level).Line_Number));
294: dbms_sql.bind_variable (i_Insert_Cursor,'a6',ec_utils.g_ext_levels(i_level).Parent_Stage_Id);

Line 291: dbms_sql.bind_variable (i_Insert_Cursor,'a3',ec_utils.g_transaction_type);

287: begin
288: -- Bind values for Mandatory Columns
289: dbms_sql.bind_variable (i_Insert_Cursor,'a1',to_number(ec_utils.g_ext_levels(i_level).Stage_Id));
290: dbms_sql.bind_variable (i_Insert_Cursor,'a2',to_number(ec_utils.g_ext_levels(i_level).Document_Id));
291: dbms_sql.bind_variable (i_Insert_Cursor,'a3',ec_utils.g_transaction_type);
292: dbms_sql.bind_variable (i_Insert_Cursor,'a4',to_number(i_level));
293: dbms_sql.bind_variable (i_Insert_Cursor,'a5',to_number(ec_utils.g_ext_levels(i_level).Line_Number));
294: dbms_sql.bind_variable (i_Insert_Cursor,'a6',ec_utils.g_ext_levels(i_level).Parent_Stage_Id);
295: dbms_sql.bind_variable (i_Insert_Cursor,'a7',ec_utils.g_run_id);

Line 293: dbms_sql.bind_variable (i_Insert_Cursor,'a5',to_number(ec_utils.g_ext_levels(i_level).Line_Number));

289: dbms_sql.bind_variable (i_Insert_Cursor,'a1',to_number(ec_utils.g_ext_levels(i_level).Stage_Id));
290: dbms_sql.bind_variable (i_Insert_Cursor,'a2',to_number(ec_utils.g_ext_levels(i_level).Document_Id));
291: dbms_sql.bind_variable (i_Insert_Cursor,'a3',ec_utils.g_transaction_type);
292: dbms_sql.bind_variable (i_Insert_Cursor,'a4',to_number(i_level));
293: dbms_sql.bind_variable (i_Insert_Cursor,'a5',to_number(ec_utils.g_ext_levels(i_level).Line_Number));
294: dbms_sql.bind_variable (i_Insert_Cursor,'a6',ec_utils.g_ext_levels(i_level).Parent_Stage_Id);
295: dbms_sql.bind_variable (i_Insert_Cursor,'a7',ec_utils.g_run_id);
296: dbms_sql.bind_variable (i_Insert_Cursor,'a8',ec_utils.g_ext_levels(i_level).Document_Number);
297: dbms_sql.bind_variable (i_Insert_Cursor,'a9',i_status);

Line 294: dbms_sql.bind_variable (i_Insert_Cursor,'a6',ec_utils.g_ext_levels(i_level).Parent_Stage_Id);

290: dbms_sql.bind_variable (i_Insert_Cursor,'a2',to_number(ec_utils.g_ext_levels(i_level).Document_Id));
291: dbms_sql.bind_variable (i_Insert_Cursor,'a3',ec_utils.g_transaction_type);
292: dbms_sql.bind_variable (i_Insert_Cursor,'a4',to_number(i_level));
293: dbms_sql.bind_variable (i_Insert_Cursor,'a5',to_number(ec_utils.g_ext_levels(i_level).Line_Number));
294: dbms_sql.bind_variable (i_Insert_Cursor,'a6',ec_utils.g_ext_levels(i_level).Parent_Stage_Id);
295: dbms_sql.bind_variable (i_Insert_Cursor,'a7',ec_utils.g_run_id);
296: dbms_sql.bind_variable (i_Insert_Cursor,'a8',ec_utils.g_ext_levels(i_level).Document_Number);
297: dbms_sql.bind_variable (i_Insert_Cursor,'a9',i_status);
298:

Line 295: dbms_sql.bind_variable (i_Insert_Cursor,'a7',ec_utils.g_run_id);

291: dbms_sql.bind_variable (i_Insert_Cursor,'a3',ec_utils.g_transaction_type);
292: dbms_sql.bind_variable (i_Insert_Cursor,'a4',to_number(i_level));
293: dbms_sql.bind_variable (i_Insert_Cursor,'a5',to_number(ec_utils.g_ext_levels(i_level).Line_Number));
294: dbms_sql.bind_variable (i_Insert_Cursor,'a6',ec_utils.g_ext_levels(i_level).Parent_Stage_Id);
295: dbms_sql.bind_variable (i_Insert_Cursor,'a7',ec_utils.g_run_id);
296: dbms_sql.bind_variable (i_Insert_Cursor,'a8',ec_utils.g_ext_levels(i_level).Document_Number);
297: dbms_sql.bind_variable (i_Insert_Cursor,'a9',i_status);
298:
299: -- Bind values for Mandatory Columns

Line 296: dbms_sql.bind_variable (i_Insert_Cursor,'a8',ec_utils.g_ext_levels(i_level).Document_Number);

292: dbms_sql.bind_variable (i_Insert_Cursor,'a4',to_number(i_level));
293: dbms_sql.bind_variable (i_Insert_Cursor,'a5',to_number(ec_utils.g_ext_levels(i_level).Line_Number));
294: dbms_sql.bind_variable (i_Insert_Cursor,'a6',ec_utils.g_ext_levels(i_level).Parent_Stage_Id);
295: dbms_sql.bind_variable (i_Insert_Cursor,'a7',ec_utils.g_run_id);
296: dbms_sql.bind_variable (i_Insert_Cursor,'a8',ec_utils.g_ext_levels(i_level).Document_Number);
297: dbms_sql.bind_variable (i_Insert_Cursor,'a9',i_status);
298:
299: -- Bind values for Mandatory Columns
300: dbms_sql.bind_variable (i_Insert_Cursor,'w1',sysdate);

Line 306: ec_debug.pl(3,'STAGE_ID',ec_utils.g_ext_levels(i_level).Stage_Id);

302: dbms_sql.bind_variable (i_Insert_Cursor,'w3',sysdate);
303: dbms_sql.bind_variable (i_Insert_Cursor,'w4',fnd_global.user_id);
304:
305: if ec_debug.G_debug_level = 3 then
306: ec_debug.pl(3,'STAGE_ID',ec_utils.g_ext_levels(i_level).Stage_Id);
307: ec_debug.pl(3,'DOCUMENT_ID',ec_utils.g_ext_levels(i_level).Document_Id);
308: ec_debug.pl(3,'TRANSACTION_TYPE',ec_utils.g_transaction_type);
309: ec_debug.pl(3,'TRANSACTION_LEVEL',i_level);
310: ec_debug.pl(3,'LINE_NUMBER',ec_utils.g_ext_levels(i_level).Line_Number);

Line 307: ec_debug.pl(3,'DOCUMENT_ID',ec_utils.g_ext_levels(i_level).Document_Id);

303: dbms_sql.bind_variable (i_Insert_Cursor,'w4',fnd_global.user_id);
304:
305: if ec_debug.G_debug_level = 3 then
306: ec_debug.pl(3,'STAGE_ID',ec_utils.g_ext_levels(i_level).Stage_Id);
307: ec_debug.pl(3,'DOCUMENT_ID',ec_utils.g_ext_levels(i_level).Document_Id);
308: ec_debug.pl(3,'TRANSACTION_TYPE',ec_utils.g_transaction_type);
309: ec_debug.pl(3,'TRANSACTION_LEVEL',i_level);
310: ec_debug.pl(3,'LINE_NUMBER',ec_utils.g_ext_levels(i_level).Line_Number);
311: ec_debug.pl(3,'PARENT_STAGE_ID',ec_utils.g_ext_levels(i_level).Parent_Stage_Id);

Line 308: ec_debug.pl(3,'TRANSACTION_TYPE',ec_utils.g_transaction_type);

304:
305: if ec_debug.G_debug_level = 3 then
306: ec_debug.pl(3,'STAGE_ID',ec_utils.g_ext_levels(i_level).Stage_Id);
307: ec_debug.pl(3,'DOCUMENT_ID',ec_utils.g_ext_levels(i_level).Document_Id);
308: ec_debug.pl(3,'TRANSACTION_TYPE',ec_utils.g_transaction_type);
309: ec_debug.pl(3,'TRANSACTION_LEVEL',i_level);
310: ec_debug.pl(3,'LINE_NUMBER',ec_utils.g_ext_levels(i_level).Line_Number);
311: ec_debug.pl(3,'PARENT_STAGE_ID',ec_utils.g_ext_levels(i_level).Parent_Stage_Id);
312: ec_debug.pl(3,'RUN_ID',ec_utils.g_run_id);

Line 310: ec_debug.pl(3,'LINE_NUMBER',ec_utils.g_ext_levels(i_level).Line_Number);

306: ec_debug.pl(3,'STAGE_ID',ec_utils.g_ext_levels(i_level).Stage_Id);
307: ec_debug.pl(3,'DOCUMENT_ID',ec_utils.g_ext_levels(i_level).Document_Id);
308: ec_debug.pl(3,'TRANSACTION_TYPE',ec_utils.g_transaction_type);
309: ec_debug.pl(3,'TRANSACTION_LEVEL',i_level);
310: ec_debug.pl(3,'LINE_NUMBER',ec_utils.g_ext_levels(i_level).Line_Number);
311: ec_debug.pl(3,'PARENT_STAGE_ID',ec_utils.g_ext_levels(i_level).Parent_Stage_Id);
312: ec_debug.pl(3,'RUN_ID',ec_utils.g_run_id);
313: ec_debug.pl(3,'DOCUMENT_NUMBER',ec_utils.g_ext_levels(i_level).Document_Number);
314: ec_debug.pl(3,'CREATION_DATE',sysdate);

Line 311: ec_debug.pl(3,'PARENT_STAGE_ID',ec_utils.g_ext_levels(i_level).Parent_Stage_Id);

307: ec_debug.pl(3,'DOCUMENT_ID',ec_utils.g_ext_levels(i_level).Document_Id);
308: ec_debug.pl(3,'TRANSACTION_TYPE',ec_utils.g_transaction_type);
309: ec_debug.pl(3,'TRANSACTION_LEVEL',i_level);
310: ec_debug.pl(3,'LINE_NUMBER',ec_utils.g_ext_levels(i_level).Line_Number);
311: ec_debug.pl(3,'PARENT_STAGE_ID',ec_utils.g_ext_levels(i_level).Parent_Stage_Id);
312: ec_debug.pl(3,'RUN_ID',ec_utils.g_run_id);
313: ec_debug.pl(3,'DOCUMENT_NUMBER',ec_utils.g_ext_levels(i_level).Document_Number);
314: ec_debug.pl(3,'CREATION_DATE',sysdate);
315: ec_debug.pl(3,'CREATED_BY',fnd_global.user_id);

Line 312: ec_debug.pl(3,'RUN_ID',ec_utils.g_run_id);

308: ec_debug.pl(3,'TRANSACTION_TYPE',ec_utils.g_transaction_type);
309: ec_debug.pl(3,'TRANSACTION_LEVEL',i_level);
310: ec_debug.pl(3,'LINE_NUMBER',ec_utils.g_ext_levels(i_level).Line_Number);
311: ec_debug.pl(3,'PARENT_STAGE_ID',ec_utils.g_ext_levels(i_level).Parent_Stage_Id);
312: ec_debug.pl(3,'RUN_ID',ec_utils.g_run_id);
313: ec_debug.pl(3,'DOCUMENT_NUMBER',ec_utils.g_ext_levels(i_level).Document_Number);
314: ec_debug.pl(3,'CREATION_DATE',sysdate);
315: ec_debug.pl(3,'CREATED_BY',fnd_global.user_id);
316: ec_debug.pl(3,'LAST_UPDATE_DATE',sysdate);

Line 313: ec_debug.pl(3,'DOCUMENT_NUMBER',ec_utils.g_ext_levels(i_level).Document_Number);

309: ec_debug.pl(3,'TRANSACTION_LEVEL',i_level);
310: ec_debug.pl(3,'LINE_NUMBER',ec_utils.g_ext_levels(i_level).Line_Number);
311: ec_debug.pl(3,'PARENT_STAGE_ID',ec_utils.g_ext_levels(i_level).Parent_Stage_Id);
312: ec_debug.pl(3,'RUN_ID',ec_utils.g_run_id);
313: ec_debug.pl(3,'DOCUMENT_NUMBER',ec_utils.g_ext_levels(i_level).Document_Number);
314: ec_debug.pl(3,'CREATION_DATE',sysdate);
315: ec_debug.pl(3,'CREATED_BY',fnd_global.user_id);
316: ec_debug.pl(3,'LAST_UPDATE_DATE',sysdate);
317: ec_debug.pl(3,'LAST_UPDATED_BY',fnd_global.user_id);

Line 321: for k in ec_utils.g_int_levels(i_level).file_start_pos..ec_utils.g_int_levels(i_level).file_end_pos

317: ec_debug.pl(3,'LAST_UPDATED_BY',fnd_global.user_id);
318: end if;
319:
320: -- Bind values for Staging Columns mapped to the Flat File
321: for k in ec_utils.g_int_levels(i_level).file_start_pos..ec_utils.g_int_levels(i_level).file_end_pos
322: loop
323: if ( ec_utils.g_file_tbl(k).staging_column is not null)
324: then
325: ins_value := replace(replace(replace(ec_utils.g_file_tbl(k).value,c_local_chr_10,''),c_local_chr_9,''),c_local_chr_13,'');

Line 323: if ( ec_utils.g_file_tbl(k).staging_column is not null)

319:
320: -- Bind values for Staging Columns mapped to the Flat File
321: for k in ec_utils.g_int_levels(i_level).file_start_pos..ec_utils.g_int_levels(i_level).file_end_pos
322: loop
323: if ( ec_utils.g_file_tbl(k).staging_column is not null)
324: then
325: ins_value := replace(replace(replace(ec_utils.g_file_tbl(k).value,c_local_chr_10,''),c_local_chr_9,''),c_local_chr_13,'');
326: dbms_sql.bind_variable (
327: i_Insert_Cursor,

Line 325: ins_value := replace(replace(replace(ec_utils.g_file_tbl(k).value,c_local_chr_10,''),c_local_chr_9,''),c_local_chr_13,'');

321: for k in ec_utils.g_int_levels(i_level).file_start_pos..ec_utils.g_int_levels(i_level).file_end_pos
322: loop
323: if ( ec_utils.g_file_tbl(k).staging_column is not null)
324: then
325: ins_value := replace(replace(replace(ec_utils.g_file_tbl(k).value,c_local_chr_10,''),c_local_chr_9,''),c_local_chr_13,'');
326: dbms_sql.bind_variable (
327: i_Insert_Cursor,
328: 'b'||k,ins_value,
329: 500

Line 332: ec_debug.pl(3,upper(ec_utils.g_file_tbl(k).staging_column)||'-'||

328: 'b'||k,ins_value,
329: 500
330: );
331: if ec_debug.G_debug_level = 3 then
332: ec_debug.pl(3,upper(ec_utils.g_file_tbl(k).staging_column)||'-'||
333: upper(ec_utils.g_file_tbl(k).interface_column_name),
334: ec_utils.g_file_tbl(k).value);
335: end if;
336: end if;

Line 333: upper(ec_utils.g_file_tbl(k).interface_column_name),

329: 500
330: );
331: if ec_debug.G_debug_level = 3 then
332: ec_debug.pl(3,upper(ec_utils.g_file_tbl(k).staging_column)||'-'||
333: upper(ec_utils.g_file_tbl(k).interface_column_name),
334: ec_utils.g_file_tbl(k).value);
335: end if;
336: end if;
337: end loop;

Line 334: ec_utils.g_file_tbl(k).value);

330: );
331: if ec_debug.G_debug_level = 3 then
332: ec_debug.pl(3,upper(ec_utils.g_file_tbl(k).staging_column)||'-'||
333: upper(ec_utils.g_file_tbl(k).interface_column_name),
334: ec_utils.g_file_tbl(k).value);
335: end if;
336: end if;
337: end loop;
338:

Line 347: ec_utils.i_ret_code :=2;

343: end if;
344: else
345: ec_debug.pl(0,'EC','ECE_STAGE_INSERT_FAILED','LEVEL',i_level);
346: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_OUTBOUND.BIND_INSERT_STATEMENT');
347: ec_utils.i_ret_code :=2;
348: raise EC_UTILS.PROGRAM_EXIT;
349: end if;
350:
351: exception

Line 348: raise EC_UTILS.PROGRAM_EXIT;

344: else
345: ec_debug.pl(0,'EC','ECE_STAGE_INSERT_FAILED','LEVEL',i_level);
346: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_OUTBOUND.BIND_INSERT_STATEMENT');
347: ec_utils.i_ret_code :=2;
348: raise EC_UTILS.PROGRAM_EXIT;
349: end if;
350:
351: exception
352: when others then

Line 357: ec_utils.i_ret_code :=2;

353: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_OUTBOUND.BIND_INSERT_STATEMENT');
354: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
355: ec_debug.pl(0,'EC','ECE_ERROR_SQL',null);
356:
357: ec_utils.i_ret_code :=2;
358: raise EC_UTILS.PROGRAM_EXIT;
359: end;
360: if ec_debug.G_debug_level >= 2 then
361: ec_debug.pop('EC_OUTBOUND.BIND_INSERT_STATEMENT');

Line 358: raise EC_UTILS.PROGRAM_EXIT;

354: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
355: ec_debug.pl(0,'EC','ECE_ERROR_SQL',null);
356:
357: ec_utils.i_ret_code :=2;
358: raise EC_UTILS.PROGRAM_EXIT;
359: end;
360: if ec_debug.G_debug_level >= 2 then
361: ec_debug.pop('EC_OUTBOUND.BIND_INSERT_STATEMENT');
362: end if;

Line 364: WHEN EC_UTILS.PROGRAM_EXIT then

360: if ec_debug.G_debug_level >= 2 then
361: ec_debug.pop('EC_OUTBOUND.BIND_INSERT_STATEMENT');
362: end if;
363: EXCEPTION
364: WHEN EC_UTILS.PROGRAM_EXIT then
365: raise;
366: WHEN OTHERS THEN
367: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_OUTBOUND.BIND_INSERT_STATEMENT');
368: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);

Line 369: ec_utils.i_ret_code :=2;

365: raise;
366: WHEN OTHERS THEN
367: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_OUTBOUND.BIND_INSERT_STATEMENT');
368: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
369: ec_utils.i_ret_code :=2;
370: raise EC_UTILS.PROGRAM_EXIT;
371: END bind_insert_statement;
372:
373:

Line 370: raise EC_UTILS.PROGRAM_EXIT;

366: WHEN OTHERS THEN
367: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_OUTBOUND.BIND_INSERT_STATEMENT');
368: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
369: ec_utils.i_ret_code :=2;
370: raise EC_UTILS.PROGRAM_EXIT;
371: END bind_insert_statement;
372:
373:
374: /**

Line 407: ec_utils.g_ext_levels(1).document_id := i_document_id;

403: fetch seq_document_id
404: into i_document_id;
405: close seq_document_id;
406:
407: ec_utils.g_ext_levels(1).document_id := i_document_id;
408: ec_utils.g_ext_levels(1).parent_stage_id := 0;
409: ec_utils.g_ext_levels(1).Line_Number := 1;
410: ec_utils.g_ext_levels(1).stage_id := i_stage_id;
411:

Line 408: ec_utils.g_ext_levels(1).parent_stage_id := 0;

404: into i_document_id;
405: close seq_document_id;
406:
407: ec_utils.g_ext_levels(1).document_id := i_document_id;
408: ec_utils.g_ext_levels(1).parent_stage_id := 0;
409: ec_utils.g_ext_levels(1).Line_Number := 1;
410: ec_utils.g_ext_levels(1).stage_id := i_stage_id;
411:
412: /**

Line 409: ec_utils.g_ext_levels(1).Line_Number := 1;

405: close seq_document_id;
406:
407: ec_utils.g_ext_levels(1).document_id := i_document_id;
408: ec_utils.g_ext_levels(1).parent_stage_id := 0;
409: ec_utils.g_ext_levels(1).Line_Number := 1;
410: ec_utils.g_ext_levels(1).stage_id := i_stage_id;
411:
412: /**
413: Initialize all the Down Levels

Line 410: ec_utils.g_ext_levels(1).stage_id := i_stage_id;

406:
407: ec_utils.g_ext_levels(1).document_id := i_document_id;
408: ec_utils.g_ext_levels(1).parent_stage_id := 0;
409: ec_utils.g_ext_levels(1).Line_Number := 1;
410: ec_utils.g_ext_levels(1).stage_id := i_stage_id;
411:
412: /**
413: Initialize all the Down Levels
414: **/

Line 415: for j in 2..ec_utils.g_ext_levels.COUNT

411:
412: /**
413: Initialize all the Down Levels
414: **/
415: for j in 2..ec_utils.g_ext_levels.COUNT
416: loop
417: ec_utils.g_ext_levels(j).document_id := i_document_id;
418: ec_utils.g_ext_levels(j).parent_stage_id := null;
419: ec_utils.g_ext_levels(j).Line_Number := 0;

Line 417: ec_utils.g_ext_levels(j).document_id := i_document_id;

413: Initialize all the Down Levels
414: **/
415: for j in 2..ec_utils.g_ext_levels.COUNT
416: loop
417: ec_utils.g_ext_levels(j).document_id := i_document_id;
418: ec_utils.g_ext_levels(j).parent_stage_id := null;
419: ec_utils.g_ext_levels(j).Line_Number := 0;
420: ec_utils.g_ext_levels(j).stage_id := null;
421: end loop;

Line 418: ec_utils.g_ext_levels(j).parent_stage_id := null;

414: **/
415: for j in 2..ec_utils.g_ext_levels.COUNT
416: loop
417: ec_utils.g_ext_levels(j).document_id := i_document_id;
418: ec_utils.g_ext_levels(j).parent_stage_id := null;
419: ec_utils.g_ext_levels(j).Line_Number := 0;
420: ec_utils.g_ext_levels(j).stage_id := null;
421: end loop;
422:

Line 419: ec_utils.g_ext_levels(j).Line_Number := 0;

415: for j in 2..ec_utils.g_ext_levels.COUNT
416: loop
417: ec_utils.g_ext_levels(j).document_id := i_document_id;
418: ec_utils.g_ext_levels(j).parent_stage_id := null;
419: ec_utils.g_ext_levels(j).Line_Number := 0;
420: ec_utils.g_ext_levels(j).stage_id := null;
421: end loop;
422:
423:

Line 420: ec_utils.g_ext_levels(j).stage_id := null;

416: loop
417: ec_utils.g_ext_levels(j).document_id := i_document_id;
418: ec_utils.g_ext_levels(j).parent_stage_id := null;
419: ec_utils.g_ext_levels(j).Line_Number := 0;
420: ec_utils.g_ext_levels(j).stage_id := null;
421: end loop;
422:
423:
424: if g_key_column_pos is null

Line 432: 'DOCUMENT_NUMBER',ec_utils.g_file_tbl(g_key_column_pos).value);

428: end if;
429: else
430: if ec_debug.G_debug_level >= 1 then
431: ec_debug.pl(1,'EC','ECE_DOCUMENT_ID','DOCUMENT_ID',i_document_id,
432: 'DOCUMENT_NUMBER',ec_utils.g_file_tbl(g_key_column_pos).value);
433: end if;
434: ec_utils.g_ext_levels(1).Document_Number :=
435: ec_utils.g_file_tbl(g_key_column_pos).value;
436: end if;

Line 434: ec_utils.g_ext_levels(1).Document_Number :=

430: if ec_debug.G_debug_level >= 1 then
431: ec_debug.pl(1,'EC','ECE_DOCUMENT_ID','DOCUMENT_ID',i_document_id,
432: 'DOCUMENT_NUMBER',ec_utils.g_file_tbl(g_key_column_pos).value);
433: end if;
434: ec_utils.g_ext_levels(1).Document_Number :=
435: ec_utils.g_file_tbl(g_key_column_pos).value;
436: end if;
437: else
438: ec_utils.g_ext_levels(i_level).Line_Number :=

Line 435: ec_utils.g_file_tbl(g_key_column_pos).value;

431: ec_debug.pl(1,'EC','ECE_DOCUMENT_ID','DOCUMENT_ID',i_document_id,
432: 'DOCUMENT_NUMBER',ec_utils.g_file_tbl(g_key_column_pos).value);
433: end if;
434: ec_utils.g_ext_levels(1).Document_Number :=
435: ec_utils.g_file_tbl(g_key_column_pos).value;
436: end if;
437: else
438: ec_utils.g_ext_levels(i_level).Line_Number :=
439: ec_utils.g_ext_levels(i_level).Line_Number + 1;

Line 438: ec_utils.g_ext_levels(i_level).Line_Number :=

434: ec_utils.g_ext_levels(1).Document_Number :=
435: ec_utils.g_file_tbl(g_key_column_pos).value;
436: end if;
437: else
438: ec_utils.g_ext_levels(i_level).Line_Number :=
439: ec_utils.g_ext_levels(i_level).Line_Number + 1;
440: ec_utils.g_ext_levels(i_level).stage_id := i_stage_id;
441: /**
442: If the previous Level Stage Id is null , go all the way up till you find

Line 439: ec_utils.g_ext_levels(i_level).Line_Number + 1;

435: ec_utils.g_file_tbl(g_key_column_pos).value;
436: end if;
437: else
438: ec_utils.g_ext_levels(i_level).Line_Number :=
439: ec_utils.g_ext_levels(i_level).Line_Number + 1;
440: ec_utils.g_ext_levels(i_level).stage_id := i_stage_id;
441: /**
442: If the previous Level Stage Id is null , go all the way up till you find
443: a not null stage_id.

Line 440: ec_utils.g_ext_levels(i_level).stage_id := i_stage_id;

436: end if;
437: else
438: ec_utils.g_ext_levels(i_level).Line_Number :=
439: ec_utils.g_ext_levels(i_level).Line_Number + 1;
440: ec_utils.g_ext_levels(i_level).stage_id := i_stage_id;
441: /**
442: If the previous Level Stage Id is null , go all the way up till you find
443: a not null stage_id.
444: **/

Line 447: if ec_utils.g_ext_levels(j).stage_id is not null

443: a not null stage_id.
444: **/
445: for j in REVERSE 1..i_level-1
446: loop
447: if ec_utils.g_ext_levels(j).stage_id is not null
448: then
449: ec_utils.g_ext_levels(i_level).parent_stage_id :=
450: ec_utils.g_ext_levels(j).stage_id;
451: exit;

Line 449: ec_utils.g_ext_levels(i_level).parent_stage_id :=

445: for j in REVERSE 1..i_level-1
446: loop
447: if ec_utils.g_ext_levels(j).stage_id is not null
448: then
449: ec_utils.g_ext_levels(i_level).parent_stage_id :=
450: ec_utils.g_ext_levels(j).stage_id;
451: exit;
452: end if;
453: end loop;

Line 450: ec_utils.g_ext_levels(j).stage_id;

446: loop
447: if ec_utils.g_ext_levels(j).stage_id is not null
448: then
449: ec_utils.g_ext_levels(i_level).parent_stage_id :=
450: ec_utils.g_ext_levels(j).stage_id;
451: exit;
452: end if;
453: end loop;
454:

Line 458: for j in i_level+1..ec_utils.g_ext_Levels.COUNT

454:
455: /**
456: Initialize all Down Levels
457: **/
458: for j in i_level+1..ec_utils.g_ext_Levels.COUNT
459: loop
460: ec_utils.g_ext_levels(j).parent_stage_id := null;
461: ec_utils.g_ext_levels(j).Line_Number := 0;
462: end loop;

Line 460: ec_utils.g_ext_levels(j).parent_stage_id := null;

456: Initialize all Down Levels
457: **/
458: for j in i_level+1..ec_utils.g_ext_Levels.COUNT
459: loop
460: ec_utils.g_ext_levels(j).parent_stage_id := null;
461: ec_utils.g_ext_levels(j).Line_Number := 0;
462: end loop;
463: end if;
464: if ec_debug.G_debug_level = 3 then

Line 461: ec_utils.g_ext_levels(j).Line_Number := 0;

457: **/
458: for j in i_level+1..ec_utils.g_ext_Levels.COUNT
459: loop
460: ec_utils.g_ext_levels(j).parent_stage_id := null;
461: ec_utils.g_ext_levels(j).Line_Number := 0;
462: end loop;
463: end if;
464: if ec_debug.G_debug_level = 3 then
465: ec_debug.pl(3,'Stage Id',ec_utils.g_ext_levels(i_level).Stage_Id);

Line 465: ec_debug.pl(3,'Stage Id',ec_utils.g_ext_levels(i_level).Stage_Id);

461: ec_utils.g_ext_levels(j).Line_Number := 0;
462: end loop;
463: end if;
464: if ec_debug.G_debug_level = 3 then
465: ec_debug.pl(3,'Stage Id',ec_utils.g_ext_levels(i_level).Stage_Id);
466: ec_debug.pl(3,'Document Id',ec_utils.g_ext_levels(i_level).Document_Id);
467: ec_debug.pl(3,'Document Number',ec_utils.g_ext_levels(i_level).Document_Number);
468: ec_debug.pl(3,'Line Number',ec_utils.g_ext_levels(i_level).Line_Number);
469: ec_debug.pl(3,'Parent Stage Id',ec_utils.g_ext_levels(i_level).Parent_Stage_Id);

Line 466: ec_debug.pl(3,'Document Id',ec_utils.g_ext_levels(i_level).Document_Id);

462: end loop;
463: end if;
464: if ec_debug.G_debug_level = 3 then
465: ec_debug.pl(3,'Stage Id',ec_utils.g_ext_levels(i_level).Stage_Id);
466: ec_debug.pl(3,'Document Id',ec_utils.g_ext_levels(i_level).Document_Id);
467: ec_debug.pl(3,'Document Number',ec_utils.g_ext_levels(i_level).Document_Number);
468: ec_debug.pl(3,'Line Number',ec_utils.g_ext_levels(i_level).Line_Number);
469: ec_debug.pl(3,'Parent Stage Id',ec_utils.g_ext_levels(i_level).Parent_Stage_Id);
470: ec_debug.pl(3,'Transaction Level',ec_utils.g_ext_levels(i_level).external_level);

Line 467: ec_debug.pl(3,'Document Number',ec_utils.g_ext_levels(i_level).Document_Number);

463: end if;
464: if ec_debug.G_debug_level = 3 then
465: ec_debug.pl(3,'Stage Id',ec_utils.g_ext_levels(i_level).Stage_Id);
466: ec_debug.pl(3,'Document Id',ec_utils.g_ext_levels(i_level).Document_Id);
467: ec_debug.pl(3,'Document Number',ec_utils.g_ext_levels(i_level).Document_Number);
468: ec_debug.pl(3,'Line Number',ec_utils.g_ext_levels(i_level).Line_Number);
469: ec_debug.pl(3,'Parent Stage Id',ec_utils.g_ext_levels(i_level).Parent_Stage_Id);
470: ec_debug.pl(3,'Transaction Level',ec_utils.g_ext_levels(i_level).external_level);
471: end if;

Line 468: ec_debug.pl(3,'Line Number',ec_utils.g_ext_levels(i_level).Line_Number);

464: if ec_debug.G_debug_level = 3 then
465: ec_debug.pl(3,'Stage Id',ec_utils.g_ext_levels(i_level).Stage_Id);
466: ec_debug.pl(3,'Document Id',ec_utils.g_ext_levels(i_level).Document_Id);
467: ec_debug.pl(3,'Document Number',ec_utils.g_ext_levels(i_level).Document_Number);
468: ec_debug.pl(3,'Line Number',ec_utils.g_ext_levels(i_level).Line_Number);
469: ec_debug.pl(3,'Parent Stage Id',ec_utils.g_ext_levels(i_level).Parent_Stage_Id);
470: ec_debug.pl(3,'Transaction Level',ec_utils.g_ext_levels(i_level).external_level);
471: end if;
472:

Line 469: ec_debug.pl(3,'Parent Stage Id',ec_utils.g_ext_levels(i_level).Parent_Stage_Id);

465: ec_debug.pl(3,'Stage Id',ec_utils.g_ext_levels(i_level).Stage_Id);
466: ec_debug.pl(3,'Document Id',ec_utils.g_ext_levels(i_level).Document_Id);
467: ec_debug.pl(3,'Document Number',ec_utils.g_ext_levels(i_level).Document_Number);
468: ec_debug.pl(3,'Line Number',ec_utils.g_ext_levels(i_level).Line_Number);
469: ec_debug.pl(3,'Parent Stage Id',ec_utils.g_ext_levels(i_level).Parent_Stage_Id);
470: ec_debug.pl(3,'Transaction Level',ec_utils.g_ext_levels(i_level).external_level);
471: end if;
472:
473: bind_insert_statement

Line 470: ec_debug.pl(3,'Transaction Level',ec_utils.g_ext_levels(i_level).external_level);

466: ec_debug.pl(3,'Document Id',ec_utils.g_ext_levels(i_level).Document_Id);
467: ec_debug.pl(3,'Document Number',ec_utils.g_ext_levels(i_level).Document_Number);
468: ec_debug.pl(3,'Line Number',ec_utils.g_ext_levels(i_level).Line_Number);
469: ec_debug.pl(3,'Parent Stage Id',ec_utils.g_ext_levels(i_level).Parent_Stage_Id);
470: ec_debug.pl(3,'Transaction Level',ec_utils.g_ext_levels(i_level).external_level);
471: end if;
472:
473: bind_insert_statement
474: (

Line 482: WHEN EC_UTILS.PROGRAM_EXIT then

478: ec_debug.pop('EC_OUTBOUND.INSERT_INTO_STAGE');
479: end if;
480:
481: EXCEPTION
482: WHEN EC_UTILS.PROGRAM_EXIT then
483: raise;
484: WHEN OTHERS THEN
485: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_OUTBOUND.INSERT_INTO_STAGE');
486: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);

Line 487: ec_utils.i_ret_code :=2;

483: raise;
484: WHEN OTHERS THEN
485: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_OUTBOUND.INSERT_INTO_STAGE');
486: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
487: ec_utils.i_ret_code :=2;
488: raise EC_UTILS.PROGRAM_EXIT;
489: END insert_into_stage;
490:
491:

Line 488: raise EC_UTILS.PROGRAM_EXIT;

484: WHEN OTHERS THEN
485: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_OUTBOUND.INSERT_INTO_STAGE');
486: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
487: ec_utils.i_ret_code :=2;
488: raise EC_UTILS.PROGRAM_EXIT;
489: END insert_into_stage;
490:
491:
492: /**

Line 518: for i in 1..ec_utils.g_int_levels.COUNT

514: ec_debug.push('EC_OUTBOUND.FETCH_DATA_FROM_VIEW');
515: ec_debug.pl(3,'i_level',i_level);
516: end if;
517:
518: for i in 1..ec_utils.g_int_levels.COUNT
519: loop
520: IF ec_utils.g_int_levels(i).parent_level = i_level
521: THEN
522: -- Set the Global Variable for Current Level

Line 520: IF ec_utils.g_int_levels(i).parent_level = i_level

516: end if;
517:
518: for i in 1..ec_utils.g_int_levels.COUNT
519: loop
520: IF ec_utils.g_int_levels(i).parent_level = i_level
521: THEN
522: -- Set the Global Variable for Current Level
523: ec_utils.g_current_level := i;
524: ec_utils.execute_stage_data

Line 523: ec_utils.g_current_level := i;

519: loop
520: IF ec_utils.g_int_levels(i).parent_level = i_level
521: THEN
522: -- Set the Global Variable for Current Level
523: ec_utils.g_current_level := i;
524: ec_utils.execute_stage_data
525: (
526: 20,
527: i

Line 524: ec_utils.execute_stage_data

520: IF ec_utils.g_int_levels(i).parent_level = i_level
521: THEN
522: -- Set the Global Variable for Current Level
523: ec_utils.g_current_level := i;
524: ec_utils.execute_stage_data
525: (
526: 20,
527: i
528: );

Line 530: i_rows_processed := dbms_sql.execute (ec_utils.g_int_levels(i).Cursor_Handle);

526: 20,
527: i
528: );
529:
530: i_rows_processed := dbms_sql.execute (ec_utils.g_int_levels(i).Cursor_Handle);
531: if ec_debug.G_debug_level = 3 then
532: ec_debug.pl(3,'Cursor Handle',ec_utils.g_int_levels(i).Cursor_handle);
533: end if;
534: while dbms_sql.fetch_rows( ec_utils.g_int_levels(i).Cursor_handle) > 0

Line 532: ec_debug.pl(3,'Cursor Handle',ec_utils.g_int_levels(i).Cursor_handle);

528: );
529:
530: i_rows_processed := dbms_sql.execute (ec_utils.g_int_levels(i).Cursor_Handle);
531: if ec_debug.G_debug_level = 3 then
532: ec_debug.pl(3,'Cursor Handle',ec_utils.g_int_levels(i).Cursor_handle);
533: end if;
534: while dbms_sql.fetch_rows( ec_utils.g_int_levels(i).Cursor_handle) > 0
535: LOOP
536: if ec_debug.G_debug_level = 3 then

Line 534: while dbms_sql.fetch_rows( ec_utils.g_int_levels(i).Cursor_handle) > 0

530: i_rows_processed := dbms_sql.execute (ec_utils.g_int_levels(i).Cursor_Handle);
531: if ec_debug.G_debug_level = 3 then
532: ec_debug.pl(3,'Cursor Handle',ec_utils.g_int_levels(i).Cursor_handle);
533: end if;
534: while dbms_sql.fetch_rows( ec_utils.g_int_levels(i).Cursor_handle) > 0
535: LOOP
536: if ec_debug.G_debug_level = 3 then
537: ec_debug.pl(3,'Processing Row: '||dbms_sql.last_row_count||' for Level '||
538: ec_utils.g_int_levels(i).interface_level);

Line 538: ec_utils.g_int_levels(i).interface_level);

534: while dbms_sql.fetch_rows( ec_utils.g_int_levels(i).Cursor_handle) > 0
535: LOOP
536: if ec_debug.G_debug_level = 3 then
537: ec_debug.pl(3,'Processing Row: '||dbms_sql.last_row_count||' for Level '||
538: ec_utils.g_int_levels(i).interface_level);
539: end if;
540: -- Get Values from the View
541: -- Initialize the Column Counter
542: i_column_counter :=0;

Line 543: for j in ec_utils.g_int_levels(i).file_start_pos..ec_utils.g_int_levels(i).file_end_pos

539: end if;
540: -- Get Values from the View
541: -- Initialize the Column Counter
542: i_column_counter :=0;
543: for j in ec_utils.g_int_levels(i).file_start_pos..ec_utils.g_int_levels(i).file_end_pos
544: loop
545: i_column_counter := i_column_counter + 1;
546:
547: dbms_sql.column_value

Line 549: ec_utils.g_int_levels(i).Cursor_handle,

545: i_column_counter := i_column_counter + 1;
546:
547: dbms_sql.column_value
548: (
549: ec_utils.g_int_levels(i).Cursor_handle,
550: i_column_counter,
551: ec_utils.g_file_tbl(j).value
552: );
553: if ec_debug.G_debug_level = 3 then

Line 551: ec_utils.g_file_tbl(j).value

547: dbms_sql.column_value
548: (
549: ec_utils.g_int_levels(i).Cursor_handle,
550: i_column_counter,
551: ec_utils.g_file_tbl(j).value
552: );
553: if ec_debug.G_debug_level = 3 then
554: if ec_utils.g_file_tbl(j).base_column_name is not null
555: then

Line 554: if ec_utils.g_file_tbl(j).base_column_name is not null

550: i_column_counter,
551: ec_utils.g_file_tbl(j).value
552: );
553: if ec_debug.G_debug_level = 3 then
554: if ec_utils.g_file_tbl(j).base_column_name is not null
555: then
556: ec_debug.pl(
557: 3,
558: ec_utils.g_file_tbl(j).base_column_name,

Line 558: ec_utils.g_file_tbl(j).base_column_name,

554: if ec_utils.g_file_tbl(j).base_column_name is not null
555: then
556: ec_debug.pl(
557: 3,
558: ec_utils.g_file_tbl(j).base_column_name,
559: ec_utils.g_file_tbl(j).value
560: );
561: end if;
562: end if;

Line 559: ec_utils.g_file_tbl(j).value

555: then
556: ec_debug.pl(
557: 3,
558: ec_utils.g_file_tbl(j).base_column_name,
559: ec_utils.g_file_tbl(j).value
560: );
561: end if;
562: end if;
563: end loop;

Line 566: ec_utils.execute_stage_data

562: end if;
563: end loop;
564:
565: -- Stage 30 Actions
566: ec_utils.execute_stage_data
567: (
568: 30,
569: i
570: );

Line 573: for k in 1..ec_utils.g_int_ext_levels.COUNT

569: i
570: );
571:
572:
573: for k in 1..ec_utils.g_int_ext_levels.COUNT
574: loop
575: if ec_utils.g_int_ext_levels(k).interface_level = i
576: then
577: if k < ec_utils.g_int_ext_levels.COUNT

Line 575: if ec_utils.g_int_ext_levels(k).interface_level = i

571:
572:
573: for k in 1..ec_utils.g_int_ext_levels.COUNT
574: loop
575: if ec_utils.g_int_ext_levels(k).interface_level = i
576: then
577: if k < ec_utils.g_int_ext_levels.COUNT
578: then
579: if ec_utils.g_int_ext_levels(k+1).external_level <>

Line 577: if k < ec_utils.g_int_ext_levels.COUNT

573: for k in 1..ec_utils.g_int_ext_levels.COUNT
574: loop
575: if ec_utils.g_int_ext_levels(k).interface_level = i
576: then
577: if k < ec_utils.g_int_ext_levels.COUNT
578: then
579: if ec_utils.g_int_ext_levels(k+1).external_level <>
580: ec_utils.g_int_ext_levels(k).external_level
581: then

Line 579: if ec_utils.g_int_ext_levels(k+1).external_level <>

575: if ec_utils.g_int_ext_levels(k).interface_level = i
576: then
577: if k < ec_utils.g_int_ext_levels.COUNT
578: then
579: if ec_utils.g_int_ext_levels(k+1).external_level <>
580: ec_utils.g_int_ext_levels(k).external_level
581: then
582:
583: /**

Line 580: ec_utils.g_int_ext_levels(k).external_level

576: then
577: if k < ec_utils.g_int_ext_levels.COUNT
578: then
579: if ec_utils.g_int_ext_levels(k+1).external_level <>
580: ec_utils.g_int_ext_levels(k).external_level
581: then
582:
583: /**
584: Perform Code Conversion

Line 596: p_level => ec_utils.g_int_ext_levels(k).external_level,

592: p_validation_level => i_validation_level,
593: p_return_status => i_return_status,
594: p_msg_count => i_msg_count,
595: p_msg_data => i_msg_data,
596: p_level => ec_utils.g_int_ext_levels(k).external_level,
597: p_tbl => ec_utils.g_file_tbl
598: );
599:
600: /**

Line 597: p_tbl => ec_utils.g_file_tbl

593: p_return_status => i_return_status,
594: p_msg_count => i_msg_count,
595: p_msg_data => i_msg_data,
596: p_level => ec_utils.g_int_ext_levels(k).external_level,
597: p_tbl => ec_utils.g_file_tbl
598: );
599:
600: /**
601: Check the Status of the Code Conversion API

Line 613: ec_utils.i_ret_code := 2;

609: THEN
610: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',
611: 'EC_OUTBOUND.FETCH_DATA_FROM_VIEW');
612: ec_debug.pl(0,'EC','EC_CODE_CONVERSION_FAILED','LEVEL',i);
613: ec_utils.i_ret_code := 2;
614: RAISE EC_UTILS.PROGRAM_EXIT;
615: END IF;
616:
617: -- Stage 40 Actions

Line 614: RAISE EC_UTILS.PROGRAM_EXIT;

610: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',
611: 'EC_OUTBOUND.FETCH_DATA_FROM_VIEW');
612: ec_debug.pl(0,'EC','EC_CODE_CONVERSION_FAILED','LEVEL',i);
613: ec_utils.i_ret_code := 2;
614: RAISE EC_UTILS.PROGRAM_EXIT;
615: END IF;
616:
617: -- Stage 40 Actions
618: ec_utils.execute_stage_data

Line 618: ec_utils.execute_stage_data

614: RAISE EC_UTILS.PROGRAM_EXIT;
615: END IF;
616:
617: -- Stage 40 Actions
618: ec_utils.execute_stage_data
619: (
620: 40,
621: i
622: );

Line 630: ec_utils.g_int_ext_levels(k).external_level

626: **/
627: --Insert into Staging
628: insert_into_stage
629: (
630: ec_utils.g_int_ext_levels(k).external_level
631: );
632:
633: end if;
634: else

Line 648: p_level => ec_utils.g_int_ext_levels(k).external_level,

644: p_validation_level => i_validation_level,
645: p_return_status => i_return_status,
646: p_msg_count => i_msg_count,
647: p_msg_data => i_msg_data,
648: p_level => ec_utils.g_int_ext_levels(k).external_level,
649: p_tbl => ec_utils.g_file_tbl
650: );
651:
652: /**

Line 649: p_tbl => ec_utils.g_file_tbl

645: p_return_status => i_return_status,
646: p_msg_count => i_msg_count,
647: p_msg_data => i_msg_data,
648: p_level => ec_utils.g_int_ext_levels(k).external_level,
649: p_tbl => ec_utils.g_file_tbl
650: );
651:
652: /**
653: Check the Status of the Code Conversion API

Line 665: ec_utils.i_ret_code := 2;

661: THEN
662: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',
663: 'EC_OUTBOUND.FETCH_DATA_FROM_VIEW');
664: ec_debug.pl(0,'EC','EC_CODE_CONVERSION_FAILED','LEVEL',i);
665: ec_utils.i_ret_code := 2;
666: RAISE EC_UTILS.PROGRAM_EXIT;
667: END IF;
668:
669: -- Stage 40 Actions

Line 666: RAISE EC_UTILS.PROGRAM_EXIT;

662: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL',
663: 'EC_OUTBOUND.FETCH_DATA_FROM_VIEW');
664: ec_debug.pl(0,'EC','EC_CODE_CONVERSION_FAILED','LEVEL',i);
665: ec_utils.i_ret_code := 2;
666: RAISE EC_UTILS.PROGRAM_EXIT;
667: END IF;
668:
669: -- Stage 40 Actions
670: ec_utils.execute_stage_data

Line 670: ec_utils.execute_stage_data

666: RAISE EC_UTILS.PROGRAM_EXIT;
667: END IF;
668:
669: -- Stage 40 Actions
670: ec_utils.execute_stage_data
671: (
672: 40,
673: i
674: );

Line 682: ec_utils.g_int_ext_levels(k).external_level

678: **/
679: --Insert into Staging
680: insert_into_stage
681: (
682: ec_utils.g_int_ext_levels(k).external_level
683: );
684: end if;
685: end if;
686: end loop;

Line 689: ec_utils.execute_stage_data

685: end if;
686: end loop;
687:
688: -- Stage 50 Actions
689: ec_utils.execute_stage_data
690: (
691: 50,
692: i
693: );

Line 701: ec_utils.g_int_levels(i).rows_processed := dbms_sql.last_row_count;

697:
698: END LOOP;
699: if i = 1
700: then
701: ec_utils.g_int_levels(i).rows_processed := dbms_sql.last_row_count;
702: else
703: ec_utils.g_int_levels(i).rows_processed :=
704: ec_utils.g_int_levels(i).rows_processed + dbms_sql.last_row_count;
705: end if;

Line 703: ec_utils.g_int_levels(i).rows_processed :=

699: if i = 1
700: then
701: ec_utils.g_int_levels(i).rows_processed := dbms_sql.last_row_count;
702: else
703: ec_utils.g_int_levels(i).rows_processed :=
704: ec_utils.g_int_levels(i).rows_processed + dbms_sql.last_row_count;
705: end if;
706:
707: END IF;

Line 704: ec_utils.g_int_levels(i).rows_processed + dbms_sql.last_row_count;

700: then
701: ec_utils.g_int_levels(i).rows_processed := dbms_sql.last_row_count;
702: else
703: ec_utils.g_int_levels(i).rows_processed :=
704: ec_utils.g_int_levels(i).rows_processed + dbms_sql.last_row_count;
705: end if;
706:
707: END IF;
708: end loop;

Line 714: WHEN EC_UTILS.PROGRAM_EXIT then

710: ec_debug.pop('EC_OUTBOUND.FETCH_DATA_FROM_VIEW');
711: end if;
712:
713: EXCEPTION
714: WHEN EC_UTILS.PROGRAM_EXIT then
715: raise;
716: WHEN OTHERS THEN
717: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_OUTBOUND.FETCH_DATA_FROM_VIEW');
718: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);

Line 719: ec_utils.i_ret_code :=2;

715: raise;
716: WHEN OTHERS THEN
717: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_OUTBOUND.FETCH_DATA_FROM_VIEW');
718: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
719: ec_utils.i_ret_code :=2;
720: raise EC_UTILS.PROGRAM_EXIT;
721: END fetch_data_from_view;
722:
723: /**

Line 720: raise EC_UTILS.PROGRAM_EXIT;

716: WHEN OTHERS THEN
717: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_OUTBOUND.FETCH_DATA_FROM_VIEW');
718: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
719: ec_utils.i_ret_code :=2;
720: raise EC_UTILS.PROGRAM_EXIT;
721: END fetch_data_from_view;
722:
723: /**
724: Closes all the cursor handles .

Line 737: for i in 1..ec_utils.g_procedure_stack.COUNT

733: Successful execution of the transaction. Close the Cursor handles,
734: Disbale the Debug.
735: **/
736:
737: for i in 1..ec_utils.g_procedure_stack.COUNT
738: loop
739: if dbms_sql.IS_OPEN(ec_utils.g_procedure_stack(i).Cursor_Handle)
740: then
741: dbms_sql.close_cursor(ec_utils.g_procedure_stack(i).Cursor_Handle);

Line 739: if dbms_sql.IS_OPEN(ec_utils.g_procedure_stack(i).Cursor_Handle)

735: **/
736:
737: for i in 1..ec_utils.g_procedure_stack.COUNT
738: loop
739: if dbms_sql.IS_OPEN(ec_utils.g_procedure_stack(i).Cursor_Handle)
740: then
741: dbms_sql.close_cursor(ec_utils.g_procedure_stack(i).Cursor_Handle);
742: end if;
743: end loop;

Line 741: dbms_sql.close_cursor(ec_utils.g_procedure_stack(i).Cursor_Handle);

737: for i in 1..ec_utils.g_procedure_stack.COUNT
738: loop
739: if dbms_sql.IS_OPEN(ec_utils.g_procedure_stack(i).Cursor_Handle)
740: then
741: dbms_sql.close_cursor(ec_utils.g_procedure_stack(i).Cursor_Handle);
742: end if;
743: end loop;
744:
745: for i in 1..ec_utils.g_int_levels.COUNT

Line 745: for i in 1..ec_utils.g_int_levels.COUNT

741: dbms_sql.close_cursor(ec_utils.g_procedure_stack(i).Cursor_Handle);
742: end if;
743: end loop;
744:
745: for i in 1..ec_utils.g_int_levels.COUNT
746: loop
747: if dbms_sql.IS_OPEN(ec_utils.g_int_levels(i).Cursor_Handle)
748: then
749: dbms_sql.close_cursor(ec_utils.g_int_levels(i).Cursor_Handle);

Line 747: if dbms_sql.IS_OPEN(ec_utils.g_int_levels(i).Cursor_Handle)

743: end loop;
744:
745: for i in 1..ec_utils.g_int_levels.COUNT
746: loop
747: if dbms_sql.IS_OPEN(ec_utils.g_int_levels(i).Cursor_Handle)
748: then
749: dbms_sql.close_cursor(ec_utils.g_int_levels(i).Cursor_Handle);
750: end if;
751: end loop;

Line 749: dbms_sql.close_cursor(ec_utils.g_int_levels(i).Cursor_Handle);

745: for i in 1..ec_utils.g_int_levels.COUNT
746: loop
747: if dbms_sql.IS_OPEN(ec_utils.g_int_levels(i).Cursor_Handle)
748: then
749: dbms_sql.close_cursor(ec_utils.g_int_levels(i).Cursor_Handle);
750: end if;
751: end loop;
752:
753: for i in 1..ec_utils.g_ext_levels.COUNT

Line 753: for i in 1..ec_utils.g_ext_levels.COUNT

749: dbms_sql.close_cursor(ec_utils.g_int_levels(i).Cursor_Handle);
750: end if;
751: end loop;
752:
753: for i in 1..ec_utils.g_ext_levels.COUNT
754: loop
755:
756: if dbms_sql.IS_OPEN(ec_utils.g_ext_levels(i).cursor_handle)
757: then

Line 756: if dbms_sql.IS_OPEN(ec_utils.g_ext_levels(i).cursor_handle)

752:
753: for i in 1..ec_utils.g_ext_levels.COUNT
754: loop
755:
756: if dbms_sql.IS_OPEN(ec_utils.g_ext_levels(i).cursor_handle)
757: then
758: dbms_sql.close_cursor(ec_utils.g_ext_levels(i).cursor_handle);
759: end if;
760: end loop;

Line 758: dbms_sql.close_cursor(ec_utils.g_ext_levels(i).cursor_handle);

754: loop
755:
756: if dbms_sql.IS_OPEN(ec_utils.g_ext_levels(i).cursor_handle)
757: then
758: dbms_sql.close_cursor(ec_utils.g_ext_levels(i).cursor_handle);
759: end if;
760: end loop;
761: if ec_debug.G_debug_level >= 2 then
762: ec_debug.pop('EC_OUTBOUND.CLOSE_OUTBOUND');

Line 769: ec_utils.i_ret_code :=2;

765: exception
766: WHEN OTHERS THEN
767: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_OUTBOUND.CLOSE_OUTBOUND');
768: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
769: ec_utils.i_ret_code :=2;
770: raise EC_UTILS.PROGRAM_EXIT;
771: end close_outbound;
772:
773: /**

Line 770: raise EC_UTILS.PROGRAM_EXIT;

766: WHEN OTHERS THEN
767: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_OUTBOUND.CLOSE_OUTBOUND');
768: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
769: ec_utils.i_ret_code :=2;
770: raise EC_UTILS.PROGRAM_EXIT;
771: end close_outbound;
772:
773: /**
774: Main Call for Processing Outbound Documents

Line 793: ec_utils.g_file_tbl.DELETE;

789: ec_debug.push('EC_OUTBOUND.PROCESS_OUTBOUND_DOCUMENTS');
790: end if;
791:
792: /** Initialize Memory Structures**/
793: ec_utils.g_file_tbl.DELETE;
794: ec_utils.g_int_levels.DELETE;
795: ec_utils.g_ext_levels.DELETE;
796: ec_utils.g_int_ext_levels.DELETE;
797: ec_utils.g_stage_data.DELETE;

Line 794: ec_utils.g_int_levels.DELETE;

790: end if;
791:
792: /** Initialize Memory Structures**/
793: ec_utils.g_file_tbl.DELETE;
794: ec_utils.g_int_levels.DELETE;
795: ec_utils.g_ext_levels.DELETE;
796: ec_utils.g_int_ext_levels.DELETE;
797: ec_utils.g_stage_data.DELETE;
798: ec_utils.g_parameter_stack.DELETE;

Line 795: ec_utils.g_ext_levels.DELETE;

791:
792: /** Initialize Memory Structures**/
793: ec_utils.g_file_tbl.DELETE;
794: ec_utils.g_int_levels.DELETE;
795: ec_utils.g_ext_levels.DELETE;
796: ec_utils.g_int_ext_levels.DELETE;
797: ec_utils.g_stage_data.DELETE;
798: ec_utils.g_parameter_stack.DELETE;
799: ec_utils.g_procedure_stack.DELETE;

Line 796: ec_utils.g_int_ext_levels.DELETE;

792: /** Initialize Memory Structures**/
793: ec_utils.g_file_tbl.DELETE;
794: ec_utils.g_int_levels.DELETE;
795: ec_utils.g_ext_levels.DELETE;
796: ec_utils.g_int_ext_levels.DELETE;
797: ec_utils.g_stage_data.DELETE;
798: ec_utils.g_parameter_stack.DELETE;
799: ec_utils.g_procedure_stack.DELETE;
800: ec_utils.g_procedure_mappings.DELETE;

Line 797: ec_utils.g_stage_data.DELETE;

793: ec_utils.g_file_tbl.DELETE;
794: ec_utils.g_int_levels.DELETE;
795: ec_utils.g_ext_levels.DELETE;
796: ec_utils.g_int_ext_levels.DELETE;
797: ec_utils.g_stage_data.DELETE;
798: ec_utils.g_parameter_stack.DELETE;
799: ec_utils.g_procedure_stack.DELETE;
800: ec_utils.g_procedure_mappings.DELETE;
801: ec_utils.g_stack_pointer.DELETE;

Line 798: ec_utils.g_parameter_stack.DELETE;

794: ec_utils.g_int_levels.DELETE;
795: ec_utils.g_ext_levels.DELETE;
796: ec_utils.g_int_ext_levels.DELETE;
797: ec_utils.g_stage_data.DELETE;
798: ec_utils.g_parameter_stack.DELETE;
799: ec_utils.g_procedure_stack.DELETE;
800: ec_utils.g_procedure_mappings.DELETE;
801: ec_utils.g_stack_pointer.DELETE;
802: ec_utils.g_transaction_type := i_transaction_type;

Line 799: ec_utils.g_procedure_stack.DELETE;

795: ec_utils.g_ext_levels.DELETE;
796: ec_utils.g_int_ext_levels.DELETE;
797: ec_utils.g_stage_data.DELETE;
798: ec_utils.g_parameter_stack.DELETE;
799: ec_utils.g_procedure_stack.DELETE;
800: ec_utils.g_procedure_mappings.DELETE;
801: ec_utils.g_stack_pointer.DELETE;
802: ec_utils.g_transaction_type := i_transaction_type;
803: ec_utils.g_direction := substrb(i_transaction_type,length(i_transaction_type),1);

Line 800: ec_utils.g_procedure_mappings.DELETE;

796: ec_utils.g_int_ext_levels.DELETE;
797: ec_utils.g_stage_data.DELETE;
798: ec_utils.g_parameter_stack.DELETE;
799: ec_utils.g_procedure_stack.DELETE;
800: ec_utils.g_procedure_mappings.DELETE;
801: ec_utils.g_stack_pointer.DELETE;
802: ec_utils.g_transaction_type := i_transaction_type;
803: ec_utils.g_direction := substrb(i_transaction_type,length(i_transaction_type),1);
804: ec_utils.g_map_id := i_map_id;

Line 801: ec_utils.g_stack_pointer.DELETE;

797: ec_utils.g_stage_data.DELETE;
798: ec_utils.g_parameter_stack.DELETE;
799: ec_utils.g_procedure_stack.DELETE;
800: ec_utils.g_procedure_mappings.DELETE;
801: ec_utils.g_stack_pointer.DELETE;
802: ec_utils.g_transaction_type := i_transaction_type;
803: ec_utils.g_direction := substrb(i_transaction_type,length(i_transaction_type),1);
804: ec_utils.g_map_id := i_map_id;
805:

Line 802: ec_utils.g_transaction_type := i_transaction_type;

798: ec_utils.g_parameter_stack.DELETE;
799: ec_utils.g_procedure_stack.DELETE;
800: ec_utils.g_procedure_mappings.DELETE;
801: ec_utils.g_stack_pointer.DELETE;
802: ec_utils.g_transaction_type := i_transaction_type;
803: ec_utils.g_direction := substrb(i_transaction_type,length(i_transaction_type),1);
804: ec_utils.g_map_id := i_map_id;
805:
806: if ec_debug.G_debug_level = 3 then

Line 803: ec_utils.g_direction := substrb(i_transaction_type,length(i_transaction_type),1);

799: ec_utils.g_procedure_stack.DELETE;
800: ec_utils.g_procedure_mappings.DELETE;
801: ec_utils.g_stack_pointer.DELETE;
802: ec_utils.g_transaction_type := i_transaction_type;
803: ec_utils.g_direction := substrb(i_transaction_type,length(i_transaction_type),1);
804: ec_utils.g_map_id := i_map_id;
805:
806: if ec_debug.G_debug_level = 3 then
807: ec_debug.pl(3,'g_direction',ec_utils.g_direction);

Line 804: ec_utils.g_map_id := i_map_id;

800: ec_utils.g_procedure_mappings.DELETE;
801: ec_utils.g_stack_pointer.DELETE;
802: ec_utils.g_transaction_type := i_transaction_type;
803: ec_utils.g_direction := substrb(i_transaction_type,length(i_transaction_type),1);
804: ec_utils.g_map_id := i_map_id;
805:
806: if ec_debug.G_debug_level = 3 then
807: ec_debug.pl(3,'g_direction',ec_utils.g_direction);
808: end if;

Line 807: ec_debug.pl(3,'g_direction',ec_utils.g_direction);

803: ec_utils.g_direction := substrb(i_transaction_type,length(i_transaction_type),1);
804: ec_utils.g_map_id := i_map_id;
805:
806: if ec_debug.G_debug_level = 3 then
807: ec_debug.pl(3,'g_direction',ec_utils.g_direction);
808: end if;
809: /**
810: If the program is run from SQLplus , the Concurrent Request id is
811: < 0. In this case , get the run id from ECE_OUTPUT_RUNS_S.NEXTVAL.

Line 820: ec_utils.g_run_id := i_run_id;

816: select ece_output_runs_s.NEXTVAL
817: into i_run_id
818: from dual;
819: end if;
820: ec_utils.g_run_id := i_run_id;
821: if ec_debug.G_debug_level = 3 then
822: ec_debug.pl(3,'Run Id for the Transaction',ec_utils.g_run_id);
823: end if;
824:

Line 822: ec_debug.pl(3,'Run Id for the Transaction',ec_utils.g_run_id);

818: from dual;
819: end if;
820: ec_utils.g_run_id := i_run_id;
821: if ec_debug.G_debug_level = 3 then
822: ec_debug.pl(3,'Run Id for the Transaction',ec_utils.g_run_id);
823: end if;
824:
825: ec_utils.get_tran_stage_data
826: (

Line 825: ec_utils.get_tran_stage_data

821: if ec_debug.G_debug_level = 3 then
822: ec_debug.pl(3,'Run Id for the Transaction',ec_utils.g_run_id);
823: end if;
824:
825: ec_utils.get_tran_stage_data
826: (
827: i_transaction_type,
828: i_map_id
829: );

Line 837: ec_utils.sort_stage_data;

833: i_transaction_type,
834: i_map_id
835: );
836:
837: ec_utils.sort_stage_data;
838:
839: ec_utils.find_pos
840: (
841: 1,

Line 839: ec_utils.find_pos

835: );
836:
837: ec_utils.sort_stage_data;
838:
839: ec_utils.find_pos
840: (
841: 1,
842: ec_utils.g_int_levels(1).key_column_name,
843: i_plsql_pos,

Line 842: ec_utils.g_int_levels(1).key_column_name,

838:
839: ec_utils.find_pos
840: (
841: 1,
842: ec_utils.g_int_levels(1).key_column_name,
843: i_plsql_pos,
844: TRUE
845: );
846:

Line 849: ec_utils.i_stage_data := ec_utils.i_tmp_stage_data; -- 2920679

845: );
846:
847: g_key_column_pos := i_plsql_pos;
848:
849: ec_utils.i_stage_data := ec_utils.i_tmp_stage_data; -- 2920679
850:
851: ec_utils.execute_stage_data
852: (
853: 10,

Line 851: ec_utils.execute_stage_data

847: g_key_column_pos := i_plsql_pos;
848:
849: ec_utils.i_stage_data := ec_utils.i_tmp_stage_data; -- 2920679
850:
851: ec_utils.execute_stage_data
852: (
853: 10,
854: 0
855: );

Line 861: for i in 1..ec_utils.g_int_levels.COUNT

857: load_objects;
858:
859: fetch_data_from_view (0);
860: if ec_debug.G_debug_level >= 1 then
861: for i in 1..ec_utils.g_int_levels.COUNT
862: loop
863: ec_debug.pl(1,ec_utils.g_int_levels(i).rows_processed||' row(s) processed for Level '||i);
864: end loop;
865: end if;

Line 863: ec_debug.pl(1,ec_utils.g_int_levels(i).rows_processed||' row(s) processed for Level '||i);

859: fetch_data_from_view (0);
860: if ec_debug.G_debug_level >= 1 then
861: for i in 1..ec_utils.g_int_levels.COUNT
862: loop
863: ec_debug.pl(1,ec_utils.g_int_levels(i).rows_processed||' row(s) processed for Level '||i);
864: end loop;
865: end if;
866: ec_debug.pl(0,'EC','ECE_DOCUMENTS_PROCESSED','NO_OF_DOCS',ec_utils.g_int_levels(1).rows_processed);
867:

Line 866: ec_debug.pl(0,'EC','ECE_DOCUMENTS_PROCESSED','NO_OF_DOCS',ec_utils.g_int_levels(1).rows_processed);

862: loop
863: ec_debug.pl(1,ec_utils.g_int_levels(i).rows_processed||' row(s) processed for Level '||i);
864: end loop;
865: end if;
866: ec_debug.pl(0,'EC','ECE_DOCUMENTS_PROCESSED','NO_OF_DOCS',ec_utils.g_int_levels(1).rows_processed);
867:
868: close_outbound;
869: if ec_debug.G_debug_level >= 2 then
870: ec_debug.pop('EC_OUTBOUND.PROCESS_OUTBOUND_DOCUMENTS');

Line 874: WHEN EC_UTILS.PROGRAM_EXIT then

870: ec_debug.pop('EC_OUTBOUND.PROCESS_OUTBOUND_DOCUMENTS');
871: end if;
872: ec_debug.pl(0,'EC','ECE_FINISH_OUTBOUND','TRANSACTION_TYPE',i_transaction_type,'MAP_ID',i_map_id);
873: EXCEPTION
874: WHEN EC_UTILS.PROGRAM_EXIT then
875: raise;
876: WHEN OTHERS THEN
877: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_OUTBOUND.PROCESS_OUTBOUND_DOCUMENTS');
878: ec_debug.pl(0,'EC','ECE_ERROR_CODE','ERROR_CODE',SQLCODE);

Line 882: raise EC_UTILS.PROGRAM_EXIT;

878: ec_debug.pl(0,'EC','ECE_ERROR_CODE','ERROR_CODE',SQLCODE);
879: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
880: close_outbound;
881: ec_debug.pop('EC_OUTBOUND.PROCESS_OUTBOUND_DOCUMENTS');
882: raise EC_UTILS.PROGRAM_EXIT;
883: end process_outbound_documents;
884:
885: /**
886: This file will delete all records in a staging table without using the

Line 907: EC_UTILS.i_ret_code := 2;

903: ec_debug.pl(0,'EC','ECE_PARAM_MISSING','PARAMETER','I_RUN_ID', 'PROCEDURE','EC_OUTBOUND.DELETE_STAGE_DATA');
904: /**
905: Set the FAILURE Retcode for the Concurrent Manager
906: **/
907: EC_UTILS.i_ret_code := 2;
908: raise EC_UTILS.PROGRAM_EXIT;
909: END IF;
910:
911: /**

Line 908: raise EC_UTILS.PROGRAM_EXIT;

904: /**
905: Set the FAILURE Retcode for the Concurrent Manager
906: **/
907: EC_UTILS.i_ret_code := 2;
908: raise EC_UTILS.PROGRAM_EXIT;
909: END IF;
910:
911: /**
912: Delete all indicated records from ECE_STAGE

Line 932: WHEN EC_UTILS.PROGRAM_EXIT then

928:
929: ec_debug.pop('EC_OUTBOUND.DELETE_STAGE_DATA');
930: end if;
931: EXCEPTION
932: WHEN EC_UTILS.PROGRAM_EXIT then
933: raise;
934: WHEN OTHERS THEN
935: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_OUTBOUND.DELETE_STAGE_DATA');
936: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);

Line 937: ec_utils.i_ret_code:=2;

933: raise;
934: WHEN OTHERS THEN
935: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_OUTBOUND.DELETE_STAGE_DATA');
936: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
937: ec_utils.i_ret_code:=2;
938: raise EC_UTILS.PROGRAM_EXIT;
939: END delete_stage_data;
940:
941: end ec_outbound;

Line 938: raise EC_UTILS.PROGRAM_EXIT;

934: WHEN OTHERS THEN
935: ec_debug.pl(0,'EC','ECE_PROGRAM_ERROR','PROGRESS_LEVEL','EC_OUTBOUND.DELETE_STAGE_DATA');
936: ec_debug.pl(0,'EC','ECE_ERROR_MESSAGE','ERROR_MESSAGE',SQLERRM);
937: ec_utils.i_ret_code:=2;
938: raise EC_UTILS.PROGRAM_EXIT;
939: END delete_stage_data;
940:
941: end ec_outbound;