DBA Data[Home] [Help]

APPS.GMPRELAP dependencies on GME_BATCH_HEADER

Line 346: UPDATE GME_BATCH_HEADER

342: FND_FILE.PUT_LINE ( FND_FILE.LOG,'Batch Id - '|| get_data_rec.batch_id);
343:
344: /* B5897392 Rajesh Patangya firm Flag */
345: IF get_data_rec.firmed_ind = 1 THEN
346: UPDATE GME_BATCH_HEADER
347: SET firmed_ind = get_data_rec.firmed_ind
348: WHERE batch_id = get_data_rec.batch_id ;
349: --batch id value passed directly
350: END IF;

Line 472: l_gme_batch_header GME_BATCH_HEADER%ROWTYPE;

468: Cursor calendar_associated(l_organization_id NUMBER) IS
469: SELECT calendar_code,organization_code FROM mtl_parameters
470: WHERE organization_id = l_organization_id ;
471:
472: l_gme_batch_header GME_BATCH_HEADER%ROWTYPE;
473: x_gme_batch_header2 GME_BATCH_HEADER%ROWTYPE;
474: x_message_count NUMBER;
475: x_message_list VARCHAR2(2000);
476: x_return_status VARCHAR2(1);

Line 473: x_gme_batch_header2 GME_BATCH_HEADER%ROWTYPE;

469: SELECT calendar_code,organization_code FROM mtl_parameters
470: WHERE organization_id = l_organization_id ;
471:
472: l_gme_batch_header GME_BATCH_HEADER%ROWTYPE;
473: x_gme_batch_header2 GME_BATCH_HEADER%ROWTYPE;
474: x_message_count NUMBER;
475: x_message_list VARCHAR2(2000);
476: x_return_status VARCHAR2(1);
477: CREATE_BATCH_FAILED EXCEPTION;

Line 579: l_gme_batch_header.due_date := p_required_completion;

575: END IF;
576:
577: -- For R12.0
578: IF p_required_completion IS NOT NULL THEN
579: l_gme_batch_header.due_date := p_required_completion;
580: ELSE
581: l_gme_batch_header.due_date := p_end_date;
582: END IF;
583:

Line 581: l_gme_batch_header.due_date := p_end_date;

577: -- For R12.0
578: IF p_required_completion IS NOT NULL THEN
579: l_gme_batch_header.due_date := p_required_completion;
580: ELSE
581: l_gme_batch_header.due_date := p_end_date;
582: END IF;
583:
584: l_gme_batch_header.organization_id := p_organization_id ;
585: l_gme_batch_header.plan_cmplt_date := p_end_date;

Line 584: l_gme_batch_header.organization_id := p_organization_id ;

580: ELSE
581: l_gme_batch_header.due_date := p_end_date;
582: END IF;
583:
584: l_gme_batch_header.organization_id := p_organization_id ;
585: l_gme_batch_header.plan_cmplt_date := p_end_date;
586: l_gme_batch_header.batch_type := p_batch_type;
587: l_gme_batch_header.laboratory_ind := 0 ;
588: l_gme_batch_header.update_inventory_ind := 0 ;

Line 585: l_gme_batch_header.plan_cmplt_date := p_end_date;

581: l_gme_batch_header.due_date := p_end_date;
582: END IF;
583:
584: l_gme_batch_header.organization_id := p_organization_id ;
585: l_gme_batch_header.plan_cmplt_date := p_end_date;
586: l_gme_batch_header.batch_type := p_batch_type;
587: l_gme_batch_header.laboratory_ind := 0 ;
588: l_gme_batch_header.update_inventory_ind := 0 ;
589: l_gme_batch_header.gl_posted_ind := 0;

Line 586: l_gme_batch_header.batch_type := p_batch_type;

582: END IF;
583:
584: l_gme_batch_header.organization_id := p_organization_id ;
585: l_gme_batch_header.plan_cmplt_date := p_end_date;
586: l_gme_batch_header.batch_type := p_batch_type;
587: l_gme_batch_header.laboratory_ind := 0 ;
588: l_gme_batch_header.update_inventory_ind := 0 ;
589: l_gme_batch_header.gl_posted_ind := 0;
590: l_action_code := 'PRODUCT';

Line 587: l_gme_batch_header.laboratory_ind := 0 ;

583:
584: l_gme_batch_header.organization_id := p_organization_id ;
585: l_gme_batch_header.plan_cmplt_date := p_end_date;
586: l_gme_batch_header.batch_type := p_batch_type;
587: l_gme_batch_header.laboratory_ind := 0 ;
588: l_gme_batch_header.update_inventory_ind := 0 ;
589: l_gme_batch_header.gl_posted_ind := 0;
590: l_action_code := 'PRODUCT';
591: l_gme_batch_header.text_code := NULL;

