[Home] [Help]
285:
286: x_return_status := FND_API.g_ret_sts_success;
287:
288: IF p_attribute = 'PRICING_ATTRIBUTE1' THEN
289: INSERT INTO ozf_search_selections_t(attribute_value, attribute_id) VALUES(p_attr_value, p_attribute);
290: ELSE
291: OPEN c_prod_stmt;
292: FETCH c_prod_stmt INTO l_prod_stmt, l_cond_id;
293: CLOSE c_prod_stmt;
291: OPEN c_prod_stmt;
292: FETCH c_prod_stmt INTO l_prod_stmt, l_cond_id;
293: CLOSE c_prod_stmt;
294:
295: l_prod_stmt := 'INSERT INTO ozf_search_selections_t(attribute_value, attribute_id) ' || l_prod_stmt;
296:
297: IF l_cond_id IS NOT NULL THEN
298: IF INSTR(UPPER(l_prod_stmt),'WHERE') > 0 THEN
299: l_prod_stmt := l_prod_stmt || ' AND ' || l_cond_id || ' = :1 ';
843: IF l_stmt_temp IS NULL THEN
844: l_no_query_flag := 'Y';
845: ELSE
846: IF l_no_excl_products > 0 THEN
847: EXECUTE IMMEDIATE 'TRUNCATE TABLE ozf_search_selections_t';
848: FOR j IN c_excluded_products(l_offer_id,i.off_discount_product_id)
849: LOOP
850: IF j.product_level = 'PRODUCT' THEN
851: l_context_attr := 'PRICING_ATTRIBUTE1';
864: x_return_status => x_return_status,
865: x_msg_count => x_msg_count,
866: x_msg_data => x_msg_data);
867: END LOOP;
868: FND_DSQL.add_text(' MINUS select attribute_value product_id, attribute_id product_type from ozf_search_selections_t ');
869: END IF;
870: END IF;
871:
872: FND_DSQL.add_text(')');
1101: END IF;
1102: END LOOP; -- j loop
1103:
1104: IF l_no_excl_products > 0 THEN
1105: EXECUTE IMMEDIATE 'TRUNCATE TABLE ozf_search_selections_t';
1106: FOR k IN c_excluded_products(l_offer_id,i.offer_discount_line_id) LOOP
1107: insert_excl_prod(p_api_version => p_api_version,
1108: p_init_msg_list => p_init_msg_list,
1109: p_commit => p_commit,
1113: x_return_status => x_return_status,
1114: x_msg_count => x_msg_count,
1115: x_msg_data => x_msg_data);
1116: END LOOP; -- k loop
1117: FND_DSQL.add_text(' MINUS select attribute_value product_id, attribute_id product_type from ozf_search_selections_t ');
1118: END IF;
1119:
1120: l_no_query_flag := 'N';
1121: ELSE
1950: IF l_stmt_temp IS NULL THEN
1951: l_no_query_flag := 'Y';
1952: ELSE
1953: IF l_no_excl_products > 0 THEN
1954: EXECUTE IMMEDIATE 'TRUNCATE TABLE ozf_search_selections_t';
1955: FOR j IN c_excluded_products(i.activity_product_id, l_org_id) LOOP
1956: IF j.level_type_code = 'PRODUCT' THEN
1957: l_context_attr := 'PRICING_ATTRIBUTE1';
1958: l_prod_attr_val := j.inventory_item_id;
1970: x_return_status => x_return_status,
1971: x_msg_count => x_msg_count,
1972: x_msg_data => x_msg_data);
1973: END LOOP;
1974: FND_DSQL.add_text(' MINUS select attribute_value product_id, attribute_id product_type from ozf_search_selections_t ');
1975: END IF;
1976: END IF;
1977:
1978: FND_DSQL.add_text(')');
2205: IF l_stmt_temp IS NULL THEN
2206: l_no_query_flag := 'Y';
2207: ELSE
2208: IF l_no_excl_products > 0 THEN
2209: EXECUTE IMMEDIATE 'TRUNCATE TABLE ozf_search_selections_t';
2210: FOR j IN c_products(i.list_line_id, 'Y') LOOP
2211: insert_excl_prod(p_api_version => p_api_version,
2212: p_init_msg_list => p_init_msg_list,
2213: p_commit => p_commit,
2217: x_return_status => x_return_status,
2218: x_msg_count => x_msg_count,
2219: x_msg_data => x_msg_data);
2220: END LOOP;
2221: FND_DSQL.add_text(' MINUS select attribute_value product_id, attribute_id product_type from ozf_search_selections_t ');
2222: END IF;
2223: END IF;
2224:
2225: FND_DSQL.add_text(')');