DBA Data[Home] [Help]

APPS.RCV_TRANSACTIONS_INTERFACE_SV1 dependencies on ASN_DEBUG

Line 5: g_asn_debug VARCHAR2(1) := NVL(fnd_profile.VALUE('RCV_DEBUG_MODE'), 'N');

1: PACKAGE BODY rcv_transactions_interface_sv1 AS
2: /* $Header: RCVTIS2B.pls 120.0 2005/06/01 16:48:29 appldev noship $*/
3:
4: -- Read the profile option that enables/disables the debug log
5: g_asn_debug VARCHAR2(1) := NVL(fnd_profile.VALUE('RCV_DEBUG_MODE'), 'N');
6: e_validation_error EXCEPTION;
7:
8: /*===========================================================================
9:

Line 183: IF (g_asn_debug = 'Y') THEN

179: END IF;
180:
181: x_new_conversion := 0;
182:
183: IF (g_asn_debug = 'Y') THEN
184: asn_debug.put_line(TO_CHAR(x_uom_record.quantity_shipped));
185: asn_debug.put_line(x_uom_record.unit_of_measure);
186: asn_debug.put_line(TO_CHAR(x_uom_record.item_id));
187: asn_debug.put_line(x_primary_unit_of_measure);

Line 184: asn_debug.put_line(TO_CHAR(x_uom_record.quantity_shipped));

180:
181: x_new_conversion := 0;
182:
183: IF (g_asn_debug = 'Y') THEN
184: asn_debug.put_line(TO_CHAR(x_uom_record.quantity_shipped));
185: asn_debug.put_line(x_uom_record.unit_of_measure);
186: asn_debug.put_line(TO_CHAR(x_uom_record.item_id));
187: asn_debug.put_line(x_primary_unit_of_measure);
188: asn_debug.put_line(x_uom_record.primary_unit_of_measure);

Line 185: asn_debug.put_line(x_uom_record.unit_of_measure);

181: x_new_conversion := 0;
182:
183: IF (g_asn_debug = 'Y') THEN
184: asn_debug.put_line(TO_CHAR(x_uom_record.quantity_shipped));
185: asn_debug.put_line(x_uom_record.unit_of_measure);
186: asn_debug.put_line(TO_CHAR(x_uom_record.item_id));
187: asn_debug.put_line(x_primary_unit_of_measure);
188: asn_debug.put_line(x_uom_record.primary_unit_of_measure);
189: END IF;

Line 186: asn_debug.put_line(TO_CHAR(x_uom_record.item_id));

182:
183: IF (g_asn_debug = 'Y') THEN
184: asn_debug.put_line(TO_CHAR(x_uom_record.quantity_shipped));
185: asn_debug.put_line(x_uom_record.unit_of_measure);
186: asn_debug.put_line(TO_CHAR(x_uom_record.item_id));
187: asn_debug.put_line(x_primary_unit_of_measure);
188: asn_debug.put_line(x_uom_record.primary_unit_of_measure);
189: END IF;
190:

Line 187: asn_debug.put_line(x_primary_unit_of_measure);

183: IF (g_asn_debug = 'Y') THEN
184: asn_debug.put_line(TO_CHAR(x_uom_record.quantity_shipped));
185: asn_debug.put_line(x_uom_record.unit_of_measure);
186: asn_debug.put_line(TO_CHAR(x_uom_record.item_id));
187: asn_debug.put_line(x_primary_unit_of_measure);
188: asn_debug.put_line(x_uom_record.primary_unit_of_measure);
189: END IF;
190:
191: po_uom_s.uom_convert(x_uom_record.quantity_shipped,

Line 188: asn_debug.put_line(x_uom_record.primary_unit_of_measure);

184: asn_debug.put_line(TO_CHAR(x_uom_record.quantity_shipped));
185: asn_debug.put_line(x_uom_record.unit_of_measure);
186: asn_debug.put_line(TO_CHAR(x_uom_record.item_id));
187: asn_debug.put_line(x_primary_unit_of_measure);
188: asn_debug.put_line(x_uom_record.primary_unit_of_measure);
189: END IF;
190:
191: po_uom_s.uom_convert(x_uom_record.quantity_shipped,
192: x_uom_record.unit_of_measure,

Line 377: IF (g_asn_debug = 'Y') THEN

373: rcv_error_pkg.set_error_message('RCV_NOT_PO_LINE_NUM');
374: RAISE e_validation_error;
375: END IF;
376:
377: IF (g_asn_debug = 'Y') THEN
378: asn_debug.put_line('Validating Item: ' || x_auto_transact_code);
379: asn_debug.put_line('Validating Item: ' || x_item_id_record.use_mtl_lot);
380: asn_debug.put_line('Validating Item: ' || x_item_id_record.use_mtl_serial);
381: END IF;

Line 378: asn_debug.put_line('Validating Item: ' || x_auto_transact_code);

374: RAISE e_validation_error;
375: END IF;
376:
377: IF (g_asn_debug = 'Y') THEN
378: asn_debug.put_line('Validating Item: ' || x_auto_transact_code);
379: asn_debug.put_line('Validating Item: ' || x_item_id_record.use_mtl_lot);
380: asn_debug.put_line('Validating Item: ' || x_item_id_record.use_mtl_serial);
381: END IF;
382: EXCEPTION

Line 379: asn_debug.put_line('Validating Item: ' || x_item_id_record.use_mtl_lot);

375: END IF;
376:
377: IF (g_asn_debug = 'Y') THEN
378: asn_debug.put_line('Validating Item: ' || x_auto_transact_code);
379: asn_debug.put_line('Validating Item: ' || x_item_id_record.use_mtl_lot);
380: asn_debug.put_line('Validating Item: ' || x_item_id_record.use_mtl_serial);
381: END IF;
382: EXCEPTION
383: WHEN e_validation_error THEN

Line 380: asn_debug.put_line('Validating Item: ' || x_item_id_record.use_mtl_serial);

376:
377: IF (g_asn_debug = 'Y') THEN
378: asn_debug.put_line('Validating Item: ' || x_auto_transact_code);
379: asn_debug.put_line('Validating Item: ' || x_item_id_record.use_mtl_lot);
380: asn_debug.put_line('Validating Item: ' || x_item_id_record.use_mtl_serial);
381: END IF;
382: EXCEPTION
383: WHEN e_validation_error THEN
384: x_item_id_record.error_record.error_status := x_error_status;

Line 613: IF (g_asn_debug = 'Y') THEN

609: IF (x_inventory_item <> 0) THEN
610: RETURN;
611: END IF;
612:
613: IF (g_asn_debug = 'Y') THEN
614: asn_debug.put_line('Item is not under revision control');
615: END IF;
616:
617: rcv_error_pkg.set_error_message('RCV_ITEM_REV_NOT_ALLOWED');

Line 614: asn_debug.put_line('Item is not under revision control');

610: RETURN;
611: END IF;
612:
613: IF (g_asn_debug = 'Y') THEN
614: asn_debug.put_line('Item is not under revision control');
615: END IF;
616:
617: rcv_error_pkg.set_error_message('RCV_ITEM_REV_NOT_ALLOWED');
618: RAISE e_validation_error;

Line 623: IF (g_asn_debug = 'Y') THEN

619: END IF;
620:
621: -- Check whether the revision number exists
622:
623: IF (g_asn_debug = 'Y') THEN
624: asn_debug.put_line('Revision number : ' || x_item_revision_record.item_revision);
625: END IF;
626:
627: SELECT NVL(MAX(inventory_item_id), 0)

Line 624: asn_debug.put_line('Revision number : ' || x_item_revision_record.item_revision);

620:
621: -- Check whether the revision number exists
622:
623: IF (g_asn_debug = 'Y') THEN
624: asn_debug.put_line('Revision number : ' || x_item_revision_record.item_revision);
625: END IF;
626:
627: SELECT NVL(MAX(inventory_item_id), 0)
628: INTO x_inventory_item

Line 711: IF (g_asn_debug = 'Y') THEN

707: RAISE e_validation_error;
708: END IF;
709: END IF;
710:
711: IF (g_asn_debug = 'Y') THEN
712: asn_debug.put_line('Validating vendor id in PO ' || TO_CHAR(x_ref_integrity_rec.vendor_id));
713: asn_debug.put_line('PO Header Id ' || TO_CHAR(x_ref_integrity_rec.po_header_id));
714: END IF;
715:

Line 712: asn_debug.put_line('Validating vendor id in PO ' || TO_CHAR(x_ref_integrity_rec.vendor_id));

708: END IF;
709: END IF;
710:
711: IF (g_asn_debug = 'Y') THEN
712: asn_debug.put_line('Validating vendor id in PO ' || TO_CHAR(x_ref_integrity_rec.vendor_id));
713: asn_debug.put_line('PO Header Id ' || TO_CHAR(x_ref_integrity_rec.po_header_id));
714: END IF;
715:
716: IF x_ref_integrity_rec.vendor_id IS NOT NULL THEN

Line 713: asn_debug.put_line('PO Header Id ' || TO_CHAR(x_ref_integrity_rec.po_header_id));

709: END IF;
710:
711: IF (g_asn_debug = 'Y') THEN
712: asn_debug.put_line('Validating vendor id in PO ' || TO_CHAR(x_ref_integrity_rec.vendor_id));
713: asn_debug.put_line('PO Header Id ' || TO_CHAR(x_ref_integrity_rec.po_header_id));
714: END IF;
715:
716: IF x_ref_integrity_rec.vendor_id IS NOT NULL THEN
717: SELECT NVL(MAX(vendor_id), 0)

Line 893: IF (g_asn_debug = 'Y') THEN

889: x_error_status := rcv_error_pkg.g_ret_sts_error;
890:
891: -- first check if the po from the shipment is a supply agreement blanket purchase
892:
893: IF (g_asn_debug = 'Y') THEN
894: asn_debug.put_line('In validate ASL');
895: END IF;
896:
897: SELECT NVL(MAX(supply_agreement_flag), 'N')

Line 894: asn_debug.put_line('In validate ASL');

890:
891: -- first check if the po from the shipment is a supply agreement blanket purchase
892:
893: IF (g_asn_debug = 'Y') THEN
894: asn_debug.put_line('In validate ASL');
895: END IF;
896:
897: SELECT NVL(MAX(supply_agreement_flag), 'N')
898: INTO x_supply_agreement_flag

Line 904: IF (g_asn_debug = 'Y') THEN

900: WHERE po_header_id = x_asl_record.po_header_id
901: AND type_lookup_code = 'BLANKET'
902: AND supply_agreement_flag = 'Y';
903:
904: IF (g_asn_debug = 'Y') THEN
905: asn_debug.put_line('Supply agreement Flag ' || x_supply_agreement_flag);
906: END IF;
907:
908: IF (x_supply_agreement_flag <> 'N') THEN

Line 905: asn_debug.put_line('Supply agreement Flag ' || x_supply_agreement_flag);

901: AND type_lookup_code = 'BLANKET'
902: AND supply_agreement_flag = 'Y';
903:
904: IF (g_asn_debug = 'Y') THEN
905: asn_debug.put_line('Supply agreement Flag ' || x_supply_agreement_flag);
906: END IF;
907:
908: IF (x_supply_agreement_flag <> 'N') THEN
909: SELECT NVL(MAX('found'), 'notfound')

Line 919: IF (g_asn_debug = 'Y') THEN

915: AND ( using_organization_id = NVL(x_asl_record.to_organization_id, using_organization_id)
916: OR using_organization_id = -1); -- per discussion with cindy
917: END IF;
918:
919: IF (g_asn_debug = 'Y') THEN
920: asn_debug.put_line('PO Approved supplier list ' || x_success);
921: END IF;
922:
923: IF (x_success = 'notfound') THEN

Line 920: asn_debug.put_line('PO Approved supplier list ' || x_success);

916: OR using_organization_id = -1); -- per discussion with cindy
917: END IF;
918:
919: IF (g_asn_debug = 'Y') THEN
920: asn_debug.put_line('PO Approved supplier list ' || x_success);
921: END IF;
922:
923: IF (x_success = 'notfound') THEN
924: rcv_error_pkg.set_error_message('RCV_ASL_NOT_FOUND');

Line 962: IF (g_asn_debug = 'Y') THEN

958: x_error_status := rcv_error_pkg.g_ret_sts_error;
959:
960: -- first check if the po from the shipment is a supply agreement blanket purchase
961:
962: IF (g_asn_debug = 'Y') THEN
963: asn_debug.put_line('Validating cum quantity ');
964: END IF;
965:
966: SELECT NVL(MAX(supply_agreement_flag), 'N')

Line 963: asn_debug.put_line('Validating cum quantity ');

959:
960: -- first check if the po from the shipment is a supply agreement blanket purchase
961:
962: IF (g_asn_debug = 'Y') THEN
963: asn_debug.put_line('Validating cum quantity ');
964: END IF;
965:
966: SELECT NVL(MAX(supply_agreement_flag), 'N')
967: INTO x_supply_agreement_flag

Line 973: IF (g_asn_debug = 'Y') THEN

969: WHERE po_header_id = x_cum_quantity_record.po_header_id
970: AND type_lookup_code = 'BLANKET'
971: AND supply_agreement_flag = 'Y';
972:
973: IF (g_asn_debug = 'Y') THEN
974: asn_debug.put_line('Check for supply agreement flag ' || x_supply_agreement_flag);
975: END IF;
976:
977: IF (x_supply_agreement_flag <> 'N') THEN

Line 974: asn_debug.put_line('Check for supply agreement flag ' || x_supply_agreement_flag);

970: AND type_lookup_code = 'BLANKET'
971: AND supply_agreement_flag = 'Y';
972:
973: IF (g_asn_debug = 'Y') THEN
974: asn_debug.put_line('Check for supply agreement flag ' || x_supply_agreement_flag);
975: END IF;
976:
977: IF (x_supply_agreement_flag <> 'N') THEN
978: SELECT MAX(enable_cum_flag)

Line 983: IF (g_asn_debug = 'Y') THEN

979: INTO x_success
980: FROM chv_org_options
981: WHERE organization_id = NVL(x_cum_quantity_record.to_organization_id, organization_id);
982:
983: IF (g_asn_debug = 'Y') THEN
984: asn_debug.put_line('Enable cum flag ' || x_success);
985: END IF;
986:
987: IF (x_success = 'Y') THEN

Line 984: asn_debug.put_line('Enable cum flag ' || x_success);

980: FROM chv_org_options
981: WHERE organization_id = NVL(x_cum_quantity_record.to_organization_id, organization_id);
982:
983: IF (g_asn_debug = 'Y') THEN
984: asn_debug.put_line('Enable cum flag ' || x_success);
985: END IF;
986:
987: IF (x_success = 'Y') THEN
988: IF (x_cum_quantity_record.vendor_cum_shipped_qty < 0) THEN

Line 1003: IF (g_asn_debug = 'Y') THEN

999: INTO x_rtv_update_cum_flag
1000: FROM chv_org_options
1001: WHERE organization_id = x_cum_quantity_record.to_organization_id;
1002:
1003: IF (g_asn_debug = 'Y') THEN
1004: asn_debug.put_line('RTV update cum flag ' || x_rtv_update_cum_flag);
1005: END IF;
1006:
1007: IF (x_rtv_update_cum_flag = 'Y') THEN

Line 1004: asn_debug.put_line('RTV update cum flag ' || x_rtv_update_cum_flag);

1000: FROM chv_org_options
1001: WHERE organization_id = x_cum_quantity_record.to_organization_id;
1002:
1003: IF (g_asn_debug = 'Y') THEN
1004: asn_debug.put_line('RTV update cum flag ' || x_rtv_update_cum_flag);
1005: END IF;
1006:
1007: IF (x_rtv_update_cum_flag = 'Y') THEN
1008: BEGIN

Line 1009: IF (g_asn_debug = 'Y') THEN

1005: END IF;
1006:
1007: IF (x_rtv_update_cum_flag = 'Y') THEN
1008: BEGIN
1009: IF (g_asn_debug = 'Y') THEN
1010: asn_debug.put_line('Org Id ' || TO_CHAR(x_cum_quantity_record.to_organization_id));
1011: asn_debug.put_line('Transaction date ' || TO_CHAR(x_cum_quantity_record.transaction_date, 'DDMONYY'));
1012: END IF;
1013:

Line 1010: asn_debug.put_line('Org Id ' || TO_CHAR(x_cum_quantity_record.to_organization_id));

1006:
1007: IF (x_rtv_update_cum_flag = 'Y') THEN
1008: BEGIN
1009: IF (g_asn_debug = 'Y') THEN
1010: asn_debug.put_line('Org Id ' || TO_CHAR(x_cum_quantity_record.to_organization_id));
1011: asn_debug.put_line('Transaction date ' || TO_CHAR(x_cum_quantity_record.transaction_date, 'DDMONYY'));
1012: END IF;
1013:
1014: SELECT cum_period_start_date,

Line 1011: asn_debug.put_line('Transaction date ' || TO_CHAR(x_cum_quantity_record.transaction_date, 'DDMONYY'));

1007: IF (x_rtv_update_cum_flag = 'Y') THEN
1008: BEGIN
1009: IF (g_asn_debug = 'Y') THEN
1010: asn_debug.put_line('Org Id ' || TO_CHAR(x_cum_quantity_record.to_organization_id));
1011: asn_debug.put_line('Transaction date ' || TO_CHAR(x_cum_quantity_record.transaction_date, 'DDMONYY'));
1012: END IF;
1013:
1014: SELECT cum_period_start_date,
1015: cum_period_end_date

Line 1022: IF (g_asn_debug = 'Y') THEN

1018: FROM chv_cum_periods
1019: WHERE organization_id = x_cum_quantity_record.to_organization_id
1020: AND x_cum_quantity_record.transaction_date BETWEEN cum_period_start_date AND cum_period_end_date;
1021:
1022: IF (g_asn_debug = 'Y') THEN
1023: asn_debug.put_line('Cum period start date ' || TO_CHAR(x_cum_period_start_date, 'DDMONYY'));
1024: asn_debug.put_line('Cum Period End date ' || TO_CHAR(x_cum_period_end_date, 'DDMONYY'));
1025: END IF;
1026: EXCEPTION

Line 1023: asn_debug.put_line('Cum period start date ' || TO_CHAR(x_cum_period_start_date, 'DDMONYY'));

1019: WHERE organization_id = x_cum_quantity_record.to_organization_id
1020: AND x_cum_quantity_record.transaction_date BETWEEN cum_period_start_date AND cum_period_end_date;
1021:
1022: IF (g_asn_debug = 'Y') THEN
1023: asn_debug.put_line('Cum period start date ' || TO_CHAR(x_cum_period_start_date, 'DDMONYY'));
1024: asn_debug.put_line('Cum Period End date ' || TO_CHAR(x_cum_period_end_date, 'DDMONYY'));
1025: END IF;
1026: EXCEPTION
1027: WHEN NO_DATA_FOUND THEN

Line 1024: asn_debug.put_line('Cum Period End date ' || TO_CHAR(x_cum_period_end_date, 'DDMONYY'));

1020: AND x_cum_quantity_record.transaction_date BETWEEN cum_period_start_date AND cum_period_end_date;
1021:
1022: IF (g_asn_debug = 'Y') THEN
1023: asn_debug.put_line('Cum period start date ' || TO_CHAR(x_cum_period_start_date, 'DDMONYY'));
1024: asn_debug.put_line('Cum Period End date ' || TO_CHAR(x_cum_period_end_date, 'DDMONYY'));
1025: END IF;
1026: EXCEPTION
1027: WHEN NO_DATA_FOUND THEN
1028: x_continue := FALSE;

Line 1038: IF (g_asn_debug = 'Y') THEN

1034: -- what if item_id is null ????
1035:
1036: IF (x_cum_quantity_record.item_id IS NOT NULL) THEN
1037: IF (x_continue) THEN
1038: IF (g_asn_debug = 'Y') THEN
1039: asn_debug.put_line('Call to chv_cum_periods_s1.get_cum_qty_received');
1040: END IF;
1041:
1042: chv_cum_periods_s1.get_cum_qty_received(x_cum_quantity_record.vendor_id,

Line 1039: asn_debug.put_line('Call to chv_cum_periods_s1.get_cum_qty_received');

1035:
1036: IF (x_cum_quantity_record.item_id IS NOT NULL) THEN
1037: IF (x_continue) THEN
1038: IF (g_asn_debug = 'Y') THEN
1039: asn_debug.put_line('Call to chv_cum_periods_s1.get_cum_qty_received');
1040: END IF;
1041:
1042: chv_cum_periods_s1.get_cum_qty_received(x_cum_quantity_record.vendor_id,
1043: x_cum_quantity_record.vendor_site_id,

Line 1054: IF (g_asn_debug = 'Y') THEN

1050: x_qty_received_primary,
1051: x_qty_received_purchasing
1052: );
1053:
1054: IF (g_asn_debug = 'Y') THEN
1055: asn_debug.put_line('Primary Quantity Received ' || TO_CHAR(NVL(x_qty_received_primary, 0)));
1056: asn_debug.put_line('Purchasing Quantity Received ' || TO_CHAR(NVL(x_qty_received_purchasing, 0)));
1057: END IF;
1058:

Line 1055: asn_debug.put_line('Primary Quantity Received ' || TO_CHAR(NVL(x_qty_received_primary, 0)));

1051: x_qty_received_purchasing
1052: );
1053:
1054: IF (g_asn_debug = 'Y') THEN
1055: asn_debug.put_line('Primary Quantity Received ' || TO_CHAR(NVL(x_qty_received_primary, 0)));
1056: asn_debug.put_line('Purchasing Quantity Received ' || TO_CHAR(NVL(x_qty_received_purchasing, 0)));
1057: END IF;
1058:
1059: po_uom_s.uom_convert(x_cum_quantity_record.quantity_shipped,

Line 1056: asn_debug.put_line('Purchasing Quantity Received ' || TO_CHAR(NVL(x_qty_received_purchasing, 0)));

1052: );
1053:
1054: IF (g_asn_debug = 'Y') THEN
1055: asn_debug.put_line('Primary Quantity Received ' || TO_CHAR(NVL(x_qty_received_primary, 0)));
1056: asn_debug.put_line('Purchasing Quantity Received ' || TO_CHAR(NVL(x_qty_received_purchasing, 0)));
1057: END IF;
1058:
1059: po_uom_s.uom_convert(x_cum_quantity_record.quantity_shipped,
1060: x_cum_quantity_record.unit_of_measure,

Line 1069: IF (g_asn_debug = 'Y') THEN

1065: x_total_cum_shipped := x_qty_received_primary + x_new_conversion;
1066:
1067: -- assumption: the vendor_cum_shipped_qty is in the primary uom
1068:
1069: IF (g_asn_debug = 'Y') THEN
1070: asn_debug.put_line('Check for quantity discrepancy ');
1071: END IF;
1072:
1073: IF (g_asn_debug = 'Y') THEN

Line 1070: asn_debug.put_line('Check for quantity discrepancy ');

1066:
1067: -- assumption: the vendor_cum_shipped_qty is in the primary uom
1068:
1069: IF (g_asn_debug = 'Y') THEN
1070: asn_debug.put_line('Check for quantity discrepancy ');
1071: END IF;
1072:
1073: IF (g_asn_debug = 'Y') THEN
1074: asn_debug.put_line('Vendor Cum quantity ' || TO_CHAR(NVL(x_cum_quantity_record.vendor_cum_shipped_qty, 0)));

Line 1073: IF (g_asn_debug = 'Y') THEN

1069: IF (g_asn_debug = 'Y') THEN
1070: asn_debug.put_line('Check for quantity discrepancy ');
1071: END IF;
1072:
1073: IF (g_asn_debug = 'Y') THEN
1074: asn_debug.put_line('Vendor Cum quantity ' || TO_CHAR(NVL(x_cum_quantity_record.vendor_cum_shipped_qty, 0)));
1075: asn_debug.put_line('Derived Cum Quantity ' || TO_CHAR(NVL(x_total_cum_shipped, -999)));
1076: END IF;
1077:

Line 1074: asn_debug.put_line('Vendor Cum quantity ' || TO_CHAR(NVL(x_cum_quantity_record.vendor_cum_shipped_qty, 0)));

1070: asn_debug.put_line('Check for quantity discrepancy ');
1071: END IF;
1072:
1073: IF (g_asn_debug = 'Y') THEN
1074: asn_debug.put_line('Vendor Cum quantity ' || TO_CHAR(NVL(x_cum_quantity_record.vendor_cum_shipped_qty, 0)));
1075: asn_debug.put_line('Derived Cum Quantity ' || TO_CHAR(NVL(x_total_cum_shipped, -999)));
1076: END IF;
1077:
1078: IF (x_total_cum_shipped <> NVL(x_cum_quantity_record.vendor_cum_shipped_qty, 0)) THEN

Line 1075: asn_debug.put_line('Derived Cum Quantity ' || TO_CHAR(NVL(x_total_cum_shipped, -999)));

1071: END IF;
1072:
1073: IF (g_asn_debug = 'Y') THEN
1074: asn_debug.put_line('Vendor Cum quantity ' || TO_CHAR(NVL(x_cum_quantity_record.vendor_cum_shipped_qty, 0)));
1075: asn_debug.put_line('Derived Cum Quantity ' || TO_CHAR(NVL(x_total_cum_shipped, -999)));
1076: END IF;
1077:
1078: IF (x_total_cum_shipped <> NVL(x_cum_quantity_record.vendor_cum_shipped_qty, 0)) THEN
1079: rcv_error_pkg.set_error_message('RCV_RCV_NO_MATCH_ASN_CUM');

Line 1381: IF (g_asn_debug = 'Y') THEN

1377: x_locator_record.locator_id := NULL;
1378: RETURN;
1379: END IF;
1380:
1381: IF (g_asn_debug = 'Y') THEN
1382: asn_debug.put_line('Before Get Locator');
1383: END IF;
1384:
1385: /*

Line 1382: asn_debug.put_line('Before Get Locator');

1378: RETURN;
1379: END IF;
1380:
1381: IF (g_asn_debug = 'Y') THEN
1382: asn_debug.put_line('Before Get Locator');
1383: END IF;
1384:
1385: /*
1386: ** Get the locator controls

Line 1404: IF (g_asn_debug = 'Y') THEN

1400: x_locator_record.locator_id := NULL;
1401: RETURN;
1402: END IF;
1403:
1404: IF (g_asn_debug = 'Y') THEN
1405: asn_debug.put_line('Loc Cont = ' || TO_CHAR(x_locator_record.subinventory_locator_control));
1406: asn_debug.put_line('Rest Cont = ' || x_locator_record.restrict_locator_control);
1407: END IF;
1408:

Line 1405: asn_debug.put_line('Loc Cont = ' || TO_CHAR(x_locator_record.subinventory_locator_control));

1401: RETURN;
1402: END IF;
1403:
1404: IF (g_asn_debug = 'Y') THEN
1405: asn_debug.put_line('Loc Cont = ' || TO_CHAR(x_locator_record.subinventory_locator_control));
1406: asn_debug.put_line('Rest Cont = ' || x_locator_record.restrict_locator_control);
1407: END IF;
1408:
1409: /*

Line 1406: asn_debug.put_line('Rest Cont = ' || x_locator_record.restrict_locator_control);

1402: END IF;
1403:
1404: IF (g_asn_debug = 'Y') THEN
1405: asn_debug.put_line('Loc Cont = ' || TO_CHAR(x_locator_record.subinventory_locator_control));
1406: asn_debug.put_line('Rest Cont = ' || x_locator_record.restrict_locator_control);
1407: END IF;
1408:
1409: /*
1410: ** bug 724495, the else part now runs only if the

Line 1430: IF (g_asn_debug = 'Y') THEN

1426: IF (x_locator_record.subinventory_locator_control IN(2, 3)) THEN
1427: IF (NVL(x_locator_record.restrict_locator_control, 2) = 2) THEN
1428: /* 3017707 - We need to validate the locator in the receiving organization. Added the filter on
1429: organization id */
1430: IF (g_asn_debug = 'Y') THEN
1431: asn_debug.put_line('Sub is not under restricted locator control');
1432: END IF;
1433:
1434: SELECT NVL(MAX(ml.concatenated_segments), 'notfound')

Line 1431: asn_debug.put_line('Sub is not under restricted locator control');

1427: IF (NVL(x_locator_record.restrict_locator_control, 2) = 2) THEN
1428: /* 3017707 - We need to validate the locator in the receiving organization. Added the filter on
1429: organization id */
1430: IF (g_asn_debug = 'Y') THEN
1431: asn_debug.put_line('Sub is not under restricted locator control');
1432: END IF;
1433:
1434: SELECT NVL(MAX(ml.concatenated_segments), 'notfound')
1435: INTO x_locator

Line 1447: IF (g_asn_debug = 'Y') THEN

1443: ** ELSE If locator control is 2 or 3 and the item is under restricted locator
1444: ** control then do restricted check
1445: */
1446: ELSE
1447: IF (g_asn_debug = 'Y') THEN
1448: asn_debug.put_line('Sub is under restricted locator control');
1449: END IF;
1450:
1451: SELECT NVL(MAX(ml.concatenated_segments), 'notfound')

Line 1448: asn_debug.put_line('Sub is under restricted locator control');

1444: ** control then do restricted check
1445: */
1446: ELSE
1447: IF (g_asn_debug = 'Y') THEN
1448: asn_debug.put_line('Sub is under restricted locator control');
1449: END IF;
1450:
1451: SELECT NVL(MAX(ml.concatenated_segments), 'notfound')
1452: INTO x_locator

Line 1467: IF (g_asn_debug = 'Y') THEN

1463: END IF;
1464: END IF;
1465:
1466: IF (x_locator = 'notfound') THEN
1467: IF (g_asn_debug = 'Y') THEN
1468: asn_debug.put_line('In locator Errors');
1469: END IF;
1470:
1471: rcv_error_pkg.set_error_message('RCV_ALL_REQUIRED_LOCATOR');

Line 1468: asn_debug.put_line('In locator Errors');

1464: END IF;
1465:
1466: IF (x_locator = 'notfound') THEN
1467: IF (g_asn_debug = 'Y') THEN
1468: asn_debug.put_line('In locator Errors');
1469: END IF;
1470:
1471: rcv_error_pkg.set_error_message('RCV_ALL_REQUIRED_LOCATOR');
1472: RAISE e_validation_error;

Line 1545: IF (g_asn_debug = 'Y') THEN

1541: FROM po_line_locations
1542: WHERE line_location_id = x_consigned_po_rec.po_line_location_id;
1543:
1544: IF (l_consigned_po_flag = 'Y') THEN
1545: IF (g_asn_debug = 'Y') THEN
1546: asn_debug.put_line('in RCVTIS2B.pls' || l_consigned_po_flag);
1547: END IF;
1548:
1549: rcv_error_pkg.set_error_message('RCV_REJECT_ASBN_CONSIGNED_PO');

Line 1546: asn_debug.put_line('in RCVTIS2B.pls' || l_consigned_po_flag);

1542: WHERE line_location_id = x_consigned_po_rec.po_line_location_id;
1543:
1544: IF (l_consigned_po_flag = 'Y') THEN
1545: IF (g_asn_debug = 'Y') THEN
1546: asn_debug.put_line('in RCVTIS2B.pls' || l_consigned_po_flag);
1547: END IF;
1548:
1549: rcv_error_pkg.set_error_message('RCV_REJECT_ASBN_CONSIGNED_PO');
1550: RAISE e_validation_error;

Line 1583: IF (g_asn_debug = 'Y') THEN

1579: FROM po_headers
1580: WHERE po_header_id = x_consumption_po_rec.po_header_id;
1581:
1582: IF (l_consumption_po_flag = 'Y') THEN
1583: IF (g_asn_debug = 'Y') THEN
1584: asn_debug.put_line('in RCVTIS2B.pls' || l_consumption_po_flag);
1585: END IF;
1586:
1587: rcv_error_pkg.set_error_message('RCV_REJECT_CONSUMPTION_PO');

Line 1584: asn_debug.put_line('in RCVTIS2B.pls' || l_consumption_po_flag);

1580: WHERE po_header_id = x_consumption_po_rec.po_header_id;
1581:
1582: IF (l_consumption_po_flag = 'Y') THEN
1583: IF (g_asn_debug = 'Y') THEN
1584: asn_debug.put_line('in RCVTIS2B.pls' || l_consumption_po_flag);
1585: END IF;
1586:
1587: rcv_error_pkg.set_error_message('RCV_REJECT_CONSUMPTION_PO');
1588: RAISE e_validation_error;

Line 1621: IF (g_asn_debug = 'Y') THEN

1617: FROM po_releases
1618: WHERE po_release_id = x_consumption_release_rec.po_release_id;
1619:
1620: IF (l_consumption_release_flag = 'Y') THEN
1621: IF (g_asn_debug = 'Y') THEN
1622: asn_debug.put_line('in RCVTIS2B.pls, consumption release' || l_consumption_release_flag);
1623: END IF;
1624:
1625: rcv_error_pkg.set_error_message('RCV_REJECT_CONSUMPTION_RELEASE');

Line 1622: asn_debug.put_line('in RCVTIS2B.pls, consumption release' || l_consumption_release_flag);

1618: WHERE po_release_id = x_consumption_release_rec.po_release_id;
1619:
1620: IF (l_consumption_release_flag = 'Y') THEN
1621: IF (g_asn_debug = 'Y') THEN
1622: asn_debug.put_line('in RCVTIS2B.pls, consumption release' || l_consumption_release_flag);
1623: END IF;
1624:
1625: rcv_error_pkg.set_error_message('RCV_REJECT_CONSUMPTION_RELEASE');
1626: RAISE e_validation_error;

Line 1709: IF (g_asn_debug = 'Y') THEN

1705:
1706:
1707: BEGIN
1708: l_progress :='0001';
1709: IF (g_asn_debug = 'Y') THEN
1710: asn_debug.put_line('VALIDATE_SECONDARY_PARAMETERS: Entering' || l_progress);
1711: END IF;
1712:
1713:

Line 1710: asn_debug.put_line('VALIDATE_SECONDARY_PARAMETERS: Entering' || l_progress);

1706:
1707: BEGIN
1708: l_progress :='0001';
1709: IF (g_asn_debug = 'Y') THEN
1710: asn_debug.put_line('VALIDATE_SECONDARY_PARAMETERS: Entering' || l_progress);
1711: END IF;
1712:
1713:
1714: -- Standard call to check for call compatibility.

Line 1722: IF (g_asn_debug = 'Y') THEN

1718: l_api_name,
1719: 'PO_VALIDATE_PARAMETERS'
1720: ) THEN
1721: l_progress :='0002';
1722: IF (g_asn_debug = 'Y') THEN
1723: asn_debug.put_line('FND_API not compatible rcv_transactions_interface_sv1.VALIDATE_SECONDARY_PARAMETERS'||l_progress);
1724: END IF;
1725: END IF;
1726:

Line 1723: asn_debug.put_line('FND_API not compatible rcv_transactions_interface_sv1.VALIDATE_SECONDARY_PARAMETERS'||l_progress);

1719: 'PO_VALIDATE_PARAMETERS'
1720: ) THEN
1721: l_progress :='0002';
1722: IF (g_asn_debug = 'Y') THEN
1723: asn_debug.put_line('FND_API not compatible rcv_transactions_interface_sv1.VALIDATE_SECONDARY_PARAMETERS'||l_progress);
1724: END IF;
1725: END IF;
1726:
1727: -- Initialize message list if p_init_msg_list is set to TRUE.

Line 1745: IF (g_asn_debug = 'Y') THEN

1741: l_progress := '001';
1742:
1743: BEGIN
1744: l_progress :='0003';
1745: IF (g_asn_debug = 'Y') THEN
1746: asn_debug.put_line('Inside rcv_transactions_interface_sv1.VALIDATE_SECONDARY_PARAMETERS:' || l_progress);
1747: END IF;
1748:
1749: -------Checking if the item is dual UOM controlled. If not then Return .

Line 1746: asn_debug.put_line('Inside rcv_transactions_interface_sv1.VALIDATE_SECONDARY_PARAMETERS:' || l_progress);

1742:
1743: BEGIN
1744: l_progress :='0003';
1745: IF (g_asn_debug = 'Y') THEN
1746: asn_debug.put_line('Inside rcv_transactions_interface_sv1.VALIDATE_SECONDARY_PARAMETERS:' || l_progress);
1747: END IF;
1748:
1749: -------Checking if the item is dual UOM controlled. If not then Return .
1750: SELECT tracking_quantity_ind , secondary_default_ind

Line 1757: IF (g_asn_debug = 'Y') THEN

1753: WHERE INVENTORY_ITEM_ID = x_att_rec.inventory_item_id
1754: AND ORGANIZATION_ID = x_att_rec.to_organization_id;
1755:
1756: l_progress :='0004';
1757: IF (g_asn_debug = 'Y') THEN
1758: asn_debug.put_line('Value of tracking_quantity_ind is ' ||l_TRACKING_QUANTITY_IND ||':'||l_progress);
1759: END IF;
1760:
1761:

Line 1758: asn_debug.put_line('Value of tracking_quantity_ind is ' ||l_TRACKING_QUANTITY_IND ||':'||l_progress);

1754: AND ORGANIZATION_ID = x_att_rec.to_organization_id;
1755:
1756: l_progress :='0004';
1757: IF (g_asn_debug = 'Y') THEN
1758: asn_debug.put_line('Value of tracking_quantity_ind is ' ||l_TRACKING_QUANTITY_IND ||':'||l_progress);
1759: END IF;
1760:
1761:
1762: EXCEPTION

Line 1765: IF g_asn_debug = 'Y' THEN

1761:
1762: EXCEPTION
1763: WHEN OTHERS THEN
1764: l_progress :='0005';
1765: IF g_asn_debug = 'Y' THEN
1766: asn_debug.put_line('Dual UOM check failed:' || l_progress);
1767: END IF;
1768:
1769: x_att_rec.error_record.error_status := fnd_api.g_ret_sts_unexp_error;

Line 1766: asn_debug.put_line('Dual UOM check failed:' || l_progress);

1762: EXCEPTION
1763: WHEN OTHERS THEN
1764: l_progress :='0005';
1765: IF g_asn_debug = 'Y' THEN
1766: asn_debug.put_line('Dual UOM check failed:' || l_progress);
1767: END IF;
1768:
1769: x_att_rec.error_record.error_status := fnd_api.g_ret_sts_unexp_error;
1770: rcv_error_pkg.set_sql_error_message('Unexpected Exception in validate_secondary_parameters', l_progress);

Line 1780: IF (g_asn_debug = 'Y') THEN

1776:
1777: /*For non dual items.*/
1778: IF l_TRACKING_QUANTITY_IND <> 'PS' THEN
1779: l_progress :='0006';
1780: IF (g_asn_debug = 'Y') THEN
1781: asn_debug.put_line('Item is not dual UOM controlled.:'|| l_progress);
1782: END IF;
1783:
1784: /*Error out if secondary parameters are specified and item is not dual uom controlled*/

Line 1781: asn_debug.put_line('Item is not dual UOM controlled.:'|| l_progress);

1777: /*For non dual items.*/
1778: IF l_TRACKING_QUANTITY_IND <> 'PS' THEN
1779: l_progress :='0006';
1780: IF (g_asn_debug = 'Y') THEN
1781: asn_debug.put_line('Item is not dual UOM controlled.:'|| l_progress);
1782: END IF;
1783:
1784: /*Error out if secondary parameters are specified and item is not dual uom controlled*/
1785: IF x_att_rec.secondary_uom_code IS NOT NULL THEN

Line 1843: IF g_asn_debug = 'Y' THEN

1839: FROM MTL_SYSTEM_ITEMS_B
1840: WHERE MTL_SYSTEM_ITEMS_B.INVENTORY_ITEM_ID = x_att_rec.inventory_item_id
1841: AND MTL_SYSTEM_ITEMS_B.ORGANIZATION_ID = x_att_rec.to_organization_id;
1842:
1843: IF g_asn_debug = 'Y' THEN
1844: asn_debug.put_line('Secondary uom code derived in VALIDATE_SECONDARY_PARAMETERS is ' ||l_secondary_uom_code||':'||l_progress );
1845: END IF;
1846:
1847: IF l_secondary_uom_code <> x_att_rec.secondary_uom_code THEN

Line 1844: asn_debug.put_line('Secondary uom code derived in VALIDATE_SECONDARY_PARAMETERS is ' ||l_secondary_uom_code||':'||l_progress );

1840: WHERE MTL_SYSTEM_ITEMS_B.INVENTORY_ITEM_ID = x_att_rec.inventory_item_id
1841: AND MTL_SYSTEM_ITEMS_B.ORGANIZATION_ID = x_att_rec.to_organization_id;
1842:
1843: IF g_asn_debug = 'Y' THEN
1844: asn_debug.put_line('Secondary uom code derived in VALIDATE_SECONDARY_PARAMETERS is ' ||l_secondary_uom_code||':'||l_progress );
1845: END IF;
1846:
1847: IF l_secondary_uom_code <> x_att_rec.secondary_uom_code THEN
1848: l_progress :='0008JN';

Line 1849: IF g_asn_debug = 'Y' THEN

1845: END IF;
1846:
1847: IF l_secondary_uom_code <> x_att_rec.secondary_uom_code THEN
1848: l_progress :='0008JN';
1849: IF g_asn_debug = 'Y' THEN
1850: asn_debug.put_line('Secondary uom code validation failed in VALIDATE_SECONDARY_PARAMETERS:' || l_progress);
1851: END IF;
1852:
1853: /*Log error into po_interface_error*/

Line 1850: asn_debug.put_line('Secondary uom code validation failed in VALIDATE_SECONDARY_PARAMETERS:' || l_progress);

