Adding Details to Supplier Tab In Employee Assignment

 

PO related Information can be added for Contingent Works in Supplier tab in Employee Assignment using the following code

 

 

begin
select distinct asup.vendor_id , assa.vendor_site_id, pha.po_header_id, pla.po_line_id
into l_num_vendor_id, l_num_vendor_site_id, l_num_po_header_id, l_num_line_id
from ap_suppliers asup,
ap_supplier_sites_all assa,
po_headers_all pha,
po_lines_all pla
where 1= 1
and asup.vendor_name = r_bank.supplier_name
and assa.vendor_id = asup.vendor_id
and pha.segment1 = r_bank.PURCHASE_ORDER_NUMBER
and pha.vendor_id = asup.vendor_id
and pha.vendor_site_id = assa.vendor_site_id
and pha.po_header_id = pla.po_header_id
and pha.authorization_status = ‘APPROVED’
and pha.type_lookup_code = ‘STANDARD’
— and pha.org_id =fnd_profile.value (‘ORG_ID’)
and pla.line_num = 1;
exception when others then
l_err_msg := ‘PO Information not found’;
— DBMS_OUTPUT.put_line (‘Inner Exception: ‘ || l_err_msg);
UPDATE XXHR_EMP_BANK_STG
SET PROCESS_FLAG = ‘E’,
error_msg =l_err_msg
where record_no = r_bank.record_no;
l_var_process :=’N’;
fnd_file.put_line (fnd_file.log, ‘PO Information not found for ‘||r_bank.EUREHKA_NUMBER );
end;
fnd_file.put_line (fnd_file.log, ‘1 ‘);
if nvl(l_var_process,’Y’) !=’N’
then
fnd_file.put_line (fnd_file.log, ‘2’);
begin
hr_assignment_api.update_cwk_asg
(
— p_validate => false,
p_effective_date => r_bank.start_date,–l_dte_effective_date,
p_datetrack_update_mode => ‘CORRECTION’,
p_assignment_id => l_num_assign_id,
p_object_version_number => l_num_object_version_number,
p_vendor_id => l_num_vendor_id,
p_vendor_site_id => l_num_vendor_site_id,
p_po_header_id => l_num_po_header_id,
p_po_line_id => l_num_line_id,
p_org_now_no_manager_warning => l_bool_org_no_manager_warning,
p_effective_start_date => l_dte_effective_start_date,
p_effective_end_date => l_dte_effective_end_date,
p_comment_id => l_num_comment_id1,
p_no_managers_warning => l_bool_no_managers_warning,
p_other_manager_warning => l_bool_other_manager_warning,
p_soft_coding_keyflex_id => l_num_soft_coding_keyflex_id,
p_concatenated_segments => l_var_concatenated_segments,
p_hourly_salaried_warning => l_bool_hourly_salaried_warning
);
UPDATE XXHR_EMP_BANK_STG
SET PROCESS_FLAG = ‘S’,
error_msg =l_err_msg
where record_no = r_bank.record_no;

exception when others then
l_err_msg := sqlerrm;
— DBMS_OUTPUT.put_line (‘Inner Exception: ‘ || l_err_msg);
UPDATE XXHR_EMP_BANK_STG
SET PROCESS_FLAG = ‘E’,
error_msg =l_err_msg
where record_no = r_bank.record_no;
fnd_file.put_line (fnd_file.log, ‘Bank Details not created for ‘||r_bank.EUREHKA_NUMBER || sqlerrm);
end;
end if;

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s