FRM-40502: ORACLE error: unable to read list of values
768214May 7 2010 — edited May 7 2010Hi,
I have a situation where I need to create a Record Group dynamically and assign it to different LOVs associated to different fields. I create the record group using a query everytime. Following is the code snippet for the same:
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
rg_id := FIND_GROUP (rg_name);
IF NOT Id_Null(rg_id)
THEN
DELETE_GROUP ( rg_id );
END IF;
l_query := 'SELECT flv.LOOKUP_CODE LOOKUP_CODE, flv.MEANING MEANING '
||' FROM fnd_lookup_values flv, fnd_lookup_types_vl flt '
||' WHERE flv.lookup_type = flt.lookup_type '
||' AND flt.MEANING LIKE '
||'''%'||mx_fields_rec.field_name||'%'''
||' AND flv.enabled_flag = ''Y'''
||' AND flv.lookup_code IN (SELECT TO_CHAR('
||mx_fields_rec.field_name
||') FROM xxcgt_4103_mx_winding_no WHERE 1=1 ';
IF :GENSIZING.frequency IS NOT NULL THEN
l_query := l_query ||' AND frequency = '||:GENSIZING.frequency;
END IF;
IF :GENSIZING.voltage IS NOT NULL THEN
l_query := l_query ||' AND voltage = '||:GENSIZING.voltage;
END IF;
IF :GENSIZING.phase IS NOT NULL THEN
l_query := l_query ||' AND phase = '||:GENSIZING.phase;
END IF;
IF :GENSIZING.terminal_connection_style IS NOT NULL THEN
l_query := l_query ||' AND terminal_connection_style = '''||:GENSIZING.terminal_connection_style||'''';
END IF;
IF :GENSIZING.ends_out IS NOT NULL THEN
l_query := l_query ||' AND ends_out = '||:GENSIZING.ends_out;
END IF;
IF :GENSIZING.ratings_winding_number IS NOT NULL THEN
l_query := l_query ||' AND ratings_winding_number = '||:GENSIZING.ratings_winding_number;
END IF;
IF l_col_datatype = 'NUMBER' THEN
l_query := l_query ||') ORDER BY TO_NUMBER(lookup_code) ASC' ;
ELSIF l_col_datatype = 'VARCHAR2' THEN
l_query := l_query ||') ORDER BY lookup_code ASC' ;
END IF;
-- fnd_message.DEBUG('l_query = '||l_query);
rg_id := CREATE_GROUP_FROM_QUERY (rg_name, l_query);
-- Populate Group
errcode := POPULATE_GROUP (rg_id);
-- Attach it to a LOV
l_lov_name := GET_ITEM_PROPERTY('GENSIZING.' || mx_fields_rec.field_name, LOV_NAME);
SET_LOV_PROPERTY (l_lov_name, group_name, rg_name);
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I create the RG using the values from the Forms during runtime. I have LOVs associated to different items. Depending on the item ( mx_fields_rec.field_name), I populate the RG and assign it to the appropriate LOV.
The query runs fine in SQLPlus. But when I run it on Forms, it gives me the following error when I click on one of the items with the LOV:
"ORA-01403: no data found".
I ran an FRD and found that it is also throwing the error : FRM-40502: ORACLE error: unable to read list of values.
If anyone has any idea about this error, please help me out.
Thanks in advance.
Regards,
Anoop