DBA Data[Home] [Help]

APPS.CST_OVHD_RATE_IMPORT_INTERFACE dependencies on CST_RES_OVERHEADS_INTERFACE

Line 505: from CST_RES_OVERHEADS_INTERFACE croi

501: Error_number := 0;
502:
503: /* First check if there are rows to process */
504: select count(*) into l_croi_count
505: from CST_RES_OVERHEADS_INTERFACE croi
506: where croi.group_id = SEQ_NEXTVAL
507: AND croi.error_flag is null
508: AND croi.process_flag = 1
509: AND rownum = 1;

Line 512: fnd_file.put_line(fnd_file.log,'no rows to process in CST_RES_OVERHEADS_INTERFACE, quitting.........');

508: AND croi.process_flag = 1
509: AND rownum = 1;
510:
511: If l_croi_count = 0 then
512: fnd_file.put_line(fnd_file.log,'no rows to process in CST_RES_OVERHEADS_INTERFACE, quitting.........');
513: return;
514: end IF;
515:
516: /* check for both the organization_id and code to be null */

Line 518: fnd_file.put_line(fnd_file.log,'--------at the start of validating CST_RES_OVERHEADS_INTERFACE table-------');

514: end IF;
515:
516: /* check for both the organization_id and code to be null */
517:
518: fnd_file.put_line(fnd_file.log,'--------at the start of validating CST_RES_OVERHEADS_INTERFACE table-------');
519:
520: Update CST_RES_OVERHEADS_INTERFACE croi
521: SET error_flag = 'E',
522: error_code = 'CST_NULL_ORGANIZATION',

Line 520: Update CST_RES_OVERHEADS_INTERFACE croi

516: /* check for both the organization_id and code to be null */
517:
518: fnd_file.put_line(fnd_file.log,'--------at the start of validating CST_RES_OVERHEADS_INTERFACE table-------');
519:
520: Update CST_RES_OVERHEADS_INTERFACE croi
521: SET error_flag = 'E',
522: error_code = 'CST_NULL_ORGANIZATION',
523: error_explanation = substrb(fnd_message.get_string('BOM','CST_NULL_ORGANIZATION'),1,240)
524: where (Organization_id is null AND organization_code is null)

Line 533: Update CST_RES_OVERHEADS_INTERFACE croi

529: fnd_file.put_line(fnd_file.log,'done checking for null org Id and code ');
530:
531: /* check to see if the input organization_id or code is valid */
532:
533: Update CST_RES_OVERHEADS_INTERFACE croi
534: SET error_flag = 'E',
535: error_code = 'CST_INVALID_ORGANIZATION',
536: error_explanation = substrb(fnd_message.get_string('BOM','CST_INVALID_ORGANIZATION'),1,240)
537: WHERE croi.error_flag is null

Line 548: Update CST_RES_OVERHEADS_INTERFACE croi

544: fnd_file.put_line(fnd_file.log,'done checking for invalid organization ID and code');
545:
546: /*Get the Organization_id from the code */
547:
548: Update CST_RES_OVERHEADS_INTERFACE croi
549: SET organization_id = (select organization_id
550: FROM mtl_parameters mp
551: WHERE mp.organization_code = croi.organization_code
552: AND croi.error_flag is null

Line 563: Update CST_RES_OVERHEADS_INTERFACE croi

559: fnd_file.put_line(fnd_file.log,'done setting the organization_ID from the code if it has not been set already');
560:
561: /* Set the unique transaction_id for each row */
562:
563: Update CST_RES_OVERHEADS_INTERFACE croi
564: SET transaction_id = CST_ITEM_CST_DTLS_INTERFACE_S.NEXTVAL,
565: request_id = FND_GLOBAL.CONC_REQUEST_ID,
566: error_code = null,
567: error_explanation = null,

Line 583: Update CST_RES_OVERHEADS_INTERFACE croi

579: COMMIT;
580: l_stmt_no := 75;
581: /* Now check for the organization to be a costing org */
582:
583: Update CST_RES_OVERHEADS_INTERFACE croi
584: set croi.error_flag = 'E',
585: croi.error_code = 'CST_NOT_COSTINGORG',
586: croi.error_explanation = substrb(fnd_message.get_string('BOM','CST_NOT_COSTINGORG'),1,240)
587: WHERE croi.group_id = SEQ_NEXTVAL

Line 599: Update CST_RES_OVERHEADS_INTERFACE croi

595: l_stmt_no := 77;
596: fnd_file.put_line(fnd_file.log,'done checking for the org to be costing org or not');
597:
598:
599: Update CST_RES_OVERHEADS_INTERFACE croi
600: SET croi.cost_type_id = (select cost_type_id from CST_COST_TYPES cct
601: where cct.cost_type = i_new_csttype
602: ),
603: croi.cost_type = i_new_csttype

Line 612: Update CST_RES_OVERHEADS_INTERFACE croi

608: fnd_file.put_line(fnd_file.log,'done setting the cost type');
609:
610: /* check for overhead_id and overhead to be null */
611:
612: Update CST_RES_OVERHEADS_INTERFACE croi
613: SET croi.error_flag = 'E',
614: croi.error_code = 'CST_NULL_OVERHEAD',
615: croi.error_explanation = substrb(fnd_message.get_string('BOM','CST_NULL_OVERHEAD'),1,240)
616: WHERE croi.error_flag is null

Line 625: Update CST_RES_OVERHEADS_INTERFACE croi

621: fnd_file.put_line(fnd_file.log,'done checking for the overhead ID and code to be null');
622:
623: /* check for resource_id and reource_codes to be null */
624:
625: Update CST_RES_OVERHEADS_INTERFACE croi
626: SET croi.error_flag = 'E',
627: croi.error_code = 'CST_NULL_SUBELEMENT',
628: croi.error_explanation = substrb(fnd_message.get_string('BOM','CST_NULL_SUBELEMENT'),1,240)
629: WHERE croi.error_flag is null

Line 637: Update CST_RES_OVERHEADS_INTERFACE croi set

633: l_stmt_no := 100;
634: fnd_file.put_line(fnd_file.log,'done checking for the subelement ID and code to be null');
635:
636: /* check if the entered resource_id or code is actually valid */
637: Update CST_RES_OVERHEADS_INTERFACE croi set
638: error_flag = 'E',
639: error_code = 'CST_INVALID_SUBELEMENT',
640: error_explanation = substrb(fnd_message.get_string('BOM','CST_INVALID_SUBELEMENT'),1,240)
641: WHERE croi.error_flag is null

Line 655: Update CST_RES_OVERHEADS_INTERFACE croi

651: fnd_file.put_line(fnd_file.log,'done checking for the sub element to be valid or not');
652:
653: /* Get the resource_id from the resource_code */
654:
655: Update CST_RES_OVERHEADS_INTERFACE croi
656: set croi.resource_id = (select bm.resource_id from bom_resources bm
657: WHERE croi.resource_code = bm.resource_code
658: AND bm.organization_id = croi.organization_id
659: AND (bm.cost_element_id = 3 OR bm.cost_element_id = 4)

Line 669: Update CST_RES_OVERHEADS_INTERFACE croi

665: l_stmt_no := 140;
666: fnd_file.put_line(fnd_file.log,'done setting the subelement ID from the code if it has not been provided');
667:
668: /* check for the validty_date for the resource_id */
669: Update CST_RES_OVERHEADS_INTERFACE croi
670: set croi.error_flag = 'E',
671: croi.error_code = 'CST_EXP_SUBELEMENT',
672: croi.error_explanation = substrb(fnd_message.get_string('BOM','CST_EXP_SUBELEMENT'),1,240)
673: WHERE croi.error_flag is null

Line 683: Update CST_RES_OVERHEADS_INTERFACE croi set

679:
680: fnd_file.put_line(fnd_file.log,'done checking for the validity date and allow costs flag of resource ID');
681: l_stmt_no := 145;
682: /* check if the entered overhead_id or overhead is actually valid */
683: Update CST_RES_OVERHEADS_INTERFACE croi set
684: error_flag = 'E',
685: error_code = 'CST_INVALID_OVERHEAD',
686: error_explanation = substrb(fnd_message.get_string('BOM','CST_INVALID_OVERHEAD'),1,240)
687: WHERE croi.error_flag is null

Line 701: Update CST_RES_OVERHEADS_INTERFACE croi

697: fnd_file.put_line(fnd_file.log,'done checking for invalid overhead');
698:
699: /* Get the overhead_id from the overhead */
700:
701: Update CST_RES_OVERHEADS_INTERFACE croi
702: set croi.overhead_id = (select bm.resource_id from bom_resources bm
703: WHERE croi.overhead = bm.resource_code
704: AND bm.organization_id = croi.organization_id
705: AND (bm.cost_element_id = 5 OR bm.cost_element_id = 2)

Line 715: Update CST_RES_OVERHEADS_INTERFACE croi

711: l_stmt_no := 160;
712: fnd_file.put_line(fnd_file.log,'done getting the overhead id from the overhead if it has not been provided');
713:
714: /* now check for the validity date of the overhead */
715: Update CST_RES_OVERHEADS_INTERFACE croi
716: set croi.error_flag='E',
717: croi.error_code = 'CST_EXP_SUBELEMENT',
718: croi.error_explanation = substrb(fnd_message.get_string('BOM','CST_EXP_SUBELEMENT'),1,240)
719: WHERE croi.error_flag is null

Line 730: Update CST_RES_OVERHEADS_INTERFACE croi

726: fnd_file.put_line(fnd_file.log,'done checking for the validity date and allow costs flag of the overhead');
727: l_stmt_no := 165;
728: /*end of phase 1 so commit */
729:
730: Update CST_RES_OVERHEADS_INTERFACE croi
731: set process_flag = 3
732: WHERE process_flag = 2
733: AND group_id = SEQ_NEXTVAL
734: AND error_flag is null;

Line 740: Update CST_RES_OVERHEADS_INTERFACE croi

736: COMMIT;
737:
738: l_stmt_no := 170;
739:
740: Update CST_RES_OVERHEADS_INTERFACE croi
741: set croi.error_flag = 'E',
742: croi.error_code = 'CST_DUPL_ROWS',
743: croi.error_explanation = substrb(fnd_message.get_string('BOM','CST_DUPL_ROWS'),1,240)
744: WHERE croi.error_flag is null

Line 746: AND EXISTS(select 1 from CST_RES_OVERHEADS_INTERFACE croi2

742: croi.error_code = 'CST_DUPL_ROWS',
743: croi.error_explanation = substrb(fnd_message.get_string('BOM','CST_DUPL_ROWS'),1,240)
744: WHERE croi.error_flag is null
745: AND croi.group_id = SEQ_NEXTVAL
746: AND EXISTS(select 1 from CST_RES_OVERHEADS_INTERFACE croi2
747: WHERE croi2.resource_id = croi.resource_id
748: AND croi2.cost_type_id = croi.cost_type_id
749: AND croi2.organization_id = croi.organization_id
750: AND croi2.overhead_id = croi.overhead_id

Line 757: Update CST_RES_OVERHEADS_INTERFACE croi

753: );
754:
755: fnd_file.put_line(fnd_file.log,'done checking for the duplicate rows');
756:
757: Update CST_RES_OVERHEADS_INTERFACE croi
758: set croi.process_flag = 4
759: where croi.process_flag = 3
760: AND error_flag is null
761: AND group_id = SEQ_NEXTVAL;

Line 772: where exists (select 1 from CST_RES_OVERHEADS_INTERFACE croi

768:
769: /* now check for the run option and delete or error out rows accordingly */
770: If i_run_option = 2 then
771: delete from CST_RESOURCE_OVERHEADS cro
772: where exists (select 1 from CST_RES_OVERHEADS_INTERFACE croi
773: where croi.cost_type_id = cro.cost_type_id
774: AND croi.resource_id = cro.resource_id
775: AND croi.overhead_id = cro.overhead_id
776: AND croi.organization_id = cro.organization_id

Line 782: Update CST_RES_OVERHEADS_INTERFACE croi

778: AND croi.group_id = SEQ_NEXTVAL
779: );
780:
781: elsif i_run_option = 1 then
782: Update CST_RES_OVERHEADS_INTERFACE croi
783: set croi.error_flag = 'E',
784: croi.error_code = 'CST_CANT_INSERT',
785: croi.error_explanation = substrb(fnd_message.get_string('BOM','CST_CANT_INSERT'),1,240)
786: where croi.error_flag is null

Line 858: FROM CST_RES_OVERHEADS_INTERFACE croi

854: attribute12,
855: attribute13,
856: attribute14,
857: attribute15
858: FROM CST_RES_OVERHEADS_INTERFACE croi
859: where croi.error_flag is null
860: AND group_id = SEQ_NEXTVAL;
861: fnd_file.put_line(fnd_file.log,'done inserting ' || to_char(SQL%ROWCOUNT) || ' rows into CST_RESOURCE_OVERHEADS');
862:

Line 865: Update CST_RES_OVERHEADS_INTERFACE croi

861: fnd_file.put_line(fnd_file.log,'done inserting ' || to_char(SQL%ROWCOUNT) || ' rows into CST_RESOURCE_OVERHEADS');
862:
863: l_stmt_no := 180;
864:
865: Update CST_RES_OVERHEADS_INTERFACE croi
866: set process_flag = 5
867: where process_flag = 4
868: AND error_flag is null
869: AND group_id = SEQ_NEXTVAL;

Line 872: delete from CST_RES_OVERHEADS_INTERFACE

868: AND error_flag is null
869: AND group_id = SEQ_NEXTVAL;
870:
871: IF i_del_option = 1 then
872: delete from CST_RES_OVERHEADS_INTERFACE
873: WHERE error_flag is null
874: AND group_id = SEQ_NEXTVAL
875: AND process_flag = 5;
876:

Line 917: UPDATE CST_RES_OVERHEADS_INTERFACE croi

913: where process_flag = 1
914: AND error_flag is null;
915:
916:
917: UPDATE CST_RES_OVERHEADS_INTERFACE croi
918: SET group_id = i_grp_id
919: where process_flag = 1
920: AND error_flag is null;
921: END IF;

Line 944: Select count(*) into i_count from CST_RES_OVERHEADS_INTERFACE

940: fnd_file.put_line(fnd_file.log,(fnd_message.get_string('BOM','CST_MSG_CDOI')));
941: CONC_REQUEST := fnd_concurrent.set_completion_status('WARNING',substrb((fnd_message.get_string('BOM','CST_EXCEPTION_OCCURED')),1,240));
942: END IF;
943:
944: Select count(*) into i_count from CST_RES_OVERHEADS_INTERFACE
945: where group_id = i_grp_id
946: and error_flag = 'E';
947:
948: if i_count > 0 then