848: END IF;
849:
850: IF c_get_products%ROWCOUNT = 1 THEN -- for first row.
851: FND_DSQL.add_text('(');
852: l_temp_sql := OZF_OFFR_ELIG_PROD_DENORM_PVT.get_sql
853: ( p_context => 'ITEM',
854: p_attribute => l_attribute,
855: p_attr_value_from => l_attr_value,
856: p_attr_value_to => NULL,
859: );
860: FND_DSQL.add_text(')');
861: ELSE
862: FND_DSQL.add_text('UNION (');
863: l_temp_sql := OZF_OFFR_ELIG_PROD_DENORM_PVT.get_sql
864: ( p_context => 'ITEM',
865: p_attribute => l_attribute,
866: p_attr_value_from => l_attr_value,
867: p_attr_value_to => NULL,
903:
904: IF c_get_products%ROWCOUNT = 1 THEN
905: -- l_exclude_sql := '(' || l_temp_sql || ')';
906: FND_DSQL.add_text('(');
907: l_temp_sql := OZF_OFFR_ELIG_PROD_DENORM_PVT.get_sql
908: ( p_context => 'ITEM',
909: p_attribute => l_attribute,
910: p_attr_value_from => l_attr_value,
911: p_attr_value_to => NULL,
915: FND_DSQL.add_text(')');
916: ELSE
917: --l_exclude_sql := l_exclude_sql || ' UNION (' || l_temp_sql || ')';
918: FND_DSQL.add_text('UNION (');
919: l_temp_sql := OZF_OFFR_ELIG_PROD_DENORM_PVT.get_sql
920: ( p_context => 'ITEM',
921: p_attribute => l_attribute,
922: p_attr_value_from => l_attr_value,
923: p_attr_value_to => NULL,
1034:
1035: IF c_get_budget_market_qualifiers%ROWCOUNT = 1 THEN -- for first row.
1036: -- l_budget_product_sql := '(' || l_temp_sql || ')';
1037: FND_DSQL.add_text('(');
1038: l_temp_sql := OZF_OFFR_ELIG_PROD_DENORM_PVT.get_sql
1039: ( p_context => l_context,
1040: p_attribute => l_attribute,
1041: p_attr_value_from => l_attr_value,
1042: p_attr_value_to => NULL,
1046: FND_DSQL.add_text(')');
1047: ELSE
1048: --l_budget_product_sql := l_budget_product_sql || ' UNION (' || l_temp_sql || ')';
1049: FND_DSQL.add_text('UNION (');
1050: l_temp_sql := OZF_OFFR_ELIG_PROD_DENORM_PVT.get_sql
1051: ( p_context => l_context,
1052: p_attribute => l_attribute,
1053: p_attr_value_from => l_attr_value,
1054: p_attr_value_to => NULL,
1118:
1119: IF c_get_budget_market_qualifiers%ROWCOUNT = 1 THEN -- for first row.
1120: -- l_budget_product_sql := '(' || l_temp_sql || ')';
1121: FND_DSQL.add_text('(');
1122: l_temp_sql := OZF_OFFR_ELIG_PROD_DENORM_PVT.get_sql
1123: ( p_context => l_context,
1124: p_attribute => l_attribute,
1125: p_attr_value_from => l_attr_value,
1126: p_attr_value_to => NULL,
1130: FND_DSQL.add_text(')');
1131: ELSE
1132: --l_budget_product_sql := l_budget_product_sql || ' UNION (' || l_temp_sql || ')';
1133: FND_DSQL.add_text('UNION (');
1134: l_temp_sql := OZF_OFFR_ELIG_PROD_DENORM_PVT.get_sql
1135: ( p_context => l_context,
1136: p_attribute => l_attribute,
1137: p_attr_value_from => l_attr_value,
1138: p_attr_value_to => NULL,
1262:
1263: IF c_get_products%ROWCOUNT = 1 THEN
1264: -- l_offer_product_sql := '(' || l_temp_sql || ')';
1265: FND_DSQL.add_text('(');
1266: l_temp_sql := OZF_OFFR_ELIG_PROD_DENORM_PVT.get_sql
1267: ( p_context => 'ITEM',
1268: p_attribute => l_attribute,
1269: p_attr_value_from => l_attr_value,
1270: p_attr_value_to => NULL,
1274: FND_DSQL.add_text(')');
1275: ELSE
1276: --l_offer_product_sql := l_offer_product_sql || ' UNION (' || l_temp_sql || ')';
1277: FND_DSQL.add_text('UNION (');
1278: l_temp_sql := OZF_OFFR_ELIG_PROD_DENORM_PVT.get_sql
1279: ( p_context => 'ITEM',
1280: p_attribute => l_attribute,
1281: p_attr_value_from => l_attr_value,
1282: p_attr_value_to => NULL,
1289: CLOSE c_get_products;
1290:
1291: ELSE -- for other offer,
1292: -- get offer's product eligibility query
1293: OZF_OFFR_ELIG_PROD_DENORM_PVT.refresh_products(
1294: p_api_version => 1.0,
1295: p_init_msg_list => fnd_api.g_false,
1296: p_commit => fnd_api.g_false,
1297: p_list_header_id => p_object_id,
1460: END IF;
1461:
1462: IF c_get_budget_products%ROWCOUNT = 1 THEN -- for first row.
1463: FND_DSQL.add_text('(');
1464: l_temp_sql := OZF_OFFR_ELIG_PROD_DENORM_PVT.get_sql
1465: ( p_context => 'ITEM',
1466: p_attribute => l_attribute,
1467: p_attr_value_from => l_attr_value,
1468: p_attr_value_to => NULL,
1471: );
1472: FND_DSQL.add_text(')');
1473: ELSE
1474: FND_DSQL.add_text('UNION (');
1475: l_temp_sql := OZF_OFFR_ELIG_PROD_DENORM_PVT.get_sql
1476: ( p_context => 'ITEM',
1477: p_attribute => l_attribute,
1478: p_attr_value_from => l_attr_value,
1479: p_attr_value_to => NULL,
1515:
1516: IF c_get_budget_products%ROWCOUNT = 1 THEN
1517: -- l_exclude_sql := '(' || l_temp_sql || ')';
1518: FND_DSQL.add_text('(');
1519: l_temp_sql := OZF_OFFR_ELIG_PROD_DENORM_PVT.get_sql
1520: ( p_context => 'ITEM',
1521: p_attribute => l_attribute,
1522: p_attr_value_from => l_attr_value,
1523: p_attr_value_to => NULL,
1527: FND_DSQL.add_text(')');
1528: ELSE
1529: --l_exclude_sql := l_exclude_sql || ' UNION (' || l_temp_sql || ')';
1530: FND_DSQL.add_text('UNION (');
1531: l_temp_sql := OZF_OFFR_ELIG_PROD_DENORM_PVT.get_sql
1532: ( p_context => 'ITEM',
1533: p_attribute => l_attribute,
1534: p_attr_value_from => l_attr_value,
1535: p_attr_value_to => NULL,
1578:
1579: IF c_get_offer_products%ROWCOUNT = 1 THEN
1580: -- l_offer_product_sql := '(' || l_temp_sql || ')';
1581: FND_DSQL.add_text('(');
1582: l_temp_sql := OZF_OFFR_ELIG_PROD_DENORM_PVT.get_sql
1583: ( p_context => 'ITEM',
1584: p_attribute => l_attribute,
1585: p_attr_value_from => l_attr_value,
1586: p_attr_value_to => NULL,
1590: FND_DSQL.add_text(')');
1591: ELSE
1592: --l_offer_product_sql := l_offer_product_sql || ' UNION (' || l_temp_sql || ')';
1593: FND_DSQL.add_text('UNION (');
1594: l_temp_sql := OZF_OFFR_ELIG_PROD_DENORM_PVT.get_sql
1595: ( p_context => 'ITEM',
1596: p_attribute => l_attribute,
1597: p_attr_value_from => l_attr_value,
1598: p_attr_value_to => NULL,
1605: CLOSE c_get_offer_products;
1606:
1607: ELSE -- for other offer,
1608: -- get offer's product eligibility query
1609: OZF_OFFR_ELIG_PROD_DENORM_PVT.refresh_products(
1610: p_api_version => 1.0,
1611: p_init_msg_list => fnd_api.g_false,
1612: p_commit => fnd_api.g_false,
1613: p_list_header_id => p_object_id,
1796: l_offer_mark := TRUE;
1797: l_context := 'CUSTOMER'; -- same as customer sold to
1798: l_attribute := 'QUALIFIER_ATTRIBUTE2';
1799: l_attr_value := l_offer_qualifier_id;
1800: l_offer_market_sql := OZF_OFFR_ELIG_PROD_DENORM_PVT.get_sql
1801: ( p_context => l_context,
1802: p_attribute => l_attribute,
1803: p_attr_value_from => l_attr_value,
1804: p_attr_value_to => NULL,
1807: );
1808: END IF;
1809: ELSE
1810: -- get offer's market eligibility query
1811: OZF_OFFR_ELIG_PROD_DENORM_PVT.refresh_parties(
1812: p_api_version => 1.0,
1813: p_init_msg_list => fnd_api.g_false,
1814: p_commit => fnd_api.g_false,
1815: p_list_header_id => p_object_id,
2009:
2010: IF c_get_budget_market_qualifiers%ROWCOUNT = 1 THEN -- for first row.
2011: -- l_budget_product_sql := '(' || l_temp_sql || ')';
2012: FND_DSQL.add_text('(');
2013: l_temp_sql := OZF_OFFR_ELIG_PROD_DENORM_PVT.get_sql
2014: ( p_context => l_context,
2015: p_attribute => l_attribute,
2016: p_attr_value_from => l_attr_value,
2017: p_attr_value_to => NULL,
2021: FND_DSQL.add_text(')');
2022: ELSE
2023: --l_budget_product_sql := l_budget_product_sql || ' UNION (' || l_temp_sql || ')';
2024: FND_DSQL.add_text('UNION (');
2025: l_temp_sql := OZF_OFFR_ELIG_PROD_DENORM_PVT.get_sql
2026: ( p_context => l_context,
2027: p_attribute => l_attribute,
2028: p_attr_value_from => l_attr_value,
2029: p_attr_value_to => NULL,
2092:
2093: IF c_get_budget_market_qualifiers%ROWCOUNT = 1 THEN -- for first row.
2094: -- l_budget_product_sql := '(' || l_temp_sql || ')';
2095: FND_DSQL.add_text('(');
2096: l_temp_sql := OZF_OFFR_ELIG_PROD_DENORM_PVT.get_sql
2097: ( p_context => l_context,
2098: p_attribute => l_attribute,
2099: p_attr_value_from => l_attr_value,
2100: p_attr_value_to => NULL,
2104: FND_DSQL.add_text(')');
2105: ELSE
2106: --l_budget_product_sql := l_budget_product_sql || ' UNION (' || l_temp_sql || ')';
2107: FND_DSQL.add_text('UNION (');
2108: l_temp_sql := OZF_OFFR_ELIG_PROD_DENORM_PVT.get_sql
2109: ( p_context => l_context,
2110: p_attribute => l_attribute,
2111: p_attr_value_from => l_attr_value,
2112: p_attr_value_to => NULL,
2164: l_offer_mark := TRUE;
2165: l_context := 'CUSTOMER'; -- same as customer sold to
2166: l_attribute := 'QUALIFIER_ATTRIBUTE2';
2167: l_attr_value := l_offer_qualifier_id;
2168: l_offer_market_sql := OZF_OFFR_ELIG_PROD_DENORM_PVT.get_sql
2169: ( p_context => l_context,
2170: p_attribute => l_attribute,
2171: p_attr_value_from => l_attr_value,
2172: p_attr_value_to => NULL,
2175: );
2176: END IF;
2177: ELSE
2178: -- get offer's market eligibility query
2179: OZF_OFFR_ELIG_PROD_DENORM_PVT.refresh_parties(
2180: p_api_version => 1.0,
2181: p_init_msg_list => fnd_api.g_false,
2182: p_commit => fnd_api.g_false,
2183: p_list_header_id => p_object_id,