57: dphase,
58: dstatus,
59: message);
60:
61: fnd_file.put_line( fnd_file.output, arp_standard.fnd_message('AR_BPA_PRINT_CHILD_REQ',
62: 'REQ_ID',
63: p_request_id,
64: 'PHASE',
65: dphase,
66: 'STATUS',
67: dstatus));
68:
69: IF ((dphase = 'COMPLETE') and (dstatus = 'NORMAL')) THEN
70: fnd_file.put_line( fnd_file.log, 'child request id: ' || p_request_id || ' complete successfully');
71: ELSE
72: fnd_file.put_line( fnd_file.log, 'child request id: ' || p_request_id || ' did not complete successfully');
73: END IF;
74:
68:
69: IF ((dphase = 'COMPLETE') and (dstatus = 'NORMAL')) THEN
70: fnd_file.put_line( fnd_file.log, 'child request id: ' || p_request_id || ' complete successfully');
71: ELSE
72: fnd_file.put_line( fnd_file.log, 'child request id: ' || p_request_id || ' did not complete successfully');
73: END IF;
74:
75: END;
76:
362: where installed_flag = 'B';
363: */
364:
365: MO_global.init('AR');
366: fnd_file.put_line( fnd_file.log, 'userenv_lang: ' || userenv_lang);
367: --fnd_file.put_line( fnd_file.log, 'base_lang: ' || base_lang);/*Bug8486880*/
368:
369: /* Read in Parameter Values supplied by user */
370: retval := FND_REQUEST_INFO.GET_PARAM_NUMBER('Operating Unit',parm_number);
363: */
364:
365: MO_global.init('AR');
366: fnd_file.put_line( fnd_file.log, 'userenv_lang: ' || userenv_lang);
367: --fnd_file.put_line( fnd_file.log, 'base_lang: ' || base_lang);/*Bug8486880*/
368:
369: /* Read in Parameter Values supplied by user */
370: retval := FND_REQUEST_INFO.GET_PARAM_NUMBER('Operating Unit',parm_number);
371: IF retval = -1 THEN
372: p_org_id := NULL;
373: ELSE
374: p_org_id:= FND_REQUEST_INFO.GET_PARAMETER(parm_number);
375: END IF;
376: fnd_file.put_line( fnd_file.log, 'p_org_id: ' || p_org_id);
377:
378: retval := FND_REQUEST_INFO.GET_PARAM_NUMBER('Job Size',parm_number);
379: IF retval = -1 THEN
380: p_job_size:= NULL;
380: p_job_size:= NULL;
381: ELSE
382: p_job_size:= FND_REQUEST_INFO.GET_PARAMETER(parm_number);
383: END IF;
384: fnd_file.put_line( fnd_file.log, 'p_job_size: ' || p_job_size);
385:
386: retval := FND_REQUEST_INFO.GET_PARAM_NUMBER('Customer Number Low',parm_number);
387: IF retval = -1 THEN
388: p_cust_num_low:= NULL;
388: p_cust_num_low:= NULL;
389: ELSE
390: p_cust_num_low:= FND_REQUEST_INFO.GET_PARAMETER(parm_number);
391: END IF;
392: fnd_file.put_line( fnd_file.log, 'p_cust_num_low: ' || p_cust_num_low);
393:
394: retval := FND_REQUEST_INFO.GET_PARAM_NUMBER('Customer Number High',parm_number);
395: IF retval = -1 THEN
396: p_cust_num_high:= NULL;
396: p_cust_num_high:= NULL;
397: ELSE
398: p_cust_num_high:= FND_REQUEST_INFO.GET_PARAMETER(parm_number);
399: END IF;
400: fnd_file.put_line( fnd_file.log, 'p_cust_num_high: ' || p_cust_num_high);
401:
402: retval := FND_REQUEST_INFO.GET_PARAM_NUMBER('Location Low',parm_number);
403: IF retval = -1 THEN
404: p_bill_site_low:= NULL;
404: p_bill_site_low:= NULL;
405: ELSE
406: p_bill_site_low:= FND_REQUEST_INFO.GET_PARAMETER(parm_number);
407: END IF;
408: fnd_file.put_line( fnd_file.log, 'p_bill_site_low: ' || p_bill_site_low);
409:
410: retval := FND_REQUEST_INFO.GET_PARAM_NUMBER('Location High',parm_number);
411: IF retval = -1 THEN
412: p_bill_site_high:= NULL;
412: p_bill_site_high:= NULL;
413: ELSE
414: p_bill_site_high:= FND_REQUEST_INFO.GET_PARAMETER(parm_number);
415: END IF;
416: fnd_file.put_line( fnd_file.log, 'p_bill_site_high: ' || p_bill_site_high);
417:
418: retval := FND_REQUEST_INFO.GET_PARAM_NUMBER('Billing Date Low',parm_number);
419: IF retval = -1 THEN
420: p_bill_date_low:= NULL;
420: p_bill_date_low:= NULL;
421: ELSE
422: p_bill_date_low:= fnd_date.canonical_to_date(FND_REQUEST_INFO.GET_PARAMETER(parm_number));
423: END IF;
424: fnd_file.put_line( fnd_file.log, 'p_bill_date_low: ' || p_bill_date_low);
425:
426: retval := FND_REQUEST_INFO.GET_PARAM_NUMBER('Billing Date High',parm_number);
427: IF retval = -1 THEN
428: p_bill_date_high:= NULL;
428: p_bill_date_high:= NULL;
429: ELSE
430: p_bill_date_high:= fnd_date.canonical_to_date(FND_REQUEST_INFO.GET_PARAMETER(parm_number));
431: END IF;
432: fnd_file.put_line( fnd_file.log, 'p_bill_date_high: ' || p_bill_date_high);
433:
434: retval := FND_REQUEST_INFO.GET_PARAM_NUMBER('Billing Number Low',parm_number);
435: IF retval = -1 THEN
436: p_bill_num_low:= NULL;
436: p_bill_num_low:= NULL;
437: ELSE
438: p_bill_num_low:= FND_REQUEST_INFO.GET_PARAMETER(parm_number);
439: END IF;
440: fnd_file.put_line( fnd_file.log, 'p_bill_num_low: ' || p_bill_num_low);
441:
442: retval := FND_REQUEST_INFO.GET_PARAM_NUMBER('Billing Number High',parm_number);
443: IF retval = -1 THEN
444: p_bill_num_high:= NULL;
444: p_bill_num_high:= NULL;
445: ELSE
446: p_bill_num_high:= FND_REQUEST_INFO.GET_PARAMETER(parm_number);
447: END IF;
448: fnd_file.put_line( fnd_file.log, 'p_bill_num_high: ' || p_bill_num_high);
449:
450: retval := FND_REQUEST_INFO.GET_PARAM_NUMBER('Concurrent Request ID',parm_number);
451: IF retval = -1 THEN
452: p_request_id:= NULL;
452: p_request_id:= NULL;
453: ELSE
454: p_request_id:= FND_REQUEST_INFO.GET_PARAMETER(parm_number);
455: END IF;
456: fnd_file.put_line( fnd_file.log, 'p_request_id: ' || p_request_id);
457:
458: /*Bug8486880*/
459: select_stmt :=
460: ' select distinct(nvl(rtrim(substr(loc.language,1,4)), ''' || userenv_lang || ''')) language ' || cr ||
474: p_where) ;
475:
476: sql_stmt := select_stmt || cr || p_where;
477:
478: -- fnd_file.put_line( fnd_file.log, 'The final sql: ' || sql_stmt);
479: ------------------------------------------------
480: -- Parse sql stmts
481: ------------------------------------------------
482:
519: END IF;
520: END LOOP;
521:
522: IF lang_str IS NULL THEN
523: fnd_file.put_line( fnd_file.log, 'No documents matched the input parameters.' );
524: ELSE
525: fnd_file.put_line( fnd_file.log, 'lang_str: ' || lang_str);
526: END IF;
527:
521:
522: IF lang_str IS NULL THEN
523: fnd_file.put_line( fnd_file.log, 'No documents matched the input parameters.' );
524: ELSE
525: fnd_file.put_line( fnd_file.log, 'lang_str: ' || lang_str);
526: END IF;
527:
528: RETURN lang_str;
529:
528: RETURN lang_str;
529:
530: EXCEPTION
531: WHEN OTHERS THEN
532: fnd_file.put_line( fnd_file.log, sql_stmt);
533: RAISE;
534:
535: END PRINT_MLS_FUNCTION ;
536:
588:
589: BEGIN
590:
591: MO_global.init('AR');
592: FND_FILE.PUT_LINE( FND_FILE.LOG, 'AR_BPA_BFPRI_CONC.print_bills(+)' );
593:
594: -- read the variable request_data to check if it is reentering the program
595: req_data := fnd_conc_global.request_data;
596: m_request_id := fnd_global.conc_request_id;
594: -- read the variable request_data to check if it is reentering the program
595: req_data := fnd_conc_global.request_data;
596: m_request_id := fnd_global.conc_request_id;
597:
598: FND_FILE.PUT_LINE( FND_FILE.LOG, 'print_bills: ' || 'req_data: '|| req_data );
599: FND_FILE.PUT_LINE( FND_FILE.LOG, 'print_bills: ' || 'm_request_id: '|| m_request_id );
600: IF (req_data is null) THEN
601: FND_FILE.PUT_LINE( FND_FILE.LOG, 'print_bills: '
602: || 'Entering print master program at the first time');
595: req_data := fnd_conc_global.request_data;
596: m_request_id := fnd_global.conc_request_id;
597:
598: FND_FILE.PUT_LINE( FND_FILE.LOG, 'print_bills: ' || 'req_data: '|| req_data );
599: FND_FILE.PUT_LINE( FND_FILE.LOG, 'print_bills: ' || 'm_request_id: '|| m_request_id );
600: IF (req_data is null) THEN
601: FND_FILE.PUT_LINE( FND_FILE.LOG, 'print_bills: '
602: || 'Entering print master program at the first time');
603: -- read the user env language
597:
598: FND_FILE.PUT_LINE( FND_FILE.LOG, 'print_bills: ' || 'req_data: '|| req_data );
599: FND_FILE.PUT_LINE( FND_FILE.LOG, 'print_bills: ' || 'm_request_id: '|| m_request_id );
600: IF (req_data is null) THEN
601: FND_FILE.PUT_LINE( FND_FILE.LOG, 'print_bills: '
602: || 'Entering print master program at the first time');
603: -- read the user env language
604: select substr(userenv('LANG'),1,4)
605: into userenv_lang
610: into base_lang
611: from fnd_languages
612: where installed_flag = 'B';*/
613:
614: FND_FILE.PUT_LINE( FND_FILE.LOG, 'userenv_lang: '|| userenv_lang );
615: --fnd_file.put_line( fnd_file.log, 'base_lang: ' || base_lang);
616:
617: if p_job_size > 0 then l_job_size := p_job_size; end if;
618: p_bill_date_high := fnd_date.canonical_to_date(p_bill_date_high_in);
611: from fnd_languages
612: where installed_flag = 'B';*/
613:
614: FND_FILE.PUT_LINE( FND_FILE.LOG, 'userenv_lang: '|| userenv_lang );
615: --fnd_file.put_line( fnd_file.log, 'base_lang: ' || base_lang);
616:
617: if p_job_size > 0 then l_job_size := p_job_size; end if;
618: p_bill_date_high := fnd_date.canonical_to_date(p_bill_date_high_in);
619: p_bill_date_low := fnd_date.canonical_to_date(p_bill_date_low_in);
617: if p_job_size > 0 then l_job_size := p_job_size; end if;
618: p_bill_date_high := fnd_date.canonical_to_date(p_bill_date_high_in);
619: p_bill_date_low := fnd_date.canonical_to_date(p_bill_date_low_in);
620: -- print out the input parameters;
621: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_org_id: '|| p_org_id );
622: FND_FILE.PUT_LINE( FND_FILE.LOG, 'l_job_size: '|| l_job_size );
623: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_cust_num_low: '|| p_cust_num_low );
624: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_cust_num_high: '|| p_cust_num_high );
625: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_site_low: '|| p_bill_site_low );
618: p_bill_date_high := fnd_date.canonical_to_date(p_bill_date_high_in);
619: p_bill_date_low := fnd_date.canonical_to_date(p_bill_date_low_in);
620: -- print out the input parameters;
621: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_org_id: '|| p_org_id );
622: FND_FILE.PUT_LINE( FND_FILE.LOG, 'l_job_size: '|| l_job_size );
623: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_cust_num_low: '|| p_cust_num_low );
624: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_cust_num_high: '|| p_cust_num_high );
625: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_site_low: '|| p_bill_site_low );
626: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_site_high: '|| p_bill_site_high );
619: p_bill_date_low := fnd_date.canonical_to_date(p_bill_date_low_in);
620: -- print out the input parameters;
621: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_org_id: '|| p_org_id );
622: FND_FILE.PUT_LINE( FND_FILE.LOG, 'l_job_size: '|| l_job_size );
623: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_cust_num_low: '|| p_cust_num_low );
624: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_cust_num_high: '|| p_cust_num_high );
625: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_site_low: '|| p_bill_site_low );
626: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_site_high: '|| p_bill_site_high );
627: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_date_low: '|| p_bill_date_low );
620: -- print out the input parameters;
621: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_org_id: '|| p_org_id );
622: FND_FILE.PUT_LINE( FND_FILE.LOG, 'l_job_size: '|| l_job_size );
623: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_cust_num_low: '|| p_cust_num_low );
624: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_cust_num_high: '|| p_cust_num_high );
625: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_site_low: '|| p_bill_site_low );
626: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_site_high: '|| p_bill_site_high );
627: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_date_low: '|| p_bill_date_low );
628: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_date_high: '|| p_bill_date_high );
621: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_org_id: '|| p_org_id );
622: FND_FILE.PUT_LINE( FND_FILE.LOG, 'l_job_size: '|| l_job_size );
623: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_cust_num_low: '|| p_cust_num_low );
624: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_cust_num_high: '|| p_cust_num_high );
625: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_site_low: '|| p_bill_site_low );
626: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_site_high: '|| p_bill_site_high );
627: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_date_low: '|| p_bill_date_low );
628: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_date_high: '|| p_bill_date_high );
629: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_num_low: '|| p_bill_num_low );
622: FND_FILE.PUT_LINE( FND_FILE.LOG, 'l_job_size: '|| l_job_size );
623: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_cust_num_low: '|| p_cust_num_low );
624: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_cust_num_high: '|| p_cust_num_high );
625: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_site_low: '|| p_bill_site_low );
626: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_site_high: '|| p_bill_site_high );
627: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_date_low: '|| p_bill_date_low );
628: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_date_high: '|| p_bill_date_high );
629: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_num_low: '|| p_bill_num_low );
630: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_num_high: '|| p_bill_num_high );
623: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_cust_num_low: '|| p_cust_num_low );
624: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_cust_num_high: '|| p_cust_num_high );
625: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_site_low: '|| p_bill_site_low );
626: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_site_high: '|| p_bill_site_high );
627: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_date_low: '|| p_bill_date_low );
628: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_date_high: '|| p_bill_date_high );
629: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_num_low: '|| p_bill_num_low );
630: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_num_high: '|| p_bill_num_high );
631: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_request_id: '|| p_request_id );
624: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_cust_num_high: '|| p_cust_num_high );
625: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_site_low: '|| p_bill_site_low );
626: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_site_high: '|| p_bill_site_high );
627: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_date_low: '|| p_bill_date_low );
628: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_date_high: '|| p_bill_date_high );
629: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_num_low: '|| p_bill_num_low );
630: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_num_high: '|| p_bill_num_high );
631: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_request_id: '|| p_request_id );
632: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_template_id: '|| p_template_id );
625: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_site_low: '|| p_bill_site_low );
626: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_site_high: '|| p_bill_site_high );
627: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_date_low: '|| p_bill_date_low );
628: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_date_high: '|| p_bill_date_high );
629: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_num_low: '|| p_bill_num_low );
630: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_num_high: '|| p_bill_num_high );
631: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_request_id: '|| p_request_id );
632: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_template_id: '|| p_template_id );
633:
626: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_site_high: '|| p_bill_site_high );
627: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_date_low: '|| p_bill_date_low );
628: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_date_high: '|| p_bill_date_high );
629: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_num_low: '|| p_bill_num_low );
630: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_num_high: '|| p_bill_num_high );
631: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_request_id: '|| p_request_id );
632: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_template_id: '|| p_template_id );
633:
634: -- fetch a list of billing document id based on the inputted parameters
627: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_date_low: '|| p_bill_date_low );
628: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_date_high: '|| p_bill_date_high );
629: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_num_low: '|| p_bill_num_low );
630: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_num_high: '|| p_bill_num_high );
631: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_request_id: '|| p_request_id );
632: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_template_id: '|| p_template_id );
633:
634: -- fetch a list of billing document id based on the inputted parameters
635: -- and insert into the ar_bpa_print_requests table
628: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_date_high: '|| p_bill_date_high );
629: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_num_low: '|| p_bill_num_low );
630: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_bill_num_high: '|| p_bill_num_high );
631: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_request_id: '|| p_request_id );
632: FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_template_id: '|| p_template_id );
633:
634: -- fetch a list of billing document id based on the inputted parameters
635: -- and insert into the ar_bpa_print_requests table
636:
657:
658:
659: sql_stmt := insert_stmt || cr || select_stmt || cr || p_where || ')';
660:
661: -- fnd_file.put_line( fnd_file.log, sql_stmt);
662: ------------------------------------------------
663: -- Parse sql stmts
664: ------------------------------------------------
665:
680: p_request_id,
681: sql_stmt_c);
682:
683: inserted_row_counts := dbms_sql.execute(sql_stmt_c);
684: fnd_file.put_line( fnd_file.log, 'inserted row count: ' || inserted_row_counts);
685:
686: IF inserted_row_counts > 0 THEN
687:
688: -- update the last printed date for all the transactions that are being printed.
695:
696: divided_worker_counts := ceil(inserted_row_counts/l_job_size);
697: row_counts_perworker := ceil(inserted_row_counts/divided_worker_counts);
698:
699: fnd_file.put_line( fnd_file.log, 'row count per worker: ' || row_counts_perworker);
700: fnd_file.put_line( fnd_file.log, 'divided worker count: ' || divided_worker_counts);
701:
702: l_worker_id := 1 ;
703: l_low_range := 1 ;
696: divided_worker_counts := ceil(inserted_row_counts/l_job_size);
697: row_counts_perworker := ceil(inserted_row_counts/divided_worker_counts);
698:
699: fnd_file.put_line( fnd_file.log, 'row count per worker: ' || row_counts_perworker);
700: fnd_file.put_line( fnd_file.log, 'divided worker count: ' || divided_worker_counts);
701:
702: l_worker_id := 1 ;
703: l_low_range := 1 ;
704: l_high_range := row_counts_perworker ;
730: 'Y',
731: '',
732: '','', TRUE);
733: IF (l_request_id = 0) THEN
734: fnd_file.put_line( fnd_file.log, 'can not start for worker_id: ' ||no_of_workers );
735: FND_MESSAGE.RETRIEVE(return_stat);
736: fnd_file.put_line( fnd_file.log, 'Error occured : ' ||return_stat );
737: l_fail_count := l_fail_count + 1;
738: ELSE
732: '','', TRUE);
733: IF (l_request_id = 0) THEN
734: fnd_file.put_line( fnd_file.log, 'can not start for worker_id: ' ||no_of_workers );
735: FND_MESSAGE.RETRIEVE(return_stat);
736: fnd_file.put_line( fnd_file.log, 'Error occured : ' ||return_stat );
737: l_fail_count := l_fail_count + 1;
738: ELSE
739: commit;
740: fnd_file.put_line( fnd_file.log, 'child request id: ' ||
736: fnd_file.put_line( fnd_file.log, 'Error occured : ' ||return_stat );
737: l_fail_count := l_fail_count + 1;
738: ELSE
739: commit;
740: fnd_file.put_line( fnd_file.log, 'child request id: ' ||
741: l_request_id || ' started for worker_id: ' ||no_of_workers );
742: END IF;
743: END LOOP;
744:
743: END LOOP;
744:
745: fnd_conc_global.set_req_globals(conc_status => 'PAUSED',
746: request_data => to_char(inserted_row_counts));
747: fnd_file.put_line( fnd_file.log, 'The Master program changed status to pause and wait for child processes');
748: ELSE
749: fnd_file.new_line( fnd_file.log,1 );
750: fnd_file.put_line( fnd_file.log, 'No bills matched the input parameters.');
751: fnd_file.new_line( fnd_file.log,1 );
745: fnd_conc_global.set_req_globals(conc_status => 'PAUSED',
746: request_data => to_char(inserted_row_counts));
747: fnd_file.put_line( fnd_file.log, 'The Master program changed status to pause and wait for child processes');
748: ELSE
749: fnd_file.new_line( fnd_file.log,1 );
750: fnd_file.put_line( fnd_file.log, 'No bills matched the input parameters.');
751: fnd_file.new_line( fnd_file.log,1 );
752: END IF;
753:
746: request_data => to_char(inserted_row_counts));
747: fnd_file.put_line( fnd_file.log, 'The Master program changed status to pause and wait for child processes');
748: ELSE
749: fnd_file.new_line( fnd_file.log,1 );
750: fnd_file.put_line( fnd_file.log, 'No bills matched the input parameters.');
751: fnd_file.new_line( fnd_file.log,1 );
752: END IF;
753:
754: ELSE
747: fnd_file.put_line( fnd_file.log, 'The Master program changed status to pause and wait for child processes');
748: ELSE
749: fnd_file.new_line( fnd_file.log,1 );
750: fnd_file.put_line( fnd_file.log, 'No bills matched the input parameters.');
751: fnd_file.new_line( fnd_file.log,1 );
752: END IF;
753:
754: ELSE
755:
752: END IF;
753:
754: ELSE
755:
756: FND_FILE.PUT_LINE( FND_FILE.LOG, 'print_bills: '
757: || 'Entering print master program at the second time');
758: fnd_file.put_line( fnd_file.output,
759: arp_standard.fnd_message('AR_BPA_PRINT_OUTPUT_HDR',
760: 'NUM_OF_WORKER',
754: ELSE
755:
756: FND_FILE.PUT_LINE( FND_FILE.LOG, 'print_bills: '
757: || 'Entering print master program at the second time');
758: fnd_file.put_line( fnd_file.output,
759: arp_standard.fnd_message('AR_BPA_PRINT_OUTPUT_HDR',
760: 'NUM_OF_WORKER',
761: divided_worker_counts,
762: 'TRX_COUNT',
799: COMMIT;
800:
801: END IF;
802:
803: FND_FILE.PUT_LINE( FND_FILE.LOG, 'AR_BPA_BFPRI_CONC.print_bills(-)' );
804:
805: EXCEPTION
806: WHEN OTHERS THEN
807: RAISE;