1514: ', Transaction ID='||p_transaction_id ||
1515: ', Transaction Identifier='||p_transaction_identifier );
1516: END IF;
1517: -- Initialize return status as success
1518: x_return_status := FND_API.G_RET_STS_SUCCESS;
1519:
1520: IF (inv_rcv_common_apis.g_inv_patch_level >= inv_rcv_common_apis.g_patchset_j)
1521: AND (inv_rcv_common_apis.g_po_patch_level >=inv_rcv_common_apis.g_patchset_j_po) THEN
1522: l_patch_level := 1;
2247: WHEN OTHERS THEN
2248: trace('Exception raised in custom code in WMS_LABEL_CUSTOM_PKG.custom_restrict_labels');
2249: trace('SQLCODE::'||SQLCODE);
2250: trace('SQLERRM::'||SQLERRM);
2251: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
2252: END;
2253: --First validate that the table returned from custom code has not introduced any new LPNs
2254: --If there are new LPNs, then first remove them from the list and proceed
2255:
2537: trace(' for: lpn_id='||l_lpn_id||', l_cur_item='||l_cur_item_id||',ndx='||l_lpn_table_index);
2538: END IF;
2539:
2540: -- Fix for bug: 4179593
2541: l_custom_sql_ret_status := FND_API.G_RET_STS_SUCCESS;
2542: -- Fix for bug: 4179593
2543:
2544: -- Fix for bug: 4179593 Start
2545: l_CustSqlWarnFlagSet := FALSE;
3083: EXIT WHEN c_sql_stmt%notfound OR c_sql_stmt%rowcount >=2;
3084: END LOOP;
3085:
3086: IF (c_sql_stmt%rowcount=1 AND l_sql_stmt_result IS NULL) THEN
3087: x_return_status := FND_API.G_RET_STS_SUCCESS;
3088: l_custom_sql_ret_status := INV_LABEL.G_WARNING;
3089: fnd_message.set_name('WMS','WMS_CS_NULL_VALUE_RETURNED');
3090: fnd_msg_pub.ADD;
3091: -- Fix for bug: 4179593 Start
3088: l_custom_sql_ret_status := INV_LABEL.G_WARNING;
3089: fnd_message.set_name('WMS','WMS_CS_NULL_VALUE_RETURNED');
3090: fnd_msg_pub.ADD;
3091: -- Fix for bug: 4179593 Start
3092: --fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => l_custom_sql_ret_msg);
3093: l_custom_sql_ret_msg := fnd_msg_pub.get(p_msg_index => fnd_msg_pub.g_last, p_encoded => fnd_api.g_false);
3094: l_CustSqlWarnMsg := l_custom_sql_ret_msg;
3095: l_CustSqlWarnFlagSet := TRUE;
3096: -- Fix for bug: 4179593 End
3089: fnd_message.set_name('WMS','WMS_CS_NULL_VALUE_RETURNED');
3090: fnd_msg_pub.ADD;
3091: -- Fix for bug: 4179593 Start
3092: --fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => l_custom_sql_ret_msg);
3093: l_custom_sql_ret_msg := fnd_msg_pub.get(p_msg_index => fnd_msg_pub.g_last, p_encoded => fnd_api.g_false);
3094: l_CustSqlWarnMsg := l_custom_sql_ret_msg;
3095: l_CustSqlWarnFlagSet := TRUE;
3096: -- Fix for bug: 4179593 End
3097: IF (l_debug = 1) THEN
3104: IF (l_debug = 1) THEN
3105: trace('Custom Labels Trace [INVLAP5B.pls]: At Breadcrumb 3');
3106: trace('Custom Labels Trace [INVLAP5B.pls]: WARNING: No row returned by the Custom SQL query');
3107: END IF;
3108: x_return_status := FND_API.G_RET_STS_SUCCESS;
3109: l_custom_sql_ret_status := INV_LABEL.G_WARNING;
3110: fnd_message.set_name('WMS','WMS_CS_NO_DATA_FOUND');
3111: fnd_msg_pub.ADD;
3112: -- Fix for bug: 4179593 Start
3109: l_custom_sql_ret_status := INV_LABEL.G_WARNING;
3110: fnd_message.set_name('WMS','WMS_CS_NO_DATA_FOUND');
3111: fnd_msg_pub.ADD;
3112: -- Fix for bug: 4179593 Start
3113: --fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => l_custom_sql_ret_msg);
3114: l_custom_sql_ret_msg := fnd_msg_pub.get(p_msg_index => fnd_msg_pub.g_last, p_encoded => fnd_api.g_false);
3115: l_CustSqlWarnMsg := l_custom_sql_ret_msg;
3116: l_CustSqlWarnFlagSet := TRUE;
3117: -- Fix for bug: 4179593 End
3110: fnd_message.set_name('WMS','WMS_CS_NO_DATA_FOUND');
3111: fnd_msg_pub.ADD;
3112: -- Fix for bug: 4179593 Start
3113: --fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => l_custom_sql_ret_msg);
3114: l_custom_sql_ret_msg := fnd_msg_pub.get(p_msg_index => fnd_msg_pub.g_last, p_encoded => fnd_api.g_false);
3115: l_CustSqlWarnMsg := l_custom_sql_ret_msg;
3116: l_CustSqlWarnFlagSet := TRUE;
3117: -- Fix for bug: 4179593 End
3118: ELSIF c_sql_stmt%rowcount>=2 THEN
3119: IF (l_debug = 1) THEN
3120: trace('Custom Labels Trace [INVLAP5B.pls]: At Breadcrumb 4');
3121: trace('Custom Labels Trace [INVLAP5B.pls]: ERROR: Multiple values returned by the Custom SQL query');
3122: END IF;
3123: x_return_status := FND_API.G_RET_STS_SUCCESS;
3124: l_custom_sql_ret_status := FND_API.G_RET_STS_ERROR;
3125: fnd_message.set_name('WMS','WMS_CS_MULTIPLE_VALUES_RETURN');
3126: fnd_msg_pub.ADD;
3127: -- Fix for bug: 4179593 Start
3120: trace('Custom Labels Trace [INVLAP5B.pls]: At Breadcrumb 4');
3121: trace('Custom Labels Trace [INVLAP5B.pls]: ERROR: Multiple values returned by the Custom SQL query');
3122: END IF;
3123: x_return_status := FND_API.G_RET_STS_SUCCESS;
3124: l_custom_sql_ret_status := FND_API.G_RET_STS_ERROR;
3125: fnd_message.set_name('WMS','WMS_CS_MULTIPLE_VALUES_RETURN');
3126: fnd_msg_pub.ADD;
3127: -- Fix for bug: 4179593 Start
3128: --fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => l_custom_sql_ret_msg);
3124: l_custom_sql_ret_status := FND_API.G_RET_STS_ERROR;
3125: fnd_message.set_name('WMS','WMS_CS_MULTIPLE_VALUES_RETURN');
3126: fnd_msg_pub.ADD;
3127: -- Fix for bug: 4179593 Start
3128: --fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => l_custom_sql_ret_msg);
3129: l_custom_sql_ret_msg := fnd_msg_pub.get(p_msg_index => fnd_msg_pub.g_last, p_encoded => fnd_api.g_false);
3130: l_CustSqlErrMsg := l_custom_sql_ret_msg;
3131: l_CustSqlErrFlagSet := TRUE;
3132: -- Fix for bug: 4179593 End
3125: fnd_message.set_name('WMS','WMS_CS_MULTIPLE_VALUES_RETURN');
3126: fnd_msg_pub.ADD;
3127: -- Fix for bug: 4179593 Start
3128: --fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => l_custom_sql_ret_msg);
3129: l_custom_sql_ret_msg := fnd_msg_pub.get(p_msg_index => fnd_msg_pub.g_last, p_encoded => fnd_api.g_false);
3130: l_CustSqlErrMsg := l_custom_sql_ret_msg;
3131: l_CustSqlErrFlagSet := TRUE;
3132: -- Fix for bug: 4179593 End
3133: END IF;
3142: IF (l_debug = 1) THEN
3143: trace('Custom Labels Trace [INVLAP5B.pls]: At Breadcrumb 5');
3144: trace('Custom Labels Trace [INVLAP5B.pls]: Unexpected Error has occured in GET_VARIABLES_DATA');
3145: END IF;
3146: x_return_status := FND_API.G_RET_STS_ERROR;
3147: fnd_message.set_name('WMS','WMS_CS_WRONG_SQL_CONSTRUCT');
3148: fnd_msg_pub.ADD;
3149: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
3150: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3145: END IF;
3146: x_return_status := FND_API.G_RET_STS_ERROR;
3147: fnd_message.set_name('WMS','WMS_CS_WRONG_SQL_CONSTRUCT');
3148: fnd_msg_pub.ADD;
3149: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
3150: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3151: END;
3152: IF (l_debug = 1) THEN
3153: trace('Custom Labels Trace [INVLAP5B.pls]: At Breadcrumb 6');
3146: x_return_status := FND_API.G_RET_STS_ERROR;
3147: fnd_message.set_name('WMS','WMS_CS_WRONG_SQL_CONSTRUCT');
3148: fnd_msg_pub.ADD;
3149: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
3150: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
3151: END;
3152: IF (l_debug = 1) THEN
3153: trace('Custom Labels Trace [INVLAP5B.pls]: At Breadcrumb 6');
3154: trace('Custom Labels Trace [INVLAP5B.pls]: Before assigning it to l_content_item_data');
4187: l_custom_sql_ret_msg := l_CustSqlWarnMsg;
4188: END IF;
4189:
4190: IF (l_CustSqlErrFlagSet) THEN
4191: l_custom_sql_ret_status := FND_API.G_RET_STS_ERROR;
4192: l_custom_sql_ret_msg := l_CustSqlErrMsg;
4193: END IF;
4194: -- Fix for bug: 4179593 End
4195:
4418: l_custom_sql_ret_msg := l_CustSqlWarnMsg;
4419: END IF;
4420:
4421: IF (l_CustSqlErrFlagSet) THEN
4422: l_custom_sql_ret_status := FND_API.G_RET_STS_ERROR;
4423: l_custom_sql_ret_msg := l_CustSqlErrMsg;
4424: END IF;
4425: -- Fix for bug: 4179593 End
4426:
4499: l_custom_sql_ret_msg := l_CustSqlWarnMsg;
4500: END IF;
4501:
4502: IF (l_CustSqlErrFlagSet) THEN
4503: l_custom_sql_ret_status := FND_API.G_RET_STS_ERROR;
4504: l_custom_sql_ret_msg := l_CustSqlErrMsg;
4505: END IF;
4506: -- Fix for bug: 4179593 End
4507: