Tuesday, August 25, 2009

Setup to enable Effective Date Tracking popup in Oracle HRMS

This setup will turn on the switch that allows the effective date tracking in HRMS to pop up when someone navigates into Oracle employee record so that users do not forget to date track.

Navigation: Application Developer -> Profile -> System
Uncheck Site and check the Application
Application Field: Human Resources
Profile field : DateTrack:Reminder



Press the find button and then a screen will popup



In the Application field where we have the white background we need to give the value as ‘Always pop warning window’ and then save the form.



Saturday, August 22, 2009

How to change the Address Style from US to Generic Addess Style in Oracle HRMS

Select any HRMS or Super HRMS Manager Responsibility (Example: US Super HRMS Manager)

1. Open the 'Define Taskflow' form. ( Security -> Task Flow Definitions )
2. Query the Taskflow that is used by the Person form function (For Example: 'US HR PERSON TASKFLOW').
3. Go to 'Node section – Name field' and delete the 'USADDRESS' node (This node is used by the US Address Style) and then add a new node 'ADDRESS' (This node is used by the international Address Style) with the same sequence number as the 'USADDRESS' node.

Save and Exit the “Define Taskflow” form.

Logout the current applications and re-login to check that the new Address form with international address style is launched instead of old US Address Style form when “Address” button is selected in People Window.

Sunday, August 16, 2009

Single record insert script for Engineering Change Orders

DECLARE
p_eco_rec eng_eco_pub.eco_rec_type;
p_eco_revision_tbl eng_eco_pub.eco_revision_tbl_type;
p_revised_item_tbl eng_eco_pub.revised_item_tbl_type;
p_rev_component_tbl bom_bo_pub.rev_component_tbl_type;
p_ref_designator_tbl bom_bo_pub.ref_designator_tbl_type;
p_sub_component_tbl bom_bo_pub.sub_component_tbl_type;
x_return_status VARCHAR2 (10);
x_msg_count NUMBER;
x_message_list error_handler.error_tbl_type;
x_eco_rec eng_eco_pub.eco_rec_type;
x_eco_revision_tbl eng_eco_pub.eco_revision_tbl_type;
x_revised_item_tbl eng_eco_pub.revised_item_tbl_type;
x_rev_component_tbl bom_bo_pub.rev_component_tbl_type;
x_ref_designator_tbl bom_bo_pub.ref_designator_tbl_type;
x_sub_component_tbl bom_bo_pub.sub_component_tbl_type;
x_rev_operation_tbl bom_rtg_pub.rev_operation_tbl_type;
x_rev_op_resource_tbl bom_rtg_pub.rev_op_resource_tbl_type;
x_rev_sub_resource_tbl bom_rtg_pub.rev_sub_resource_tbl_type;
x_change_line_tbl eng_eco_pub.change_line_tbl_type;
l_change_line_tbl eng_eco_pub.change_line_tbl_type;
error_msg error_handler.error_tbl_type;
BEGIN
p_eco_rec.eco_name := 'ECO009';
p_eco_rec.organization_code := 'V1';
p_eco_rec.change_name := 'A Test ECO History';
p_eco_rec.description := 'A Test ECO History';
p_eco_rec.status_name := 'Scheduled';
p_eco_rec.approval_status_name := 'Approved';
p_eco_rec.approval_date := SYSDATE;
p_eco_rec.approval_request_date := SYSDATE;
p_eco_rec.change_type_code := 'ECO';
p_eco_rec.transaction_type := 'CREATE';
p_eco_rec.plm_or_erp_change := 'ERP';

-----ECO REVISIONS
IF p_eco_revision_tbl.EXISTS (1) IS NOT NULL
THEN
p_eco_revision_tbl.DELETE;
END IF;

p_eco_revision_tbl (1).eco_name := 'ECO009';
p_eco_revision_tbl (1).organization_code := 'V1';
p_eco_revision_tbl (1).revision := 'A';
p_eco_revision_tbl (1).transaction_type := 'CREATE';

-----REVISED ITEMS
IF p_revised_item_tbl.EXISTS (1) IS NOT NULL
THEN
p_revised_item_tbl.DELETE;
END IF;

