40: l_err_msg VARCHAR2(2000);
41: l_msg_index_out NUMBER;
42: l_warranty_contract_id NUMBER;
43:
44: l_warranty_cont_id_tbl AHL_WARRANTY_UTILS_PVT.warranty_contract_id_tbl_type;
45: l_index NUMBER := 1;
46:
47: -- cursor to fetch all the IB instances for which:
48: -- 1) there's a valid template assigned with 'Auto Assign' marked
157: END LOOP;
158: CLOSE auto_assign_item_instances_csr;
159:
160: IF (l_warranty_cont_id_tbl.COUNT > 0) THEN
161: -- call AHL_WARRANTY_UTILS_PVT.Calc_Contract_Exp_Date API to calculate the expiration date
162: -- of the created contracts, including all their counters
163: FND_FILE.put_line(FND_FILE.LOG, 'before calling AHL_WARRANTY_UTILS_PVT.Calc_Contract_Exp_Date');
164: FND_FILE.NEW_LINE(FND_FILE.LOG, 1);
165: FND_FILE.put_line(FND_FILE.LOG, 'l_warranty_cont_id_tbl.COUNT -> '||l_warranty_cont_id_tbl.COUNT);
159:
160: IF (l_warranty_cont_id_tbl.COUNT > 0) THEN
161: -- call AHL_WARRANTY_UTILS_PVT.Calc_Contract_Exp_Date API to calculate the expiration date
162: -- of the created contracts, including all their counters
163: FND_FILE.put_line(FND_FILE.LOG, 'before calling AHL_WARRANTY_UTILS_PVT.Calc_Contract_Exp_Date');
164: FND_FILE.NEW_LINE(FND_FILE.LOG, 1);
165: FND_FILE.put_line(FND_FILE.LOG, 'l_warranty_cont_id_tbl.COUNT -> '||l_warranty_cont_id_tbl.COUNT);
166: FND_FILE.NEW_LINE(FND_FILE.LOG, 2);
167:
164: FND_FILE.NEW_LINE(FND_FILE.LOG, 1);
165: FND_FILE.put_line(FND_FILE.LOG, 'l_warranty_cont_id_tbl.COUNT -> '||l_warranty_cont_id_tbl.COUNT);
166: FND_FILE.NEW_LINE(FND_FILE.LOG, 2);
167:
168: AHL_WARRANTY_UTILS_PVT.Calc_Contract_Exp_Date(
169: p_api_version => l_api_version,
170: p_warranty_contract_id_tbl => l_warranty_cont_id_tbl,
171: x_return_status => l_return_status,
172: x_msg_count => l_msg_count,
180: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
181: END IF;
182: END IF;
183:
184: FND_FILE.put_line(FND_FILE.LOG, 'after calling AHL_WARRANTY_UTILS_PVT.Calc_Contract_Exp_Date');
185: FND_FILE.NEW_LINE(FND_FILE.LOG, 2);
186: END IF;
187:
188: -- set the output