Line 588: l_gme_batch_header.update_inventory_ind := 0 ;

584: l_gme_batch_header.organization_id := p_organization_id ;
585: l_gme_batch_header.plan_cmplt_date := p_end_date;
586: l_gme_batch_header.batch_type := p_batch_type;
587: l_gme_batch_header.laboratory_ind := 0 ;
588: l_gme_batch_header.update_inventory_ind := 0 ;
589: l_gme_batch_header.gl_posted_ind := 0;
590: l_action_code := 'PRODUCT';
591: l_gme_batch_header.text_code := NULL;
592: l_gme_batch_header.order_priority := p_order_priority ;

Line 589: l_gme_batch_header.gl_posted_ind := 0;

585: l_gme_batch_header.plan_cmplt_date := p_end_date;
586: l_gme_batch_header.batch_type := p_batch_type;
587: l_gme_batch_header.laboratory_ind := 0 ;
588: l_gme_batch_header.update_inventory_ind := 0 ;
589: l_gme_batch_header.gl_posted_ind := 0;
590: l_action_code := 'PRODUCT';
591: l_gme_batch_header.text_code := NULL;
592: l_gme_batch_header.order_priority := p_order_priority ;
593: v_orig_plan_cmplt_date := p_end_date ;

Line 591: l_gme_batch_header.text_code := NULL;

587: l_gme_batch_header.laboratory_ind := 0 ;
588: l_gme_batch_header.update_inventory_ind := 0 ;
589: l_gme_batch_header.gl_posted_ind := 0;
590: l_action_code := 'PRODUCT';
591: l_gme_batch_header.text_code := NULL;
592: l_gme_batch_header.order_priority := p_order_priority ;
593: v_orig_plan_cmplt_date := p_end_date ;
594: l_gme_batch_header.firmed_ind := p_firmed_ind ;
595:

Line 592: l_gme_batch_header.order_priority := p_order_priority ;

588: l_gme_batch_header.update_inventory_ind := 0 ;
589: l_gme_batch_header.gl_posted_ind := 0;
590: l_action_code := 'PRODUCT';
591: l_gme_batch_header.text_code := NULL;
592: l_gme_batch_header.order_priority := p_order_priority ;
593: v_orig_plan_cmplt_date := p_end_date ;
594: l_gme_batch_header.firmed_ind := p_firmed_ind ;
595:
596:

Line 594: l_gme_batch_header.firmed_ind := p_firmed_ind ;

590: l_action_code := 'PRODUCT';
591: l_gme_batch_header.text_code := NULL;
592: l_gme_batch_header.order_priority := p_order_priority ;
593: v_orig_plan_cmplt_date := p_end_date ;
594: l_gme_batch_header.firmed_ind := p_firmed_ind ;
595:
596:
597: /* B8290677 consider Fixed Process_loss */
598: -- Autorelease consider it only when user will set the parameter to 'all batches'

Line 605: l_gme_batch_header.fixed_process_loss_applied := 'N' ;

601: FROM gme_parameters
602: WHERE organization_id = p_organization_id ;
603:
604: IF l_fixed_process_loss_ind = 1 THEN
605: l_gme_batch_header.fixed_process_loss_applied := 'N' ;
606: ELSIF l_fixed_process_loss_ind = 2 THEN
607: l_gme_batch_header.fixed_process_loss_applied := 'Y' ;
608: ELSE
609: l_gme_batch_header.fixed_process_loss_applied := NULL ;

Line 607: l_gme_batch_header.fixed_process_loss_applied := 'Y' ;

603:
604: IF l_fixed_process_loss_ind = 1 THEN
605: l_gme_batch_header.fixed_process_loss_applied := 'N' ;
606: ELSIF l_fixed_process_loss_ind = 2 THEN
607: l_gme_batch_header.fixed_process_loss_applied := 'Y' ;
608: ELSE
609: l_gme_batch_header.fixed_process_loss_applied := NULL ;
610: END IF;
611:

Line 609: l_gme_batch_header.fixed_process_loss_applied := NULL ;

605: l_gme_batch_header.fixed_process_loss_applied := 'N' ;
606: ELSIF l_fixed_process_loss_ind = 2 THEN
607: l_gme_batch_header.fixed_process_loss_applied := 'Y' ;
608: ELSE
609: l_gme_batch_header.fixed_process_loss_applied := NULL ;
610: END IF;
611:
612: /* Assuming the fmeff_id is coming from APS Engine */
613: l_recipe_id := 0 ;

Line 664: l_gme_batch_header.RECIPE_VALIDITY_RULE_ID := p_effectivity_id;

660: FND_FILE.PUT_LINE(FND_FILE.LOG,'l_recipe_id '||l_recipe_id);
661: FND_FILE.PUT_LINE(FND_FILE.LOG,'l_return '||l_return);
662:
663: IF l_return <> 0 THEN
664: l_gme_batch_header.RECIPE_VALIDITY_RULE_ID := p_effectivity_id;
665: ELSE
666: RAISE GMP_CHECK_EFFECTIVITY;
667: END IF;
668:

Line 729: l_gme_batch_header.plan_cmplt_date := l_end_date;

725: x_return_status
726: ) ;
727:
728: IF x_return_status = 'S' THEN
729: l_gme_batch_header.plan_cmplt_date := l_end_date;
730: FND_FILE.PUT_LINE ( FND_FILE.LOG,'Nearest End Date = '||to_char(l_end_date,'MM/DD/YYYY HH24:MI:SS'));
731: ELSE
732: RAISE GMP_SHOP_NON_WKG_END ;
733: END IF;

Line 755: ,p_batch_header_rec => l_gme_batch_header

751: ,x_message_count => x_message_count
752: ,x_message_list => x_message_list
753: ,x_return_status => x_return_status
754: ,p_org_code => l_org_code
755: ,p_batch_header_rec => l_gme_batch_header
756: ,x_batch_header_rec => x_gme_batch_header2
757: ,p_batch_size => p_plan_quantity
758: ,p_batch_size_uom => p_primary_uom_code -- 3 character UOM_code
759: ,p_creation_mode => l_action_code

Line 756: ,x_batch_header_rec => x_gme_batch_header2

752: ,x_message_list => x_message_list
753: ,x_return_status => x_return_status
754: ,p_org_code => l_org_code
755: ,p_batch_header_rec => l_gme_batch_header
756: ,x_batch_header_rec => x_gme_batch_header2
757: ,p_batch_size => p_plan_quantity
758: ,p_batch_size_uom => p_primary_uom_code -- 3 character UOM_code
759: ,p_creation_mode => l_action_code
760: ,p_ignore_qty_below_cap => 'T'

Line 785: ,p_batch_header_rec => l_gme_batch_header

781: ,x_message_count => x_message_count
782: ,x_message_list => x_message_list
783: ,x_return_status => x_return_status
784: ,p_org_code => l_org_code
785: ,p_batch_header_rec => l_gme_batch_header
786: ,x_batch_header_rec => x_gme_batch_header2
787: ,p_batch_size => p_plan_quantity
788: ,p_batch_size_uom => p_primary_uom_code -- 3 char UOM
789: ,p_creation_mode => l_action_code

Line 786: ,x_batch_header_rec => x_gme_batch_header2

782: ,x_message_list => x_message_list
783: ,x_return_status => x_return_status
784: ,p_org_code => l_org_code
785: ,p_batch_header_rec => l_gme_batch_header
786: ,x_batch_header_rec => x_gme_batch_header2
787: ,p_batch_size => p_plan_quantity
788: ,p_batch_size_uom => p_primary_uom_code -- 3 char UOM
789: ,p_creation_mode => l_action_code
790: ,p_ignore_qty_below_cap => 'T'

Line 803: FND_MESSAGE.SET_TOKEN('FPO_NO',x_gme_batch_header2.batch_no);

799: IF (x_return_Status NOT IN ('E','U')) THEN
800:
801: IF p_batch_type = 10 THEN
802: FND_MESSAGE.SET_NAME('GME','GME_FPO_CREATED');
803: FND_MESSAGE.SET_TOKEN('FPO_NO',x_gme_batch_header2.batch_no);
804: ELSE
805: FND_MESSAGE.SET_NAME('GME','GME_BATCH_CREATED');
806: FND_MESSAGE.SET_TOKEN('BATCH_NO',x_gme_batch_header2.batch_no);
807: END IF;

Line 806: FND_MESSAGE.SET_TOKEN('BATCH_NO',x_gme_batch_header2.batch_no);

802: FND_MESSAGE.SET_NAME('GME','GME_FPO_CREATED');
803: FND_MESSAGE.SET_TOKEN('FPO_NO',x_gme_batch_header2.batch_no);
804: ELSE
805: FND_MESSAGE.SET_NAME('GME','GME_BATCH_CREATED');
806: FND_MESSAGE.SET_TOKEN('BATCH_NO',x_gme_batch_header2.batch_no);
807: END IF;
808: FND_FILE.PUT_LINE(FND_FILE.LOG,'Item Number '||l_item_no||' - '||FND_MESSAGE.GET);
809: v_batch_no := x_gme_batch_header2.batch_no;
810: v_start_date := x_GME_BATCH_HEADER2.plan_start_date;

Line 809: v_batch_no := x_gme_batch_header2.batch_no;

