Thursday the eleventh of April 2002
function get_employee_number(p_person_id in number,
p_date in date) return varchar2 is
v_return varchar2(30);
begin
select employee_number into v_return
from per_people_f
where person_id = p_person_id
and p_date between start_date and
end_date
and rownum = 1;
return v_return;
exception
when NO_DATA_FOUND then
return null;
end get_employee_number;
select element_name, inpval.name val_name
from pay_element_types_f pet,
pay_input_values_f inpval
where element_name like '%lloc%' and
pet.element_type_id = inpval.element_type_id
Allocations Child
Time Unit
Allocations Child
Pro Rata
Allocations Child
Pay Value
Allocations Child Manual Auto Allocations Child
Allocations Child Manual Auto Allocations Training
..etc...
Whenever the cursor changes block in the form, the form calls the ZOOM_AVAILABLE function in the CUSTOM library. If this function returns TRUE, then the Zoom entries on the menu and toolbar are enabled; if it returns FALSE, then they are disabled.
Here is a code example to enable the Zoom functionality in Custom.pll:
function zoom_available return boolean is
form_name varchar2(30) := name_in('system.current_form');
block_name varchar2(30) := name_in('system.cursor_block');
begin
if (form_name = 'DEMXXEOR' and block_name =
'ORDERS') then
return TRUE;
else
return FALSE;
end if;
end zoom_available;
And an example of how to process the event in Custom.pll:
procedure event(event_name varchar2) is
form_name varchar2(30)
:= name_in('system.current_form');
block_name varchar2(30)
:= name_in('system.cursor_block');
begin
if (event_name = 'ZOOM') then
if (form_name = 'CSXSRISR'
and block_name = 'INCIDENT_TRACKING') then
copy('Spanner is Cool', 'INCIDENT_TRACKING.PRODUCT_NAME');
fnd_message.set_string ('Je fais ici mes dérivations de données.');
fnd_message.show;
end if;
end if;
end event;
All this good stuff and more are detailed in the online manual: "Oracle
Applications Developer's Guide ".