DBA Data[Home] [Help]

APPS.OE_MARGIN_PVT dependencies on FND_API

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

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

Line 312: p_request_rec.entity_id <> FND_API.G_MISS_NUM

308:
309:
310: BEGIN
311: IF p_request_rec.entity_id IS NOT NULL OR
312: p_request_rec.entity_id <> FND_API.G_MISS_NUM
313: AND p_header_flag = FALSE
314: THEN
315: debug('query line');
316: -- bug 4642569 begin replace expensive query_row with direct select

Line 328: IF l_result = FND_API.G_TRUE then

324: oe_debug_pub.add( 'L_RETURN_STATUS =' || L_RETURN_STATUS , 1 ) ;
325: oe_debug_pub.add( 'L_RESULT =' || L_RESULT , 1 ) ;
326: END IF;
327:
328: IF l_result = FND_API.G_TRUE then
329: l_line_rec := OE_ORDER_UTIL.G_Line_Tbl(l_ind);
330: ELSE
331: l_line_rec := oe_line_util.query_row(p_request_rec.entity_id);
332: END IF;

Line 342: l_return_status := FND_API.G_RET_STS_ERROR;

338: END IF;
339: EXCEPTION
340: WHEN NO_DATA_FOUND THEN
341: debug('p_request_rec.entity_id =' || p_request_rec.entity_id);
342: l_return_status := FND_API.G_RET_STS_ERROR;
343: END;
344:
345: --RT{
346: IF l_line_rec.retrobill_request_id IS NOT NULL

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

343: END;
344:
345: --RT{
346: IF l_line_rec.retrobill_request_id IS NOT NULL
347: and l_line_rec.retrobill_request_id <> FND_API.G_MISS_NUM THEN
348: debug(' Not computing cost, retrobill line');
349: RETURN NULL;
350: END IF;
351: --RT}

Line 353: IF l_return_status = FND_API.G_RET_STS_ERROR THEN

349: RETURN NULL;
350: END IF;
351: --RT}
352:
353: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
354: RETURN NULL;
355: END IF;
356:
357: IF l_line_rec.line_id IS NULL

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

503:
504: END IF;
505:
506: -- INVCONV
507: If l_item_rec.primary_uom_code is null or l_item_rec.primary_uom_code = fnd_api.g_miss_char then
508: l_item_rec := OE_Order_Cache.Load_Item(l_line_rec.inventory_item_id,
509: G_SHIP_FROM_ORG_ID);
510: End if;
511:

Line 517: , p_init_msg_list => FND_API.G_FALSE

513: IF l_item_rec.process_warehouse_flag = 'Y' then
514:
515: l_result_code:=GMF_CMCOMMON.Get_Process_Item_Cost
516: (p_api_version =>1
517: , p_init_msg_list => FND_API.G_FALSE
518: , x_return_status => l_return_status
519: , x_msg_count => l_msg_count
520: , x_msg_data => l_msg_count
521: , p_inventory_item_id =>l_line_rec.inventory_item_id

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

539: debug('primary_uom_code : '||l_item_rec.primary_uom_code);
540: debug('Order_quantity_uom : '||l_Line_rec.Order_quantity_uom);
541: debug('Inventory_item_id : '||l_Line_rec.Inventory_item_id);
542: If l_item_rec.primary_uom_code <> l_Line_rec.Order_quantity_uom
543: and l_unit_cost is not null and l_unit_cost <> fnd_api.g_miss_num Then
544: INV_CONVERT.INV_UM_CONVERSION(From_Unit => l_Line_rec.Order_quantity_uom
545: ,To_Unit => l_item_rec.primary_uom_code
546: ,Item_ID => l_Line_rec.Inventory_item_id
547: ,Uom_Rate => l_Uom_rate);

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

559: ,p_cost_type_id=>null);
560:
561: debug(' unit cost before convert:'||l_unit_cost);
562: debug('primary_uom_code : '||l_item_rec.primary_uom_code);
563: If l_item_rec.primary_uom_code is null or l_item_rec.primary_uom_code = fnd_api.g_miss_char then
564: l_item_rec := OE_Order_Cache.Load_Item(l_line_rec.inventory_item_id,
565: G_SHIP_FROM_ORG_ID);
566: End If;
567: debug('Order_quantity_uom : '||l_Line_rec.Order_quantity_uom);

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