805: FND_MESSAGE.SET_NAME('GME','GME_BATCH_CREATED');
806: FND_MESSAGE.SET_TOKEN('BATCH_NO',x_gme_batch_header2.batch_no);
807: END IF;
808: FND_FILE.PUT_LINE(FND_FILE.LOG,'Item Number '||l_item_no||' - '||FND_MESSAGE.GET);
809: v_batch_no := x_gme_batch_header2.batch_no;
810: v_start_date := x_GME_BATCH_HEADER2.plan_start_date;
811: v_end_date := x_GME_BATCH_HEADER2.PLAN_CMPLT_DATE;
812: v_due_date := x_GME_BATCH_HEADER2.due_date;
813: v_batch_id := x_gme_batch_header2.batch_id;

Line 810: v_start_date := x_GME_BATCH_HEADER2.plan_start_date;

806: FND_MESSAGE.SET_TOKEN('BATCH_NO',x_gme_batch_header2.batch_no);
807: END IF;
808: FND_FILE.PUT_LINE(FND_FILE.LOG,'Item Number '||l_item_no||' - '||FND_MESSAGE.GET);
809: v_batch_no := x_gme_batch_header2.batch_no;
810: v_start_date := x_GME_BATCH_HEADER2.plan_start_date;
811: v_end_date := x_GME_BATCH_HEADER2.PLAN_CMPLT_DATE;
812: v_due_date := x_GME_BATCH_HEADER2.due_date;
813: v_batch_id := x_gme_batch_header2.batch_id;
814: END IF;

Line 811: v_end_date := x_GME_BATCH_HEADER2.PLAN_CMPLT_DATE;

807: END IF;
808: FND_FILE.PUT_LINE(FND_FILE.LOG,'Item Number '||l_item_no||' - '||FND_MESSAGE.GET);
809: v_batch_no := x_gme_batch_header2.batch_no;
810: v_start_date := x_GME_BATCH_HEADER2.plan_start_date;
811: v_end_date := x_GME_BATCH_HEADER2.PLAN_CMPLT_DATE;
812: v_due_date := x_GME_BATCH_HEADER2.due_date;
813: v_batch_id := x_gme_batch_header2.batch_id;
814: END IF;
815: IF (x_return_status in ('E','U')) THEN

Line 812: v_due_date := x_GME_BATCH_HEADER2.due_date;

808: FND_FILE.PUT_LINE(FND_FILE.LOG,'Item Number '||l_item_no||' - '||FND_MESSAGE.GET);
809: v_batch_no := x_gme_batch_header2.batch_no;
810: v_start_date := x_GME_BATCH_HEADER2.plan_start_date;
811: v_end_date := x_GME_BATCH_HEADER2.PLAN_CMPLT_DATE;
812: v_due_date := x_GME_BATCH_HEADER2.due_date;
813: v_batch_id := x_gme_batch_header2.batch_id;
814: END IF;
815: IF (x_return_status in ('E','U')) THEN
816: -- Errors

Line 813: v_batch_id := x_gme_batch_header2.batch_id;

809: v_batch_no := x_gme_batch_header2.batch_no;
810: v_start_date := x_GME_BATCH_HEADER2.plan_start_date;
811: v_end_date := x_GME_BATCH_HEADER2.PLAN_CMPLT_DATE;
812: v_due_date := x_GME_BATCH_HEADER2.due_date;
813: v_batch_id := x_gme_batch_header2.batch_id;
814: END IF;
815: IF (x_return_status in ('E','U')) THEN
816: -- Errors
817: RAISE ERROR_MESSAGE;

Line 820: v_batch_no := x_gme_batch_header2.batch_no;

816: -- Errors
817: RAISE ERROR_MESSAGE;
818: ELSIF (x_return_status = 'S') THEN
819: -- Production Batch was sucessfully inserted.
820: v_batch_no := x_gme_batch_header2.batch_no;
821: v_start_date := x_GME_BATCH_HEADER2.plan_start_date;
822: v_end_date := x_GME_BATCH_HEADER2.PLAN_CMPLT_DATE;
823: v_due_date := x_GME_BATCH_HEADER2.due_date;
824: IF p_batch_type = 10 THEN

Line 821: v_start_date := x_GME_BATCH_HEADER2.plan_start_date;

817: RAISE ERROR_MESSAGE;
818: ELSIF (x_return_status = 'S') THEN
819: -- Production Batch was sucessfully inserted.
820: v_batch_no := x_gme_batch_header2.batch_no;
821: v_start_date := x_GME_BATCH_HEADER2.plan_start_date;
822: v_end_date := x_GME_BATCH_HEADER2.PLAN_CMPLT_DATE;
823: v_due_date := x_GME_BATCH_HEADER2.due_date;
824: IF p_batch_type = 10 THEN
825: FND_MESSAGE.SET_NAME('GME','GME_FPO_CREATED');