p_revised_item_tbl (1).eco_name := 'ECO009';
p_revised_item_tbl (1).organization_code := 'V1';
p_revised_item_tbl (1).revised_item_name := 'ASO0012';
p_revised_item_tbl (1).start_effective_date := SYSDATE;
p_revised_item_tbl (1).new_effective_date := SYSDATE + 2;
p_revised_item_tbl (1).transaction_type := 'CREATE';

/* ----history
l_change_line_tbl (1).eco_name := 'ECO002';
l_change_line_tbl (1).scheduled_date := SYSDATE;
l_change_line_tbl (1).assignee_name := '60805 Open';
l_change_line_tbl (1).transaction_type := 'CREATE';
p_revised_item_tbl (1).reschedule_comments := 'Testing revised items';
*/ ---COMPONENT------------
IF p_rev_component_tbl.EXISTS (1) IS NOT NULL
THEN
p_rev_component_tbl.DELETE;
END IF;

p_rev_component_tbl (1).eco_name := 'ECO009';
p_rev_component_tbl (1).organization_code := 'V1';
p_rev_component_tbl (1).revised_item_name := 'ASO0012';
p_rev_component_tbl (1).start_effective_date := SYSDATE;
p_rev_component_tbl (1).operation_sequence_number := 1;
p_rev_component_tbl (1).component_item_name := '060 1918';
p_rev_component_tbl (1).acd_type := 1;
p_rev_component_tbl (1).old_operation_sequence_number := 1;
p_rev_component_tbl (1).new_operation_sequence_number := 1;
p_rev_component_tbl (1).transaction_type := 'CREATE';

-----REFERENCE DESIGNATOR-------------
IF p_ref_designator_tbl.EXISTS (1) IS NOT NULL
THEN
p_ref_designator_tbl.DELETE;
END IF;

p_ref_designator_tbl (1).eco_name := 'ECO009';
p_ref_designator_tbl (1).organization_code := 'V1';
p_ref_designator_tbl (1).revised_item_name := 'ASO0012';
p_ref_designator_tbl (1).start_effective_date := SYSDATE;
p_ref_designator_tbl (1).operation_sequence_number := 1;
p_ref_designator_tbl (1).component_item_name := '060 1918';
p_ref_designator_tbl (1).reference_designator_name := 'ECO009_dsg';
p_ref_designator_tbl (1).acd_type := 1;
p_ref_designator_tbl (1).transaction_type := 'CREATE';
----- SUBSTITUTE COMPONENT ----------------
IF p_sub_component_tbl.EXISTS (1) IS NOT NULL
THEN
p_sub_component_tbl.DELETE;
END IF;

p_sub_component_tbl (1).eco_name := 'ECO009';
p_sub_component_tbl (1).organization_code := 'V1';
p_sub_component_tbl (1).revised_item_name := 'ASO0012';
p_sub_component_tbl (1).start_effective_date := SYSDATE;
p_sub_component_tbl (1).operation_sequence_number := 1;
p_sub_component_tbl (1).component_item_name := '060 1918';
p_sub_component_tbl (1).substitute_component_name := '10-016-0063';
p_sub_component_tbl (1).new_substitute_component_name := '10-016-0063';
p_sub_component_tbl (1).acd_type := 1;
p_sub_component_tbl (1).transaction_type := 'CREATE';
p_sub_component_tbl (1).row_identifier := NULL;
--fnd_client_info.set_org_context (204);

fnd_global.apps_initialize (1007941, 20567, 703);
DBMS_OUTPUT.put_line ('Before API');


eng_eco_pub.process_eco (p_api_version_number => 1.0,
p_init_msg_list => FALSE,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
p_bo_identifier => 'ECO',
p_eco_rec => p_eco_rec,
p_eco_revision_tbl => p_eco_revision_tbl,
p_change_line_tbl => l_change_line_tbl,
p_revised_item_tbl => p_revised_item_tbl,
p_rev_component_tbl => p_rev_component_tbl,
p_ref_designator_tbl => p_ref_designator_tbl,
p_sub_component_tbl => p_sub_component_tbl,
p_rev_operation_tbl => x_rev_operation_tbl,
p_rev_op_resource_tbl => x_rev_op_resource_tbl,
p_rev_sub_resource_tbl => x_rev_sub_resource_tbl,
x_eco_rec => x_eco_rec,
x_eco_revision_tbl => x_eco_revision_tbl,
x_change_line_tbl => x_change_line_tbl,
x_revised_item_tbl => x_revised_item_tbl,
x_rev_component_tbl => x_rev_component_tbl,
x_ref_designator_tbl => x_ref_designator_tbl,
x_sub_component_tbl => x_sub_component_tbl,
x_rev_operation_tbl => x_rev_operation_tbl,
x_rev_op_resource_tbl => x_rev_op_resource_tbl,
x_rev_sub_resource_tbl => x_rev_sub_resource_tbl,
p_debug => 'N',
p_output_dir => NULL,
p_debug_filename => 'ECO_BO_Debug.log'
);
DBMS_OUTPUT.put_line ('Return Status ' || x_return_status);

IF (x_return_status <> fnd_api.g_ret_sts_success)
THEN
error_handler.get_message_list (x_message_list);

FOR i IN 1 .. x_msg_count
LOOP
error_msg (i).MESSAGE_TEXT := x_message_list (i).MESSAGE_TEXT;
DBMS_OUTPUT.put_line (error_msg (i).MESSAGE_TEXT);
END LOOP;
END IF;

COMMIT;
END;
/

Base Tables and views involved:
ENG_ENGINEERING_CHANGES, ENG_CHANGE_ORDER_REVISIONS, ENG_REVISED_ITEMS, BOM_REFERENCE_DESIGNATORS, BOM_BILL_OF_MATERIALS, BOM_INVENTORY_COMPONENTS, BOM_SUBSTITUTE_COMPONENTS

Single Record script to load Customer Cross Reference

INSERT INTO mtl_ci_interface
(customer_id,
customer_item_number,
commodity_code,
item_definition_level, process_flag, process_mode,
inactive_flag, transaction_type, lock_flag,
last_updated_by, created_by, last_update_date,
creation_date
)
VALUES (1290,
'Test_customer_item2',
'Finished Good',
1, 1, 1,
'2', 'CREATE', 'N',
1007941, 1007941, SYSDATE,
SYSDATE
);

commit;

---After inserting customer items into the interface table
---run the Import program Import Customer Items
---Navigation to run the program: Inventory--> Reports --> All.
---Parameters: Abort On Error=N, Delete Record =Y
---After running import program verify the base table MTL_CUSTOMER_ITEMS

INSERT INTO mtl_ci_xrefs_interface
(customer_id,
customer_item_number,
preference_number,
inventory_item,
master_organization_id,
item_definition_level, process_flag, process_mode,
inactive_flag, transaction_type, lock_flag,
last_updated_by, created_by, last_update_date,
creation_date
)
VALUES (1290,
'Test_customer_item2',
1,
'MC31324',
204,
1, 1, 1,
'2', 'CREATE', 'N',
1007941,1007941, SYSDATE,
SYSDATE
);

commit;

---After inserting customer items cross references into the interface table
---run the Import program, Import Customer Item Cross References
---Navigation to run the program: Inventory--> Reports --> All.
---Parameters: Abort On Error=N, Delete Record =Y
---After running import program verify the base table MTL_CUSTOMER_ITEM_XREFS

Single insert script for PO Quotations

INSERT INTO po_headers_interface
(interface_header_id, batch_id, action, document_type_code,
document_subtype, vendor_id, vendor_site_id, org_id,
currency_code, rate, rate_type_code, agent_id,
bill_to_location_id, approval_status, approved_date, created_by,
creation_date, last_updated_by, last_update_date, comments,
attribute11, quote_warning_delay
)
VALUES (po_headers_interface_s.NEXTVAL, 5, 'ORIGINAL', 'QUOTATION',
'STANDARD', 8943, 4754, 204,
'USD', NULL, NULL, 2159,
204, 'APPROVED', SYSDATE, 1007941,
SYSDATE, 1007941, SYSDATE, 'test_po_for_status',
NULL, 10
);

COMMIT ;

INSERT INTO po_lines_interface
(interface_line_id, interface_header_id,
action, line_type, line_num, item_id, item,
item_description, uom_code,
quantity, unit_price, created_by, creation_date,
last_updated_by, last_update_date, line_attribute11
)
VALUES (po_lines_interface_s.NEXTVAL, po_headers_interface_s.CURRVAL,
'ORIGINAL', 'Goods', 1, 8063, '10-40W Oil',
'10-40W Car / Truck Motor Oil', 'QT',
2, 0.89, 1007941, SYSDATE,
1007941, SYSDATE, NULL
);

COMMIT ;

After inserting into interface tables, run the import program

Import Price Catalogs.
Navigation: Purchasing: Requests

Parameters:
1. Document Type = QUOTATION
2. Create or Update Items= NO
3. Create Sourcing Rules= NO
4. Approval Status= Approved
5. Batch Id=5

Base Tables
PO_HEADERS_ALL, PO_LINES_ALL

Mfg Cross References Single Record Script

DECLARE
l_rowid VARCHAR2 (30);
BEGIN
fnd_global.apps_initialize (1007941, 20567, 703);
mtl_mfg_part_numbers_pkg.insert_row
(l_rowid,
69, --mfg_xref_load_rec.manufacturer_id,
'Test Part', --mfg_xref_load_rec.ls_mfg_part_number,
173, --mfg_xref_load_rec.inventory_item_id,
SYSDATE,
1007941, --l_user_id,
SYSDATE,
1007941, --l_user_id,
1007941, --l_user_id,
204, --mfg_xref_load_rec.organization_id,
'',
'',
NULL, --mfg_xref_load_rec.ls_authorization_status,
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
''
);
COMMIT;
END;

Base table involved: MTL_MFG_PART_NUMBERS

PO Blanket Releases Single Insert script

INSERT INTO po_requisitions_interface_all
(quantity, unit_price, authorization_status, unit_of_measure,
destination_organization_id, last_updated_by, last_update_date,
requisition_header_id, source_type_code, requisition_line_id,
need_by_date, org_id, amount, uom_code, document_type_code,
interface_source_code, destination_type_code, charge_account_id,
preparer_id, category_id, deliver_to_requestor_id,
deliver_to_location_id, item_id, batch_id, line_type_id,
currency_code, creation_date, requisition_type,
suggested_buyer_id, ---suggested_vendor_id,
autosource_doc_header_id,
autosource_doc_line_num, req_number_segment1,
req_dist_sequence_id
)
VALUES (10, 20, 'APPROVED', 'Each',
207, 1111, SYSDATE,
123492, 'VENDOR', 101198,
SYSDATE + 1, 204, NULL, 'Ea', 'RELEASE',
'test', 'EXPENSE', 13401,
15516, 1, 15516,
207, 10928, 100, 1,
'USD', SYSDATE, 'PURCHASE',
15516, 34333,
1, 'Req-106',
1
);

After inserting into interface tables, run the following import program with the parameters


Requisition Import.
Navigation: Purchasing: Requests

Parameters:
1. Import Source = test
(Select given interface_source_code value from LOV )

2. Import Batch ID = 100
(Give batch_id which u gave for the header)

3. Group By = Item+ (Default value)

4. Last Requisition Number = NULL

5. Multiple Distributions = No (Select YES only if u have multiple lines in distribution table)

6. Initiate Approval after ReqImport = YES (Select YES only if u want to auto approve the requisition)

Single Record Script to link 'BOM Resources' to 'BOM Departments'

DECLARE
l_rowid VARCHAR2 (2000);
BEGIN
bom_department_resources_pkg.insert_row (x_rowid => l_rowid,
x_department_id => 21773,
x_resource_id => 8270,
x_last_update_date => SYSDATE,
x_last_updated_by => 1007911,
x_creation_date => SYSDATE,
x_created_by => 1007911,
x_last_update_login => 3156870,
x_share_capacity_flag => 2,
x_share_from_dept_id => NULL,
x_capacity_units => 1,
x_resource_group_name => NULL,
x_available_24_hours_flag => 1,
x_ctp_flag => 2,
x_attribute_category => NULL,
x_attribute1 => NULL,
x_attribute2 => NULL,
x_attribute3 => NULL,
x_attribute4 => NULL,
x_attribute5 => NULL,
x_attribute6 => NULL,
x_attribute7 => NULL,
x_attribute8 => NULL,
x_attribute9 => NULL,
x_attribute10 => NULL,
x_attribute11 => NULL,
x_attribute12 => NULL,
x_attribute13 => NULL,
x_attribute14 => NULL,
x_attribute15 => NULL,
x_exception_set_name => NULL,
x_atp_rule_id => NULL,
x_utilization => NULL,
x_efficiency => NULL,
x_schedule_to_instance => 2
);
COMMIT;
END;

Single Record Script to load 'BOM Resources'

DECLARE
l_rowid VARCHAR2 (2000);
l_resource_id NUMBER;
BEGIN
bom_resources_pkg.insert_row (x_rowid => l_rowid,
x_resource_id => l_resource_id,
x_resource_code => 'XXTEST123',
x_organization_id => 204,
x_last_update_date => SYSDATE,
x_last_updated_by => 1007911,
x_creation_date => SYSDATE,
x_created_by => 1007911,
x_last_update_login => 3156870,
x_description => NULL,
x_disable_date => NULL,
x_cost_element_id => 3,
x_purchase_item_id => 17817,
x_cost_code_type => 3,
x_functional_currency_flag => 2,
x_unit_of_measure => 'EA',
x_default_activity_id => 4,
x_resource_type => 2,
x_autocharge_type => 1,
x_standard_rate_flag => 2,
x_default_basis_type => 1,
x_absorption_account => 13735,
x_allow_costs_flag => 1,
x_rate_variance_account => NULL,
x_expenditure_type => NULL,
x_attribute_category => NULL,
x_attribute1 => NULL,
x_attribute2 => NULL,
x_attribute3 => NULL,
x_attribute4 => NULL,
x_attribute5 => NULL,
x_attribute6 => NULL,
x_attribute7 => NULL,
x_attribute8 => NULL,
x_attribute9 => NULL,
x_attribute10 => NULL,
x_attribute11 => NULL,
x_attribute12 => NULL,
x_attribute13 => NULL,
x_attribute14 => NULL,
x_attribute15 => NULL,
x_request_id => NULL,
x_program_application_id => NULL,
x_program_id => NULL,
x_program_update_date => NULL,
x_batchable => 1,
x_min_batch_capacity => NULL,
x_max_batch_capacity => NULL,
x_batch_capacity_uom => NULL,
x_batch_window => NULL,
x_batch_window_uom => NULL,
x_competence_id => NULL,
x_rating_level_id => NULL,
x_qualification_type_id => NULL,
x_billable_item_id => NULL,
x_supply_subinventory => NULL,
x_supply_locator_id => NULL
);
COMMIT;
END;

Single Record Script to load 'BOM Department'

DECLARE
l_rowid VARCHAR2 (2000);
l_department_id NUMBER;
BEGIN
bom_departments_pkg.insert_row (x_rowid => l_rowid,
x_department_id => l_department_id,
x_department_code => 'XXTEST',
x_organization_id => 204,
x_last_update_date => SYSDATE,
x_last_updated_by => 1007911,
x_creation_date => SYSDATE,
x_created_by => 1007911,
x_last_update_login => 3156870,
x_description => 'Test Department',
x_disable_date => NULL,
x_department_class_code => NULL,
x_pa_expenditure_org_id => NULL,
x_attribute_category => NULL,
x_attribute1 => NULL,
x_attribute2 => NULL,
x_attribute3 => NULL,
x_attribute4 => NULL,
x_attribute5 => NULL,
x_attribute6 => NULL,
x_attribute7 => NULL,
x_attribute8 => NULL,
x_attribute9 => NULL,
x_attribute10 => NULL,
x_attribute11 => NULL,
x_attribute12 => NULL,
x_attribute13 => NULL,
x_attribute14 => NULL,
x_attribute15 => NULL,
x_location_id => NULL,
x_scrap_account => NULL,
x_est_absorption_account => NULL,
x_maint_cost_category => NULL
);
DBMS_OUTPUT.put_line (l_department_id);
COMMIT;
END;