Tuesday, December 15, 2015

PO approval workflow is failing with the error --Failed Activit: Get PO Attributes -- Error Stack : Wf_Engine_Util.Function_Call(PO_POAPPROVAL_INIT1.GET_PO_ATTRIBUTES, POAPPRV, 562566-638453, 265219, RUN)

Issue:    PO approval workflow is failing with the error

Failed Activity
http://appprod.tic.toshiba.com:8000/OA_HTML/cabo/images/swan/t.gif
Get PO Attributes http://appprod.tic.toshiba.com:8000/OA_HTML/cabo/images/swan/t.gif
Activity Type
http://appprod.tic.toshiba.com:8000/OA_HTML/cabo/images/swan/t.gif
Function http://appprod.tic.toshiba.com:8000/OA_HTML/cabo/images/swan/t.gif
Error Name
http://appprod.tic.toshiba.com:8000/OA_HTML/cabo/images/swan/t.gif
-6512 http://appprod.tic.toshiba.com:8000/OA_HTML/cabo/images/swan/t.gif
Error Message
http://appprod.tic.toshiba.com:8000/OA_HTML/cabo/images/swan/t.gif
ORA-06512: at line http://appprod.tic.toshiba.com:8000/OA_HTML/cabo/images/swan/t.gif
Error Stack
http://appprod.tic.toshiba.com:8000/OA_HTML/cabo/images/swan/t.gif
Wf_Engine_Util.Function_Call(PO_POAPPROVAL_INIT1.GET_PO_ATTRIBUTES, POAPPRV, 562566-638453, 265219, RUN) http://appprod.tic.toshiba.com:8000/OA_HTML/cabo/images/swan/t.gif

Solution: There might be multiple reasons. Below would be one of the issues.
The PO distribution line id is having quantity ordered ‘0’ and it is causing the issue.
I found one Metalink id Purchase Agreement Fails Under GET_PO_ATTRIBUTES Activity (Doc ID 460332.1)

After performing the below data fix. It resolved my issue.

Delete from po_distributions_all
where po_header_id = '562566'
and po_line_id=565160
and req_distribution_id=219153


Tuesday, February 3, 2015

Disable Self Service Personalization

Issue Description
Is there any way we could ignore all self service personalization. We want to test a scenario where we want that system should work as per standard options and effect of all personalization should be ignored?
Login to System Admin Responsibility and click on system function following the navigation mentioned in figure below
Disable Personalization
Following Screen Appears
Self Service Personalization
Such option should be set at user level.
Select check box of User and enter the User Name and in the profile field enter the profile option name Disable Self-Service Personal and click on find button
Self Service Personalization
As a result, following screen will appear. This profile is ‘No‘ at site level by default. Set the value ‘Yes‘ as shown below
Disable Self Service Personalization
Save it and clear global cache. You can get the steps to clear global cache from here.
As soon as cache is cleared, warning message will start appearing on the login page. Find the screen shot below to see the message appearing on login screen.
Disable Self Service
This message will appear on all self service pages in the application.
Disable Self Service Personalization
You should change this profile option again to No once your investigation is completed.

Tuesday, June 26, 2012

To find the concurrent program submission interval


SELECT req.request_id
, decode (prg.user_concurrent_program_name, 'Report Set', 'Report Set:' || req.description, prg.user_concurrent_program_name) AS name
, argument_text as parameters
, req.resubmit_interval
, nvl2 (req.resubmit_interval, 'Periodically', nvl2 (req.release_class_id, 'On specific days', 'Once')) AS schedule_type
, decode (nvl2 (req.resubmit_interval, 'Periodically', nvl2 (req.release_class_id, 'On specific days', 'Once')),
'Periodically', 'Every ' || req.resubmit_interval || ' ' || lower(req.resubmit_interval_unit_code) || ' from ' || lower(req.resubmit_interval_type_code) || ' of previous run',
'Once', 'At :' || to_char (req.requested_start_date, 'DD-MON-RR HH24:MI'), 'Every: ' || crc.class_info) as schedule
, fus.user_name as owner
, to_char(requested_start_date,'DD-MON-YYYY HH24:MI:SS') as next_submission
FROM
apps.fnd_concurrent_programs_tl prg
, apps.fnd_concurrent_requests req
, apps.fnd_user fus
, apps.fnd_conc_release_classes crc
WHERE 1=1
AND prg.application_id = req.program_application_id
AND prg.concurrent_program_id = req.concurrent_program_id
AND req.requested_by = fus.user_id
AND req.phase_code = 'P'
AND req.requested_start_date > sysdate 
AND prg.language = 'US'
AND crc.release_class_id(+) = req.release_class_id
AND crc.application_id(+) = req.release_class_app_id
ORDER BY name

Monday, June 25, 2012

To find out profile option set at which level


select substr(ot.user_profile_option_name,1,35),
substr(o.profile_option_name,1,30),
decode(level_id,10001, 'Site', 10002, 'Application', 10003, 'Responsibility', 10004, 'User') lev,
decode(level_id,10001, null, 10002, a.application_name, 10003, r.responsibility_name, 10004, u.user_name) lev_value,
r.RESPONSIBILITY_ID,
v.profile_option_value opt_value
from fnd_profile_option_values v,
fnd_profile_options o,
fnd_profile_options_tl ot,
fnd_application_tl a,
fnd_responsibility_tl r,
fnd_user u
where LEVEL_VALUE = decode(level_id, 10004, u.user_id, 10003, r.responsibility_id, 10002, a.application_id,10001,0)
and v.profile_option_id = o.profile_option_id
and v.application_id = o.application_id
and a.application_id (+) = v.level_value
and r.responsibility_id (+) = v.level_value
--and o.application_id = 275
and u.user_id (+) = v.level_value
and ot.profile_option_name = o.profile_option_name
and nvl(ot.language,'US') = 'US'
and sysdate between nvl(o.start_date_active, sysdate)
and nvl(o.end_date_active,sysdate)
and v.profile_option_value is not null
and ot.user_profile_option_name like 'PJI_%Debug%' order by 1

Friday, June 22, 2012

Query to find the concurrent program status which ran today


SELECT DISTINCT fcp.user_concurrent_program_name,
                fcp.concurrent_program_name,
                fcr.request_id,
                fcr.request_date,
                flv.meaning status,
                fcr.status_code,
                fcr.completion_text,
                fcr.logfile_name,
                fcr.outfile_name,
                fcr.argument_text
  FROM apps.fnd_concurrent_programs_vl fcp,
       apps.fnd_concurrent_requests    fcr,
       apps.fnd_lookup_values          flv
 WHERE fcr.concurrent_program_id = fcp.concurrent_program_id
   AND trunc(fcr.last_update_date) = trunc(SYSDATE)
   AND flv.lookup_code = fcr.status_code
   and fcp.user_concurrent_program_name = 'Program name'
   AND flv.lookup_type = 'CP_STATUS_CODE'
   AND flv.language = 'US'
 ORDER BY fcr.request_date,
          fcr.request_id DESC;
     

Friday, June 15, 2012

When responsibility added to user and it is not showing in the web based application then run the below query to see the responsibility added or not.





Newly added responsibilities not being shown is another symptom of this delay in Java Cache processing
Run the following script to verify that the data is correct:
set linesize 155;
set pagesize 200;
set verify off;

column USER_ID format 9999999999;
column RESP_ID format 9999999999;
column RESP_NAME format a60;
column RESP_APP_ID format 9999999999;
column SEC_GRP_ID format 9999999999;

select fu.user_id, fo.RESPONSIBILITY_ID resp_id, RESPONSIBILITY_NAME resp_name, fo.RESPONSIBILITY_APPLICATION_ID resp_app_id, fo.SECURITY_GROUP_ID sec_grp_id
from fnd_user_resp_groups fo, fnd_responsibility_vl fv, fnd_user fu
where fu.user_id=fo.user_id
and fu.user_name='<affected_user>'
and fo.RESPONSIBILITY_ID=fv.RESPONSIBILITY_ID
and fo.RESPONSIBILITY_APPLICATION_ID=fv.APPLICATION_ID; 

Tuesday, March 6, 2012

API to delete Template in OTL

begin
hxc_self_service_time_deposit.delete_timecard(37275916, sysdate, 'DELETE','OTL Deposit Process',null);
end;

API To Delete whole time card for the week in OTL

DECLARE
   -- Constant declarations
   l_otl_appl_id   CONSTANT NUMBER (3) := 809;            --OTL application id
   l_resp_appl_id           NUMBER (10) := 51102;      --OTL Responsibility id
   l_user_id                VARCHAR2 (20) := 120345; -- id from fnd_user table
BEGIN
   -- First initialize your session, this needs to be done for internal reasons so
   -- the TimeStore knows who is trying to deposit the information. When you log
   -- into SS, the same is done for you by the framework, here however we have to do
   -- it manually.
   FND_GLOBAL.
    APPS_INITIALIZE (user_id        => l_user_id,
                     resp_id        => l_resp_appl_id,
                     resp_appl_id   => l_otl_appl_id); -- This is the appl_id for OTL, do not change

   --
   --Delte time card API calling
   --
   hxc_timestore_deposit.DELETE_TIMECARD (p_building_block_id => 37275996); --p_building_block_id  is the timecard id with scope 'Timecard' and endate should be ''12/31/4712

   COMMIT;
END;

API To Delete timecard Detail(row wise) in OTL

DECLARE
-- Constant declarations
-- This is the appl_id for OTL, do not change
c_otl_appl_id CONSTANT NUMBER (3) := 809;
-- Variable declarations
-- declare the PL/SQL Table that will hold the complete timecard (all the BBs)
l_tbl_timecard_info hxc_self_service_time_deposit.timecard_info;

-- declare the PL/SQL Table that will hold all the attributes

l_tbl_attributes_info hxc_self_service_time_deposit.app_attributes_info;

-- declare the PL/SQL Table that will hold the messages returned by the API
l_tbl_messages hxc_self_service_time_deposit.message_table;
l_out_timecard_id hxc_time_building_blocks.time_building_block_id%TYPE;
l_out_timecard_ovn hxc_time_building_blocks.object_version_number%TYPE;
BEGIN
-- First initialize your session, this needs to be done for internal reasons so
-- the TimeStore knows who is trying to deposit the information. When you log
-- into SS, the same is done for you by the framework, here however we have to do
-- it manually.
FND_GLOBAL.APPS_INITIALIZE( user_id => 120345
,resp_id => 51102
,resp_appl_id => 809 );-- This is the appl_id for OTL, do not change
--xc_self_service_time_deposit.delete_timecard(37276080, sysdate, 'DELETE','OTL Deposit Process',null);
hxc_timestore_deposit.delete_detail_bb (
p_building_block_id =>37276080,
p_app_blocks=> l_tbl_timecard_info,
p_app_attributes=> l_tbl_attributes_info
);
hxc_timestore_deposit.execute_deposit_process (
p_validate=> FALSE,
p_app_blocks=> l_tbl_timecard_info,
p_app_attributes=> l_tbl_attributes_info,
p_messages=> l_tbl_messages,
p_mode=> 'SUBMIT',
p_deposit_process=> 'OTL Deposit Process',
p_timecard_id=> l_out_timecard_id,
p_timecard_ovn=> l_out_timecard_ovn
);
COMMIT;
END;

Tuesday, February 14, 2012

Delete time card API

hxc_timestore_deposit.DELETE_TIMECARD ( p_time_building_block_id => l_timecard_to_delete,);
p_time_building_block_id The id of the Time Building Block

Tuesday, February 7, 2012

Query to Get OTL Template information for particular user from Database

  SELECT ProjectNumber,
         TaskNumber,
         attribute1,
         attribute2,
         attribute3,
         MAX (monday) AS monday,
         MAX (tuesday) AS tuesday,
         MAX (wednesday) AS wednesday,
         MAX (thursday) AS thursday,
         MAX (friday) AS friday,
         MAX (saturday) AS saturday,
         MAX (sunday) AS sunday
    FROM (  SELECT ProjectNumber,
                   start_time,
                   TaskNumber,
                   attribute1,
                   attribute2,
                   attribute3,
                   DECODE (TRIM (day_of_week), 'Monday', measure, NULL) AS monday,
                   DECODE (TRIM (day_of_week), 'Tuesday', measure, NULL)
                      AS tuesday,
                   DECODE (TRIM (day_of_week), 'Wednesday', measure, NULL)
                      AS wednesday,
                   DECODE (TRIM (day_of_week), 'Thursday', measure, NULL)
                      AS thursday,
                   DECODE (TRIM (day_of_week), 'Friday', measure, NULL) AS friday,
                   DECODE (TRIM (day_of_week), 'Saturday', measure, NULL)
                      AS saturday,
                   DECODE (TRIM (day_of_week), 'Sunday', measure, NULL) AS sunday
              FROM (SELECT day_week.day_of_week,
                           Project_Id,
                           ProjectNumber,
                           measure,
                           start_time,
                           TaskNumber,
                           attribute1,
                           attribute2,
                           attribute3
                      FROM (  SELECT TRIM (TO_CHAR (SYSDATE + rown, 'Day'))
                                        AS day_of_week
                                FROM (SELECT ROWNUM rown
                                        FROM all_objects
                                       WHERE ROWNUM < 8)
                            ORDER BY DECODE (
                                        TRIM (TO_CHAR (SYSDATE + rown, 'Day')),
                                        'Monday', 1),
                                     DECODE (
                                        TRIM (TO_CHAR (SYSDATE + rown, 'Day')),
                                        'Tuesday', 2),
                                     DECODE (
                                        TRIM (TO_CHAR (SYSDATE + rown, 'Day')),
                                        'Wednesday', 3),
                                     DECODE (
                                        TRIM (TO_CHAR (SYSDATE + rown, 'Day')),
                                        'Thursday', 4),
                                     DECODE (
                                        TRIM (TO_CHAR (SYSDATE + rown, 'Day')),
                                        'Friday', 5),
                                     DECODE (
                                        TRIM (TO_CHAR (SYSDATE + rown, 'Day')),
                                        'Saturday', 6),
                                     DECODE (
                                        TRIM (TO_CHAR (SYSDATE + rown, 'Day')),
                                        'Sunday', 7)) day_week,
                           (SELECT DISTINCT pop.project_id,
                                            pop.project_number ProjectNumber,
                                            details.measure,
                                            days.start_time,
                                            pot.task_number TaskNumber,
                                            ta.attribute1,
                                            ta.attribute2,
                                            ta.attribute3
                              FROM hxc_time_attributes ta,
                                   hxc_time_attribute_usages tau,
                                   hxc_time_building_blocks days,
                                   hxc_time_building_blocks details,
                                   pa_online_projects_v pop,
                                   pa_online_tasks_v pot,
                                   pa_projects_all p,
                                   pa_tasks t
                             WHERE     details.resource_id = :1 --Resource_id(Person_id from per_all_people_f table)
                                   --  AND ABS (days.start_time - TO_DATE (:2, 'YYYY/MM/DD')) <= 21
                                   AND days.scope = 'DAY'
                                   AND DAYS.PARENT_building_block_id =:2 --33983243 --Template_id from hxc_template_summary---37272687
                                   AND days.date_to = hr_general.end_of_time
                                   AND details.scope = 'DETAIL'
                                   AND details.date_to = hr_general.end_of_time
                                    AND details.parent_building_block_id =
                                          days.time_building_block_id
                                   AND details.parent_building_block_ovn =
                                          days.object_version_number
                                   AND tau.time_building_block_id =
                                          details.time_building_block_id
                                   AND tau.time_building_block_ovn =
                                          details.object_version_number
                                   AND tau.time_attribute_id =
                                          ta.time_attribute_id
                                   AND ta.attribute_category = 'PROJECTS'
                                   AND TO_NUMBER (ta.attribute1) = pop.project_id
                                   AND TO_NUMBER (ta.attribute2) = pot.task_id
                                   AND pop.project_id = p.project_id
                                   AND pot.task_id = t.task_id) QRSLT
                     WHERE TRIM (TO_CHAR (QRSLT.start_time(+), 'Day')) =
                              day_week.day_of_week)
          ORDER BY projectnumber, start_time)
GROUP BY ProjectNumber,
         TaskNumber,
         attribute1,
         attribute2,
         attribute3

Tuesday, January 31, 2012

OTL submit and Save time card through API's

The timecards are first saved using p_mode = 'SAVE' (hxc_timestore_deposit.execute_deposit_process) and when the user is ready he submits his timecard using p_mode = 'SUBMIT'.


Sample code for submit and save the time cards.
DECLARE
  v_tbl_timecard_info         hxc_self_service_time_deposit.timecard_info;      
  v_tbl_attributes_info       hxc_self_service_time_deposit.app_attributes_info;
  v_tbv_messages              hxc_self_service_time_deposit.message_table;
  v_new_timecard_id           NUMBER; 
  v_new_timecard_ovn          NUMBER;
  i                           PLS_INTEGER;
  v_message                   fnd_new_messages.message_text%TYPE;
BEGIN
  FND_GLOBAL.APPS_INITIALIZE( user_id => 75375
                             ,resp_id => 65477       
                             ,resp_appl_id => 809 ); 
 
  hxc_timestore_deposit.update_building_block(p_building_block_id => 23717233,
                                              p_app_blocks        => v_tbl_timecard_info,
                                              p_app_attributes    => v_tbl_attributes_info);
 
  hxc_timestore_deposit.execute_deposit_process (
    p_validate        => FALSE,
    p_app_blocks      => v_tbl_timecard_info,
    p_app_attributes  => v_tbl_attributes_info,
    p_messages        => v_tbv_messages,
    p_mode            => 'SUBMIT',
    p_deposit_process => 'OTL Deposit Process',
    p_timecard_id     => v_new_timecard_id,
    p_timecard_ovn    => v_new_timecard_ovn);
 
  -- messages have been returned
  IF v_tbv_messages.COUNT != 0 THEN
    i := v_tbv_messages.FIRST;
    LOOP
      EXIT WHEN (NOT v_tbv_messages.EXISTS (i));
 
      -- First translate the message as the messagetable returned does not give the actual
      -- message, only the message_name which doesn't mean anything to the user.
      v_message := fnd_message.get_string (appin  => v_tbv_messages (i).application_short_name,
                                           namein => v_tbv_messages (i).message_name);
 
      -- returns 4: 4
      dbms_output.put_line(v_tbv_messages(i).message_name||': '||v_message);
 
      i := v_tbv_messages.NEXT (i);
    END LOOP;
  END IF;
END;

Tuesday, December 6, 2011

OTL Metalink Imp Notes

