Domen Dolar - 2023-01-30

If you woud like to use result of LOV's in your code and you do not like to double SQL statements you can kreate call like this:

begin

B10SF_PREKINITEV := openlov(
                              'lov$storitev' ,   --name of the list of values
   B10SF_PREKINITEV  -- value to search lov
    )(1).label;  -- 1 means first row in lov's results

exception when others then null;
end;

LOV's in RASD are in type:

  TYPE LOVrec__ IS RECORD (label varchar2(4000),id varchar2(4000) );
  TYPE LOVtab__ IS TABLE OF LOVrec__ INDEX BY BINARY_INTEGER;

TIP:
String in LOV's are searched in label and id. If you have null row in LOV and you would like to find also that row it is adviced to put ' ' (space) in label. Otherwise this null row will never be searched.
Like:

select '' id , ' ' label from dual
union
...