DBA Data[Home] [Help]

APPS.OE_MARGIN_PVT dependencies on FND_API

Line 25: IF OE_DEBUG_PUB.G_DEBUG = FND_API.G_TRUE THEN

21: l_debug_level CONSTANT NUMBER := oe_debug_pub.g_debug_level;
22: --
23: Begin
24: IF G_DEBUG IS NULL THEN
25: IF OE_DEBUG_PUB.G_DEBUG = FND_API.G_TRUE THEN
26: G_DEBUG := 'Y';
27: ELSE
28: G_DEBUG := 'N';
29: END IF;

Line 385: p_request_rec.entity_id <> FND_API.G_MISS_NUM

381:
382:
383: BEGIN
384: IF p_request_rec.entity_id IS NOT NULL OR
385: p_request_rec.entity_id <> FND_API.G_MISS_NUM
386: AND p_header_flag = FALSE
387: THEN
388: debug('query line');
389: -- bug 4642569 begin replace expensive query_row with direct select

Line 401: IF l_result = FND_API.G_TRUE then

397: oe_debug_pub.add( 'L_RETURN_STATUS =' || L_RETURN_STATUS , 1 ) ;
398: oe_debug_pub.add( 'L_RESULT =' || L_RESULT , 1 ) ;
399: END IF;
400:
401: IF l_result = FND_API.G_TRUE then
402: l_line_rec := OE_ORDER_UTIL.G_Line_Tbl(l_ind);
403: ELSE
404: l_line_rec := oe_line_util.query_row(p_request_rec.entity_id);
405: END IF;

Line 415: l_return_status := FND_API.G_RET_STS_ERROR;

411: END IF;
412: EXCEPTION
413: WHEN NO_DATA_FOUND THEN
414: debug('p_request_rec.entity_id =' || p_request_rec.entity_id);
415: l_return_status := FND_API.G_RET_STS_ERROR;
416: END;
417:
418: --RT{
419: IF l_line_rec.retrobill_request_id IS NOT NULL

Line 420: and l_line_rec.retrobill_request_id <> FND_API.G_MISS_NUM THEN

416: END;
417:
418: --RT{
419: IF l_line_rec.retrobill_request_id IS NOT NULL
420: and l_line_rec.retrobill_request_id <> FND_API.G_MISS_NUM THEN
421: debug(' Not computing cost, retrobill line');
422: RETURN NULL;
423: END IF;
424: --RT}

Line 426: IF l_return_status = FND_API.G_RET_STS_ERROR THEN

422: RETURN NULL;
423: END IF;
424: --RT}
425:
426: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
427: RETURN NULL;
428: END IF;
429:
430: IF l_line_rec.line_id IS NULL

Line 582: If l_item_rec.primary_uom_code is null or l_item_rec.primary_uom_code = fnd_api.g_miss_char then

578:
579: END IF;
580:
581: -- INVCONV
582: If l_item_rec.primary_uom_code is null or l_item_rec.primary_uom_code = fnd_api.g_miss_char then
583: l_item_rec := OE_Order_Cache.Load_Item(l_line_rec.inventory_item_id,
584: G_SHIP_FROM_ORG_ID);
585: End if;
586:

Line 592: , p_init_msg_list => FND_API.G_FALSE

588: IF l_item_rec.process_warehouse_flag = 'Y' then
589:
590: l_result_code:=GMF_CMCOMMON.Get_Process_Item_Cost
591: (p_api_version =>1
592: , p_init_msg_list => FND_API.G_FALSE
593: , x_return_status => l_return_status
594: , x_msg_count => l_msg_count
595: , x_msg_data => l_msg_count
596: , p_inventory_item_id =>l_line_rec.inventory_item_id

Line 618: and l_unit_cost is not null and l_unit_cost <> fnd_api.g_miss_num Then

614: debug('primary_uom_code : '||l_item_rec.primary_uom_code);
615: debug('Order_quantity_uom : '||l_Line_rec.Order_quantity_uom);
616: debug('Inventory_item_id : '||l_Line_rec.Inventory_item_id);
617: If l_item_rec.primary_uom_code <> l_Line_rec.Order_quantity_uom
618: and l_unit_cost is not null and l_unit_cost <> fnd_api.g_miss_num Then
619: INV_CONVERT.INV_UM_CONVERSION(From_Unit => l_Line_rec.Order_quantity_uom
620: ,To_Unit => l_item_rec.primary_uom_code
621: ,Item_ID => l_Line_rec.Inventory_item_id
622: ,Uom_Rate => l_Uom_rate);

Line 640: If l_item_rec.primary_uom_code is null or l_item_rec.primary_uom_code = fnd_api.g_miss_char then

636: ,p_precision=>OE_ORDER_UTIL.G_Precision); -- p_precicion added for bug13861667
637:
638: debug(' unit cost before convert:'||l_unit_cost);
639: debug('primary_uom_code : '||l_item_rec.primary_uom_code);
640: If l_item_rec.primary_uom_code is null or l_item_rec.primary_uom_code = fnd_api.g_miss_char then
641: l_item_rec := OE_Order_Cache.Load_Item(l_line_rec.inventory_item_id,
642: G_SHIP_FROM_ORG_ID);
643: End If;
644: debug('Order_quantity_uom : '||l_Line_rec.Order_quantity_uom);