566: End If;
567: debug('Order_quantity_uom : '||l_Line_rec.Order_quantity_uom);
568: debug('Inventory_item_id : '||l_Line_rec.Inventory_item_id);
569: If l_item_rec.primary_uom_code <> l_Line_rec.Order_quantity_uom
570: and l_unit_cost is not null and l_unit_cost <> fnd_api.g_miss_num Then
571: INV_CONVERT.INV_UM_CONVERSION(From_Unit => l_Line_rec.Order_quantity_uom
572: ,To_Unit => l_item_rec.primary_uom_code
573: ,Item_ID => l_Line_rec.Inventory_item_id
574: ,Uom_Rate => l_Uom_rate);

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

719:
720:
721:
722: IF p_request_rec.entity_id IS NOT NULL
723: OR p_request_rec.entity_id <> FND_API.G_MISS_NUM THEN
724: debug('l_old_unit_cost = '||l_old_unit_cost);
725: IF nvl(l_old_unit_cost,-999.3134) <> l_unit_cost THEN
726: l_control_rec.controlled_operation := FALSE;
727: l_control_rec.write_to_db := TRUE;

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

735: l_line_tbl(1).unit_cost := l_unit_cost;
736: l_line_tbl(1).operation := OE_GLOBALS.G_OPR_UPDATE;
737:
738: debug('before calling OE_ORDER_PVT.Lines jitesh');
739: OE_ORDER_PVT.Lines(p_validation_level => FND_API.G_VALID_LEVEL_NONE,
740: p_control_rec => l_control_rec,
741: p_x_line_tbl => l_line_tbl,
742: p_x_old_line_tbl => l_old_line_tbl,
743: x_return_status => l_return_status);

Line 748: IF l_return_status = FND_API.G_RET_STS_ERROR THEN

744: END IF;
745: END IF;
746: debug('after calling OE_ORDER_PVT.Lines jitesh');
747:
748: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
749: RAISE FND_API.G_EXC_ERROR;
750: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
751: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
752: END IF;

Line 749: RAISE FND_API.G_EXC_ERROR;

745: END IF;
746: debug('after calling OE_ORDER_PVT.Lines jitesh');
747:
748: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
749: RAISE FND_API.G_EXC_ERROR;
750: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
751: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
752: END IF;
753: debug('just before return oe_margin_pvt.get_cost');

Line 750: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

746: debug('after calling OE_ORDER_PVT.Lines jitesh');
747:
748: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
749: RAISE FND_API.G_EXC_ERROR;
750: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
751: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
752: END IF;
753: debug('just before return oe_margin_pvt.get_cost');
754: debug('l_unit_cost ='||l_unit_cost);

Line 751: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

747:
748: IF l_return_status = FND_API.G_RET_STS_ERROR THEN
749: RAISE FND_API.G_EXC_ERROR;
750: ELSIF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
751: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
752: END IF;
753: debug('just before return oe_margin_pvt.get_cost');
754: debug('l_unit_cost ='||l_unit_cost);
755:

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

1008: ,x_result_out => l_x_result_out
1009: );
1010:
1011:
1012: IF (l_return_status <> FND_API.g_ret_sts_success) THEN
1013: Debug(' OE_HOLD_PUB.Check_Holds returns unexpected error!');
1014: RAISE FND_API.G_EXC_ERROR;
1015: END IF;
1016:

Line 1014: RAISE FND_API.G_EXC_ERROR;

1010:
1011:
1012: IF (l_return_status <> FND_API.g_ret_sts_success) THEN
1013: Debug(' OE_HOLD_PUB.Check_Holds returns unexpected error!');
1014: RAISE FND_API.G_EXC_ERROR;
1015: END IF;
1016:
1017: debug(' order_margin_%:'||l_order_margin_percent);
1018: debug(' min_margin_% in setup:'||l_min_margin_percent);

Line 1021: IF l_x_result_out = FND_API.G_FALSE THEN

1017: debug(' order_margin_%:'||l_order_margin_percent);
1018: debug(' min_margin_% in setup:'||l_min_margin_percent);
1019:
1020: IF l_order_margin_percent < l_min_margin_percent THEN
1021: IF l_x_result_out = FND_API.G_FALSE THEN
1022:
1023: --check if this hold had been manually released
1024: --if manually release, do not apply hold again
1025: l_manual_released:=CHECK_MANUAL_RELEASED_HOLDS

Line 1038: IF l_return_status = FND_API.g_ret_sts_success then

1034: ,x_msg_count => l_x_msg_count
1035: ,x_msg_data => l_x_msg_data
1036: );
1037:
1038: IF l_return_status = FND_API.g_ret_sts_success then
1039: FND_MESSAGE.SET_NAME('ONT', 'ONT_MARGIN_HOLD_APPLIED');
1040: OE_MSG_PUB.Add;
1041: ELSE
1042: debug('error applying hold',3);

Line 1043: RAISE FND_API.G_EXC_ERROR;

1039: FND_MESSAGE.SET_NAME('ONT', 'ONT_MARGIN_HOLD_APPLIED');
1040: OE_MSG_PUB.Add;
1041: ELSE
1042: debug('error applying hold',3);
1043: RAISE FND_API.G_EXC_ERROR;
1044: END IF;
1045: END IF;
1046:
1047: END IF; --Hold applied check

Line 1050: IF l_x_result_out = FND_API.G_TRUE THEN

1046:
1047: END IF; --Hold applied check
1048: ELSE
1049: --need to release hold if hold applied
1050: IF l_x_result_out = FND_API.G_TRUE THEN
1051: l_hold_release_rec.release_reason_code :='PASS_MIN_MARGIN';
1052: OE_Holds_Pub.Release_Holds(
1053: p_api_version => 1.0
1054: ,p_hold_source_rec => l_hold_source_rec

Line 1061: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

1057: ,x_msg_count => l_x_msg_count
1058: ,x_msg_data => l_x_msg_data
1059: );
1060:
1061: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1062: debug('Unexpected Error while releasing Margin Hold:'||SQLERRM);
1063: --RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1064: ELSIF l_return_status = FND_API.G_RET_STS_ERROR THEN
1065: debug('Error while releasing Margin Hold');

Line 1063: --RAISE FND_API.G_EXC_UNEXPECTED_ERROR;

1059: );
1060:
1061: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1062: debug('Unexpected Error while releasing Margin Hold:'||SQLERRM);
1063: --RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1064: ELSIF l_return_status = FND_API.G_RET_STS_ERROR THEN
1065: debug('Error while releasing Margin Hold');
1066: --RAISE FND_API.G_EXC_ERROR;
1067: END IF;

Line 1064: ELSIF l_return_status = FND_API.G_RET_STS_ERROR THEN

1060:
1061: IF l_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1062: debug('Unexpected Error while releasing Margin Hold:'||SQLERRM);
1063: --RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1064: ELSIF l_return_status = FND_API.G_RET_STS_ERROR THEN
1065: debug('Error while releasing Margin Hold');
1066: --RAISE FND_API.G_EXC_ERROR;
1067: END IF;
1068:

Line 1066: --RAISE FND_API.G_EXC_ERROR;

1062: debug('Unexpected Error while releasing Margin Hold:'||SQLERRM);
1063: --RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1064: ELSIF l_return_status = FND_API.G_RET_STS_ERROR THEN
1065: debug('Error while releasing Margin Hold');
1066: --RAISE FND_API.G_EXC_ERROR;
1067: END IF;
1068:
1069: END IF;
1070: END IF;