DBA Data[Home] [Help]

APPS.PO_PRICE_ADJUSTMENTS_PKG dependencies on PO_DEBUG

Line 49: g_debug_stmt BOOLEAN := PO_DEBUG.is_debug_stmt_on;

45: g_pkg_name CONSTANT varchar2(30) := 'PO_PRICE_ADJUSTMENTS_PKG';
46: g_log_head CONSTANT VARCHAR2(50) := 'po.plsql.' || g_pkg_name || '.';
47:
48: -- Debugging
49: g_debug_stmt BOOLEAN := PO_DEBUG.is_debug_stmt_on;
50: g_debug_unexp BOOLEAN := PO_DEBUG.is_debug_unexp_on;
51:
52:
53: --------------------------------------------------------------------------------

Line 50: g_debug_unexp BOOLEAN := PO_DEBUG.is_debug_unexp_on;

46: g_log_head CONSTANT VARCHAR2(50) := 'po.plsql.' || g_pkg_name || '.';
47:
48: -- Debugging
49: g_debug_stmt BOOLEAN := PO_DEBUG.is_debug_stmt_on;
50: g_debug_unexp BOOLEAN := PO_DEBUG.is_debug_unexp_on;
51:
52:
53: --------------------------------------------------------------------------------
54: -- Forward procedure declarations.

Line 677: PO_DEBUG.debug_begin(l_log_head);

673: END IF;
674:
675: l_progress := '020';
676: IF g_debug_stmt THEN
677: PO_DEBUG.debug_begin(l_log_head);
678: PO_DEBUG.debug_var(l_log_head,l_progress,'p_order_header_id',p_order_header_id);
679:
680: FOR i IN p_order_line_id_tbl.FIRST..p_order_line_id_tbl.LAST
681: LOOP

Line 678: PO_DEBUG.debug_var(l_log_head,l_progress,'p_order_header_id',p_order_header_id);

674:
675: l_progress := '020';
676: IF g_debug_stmt THEN
677: PO_DEBUG.debug_begin(l_log_head);
678: PO_DEBUG.debug_var(l_log_head,l_progress,'p_order_header_id',p_order_header_id);
679:
680: FOR i IN p_order_line_id_tbl.FIRST..p_order_line_id_tbl.LAST
681: LOOP
682: PO_DEBUG.debug_var(l_log_head,l_progress,'p_order_line_id_tbl('||i||')',p_order_line_id_tbl(i));

Line 682: PO_DEBUG.debug_var(l_log_head,l_progress,'p_order_line_id_tbl('||i||')',p_order_line_id_tbl(i));

678: PO_DEBUG.debug_var(l_log_head,l_progress,'p_order_header_id',p_order_header_id);
679:
680: FOR i IN p_order_line_id_tbl.FIRST..p_order_line_id_tbl.LAST
681: LOOP
682: PO_DEBUG.debug_var(l_log_head,l_progress,'p_order_line_id_tbl('||i||')',p_order_line_id_tbl(i));
683: IF (p_quantity_tbl.exists(i)) THEN
684: PO_DEBUG.debug_var(l_log_head,l_progress,'p_quantity_tbl('||i||')',p_quantity_tbl(i));
685: ELSE
686: PO_DEBUG.debug_var(l_log_head,l_progress,'missing p_quantity_tbl('||i||')',1);

Line 684: PO_DEBUG.debug_var(l_log_head,l_progress,'p_quantity_tbl('||i||')',p_quantity_tbl(i));

680: FOR i IN p_order_line_id_tbl.FIRST..p_order_line_id_tbl.LAST
681: LOOP
682: PO_DEBUG.debug_var(l_log_head,l_progress,'p_order_line_id_tbl('||i||')',p_order_line_id_tbl(i));
683: IF (p_quantity_tbl.exists(i)) THEN
684: PO_DEBUG.debug_var(l_log_head,l_progress,'p_quantity_tbl('||i||')',p_quantity_tbl(i));
685: ELSE
686: PO_DEBUG.debug_var(l_log_head,l_progress,'missing p_quantity_tbl('||i||')',1);
687: END IF;
688: END LOOP;

Line 686: PO_DEBUG.debug_var(l_log_head,l_progress,'missing p_quantity_tbl('||i||')',1);

682: PO_DEBUG.debug_var(l_log_head,l_progress,'p_order_line_id_tbl('||i||')',p_order_line_id_tbl(i));
683: IF (p_quantity_tbl.exists(i)) THEN
684: PO_DEBUG.debug_var(l_log_head,l_progress,'p_quantity_tbl('||i||')',p_quantity_tbl(i));
685: ELSE
686: PO_DEBUG.debug_var(l_log_head,l_progress,'missing p_quantity_tbl('||i||')',1);
687: END IF;
688: END LOOP;
689: END IF;
690:

Line 693: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Before get manual and overridden price adjustments and associated context attributes');

689: END IF;
690:
691: l_progress := '040';
692: IF g_debug_stmt THEN
693: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Before get manual and overridden price adjustments and associated context attributes');
694: END IF;
695:
696: --For each order line id get the manual and overridden price adjustments and associated context attributes.
697: FOR i IN p_order_line_id_tbl.FIRST .. p_order_line_id_tbl.LAST

Line 701: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Get manual and overridden adjustments for order line id: '||p_order_line_id_tbl(i));

697: FOR i IN p_order_line_id_tbl.FIRST .. p_order_line_id_tbl.LAST
698: LOOP
699: l_progress := '060';
700: IF g_debug_stmt THEN
701: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Get manual and overridden adjustments for order line id: '||p_order_line_id_tbl(i));
702: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Reset line detail and related line detail pl/sql tables');
703: END IF;
704:
705: l_from_list_header_id_tbl.delete;

Line 702: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Reset line detail and related line detail pl/sql tables');

698: LOOP
699: l_progress := '060';
700: IF g_debug_stmt THEN
701: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Get manual and overridden adjustments for order line id: '||p_order_line_id_tbl(i));
702: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Reset line detail and related line detail pl/sql tables');
703: END IF;
704:
705: l_from_list_header_id_tbl.delete;
706: l_from_list_line_id_tbl.delete;

Line 866: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Get Min Price Adjustment Id from the list of manual and overridden price adjustments');

862:
863:
864: l_progress := '080';
865: IF g_debug_stmt THEN
866: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Get Min Price Adjustment Id from the list of manual and overridden price adjustments');
867: END IF;
868: OPEN man_ovr_min_adj_cur(p_order_line_id_tbl(i));
869: FETCH man_ovr_min_adj_cur INTO l_min_price_adj_id;
870: CLOSE man_ovr_min_adj_cur;

Line 874: PO_DEBUG.debug_stmt(l_log_head,l_progress,'No Adjustments found, continue with the next order line');

870: CLOSE man_ovr_min_adj_cur;
871:
872: l_progress := '090';
873: IF l_min_price_adj_id IS NULL THEN --No Adjustments found
874: PO_DEBUG.debug_stmt(l_log_head,l_progress,'No Adjustments found, continue with the next order line');
875: ELSE --To use it in the calculation of line detail index
876: l_min_price_adj_id := l_min_price_adj_id - 1;
877:
878: l_progress := '100';

Line 880: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Get manual and overridden price adjustments from Price Adjustments tables');

876: l_min_price_adj_id := l_min_price_adj_id - 1;
877:
878: l_progress := '100';
879: IF g_debug_stmt THEN
880: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Get manual and overridden price adjustments from Price Adjustments tables');
881: END IF;
882:
883: OPEN man_ovr_adj_cur(p_order_line_id_tbl(i));
884: FETCH man_ovr_adj_cur BULK COLLECT INTO

Line 914: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Continue with the next order line, when no manual or overridden modifiers are found');

910:
911: IF l_price_adjustment_id_tbl.count = 0 THEN
912: l_progress := '120';
913: IF g_debug_stmt THEN
914: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Continue with the next order line, when no manual or overridden modifiers are found');
915: END IF;
916: ELSE
917: l_progress := '140';
918: IF g_debug_stmt THEN

Line 919: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Initialize parameters before calling Insert Line Details in QP_PREQ_GRP');

915: END IF;
916: ELSE
917: l_progress := '140';
918: IF g_debug_stmt THEN
919: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Initialize parameters before calling Insert Line Details in QP_PREQ_GRP');
920: END IF;
921: m := 0;
922: FOR j IN l_price_adjustment_id_tbl.FIRST .. l_price_adjustment_id_tbl.LAST
923: LOOP

Line 1077: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Initialize parameters before calling Insert Line Attr Details in QP_PREQ_GRP');

1073: l_validated_flag_atbl;
1074:
1075: l_progress := '160';
1076: IF g_debug_stmt THEN
1077: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Initialize parameters before calling Insert Line Attr Details in QP_PREQ_GRP');
1078: END IF;
1079: IF l_line_detail_index_atbl.count > 0 THEN
1080: FOR j IN l_line_detail_index_atbl.FIRST .. l_line_detail_index_atbl.LAST
1081: LOOP

Line 1122: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Calling bulk insert procedure QP_PREQ_GRP.INSERT_LDETS2 to insert line details');

1118: END IF;
1119:
1120: l_progress := '170';
1121: IF g_debug_stmt THEN
1122: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Calling bulk insert procedure QP_PREQ_GRP.INSERT_LDETS2 to insert line details');
1123: END IF;
1124:
1125: IF l_price_adjustment_id_tbl.count > 0 THEN
1126: QP_PREQ_GRP.INSERT_LDETS2

Line 1195: PO_DEBUG.debug_stmt(l_log_head,l_progress,'After Calling INSERT_LDETS2');

1191: );
1192:
1193: l_progress := '180';
1194: IF g_debug_stmt THEN
1195: PO_DEBUG.debug_stmt(l_log_head,l_progress,'After Calling INSERT_LDETS2');
1196: PO_DEBUG.debug_var(l_log_head,l_progress,'x_return_status',x_return_status);
1197: PO_DEBUG.debug_var(l_log_head,l_progress,'l_return_status_text',l_return_status_text);
1198: END IF;
1199:

Line 1196: PO_DEBUG.debug_var(l_log_head,l_progress,'x_return_status',x_return_status);

1192:
1193: l_progress := '180';
1194: IF g_debug_stmt THEN
1195: PO_DEBUG.debug_stmt(l_log_head,l_progress,'After Calling INSERT_LDETS2');
1196: PO_DEBUG.debug_var(l_log_head,l_progress,'x_return_status',x_return_status);
1197: PO_DEBUG.debug_var(l_log_head,l_progress,'l_return_status_text',l_return_status_text);
1198: END IF;
1199:
1200: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

Line 1197: PO_DEBUG.debug_var(l_log_head,l_progress,'l_return_status_text',l_return_status_text);

1193: l_progress := '180';
1194: IF g_debug_stmt THEN
1195: PO_DEBUG.debug_stmt(l_log_head,l_progress,'After Calling INSERT_LDETS2');
1196: PO_DEBUG.debug_var(l_log_head,l_progress,'x_return_status',x_return_status);
1197: PO_DEBUG.debug_var(l_log_head,l_progress,'l_return_status_text',l_return_status_text);
1198: END IF;
1199:
1200: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1201: FND_MESSAGE.SET_NAME('PO','PO_QP_PRICE_API_ERROR');

Line 1216: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Calling bulk insert procedure QP_PREQ_GRP.INSERT_RLTD_LINES2 to insert relationship between lines');

1212:
1213:
1214: l_progress := '190';
1215: IF g_debug_stmt THEN
1216: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Calling bulk insert procedure QP_PREQ_GRP.INSERT_RLTD_LINES2 to insert relationship between lines');
1217: END IF;
1218: IF l_line_detail_index_rtbl.count > 0 THEN
1219: QP_PREQ_GRP.INSERT_RLTD_LINES2
1220: (p_line_index => l_line_index_rtbl

Line 1234: PO_DEBUG.debug_stmt(l_log_head,l_progress,'After Calling INSERT_RLTD_LINES2');

1230: );
1231:
1232: l_progress := '200';
1233: IF g_debug_stmt THEN
1234: PO_DEBUG.debug_stmt(l_log_head,l_progress,'After Calling INSERT_RLTD_LINES2');
1235: PO_DEBUG.debug_var(l_log_head,l_progress,'x_return_status',x_return_status);
1236: PO_DEBUG.debug_var(l_log_head,l_progress,'l_return_status_text',l_return_status_text);
1237: END IF;
1238:

Line 1235: PO_DEBUG.debug_var(l_log_head,l_progress,'x_return_status',x_return_status);

1231:
1232: l_progress := '200';
1233: IF g_debug_stmt THEN
1234: PO_DEBUG.debug_stmt(l_log_head,l_progress,'After Calling INSERT_RLTD_LINES2');
1235: PO_DEBUG.debug_var(l_log_head,l_progress,'x_return_status',x_return_status);
1236: PO_DEBUG.debug_var(l_log_head,l_progress,'l_return_status_text',l_return_status_text);
1237: END IF;
1238:
1239: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

Line 1236: PO_DEBUG.debug_var(l_log_head,l_progress,'l_return_status_text',l_return_status_text);

1232: l_progress := '200';
1233: IF g_debug_stmt THEN
1234: PO_DEBUG.debug_stmt(l_log_head,l_progress,'After Calling INSERT_RLTD_LINES2');
1235: PO_DEBUG.debug_var(l_log_head,l_progress,'x_return_status',x_return_status);
1236: PO_DEBUG.debug_var(l_log_head,l_progress,'l_return_status_text',l_return_status_text);
1237: END IF;
1238:
1239: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1240: FND_MESSAGE.SET_NAME('PO','PO_QP_PRICE_API_ERROR');

Line 1255: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Calling bulk insert procedure QP_PREQ_GRP.INSERT_LINE_ATTRS2 to insert line attribute details');

1251:
1252:
1253: l_progress := '210';
1254: IF g_debug_stmt THEN
1255: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Calling bulk insert procedure QP_PREQ_GRP.INSERT_LINE_ATTRS2 to insert line attribute details');
1256: END IF;
1257: IF l_line_detail_index_atbl.count > 0 THEN
1258: QP_PREQ_GRP.INSERT_LINE_ATTRS2
1259: (p_line_index_tbl => l_line_index_atbl

Line 1295: PO_DEBUG.debug_stmt(l_log_head,l_progress,'After Calling INSERT_LINE_ATTRS2');

1291: );
1292:
1293: l_progress := '220';
1294: IF g_debug_stmt THEN
1295: PO_DEBUG.debug_stmt(l_log_head,l_progress,'After Calling INSERT_LINE_ATTRS2');
1296: PO_DEBUG.debug_var(l_log_head,l_progress,'x_return_status',x_return_status);
1297: PO_DEBUG.debug_var(l_log_head,l_progress,'l_return_status_text',l_return_status_text);
1298: END IF;
1299:

Line 1296: PO_DEBUG.debug_var(l_log_head,l_progress,'x_return_status',x_return_status);

1292:
1293: l_progress := '220';
1294: IF g_debug_stmt THEN
1295: PO_DEBUG.debug_stmt(l_log_head,l_progress,'After Calling INSERT_LINE_ATTRS2');
1296: PO_DEBUG.debug_var(l_log_head,l_progress,'x_return_status',x_return_status);
1297: PO_DEBUG.debug_var(l_log_head,l_progress,'l_return_status_text',l_return_status_text);
1298: END IF;
1299:
1300: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN

Line 1297: PO_DEBUG.debug_var(l_log_head,l_progress,'l_return_status_text',l_return_status_text);

1293: l_progress := '220';
1294: IF g_debug_stmt THEN
1295: PO_DEBUG.debug_stmt(l_log_head,l_progress,'After Calling INSERT_LINE_ATTRS2');
1296: PO_DEBUG.debug_var(l_log_head,l_progress,'x_return_status',x_return_status);
1297: PO_DEBUG.debug_var(l_log_head,l_progress,'l_return_status_text',l_return_status_text);
1298: END IF;
1299:
1300: IF x_return_status = FND_API.G_RET_STS_UNEXP_ERROR THEN
1301: FND_MESSAGE.SET_NAME('PO','PO_QP_PRICE_API_ERROR');

Line 1335: PO_DEBUG.debug_stmt(l_log_head,l_progress,'EXITING POPL_MANUAL_OVERRIDDEN_ADJ WITH EXC ERROR with rollback');

1331: EXCEPTION
1332: WHEN FND_API.G_EXC_ERROR THEN
1333: x_return_status := FND_API.G_RET_STS_ERROR;
1334: IF g_debug_unexp THEN
1335: PO_DEBUG.debug_stmt(l_log_head,l_progress,'EXITING POPL_MANUAL_OVERRIDDEN_ADJ WITH EXC ERROR with rollback');
1336: END IF;
1337: ROLLBACK TO SAVEPOINT POPULATE_QP_TABLES;
1338: RAISE FND_API.G_EXC_ERROR;
1339: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

Line 1342: PO_DEBUG.debug_stmt(l_log_head,l_progress,'EXITING POPL_MANUAL_OVERRIDDEN_ADJ WITH UNEXPECTED ERROR with rollback');

1338: RAISE FND_API.G_EXC_ERROR;
1339: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1340: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1341: IF g_debug_unexp THEN
1342: PO_DEBUG.debug_stmt(l_log_head,l_progress,'EXITING POPL_MANUAL_OVERRIDDEN_ADJ WITH UNEXPECTED ERROR with rollback');
1343: END IF;
1344: ROLLBACK TO SAVEPOINT POPULATE_QP_TABLES;
1345: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1346: WHEN OTHERS THEN

Line 1349: PO_DEBUG.debug_stmt(l_log_head,l_progress,'UnExpected ERROR IN POPL_MANUAL_OVERRIDDEN_ADJ. SQLERRM at '||l_progress||': '||SQLERRM);

1345: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1346: WHEN OTHERS THEN
1347: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1348: IF g_debug_unexp THEN
1349: PO_DEBUG.debug_stmt(l_log_head,l_progress,'UnExpected ERROR IN POPL_MANUAL_OVERRIDDEN_ADJ. SQLERRM at '||l_progress||': '||SQLERRM);
1350: END IF;
1351:
1352: IF g_debug_unexp THEN
1353: PO_DEBUG.debug_stmt(l_log_head,l_progress,'EXITING PO_PRICE_ADJUSTMENTS_PKG.POPL_MANUAL_OVERRIDDEN_ADJ with rollback');

Line 1353: PO_DEBUG.debug_stmt(l_log_head,l_progress,'EXITING PO_PRICE_ADJUSTMENTS_PKG.POPL_MANUAL_OVERRIDDEN_ADJ with rollback');

1349: PO_DEBUG.debug_stmt(l_log_head,l_progress,'UnExpected ERROR IN POPL_MANUAL_OVERRIDDEN_ADJ. SQLERRM at '||l_progress||': '||SQLERRM);
1350: END IF;
1351:
1352: IF g_debug_unexp THEN
1353: PO_DEBUG.debug_stmt(l_log_head,l_progress,'EXITING PO_PRICE_ADJUSTMENTS_PKG.POPL_MANUAL_OVERRIDDEN_ADJ with rollback');
1354: END IF;
1355: ROLLBACK TO SAVEPOINT POPULATE_QP_TABLES;
1356: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1357: END popl_manual_overridden_adj;

Line 1429: PO_DEBUG.debug_begin(l_log_head);

1425: END IF;
1426:
1427: l_progress := '010';
1428: IF g_debug_stmt THEN
1429: PO_DEBUG.debug_begin(l_log_head);
1430: PO_DEBUG.debug_var(l_log_head,l_progress,'p_order_header_id',p_order_header_id);
1431:
1432: FOR i IN p_order_line_id_tbl.FIRST..p_order_line_id_tbl.LAST
1433: LOOP

Line 1430: PO_DEBUG.debug_var(l_log_head,l_progress,'p_order_header_id',p_order_header_id);

1426:
1427: l_progress := '010';
1428: IF g_debug_stmt THEN
1429: PO_DEBUG.debug_begin(l_log_head);
1430: PO_DEBUG.debug_var(l_log_head,l_progress,'p_order_header_id',p_order_header_id);
1431:
1432: FOR i IN p_order_line_id_tbl.FIRST..p_order_line_id_tbl.LAST
1433: LOOP
1434: PO_DEBUG.debug_var(l_log_head,l_progress,'p_order_line_id_tbl('||i||')',p_order_line_id_tbl(i));

Line 1434: PO_DEBUG.debug_var(l_log_head,l_progress,'p_order_line_id_tbl('||i||')',p_order_line_id_tbl(i));

1430: PO_DEBUG.debug_var(l_log_head,l_progress,'p_order_header_id',p_order_header_id);
1431:
1432: FOR i IN p_order_line_id_tbl.FIRST..p_order_line_id_tbl.LAST
1433: LOOP
1434: PO_DEBUG.debug_var(l_log_head,l_progress,'p_order_line_id_tbl('||i||')',p_order_line_id_tbl(i));
1435: END LOOP;
1436: PO_DEBUG.debug_var(l_log_head,l_progress,'p_pricing_events',p_pricing_events);
1437: PO_DEBUG.debug_var(l_log_head,l_progress,'p_calculate_flag',p_calculate_flag);
1438: END IF;