Line 647: and l_unit_cost is not null and l_unit_cost <> fnd_api.g_miss_num Then

643: End If;
644: debug('Order_quantity_uom : '||l_Line_rec.Order_quantity_uom);
645: debug('Inventory_item_id : '||l_Line_rec.Inventory_item_id);
646: If l_item_rec.primary_uom_code <> l_Line_rec.Order_quantity_uom
647: and l_unit_cost is not null and l_unit_cost <> fnd_api.g_miss_num Then
648: INV_CONVERT.INV_UM_CONVERSION(From_Unit => l_Line_rec.Order_quantity_uom
649: ,To_Unit => l_item_rec.primary_uom_code
650: ,Item_ID => l_Line_rec.Inventory_item_id
651: ,Uom_Rate => l_Uom_rate);

Line 839: OR p_request_rec.entity_id <> FND_API.G_MISS_NUM THEN

835:
836:
837:
838: IF p_request_rec.entity_id IS NOT NULL
839: OR p_request_rec.entity_id <> FND_API.G_MISS_NUM THEN
840: debug('l_old_unit_cost = '||l_old_unit_cost);
841: IF nvl(l_old_unit_cost,-999.3134) <> l_unit_cost THEN
842: l_control_rec.controlled_operation := FALSE;
843: l_control_rec.write_to_db := TRUE;

Line 855: OE_ORDER_PVT.Lines(p_validation_level => FND_API.G_VALID_LEVEL_NONE,

851: l_line_tbl(1).unit_cost := l_unit_cost;
852: l_line_tbl(1).operation := OE_GLOBALS.G_OPR_UPDATE;
853:
854: debug('before calling OE_ORDER_PVT.Lines jitesh');
855: OE_ORDER_PVT.Lines(p_validation_level => FND_API.G_VALID_LEVEL_NONE,
856: p_control_rec => l_control_rec,
857: p_x_line_tbl => l_line_tbl,
858: p_x_old_line_tbl => l_old_line_tbl,
859: x_return_status => l_return_status);

Line 864: IF l_return_status = FND_API.G_RET_STS_ERROR THEN

860: END IF;
861: END IF;
862: debug('after calling OE_ORDER_PVT.Lines jitesh');
863:
864: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
865: RAISE FND_API.G_EXC_ERROR;
866: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
867: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
868: END IF;

Line 865: RAISE FND_API.G_EXC_ERROR;

861: END IF;
862: debug('after calling OE_ORDER_PVT.Lines jitesh');
863:
864: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
865: RAISE FND_API.G_EXC_ERROR;
866: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
867: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
868: END IF;
869: debug('just before return oe_margin_pvt.get_cost');

Line 866: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

862: debug('after calling OE_ORDER_PVT.Lines jitesh');
863:
864: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
865: RAISE FND_API.G_EXC_ERROR;
866: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
867: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
868: END IF;
869: debug('just before return oe_margin_pvt.get_cost');
870: debug('l_unit_cost ='||l_unit_cost);

Line 867: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

863:
864: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
865: RAISE FND_API.G_EXC_ERROR;
866: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
867: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
868: END IF;
869: debug('just before return oe_margin_pvt.get_cost');
870: debug('l_unit_cost ='||l_unit_cost);
871:

Line 1128: IF (l_return_status <> FND_API.g_ret_sts_success) THEN

1124: ,x_result_out => l_x_result_out
1125: );
1126:
1127:
1128: IF (l_return_status <> FND_API.g_ret_sts_success) THEN
1129: Debug(' OE_HOLD_PUB.Check_Holds returns unexpected error!');
1130: RAISE FND_API.G_EXC_ERROR;
1131: END IF;
1132:

Line 1130: RAISE FND_API.G_EXC_ERROR;

1126:
1127:
1128: IF (l_return_status <> FND_API.g_ret_sts_success) THEN
1129: Debug(' OE_HOLD_PUB.Check_Holds returns unexpected error!');
1130: RAISE FND_API.G_EXC_ERROR;
1131: END IF;
1132:
1133: debug(' order_margin_%:'||l_order_margin_percent);
1134: debug(' min_margin_% in setup:'||l_min_margin_percent);

Line 1137: IF l_x_result_out = FND_API.G_FALSE THEN

1133: debug(' order_margin_%:'||l_order_margin_percent);
1134: debug(' min_margin_% in setup:'||l_min_margin_percent);
1135:
1136: IF l_order_margin_percent < l_min_margin_percent THEN
1137: IF l_x_result_out = FND_API.G_FALSE THEN
1138:
1139: --check if this hold had been manually released
1140: --if manually release, do not apply hold again
1141: l_manual_released:=CHECK_MANUAL_RELEASED_HOLDS

Line 1154: IF l_return_status = FND_API.g_ret_sts_success then

1150: ,x_msg_count => l_x_msg_count
1151: ,x_msg_data => l_x_msg_data
1152: );
1153:
1154: IF l_return_status = FND_API.g_ret_sts_success then
1155: FND_MESSAGE.SET_NAME('ONT', 'ONT_MARGIN_HOLD_APPLIED');
1156: OE_MSG_PUB.Add;
1157: ELSE
1158: debug('error applying hold',3);

Line 1159: RAISE FND_API.G_EXC_ERROR;

1155: FND_MESSAGE.SET_NAME('ONT', 'ONT_MARGIN_HOLD_APPLIED');
1156: OE_MSG_PUB.Add;
1157: ELSE
1158: debug('error applying hold',3);
1159: RAISE FND_API.G_EXC_ERROR;
1160: END IF;
1161: END IF;
1162:
1163: END IF; --Hold applied check

Line 1166: IF l_x_result_out = FND_API.G_TRUE THEN

1162:
1163: END IF; --Hold applied check
1164: ELSE
1165: --need to release hold if hold applied
1166: IF l_x_result_out = FND_API.G_TRUE THEN
1167: l_hold_release_rec.release_reason_code :='PASS_MIN_MARGIN';
1168: OE_Holds_Pub.Release_Holds(
1169: p_api_version => 1.0
1170: ,p_hold_source_rec => l_hold_source_rec

Line 1177: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

1173: ,x_msg_count => l_x_msg_count
1174: ,x_msg_data => l_x_msg_data
1175: );
1176:
1177: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1178: debug('Unexpected Error while releasing Margin Hold:'||SQLERRM);
1179: --RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1180: ELSIF l_return_status = FND_API.G_RET_STS_ERROR THEN
1181: debug('Error while releasing Margin Hold');

Line 1179: --RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1175: );
1176:
1177: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1178: debug('Unexpected Error while releasing Margin Hold:'||SQLERRM);
1179: --RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1180: ELSIF l_return_status = FND_API.G_RET_STS_ERROR THEN
1181: debug('Error while releasing Margin Hold');
1182: --RAISE FND_API.G_EXC_ERROR;
1183: END IF;

Line 1180: ELSIF l_return_status = FND_API.G_RET_STS_ERROR THEN

1176:
1177: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1178: debug('Unexpected Error while releasing Margin Hold:'||SQLERRM);
1179: --RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1180: ELSIF l_return_status = FND_API.G_RET_STS_ERROR THEN
1181: debug('Error while releasing Margin Hold');
1182: --RAISE FND_API.G_EXC_ERROR;
1183: END IF;
1184:

Line 1182: --RAISE FND_API.G_EXC_ERROR;

1178: debug('Unexpected Error while releasing Margin Hold:'||SQLERRM);
1179: --RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1180: ELSIF l_return_status = FND_API.G_RET_STS_ERROR THEN
1181: debug('Error while releasing Margin Hold');
1182: --RAISE FND_API.G_EXC_ERROR;
1183: END IF;
1184:
1185: END IF;
1186: END IF;