Line 822: v_end_date := x_GME_BATCH_HEADER2.PLAN_CMPLT_DATE;

818: ELSIF (x_return_status = 'S') THEN
819: -- Production Batch was sucessfully inserted.
820: v_batch_no := x_gme_batch_header2.batch_no;
821: v_start_date := x_GME_BATCH_HEADER2.plan_start_date;
822: v_end_date := x_GME_BATCH_HEADER2.PLAN_CMPLT_DATE;
823: v_due_date := x_GME_BATCH_HEADER2.due_date;
824: IF p_batch_type = 10 THEN
825: FND_MESSAGE.SET_NAME('GME','GME_FPO_CREATED');
826:

Line 823: v_due_date := x_GME_BATCH_HEADER2.due_date;

819: -- Production Batch was sucessfully inserted.
820: v_batch_no := x_gme_batch_header2.batch_no;
821: v_start_date := x_GME_BATCH_HEADER2.plan_start_date;
822: v_end_date := x_GME_BATCH_HEADER2.PLAN_CMPLT_DATE;
823: v_due_date := x_GME_BATCH_HEADER2.due_date;
824: IF p_batch_type = 10 THEN
825: FND_MESSAGE.SET_NAME('GME','GME_FPO_CREATED');
826:
827: FND_MESSAGE.SET_TOKEN('FPO_NO',x_gme_batch_header2.batch_no);

Line 827: FND_MESSAGE.SET_TOKEN('FPO_NO',x_gme_batch_header2.batch_no);

823: v_due_date := x_GME_BATCH_HEADER2.due_date;
824: IF p_batch_type = 10 THEN
825: FND_MESSAGE.SET_NAME('GME','GME_FPO_CREATED');
826:
827: FND_MESSAGE.SET_TOKEN('FPO_NO',x_gme_batch_header2.batch_no);
828: ELSE
829:
830: FND_MESSAGE.SET_NAME('GME','GME_BATCH_CREATED');
831: FND_MESSAGE.SET_TOKEN('BATCH_NO',x_gme_batch_header2.batch_no);

Line 831: FND_MESSAGE.SET_TOKEN('BATCH_NO',x_gme_batch_header2.batch_no);

827: FND_MESSAGE.SET_TOKEN('FPO_NO',x_gme_batch_header2.batch_no);
828: ELSE
829:
830: FND_MESSAGE.SET_NAME('GME','GME_BATCH_CREATED');
831: FND_MESSAGE.SET_TOKEN('BATCH_NO',x_gme_batch_header2.batch_no);
832: END IF;
833: FND_FILE.PUT_LINE(FND_FILE.LOG,'-'||FND_MESSAGE.GET);
834:
835: ELSIF (x_return_status = 'V') THEN

Line 838: v_batch_no := x_gme_batch_header2.batch_no;

834:
835: ELSIF (x_return_status = 'V') THEN
836: -- Inventory shortage, Production Batch was sucessfully inserte.
837:
838: v_batch_no := x_gme_batch_header2.batch_no;
839: FND_MESSAGE.SET_NAME('GME','GME_INV_SHORTAGES');
840: FND_FILE.PUT_LINE(FND_FILE.LOG,'-'||FND_MESSAGE.GET||'-'||v_batch_no);
841: END IF;
842:

Line 1092: FROM gme_batch_header a,

1088: CURSOR Cur_get_batch_data IS
1089: SELECT a.batch_no, a.batch_type, a.batch_status,
1090: a.plan_start_date, a.plan_cmplt_date,
1091: a.recipe_validity_rule_id, b.recipe_id
1092: FROM gme_batch_header a,
1093: gmd_recipe_validity_rules b
1094: WHERE a.batch_id = p_batch_id
1095: AND a.organization_id = p_organization_id
1096: AND a.recipe_validity_rule_id = b.recipe_validity_rule_id

Line 1108: x_batch_header gme_batch_header%ROWTYPE;

1104:
1105: x_message_count NUMBER;
1106: x_message_list VARCHAR2(2000);
1107: x_return_status VARCHAR2(2000);
1108: x_batch_header gme_batch_header%ROWTYPE;
1109: x_use_workday_cal VARCHAR2(1) ;
1110: l_contiguity_override NUMBER ;
1111: x_contiguity_override VARCHAR2(1) ;
1112: l_return_status VARCHAR2(2000);

Line 1113: l_gme_batch_header GME_BATCH_HEADER%ROWTYPE;

1109: x_use_workday_cal VARCHAR2(1) ;
1110: l_contiguity_override NUMBER ;
1111: x_contiguity_override VARCHAR2(1) ;
1112: l_return_status VARCHAR2(2000);
1113: l_gme_batch_header GME_BATCH_HEADER%ROWTYPE;
1114: l_gme_batch_header2 GME_BATCH_HEADER%ROWTYPE;
1115: t_ret_code NUMBER ;
1116: x_decision NUMBER ;
1117: c_batch_id NUMBER(10);

Line 1114: l_gme_batch_header2 GME_BATCH_HEADER%ROWTYPE;

1110: l_contiguity_override NUMBER ;
1111: x_contiguity_override VARCHAR2(1) ;
1112: l_return_status VARCHAR2(2000);
1113: l_gme_batch_header GME_BATCH_HEADER%ROWTYPE;
1114: l_gme_batch_header2 GME_BATCH_HEADER%ROWTYPE;
1115: t_ret_code NUMBER ;
1116: x_decision NUMBER ;
1117: c_batch_id NUMBER(10);
1118: l_cal_code VARCHAR2(10);

Line 1243: l_gme_batch_header.RECIPE_VALIDITY_RULE_ID := l_recipe_validity_rule_id;

1239: FND_FILE.PUT_LINE(FND_FILE.LOG,'l_val_recipe_id '||l_val_recipe_id);
1240: FND_FILE.PUT_LINE(FND_FILE.LOG,'l_val_return '||l_val_return);
1241:
1242: IF l_val_return <> 0 THEN
1243: l_gme_batch_header.RECIPE_VALIDITY_RULE_ID := l_recipe_validity_rule_id;
1244: ELSE
1245: RAISE GMP_CHECK_EFFECTIVITY;
1246: END IF;
1247: END IF;

Line 1355: l_gme_batch_header.plan_cmplt_date := l_end_date;

1351: FND_MESSAGE.SET_TOKEN('PDATE',to_char(p_end_date,'MM/DD/YYYY HH24:MI:SS'));
1352: FND_FILE.PUT_LINE(FND_FILE.LOG,'-'||FND_MESSAGE.GET);
1353:
1354: IF x_return_status = 'S' THEN
1355: l_gme_batch_header.plan_cmplt_date := l_end_date;
1356: FND_FILE.PUT_LINE ( FND_FILE.LOG,'Nearest End Date = '||to_char(l_end_date,'MM/DD/YYYY HH24:MI:SS'));
1357: ELSE
1358: RAISE GMP_SHOP_NON_WKG_END ;
1359: END IF;

Line 1373: l_gme_batch_header.batch_id := p_batch_id ;

1369: SELECT DECODE(l_profile,'N','F','Y','T') INTO x_use_workday_cal FROM dual;
1370: -- End of Contiguity Override changes
1371:
1372: -- Batch will be rescheduled via GME mechanism
1373: l_gme_batch_header.batch_id := p_batch_id ;
1374: l_gme_batch_header.organization_id := p_organization_id ;
1375: l_gme_batch_header.RECIPE_VALIDITY_RULE_ID := l_recipe_validity_rule_id;
1376: l_gme_batch_header.batch_type := l_batch_type; -- vkinduri, Added batch_type as per bug # 12603013
1377: -- Bug: 8262503 Vpedarla commented below line.

Line 1374: l_gme_batch_header.organization_id := p_organization_id ;

1370: -- End of Contiguity Override changes
1371:
1372: -- Batch will be rescheduled via GME mechanism
1373: l_gme_batch_header.batch_id := p_batch_id ;
1374: l_gme_batch_header.organization_id := p_organization_id ;
1375: l_gme_batch_header.RECIPE_VALIDITY_RULE_ID := l_recipe_validity_rule_id;
1376: l_gme_batch_header.batch_type := l_batch_type; -- vkinduri, Added batch_type as per bug # 12603013
1377: -- Bug: 8262503 Vpedarla commented below line.
1378: -- l_gme_batch_header.plan_start_date := p_start_date;

Line 1375: l_gme_batch_header.RECIPE_VALIDITY_RULE_ID := l_recipe_validity_rule_id;

1371:
1372: -- Batch will be rescheduled via GME mechanism
1373: l_gme_batch_header.batch_id := p_batch_id ;
1374: l_gme_batch_header.organization_id := p_organization_id ;
1375: l_gme_batch_header.RECIPE_VALIDITY_RULE_ID := l_recipe_validity_rule_id;
1376: l_gme_batch_header.batch_type := l_batch_type; -- vkinduri, Added batch_type as per bug # 12603013
1377: -- Bug: 8262503 Vpedarla commented below line.
1378: -- l_gme_batch_header.plan_start_date := p_start_date;
1379: l_gme_batch_header.plan_cmplt_date := p_end_date;

Line 1376: l_gme_batch_header.batch_type := l_batch_type; -- vkinduri, Added batch_type as per bug # 12603013