1846:
1847: IF l_secondary_uom_code <> x_att_rec.secondary_uom_code THEN
1848: l_progress :='0008JN';
1849: IF g_asn_debug = 'Y' THEN
1850: asn_debug.put_line('Secondary uom code validation failed in VALIDATE_SECONDARY_PARAMETERS:' || l_progress);
1851: END IF;
1852:
1853: /*Log error into po_interface_error*/
1854: /*

Line 1871: IF g_asn_debug = 'Y' THEN

1867: FROM mtl_units_of_measure
1868: WHERE uom_code = x_att_rec.secondary_uom_code;
1869:
1870: l_progress :='0009';
1871: IF g_asn_debug = 'Y' THEN
1872: asn_debug.put_line('Secondary unit of measure derived in VALIDATE_SECONDARY_PARAMETERS is ' ||x_att_rec.secondary_unit_of_measure||':'||l_progress );
1873: END IF;
1874: END IF;
1875:

Line 1872: asn_debug.put_line('Secondary unit of measure derived in VALIDATE_SECONDARY_PARAMETERS is ' ||x_att_rec.secondary_unit_of_measure||':'||l_progress );

1868: WHERE uom_code = x_att_rec.secondary_uom_code;
1869:
1870: l_progress :='0009';
1871: IF g_asn_debug = 'Y' THEN
1872: asn_debug.put_line('Secondary unit of measure derived in VALIDATE_SECONDARY_PARAMETERS is ' ||x_att_rec.secondary_unit_of_measure||':'||l_progress );
1873: END IF;
1874: END IF;
1875:
1876: EXCEPTION

Line 1878: IF g_asn_debug = 'Y' THEN

1874: END IF;
1875:
1876: EXCEPTION
1877: WHEN OTHERS THEN
1878: IF g_asn_debug = 'Y' THEN
1879: asn_debug.put_line('SQL in validate_secondary_parameters failed:' || l_progress);
1880: END IF;
1881: x_att_rec.error_record.error_status := fnd_api.g_ret_sts_unexp_error;
1882: rcv_error_pkg.set_sql_error_message('Unexpected Exception:validate_secondary_parameters', l_progress);

Line 1879: asn_debug.put_line('SQL in validate_secondary_parameters failed:' || l_progress);

1875:
1876: EXCEPTION
1877: WHEN OTHERS THEN
1878: IF g_asn_debug = 'Y' THEN
1879: asn_debug.put_line('SQL in validate_secondary_parameters failed:' || l_progress);
1880: END IF;
1881: x_att_rec.error_record.error_status := fnd_api.g_ret_sts_unexp_error;
1882: rcv_error_pkg.set_sql_error_message('Unexpected Exception:validate_secondary_parameters', l_progress);
1883: x_att_rec.error_record.error_message := rcv_error_pkg.get_last_message;

Line 1900: IF g_asn_debug = 'Y' THEN

1896: FROM MTL_SYSTEM_ITEMS_B
1897: WHERE MTL_SYSTEM_ITEMS_B.INVENTORY_ITEM_ID=x_att_rec.inventory_item_id
1898: AND MTL_SYSTEM_ITEMS_B.ORGANIZATION_ID=x_att_rec.to_organization_id;
1899:
1900: IF g_asn_debug = 'Y' THEN
1901: asn_debug.put_line('Secondary uom code derived in VALIDATE_SECONDARY_PARAMETERS is ' ||x_att_rec.secondary_uom_code ||':'||l_progress);
1902: END IF;
1903:
1904: SELECT UNIT_OF_MEASURE

Line 1901: asn_debug.put_line('Secondary uom code derived in VALIDATE_SECONDARY_PARAMETERS is ' ||x_att_rec.secondary_uom_code ||':'||l_progress);

1897: WHERE MTL_SYSTEM_ITEMS_B.INVENTORY_ITEM_ID=x_att_rec.inventory_item_id
1898: AND MTL_SYSTEM_ITEMS_B.ORGANIZATION_ID=x_att_rec.to_organization_id;
1899:
1900: IF g_asn_debug = 'Y' THEN
1901: asn_debug.put_line('Secondary uom code derived in VALIDATE_SECONDARY_PARAMETERS is ' ||x_att_rec.secondary_uom_code ||':'||l_progress);
1902: END IF;
1903:
1904: SELECT UNIT_OF_MEASURE
1905: INTO l_secondary_unit_of_measure

Line 1910: IF g_asn_debug = 'Y' THEN

1906: FROM mtl_units_of_measure
1907: WHERE uom_code = x_att_rec.secondary_uom_code;
1908:
1909: l_progress :='0011';
1910: IF g_asn_debug = 'Y' THEN
1911: asn_debug.put_line('Secondary unit of measure derived in VALIDATE_SECONDARY_PARAMETERS is ' ||l_secondary_unit_of_measure||':'|| l_progress );
1912: END IF;
1913:
1914: IF l_secondary_unit_of_measure <> x_att_rec.secondary_unit_of_measure THEN

Line 1911: asn_debug.put_line('Secondary unit of measure derived in VALIDATE_SECONDARY_PARAMETERS is ' ||l_secondary_unit_of_measure||':'|| l_progress );

1907: WHERE uom_code = x_att_rec.secondary_uom_code;
1908:
1909: l_progress :='0011';
1910: IF g_asn_debug = 'Y' THEN
1911: asn_debug.put_line('Secondary unit of measure derived in VALIDATE_SECONDARY_PARAMETERS is ' ||l_secondary_unit_of_measure||':'|| l_progress );
1912: END IF;
1913:
1914: IF l_secondary_unit_of_measure <> x_att_rec.secondary_unit_of_measure THEN
1915:

Line 1917: IF g_asn_debug = 'Y' THEN

1913:
1914: IF l_secondary_unit_of_measure <> x_att_rec.secondary_unit_of_measure THEN
1915:
1916: l_progress :='0012';
1917: IF g_asn_debug = 'Y' THEN
1918: asn_debug.put_line('Secondary unit of measure validation failed in VALIDATE_SECONDARY_PARAMETERS'||':'||l_progress);
1919: END IF;
1920:
1921: /*Log error into po_interface_error*/

Line 1918: asn_debug.put_line('Secondary unit of measure validation failed in VALIDATE_SECONDARY_PARAMETERS'||':'||l_progress);

1914: IF l_secondary_unit_of_measure <> x_att_rec.secondary_unit_of_measure THEN
1915:
1916: l_progress :='0012';
1917: IF g_asn_debug = 'Y' THEN
1918: asn_debug.put_line('Secondary unit of measure validation failed in VALIDATE_SECONDARY_PARAMETERS'||':'||l_progress);
1919: END IF;
1920:
1921: /*Log error into po_interface_error*/
1922: /*

Line 1936: IF g_asn_debug = 'Y' THEN

1932: END IF;
1933:
1934: EXCEPTION
1935: WHEN OTHERS THEN
1936: IF g_asn_debug = 'Y' THEN
1937: asn_debug.put_line('SQL in validate_secondary_parameters failed:' || l_progress);
1938: END IF;
1939: x_att_rec.error_record.error_status := fnd_api.g_ret_sts_unexp_error;
1940: rcv_error_pkg.set_sql_error_message('Unexpected Exception:validate_secondary_parameters', l_progress);

Line 1937: asn_debug.put_line('SQL in validate_secondary_parameters failed:' || l_progress);

1933:
1934: EXCEPTION
1935: WHEN OTHERS THEN
1936: IF g_asn_debug = 'Y' THEN
1937: asn_debug.put_line('SQL in validate_secondary_parameters failed:' || l_progress);
1938: END IF;
1939: x_att_rec.error_record.error_status := fnd_api.g_ret_sts_unexp_error;
1940: rcv_error_pkg.set_sql_error_message('Unexpected Exception:validate_secondary_parameters', l_progress);
1941: x_att_rec.error_record.error_message := rcv_error_pkg.get_last_message;

Line 1958: IF g_asn_debug = 'Y' THEN

1954: FROM MTL_SYSTEM_ITEMS_B
1955: WHERE MTL_SYSTEM_ITEMS_B.INVENTORY_ITEM_ID=x_att_rec.inventory_item_id
1956: AND MTL_SYSTEM_ITEMS_B.ORGANIZATION_ID=x_att_rec.to_organization_id;
1957:
1958: IF g_asn_debug = 'Y' THEN
1959: asn_debug.put_line('Secondary uom code derived in VALIDATE_SECONDARY_PARAMETERS is ' ||x_att_rec.secondary_uom_code||':'||l_progress );
1960: END IF;
1961:
1962: Select UNIT_OF_MEASURE

Line 1959: asn_debug.put_line('Secondary uom code derived in VALIDATE_SECONDARY_PARAMETERS is ' ||x_att_rec.secondary_uom_code||':'||l_progress );

1955: WHERE MTL_SYSTEM_ITEMS_B.INVENTORY_ITEM_ID=x_att_rec.inventory_item_id
1956: AND MTL_SYSTEM_ITEMS_B.ORGANIZATION_ID=x_att_rec.to_organization_id;
1957:
1958: IF g_asn_debug = 'Y' THEN
1959: asn_debug.put_line('Secondary uom code derived in VALIDATE_SECONDARY_PARAMETERS is ' ||x_att_rec.secondary_uom_code||':'||l_progress );
1960: END IF;
1961:
1962: Select UNIT_OF_MEASURE
1963: INTO x_att_rec.secondary_unit_of_measure

Line 1968: IF g_asn_debug = 'Y' THEN

1964: FROM mtl_units_of_measure
1965: WHERE uom_code = x_att_rec.secondary_uom_code;
1966:
1967: l_progress :='0014';
1968: IF g_asn_debug = 'Y' THEN
1969: asn_debug.put_line('Secondary unit of measure derived in VALIDATE_SECONDARY_PARAMETERS is ' ||x_att_rec.secondary_unit_of_measure ||':'||l_progress);
1970: END IF;
1971:
1972: EXCEPTION

Line 1969: asn_debug.put_line('Secondary unit of measure derived in VALIDATE_SECONDARY_PARAMETERS is ' ||x_att_rec.secondary_unit_of_measure ||':'||l_progress);

1965: WHERE uom_code = x_att_rec.secondary_uom_code;
1966:
1967: l_progress :='0014';
1968: IF g_asn_debug = 'Y' THEN
1969: asn_debug.put_line('Secondary unit of measure derived in VALIDATE_SECONDARY_PARAMETERS is ' ||x_att_rec.secondary_unit_of_measure ||':'||l_progress);
1970: END IF;
1971:
1972: EXCEPTION
1973: WHEN OTHERS THEN

Line 1974: IF g_asn_debug = 'Y' THEN

1970: END IF;
1971:
1972: EXCEPTION
1973: WHEN OTHERS THEN
1974: IF g_asn_debug = 'Y' THEN
1975: asn_debug.put_line('SQL in validate_secondary_parameters failed:' || l_progress);
1976: END IF;
1977: x_att_rec.error_record.error_status := fnd_api.g_ret_sts_unexp_error;
1978: rcv_error_pkg.set_sql_error_message('Unexpected Exception:validate_secondary_parameters', l_progress);

Line 1975: asn_debug.put_line('SQL in validate_secondary_parameters failed:' || l_progress);

1971:
1972: EXCEPTION
1973: WHEN OTHERS THEN
1974: IF g_asn_debug = 'Y' THEN
1975: asn_debug.put_line('SQL in validate_secondary_parameters failed:' || l_progress);
1976: END IF;
1977: x_att_rec.error_record.error_status := fnd_api.g_ret_sts_unexp_error;
1978: rcv_error_pkg.set_sql_error_message('Unexpected Exception:validate_secondary_parameters', l_progress);
1979: x_att_rec.error_record.error_message := rcv_error_pkg.get_last_message;

Line 1996: IF g_asn_debug = 'Y' THEN

1992: FROM MTL_SYSTEM_ITEMS_B
1993: WHERE MTL_SYSTEM_ITEMS_B.INVENTORY_ITEM_ID=x_att_rec.inventory_item_id
1994: AND MTL_SYSTEM_ITEMS_B.ORGANIZATION_ID=x_att_rec.to_organization_id;
1995:
1996: IF g_asn_debug = 'Y' THEN
1997: asn_debug.put_line('Secondary uom code derived in VALIDATE_SECONDARY_PARAMETERS is ' ||l_secondary_uom_code||':'||l_progress );
1998: END IF;
1999:
2000: IF l_secondary_uom_code <>x_att_rec.secondary_uom_code THEN

Line 1997: asn_debug.put_line('Secondary uom code derived in VALIDATE_SECONDARY_PARAMETERS is ' ||l_secondary_uom_code||':'||l_progress );

1993: WHERE MTL_SYSTEM_ITEMS_B.INVENTORY_ITEM_ID=x_att_rec.inventory_item_id
1994: AND MTL_SYSTEM_ITEMS_B.ORGANIZATION_ID=x_att_rec.to_organization_id;
1995:
1996: IF g_asn_debug = 'Y' THEN
1997: asn_debug.put_line('Secondary uom code derived in VALIDATE_SECONDARY_PARAMETERS is ' ||l_secondary_uom_code||':'||l_progress );
1998: END IF;
1999:
2000: IF l_secondary_uom_code <>x_att_rec.secondary_uom_code THEN
2001: l_progress :='0016';

Line 2002: IF g_asn_debug = 'Y' THEN

1998: END IF;
1999:
2000: IF l_secondary_uom_code <>x_att_rec.secondary_uom_code THEN
2001: l_progress :='0016';
2002: IF g_asn_debug = 'Y' THEN
2003: asn_debug.put_line('Secondary uom code validation failed in VALIDATE_SECONDARY_PARAMETERS:'||l_progress);
2004: END IF;
2005:
2006: /*Log error into po_interface_error*/

Line 2003: asn_debug.put_line('Secondary uom code validation failed in VALIDATE_SECONDARY_PARAMETERS:'||l_progress);

1999:
2000: IF l_secondary_uom_code <>x_att_rec.secondary_uom_code THEN
2001: l_progress :='0016';
2002: IF g_asn_debug = 'Y' THEN
2003: asn_debug.put_line('Secondary uom code validation failed in VALIDATE_SECONDARY_PARAMETERS:'||l_progress);
2004: END IF;
2005:
2006: /*Log error into po_interface_error*/
2007: /*

Line 2028: IF g_asn_debug = 'Y' THEN

2024: FROM mtl_units_of_measure
2025: WHERE uom_code = x_att_rec.secondary_uom_code;
2026:
2027: l_progress :='0171';
2028: IF g_asn_debug = 'Y' THEN
2029: asn_debug.put_line('Secondary unit of measure derived in VALIDATE_SECONDARY_PARAMETERS is ' ||l_secondary_unit_of_measure||':'|| l_progress );
2030: END IF;
2031:
2032: IF l_secondary_unit_of_measure <> x_att_rec.secondary_unit_of_measure THEN

Line 2029: asn_debug.put_line('Secondary unit of measure derived in VALIDATE_SECONDARY_PARAMETERS is ' ||l_secondary_unit_of_measure||':'|| l_progress );

2025: WHERE uom_code = x_att_rec.secondary_uom_code;
2026:
2027: l_progress :='0171';
2028: IF g_asn_debug = 'Y' THEN
2029: asn_debug.put_line('Secondary unit of measure derived in VALIDATE_SECONDARY_PARAMETERS is ' ||l_secondary_unit_of_measure||':'|| l_progress );
2030: END IF;
2031:
2032: IF l_secondary_unit_of_measure <> x_att_rec.secondary_unit_of_measure THEN
2033:

Line 2036: IF g_asn_debug = 'Y' THEN

2032: IF l_secondary_unit_of_measure <> x_att_rec.secondary_unit_of_measure THEN
2033:
2034: l_progress :='0172';
2035:
2036: IF g_asn_debug = 'Y' THEN
2037: asn_debug.put_line('Secondary unit of measure validation failed in VALIDATE_SECONDARY_PARAMETERS'||':'||l_progress);
2038: END IF;
2039:
2040: /*Log error into po_interface_error*/

Line 2037: asn_debug.put_line('Secondary unit of measure validation failed in VALIDATE_SECONDARY_PARAMETERS'||':'||l_progress);

2033:
2034: l_progress :='0172';
2035:
2036: IF g_asn_debug = 'Y' THEN
2037: asn_debug.put_line('Secondary unit of measure validation failed in VALIDATE_SECONDARY_PARAMETERS'||':'||l_progress);
2038: END IF;
2039:
2040: /*Log error into po_interface_error*/
2041: /*

Line 2058: IF g_asn_debug = 'Y' THEN

2054: END IF; ------------IF l_secondary_uom_code <>x_att_rec.secondary_uom_code THEN
2055:
2056: EXCEPTION
2057: WHEN OTHERS THEN
2058: IF g_asn_debug = 'Y' THEN
2059: asn_debug.put_line('SQL in validate_secondary_parameters failed:' || l_progress);
2060: END IF;
2061: x_att_rec.error_record.error_status := fnd_api.g_ret_sts_unexp_error;
2062: rcv_error_pkg.set_sql_error_message('Unexpected Exception:validate_secondary_parameters', l_progress);

Line 2059: asn_debug.put_line('SQL in validate_secondary_parameters failed:' || l_progress);

2055:
2056: EXCEPTION
2057: WHEN OTHERS THEN
2058: IF g_asn_debug = 'Y' THEN
2059: asn_debug.put_line('SQL in validate_secondary_parameters failed:' || l_progress);
2060: END IF;
2061: x_att_rec.error_record.error_status := fnd_api.g_ret_sts_unexp_error;
2062: rcv_error_pkg.set_sql_error_message('Unexpected Exception:validate_secondary_parameters', l_progress);
2063: x_att_rec.error_record.error_message := rcv_error_pkg.get_last_message;

Line 2073: IF g_asn_debug = 'Y' THEN

2069:
2070:
2071: IF x_att_rec.secondary_quantity IS NOT NULL AND l_secondary_default_ind IN ('D','N') THEN
2072: l_progress :='0018';
2073: IF g_asn_debug = 'Y' THEN
2074: asn_debug.put_line('Before calling within deviation check in VALIDATE_SECONDARY_PARAMETERS:' ||l_progress);
2075: END IF;
2076:
2077: l_check_dev := INV_CONVERT.Within_deviation(

Line 2074: asn_debug.put_line('Before calling within deviation check in VALIDATE_SECONDARY_PARAMETERS:' ||l_progress);

2070:
2071: IF x_att_rec.secondary_quantity IS NOT NULL AND l_secondary_default_ind IN ('D','N') THEN
2072: l_progress :='0018';
2073: IF g_asn_debug = 'Y' THEN
2074: asn_debug.put_line('Before calling within deviation check in VALIDATE_SECONDARY_PARAMETERS:' ||l_progress);
2075: END IF;
2076:
2077: l_check_dev := INV_CONVERT.Within_deviation(
2078: p_organization_id => X_ATT_REC.to_organization_id ,

Line 2094: IF g_asn_debug = 'Y' THEN

2090: /* Returns 1 for True and 0 for False*/
2091:
2092: IF l_check_dev=0 THEN
2093: l_progress :='0019';
2094: IF g_asn_debug = 'Y' THEN
2095: asn_debug.put_line('within deviation check failed in VALIDATE_SECONDARY_PARAMETERS:' || l_progress);
2096: END IF;
2097: /*Log error into po_interface_error */
2098: x_att_rec.error_record.error_status := fnd_api.g_ret_sts_error;

Line 2095: asn_debug.put_line('within deviation check failed in VALIDATE_SECONDARY_PARAMETERS:' || l_progress);

2091:
2092: IF l_check_dev=0 THEN
2093: l_progress :='0019';
2094: IF g_asn_debug = 'Y' THEN
2095: asn_debug.put_line('within deviation check failed in VALIDATE_SECONDARY_PARAMETERS:' || l_progress);
2096: END IF;
2097: /*Log error into po_interface_error */
2098: x_att_rec.error_record.error_status := fnd_api.g_ret_sts_error;
2099: rcv_error_pkg.set_error_message('PO_SRCE_ORG_OUT_OF_DEV');

Line 2106: IF g_asn_debug = 'Y' THEN

2102: RETURN;
2103: END IF;
2104:
2105: l_progress :='0020';
2106: IF g_asn_debug = 'Y' THEN
2107: asn_debug.put_line('After successfully calling within deviation check in VALIDATE_SECONDARY_PARAMETERS:' || l_progress);
2108: END IF;
2109:
2110:

Line 2107: asn_debug.put_line('After successfully calling within deviation check in VALIDATE_SECONDARY_PARAMETERS:' || l_progress);

2103: END IF;
2104:
2105: l_progress :='0020';
2106: IF g_asn_debug = 'Y' THEN
2107: asn_debug.put_line('After successfully calling within deviation check in VALIDATE_SECONDARY_PARAMETERS:' || l_progress);
2108: END IF;
2109:
2110:
2111: ELSE -------- x_att_rec.secondary_quantity IS NULL OR l_secondary_default_ind = 'F' THEN

Line 2118: IF g_asn_debug = 'Y' THEN

2114: to be fixed according to a predefined conversion*/
2115:
2116: l_progress :='0021';
2117:
2118: IF g_asn_debug = 'Y' THEN
2119: asn_debug.put_line('Befordesc inv_e calling INV_CONVERT.Inv_um_convert for fetching secondary quantity in VALIDATE_SECONDARY_PARAMETERS:'||l_progress);
2120: END IF;
2121:
2122: x_att_rec.secondary_quantity:= INV_CONVERT.Inv_um_convert (

Line 2119: asn_debug.put_line('Befordesc inv_e calling INV_CONVERT.Inv_um_convert for fetching secondary quantity in VALIDATE_SECONDARY_PARAMETERS:'||l_progress);

2115:
2116: l_progress :='0021';
2117:
2118: IF g_asn_debug = 'Y' THEN
2119: asn_debug.put_line('Befordesc inv_e calling INV_CONVERT.Inv_um_convert for fetching secondary quantity in VALIDATE_SECONDARY_PARAMETERS:'||l_progress);
2120: END IF;
2121:
2122: x_att_rec.secondary_quantity:= INV_CONVERT.Inv_um_convert (
2123: item_id => x_att_rec.inventory_item_id ,

Line 2138: IF g_asn_debug = 'Y' THEN

2134:
2135:
2136: IF x_att_rec.secondary_quantity = -99999 THEN
2137: l_progress :='0022';
2138: IF g_asn_debug = 'Y' THEN
2139: asn_debug.put_line('fetch secondary quantity failed in VALIDATE_SECONDARY_PARAMETERS:' || l_progress);
2140: END IF;
2141: /*Log error into po_interface_error */
2142: x_att_rec.error_record.error_status := fnd_api.g_ret_sts_unexp_error;

Line 2139: asn_debug.put_line('fetch secondary quantity failed in VALIDATE_SECONDARY_PARAMETERS:' || l_progress);

2135:
2136: IF x_att_rec.secondary_quantity = -99999 THEN
2137: l_progress :='0022';
2138: IF g_asn_debug = 'Y' THEN
2139: asn_debug.put_line('fetch secondary quantity failed in VALIDATE_SECONDARY_PARAMETERS:' || l_progress);
2140: END IF;
2141: /*Log error into po_interface_error */
2142: x_att_rec.error_record.error_status := fnd_api.g_ret_sts_unexp_error;
2143: rcv_error_pkg.set_sql_error_message('Unexpected exception :fetch secondary quantity failed in validate_secondary_parameters', l_progress);

Line 2150: IF g_asn_debug = 'Y' THEN

2146: RETURN;
2147: END IF;
2148:
2149: l_progress :='0023';
2150: IF g_asn_debug = 'Y' THEN
2151: asn_debug.put_line('After successfully calling INV_CONVERT.Inv_um_convert for fetching secondary quantity in VALIDATE_SECONDARY_PARAMETERS:' || l_progress);
2152: asn_debug.put_line('value of secondary quantity derived by INV_CONVERT.Inv_um_convert is:'|| x_att_rec.secondary_quantity);
2153: END IF;
2154:

Line 2151: asn_debug.put_line('After successfully calling INV_CONVERT.Inv_um_convert for fetching secondary quantity in VALIDATE_SECONDARY_PARAMETERS:' || l_progress);

2147: END IF;
2148:
2149: l_progress :='0023';
2150: IF g_asn_debug = 'Y' THEN
2151: asn_debug.put_line('After successfully calling INV_CONVERT.Inv_um_convert for fetching secondary quantity in VALIDATE_SECONDARY_PARAMETERS:' || l_progress);
2152: asn_debug.put_line('value of secondary quantity derived by INV_CONVERT.Inv_um_convert is:'|| x_att_rec.secondary_quantity);
2153: END IF;
2154:
2155:

Line 2152: asn_debug.put_line('value of secondary quantity derived by INV_CONVERT.Inv_um_convert is:'|| x_att_rec.secondary_quantity);

2148:
2149: l_progress :='0023';
2150: IF g_asn_debug = 'Y' THEN
2151: asn_debug.put_line('After successfully calling INV_CONVERT.Inv_um_convert for fetching secondary quantity in VALIDATE_SECONDARY_PARAMETERS:' || l_progress);
2152: asn_debug.put_line('value of secondary quantity derived by INV_CONVERT.Inv_um_convert is:'|| x_att_rec.secondary_quantity);
2153: END IF;
2154:
2155:
2156: END IF;-----IF x_att_rec.secondary_quantity IS NOT NULL AND l_secondary_default_ind IN ('D','N') THEN

Line 2159: IF g_asn_debug = 'Y' THEN

2155:
2156: END IF;-----IF x_att_rec.secondary_quantity IS NOT NULL AND l_secondary_default_ind IN ('D','N') THEN
2157:
2158: l_progress :='0024';
2159: IF g_asn_debug = 'Y' THEN
2160: asn_debug.put_line('End of VALIDATE_SECONDARY_PARAMETERS:' || l_progress);
2161: END IF;
2162:
2163:

Line 2160: asn_debug.put_line('End of VALIDATE_SECONDARY_PARAMETERS:' || l_progress);

2156: END IF;-----IF x_att_rec.secondary_quantity IS NOT NULL AND l_secondary_default_ind IN ('D','N') THEN
2157:
2158: l_progress :='0024';
2159: IF g_asn_debug = 'Y' THEN
2160: asn_debug.put_line('End of VALIDATE_SECONDARY_PARAMETERS:' || l_progress);
2161: END IF;
2162:
2163:
2164: EXCEPTION