DBA Data[Home] [Help]

APPS.CN_PERIODS_API dependencies on CN_PROCESS_BATCHES

Line 153: UPDATE cn_process_batches

149: l_prog_appl_id NUMBER(15) := fnd_global.prog_appl_id;
150: BEGIN
151: -- Giving the batch an 'ERROR' status prevents subsequent
152: -- physical processes picking it up.
153: UPDATE cn_process_batches
154: SET status_code = 'ERROR'
155: ,last_update_date = sysdate
156: ,last_update_login = l_login_id
157: ,last_updated_by = l_user_id

Line 197: FROM cn_process_batches

193: l_failed_request_id NUMBER;
194:
195: CURSOR physical_batches IS
196: SELECT DISTINCT physical_batch_id
197: FROM cn_process_batches
198: WHERE logical_batch_id = p_logical_batch_id;
199: BEGIN
200: cn_message_pkg.flush;
201:

Line 376: -- insert people into cn_process_batches

372: ---------------------------------------------------------------
373: --initialize message list
374: fnd_msg_pub.initialize;
375:
376: -- insert people into cn_process_batches
377: select cn_process_batches_s2.nextval into l_logical_batch_id from dual;
378:
379: -- determine the periods to process
380: select min(period_id), max(period_id), min(start_date), max(end_date)

Line 377: select cn_process_batches_s2.nextval into l_logical_batch_id from dual;

373: --initialize message list
374: fnd_msg_pub.initialize;
375:
376: -- insert people into cn_process_batches
377: select cn_process_batches_s2.nextval into l_logical_batch_id from dual;
378:
379: -- determine the periods to process
380: select min(period_id), max(period_id), min(start_date), max(end_date)
381: into l_start_period_id, l_end_period_id, l_start_date, l_end_date

Line 391: insert into cn_process_batches

387: fnd_file.put_line(fnd_file.Log, ' : Min Period Id => '||l_start_period_id);
388: fnd_file.put_line(fnd_file.Log, ' : Max Period Id => '||l_end_period_id);
389: ----------------------------------------------------------------------------------
390:
391: insert into cn_process_batches
392: (process_batch_id,
393: logical_batch_id,
394: srp_period_id,
395: period_id,

Line 406: select cn_process_batches_s1.nextval,

402: process_batch_type,
403: creation_date,
404: created_by,
405: org_id)
406: select cn_process_batches_s1.nextval,
407: l_logical_batch_id,
408: 1,
409: cps.period_id,
410: cps.period_id,

Line 436: from cn_process_batches

432: where cps.processing_status_code = 'PROCESSING'
433: and cps.period_id between l_start_period_id and l_end_period_id
434: and not exists
435: (select 1
436: from cn_process_batches
437: where logical_batch_id = (select logical_batch_id
438: from cn_period_statuses
439: where period_id = cps.period_id)
440: and salesrep_id = v.salesrep_id

Line 454: select cn_process_batches_s3.nextval into l_physical_batch_id from dual;

450: fnd_file.put_line(fnd_file.Log, ' : Logical Batch Id => '||l_logical_batch_id);
451: ----------------------------------------------------------------------------
452:
453: loop
454: select cn_process_batches_s3.nextval into l_physical_batch_id from dual;
455: ----------------------------------------------------------------------------
456: fnd_file.put_line(fnd_file.Log, ' : Physical Batch Id => '||l_physical_batch_id);
457: ----------------------------------------------------------------------------
458: update cn_process_batches

Line 458: update cn_process_batches

454: select cn_process_batches_s3.nextval into l_physical_batch_id from dual;
455: ----------------------------------------------------------------------------
456: fnd_file.put_line(fnd_file.Log, ' : Physical Batch Id => '||l_physical_batch_id);
457: ----------------------------------------------------------------------------
458: update cn_process_batches
459: set physical_batch_id = l_physical_batch_id
460: where logical_batch_id = l_logical_batch_id
461: and physical_batch_id is null
462: and rownum <= l_temp;

Line 469: update cn_process_batches pb

465: exit;
466: end if;
467: end loop;
468:
469: update cn_process_batches pb
470: set pb.physical_batch_id = (select min(physical_batch_id)
471: from cn_process_batches
472: where logical_batch_id = pb.logical_batch_id
473: and salesrep_id = pb.salesrep_id)

Line 471: from cn_process_batches

467: end loop;
468:
469: update cn_process_batches pb
470: set pb.physical_batch_id = (select min(physical_batch_id)
471: from cn_process_batches
472: where logical_batch_id = pb.logical_batch_id
473: and salesrep_id = pb.salesrep_id)
474: where pb.logical_batch_id = l_logical_batch_id;
475:

Line 527: FROM cn_process_batches

523:
524: BEGIN
525: SELECT 1 INTO l_temp FROM dual
526: WHERE NOT exists (SELECT 1
527: FROM cn_process_batches
528: WHERE logical_batch_id = l_logical_batch_id AND status_code = 'ERROR');
529: EXCEPTION
530: WHEN no_data_found THEN
531: cn_message_pkg.debug('There is some physical batch that failed.');

Line 607: FROM cn_process_batches

603:
604: -- bug 4135215 for telecom italia
605: CURSOR affected_srps IS
606: SELECT salesrep_id, period_id, org_id
607: FROM cn_process_batches
608: WHERE physical_batch_id = p_physical_batch_id
609: AND sales_lines_total = 0
610: ORDER BY period_id;
611:

Line 869: UPDATE cn_process_batches

865:
866: END LOOP; -- srp_plan_info
867:
868: -- mark that this rep, period IS done
869: UPDATE cn_process_batches
870: SET sales_lines_total = 1
871: WHERE physical_batch_id = p_physical_batch_id
872: AND salesrep_id = srp.salesrep_id
873: AND period_id = srp.period_id;