1372: -- Batch will be rescheduled via GME mechanism
1373: l_gme_batch_header.batch_id := p_batch_id ;
1374: l_gme_batch_header.organization_id := p_organization_id ;
1375: l_gme_batch_header.RECIPE_VALIDITY_RULE_ID := l_recipe_validity_rule_id;
1376: l_gme_batch_header.batch_type := l_batch_type; -- vkinduri, Added batch_type as per bug # 12603013
1377: -- Bug: 8262503 Vpedarla commented below line.
1378: -- l_gme_batch_header.plan_start_date := p_start_date;
1379: l_gme_batch_header.plan_cmplt_date := p_end_date;
1380:

Line 1378: -- l_gme_batch_header.plan_start_date := p_start_date;

1374: l_gme_batch_header.organization_id := p_organization_id ;
1375: l_gme_batch_header.RECIPE_VALIDITY_RULE_ID := l_recipe_validity_rule_id;
1376: l_gme_batch_header.batch_type := l_batch_type; -- vkinduri, Added batch_type as per bug # 12603013
1377: -- Bug: 8262503 Vpedarla commented below line.
1378: -- l_gme_batch_header.plan_start_date := p_start_date;
1379: l_gme_batch_header.plan_cmplt_date := p_end_date;
1380:
1381: gme_api_pub.reschedule_batch(
1382: p_api_version => 2

Line 1379: l_gme_batch_header.plan_cmplt_date := p_end_date;

1375: l_gme_batch_header.RECIPE_VALIDITY_RULE_ID := l_recipe_validity_rule_id;
1376: l_gme_batch_header.batch_type := l_batch_type; -- vkinduri, Added batch_type as per bug # 12603013
1377: -- Bug: 8262503 Vpedarla commented below line.
1378: -- l_gme_batch_header.plan_start_date := p_start_date;
1379: l_gme_batch_header.plan_cmplt_date := p_end_date;
1380:
1381: gme_api_pub.reschedule_batch(
1382: p_api_version => 2
1383: ,p_validation_level => 100

Line 1392: ,p_batch_header_rec => l_gme_batch_header

1388: ,p_contiguity_override => x_contiguity_override
1389: ,x_message_count => x_message_count
1390: ,x_message_list => x_message_list
1391: ,x_return_status => x_return_status
1392: ,p_batch_header_rec => l_gme_batch_header
1393: ,x_batch_header_rec => l_gme_batch_header2 );
1394:
1395: IF x_return_status = 'C' THEN
1396:

Line 1393: ,x_batch_header_rec => l_gme_batch_header2 );

1389: ,x_message_count => x_message_count
1390: ,x_message_list => x_message_list
1391: ,x_return_status => x_return_status
1392: ,p_batch_header_rec => l_gme_batch_header
1393: ,x_batch_header_rec => l_gme_batch_header2 );
1394:
1395: IF x_return_status = 'C' THEN
1396:
1397: FND_MESSAGE.SET_NAME('GME','GME_SHOP_NOT_ONE_CONT');

Line 1411: ,p_batch_header_rec => l_gme_batch_header

1407: ,p_contiguity_override => 'T'
1408: ,x_message_count => x_message_count
1409: ,x_message_list => x_message_list
1410: ,x_return_status => x_return_status
1411: ,p_batch_header_rec => l_gme_batch_header
1412: ,x_batch_header_rec => x_batch_header );
1413:
1414: END IF; /* for return status C */
1415:

Line 1425: UPDATE gme_batch_header

1421:
1422: -- Vpedarla Bug: 8348883 start
1423: IF l_update_due_date = 1 THEN
1424: FND_FILE.PUT_LINE ( FND_FILE.LOG,'due date update');
1425: UPDATE gme_batch_header
1426: SET due_date = p_required_completion
1427: WHERE BATCH_ID = l_gme_batch_header.batch_id;
1428: END IF;
1429: -- Vpedarla Bug: 8348883 end

Line 1427: WHERE BATCH_ID = l_gme_batch_header.batch_id;

1423: IF l_update_due_date = 1 THEN
1424: FND_FILE.PUT_LINE ( FND_FILE.LOG,'due date update');
1425: UPDATE gme_batch_header
1426: SET due_date = p_required_completion
1427: WHERE BATCH_ID = l_gme_batch_header.batch_id;
1428: END IF;
1429: -- Vpedarla Bug: 8348883 end
1430:
1431: UPDATE gmp_aps_output_tbl

Line 1575: FROM gme_batch_header gbh, mtl_parameters mp

1571: SELECT gbh.batch_no, gbh.batch_status,
1572: gbh.recipe_validity_rule_id,
1573: mp.organization_code,
1574: gbh.batch_type
1575: FROM gme_batch_header gbh, mtl_parameters mp
1576: WHERE gbh.batch_id = p_batch_id
1577: AND gbh.organization_id = mp.organization_id
1578: AND mp.organization_id = p_organization_id;
1579:

Line 1584: l_gme_batch_header GME_BATCH_HEADER%ROWTYPE;

1580: x_message_count NUMBER;
1581: x_message_list VARCHAR2(2000);
1582: x_return_status VARCHAR2(2000);
1583: X_msg_count NUMBER;
1584: l_gme_batch_header GME_BATCH_HEADER%ROWTYPE;
1585: l_gme_batch_header2 GME_BATCH_HEADER%ROWTYPE;
1586: l_batch_status NUMBER(5);
1587: l_batch_no VARCHAR2(32);
1588: l_effectivity_id NUMBER(10) ;

Line 1585: l_gme_batch_header2 GME_BATCH_HEADER%ROWTYPE;

1581: x_message_list VARCHAR2(2000);
1582: x_return_status VARCHAR2(2000);
1583: X_msg_count NUMBER;
1584: l_gme_batch_header GME_BATCH_HEADER%ROWTYPE;
1585: l_gme_batch_header2 GME_BATCH_HEADER%ROWTYPE;
1586: l_batch_status NUMBER(5);
1587: l_batch_no VARCHAR2(32);
1588: l_effectivity_id NUMBER(10) ;
1589: l_org_code VARCHAR2(10);

Line 1613: l_gme_batch_header.batch_id := p_batch_id ;

1609: FND_MESSAGE.SET_TOKEN('BATCH_NO',l_batch_no);
1610: FND_FILE.PUT_LINE(FND_FILE.LOG,'-'||FND_MESSAGE.GET);
1611: ELSE
1612: -- Batch will be rescheduled via GME mechanism
1613: l_gme_batch_header.batch_id := p_batch_id ;
1614: l_gme_batch_header.organization_id := p_organization_id;
1615: l_gme_batch_header.RECIPE_VALIDITY_RULE_ID := l_effectivity_id ;
1616: l_gme_batch_header.batch_type := l_batch_type;
1617:

Line 1614: l_gme_batch_header.organization_id := p_organization_id;

1610: FND_FILE.PUT_LINE(FND_FILE.LOG,'-'||FND_MESSAGE.GET);
1611: ELSE
1612: -- Batch will be rescheduled via GME mechanism
1613: l_gme_batch_header.batch_id := p_batch_id ;
1614: l_gme_batch_header.organization_id := p_organization_id;
1615: l_gme_batch_header.RECIPE_VALIDITY_RULE_ID := l_effectivity_id ;
1616: l_gme_batch_header.batch_type := l_batch_type;
1617:
1618: GME_API_PUB.cancel_batch

Line 1615: l_gme_batch_header.RECIPE_VALIDITY_RULE_ID := l_effectivity_id ;

1611: ELSE
1612: -- Batch will be rescheduled via GME mechanism
1613: l_gme_batch_header.batch_id := p_batch_id ;
1614: l_gme_batch_header.organization_id := p_organization_id;
1615: l_gme_batch_header.RECIPE_VALIDITY_RULE_ID := l_effectivity_id ;
1616: l_gme_batch_header.batch_type := l_batch_type;
1617:
1618: GME_API_PUB.cancel_batch
1619: ( p_api_version => 2.0,

Line 1616: l_gme_batch_header.batch_type := l_batch_type;

1612: -- Batch will be rescheduled via GME mechanism
1613: l_gme_batch_header.batch_id := p_batch_id ;
1614: l_gme_batch_header.organization_id := p_organization_id;
1615: l_gme_batch_header.RECIPE_VALIDITY_RULE_ID := l_effectivity_id ;
1616: l_gme_batch_header.batch_type := l_batch_type;
1617:
1618: GME_API_PUB.cancel_batch
1619: ( p_api_version => 2.0,
1620: p_validation_level => 100,

Line 1627: p_batch_header_rec => l_gme_batch_header,

1623: x_message_count => x_message_count,
1624: x_message_list => x_message_list,
1625: x_return_status => X_return_status,
1626: p_org_code => l_org_code,
1627: p_batch_header_rec => l_gme_batch_header,
1628: x_batch_header_rec => l_gme_batch_header2);
1629:
1630: IF X_return_status <> 'S' THEN
1631: RAISE ERROR_MESSAGE;

Line 1628: x_batch_header_rec => l_gme_batch_header2);

1624: x_message_list => x_message_list,
1625: x_return_status => X_return_status,
1626: p_org_code => l_org_code,
1627: p_batch_header_rec => l_gme_batch_header,
1628: x_batch_header_rec => l_gme_batch_header2);
1629:
1630: IF X_return_status <> 'S' THEN
1631: RAISE ERROR_MESSAGE;
1632: ELSE