[Home] [Help]
5: is
6: l_new_header_id number;
7: begin
8: select IGI_CIS_MTH_RET_HDR_T_S.nextval into l_new_header_id from dual;
9: insert into igi_cis_mth_ret_hdr_h
10: (HEADER_ID,
11: ORG_ID,
12: CIS_SENDER_ID,
13: TAX_OFFICE_NUMBER,
54: LAST_UPDATED_BY,
55: LAST_UPDATE_LOGIN,
56: CREATION_DATE,
57: CREATED_BY
58: from igi_cis_mth_ret_hdr_h
59: where HEADER_ID = p_old_header_id ;
60:
61: insert into igi_cis_mth_ret_lines_h
62: (HEADER_ID,
162: select count(header_id) into l_temp_count
163: from igi_cis_mth_ret_hdr_t where header_id = p_in_header_id;
164:
165: select count(header_id) into l_hist_count
166: from igi_cis_mth_ret_hdr_h where header_id = p_in_header_id;
167:
168: if l_temp_count = 0 and l_hist_count > 0 then
169: populate_history(p_in_header_id,p_in_completion_code);
170: return;
179: where HEADER_ID = p_in_header_id;
180: BEGIN
181: select count(header_id)
182: into l_cnt_header_id
183: from igi_cis_mth_ret_hdr_h
184: where header_id = p_in_header_id
185: group by header_id;
186: EXCEPTION
187: when no_data_found then
187: when no_data_found then
188: l_cnt_header_id := 0;
189: END;
190: IF (l_cnt_header_id = 0) THEN
191: insert into igi_cis_mth_ret_hdr_h
192: (HEADER_ID,
193: ORG_ID,
194: CIS_SENDER_ID,
195: TAX_OFFICE_NUMBER,