248: cursor c_get_mode_meaning is select meaning from fnd_lookups where lookup_type='GMO_DISPENSE_MODE' and lookup_code=l_mode;
249:
250: BEGIN
251: -- Initialize return status as success
252: x_return_status := fnd_api.g_ret_sts_success;
253: l_debug := inv_label.l_debug;
254: l_label_status := INV_LABEL.G_SUCCESS;
255:
256: IF (l_debug = 1) THEN
577:
578:
579: GMO_LABEL_MGMT_GRP.GET_PRINT_COUNT(
580: p_api_version => 1.0,
581: p_init_msg_list => FND_API.G_FALSE,
582: x_return_status => l_return_status,
583: x_msg_count => l_msg_count,
584: x_msg_data => l_msg_data,
585: P_WMS_BUSINESS_FLOW_CODE => p_label_type_info.business_flow_code,
713:
714: l_column_name_list := 'Set variables for ';
715:
716: -- CUSTOM SQL
717: l_custom_sql_ret_status := FND_API.G_RET_STS_SUCCESS;
718: l_CustSqlWarnFlagSet := FALSE;
719: l_CustSqlErrFlagSet := FALSE;
720: l_CustSqlWarnMsg := NULL;
721: l_CustSqlErrMsg := NULL;
764: EXIT WHEN c_sql_stmt%notfound OR c_sql_stmt%rowcount >=2;
765: END LOOP;
766:
767: IF (c_sql_stmt%rowcount=1 AND l_sql_stmt_result IS NULL) THEN
768: x_return_status := FND_API.G_RET_STS_SUCCESS;
769: l_custom_sql_ret_status := INV_LABEL.G_WARNING;
770: fnd_message.set_name('WMS','WMS_CS_NULL_VALUE_RETURNED');
771: fnd_msg_pub.ADD;
772: -- Fix for bug: 4179593 Start
769: l_custom_sql_ret_status := INV_LABEL.G_WARNING;
770: fnd_message.set_name('WMS','WMS_CS_NULL_VALUE_RETURNED');
771: fnd_msg_pub.ADD;
772: -- Fix for bug: 4179593 Start
773: --fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => l_custom_sql_ret_msg);
774: l_custom_sql_ret_msg := fnd_msg_pub.get(p_msg_index => fnd_msg_pub.g_last, p_encoded => fnd_api.g_false);
775: l_CustSqlWarnMsg := l_custom_sql_ret_msg;
776: l_CustSqlWarnFlagSet := TRUE;
777: -- Fix for bug: 4179593 End
770: fnd_message.set_name('WMS','WMS_CS_NULL_VALUE_RETURNED');
771: fnd_msg_pub.ADD;
772: -- Fix for bug: 4179593 Start
773: --fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => l_custom_sql_ret_msg);
774: l_custom_sql_ret_msg := fnd_msg_pub.get(p_msg_index => fnd_msg_pub.g_last, p_encoded => fnd_api.g_false);
775: l_CustSqlWarnMsg := l_custom_sql_ret_msg;
776: l_CustSqlWarnFlagSet := TRUE;
777: -- Fix for bug: 4179593 End
778: IF (l_debug = 1) THEN
785: IF (l_debug = 1) THEN
786: trace('Custom Labels Trace [INVLA11B.pls]: At Breadcrumb 3');
787: trace('Custom Labels Trace [INVLA11B.pls]: WARNING: No row returned by the Custom SQL query');
788: END IF;
789: x_return_status := FND_API.G_RET_STS_SUCCESS;
790: l_custom_sql_ret_status := INV_LABEL.G_WARNING;
791: fnd_message.set_name('WMS','WMS_CS_NO_DATA_FOUND');
792: fnd_msg_pub.ADD;
793: -- Fix for bug: 4179593 Start
790: l_custom_sql_ret_status := INV_LABEL.G_WARNING;
791: fnd_message.set_name('WMS','WMS_CS_NO_DATA_FOUND');
792: fnd_msg_pub.ADD;
793: -- Fix for bug: 4179593 Start
794: --fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => l_custom_sql_ret_msg);
795: l_custom_sql_ret_msg := fnd_msg_pub.get(p_msg_index => fnd_msg_pub.g_last, p_encoded => fnd_api.g_false);
796: l_CustSqlWarnMsg := l_custom_sql_ret_msg;
797: l_CustSqlWarnFlagSet := TRUE;
798: -- Fix for bug: 4179593 End
791: fnd_message.set_name('WMS','WMS_CS_NO_DATA_FOUND');
792: fnd_msg_pub.ADD;
793: -- Fix for bug: 4179593 Start
794: --fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => l_custom_sql_ret_msg);
795: l_custom_sql_ret_msg := fnd_msg_pub.get(p_msg_index => fnd_msg_pub.g_last, p_encoded => fnd_api.g_false);
796: l_CustSqlWarnMsg := l_custom_sql_ret_msg;
797: l_CustSqlWarnFlagSet := TRUE;
798: -- Fix for bug: 4179593 End
799: ELSIF c_sql_stmt%rowcount>=2 THEN
801: trace('Custom Labels Trace [INVLA11B.pls]: At Breadcrumb 4');
802: trace('Custom Labels Trace [INVLA11B.pls]: ERROR: Multiple values returned by the Custom SQL query');
803: END IF;
804: l_sql_stmt_result := NULL;
805: x_return_status := FND_API.G_RET_STS_SUCCESS;
806: l_custom_sql_ret_status := FND_API.G_RET_STS_ERROR;
807: fnd_message.set_name('WMS','WMS_CS_MULTIPLE_VALUES_RETURN');
808: fnd_msg_pub.ADD;
809: -- Fix for bug: 4179593 Start
802: trace('Custom Labels Trace [INVLA11B.pls]: ERROR: Multiple values returned by the Custom SQL query');
803: END IF;
804: l_sql_stmt_result := NULL;
805: x_return_status := FND_API.G_RET_STS_SUCCESS;
806: l_custom_sql_ret_status := FND_API.G_RET_STS_ERROR;
807: fnd_message.set_name('WMS','WMS_CS_MULTIPLE_VALUES_RETURN');
808: fnd_msg_pub.ADD;
809: -- Fix for bug: 4179593 Start
810: --fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => l_custom_sql_ret_msg);
806: l_custom_sql_ret_status := FND_API.G_RET_STS_ERROR;
807: fnd_message.set_name('WMS','WMS_CS_MULTIPLE_VALUES_RETURN');
808: fnd_msg_pub.ADD;
809: -- Fix for bug: 4179593 Start
810: --fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => l_custom_sql_ret_msg);
811: l_custom_sql_ret_msg := fnd_msg_pub.get(p_msg_index => fnd_msg_pub.g_last, p_encoded => fnd_api.g_false);
812: l_CustSqlErrMsg := l_custom_sql_ret_msg;
813: l_CustSqlErrFlagSet := TRUE;
814: -- Fix for bug: 4179593 End
807: fnd_message.set_name('WMS','WMS_CS_MULTIPLE_VALUES_RETURN');
808: fnd_msg_pub.ADD;
809: -- Fix for bug: 4179593 Start
810: --fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => l_custom_sql_ret_msg);
811: l_custom_sql_ret_msg := fnd_msg_pub.get(p_msg_index => fnd_msg_pub.g_last, p_encoded => fnd_api.g_false);
812: l_CustSqlErrMsg := l_custom_sql_ret_msg;
813: l_CustSqlErrFlagSet := TRUE;
814: -- Fix for bug: 4179593 End
815: END IF;
824: IF (l_debug = 1) THEN
825: trace('Custom Labels Trace [INVLA11B.pls]: At Breadcrumb 5');
826: trace('Custom Labels Trace [INVLA11B.pls]: Unexpected Error has occured in GET_VARIABLES_DATA');
827: END IF;
828: x_return_status := FND_API.G_RET_STS_ERROR;
829: fnd_message.set_name('WMS','WMS_CS_WRONG_SQL_CONSTRUCT');
830: fnd_msg_pub.ADD;
831: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
832: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
827: END IF;
828: x_return_status := FND_API.G_RET_STS_ERROR;
829: fnd_message.set_name('WMS','WMS_CS_WRONG_SQL_CONSTRUCT');
830: fnd_msg_pub.ADD;
831: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
832: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
833: END;
834: IF (l_debug = 1) THEN
835: trace('Custom Labels Trace [INVLA11B.pls]: At Breadcrumb 6');
828: x_return_status := FND_API.G_RET_STS_ERROR;
829: fnd_message.set_name('WMS','WMS_CS_WRONG_SQL_CONSTRUCT');
830: fnd_msg_pub.ADD;
831: fnd_msg_pub.count_and_get(p_encoded => fnd_api.g_false, p_count => x_msg_count, p_data => x_msg_data);
832: RAISE FND_API.G_EXC_UNEXPECTED_ERROR;
833: END;
834: IF (l_debug = 1) THEN
835: trace('Custom Labels Trace [INVLA11B.pls]: At Breadcrumb 6');
836: trace('Custom Labels Trace [INVLA11B.pls]: Before assigning it to l_content_item_data');
1180: l_custom_sql_ret_msg := l_CustSqlWarnMsg;
1181: END IF;
1182:
1183: IF (l_CustSqlErrFlagSet) THEN
1184: l_custom_sql_ret_status := FND_API.G_RET_STS_ERROR;
1185: l_custom_sql_ret_msg := l_CustSqlErrMsg;
1186: END IF;
1187: -- Fix for bug: 4179593 End
1188: