1518: BEGIN
1519: retcode := '0';
1520:
1521: --Log
1522: FND_FILE.put_line(FND_FILE.LOG,'p_business_area_id=' ||p_business_area_id );
1523: FND_FILE.put_line(FND_FILE.LOG,'p_instance_id=' ||p_instance_id);
1524:
1525: -- Get the task id to pass on to the solve program
1526: SELECT task_id INTO l_taskid
1519: retcode := '0';
1520:
1521: --Log
1522: FND_FILE.put_line(FND_FILE.LOG,'p_business_area_id=' ||p_business_area_id );
1523: FND_FILE.put_line(FND_FILE.LOG,'p_instance_id=' ||p_instance_id);
1524:
1525: -- Get the task id to pass on to the solve program
1526: SELECT task_id INTO l_taskid
1527: FROM zpb_analysis_cycle_tasks
1533: ) + 1
1534: AND analysis_cycle_id = p_instance_id;
1535:
1536: -- Log
1537: FND_FILE.put_line(FND_FILE.LOG,'l_taskid=' ||l_taskid);
1538:
1539:
1540: -- Test run of solve
1541: ZPB_AW.INITIALIZE_FOR_AC (p_api_version => 1.0,
1565: ZPB_AW.DETACH_ALL;
1566: attached := 'N';
1567:
1568: --log solve OK
1569: FND_FILE.put_line(FND_FILE.LOG,'Solve ok');
1570: return;
1571:
1572: exception
1573: when no_data_found then
1577: if attached = 'Y' then
1578: ZPB_AW.DETACH_ALL;
1579: end if;
1580:
1581: FND_FILE.put_line(FND_FILE.LOG, 'Solve not ok');
1582: errbuf := 'No task found';
1583:
1584:
1585: when others then
1589: ZPB_AW.DETACH_ALL;
1590: end if;
1591:
1592: --log solve not OK
1593: FND_FILE.put_line(FND_FILE.LOG, 'Solve not ok');
1594: errbuf:=substr(sqlerrm, 1, 255);
1595:
1596: end run_solve;
1597: