1350: x_warning_flag OUT NOCOPY VARCHAR2 ) IS
1351:
1352: -- CONSTANTS --
1353: -- API constants
1354: lc_debug_level CONSTANT NUMBER := FND_LOG.G_CURRENT_RUNTIME_LEVEL;
1355: lc_stat_level CONSTANT NUMBER := FND_LOG.LEVEL_STATEMENT;
1356: lc_proc_level CONSTANT NUMBER := FND_LOG.LEVEL_PROCEDURE;
1357: lc_event_level CONSTANT NUMBER := FND_LOG.LEVEL_EVENT;
1358: lc_excep_level CONSTANT NUMBER := FND_LOG.LEVEL_EXCEPTION;
1351:
1352: -- CONSTANTS --
1353: -- API constants
1354: lc_debug_level CONSTANT NUMBER := FND_LOG.G_CURRENT_RUNTIME_LEVEL;
1355: lc_stat_level CONSTANT NUMBER := FND_LOG.LEVEL_STATEMENT;
1356: lc_proc_level CONSTANT NUMBER := FND_LOG.LEVEL_PROCEDURE;
1357: lc_event_level CONSTANT NUMBER := FND_LOG.LEVEL_EVENT;
1358: lc_excep_level CONSTANT NUMBER := FND_LOG.LEVEL_EXCEPTION;
1359: lc_error_level CONSTANT NUMBER := FND_LOG.LEVEL_ERROR;
1352: -- CONSTANTS --
1353: -- API constants
1354: lc_debug_level CONSTANT NUMBER := FND_LOG.G_CURRENT_RUNTIME_LEVEL;
1355: lc_stat_level CONSTANT NUMBER := FND_LOG.LEVEL_STATEMENT;
1356: lc_proc_level CONSTANT NUMBER := FND_LOG.LEVEL_PROCEDURE;
1357: lc_event_level CONSTANT NUMBER := FND_LOG.LEVEL_EVENT;
1358: lc_excep_level CONSTANT NUMBER := FND_LOG.LEVEL_EXCEPTION;
1359: lc_error_level CONSTANT NUMBER := FND_LOG.LEVEL_ERROR;
1360: lc_unexp_level CONSTANT NUMBER := FND_LOG.LEVEL_UNEXPECTED;
1353: -- API constants
1354: lc_debug_level CONSTANT NUMBER := FND_LOG.G_CURRENT_RUNTIME_LEVEL;
1355: lc_stat_level CONSTANT NUMBER := FND_LOG.LEVEL_STATEMENT;
1356: lc_proc_level CONSTANT NUMBER := FND_LOG.LEVEL_PROCEDURE;
1357: lc_event_level CONSTANT NUMBER := FND_LOG.LEVEL_EVENT;
1358: lc_excep_level CONSTANT NUMBER := FND_LOG.LEVEL_EXCEPTION;
1359: lc_error_level CONSTANT NUMBER := FND_LOG.LEVEL_ERROR;
1360: lc_unexp_level CONSTANT NUMBER := FND_LOG.LEVEL_UNEXPECTED;
1361: lc_mod_name CONSTANT VARCHAR2(100) := 'csd.plsql.csd_charge_line_util.convert_to_charge_lines';
1354: lc_debug_level CONSTANT NUMBER := FND_LOG.G_CURRENT_RUNTIME_LEVEL;
1355: lc_stat_level CONSTANT NUMBER := FND_LOG.LEVEL_STATEMENT;
1356: lc_proc_level CONSTANT NUMBER := FND_LOG.LEVEL_PROCEDURE;
1357: lc_event_level CONSTANT NUMBER := FND_LOG.LEVEL_EVENT;
1358: lc_excep_level CONSTANT NUMBER := FND_LOG.LEVEL_EXCEPTION;
1359: lc_error_level CONSTANT NUMBER := FND_LOG.LEVEL_ERROR;
1360: lc_unexp_level CONSTANT NUMBER := FND_LOG.LEVEL_UNEXPECTED;
1361: lc_mod_name CONSTANT VARCHAR2(100) := 'csd.plsql.csd_charge_line_util.convert_to_charge_lines';
1362: lc_api_name CONSTANT VARCHAR2(30) := 'CONVERT_TO_CHARGE_LINES';
1355: lc_stat_level CONSTANT NUMBER := FND_LOG.LEVEL_STATEMENT;
1356: lc_proc_level CONSTANT NUMBER := FND_LOG.LEVEL_PROCEDURE;
1357: lc_event_level CONSTANT NUMBER := FND_LOG.LEVEL_EVENT;
1358: lc_excep_level CONSTANT NUMBER := FND_LOG.LEVEL_EXCEPTION;
1359: lc_error_level CONSTANT NUMBER := FND_LOG.LEVEL_ERROR;
1360: lc_unexp_level CONSTANT NUMBER := FND_LOG.LEVEL_UNEXPECTED;
1361: lc_mod_name CONSTANT VARCHAR2(100) := 'csd.plsql.csd_charge_line_util.convert_to_charge_lines';
1362: lc_api_name CONSTANT VARCHAR2(30) := 'CONVERT_TO_CHARGE_LINES';
1363: lc_api_version CONSTANT NUMBER := 1.0;
1356: lc_proc_level CONSTANT NUMBER := FND_LOG.LEVEL_PROCEDURE;
1357: lc_event_level CONSTANT NUMBER := FND_LOG.LEVEL_EVENT;
1358: lc_excep_level CONSTANT NUMBER := FND_LOG.LEVEL_EXCEPTION;
1359: lc_error_level CONSTANT NUMBER := FND_LOG.LEVEL_ERROR;
1360: lc_unexp_level CONSTANT NUMBER := FND_LOG.LEVEL_UNEXPECTED;
1361: lc_mod_name CONSTANT VARCHAR2(100) := 'csd.plsql.csd_charge_line_util.convert_to_charge_lines';
1362: lc_api_name CONSTANT VARCHAR2(30) := 'CONVERT_TO_CHARGE_LINES';
1363: lc_api_version CONSTANT NUMBER := 1.0;
1364:
1456: END IF;
1457:
1458: -- logging
1459: if (lc_proc_level >= lc_debug_level) then
1460: FND_LOG.STRING(lc_proc_level, lc_mod_name || '.BEGIN',
1461: 'Entering CSD_CHARGE_LINE_UTIL.convert_to_charge_lines');
1462: end if;
1463:
1464: -- log parameters
1462: end if;
1463:
1464: -- log parameters
1465: if (lc_stat_level >= lc_debug_level) then
1466: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1467: 'p_api_version: ' || p_api_version);
1468: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1469: 'p_commit: ' || p_commit);
1470: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1464: -- log parameters
1465: if (lc_stat_level >= lc_debug_level) then
1466: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1467: 'p_api_version: ' || p_api_version);
1468: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1469: 'p_commit: ' || p_commit);
1470: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1471: 'p_init_msg_list: ' || p_init_msg_list);
1472: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1466: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1467: 'p_api_version: ' || p_api_version);
1468: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1469: 'p_commit: ' || p_commit);
1470: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1471: 'p_init_msg_list: ' || p_init_msg_list);
1472: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1473: 'p_validation_level: ' || p_validation_level);
1474: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1468: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1469: 'p_commit: ' || p_commit);
1470: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1471: 'p_init_msg_list: ' || p_init_msg_list);
1472: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1473: 'p_validation_level: ' || p_validation_level);
1474: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1475: 'p_est_act_module_code: ' || p_est_act_module_code);
1476: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1470: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1471: 'p_init_msg_list: ' || p_init_msg_list);
1472: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1473: 'p_validation_level: ' || p_validation_level);
1474: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1475: 'p_est_act_module_code: ' || p_est_act_module_code);
1476: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1477: 'p_est_act_msg_entity: ' || p_est_act_msg_entity);
1478: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1472: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1473: 'p_validation_level: ' || p_validation_level);
1474: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1475: 'p_est_act_module_code: ' || p_est_act_module_code);
1476: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1477: 'p_est_act_msg_entity: ' || p_est_act_msg_entity);
1478: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1479: 'p_charge_line_type: ' || p_charge_line_type);
1480: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1474: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1475: 'p_est_act_module_code: ' || p_est_act_module_code);
1476: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1477: 'p_est_act_msg_entity: ' || p_est_act_msg_entity);
1478: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1479: 'p_charge_line_type: ' || p_charge_line_type);
1480: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1481: 'p_repair_line_id: ' || p_repair_line_id);
1482: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1476: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1477: 'p_est_act_msg_entity: ' || p_est_act_msg_entity);
1478: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1479: 'p_charge_line_type: ' || p_charge_line_type);
1480: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1481: 'p_repair_line_id: ' || p_repair_line_id);
1482: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1483: 'p_repair_actual_id: ' || p_repair_actual_id);
1484: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1478: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1479: 'p_charge_line_type: ' || p_charge_line_type);
1480: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1481: 'p_repair_line_id: ' || p_repair_line_id);
1482: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1483: 'p_repair_actual_id: ' || p_repair_actual_id);
1484: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1485: 'p_repair_type_id: ' || p_repair_type_id);
1486: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1480: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1481: 'p_repair_line_id: ' || p_repair_line_id);
1482: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1483: 'p_repair_actual_id: ' || p_repair_actual_id);
1484: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1485: 'p_repair_type_id: ' || p_repair_type_id);
1486: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1487: 'p_business_process_id: ' || p_business_process_id);
1488: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1482: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1483: 'p_repair_actual_id: ' || p_repair_actual_id);
1484: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1485: 'p_repair_type_id: ' || p_repair_type_id);
1486: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1487: 'p_business_process_id: ' || p_business_process_id);
1488: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1489: 'p_currency_code: ' || p_currency_code);
1490: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1484: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1485: 'p_repair_type_id: ' || p_repair_type_id);
1486: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1487: 'p_business_process_id: ' || p_business_process_id);
1488: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1489: 'p_currency_code: ' || p_currency_code);
1490: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1491: 'p_incident_id: ' || p_incident_id);
1492: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1486: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1487: 'p_business_process_id: ' || p_business_process_id);
1488: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1489: 'p_currency_code: ' || p_currency_code);
1490: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1491: 'p_incident_id: ' || p_incident_id);
1492: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1493: 'p_organization_id: ' || p_organization_id);
1494: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1488: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1489: 'p_currency_code: ' || p_currency_code);
1490: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1491: 'p_incident_id: ' || p_incident_id);
1492: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1493: 'p_organization_id: ' || p_organization_id);
1494: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1495: 'p_price_list_id: ' || p_price_list_id);
1496: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1490: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1491: 'p_incident_id: ' || p_incident_id);
1492: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1493: 'p_organization_id: ' || p_organization_id);
1494: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1495: 'p_price_list_id: ' || p_price_list_id);
1496: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1497: 'p_contract_line_id: ' || p_contract_line_id);
1498: end if;
1492: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1493: 'p_organization_id: ' || p_organization_id);
1494: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1495: 'p_price_list_id: ' || p_price_list_id);
1496: FND_LOG.STRING(lc_stat_level, lc_mod_name || '.parameter_logging',
1497: 'p_contract_line_id: ' || p_contract_line_id);
1498: end if;
1499:
1500: -- Initialize API return status to success
1508:
1509: -- Get the org id. It will be used later to derive
1510: -- line type id.
1511: if (lc_proc_level >= lc_debug_level) then
1512: FND_LOG.STRING(lc_proc_level, lc_mod_name,
1513: 'Calling CSD_PROCESS_UTIL.get_org_id with p_incident_id = ' || p_incident_id);
1514: end if;
1515:
1516: l_org_id := CSD_PROCESS_UTIL.get_org_id( p_incident_id );
1518: /* bug#3875036 */
1519: l_account_id := Get_SR_AccountId(p_repair_line_id);
1520:
1521: if (lc_proc_level >= lc_debug_level) then
1522: FND_LOG.STRING(lc_proc_level, lc_mod_name,
1523: 'Returned from CSD_PROCESS_UTIL.get_org_id.'
1524: || ' l_org_id = ' || l_org_id);
1525: end if;
1526:
1528: -- || l_org_id );
1529:
1530: IF ( l_org_id IS NULL ) THEN
1531: if (lc_proc_level >= lc_debug_level) then
1532: FND_LOG.STRING(lc_proc_level, lc_mod_name,
1533: 'Could not determine the operating unit for'
1534: || ' p_incident_id = ' || p_incident_id);
1535: end if;
1536: FND_MESSAGE.SET_NAME( 'CSD', 'CSD_CHRG_NO_OPER_UNIT');
1545: -- is applicable to all lines.
1546: IF ( p_contract_line_id IS NOT NULL
1547: AND p_business_process_id IS NOT NULL ) THEN
1548: if (lc_proc_level >= lc_debug_level) then
1549: FND_LOG.STRING(lc_proc_level, lc_mod_name,
1550: 'Calling CSD_CHARGE_LINE_UTIL.Get_CoverageInfo with '
1551: || 'p_contract_line_id = ' || p_contract_line_id
1552: || ' and p_business_process_id = ' || p_business_process_id);
1553: end if;
1562: x_coverage_id => l_coverage_id,
1563: x_coverage_txn_group_id => l_coverage_txn_group_id );
1564:
1565: if (lc_proc_level >= lc_debug_level) then
1566: FND_LOG.STRING(lc_proc_level, lc_mod_name,
1567: 'Returned from CSD_CHARGE_LINE_UTIL.Get_CoverageInfo with '
1568: || 'l_coverage_txn_group_id = ' || l_coverage_txn_group_id);
1569: end if;
1570:
1574: -- IF ( l_coverage_txn_group_id IS NULL
1575: -- OR x_return_status <> FND_API.G_RET_STS_SUCCESS ) THEN
1576: IF ( x_return_status <> FND_API.G_RET_STS_SUCCESS ) THEN
1577: if (lc_proc_level >= lc_debug_level) then
1578: FND_LOG.STRING(lc_proc_level, lc_mod_name,
1579: 'Coverage information could not be determined for the contract and business process.');
1580: end if;
1581: FND_MESSAGE.SET_NAME( 'CSD', 'CSD_CHRG_UTIL_NO_COVG');
1582: -- Coverage information could not be determined for the contract and business process.
1587:
1588: l_numRows := p_MLE_lines_tbl.COUNT;
1589:
1590: if (lc_stat_level >= lc_debug_level) then
1591: FND_LOG.STRING(lc_stat_level, lc_mod_name,
1592: 'Begin LOOP through p_MLE_lines_tbl table');
1593: end if;
1594:
1595: FOR i IN 1..l_numRows LOOP
1599: l_skip_curr_rec := FALSE;
1600: l_curr_inv_item := p_MLE_lines_tbl( i ).inventory_item_id;
1601:
1602: if (lc_stat_level >= lc_debug_level) then
1603: FND_LOG.STRING(lc_stat_level, lc_mod_name,
1604: 'Processing item - id = ' || l_curr_inv_item
1605: || ' name = ' || p_MLE_lines_tbl( i ).item_name
1606: || ', for count = ' || i);
1607: end if;
1612: IF ( p_MLE_lines_tbl( i ).quantity IS NULL
1613: OR p_MLE_lines_tbl( i ).quantity <= 0 ) THEN
1614: l_skip_curr_rec := TRUE;
1615: if (lc_stat_level >= lc_debug_level) then
1616: FND_LOG.STRING(lc_stat_level, lc_mod_name,
1617: 'The transaction quantity value is either NULL or 0. '
1618: || 'p_MLE_lines_tbl( i ).quantity = ' || p_MLE_lines_tbl( i ).quantity);
1619: end if;
1620: FND_MESSAGE.SET_NAME( 'CSD', 'CSD_CHRG_NEG_QTY');
1636:
1637: IF (NOT l_skip_curr_rec) THEN
1638:
1639: if (lc_stat_level >= lc_debug_level) then
1640: FND_LOG.STRING(lc_stat_level, lc_mod_name,
1641: 'Current item being processed - id = ' || l_curr_inv_item
1642: || ' name = ' || p_MLE_lines_tbl( i ).item_name
1643: || ', for count = ' || i);
1644: end if;
1651: -- The reason we put the following code in a plsql block
1652: -- is because the API throws an excetion when there is no success.
1653: BEGIN
1654: if (lc_proc_level >= lc_debug_level) then
1655: FND_LOG.STRING(lc_proc_level, lc_mod_name,
1656: 'Calling CSD_PROCESS_UTIL.GET_CHARGE_SELLING_PRICE with'
1657: || ' p_inventory_item_id = ' || p_MLE_lines_tbl( i ).inventory_item_id
1658: || ' p_price_list_header_id = ' || p_price_list_id
1659: || ' p_unit_of_measure_code = ' || p_MLE_lines_tbl( i ).uom
1676: x_msg_count => l_msg_count,
1677: x_msg_data => l_msg_data );
1678:
1679: if (lc_proc_level >= lc_debug_level) then
1680: FND_LOG.STRING(lc_proc_level, lc_mod_name,
1681: 'Returned form CSD_PROCESS_UTIL.GET_CHARGE_SELLING_PRICE with'
1682: || ' l_unit_selling_price = ' || l_unit_selling_price);
1683: end if;
1684:
1699: --DBMS_OUTPUT.put_line( 'NEW: The status is '
1700: -- || l_return_status );
1701:
1702: if (lc_proc_level >= lc_debug_level) then
1703: FND_LOG.STRING(lc_proc_level, lc_mod_name,
1704: 'Inside EXC ERROR for the block calling CSD_PROCESS_UTIL.GET_CHARGE_SELLING_PRICE.');
1705: end if;
1706:
1707: l_skip_curr_rec := TRUE;
1716: WHERE list_header_id = p_price_list_id;
1717: EXCEPTION
1718: WHEN NO_DATA_FOUND THEN
1719: if (lc_stat_level >= lc_debug_level) then
1720: FND_LOG.STRING(lc_stat_level, lc_mod_name,
1721: 'Could not determine the price list name for p_price_list_id = ' || p_price_list_id);
1722: end if;
1723: --DBMS_OUTPUT.put_line( 'NEW: no data found' );
1724: l_price_list_name := p_price_list_id;
1737:
1738: --DBMS_OUTPUT.put_line( 'NEW: after getting the selling price' );
1739:
1740: if (lc_stat_level >= lc_debug_level) then
1741: FND_LOG.STRING(lc_stat_level, lc_mod_name,
1742: 'Checking if the Transaction Billing Type is null. '
1743: || 'p_MLE_lines_tbl(' || i || ').txn_billing_type_id = ' || p_MLE_lines_tbl( i ).txn_billing_type_id);
1744: end if;
1745:
1748: IF ( p_MLE_lines_tbl( i ).txn_billing_type_id IS NULL ) THEN
1749: --DBMS_OUTPUT.put_line( 'NEW: txn bill type null' );
1750:
1751: if (lc_stat_level >= lc_debug_level) then
1752: FND_LOG.STRING(lc_stat_level, lc_mod_name,
1753: 'Transaction billing type found to be NULL');
1754: end if;
1755:
1756: l_skip_curr_rec := TRUE;
1761: ELSE
1762: --DBMS_OUTPUT.put_line( 'NEW: txn bill type is NOT NULL' );
1763:
1764: if (lc_stat_level >= lc_debug_level) then
1765: FND_LOG.STRING(lc_stat_level, lc_mod_name,
1766: 'Transaction billing type is NOT NULL');
1767: end if;
1768:
1769: if (lc_proc_level >= lc_debug_level) then
1766: 'Transaction billing type is NOT NULL');
1767: end if;
1768:
1769: if (lc_proc_level >= lc_debug_level) then
1770: FND_LOG.STRING(lc_proc_level, lc_mod_name,
1771: 'Calling procedure CSD_PROCESS_UTIL.Get_No_Chg_Flag with '
1772: || 'p_MLE_lines_tbl( i ).txn_billing_type_id = ' || p_MLE_lines_tbl( i ).txn_billing_type_id);
1773: end if;
1774:
1775: -- Check if the 'No Charge Flag' is checked for the txn billing type.
1776: l_no_charge_flag := CSD_PROCESS_UTIL.Get_No_Chg_Flag( p_MLE_lines_tbl( i ).txn_billing_type_id );
1777:
1778: if (lc_proc_level >= lc_debug_level) then
1779: FND_LOG.STRING(lc_proc_level, lc_mod_name,
1780: 'Returned from procedure CSD_PROCESS_UTIL.Get_No_Chg_Flag with '
1781: || 'l_no_charge_flag = ' || l_no_charge_flag);
1782: end if;
1783:
1795: l_line_type_id := NULL;
1796: l_line_category_code := NULL;
1797:
1798: if (lc_proc_level >= lc_debug_level) then
1799: FND_LOG.STRING(lc_proc_level, lc_mod_name,
1800: 'Calling procedure CSD_PROCESS_UTIL.get_line_type with '
1801: || 'p_txn_billing_type_id = ' || p_MLE_lines_tbl( i ).txn_billing_type_id
1802: || ' and p_org_id = ' || l_org_id);
1803: end if;
1809: x_line_category_code => l_line_category_code,
1810: x_return_status => l_return_status );
1811:
1812: if (lc_proc_level >= lc_debug_level) then
1813: FND_LOG.STRING(lc_proc_level, lc_mod_name,
1814: 'Returned from procedure CSD_PROCESS_UTIL.get_line_type with '
1815: || 'x_line_type_id = ' || l_line_type_id
1816: || ', x_line_category_code = ' || l_line_category_code
1817: || ', x_return_status = ' || l_return_status);
1869: --DBMS_OUTPUT.put_line( 'NEW: Inside the IB check' );
1870: l_num_subtypes := 0;
1871:
1872: if (lc_stat_level >= lc_debug_level) then
1873: FND_LOG.STRING(lc_stat_level, lc_mod_name,
1874: 'Opening cursor count_csi_txn_subtypes using '
1875: || 'txn_billing_type_id = ' || p_MLE_lines_tbl( i ).txn_billing_type_id);
1876: end if;
1877:
1880: FETCH count_csi_txn_subtypes INTO l_num_subtypes;
1881: CLOSE count_csi_txn_subtypes;
1882:
1883: if (lc_stat_level >= lc_debug_level) then
1884: FND_LOG.STRING(lc_stat_level, lc_mod_name,
1885: 'Closed cursor count_csi_txn_subtypes. Value returned '
1886: || 'l_num_subtypes = ' || l_num_subtypes);
1887: end if;
1888:
1921: THEN
1922: --DBMS_OUTPUT.put_line( 'NEW: To get the discouted price.' );
1923:
1924: if (lc_proc_level >= lc_debug_level) then
1925: FND_LOG.STRING(lc_proc_level, lc_mod_name,
1926: 'Calling procedure CSD_CHARGE_LINE_UTIL.GET_DISCOUNTEDPRICE with values - '
1927: || 'p_contract_line_id = ' || p_contract_line_id
1928: || ', p_repair_type_id = ' || p_repair_type_id
1929: || ', p_txn_billing_type_id = ' || p_MLE_lines_tbl( i ).txn_billing_type_id
1946: x_msg_count => l_msg_count,
1947: x_msg_data => l_msg_data );
1948:
1949: if (lc_proc_level >= lc_debug_level) then
1950: FND_LOG.STRING(lc_proc_level, lc_mod_name,
1951: 'Returned from procedure CSD_CHARGE_LINE_UTIL.GET_DISCOUNTEDPRICE with values - '
1952: || 'x_discounted_price = ' || l_discounted_price
1953: || ', x_return_status = ' || l_return_status);
1954: end if;
2001: -- This ensures that we always add a record for a new index.
2002: l_curRow := px_valid_MLE_lines_tbl.COUNT + 1;
2003:
2004: if (lc_stat_level >= lc_debug_level) then
2005: FND_LOG.STRING(lc_stat_level, lc_mod_name,
2006: 'Current record# ' || l_curRow || ' is not skipped');
2007: end if;
2008:
2009: --DBMS_OUTPUT.put_line( 'NEW: Inside the valid loop '
2098:
2099: END LOOP;
2100:
2101: if (lc_stat_level >= lc_debug_level) then
2102: FND_LOG.STRING(lc_stat_level, lc_mod_name,
2103: 'End LOOP through p_MLE_lines_tbl table');
2104: end if;
2105:
2106: --
2118: END IF;-- Standard call to get message count and IF count is get message info.
2119:
2120: -- logging
2121: if (lc_proc_level >= lc_debug_level) then
2122: FND_LOG.STRING(lc_proc_level, lc_mod_name || '.END',
2123: 'Leaving CSD_CHARGE_LINE_UTIL.convert_to_charge_lines');
2124: end if;
2125:
2126: /*
2137: p_data => x_msg_data );
2138:
2139: -- save message in debug log
2140: IF (lc_excep_level >= lc_debug_level) THEN
2141: FND_LOG.STRING(lc_excep_level, lc_mod_name,
2142: 'EXC_ERROR['||x_msg_data||']');
2143: END IF;
2144:
2145: WHEN FND_API.G_EXC_UNEXPECTED_ERROR THEN
2150: p_data => x_msg_data );
2151:
2152: -- save message in debug log
2153: IF (lc_excep_level >= lc_debug_level) THEN
2154: FND_LOG.STRING(lc_excep_level, lc_mod_name,
2155: 'EXC_UNEXPECTED_ERROR['||x_msg_data||']');
2156: END IF;
2157:
2158: WHEN OTHERS THEN
2168: END IF;
2169:
2170: -- save message in debug log
2171: IF (lc_excep_level >= lc_debug_level) THEN
2172: FND_LOG.STRING(lc_excep_level, lc_mod_name,
2173: 'WHEN OTHERS THEN. SQL Message['||SQLERRM||']');
2174: END IF;
2175:
2176: FND_MESSAGE.SET_NAME( 'CSD', 'CSD_CHRG_MLE_CHRG_FORMAT_ERR');