Search This Blog

Wednesday, July 27, 2011

How to setup a forms function in R12 to launch an URL

First set the Profile 'Restricted Text Input' to 'No' for your User.

Then create a form function like below:

Functional Administrator > Core Services > Function > Create (button)

Name: XX_GOOGLE
Code: XX_GOOGLE
Type: SSWA jsp function
Maintenance Mode Support : none
Context Dependance: Responsibility
(press continue button)
HTML Call: javascript:void window.open("http://www.google.com")
Leave other fields blank

Add to HR_EMPLOYEE_DIRECT_ACCESS_V4.0 menu:

500 XX Google XX_GOOGLE

This will pop up your external webpage in a new window.

The issue is that it only works from the Navigator framework page (not from within Core Forms)

Cheerssss!!!

Tuesday, July 19, 2011

Bulk Password Change Script

After running below script, system will ask you to change the password.
begin
fnd_user_pkg.updateuser(
x_user_name => '204020779'
, x_owner => 'CUST'
, x_unencrypted_password => 'change123',
x_password_date => to_date('2','J')
);
commit;
end;

After running below script, system will not ask you to change the password.

BEGIN
FND_USER_PKG.UPDATEUSER(x_user_name            => 'teamsearch'
                       ,x_owner                => 'SEED'
                       ,x_unencrypted_password => 'oracle@123'
                       ,x_password_date        => SYSDATE + 500);

END;


Self - Service Persanalization Profiles

1. Personalize Self-Service Defn
2. FND: Personalization Region Link Enabled

Tuesday, June 28, 2011

Changing Hire Date of Employee

Scenario: Current emp data in the system has wrong DOJ, need to correct for all the employees:

CREATE
TABLE XXHR_EMP_DOJ(PERSON_ID NUMBER,ORACLE_START_DATE DATE,ACTUAL_START_DATE DATE);
DECLARE
CURSOR cur_dataISSELECT papf.employee_number, dej.person_id,papf

.start_date oracle_start_date, dej.actual_start_dateFROM xxhr_emp_doj dej, per_all_people_f papfWHERE papf.person_id = dej.person_id;o_warn_ee
BEGIN
VARCHAR2 (20);
FOR i IN cur_dataLOOPBEGIN
hr_change_start_date_api.update_start_date(p_validate => FALSE,p_person_id => i.person_id,p_old_start_date => i.oracle_start_date,p_new_start_date => i.actual_start_date,p_update_type => 'E',p_applicant_number => NULL,p_warn_ee
=> o_warn_ee);DBMS_OUTPUT.put_line ( 'Success - Employee Number:'|| i
.employee_number);EXCEPTIONWHEN OTHERSTHENDBMS_OUTPUT.put_line ( 'Error Employee Number:'|| i
||
.employee_number' Message -'|| SQLERRM);END;
END;
END LOOP;

Copy data from one database to another

Copy Command:

SQL> COPY FROM apps/xxxx@uat TO apps/xxxx@prod INSERT XXHR_EMP_DOJ USING SELECT * FROM XXHR_EMP_DOJ;

Tuesday, June 7, 2011

Cannot end date or delete the element in Oracle Payroll

Cannot end date or delete the element in Oracle Payroll:

Requirement: When I am trying to end date the element as of 01-Jan-2010 it is giving me the following error:

APP-PAY-06213: Formula result rule use this input value
Check you formula result rules for indirect results that feed this input value.
Solution:
Please run this updated query to see if there is any run results attached to the element.
SELECT  ET.ELEMENT_NAME,psp.PROCESSING_RULE, ff.FORMULA_NAME, pfr.RESULT_NAME,
pfr.RESULT_RULE_TYPE, et1.ELEMENT_NAME et_to_end_date,iv.NAME,iv.UOM, et.REPORTING_NAME,RESULT_RULE_TYPE ,
Psp.EFFECTIVE_START_DATE rule_start_date,PSP.EFFECTIVE_END_DATE rule_end_date
FROM
PAY_STATUS_PROCESSING_RULES_F psp,
PAY_FORMULA_RESULT_RULES_F pfr,
ff_formulas_f ff,
PAY_ELEMENT_TYPES_F ET,
PAY_ELEMENT_TYPES_F ET1,
PAY_INPUT_VALUES_F IV
WHERE
psp.FORMULA_ID=ff.FORMULA_ID
AND pfr.STATUS_PROCESSING_RULE_ID=psp.STATUS_PROCESSING_RULE_ID
AND et.ELEMENT_TYPE_ID=psp.ELEMENT_TYPE_ID
AND et1.ELEMENT_TYPE_ID=pfr.ELEMENT_TYPE_ID
AND iv.INPUT_VALUE_ID=pfr.INPUT_VALUE_ID
--AND pfr.RESULT_RULE_TYPE = 'I'
AND ET1.ELEMENT_NAME = --'Pension Adjustment'

Wednesday, May 18, 2011

Dynamic alert recipient list (Oracle Alerts)

Scenario:
I want to send an alert to a recipient that is identified by the output of the alert SQL.
Solution:
Enter variables from the select into the recipient list and subject header