Search This Blog

Saturday, July 16, 2016

View Notifications of Others Users/Roles or monitor status of Workflow for users having Workflow Administrator Responsibility.

To enable to View Notifications of Others Users/Roles or monitor status of Workflow for users having  Workflow Administrator Responsibility.
Please follow any of below two procedures.

1. Attached screenshots Log in with SYSADMIN user.
Workflow Administrator Resp>Administrator Workflow>Administration





Update the field

*Workflow System Administrator - Workflow Administrator 
                                                                       'FND_RESP|FND|FNDWF_ADMIN|STANDARD

or

2.
UPDATE WF_RESOURCES
SET TEXT='FND_RESP|FND|FNDWF_ADMIN|STANDARD'
WHERE NAME = 'WF_ADMIN_ROLE'
commit

Adding new OU's to existing Supplier Site in Oracle R12.1.3 Payables


1. For single Supplier .
2. For All suppliers based on single OU adding to other new OU.


--------------------------------------------------------------------------------------------
 1. For single Supplier .

DECLARE
CURSOR c_vendor_sites IS
SELECT vendor_site_code,
vendor_id,
org_id,
party_site_id,
address_line1,
address_line2,
address_line3,
address_line4,
city,
state,
zip,
province,
county,
country,
area_code,
phone,
fax_area_code,
fax,
email_address,
purchasing_site_flag,
pay_site_flag,
rfq_only_site_flag,
hold_all_payments_flag,
duns_number,location_id
FROM ap_supplier_sites_all
WHERE vendor_site_id = 590615; -- used to create a new vendor site in a different OU

l_vendor_site_rec ap_vendor_pub_pkg.r_vendor_site_rec_type;
l_vendor_rec_type ap_vendor_pub_pkg.r_vendor_rec_type;
p_api_version NUMBER := 1;
p_commit VARCHAR2(1) := FND_API.G_TRUE;
x_return_status VARCHAR2(1);
x_msg_count NUMBER;
x_msg_data VARCHAR2(2000);
x_vendor_site_id NUMBER;
x_party_site_id NUMBER;
x_location_id NUMBER;
v_vendor_id NUMBER;

BEGIN
FOR r_site IN c_vendor_sites LOOP
v_vendor_id := r_site.vendor_id;

l_vendor_site_rec.vendor_id := r_site.vendor_id;
l_vendor_site_rec.vendor_site_code := r_site.vendor_site_code;
l_vendor_site_rec.org_id := 246; -- Target ORG ID where the new Site will be created
l_vendor_site_rec.party_site_id := r_site.party_site_id;
l_vendor_site_rec.location_id := r_site.location_id ;
l_vendor_site_rec.address_line1 := r_site.address_line1;
l_vendor_site_rec.address_line2 := r_site.address_line2;
l_vendor_site_rec.address_line3 := r_site.address_line3;
l_vendor_site_rec.address_line4 := r_site.address_line4;
l_vendor_site_rec.state := r_site.state;
l_vendor_site_rec.zip := r_site.zip;
l_vendor_site_rec.province := r_site.province;
l_vendor_site_rec.county := r_site.county;
l_vendor_site_rec.country := r_site.country;
l_vendor_site_rec.area_code := r_site.area_code;
l_vendor_site_rec.phone := r_site.phone;
l_vendor_site_rec.fax_area_code := r_site.fax_area_code;
l_vendor_site_rec.fax := r_site.fax;
l_vendor_site_rec.email_address := r_site.email_address;
l_vendor_site_rec.purchasing_site_flag := r_site.purchasing_site_flag;
l_vendor_site_rec.pay_site_flag := r_site.pay_site_flag;
l_vendor_site_rec.rfq_only_site_flag := r_site.rfq_only_site_flag;
l_vendor_site_rec.hold_all_payments_flag := r_site.hold_all_payments_flag;
l_vendor_site_rec.duns_number := r_site.duns_number;
--l_vendor_site_rec.language := 'AMERICAN'; --- Language
--l_vendor_site_rec.address_style := 'POSTAL_ADDR_US'; --- Address Style of the country which needs to be done. Take address style code of the specific country
--DBMS_OUTPUT.PUT_LINE( l_vendor_site_rec.party_site_id );
ap_vendor_pub_pkg.create_vendor_site(p_api_version => p_api_version,
p_commit => p_commit,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_vendor_site_rec => l_vendor_site_rec,
x_vendor_site_id => x_vendor_site_id,
x_party_site_id => x_party_site_id,
x_location_id => x_location_id);

IF x_return_status = fnd_api.g_ret_sts_success THEN
DBMS_OUTPUT.PUT_LINE('Vendor Site Created.');
DBMS_OUTPUT.PUT_LINE('New Vendor Site id is : ' || x_vendor_site_id);
DBMS_OUTPUT.PUT_LINE('New Party Site id is : ' || x_party_site_id);
DBMS_OUTPUT.PUT_LINE('New Location Id is : ' || x_location_id);
ELSE
DBMS_OUTPUT.PUT_LINE('Return Status ' || x_return_status );
DBMS_OUTPUT.PUT_LINE('Error Details');
DBMS_OUTPUT.PUT_LINE( x_msg_count );
DBMS_OUTPUT.PUT_LINE( x_msg_data );
END IF;
END LOOP; END;

--------------------------------------------------------------------










2. For All suppliers based on single OU adding to other new Two OU's.

DECLARE

CURSOR c_vendor_sites IS

SELECT vendor_site_code,
apsa.vendor_id, vendor_site_id,
org_id,
party_site_id,
address_line1,
address_line2,
address_line3,
address_line4,
city,
state,
zip,
province,
county,
country,
area_code,
phone,
fax_area_code,
fax,
email_address,
purchasing_site_flag,
pay_site_flag,
rfq_only_site_flag,
apsa.hold_all_payments_flag,
duns_number,location_id
FROM ap_supplier_sites_all apsa, ap_suppliers aps
where apsa.vendor_id = aps.vendor_id--vendor_id = 577807
and apsa.org_id = 102
 --apsa.org_id not in (1601)
and aps.enabled_flag = 'Y';

l_vendor_site_rec ap_vendor_pub_pkg.r_vendor_site_rec_type;
l_vendor_rec_type ap_vendor_pub_pkg.r_vendor_rec_type;
p_api_version NUMBER := 1;
p_commit VARCHAR2(1) := FND_API.G_TRUE;
x_return_status VARCHAR2(1);
x_msg_count NUMBER;
x_msg_data VARCHAR2(2000);
x_vendor_site_id NUMBER;
x_party_site_id NUMBER;
x_location_id NUMBER;
v_vendor_id NUMBER;

BEGIN
FOR r_site IN c_vendor_sites LOOP
v_vendor_id := r_site.vendor_id;

l_vendor_site_rec.vendor_id := r_site.vendor_id;
l_vendor_site_rec.vendor_site_code := r_site.vendor_site_code;
l_vendor_site_rec.org_id := 246; -- Target ORG ID where the new Site will be created
l_vendor_site_rec.party_site_id := r_site.party_site_id;
l_vendor_site_rec.location_id := r_site.location_id ;
l_vendor_site_rec.address_line1 := r_site.address_line1;
l_vendor_site_rec.address_line2 := r_site.address_line2;
l_vendor_site_rec.address_line3 := r_site.address_line3;
l_vendor_site_rec.address_line4 := r_site.address_line4;
l_vendor_site_rec.state := r_site.state;
l_vendor_site_rec.zip := r_site.zip;
l_vendor_site_rec.province := r_site.province;
l_vendor_site_rec.county := r_site.county;
l_vendor_site_rec.country := r_site.country;
l_vendor_site_rec.area_code := r_site.area_code;
l_vendor_site_rec.phone := r_site.phone;
l_vendor_site_rec.fax_area_code := r_site.fax_area_code;
l_vendor_site_rec.fax := r_site.fax;
l_vendor_site_rec.email_address := r_site.email_address;
l_vendor_site_rec.purchasing_site_flag := r_site.purchasing_site_flag;
l_vendor_site_rec.pay_site_flag := r_site.pay_site_flag;
l_vendor_site_rec.rfq_only_site_flag := r_site.rfq_only_site_flag;
l_vendor_site_rec.hold_all_payments_flag := r_site.hold_all_payments_flag;
l_vendor_site_rec.duns_number := r_site.duns_number;
--l_vendor_site_rec.language := 'AMERICAN'; --- Language
--l_vendor_site_rec.address_style := 'POSTAL_ADDR_US'; --- Address Style of the country which needs to be done. Take address style code of the specific country
--DBMS_OUTPUT.PUT_LINE( l_vendor_site_rec.party_site_id );
ap_vendor_pub_pkg.create_vendor_site(p_api_version => p_api_version,
p_commit => p_commit,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data,
p_vendor_site_rec => l_vendor_site_rec,
x_vendor_site_id => x_vendor_site_id,
x_party_site_id => x_party_site_id,
x_location_id => x_location_id);

IF x_return_status = fnd_api.g_ret_sts_success THEN
DBMS_OUTPUT.PUT_LINE('Vendor Site Created.');
DBMS_OUTPUT.PUT_LINE('New Vendor Site id is : ' || x_vendor_site_id);
DBMS_OUTPUT.PUT_LINE('New Party Site id is : ' || x_party_site_id);
DBMS_OUTPUT.PUT_LINE('New Location Id is : ' || x_location_id);
ELSE
DBMS_OUTPUT.PUT_LINE('Return Status ' || x_return_status );
DBMS_OUTPUT.PUT_LINE('Error Details');
DBMS_OUTPUT.PUT_LINE( x_msg_count );
DBMS_OUTPUT.PUT_LINE( x_msg_data );
END IF;
END LOOP;
END;



