By default in a project related timecard in OTL the task LOV will show all the tasks from the selected project. This means that users are allowed to select tasks which might not be chargeable. When a user selects that kind of a tasks they will be presented with mesages that the task is not chargeable, as displayed above.
There are 2 ways of changing this behaviour in OTL.
1) With a simple profile option change
2) With a small customization for changing the task LOV view – which is Oracle Supported.
Profile Option Change
The profile option that is driving the task behaviour for this is PA: Tasks to Display for Expenditure Entry.
The profile option can be NULL and is than defaulted in the task LOV to All tasks. There are 3 options:
- All tasks: Show all tasks of the project
- Chargeable tasks: Show only the tasks for which the chargeable flag is set
- Lowest tasks: Show only the lowest level tasks
Of course to only show the chargeable tasks in the timecard set the profile option to Chargeable tasks.
Customization
The task LOV in the OTL timecard is constructed from the view PA_ONLINE_TASKS_V in the APPS schema. You’re allowed to make changes to this view to have a different behaviour. This is supported by Oracle Support.
The view definition by default is:
CREATE OR REPLACE FORCE VIEW apps.pa_online_tasks_v
(project_id,
project_number,
task_id,
task_number,
task_name,
start_date,
completion_date,
chargeable_flag,
billable_flag,
org_id,
task_details
)
AS
SELECT t.project_id, p.segment1 project_number, t.task_id, t.task_number,
t.task_name, t.start_date, t.completion_date,
t.chargeable_flag, t.billable_flag, imp.org_id,
t.task_number || '-' || t.task_name task_details
FROM pa_tasks t, pa_projects_all p, pa_implementations imp,
pa_lookups lu
WHERE lu.lookup_type = 'PA_TASKS_TO_DISPLAY'
AND lu.lookup_code =
NVL (fnd_profile.VALUE ('PA_TASKS_DISPLAYED'), 'ALL')
AND ( (lu.lookup_code = 'CHARGEABLE' AND t.chargeable_flag = 'Y')
OR (lu.lookup_code = 'ALL')
OR ( lu.lookup_code = 'LOWEST'
AND pa_task_utils.check_child_exists (t.task_id) = 0
)
)
AND ( p.project_id = t.project_id
AND (imp.org_id = p.org_id OR t.allow_cross_charge_flag = 'Y')
);
In the view definition we can clearly see the profile check on PA_TASKS_DISPLAYED which is the first solution for this requirement (change profile option). But you’re also allowed to change this view a little to only show chargeable tasks. For this you can simply add the follow statement to the WHERE clause and compile the view:
AND t.chargeable_flag = 'Y'
Most quick solution is the profile option change but if you are a fan of customizations than use option 2 :-).