Line 1436: PO_DEBUG.debug_var(l_log_head,l_progress,'p_pricing_events',p_pricing_events);

1432: FOR i IN p_order_line_id_tbl.FIRST..p_order_line_id_tbl.LAST
1433: LOOP
1434: PO_DEBUG.debug_var(l_log_head,l_progress,'p_order_line_id_tbl('||i||')',p_order_line_id_tbl(i));
1435: END LOOP;
1436: PO_DEBUG.debug_var(l_log_head,l_progress,'p_pricing_events',p_pricing_events);
1437: PO_DEBUG.debug_var(l_log_head,l_progress,'p_calculate_flag',p_calculate_flag);
1438: END IF;
1439:
1440:

Line 1437: PO_DEBUG.debug_var(l_log_head,l_progress,'p_calculate_flag',p_calculate_flag);

1433: LOOP
1434: PO_DEBUG.debug_var(l_log_head,l_progress,'p_order_line_id_tbl('||i||')',p_order_line_id_tbl(i));
1435: END LOOP;
1436: PO_DEBUG.debug_var(l_log_head,l_progress,'p_pricing_events',p_pricing_events);
1437: PO_DEBUG.debug_var(l_log_head,l_progress,'p_calculate_flag',p_calculate_flag);
1438: END IF;
1439:
1440:
1441: l_progress := '020';

Line 1443: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Before extracting adjustments from QP temp tables');

1439:
1440:
1441: l_progress := '020';
1442: IF g_debug_stmt THEN
1443: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Before extracting adjustments from QP temp tables');
1444: END IF;
1445:
1446: --Sync PO PRICE ADJUSTMENTS table with PO PRICE ADJUSTMENTS DRAFT
1447: FOR i IN p_order_line_id_tbl.FIRST .. p_order_line_id_tbl.LAST

Line 1459: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Extract adjustments from QP temp tables');

1455:
1456: IF NVL(p_pricing_events, 'PO_BATCH') = 'PO_BATCH' THEN
1457: l_progress := '030';
1458: IF g_debug_stmt THEN
1459: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Extract adjustments from QP temp tables');
1460: END IF;
1461:
1462: IF (p_calculate_flag <> QP_PREQ_GRP.G_CALCULATE_ONLY) THEN
1463: l_progress := '040';

Line 1465: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Delete outdated adjustments and dependant details');

1461:
1462: IF (p_calculate_flag <> QP_PREQ_GRP.G_CALCULATE_ONLY) THEN
1463: l_progress := '040';
1464: IF g_debug_stmt THEN
1465: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Delete outdated adjustments and dependant details');
1466: END IF;
1467: --Used progress code from 50 to 150
1468: delete_line_adjs
1469: (p_draft_id => p_draft_id

Line 1483: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Update PO Line Adjustment details');

1479:
1480: IF NVL(p_pricing_events, 'PO_BATCH') = 'PO_BATCH' THEN
1481: l_progress := '160';
1482: IF g_debug_stmt THEN
1483: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Update PO Line Adjustment details');
1484: END IF;
1485: l_debug_upd_line_adj_tbl.delete;
1486: FOR upd_line_det IN upd_line_det_cur
1487: LOOP

Line 1500: PO_DEBUG.debug_stmt(l_log_head,l_progress,'UPDATED '|| SQL%ROWCOUNT ||' LINE LEVEL ADJUSTMENTS');

1496: ,px_debug_upd_adj_tbl => l_debug_upd_line_adj_tbl
1497: ,p_log_head => l_log_head);
1498: l_progress := '260';
1499: IF g_debug_stmt THEN
1500: PO_DEBUG.debug_stmt(l_log_head,l_progress,'UPDATED '|| SQL%ROWCOUNT ||' LINE LEVEL ADJUSTMENTS');
1501: END IF;
1502: END LOOP;
1503:
1504: IF (p_calculate_flag <> QP_PREQ_GRP.G_CALCULATE_ONLY) THEN

Line 1541: PO_DEBUG.debug_stmt(l_log_head,l_progress,'EXITING EXTRACT_PRICE_ADJUSTMENTS WITH EXC ERROR with rollback');

1537: EXCEPTION
1538: WHEN FND_API.G_EXC_ERROR THEN
1539: x_return_status := FND_API.G_RET_STS_ERROR;
1540: IF g_debug_unexp THEN
1541: PO_DEBUG.debug_stmt(l_log_head,l_progress,'EXITING EXTRACT_PRICE_ADJUSTMENTS WITH EXC ERROR with rollback');
1542: END IF;
1543: ROLLBACK TO SAVEPOINT EXTRACT_PRICE_ADJUSTMENTS;
1544: RAISE FND_API.G_EXC_ERROR;
1545: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN

Line 1548: PO_DEBUG.debug_stmt(l_log_head,l_progress,'EXITING EXTRACT_PRICE_ADJUSTMENTS WITH UNEXPECTED ERROR with rollback');

1544: RAISE FND_API.G_EXC_ERROR;
1545: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
1546: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1547: IF g_debug_unexp THEN
1548: PO_DEBUG.debug_stmt(l_log_head,l_progress,'EXITING EXTRACT_PRICE_ADJUSTMENTS WITH UNEXPECTED ERROR with rollback');
1549: END IF;
1550: ROLLBACK TO SAVEPOINT EXTRACT_PRICE_ADJUSTMENTS;
1551: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1552: WHEN OTHERS THEN

Line 1555: PO_DEBUG.debug_stmt(l_log_head,l_progress,'UnExpected ERROR IN EXTRACT_PRICE_ADJUSTMENTS. SQLERRM at '||l_progress||': '||SQLERRM);

1551: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1552: WHEN OTHERS THEN
1553: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
1554: IF g_debug_unexp THEN
1555: PO_DEBUG.debug_stmt(l_log_head,l_progress,'UnExpected ERROR IN EXTRACT_PRICE_ADJUSTMENTS. SQLERRM at '||l_progress||': '||SQLERRM);
1556: END IF;
1557:
1558: IF g_debug_unexp THEN
1559: PO_DEBUG.debug_stmt(l_log_head,l_progress,'EXITING PO_PRICE_ADJUSTMENTS_PKG.EXTRACT_PRICE_ADJUSTMENTS with rollback');

Line 1559: PO_DEBUG.debug_stmt(l_log_head,l_progress,'EXITING PO_PRICE_ADJUSTMENTS_PKG.EXTRACT_PRICE_ADJUSTMENTS with rollback');

1555: PO_DEBUG.debug_stmt(l_log_head,l_progress,'UnExpected ERROR IN EXTRACT_PRICE_ADJUSTMENTS. SQLERRM at '||l_progress||': '||SQLERRM);
1556: END IF;
1557:
1558: IF g_debug_unexp THEN
1559: PO_DEBUG.debug_stmt(l_log_head,l_progress,'EXITING PO_PRICE_ADJUSTMENTS_PKG.EXTRACT_PRICE_ADJUSTMENTS with rollback');
1560: END IF;
1561: ROLLBACK TO SAVEPOINT EXTRACT_PRICE_ADJUSTMENTS;
1562: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1563: END extract_price_adjustments;

Line 1587: PO_DEBUG.debug_stmt(p_log_head,l_progress,'Delete old line adjustments for lines with pricing_status_code UPDATED');

1583: j PLS_INTEGER;
1584: l_adj_id_tbl QP_PREQ_GRP.NUMBER_TYPE;
1585: BEGIN
1586: IF g_debug_stmt THEN
1587: PO_DEBUG.debug_stmt(p_log_head,l_progress,'Delete old line adjustments for lines with pricing_status_code UPDATED');
1588: END IF;
1589:
1590: FOR j IN p_order_line_id_tbl.FIRST .. p_order_line_id_tbl.LAST
1591: LOOP

Line 1594: PO_DEBUG.debug_stmt(p_log_head,l_progress,'Check if PO Line Id: '||p_order_line_id_tbl(j)||' is UPDATED by pricing engine');

1590: FOR j IN p_order_line_id_tbl.FIRST .. p_order_line_id_tbl.LAST
1591: LOOP
1592: l_progress := '60';
1593: IF g_debug_stmt THEN
1594: PO_DEBUG.debug_stmt(p_log_head,l_progress,'Check if PO Line Id: '||p_order_line_id_tbl(j)||' is UPDATED by pricing engine');
1595: END IF;
1596: BEGIN
1597: SELECT QLINE.line_id, QLINE.price_flag, QLINE.line_index
1598: INTO l_line_id, l_price_flag, l_line_index

Line 1614: PO_DEBUG.debug_stmt(p_log_head,l_progress,'The PO Line is not updated by pricing engine');

1610:
1611: IF l_line_id IS NULL THEN
1612: l_progress := '70';
1613: IF g_debug_stmt THEN
1614: PO_DEBUG.debug_stmt(p_log_head,l_progress,'The PO Line is not updated by pricing engine');
1615: END IF;
1616: ELSE
1617: --DELETE FROM PO_PRICE_ADJUSTMENTS_DRAFT ADJD
1618: UPDATE PO_PRICE_ADJUSTMENTS_DRAFT ADJD

Line 1651: PO_DEBUG.debug_stmt(p_log_head,l_progress,'UPDATED '|| SQL%ROWCOUNT ||' LINE LEVEL ADJUSTMENTS WITH DELETE FLAG');

1647: RETURNING ADJD.price_adjustment_id BULK COLLECT INTO l_adj_id_tbl;
1648:
1649: l_progress := '80';
1650: IF g_debug_stmt THEN
1651: PO_DEBUG.debug_stmt(p_log_head,l_progress,'UPDATED '|| SQL%ROWCOUNT ||' LINE LEVEL ADJUSTMENTS WITH DELETE FLAG');
1652: END IF;
1653:
1654: l_progress := '90';
1655: IF g_debug_stmt THEN

Line 1656: PO_DEBUG.debug_stmt(p_log_head,l_progress,'Mark child adjustment records for deletion');

1652: END IF;
1653:
1654: l_progress := '90';
1655: IF g_debug_stmt THEN
1656: PO_DEBUG.debug_stmt(p_log_head,l_progress,'Mark child adjustment records for deletion');
1657: END IF;
1658:
1659: --Only child adjustments are marked for deletion, no need to mark the attributes for deletion. The attributes are deleted along with the adjustments
1660: IF l_adj_id_tbl.count > 0 THEN

Line 1669: PO_DEBUG.debug_stmt(p_log_head,l_progress,'UPDATED '|| SQL%ROWCOUNT ||' CHILD LINES WITH DELETE FLAG');

1665: AND parent_adjustment_id = l_adj_id_tbl(i);
1666:
1667: l_progress := '100';
1668: IF g_debug_stmt THEN
1669: PO_DEBUG.debug_stmt(p_log_head,l_progress,'UPDATED '|| SQL%ROWCOUNT ||' CHILD LINES WITH DELETE FLAG');
1670: END IF;
1671: END IF;
1672: /*
1673: IF l_adj_id_tbl.count > 0 THEN

Line 1678: PO_DEBUG.debug_stmt(p_log_head,l_progress,'DELETED '|| SQL%ROWCOUNT ||' ATTRIBS');

1674: FORALL i IN l_adj_id_tbl.FIRST..l_adj_id_tbl.LAST
1675: DELETE FROM PO_PRICE_ADJ_ATTRIBS_DRAFT WHERE draft_id = p_draft_id AND price_adjustment_id = l_adj_id_tbl(i);
1676: l_progress := '100';
1677: IF g_debug_stmt THEN
1678: PO_DEBUG.debug_stmt(p_log_head,l_progress,'DELETED '|| SQL%ROWCOUNT ||' ATTRIBS');
1679: END IF;
1680:
1681: FORALL i IN l_adj_id_tbl.FIRST..l_adj_id_tbl.LAST
1682: DELETE FROM PO_PRICE_ADJ_ASSOCS_DRAFT WHERE draft_id = p_draft_id AND price_adjustment_id = l_adj_id_tbl(i);

Line 1685: PO_DEBUG.debug_stmt(p_log_head,l_progress,'DELETED '|| SQL%ROWCOUNT ||' ASSOCS');

1681: FORALL i IN l_adj_id_tbl.FIRST..l_adj_id_tbl.LAST
1682: DELETE FROM PO_PRICE_ADJ_ASSOCS_DRAFT WHERE draft_id = p_draft_id AND price_adjustment_id = l_adj_id_tbl(i);
1683: l_progress := '110';
1684: IF g_debug_stmt THEN
1685: PO_DEBUG.debug_stmt(p_log_head,l_progress,'DELETED '|| SQL%ROWCOUNT ||' ASSOCS');
1686: END IF;
1687:
1688: FORALL i IN l_adj_id_tbl.FIRST..l_adj_id_tbl.LAST
1689: DELETE FROM PO_PRICE_ADJ_ASSOCS_DRAFT WHERE draft_id = p_draft_id AND rltd_price_adj_id = l_adj_id_tbl(i);

Line 1692: PO_DEBUG.debug_stmt(p_log_head,l_progress,'DELETED '|| SQL%ROWCOUNT ||' RLTD ASSOCS');

1688: FORALL i IN l_adj_id_tbl.FIRST..l_adj_id_tbl.LAST
1689: DELETE FROM PO_PRICE_ADJ_ASSOCS_DRAFT WHERE draft_id = p_draft_id AND rltd_price_adj_id = l_adj_id_tbl(i);
1690: l_progress := '120';
1691: IF g_debug_stmt THEN
1692: PO_DEBUG.debug_stmt(p_log_head,l_progress,'DELETED '|| SQL%ROWCOUNT ||' RLTD ASSOCS');
1693: END IF;
1694: END IF;
1695: */
1696: END IF;

Line 1715: PO_DEBUG.debug_stmt(p_log_head,l_progress,'Update PO Line Adjustment details for');

1711:
1712: BEGIN
1713:
1714: IF g_debug_stmt THEN
1715: PO_DEBUG.debug_stmt(p_log_head,l_progress,'Update PO Line Adjustment details for');
1716: PO_DEBUG.debug_var(p_log_head,l_progress,'p_draft_id',p_draft_id);
1717: PO_DEBUG.debug_var(p_log_head,l_progress,'p_price_adjustment_id',p_price_adjustment_id);
1718: PO_DEBUG.debug_var(p_log_head,l_progress,'p_line_detail_index',p_line_detail_index);
1719: END IF;

Line 1716: PO_DEBUG.debug_var(p_log_head,l_progress,'p_draft_id',p_draft_id);

1712: BEGIN
1713:
1714: IF g_debug_stmt THEN
1715: PO_DEBUG.debug_stmt(p_log_head,l_progress,'Update PO Line Adjustment details for');
1716: PO_DEBUG.debug_var(p_log_head,l_progress,'p_draft_id',p_draft_id);
1717: PO_DEBUG.debug_var(p_log_head,l_progress,'p_price_adjustment_id',p_price_adjustment_id);
1718: PO_DEBUG.debug_var(p_log_head,l_progress,'p_line_detail_index',p_line_detail_index);
1719: END IF;
1720:

Line 1717: PO_DEBUG.debug_var(p_log_head,l_progress,'p_price_adjustment_id',p_price_adjustment_id);

1713:
1714: IF g_debug_stmt THEN
1715: PO_DEBUG.debug_stmt(p_log_head,l_progress,'Update PO Line Adjustment details for');
1716: PO_DEBUG.debug_var(p_log_head,l_progress,'p_draft_id',p_draft_id);
1717: PO_DEBUG.debug_var(p_log_head,l_progress,'p_price_adjustment_id',p_price_adjustment_id);
1718: PO_DEBUG.debug_var(p_log_head,l_progress,'p_line_detail_index',p_line_detail_index);
1719: END IF;
1720:
1721: BEGIN

Line 1718: PO_DEBUG.debug_var(p_log_head,l_progress,'p_line_detail_index',p_line_detail_index);

1714: IF g_debug_stmt THEN
1715: PO_DEBUG.debug_stmt(p_log_head,l_progress,'Update PO Line Adjustment details for');
1716: PO_DEBUG.debug_var(p_log_head,l_progress,'p_draft_id',p_draft_id);
1717: PO_DEBUG.debug_var(p_log_head,l_progress,'p_price_adjustment_id',p_price_adjustment_id);
1718: PO_DEBUG.debug_var(p_log_head,l_progress,'p_line_detail_index',p_line_detail_index);
1719: END IF;
1720:
1721: BEGIN
1722: SELECT ADJ.price_adjustment_id

Line 1731: PO_DEBUG.debug_stmt(p_log_head,l_progress,'Adjustment row successfully locked');

1727: FOR UPDATE NOWAIT;
1728:
1729: l_progress := '180';
1730: IF g_debug_stmt THEN
1731: PO_DEBUG.debug_stmt(p_log_head,l_progress,'Adjustment row successfully locked');
1732: END IF;
1733: EXCEPTION
1734: WHEN APP_EXCEPTIONS.RECORD_LOCK_EXCEPTION THEN
1735: l_progress := '190';

Line 1737: PO_DEBUG.debug_stmt(p_log_head,l_progress,'in lock record exception, someone else working on the row');

1733: EXCEPTION
1734: WHEN APP_EXCEPTIONS.RECORD_LOCK_EXCEPTION THEN
1735: l_progress := '190';
1736: IF g_debug_stmt THEN
1737: PO_DEBUG.debug_stmt(p_log_head,l_progress,'in lock record exception, someone else working on the row');
1738: END IF;
1739: --FND_MESSAGE.SET_NAME('ONT', 'PO_LOCK_ROW_ALREADY_LOCKED');
1740: --PO_MSG_PUB.Add;
1741: RAISE FND_API.G_EXC_ERROR;

Line 1745: PO_DEBUG.debug_stmt(p_log_head,l_progress,'no_data_found, record lock exception');

1741: RAISE FND_API.G_EXC_ERROR;
1742: WHEN NO_DATA_FOUND THEN
1743: l_progress := '200';
1744: IF g_debug_stmt THEN
1745: PO_DEBUG.debug_stmt(p_log_head,l_progress,'no_data_found, record lock exception');
1746: END IF;
1747: WHEN OTHERS THEN
1748: l_progress := '210';
1749: IF g_debug_stmt THEN

Line 1750: PO_DEBUG.debug_stmt(p_log_head,l_progress,'record lock exception, others');

1746: END IF;
1747: WHEN OTHERS THEN
1748: l_progress := '210';
1749: IF g_debug_stmt THEN
1750: PO_DEBUG.debug_stmt(p_log_head,l_progress,'record lock exception, others');
1751: END IF;
1752: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
1753: END;
1754:

Line 1835: PO_DEBUG.debug_stmt(p_log_head,l_progress,'exiting update_adj procedure');

1831: END IF;
1832:
1833: l_progress := '210';
1834: IF g_debug_stmt THEN
1835: PO_DEBUG.debug_stmt(p_log_head,l_progress,'exiting update_adj procedure');
1836: END IF;
1837: END update_adj;
1838:
1839:

Line 1853: PO_DEBUG.debug_stmt(p_log_head,l_progress,'Insert Adjustments called with Order Header ID: '||p_order_header_id);

1849: i PLS_INTEGER;
1850: BEGIN
1851:
1852: IF g_debug_stmt THEN
1853: PO_DEBUG.debug_stmt(p_log_head,l_progress,'Insert Adjustments called with Order Header ID: '||p_order_header_id);
1854: END IF;
1855:
1856: INSERT INTO PO_PRICE_ADJUSTMENTS_DRAFT
1857: (DRAFT_ID

Line 2077: PO_DEBUG.debug_stmt(p_log_head,l_progress,'INSERTED '|| SQL%ROWCOUNT ||' ADJUSTMENTS');

2073: AND ADJ.po_line_id = QLINE.line_id)
2074: );
2075: l_progress := '280';
2076: IF g_debug_stmt THEN
2077: PO_DEBUG.debug_stmt(p_log_head,l_progress,'INSERTED '|| SQL%ROWCOUNT ||' ADJUSTMENTS');
2078: END IF;
2079:
2080: --New Parent Adjustment Id Logic Start
2081: SELECT ADJ.price_adjustment_id

Line 2112: PO_DEBUG.debug_stmt(p_log_head,l_progress,'ERROR in inserting adjustments and associations');

2108: EXCEPTION
2109: WHEN OTHERS THEN
2110: l_progress := '300';
2111: IF g_debug_stmt THEN
2112: PO_DEBUG.debug_stmt(p_log_head,l_progress,'ERROR in inserting adjustments and associations');
2113: END IF;
2114: RAISE FND_API.G_EXC_ERROR;
2115: END insert_adj;
2116:

Line 2149: PO_DEBUG.debug_stmt(p_log_head,l_progress,'Update Adjustment Attributes called with the below parameters');

2145: --
2146: BEGIN
2147: --
2148: IF g_debug_stmt THEN
2149: PO_DEBUG.debug_stmt(p_log_head,l_progress,'Update Adjustment Attributes called with the below parameters');
2150: PO_DEBUG.debug_var(p_log_head,l_progress,'p_order_header_id',p_order_header_id);
2151: PO_DEBUG.debug_var(p_log_head,l_progress,'p_pricing_events',p_pricing_events);
2152: END IF;
2153: l_adj_id_tbl.delete;