SSHR View SIT Details before/After Approval from backend.

SELECT SEGMENT1, SEGMENT2, SEGMENT3
 --SEGMENT1, SEGMENT2 ALREADY DATE EXISTS, NOW WE ARE GOING TO UPDATE SEGMENT3
FROM  PER_ANALYSIS_CRITERIA   
WHERE ANALYSIS_CRITERIA_ID = 4593109

SEGMENT1        SEGMENT2        SEGMENT3
09-AUG-2015     23-AUG-2015     <NULL>


SSHR>update ABVOVE SIT, UPDATE THE SEGMENT3 WITH 24-Aug-2015 AND SUBMITTED FOR APPROVAL.
NOTIFICATION_ID = 9482183


0. WF_NOTIFICATIONS

SELECT ITEM_kEY FROM WF_NOTIFICATIONS
WHERE NOTIFICATION_ID = 9482183

 ITEM_KEY = 9702

1. HR_API_TRANSACTIONS

SELECT * FROM HR_API_TRANSACTIONS
WHERE ITEM_KEY = 9702

TRANSACTION_ID = 68093

2. HR_API_TRANSACTION_STEPS

SELECT * FROM HR_API_TRANSACTION_STEPS
WHERE TRANSACTION_ID = 68093

TRANSACTION_STEP_ID = 69242

3. HR_API_TRANSACTION_VALUES - join the TABLE WITH HR_API_TRANSACTION_STEPS TABLE USING COLUMN TRANSACTION_STEP_ID.

SELECT * FROM HR_API_TRANSACTION_VALUES
WHERE TRANSACTION_STEP_ID = 69242

JOIN THE TABLE

SELECT TRANSACTION_VALUE_ID  , NUMBER_VALUE
FROM HR_API_TRANSACTION_VALUES HRVALUE, HR_API_TRANSACTION_STEPS HRSTEPS
WHERE HRVALUE.TRANSACTION_STEP_ID = HRSTEPS.TRANSACTION_STEP_ID
AND HRVALUE.TRANSACTION_STEP_ID = 69242
AND NAME = 'P_ANALYSIS_CRITERIA_ID'

TRANSACTION_VALUE_ID = 66655
NUMBER_VALUE = 4961894 -- ANALYSIS_CRITERIA_ID

4. PER_ANALYSIS_CRITERIA

SELECT * FROM PER_ANALYSIS_CRITERIA    WHERE ANALYSIS_CRITERIA_ID = 4961894

SEGMENT3
24-Aug-2015

DATA EXISTS IN THE PER_ANALYSIS_CRITERIA  BUT CANT VIEW IN THE FRONT END BECOZ THE PER_PERSON_ANALYSES DOESNT HAVE THE ENTRY.

5. once final approval done.

ENTRY WILL BE EXISTS IN THE PER_PERSON_ANALYSES.

Sunday, July 10, 2016

How To Get Parent And Child Tables In Oracle

This query gives list of children tables of a given table:

SELECT p.table_name PARENT_TABLE, c.table_name CHILD_TABLE
FROM user_constraints p, user_constraints c
WHERE (p.constraint_type = 'P' OR p.constraint_type = 'U')
AND c.constraint_type = 'R'
AND p.constraint_name = c.r_constraint_name
AND p.table_name = UPPER('&tab');

And this one gives list of parent tables of a given table:

SELECT p.table_name PARENT_TABLE, c.table_name CHILD_TABLE
FROM user_constraints p, user_constraints c
WHERE (p.constraint_type = 'P' OR p.constraint_type = 'U')
AND c.constraint_type = 'R'
AND p.constraint_name = c.r_constraint_name
AND p.table_name = UPPER('&tab');


Useful Point: For apps schema we cant get result as they r synonyms, need to go owner of table schema and run the above query.

Reference:http://www.oracleinformation.com/2014/09/how-to-get-parent-and-child-tables-in.html

Requirement: To enable Supervisor/Manager to update the SIT of Employees under him/her.

Creating Function SIT for SSHR Manager Responsibility:

Requirement: To enable Supervisor/Manager to update the SIT of Employees under him/her.

1. Copy the Function of SIT attached Employee Self Service. Eg: HR_SIT_JD

2. Create new Function as below

Function: HR_SIT_MGR_JD

Name: Join Date Form Manager

Properties Tab&gt;Type&gt; SSWA jsp function

Form Tab&gt;Parameters&gt; pCalledFrom=HR_SIT_JD&amp;addBreadCrumb=Y

Web HTML&gt;HTML Call&gt;

OA.jsp?akRegionCode=HR_PERSON_TREE_TOP_SS&amp;akRegionApplicationId=800

3. Add the above creation function to the Menu of SSHR Manager Resp, its done.

Useful Notes:

Just change the above function name in Bold, rest of all need to be same.