OIT to OTL Migration (Metalink, Note: 289674.1)
Oracle OTL HXC Time Store Deposit API (Metalink Note: 223987.1)
Oracle Time & Labor Implementation and User Guide (Metalink Note: 207333.1)
Oracle Time & Labor Mini-Pack About Documents
• HXT.G (Metalink Note: 258309.1)
• HXT.H (Metalink Note: 282087.1)
• HXT.I (Metalink Note: 303755.1)
• HXT.J (Metalink Note: 344022.1)
Oracle Time & Labor Timecard Configuration 11.5.10+ (Metalink Note: 304340.1; customers whose systems are not yet at the 11.5.10

OTL Imp Metalink note which will have all the setup details and API details of OTL

223987.1

Tuesday, November 29, 2011

OTL queries

Query to check if for a person a Timecard has been submitted or not for the start and stop time


SELECT time_building_block_id, object_version_number, start_time,
comment_text, created_by, creation_date, last_updated_by,
last_update_date, last_update_login
FROM hxc_time_building_blocks
WHERE resource_id = <employee id>
AND SCOPE = 'TIMECARD'
AND start_time = <Start Time>
AND stop_time = <stop Time>
AND date_to = hr_general.end_of_time;


Query to get the Complete Timecard Data:


SELECT *
FROM HXC_TIME_BUILDING_BLOCKS
WHERE date_to=hr_general.end_of_time
CONNECT BY prior time_building_block_id=parent_building_block_id
AND object_version_number=parent_building_block_ovn
START WITH time_building_block_id=< Timecard Id>
ORDER BY 1




Query to get all Attributes Information for a complete Timecard


SELECT htb.resource_id Person_id,
htb.start_time Start_time, htb.stop_time Stop_time,
htb2.time_building_block_id, hta.time_attribute_id,
htb2.measure, htb2.start_time, htb2.stop_time,
hta.Attribute_category
FROM hxc_time_building_blocks htb,
hxc_time_building_blocks htb1,
hxc_time_building_blocks htb2,
hxc_time_attribute_usages htau,
hxc_time_attributes hta
WHERE htb1.parent_building_block_id = htb.time_building_block_id
AND htb1.parent_building_block_ovn = htb.object_version_number
AND htb.date_to = hr_general.end_of_time
AND htb.SCOPE = 'TIMECARD'
AND htb1.SCOPE = 'DAY'
AND htb1.date_to = hr_general.end_of_time
AND htb2.parent_building_block_id = htb1.time_building_block_id
AND htb2.parent_building_block_ovn = htb1.object_version_number
AND htb2.SCOPE = 'DETAIL'
AND htb2.date_to = hr_general.end_of_time
AND htau.time_building_block_id = htb2.time_building_block_id
AND htau.time_building_block_ovn = htb2.object_version_number
AND htau.time_attribute_id = hta.time_attribute_id
AND TRUNC(htb.start_time) = <start Date>
AND TRUNC(htb.stop_time) = <End Date>
AND htb.resource_id = <resource_id>




Use the preference to get the setup for a particular resource id


hxc_preference_evaluation.resource_preferences
(<.Resource_id>,'TC_W_TCRD_LAYOUT',1,SYSDATE);


Table : hxc_pref_definitions
l_pref_table hxc_preference_evaluation.t_pref_table;


hxc_preference_evaluation.resource_preferences(<resource_id>,l_pref_table,sysdate);
l_index := l_pref_table.first;
LOOP
EXIT WHEN
(NOT l_pref_table.exists(l_index));
IF (l_pref_table(l_index).preference_code = 'TC_W_TCRD_LAYOUT') THEN ....
l_index := l_pref_table.next(l_index);
END LOOP;

Saturday, October 15, 2011

To Find the executable name and package name and application name of a concurrent program

 select fa.application_name, fe.executable_name,fe.execution_file_name package_name,
fcp.concurrent_program_id,fcpt.user_concurrent_program_name,fcp.concurrent_program_name
from fnd_executables fe,fnd_concurrent_programs fcp, fnd_concurrent_programs_tl fcpt, fnd_application_tl fa
where fe.executable_id = fcp.executable_id
and  fcp.concurrent_program_id = fcpt.concurrent_program_id
and fcp.concurrent_program_name in ( Concurrent program short name)
and fcp.application_id = fa.application_id

Monday, October 3, 2011

To Find the executable name and package name of a concurrent program

SELECT a.user_concurrent_program_name, b.executable_name,
      b.execution_file_name package_name
 FROM fnd_concurrent_programs_vl a, fnd_executables_vl b
WHERE a.executable_id = b.executable_id
  AND user_concurrent_program_name like    'Concurrent program name'
             

Saturday, October 1, 2011

Oracle Timecard (OTL) Automation

Oracle Timecard (OTL) Automation
--------------------------------------

Many companies have announced furlough for employees- meaning the offices and manufacturing units will be shutdonw for a specified amount of time and it will be mandatory for employees to either take that time off from their vacation time, flex time, may be borrow it from next year or simply be unpaid for that time period. Whatever be the case, it saves company a lot of money that it was otherwise obligated to pay in vacation time or paid days. Now because its mandatory, it has to be in the system for the payroll to pick it up.

If the organization uses time entry system – like oracle – to enter vacation/flex time, and processes payroll then following needs to happen in order for a succesfull furlough automation.

- Employees time must be entered on the online timecard.

- The timecard must be approved by manager or Auto-approval process.

- This OTL timecard must be transferred to Batch Element Entries for Payroll.

To automate this process we will use HXC Timecard APIs provided by Oracle. These APIs help us in creating a timecard for a day, week, and also attach elements/ projects to the timecard. Also, the APIs submit the timecard with a workflow process type so it can either be picked for AUTO processing or Manual approval.

Before we go into the details, we have to see how a typical timecard is built. For the sake of simplicity, we will consider Monthly Paid (exempt) employees.

A timecard is a combination of DAYS. Each DAY will be one Row in a table. For Every day that you need to enter time (e.g. Saturday Sunday will not need a time entry being a holiday) you need a DETAIL type row also. And, for each DETAIL record that has to go into an element or project for costing or payroll purpose, we need an ATTRIBUTE also.

These are nothing but the TIME BUILDING BLOCKS. To make things simple, lets go and see these records:

select * from hxc_time_building_blocks

TYPE: MEASURE ( Number of hours to be put in that particular day) or RANGE (For period like week or day).
SCOPE: TIMECARD, DAY, DETAIL or APPLICATION_PERIOD

Now, if you see a typical timecard, this is how it looks (Use the hierarchical Query below):

TIMECARD (12/1/2008  - 12/7/2008) TYPE: RANGE
|_  DAY (12/1/2008 – 12/1/2008) TYPE: RANGE
|_  DETAIL (12/1/2008):  8 HRS   (may have attributes)  TYPE:MEASURE
|_  DAY (12/2/2008 – 12/2/2008)
|_  DETAIL (12/2/2008):  8 HRS
|_  DAY (12/3/2008 – 12/3/2008)
|_  DETAIL (12/3/2008):  8 HRS
|_  DAY (12/4/2008 – 12/4/2008)
|_  DETAIL (12/4/2008):  8 HRS
|_  DAY (12/5/2008 – 12/5/2008)
|_  DETAIL (12/5/2008):  8 HRS
|_  DAY (12/6/2008 – 12/6/2008)
|_  DAY (12/7/2008 – 12/7/2008)

SELECT htbb.time_building_block_id, htbb.TYPE, htbb.measure, htbb.unit_of_measure, htbb.start_time, htbb.stop_time,htbb.parent_building_block_id, ‘N’ parent_is_new, htbb.SCOPE,htbb.object_version_number, htbb.approval_status,htbb.resource_id, htbb.resource_type, htbb.approval_style_id,htbb.date_from, htbb.date_to, htbb.comment_text,htbb.parent_building_block_ovn, ‘N’ NEW, ‘N’ changed,htbb.application_set_id, htbb.translation_display_key
FROM apps.hxc_time_building_blocks htbb START WITH ( htbb.time_building_block_id in (6848088) AND htbb.object_version_number in (1 ) )CONNECT BY PRIOR htbb.time_building_block_id = htbb. parent_building_block_id AND PRIOR htbb.object_version_number = htbb.parent_building_block_ovn ORDER BY htbb.time_building_block_id ASC

NOW Over to APIs….


hxc_timestore_deposit.create_timecard_bb
– Create a Timecard building block (only timecard, no days, or details)
– Here are the parameters it takes
(
p_start_time => to_date(’01-DEC-2008 00:00:00′,’DD-MON-YYYY HH24:MI:SS’) ,
p_stop_time =>  to_date(’07-DEC-2008 23:59:59′,’DD-MON-YYYY HH24:MI:SS’),
p_resource_id => emp.person_id ,
p_comment_text => ‘Automated TimeCard: DEC08′,
p_approval_style_id => 41, –This is your workflow approval style, default to AUTO APPROVE
p_app_blocks => l_tbl_timecard_info,
p_time_building_block_id => l_tc_bb_id –returns the id of  TC Building block
);

hxc_timestore_deposit.create_day_bb
– Creates a DAY building block (only DAY no details)
– Here are the parameters it takes
(
p_day => l_start_date,
p_parent_building_block_id => l_tc_bb_id,
p_comment_text => ‘Automated TimeCard: DEC08′,
p_app_blocks => l_tbl_timecard_info,
p_time_building_block_id => l_day_bb_id
);

hxc_timestore_deposit.create_detail_bb
– Creates a DETAIL building block, in next step we have to attach the attribute to this DETAIL
– Here are the parameters it takes
(
p_type => ‘MEASURE’,
p_measure => 8, –Number of Hours
p_parent_building_block_id => l_day_bb_id,
p_comment_text => ‘Automated TimeCard: DEC08′,
p_app_blocks => l_tbl_timecard_info,
p_app_attributes => l_tbl_attributes_info,
p_time_building_block_id => l_detail_bb_st_id
);
hxc_timestore_deposit.create_attribute (
p_building_block_id=> l_detail_bb_st_id,
p_attribute_name=> ‘Dummy Element Context’,
p_attribute_value=> ‘ELEMENT – 60110′, –This is the Accrual PTO Element we want to update through this API.
p_app_attributes=> l_tbl_attributes_info);

HXC_TIMESTORE_DEPOSIT.EXECUTE_DEPOSIT_PROCESS
–This is the Submission Call. This process will submit the timecard, days and details with attributes. Timecard will stay in SUBMITTED State until approved via Manual or AUTO Approve process.
(
p_validate => FALSE,
p_app_blocks => l_tbl_timecard_info,
p_app_attributes => l_tbl_attributes_info,
p_messages => l_tbl_messages,
p_mode => ‘SUBMIT’,
p_deposit_process => ‘OTL Deposit Process’,
p_retrieval_process => ‘BEE Retrieval Process’,
p_timecard_id => l_new_timecard_id,
p_timecard_ovn => l_new_timecard_ovn
);

Hope this article helped you in understanding the basics of the Time Entry APIs. Please note that this is  the initial and basic knowledge. You will need some more knowledge – like DELETE timecards API for rollback in case of any issues. UPDATE timecard APIs etc for a full fledge capability on OTL timecard automation.

Monday, September 26, 2011

How To Delete the Approve, Reject, and Request More Information Buttons from a Workflow E-mail Notificatin That Requires Response [ID 302214.1]


Applies to:

Oracle Workflow Cartridge - Version: 11.5.9 to 11.5.10.2 - Release: 11.5 to 11.5
Information in this document applies to any platform.
Checked for relevance on 06-JUL-2011

Goal

How to Delete the Approve, Reject, and Request More Information Buttons from wokflow e-mail notifications.
Need only 'Click Here to Respond' link in order to sign into applications and access the Notifications Detail web page.
Client e-mail software does not interpret correctly the mailto tag.

Solution

1. To change the message template for ALL the notification messages requesting a response, this is the solution.
Change the  Open Notification Template parameter value for Workflow Notification Mailer.
Change the Open Notification Template from Workflow Open Mail (Templated) to Workflow Open
Mail for Outlook Express.
a. Go to Oracle Applications Manager (OAM).
b. Navigate to WF Manager.
c. Select Service Components Link.
d. Select Workflow Notification Mailer Link.
e. EDIT
f. Advance until step #4.
g. Change the the Open Notification Template from Workflow Open Mail (Templated) to Workflow Open
Mail for Outlook Express.
h. Save the changes and re-start the workflow mailer.

OR
2. To hide the 'Request More Information' link in the workflow notifications (generally in the approval workflows), do the following:
- Open the workflow builder.
- Get connected to the database.
- Open your workflow.
- Open the workflow process in which we want remove this link.
- Expand: Messages in this process.
- Goto appropriate message of the notification.
- Do right click and select 'New Attribute'.
- Enter the following data:
1. Internal Name: #HIDE_MOREINFO
2. Display Name: Request Information
3. Description: Request Information
4. Value: Y.
- Click APPLY.
- Save the workflow process definition into the database.


Next time a requisition is sent for approval, the Request More Information button will be hidden.

NOTE: This is considered a customization, if any patch overwrite this workflow, the
customization above will be lost.

Please check the PART NO: B10284-02 (Oracle Workflow Developer's Guide) for more information.

Sunday, September 25, 2011

Oracle Financials GL AP AR etc & CRM documents

http://apps2fusion.com/apps-training/apps-functional-documents/gl-ap-ar-iproc-po-fa-iexpenses