Line 2150: PO_DEBUG.debug_var(p_log_head,l_progress,'p_order_header_id',p_order_header_id);

2146: BEGIN
2147: --
2148: IF g_debug_stmt THEN
2149: PO_DEBUG.debug_stmt(p_log_head,l_progress,'Update Adjustment Attributes called with the below parameters');
2150: PO_DEBUG.debug_var(p_log_head,l_progress,'p_order_header_id',p_order_header_id);
2151: PO_DEBUG.debug_var(p_log_head,l_progress,'p_pricing_events',p_pricing_events);
2152: END IF;
2153: l_adj_id_tbl.delete;
2154: l_line_detail_index_tbl.delete;

Line 2151: PO_DEBUG.debug_var(p_log_head,l_progress,'p_pricing_events',p_pricing_events);

2147: --
2148: IF g_debug_stmt THEN
2149: PO_DEBUG.debug_stmt(p_log_head,l_progress,'Update Adjustment Attributes called with the below parameters');
2150: PO_DEBUG.debug_var(p_log_head,l_progress,'p_order_header_id',p_order_header_id);
2151: PO_DEBUG.debug_var(p_log_head,l_progress,'p_pricing_events',p_pricing_events);
2152: END IF;
2153: l_adj_id_tbl.delete;
2154: l_line_detail_index_tbl.delete;
2155:

Line 2179: PO_DEBUG.debug_stmt(p_log_head,l_progress,'DELETED '|| SQL%ROWCOUNT ||' ATTRIBUTES');

2175: );
2176:
2177: l_progress := '380';
2178: IF g_debug_stmt THEN
2179: PO_DEBUG.debug_stmt(p_log_head,l_progress,'DELETED '|| SQL%ROWCOUNT ||' ATTRIBUTES');
2180: END IF;
2181:
2182: FORALL i IN l_adj_id_tbl.FIRST..l_adj_id_tbl.LAST
2183: INSERT INTO PO_PRICE_ADJ_ATTRIBS_DRAFT

Line 2245: PO_DEBUG.debug_stmt(p_log_head,l_progress,'INSERTED '|| SQL%ROWCOUNT ||' CHANGED ATTRIBS');

2241: );
2242:
2243: l_progress := '390';
2244: IF g_debug_stmt THEN
2245: PO_DEBUG.debug_stmt(p_log_head,l_progress,'INSERTED '|| SQL%ROWCOUNT ||' CHANGED ATTRIBS');
2246: END IF;
2247: END IF;
2248: CLOSE refresh_attribs_cur;
2249: END update_adj_attribs;

Line 2261: PO_DEBUG.debug_stmt(p_log_head,l_progress,'Insert Adjustment Attributes called with the below parameters');

2257: l_progress VARCHAR2(4) := '450';
2258: BEGIN
2259:
2260: IF g_debug_stmt THEN
2261: PO_DEBUG.debug_stmt(p_log_head,l_progress,'Insert Adjustment Attributes called with the below parameters');
2262: PO_DEBUG.debug_var(p_log_head,l_progress,'p_draft_id',p_draft_id);
2263: PO_DEBUG.debug_var(p_log_head,l_progress,'p_order_header_id',p_order_header_id);
2264: END IF;
2265:

Line 2262: PO_DEBUG.debug_var(p_log_head,l_progress,'p_draft_id',p_draft_id);

2258: BEGIN
2259:
2260: IF g_debug_stmt THEN
2261: PO_DEBUG.debug_stmt(p_log_head,l_progress,'Insert Adjustment Attributes called with the below parameters');
2262: PO_DEBUG.debug_var(p_log_head,l_progress,'p_draft_id',p_draft_id);
2263: PO_DEBUG.debug_var(p_log_head,l_progress,'p_order_header_id',p_order_header_id);
2264: END IF;
2265:
2266: INSERT INTO PO_PRICE_ADJ_ATTRIBS_DRAFT

Line 2263: PO_DEBUG.debug_var(p_log_head,l_progress,'p_order_header_id',p_order_header_id);

2259:
2260: IF g_debug_stmt THEN
2261: PO_DEBUG.debug_stmt(p_log_head,l_progress,'Insert Adjustment Attributes called with the below parameters');
2262: PO_DEBUG.debug_var(p_log_head,l_progress,'p_draft_id',p_draft_id);
2263: PO_DEBUG.debug_var(p_log_head,l_progress,'p_order_header_id',p_order_header_id);
2264: END IF;
2265:
2266: INSERT INTO PO_PRICE_ADJ_ATTRIBS_DRAFT
2267: (DRAFT_ID

Line 2326: PO_DEBUG.debug_stmt(p_log_head,l_progress,'INSERTED '|| SQL%ROWCOUNT ||' ATTRIBS');

2322: AND QPLINE.process_status <> 'NOT_VALID'
2323: );
2324: l_progress := '460';
2325: IF g_debug_stmt THEN
2326: PO_DEBUG.debug_stmt(p_log_head,l_progress,'INSERTED '|| SQL%ROWCOUNT ||' ATTRIBS');
2327: END IF;
2328: END insert_adj_attribs;
2329:
2330: PROCEDURE complete_manual_mod_lov_map

Line 2560: PO_DEBUG.debug_begin(l_log_head);

2556: x_return_status := FND_API.G_RET_STS_SUCCESS;
2557: l_progress := '010';
2558:
2559: IF g_debug_stmt THEN
2560: PO_DEBUG.debug_begin(l_log_head);
2561: PO_DEBUG.debug_var(l_log_head,l_progress,'p_src_po_line_id',p_src_po_line_id);
2562: PO_DEBUG.debug_var(l_log_head,l_progress,'p_dest_po_header_id',p_dest_po_header_id);
2563: PO_DEBUG.debug_var(l_log_head,l_progress,'p_dest_po_line_id',p_dest_po_line_id);
2564: PO_DEBUG.debug_var(l_log_head,l_progress,'p_mode',p_mode);

Line 2561: PO_DEBUG.debug_var(l_log_head,l_progress,'p_src_po_line_id',p_src_po_line_id);

2557: l_progress := '010';
2558:
2559: IF g_debug_stmt THEN
2560: PO_DEBUG.debug_begin(l_log_head);
2561: PO_DEBUG.debug_var(l_log_head,l_progress,'p_src_po_line_id',p_src_po_line_id);
2562: PO_DEBUG.debug_var(l_log_head,l_progress,'p_dest_po_header_id',p_dest_po_header_id);
2563: PO_DEBUG.debug_var(l_log_head,l_progress,'p_dest_po_line_id',p_dest_po_line_id);
2564: PO_DEBUG.debug_var(l_log_head,l_progress,'p_mode',p_mode);
2565: END IF;

Line 2562: PO_DEBUG.debug_var(l_log_head,l_progress,'p_dest_po_header_id',p_dest_po_header_id);

2558:
2559: IF g_debug_stmt THEN
2560: PO_DEBUG.debug_begin(l_log_head);
2561: PO_DEBUG.debug_var(l_log_head,l_progress,'p_src_po_line_id',p_src_po_line_id);
2562: PO_DEBUG.debug_var(l_log_head,l_progress,'p_dest_po_header_id',p_dest_po_header_id);
2563: PO_DEBUG.debug_var(l_log_head,l_progress,'p_dest_po_line_id',p_dest_po_line_id);
2564: PO_DEBUG.debug_var(l_log_head,l_progress,'p_mode',p_mode);
2565: END IF;
2566:

Line 2563: PO_DEBUG.debug_var(l_log_head,l_progress,'p_dest_po_line_id',p_dest_po_line_id);

2559: IF g_debug_stmt THEN
2560: PO_DEBUG.debug_begin(l_log_head);
2561: PO_DEBUG.debug_var(l_log_head,l_progress,'p_src_po_line_id',p_src_po_line_id);
2562: PO_DEBUG.debug_var(l_log_head,l_progress,'p_dest_po_header_id',p_dest_po_header_id);
2563: PO_DEBUG.debug_var(l_log_head,l_progress,'p_dest_po_line_id',p_dest_po_line_id);
2564: PO_DEBUG.debug_var(l_log_head,l_progress,'p_mode',p_mode);
2565: END IF;
2566:
2567: IF (p_mode = G_COPY_MANUAL_MOD) THEN

Line 2564: PO_DEBUG.debug_var(l_log_head,l_progress,'p_mode',p_mode);

2560: PO_DEBUG.debug_begin(l_log_head);
2561: PO_DEBUG.debug_var(l_log_head,l_progress,'p_src_po_line_id',p_src_po_line_id);
2562: PO_DEBUG.debug_var(l_log_head,l_progress,'p_dest_po_header_id',p_dest_po_header_id);
2563: PO_DEBUG.debug_var(l_log_head,l_progress,'p_dest_po_line_id',p_dest_po_line_id);
2564: PO_DEBUG.debug_var(l_log_head,l_progress,'p_mode',p_mode);
2565: END IF;
2566:
2567: IF (p_mode = G_COPY_MANUAL_MOD) THEN
2568: l_auto_manual_flag := 'N';

Line 2598: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Incomplete parameters');

2594: --Check if the required parameters are passed
2595: IF (p_src_po_line_id IS NULL
2596: OR p_dest_po_header_id IS NULL OR p_dest_po_line_id IS NULL) THEN
2597: IF g_debug_stmt THEN
2598: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Incomplete parameters');
2599: END IF;
2600:
2601: l_return_status_text := 'Incomplete parameters - '||
2602: 'p_src_po_line_id: '||p_src_po_line_id||', '||

Line 2610: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Check if adjustments already exist for the destination line id');

2606: END IF;
2607:
2608: l_progress := '040';
2609: IF g_debug_stmt THEN
2610: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Check if adjustments already exist for the destination line id');
2611: END IF;
2612:
2613: --Check if adjsutments already exist for the destination line id
2614: SELECT COUNT(1)

Line 2625: PO_DEBUG.debug_stmt(l_log_head,l_progress,l_return_status_text);

2621:
2622: IF (l_adjustments_exist > 0) THEN
2623: l_return_status_text := 'Adjustments already exist for the destination Header Id: '||p_dest_po_header_id||' and Line Id: '||p_dest_po_line_id;
2624: IF g_debug_stmt THEN
2625: PO_DEBUG.debug_stmt(l_log_head,l_progress,l_return_status_text);
2626: END IF;
2627: RAISE COPYDOC_ADJUSTMENT_FAILURE;
2628: END IF;
2629:

Line 2632: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Get the current src record status');

2628: END IF;
2629:
2630: l_progress := '050';
2631: IF g_debug_stmt THEN
2632: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Get the current src record status');
2633: END IF;
2634:
2635: SELECT COUNT(1)
2636: INTO l_src_adj_count

