Definition: vrg_id recordgroup;
1) vrg_id := Find_Group( "tesT_new_record_grp" ); ...Generate a group id for the record group
--Delete group id
2)
IF NOT Id_Null(vrg_id) THEN
Delete_Group( vrg_id);
END IF;
3) Now create a SQL for new record group which will be attached to LOV. But creation of new record group has its limitations, this process allows to change the tables and WHERE conditions used to generate the LOV, it won't allow to change the number of columns or their alias.Because here we are changing only record group , LOV cannot be modified in CUSTOM.pll
So make sure number of columns in select statement and their aliases match actual record group
Example:
Actual record group:
select col1, col2, col3
from tbl1,tbl2
where tbl1.x = tbl2.y
New record group:
vlv_sql = 'select tbl1111.123 col1,'
|| 'tbl1111.234 col2,'
|| 'tbl1111.xyz col3'
|| 'from tbl1111,tbl22222'
|| 'where tbl1111.xx = tbl22222.yy ';
(only tables and where condition are changed)
4) vrg_id := CREATE_GROUP_FROM_QUERY (vrg_name_new, vlv_sql);
--creating the new record group
5) SET_LOV_PROPERTY ('XXXXX' --LOV name
,group_name
,vrg_name_new
);
--Assign the newly created record group to existing LOV
No comments:
Post a Comment