Line 2654: PO_DEBUG.debug_var(l_log_head,l_progress,'l_src_adj_count',l_src_adj_count);

2650: AND (l_override_allowed_flag IS NULL OR ADJ.update_allowed = l_override_allowed_flag)
2651: AND (l_overridden_flag IS NULL OR ADJ.updated_flag = l_overridden_flag);
2652:
2653: IF g_debug_stmt THEN
2654: PO_DEBUG.debug_var(l_log_head,l_progress,'l_src_adj_count',l_src_adj_count);
2655: --PO_DEBUG.debug_var(l_log_head,l_progress,'l_src_asoc_count',l_src_asoc_count);
2656: PO_DEBUG.debug_var(l_log_head,l_progress,'l_src_attr_count',l_src_attr_count);
2657: END IF;
2658:

Line 2655: --PO_DEBUG.debug_var(l_log_head,l_progress,'l_src_asoc_count',l_src_asoc_count);

2651: AND (l_overridden_flag IS NULL OR ADJ.updated_flag = l_overridden_flag);
2652:
2653: IF g_debug_stmt THEN
2654: PO_DEBUG.debug_var(l_log_head,l_progress,'l_src_adj_count',l_src_adj_count);
2655: --PO_DEBUG.debug_var(l_log_head,l_progress,'l_src_asoc_count',l_src_asoc_count);
2656: PO_DEBUG.debug_var(l_log_head,l_progress,'l_src_attr_count',l_src_attr_count);
2657: END IF;
2658:
2659: l_progress := '070';

Line 2656: PO_DEBUG.debug_var(l_log_head,l_progress,'l_src_attr_count',l_src_attr_count);

2652:
2653: IF g_debug_stmt THEN
2654: PO_DEBUG.debug_var(l_log_head,l_progress,'l_src_adj_count',l_src_adj_count);
2655: --PO_DEBUG.debug_var(l_log_head,l_progress,'l_src_asoc_count',l_src_asoc_count);
2656: PO_DEBUG.debug_var(l_log_head,l_progress,'l_src_attr_count',l_src_attr_count);
2657: END IF;
2658:
2659: l_progress := '070';
2660: IF g_debug_stmt THEN

Line 2661: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Loop through and Copy Adjustments');

2657: END IF;
2658:
2659: l_progress := '070';
2660: IF g_debug_stmt THEN
2661: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Loop through and Copy Adjustments');
2662: END IF;
2663:
2664: i := 0;
2665: OPEN po_price_adjustments_cur( p_src_po_line_id

Line 2697: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Call insert adjustment record');

2693: l_po_price_adjustment_record.request_id := NULL;
2694:
2695: l_progress := '080';
2696: IF g_debug_stmt THEN
2697: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Call insert adjustment record');
2698: END IF;
2699:
2700: insert_adj_rec(l_po_price_adjustment_record);
2701:

Line 2706: PO_DEBUG.debug_stmt(l_log_head,l_progress,l_return_status_text);

2702: l_dml_count := SQL%ROWCOUNT;
2703: IF (l_dml_count = 0) THEN
2704: l_return_status_text := 'Insert adjustment record failed';
2705: IF g_debug_stmt THEN
2706: PO_DEBUG.debug_stmt(l_log_head,l_progress,l_return_status_text);
2707: END IF;
2708: RAISE COPYDOC_ADJUSTMENT_FAILURE;
2709: END IF;
2710: l_dest_adj_count := l_dest_adj_count + l_dml_count;

Line 2714: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Insert attributes corresponding to the adjustment');

2710: l_dest_adj_count := l_dest_adj_count + l_dml_count;
2711:
2712: l_progress := '090';
2713: IF g_debug_stmt THEN
2714: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Insert attributes corresponding to the adjustment');
2715: END IF;
2716:
2717: --copy attribute lines for the adjustment
2718: INSERT INTO PO_PRICE_ADJ_ATTRIBS

Line 2770: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Update parent adjustment ids');

2766: CLOSE po_price_adjustments_cur;
2767:
2768: l_progress := '100';
2769: IF g_debug_stmt THEN
2770: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Update parent adjustment ids');
2771: END IF;
2772:
2773: FORALL i IN l_src_price_adjustment_id_tbl.FIRST .. l_src_price_adjustment_id_tbl.LAST
2774: UPDATE PO_PRICE_ADJUSTMENTS

Line 2783: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Check if the entire price structure is copied');

2779: AND parent_adjustment_id IS NOT NULL; --Only child lines are considered
2780:
2781: l_progress := '120';
2782: IF g_debug_stmt THEN
2783: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Check if the entire price structure is copied');
2784: END IF;
2785:
2786: IF (l_src_adj_count <> l_dest_adj_count OR l_src_attr_count <> l_dest_attr_count) THEN --OR l_src_asoc_count <> l_dest_asoc_count
2787: IF g_debug_stmt THEN

Line 2788: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Copy Line Adjustment failed with incomplete price structure');

2784: END IF;
2785:
2786: IF (l_src_adj_count <> l_dest_adj_count OR l_src_attr_count <> l_dest_attr_count) THEN --OR l_src_asoc_count <> l_dest_asoc_count
2787: IF g_debug_stmt THEN
2788: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Copy Line Adjustment failed with incomplete price structure');
2789: PO_DEBUG.debug_stmt(l_log_head,l_progress,' Source Adjustment Count: '||l_src_adj_count||', Destination Adjustment Count: '||l_dest_adj_count);
2790: --PO_DEBUG.debug_stmt(l_log_head,l_progress,' Source Association Count: '||l_src_asoc_count||', Destination Association Count: '||l_dest_asoc_count);
2791: PO_DEBUG.debug_stmt(l_log_head,l_progress,' Source Attribute Count: '||l_src_attr_count||', Destination Attribute Count: '||l_dest_attr_count);
2792: END IF;

Line 2789: PO_DEBUG.debug_stmt(l_log_head,l_progress,' Source Adjustment Count: '||l_src_adj_count||', Destination Adjustment Count: '||l_dest_adj_count);

2785:
2786: IF (l_src_adj_count <> l_dest_adj_count OR l_src_attr_count <> l_dest_attr_count) THEN --OR l_src_asoc_count <> l_dest_asoc_count
2787: IF g_debug_stmt THEN
2788: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Copy Line Adjustment failed with incomplete price structure');
2789: PO_DEBUG.debug_stmt(l_log_head,l_progress,' Source Adjustment Count: '||l_src_adj_count||', Destination Adjustment Count: '||l_dest_adj_count);
2790: --PO_DEBUG.debug_stmt(l_log_head,l_progress,' Source Association Count: '||l_src_asoc_count||', Destination Association Count: '||l_dest_asoc_count);
2791: PO_DEBUG.debug_stmt(l_log_head,l_progress,' Source Attribute Count: '||l_src_attr_count||', Destination Attribute Count: '||l_dest_attr_count);
2792: END IF;
2793: END IF;

Line 2790: --PO_DEBUG.debug_stmt(l_log_head,l_progress,' Source Association Count: '||l_src_asoc_count||', Destination Association Count: '||l_dest_asoc_count);

2786: IF (l_src_adj_count <> l_dest_adj_count OR l_src_attr_count <> l_dest_attr_count) THEN --OR l_src_asoc_count <> l_dest_asoc_count
2787: IF g_debug_stmt THEN
2788: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Copy Line Adjustment failed with incomplete price structure');
2789: PO_DEBUG.debug_stmt(l_log_head,l_progress,' Source Adjustment Count: '||l_src_adj_count||', Destination Adjustment Count: '||l_dest_adj_count);
2790: --PO_DEBUG.debug_stmt(l_log_head,l_progress,' Source Association Count: '||l_src_asoc_count||', Destination Association Count: '||l_dest_asoc_count);
2791: PO_DEBUG.debug_stmt(l_log_head,l_progress,' Source Attribute Count: '||l_src_attr_count||', Destination Attribute Count: '||l_dest_attr_count);
2792: END IF;
2793: END IF;
2794:

Line 2791: PO_DEBUG.debug_stmt(l_log_head,l_progress,' Source Attribute Count: '||l_src_attr_count||', Destination Attribute Count: '||l_dest_attr_count);

2787: IF g_debug_stmt THEN
2788: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Copy Line Adjustment failed with incomplete price structure');
2789: PO_DEBUG.debug_stmt(l_log_head,l_progress,' Source Adjustment Count: '||l_src_adj_count||', Destination Adjustment Count: '||l_dest_adj_count);
2790: --PO_DEBUG.debug_stmt(l_log_head,l_progress,' Source Association Count: '||l_src_asoc_count||', Destination Association Count: '||l_dest_asoc_count);
2791: PO_DEBUG.debug_stmt(l_log_head,l_progress,' Source Attribute Count: '||l_src_attr_count||', Destination Attribute Count: '||l_dest_attr_count);
2792: END IF;
2793: END IF;
2794:
2795: IF g_debug_stmt THEN

Line 2796: PO_DEBUG.debug_end(l_log_head);

2792: END IF;
2793: END IF;
2794:
2795: IF g_debug_stmt THEN
2796: PO_DEBUG.debug_end(l_log_head);
2797: PO_DEBUG.debug_var(l_log_head,l_progress,'x_return_status_text',x_return_status_text);
2798: PO_DEBUG.debug_var(l_log_head,l_progress,'x_return_status',x_return_status);
2799: END IF;
2800:

Line 2797: PO_DEBUG.debug_var(l_log_head,l_progress,'x_return_status_text',x_return_status_text);

2793: END IF;
2794:
2795: IF g_debug_stmt THEN
2796: PO_DEBUG.debug_end(l_log_head);
2797: PO_DEBUG.debug_var(l_log_head,l_progress,'x_return_status_text',x_return_status_text);
2798: PO_DEBUG.debug_var(l_log_head,l_progress,'x_return_status',x_return_status);
2799: END IF;
2800:
2801: EXCEPTION

Line 2798: PO_DEBUG.debug_var(l_log_head,l_progress,'x_return_status',x_return_status);

2794:
2795: IF g_debug_stmt THEN
2796: PO_DEBUG.debug_end(l_log_head);
2797: PO_DEBUG.debug_var(l_log_head,l_progress,'x_return_status_text',x_return_status_text);
2798: PO_DEBUG.debug_var(l_log_head,l_progress,'x_return_status',x_return_status);
2799: END IF;
2800:
2801: EXCEPTION
2802: WHEN COPYDOC_ADJUSTMENT_FAILURE THEN

Line 2807: PO_DEBUG.debug_stmt(l_log_head,l_progress,'EXITING COPY_LINE_ADJUSTMENTS with ERROR: '||l_return_status_text);

2803: x_return_status := FND_API.G_RET_STS_ERROR;
2804: x_return_status_text := l_return_status_text;
2805:
2806: IF g_debug_unexp THEN
2807: PO_DEBUG.debug_stmt(l_log_head,l_progress,'EXITING COPY_LINE_ADJUSTMENTS with ERROR: '||l_return_status_text);
2808: END IF;
2809: ROLLBACK TO SAVEPOINT COPY_LINE_ADJUSTMENTS;
2810: WHEN OTHERS THEN
2811: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 2815: PO_DEBUG.debug_stmt(l_log_head,l_progress, x_return_status_text);

2811: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
2812: x_return_status_text := 'UnExpected ERROR IN COPY_LINE_ADJUSTMENTS. SQLERRM at '||l_progress||': '||SQLERRM;
2813:
2814: IF g_debug_unexp THEN
2815: PO_DEBUG.debug_stmt(l_log_head,l_progress, x_return_status_text);
2816: END IF;
2817: ROLLBACK TO SAVEPOINT COPY_LINE_ADJUSTMENTS;
2818: END copy_line_adjustments;
2819:

Line 2878: PO_DEBUG.debug_begin(l_log_head);

2874: x_return_status := FND_API.G_RET_STS_SUCCESS;
2875: l_progress := '010';
2876:
2877: IF g_debug_stmt THEN
2878: PO_DEBUG.debug_begin(l_log_head);
2879: PO_DEBUG.debug_var(l_log_head,l_progress,'p_draft_id',p_draft_id);
2880: PO_DEBUG.debug_var(l_log_head,l_progress,'p_src_po_line_id',p_src_po_line_id);
2881: PO_DEBUG.debug_var(l_log_head,l_progress,'p_dest_po_header_id',p_dest_po_header_id);
2882: PO_DEBUG.debug_var(l_log_head,l_progress,'p_dest_po_line_id',p_dest_po_line_id);

Line 2879: PO_DEBUG.debug_var(l_log_head,l_progress,'p_draft_id',p_draft_id);

2875: l_progress := '010';
2876:
2877: IF g_debug_stmt THEN
2878: PO_DEBUG.debug_begin(l_log_head);
2879: PO_DEBUG.debug_var(l_log_head,l_progress,'p_draft_id',p_draft_id);
2880: PO_DEBUG.debug_var(l_log_head,l_progress,'p_src_po_line_id',p_src_po_line_id);
2881: PO_DEBUG.debug_var(l_log_head,l_progress,'p_dest_po_header_id',p_dest_po_header_id);
2882: PO_DEBUG.debug_var(l_log_head,l_progress,'p_dest_po_line_id',p_dest_po_line_id);
2883: PO_DEBUG.debug_var(l_log_head,l_progress,'p_mode',p_mode);

Line 2880: PO_DEBUG.debug_var(l_log_head,l_progress,'p_src_po_line_id',p_src_po_line_id);

2876:
2877: IF g_debug_stmt THEN
2878: PO_DEBUG.debug_begin(l_log_head);
2879: PO_DEBUG.debug_var(l_log_head,l_progress,'p_draft_id',p_draft_id);
2880: PO_DEBUG.debug_var(l_log_head,l_progress,'p_src_po_line_id',p_src_po_line_id);
2881: PO_DEBUG.debug_var(l_log_head,l_progress,'p_dest_po_header_id',p_dest_po_header_id);
2882: PO_DEBUG.debug_var(l_log_head,l_progress,'p_dest_po_line_id',p_dest_po_line_id);
2883: PO_DEBUG.debug_var(l_log_head,l_progress,'p_mode',p_mode);
2884: END IF;

Line 2881: PO_DEBUG.debug_var(l_log_head,l_progress,'p_dest_po_header_id',p_dest_po_header_id);

2877: IF g_debug_stmt THEN
2878: PO_DEBUG.debug_begin(l_log_head);
2879: PO_DEBUG.debug_var(l_log_head,l_progress,'p_draft_id',p_draft_id);
2880: PO_DEBUG.debug_var(l_log_head,l_progress,'p_src_po_line_id',p_src_po_line_id);
2881: PO_DEBUG.debug_var(l_log_head,l_progress,'p_dest_po_header_id',p_dest_po_header_id);
2882: PO_DEBUG.debug_var(l_log_head,l_progress,'p_dest_po_line_id',p_dest_po_line_id);
2883: PO_DEBUG.debug_var(l_log_head,l_progress,'p_mode',p_mode);
2884: END IF;
2885:

Line 2882: PO_DEBUG.debug_var(l_log_head,l_progress,'p_dest_po_line_id',p_dest_po_line_id);

2878: PO_DEBUG.debug_begin(l_log_head);
2879: PO_DEBUG.debug_var(l_log_head,l_progress,'p_draft_id',p_draft_id);
2880: PO_DEBUG.debug_var(l_log_head,l_progress,'p_src_po_line_id',p_src_po_line_id);
2881: PO_DEBUG.debug_var(l_log_head,l_progress,'p_dest_po_header_id',p_dest_po_header_id);
2882: PO_DEBUG.debug_var(l_log_head,l_progress,'p_dest_po_line_id',p_dest_po_line_id);
2883: PO_DEBUG.debug_var(l_log_head,l_progress,'p_mode',p_mode);
2884: END IF;
2885:
2886: /*

Line 2883: PO_DEBUG.debug_var(l_log_head,l_progress,'p_mode',p_mode);

2879: PO_DEBUG.debug_var(l_log_head,l_progress,'p_draft_id',p_draft_id);
2880: PO_DEBUG.debug_var(l_log_head,l_progress,'p_src_po_line_id',p_src_po_line_id);
2881: PO_DEBUG.debug_var(l_log_head,l_progress,'p_dest_po_header_id',p_dest_po_header_id);
2882: PO_DEBUG.debug_var(l_log_head,l_progress,'p_dest_po_line_id',p_dest_po_line_id);
2883: PO_DEBUG.debug_var(l_log_head,l_progress,'p_mode',p_mode);
2884: END IF;
2885:
2886: /*
2887: IF (p_mode <> G_COPY_ALL_MOD) THEN

Line 2890: PO_DEBUG.debug_stmt(l_log_head,l_progress,l_return_status_text);

2886: /*
2887: IF (p_mode <> G_COPY_ALL_MOD) THEN
2888: l_return_status_text := 'The only mode supported for now is COPY ALL ADJUSTMENTS';
2889: IF g_debug_stmt THEN
2890: PO_DEBUG.debug_stmt(l_log_head,l_progress,l_return_status_text);
2891: END IF;
2892: RAISE COPYDOC_ADJUSTMENT_FAILURE;
2893: END IF;
2894: */

Line 2926: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Incomplete parameters');

2922: --Check if the required parameters are passed
2923: IF (p_draft_id IS NULL OR p_src_po_line_id IS NULL
2924: OR p_dest_po_header_id IS NULL OR p_dest_po_line_id IS NULL) THEN
2925: IF g_debug_stmt THEN
2926: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Incomplete parameters');
2927: END IF;
2928:
2929: l_return_status_text := 'Incomplete parameters - '||
2930: 'p_draft_id: '||p_draft_id||', '||

Line 2939: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Check if adjustments already exist for the destination line id');

2935: END IF;
2936:
2937: l_progress := '040';
2938: IF g_debug_stmt THEN
2939: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Check if adjustments already exist for the destination line id');
2940: END IF;
2941:
2942: --Check if adjsutments already exist for the destination line id
2943: SELECT COUNT(1)

Line 2955: PO_DEBUG.debug_stmt(l_log_head,l_progress,l_return_status_text);

2951:
2952: IF (l_adjustments_exist > 0) THEN
2953: l_return_status_text := 'Adjustments already exist for the Draft Id: '||p_draft_id||', Destination Header Id: '||p_dest_po_header_id||' and Line Id: '||p_dest_po_line_id;
2954: IF g_debug_stmt THEN
2955: PO_DEBUG.debug_stmt(l_log_head,l_progress,l_return_status_text);
2956: END IF;
2957: RAISE COPYDOC_ADJUSTMENT_FAILURE;
2958: END IF;
2959:

Line 2962: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Get the current src record status');

2958: END IF;
2959:
2960: l_progress := '050';
2961: IF g_debug_stmt THEN
2962: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Get the current src record status');
2963: END IF;
2964:
2965: SELECT COUNT(1)
2966: INTO l_src_adj_count

Line 2997: PO_DEBUG.debug_var(l_log_head,l_progress,'l_src_adj_count',l_src_adj_count);

2993: AND (l_override_allowed_flag IS NULL OR ATTRV.update_allowed = l_override_allowed_flag)
2994: AND (l_overridden_flag IS NULL OR ATTRV.updated_flag = l_overridden_flag);
2995:
2996: IF g_debug_stmt THEN
2997: PO_DEBUG.debug_var(l_log_head,l_progress,'l_src_adj_count',l_src_adj_count);
2998: --PO_DEBUG.debug_var(l_log_head,l_progress,'l_src_asoc_count',l_src_asoc_count);
2999: PO_DEBUG.debug_var(l_log_head,l_progress,'l_src_attr_count',l_src_attr_count);
3000: END IF;
3001:

Line 2998: --PO_DEBUG.debug_var(l_log_head,l_progress,'l_src_asoc_count',l_src_asoc_count);

2994: AND (l_overridden_flag IS NULL OR ATTRV.updated_flag = l_overridden_flag);
2995:
2996: IF g_debug_stmt THEN
2997: PO_DEBUG.debug_var(l_log_head,l_progress,'l_src_adj_count',l_src_adj_count);
2998: --PO_DEBUG.debug_var(l_log_head,l_progress,'l_src_asoc_count',l_src_asoc_count);
2999: PO_DEBUG.debug_var(l_log_head,l_progress,'l_src_attr_count',l_src_attr_count);
3000: END IF;
3001:
3002: /*

Line 2999: PO_DEBUG.debug_var(l_log_head,l_progress,'l_src_attr_count',l_src_attr_count);

2995:
2996: IF g_debug_stmt THEN
2997: PO_DEBUG.debug_var(l_log_head,l_progress,'l_src_adj_count',l_src_adj_count);
2998: --PO_DEBUG.debug_var(l_log_head,l_progress,'l_src_asoc_count',l_src_asoc_count);
2999: PO_DEBUG.debug_var(l_log_head,l_progress,'l_src_attr_count',l_src_attr_count);
3000: END IF;
3001:
3002: /*
3003: l_progress := '060';

Line 3005: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Copy Draft ssociation records first');

3001:
3002: /*
3003: l_progress := '060';
3004: IF g_debug_stmt THEN
3005: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Copy Draft ssociation records first');
3006: END IF;
3007:
3008: --Copy Association records with p_src_po_line_id
3009: INSERT INTO PO_PRICE_ADJ_ASSOCS_DRAFT

Line 3056: PO_DEBUG.debug_stmt(l_log_head,l_progress,l_return_status_text);

3052: l_dest_asoc_count := SQL%ROWCOUNT;
3053: IF (l_src_asoc_count <> l_dest_asoc_count) THEN
3054: l_return_status_text := 'Copy association record failed';
3055: IF g_debug_stmt THEN
3056: PO_DEBUG.debug_stmt(l_log_head,l_progress,l_return_status_text);
3057: END IF;
3058: RAISE COPYDOC_ADJUSTMENT_FAILURE;
3059: END IF;
3060: */

Line 3064: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Loop through and Copy Adjustments');

3060: */
3061:
3062: l_progress := '070';
3063: IF g_debug_stmt THEN
3064: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Loop through and Copy Adjustments');
3065: END IF;
3066: i := 0;
3067: OPEN po_price_adjustments_cur( p_src_po_line_id
3068: , l_auto_manual_flag

Line 3101: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Call insert adjustment record');

3097:
3098:
3099: l_progress := '080';
3100: IF g_debug_stmt THEN
3101: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Call insert adjustment record');
3102: END IF;
3103:
3104: insert_draft_adj_rec(p_draft_id, l_po_price_adjustment_record);
3105:

Line 3110: PO_DEBUG.debug_stmt(l_log_head,l_progress,l_return_status_text);

3106: l_dml_count := SQL%ROWCOUNT;
3107: IF (l_dml_count = 0) THEN
3108: l_return_status_text := 'Insert adjustment record failed';
3109: IF g_debug_stmt THEN
3110: PO_DEBUG.debug_stmt(l_log_head,l_progress,l_return_status_text);
3111: END IF;
3112: RAISE COPYDOC_ADJUSTMENT_FAILURE;
3113: END IF;
3114: l_dest_adj_count := l_dest_adj_count + l_dml_count;

Line 3118: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Insert attributes corresponding to the adjustment');

3114: l_dest_adj_count := l_dest_adj_count + l_dml_count;
3115:
3116: l_progress := '090';
3117: IF g_debug_stmt THEN
3118: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Insert attributes corresponding to the adjustment');
3119: END IF;
3120:
3121: --copy attribute lines for the adjustment
3122: INSERT INTO PO_PRICE_ADJ_ATTRIBS_DRAFT

Line 3176: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Update parent adjustment ids');

3172: CLOSE po_price_adjustments_cur;
3173:
3174: l_progress := '100';
3175: IF g_debug_stmt THEN
3176: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Update parent adjustment ids');
3177: END IF;
3178:
3179: FORALL i IN l_src_price_adjustment_id_tbl.FIRST .. l_src_price_adjustment_id_tbl.LAST
3180: UPDATE PO_PRICE_ADJUSTMENTS_DRAFT

Line 3190: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Check if the entire price structure is copied');

3186: AND parent_adjustment_id IS NOT NULL; --Only child lines are considered
3187:
3188: l_progress := '120';
3189: IF g_debug_stmt THEN
3190: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Check if the entire price structure is copied');
3191: END IF;
3192:
3193: IF (l_src_adj_count <> l_dest_adj_count OR l_src_attr_count <> l_dest_attr_count) THEN --OR l_src_asoc_count <> l_dest_asoc_count
3194: IF g_debug_stmt THEN

Line 3195: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Copy Draft Line Adjustment failed with incomplete price structure');

3191: END IF;
3192:
3193: IF (l_src_adj_count <> l_dest_adj_count OR l_src_attr_count <> l_dest_attr_count) THEN --OR l_src_asoc_count <> l_dest_asoc_count
3194: IF g_debug_stmt THEN
3195: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Copy Draft Line Adjustment failed with incomplete price structure');
3196: PO_DEBUG.debug_stmt(l_log_head,l_progress,' Source Adjustment Count: '||l_src_adj_count||', Destination Adjustment Count: '||l_dest_adj_count);
3197: --PO_DEBUG.debug_stmt(l_log_head,l_progress,' Source Association Count: '||l_src_asoc_count||', Destination Association Count: '||l_dest_asoc_count);
3198: PO_DEBUG.debug_stmt(l_log_head,l_progress,' Source Attribute Count: '||l_src_attr_count||', Destination Attribute Count: '||l_dest_attr_count);
3199: END IF;

Line 3196: PO_DEBUG.debug_stmt(l_log_head,l_progress,' Source Adjustment Count: '||l_src_adj_count||', Destination Adjustment Count: '||l_dest_adj_count);

3192:
3193: IF (l_src_adj_count <> l_dest_adj_count OR l_src_attr_count <> l_dest_attr_count) THEN --OR l_src_asoc_count <> l_dest_asoc_count
3194: IF g_debug_stmt THEN
3195: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Copy Draft Line Adjustment failed with incomplete price structure');
3196: PO_DEBUG.debug_stmt(l_log_head,l_progress,' Source Adjustment Count: '||l_src_adj_count||', Destination Adjustment Count: '||l_dest_adj_count);
3197: --PO_DEBUG.debug_stmt(l_log_head,l_progress,' Source Association Count: '||l_src_asoc_count||', Destination Association Count: '||l_dest_asoc_count);
3198: PO_DEBUG.debug_stmt(l_log_head,l_progress,' Source Attribute Count: '||l_src_attr_count||', Destination Attribute Count: '||l_dest_attr_count);
3199: END IF;
3200: END IF;

Line 3197: --PO_DEBUG.debug_stmt(l_log_head,l_progress,' Source Association Count: '||l_src_asoc_count||', Destination Association Count: '||l_dest_asoc_count);

3193: IF (l_src_adj_count <> l_dest_adj_count OR l_src_attr_count <> l_dest_attr_count) THEN --OR l_src_asoc_count <> l_dest_asoc_count
3194: IF g_debug_stmt THEN
3195: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Copy Draft Line Adjustment failed with incomplete price structure');
3196: PO_DEBUG.debug_stmt(l_log_head,l_progress,' Source Adjustment Count: '||l_src_adj_count||', Destination Adjustment Count: '||l_dest_adj_count);
3197: --PO_DEBUG.debug_stmt(l_log_head,l_progress,' Source Association Count: '||l_src_asoc_count||', Destination Association Count: '||l_dest_asoc_count);
3198: PO_DEBUG.debug_stmt(l_log_head,l_progress,' Source Attribute Count: '||l_src_attr_count||', Destination Attribute Count: '||l_dest_attr_count);
3199: END IF;
3200: END IF;
3201:

Line 3198: PO_DEBUG.debug_stmt(l_log_head,l_progress,' Source Attribute Count: '||l_src_attr_count||', Destination Attribute Count: '||l_dest_attr_count);

3194: IF g_debug_stmt THEN
3195: PO_DEBUG.debug_stmt(l_log_head,l_progress,'Copy Draft Line Adjustment failed with incomplete price structure');
3196: PO_DEBUG.debug_stmt(l_log_head,l_progress,' Source Adjustment Count: '||l_src_adj_count||', Destination Adjustment Count: '||l_dest_adj_count);
3197: --PO_DEBUG.debug_stmt(l_log_head,l_progress,' Source Association Count: '||l_src_asoc_count||', Destination Association Count: '||l_dest_asoc_count);
3198: PO_DEBUG.debug_stmt(l_log_head,l_progress,' Source Attribute Count: '||l_src_attr_count||', Destination Attribute Count: '||l_dest_attr_count);
3199: END IF;
3200: END IF;
3201:
3202: IF g_debug_stmt THEN

Line 3203: PO_DEBUG.debug_end(l_log_head);

3199: END IF;
3200: END IF;
3201:
3202: IF g_debug_stmt THEN
3203: PO_DEBUG.debug_end(l_log_head);
3204: PO_DEBUG.debug_var(l_log_head,l_progress,'x_return_status_text',x_return_status_text);
3205: PO_DEBUG.debug_var(l_log_head,l_progress,'x_return_status',x_return_status);
3206: END IF;
3207:

Line 3204: PO_DEBUG.debug_var(l_log_head,l_progress,'x_return_status_text',x_return_status_text);

3200: END IF;
3201:
3202: IF g_debug_stmt THEN
3203: PO_DEBUG.debug_end(l_log_head);
3204: PO_DEBUG.debug_var(l_log_head,l_progress,'x_return_status_text',x_return_status_text);
3205: PO_DEBUG.debug_var(l_log_head,l_progress,'x_return_status',x_return_status);
3206: END IF;
3207:
3208: EXCEPTION

Line 3205: PO_DEBUG.debug_var(l_log_head,l_progress,'x_return_status',x_return_status);

3201:
3202: IF g_debug_stmt THEN
3203: PO_DEBUG.debug_end(l_log_head);
3204: PO_DEBUG.debug_var(l_log_head,l_progress,'x_return_status_text',x_return_status_text);
3205: PO_DEBUG.debug_var(l_log_head,l_progress,'x_return_status',x_return_status);
3206: END IF;
3207:
3208: EXCEPTION
3209: WHEN COPYDOC_ADJUSTMENT_FAILURE THEN

Line 3214: PO_DEBUG.debug_stmt(l_log_head,l_progress,'EXITING COPY_DRAFT_LINE_ADJUSTMENTS with ERROR: '||l_return_status_text);

3210: x_return_status := FND_API.G_RET_STS_ERROR;
3211: x_return_status_text := l_return_status_text;
3212:
3213: IF g_debug_unexp THEN
3214: PO_DEBUG.debug_stmt(l_log_head,l_progress,'EXITING COPY_DRAFT_LINE_ADJUSTMENTS with ERROR: '||l_return_status_text);
3215: END IF;
3216: ROLLBACK TO SAVEPOINT COPY_DRAFT_LINE_ADJUSTMENTS;
3217: WHEN OTHERS THEN
3218: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;

Line 3222: PO_DEBUG.debug_stmt(l_log_head,l_progress, x_return_status_text);

3218: x_return_status := FND_API.G_RET_STS_UNEXP_ERROR;
3219: x_return_status_text := 'UnExpected ERROR IN COPY_DRAFT_LINE_ADJUSTMENTS. SQLERRM at '||l_progress||': '||SQLERRM;
3220:
3221: IF g_debug_unexp THEN
3222: PO_DEBUG.debug_stmt(l_log_head,l_progress, x_return_status_text);
3223: END IF;
3224: ROLLBACK TO SAVEPOINT COPY_DRAFT_LINE_ADJUSTMENTS;
3225: END copy_draft_line_adjustments;
3226: