Batch Element Enrty Creation API and Header And Line Creation
PAY_BATCH_ELEMENT_ENTRY_API.CREATE_BATCH_HEADER(
p_validate =>false
,p_session_date => SYSDATE
,p_batch_name => XXBATCHNAM||'-'||xxdate||'-'||XXSEQ
,p_batch_status => 'U'
,p_business_group_id => XXBG
,p_action_if_exists => 'R'
,p_batch_reference => XXBATCHREF
,p_batch_source => XXBATCHREF
,p_comments => null
,p_date_effective_changes => null
,p_purge_after_transfer => 'N'
,p_reject_if_future_changes => 'Y'
,p_batch_id => T1
,p_object_version_number => T2
,p_reject_if_results_exists => 'Y'
,p_purge_after_rollback => 'N'
,p_batch_type => null
,p_REJECT_ENTRY_NOT_REMOVED => 'N'
,p_ROLLBACK_ENTRY_UPDATES => 'N'
);
commit;
dbms_output.put_line(p_batch_id );
FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_batch_id='||T1 );
dbms_output.put_line(T1 );
FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_object_version_number='||T2 );
dbms_output.put_line(T2 );
--------------------------------------------------------------------------------
for v_rec in c1 loop
select paaf.assignment_id,papf.employee_number
into xxassignid,xxempnum
from PER_ALL_ASSIGNMENTS_F paaf ,per_all_people_f papf
where papf.person_id=paaf.person_id
and sysdate between papf.effective_start_date and papf.effective_end_date
and sysdate between paaf.effective_start_date and paaf.effective_end_date
and primary_flag='Y'
and papf.person_id=v_rec.person_id;
------------------------api to create batch line data---------------------------
FND_FILE.PUT_LINE( FND_FILE.LOG, 'xxseqnum='||xxseqnum );
FND_FILE.PUT_LINE( FND_FILE.LOG, 'xxassignid='||xxassignid );
FND_FILE.PUT_LINE( FND_FILE.LOG, 'xxempnum='||xxempnum );
dbms_output.put_line('xxseqnum='||xxseqnum );
dbms_output.put_line('xxassignid='||xxassignid );
dbms_output.put_line('xxempnum='||xxempnum );
PAY_BATCH_ELEMENT_ENTRY_API.CREATE_BATCH_LINE(
p_validate =>FALSE
,p_session_date =>SYSDATE
,p_batch_id =>T1
,p_batch_line_status =>'U'
,p_assignment_id =>xxassignid --assignment_id
,p_assignment_number =>to_number(xxempnum) --emp number
,p_element_type_id =>xxeletypeid ----element_type
,p_batch_sequence =>xxseqnum
,p_element_name =>'Leave Credit Days' ---element_name
,p_canonical_date_format =>'Y'
,p_iv_all_internal_format =>'N'
,p_batch_line_id =>T3
,p_object_version_number =>T4
);
dbms_output.put_line(T3 );
dbms_output.put_line(T4 );
FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_object_version_number2='||T4 );
xxseqnum:=xxseqnum+1;
--------------------------------------------------------------------------------
commit;
end loop;
PAY_BATCH_ELEMENT_ENTRY_API.CREATE_BATCH_HEADER(
p_validate =>false
,p_session_date => SYSDATE
,p_batch_name => XXBATCHNAM||'-'||xxdate||'-'||XXSEQ
,p_batch_status => 'U'
,p_business_group_id => XXBG
,p_action_if_exists => 'R'
,p_batch_reference => XXBATCHREF
,p_batch_source => XXBATCHREF
,p_comments => null
,p_date_effective_changes => null
,p_purge_after_transfer => 'N'
,p_reject_if_future_changes => 'Y'
,p_batch_id => T1
,p_object_version_number => T2
,p_reject_if_results_exists => 'Y'
,p_purge_after_rollback => 'N'
,p_batch_type => null
,p_REJECT_ENTRY_NOT_REMOVED => 'N'
,p_ROLLBACK_ENTRY_UPDATES => 'N'
);
commit;
dbms_output.put_line(p_batch_id );
FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_batch_id='||T1 );
dbms_output.put_line(T1 );
FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_object_version_number='||T2 );
dbms_output.put_line(T2 );
--------------------------------------------------------------------------------
for v_rec in c1 loop
select paaf.assignment_id,papf.employee_number
into xxassignid,xxempnum
from PER_ALL_ASSIGNMENTS_F paaf ,per_all_people_f papf
where papf.person_id=paaf.person_id
and sysdate between papf.effective_start_date and papf.effective_end_date
and sysdate between paaf.effective_start_date and paaf.effective_end_date
and primary_flag='Y'
and papf.person_id=v_rec.person_id;
------------------------api to create batch line data---------------------------
FND_FILE.PUT_LINE( FND_FILE.LOG, 'xxseqnum='||xxseqnum );
FND_FILE.PUT_LINE( FND_FILE.LOG, 'xxassignid='||xxassignid );
FND_FILE.PUT_LINE( FND_FILE.LOG, 'xxempnum='||xxempnum );
dbms_output.put_line('xxseqnum='||xxseqnum );
dbms_output.put_line('xxassignid='||xxassignid );
dbms_output.put_line('xxempnum='||xxempnum );
PAY_BATCH_ELEMENT_ENTRY_API.CREATE_BATCH_LINE(
p_validate =>FALSE
,p_session_date =>SYSDATE
,p_batch_id =>T1
,p_batch_line_status =>'U'
,p_assignment_id =>xxassignid --assignment_id
,p_assignment_number =>to_number(xxempnum) --emp number
,p_element_type_id =>xxeletypeid ----element_type
,p_batch_sequence =>xxseqnum
,p_element_name =>'Leave Credit Days' ---element_name
,p_canonical_date_format =>'Y'
,p_iv_all_internal_format =>'N'
,p_batch_line_id =>T3
,p_object_version_number =>T4
);
dbms_output.put_line(T3 );
dbms_output.put_line(T4 );
FND_FILE.PUT_LINE( FND_FILE.LOG, 'p_object_version_number2='||T4 );
xxseqnum:=xxseqnum+1;
--------------------------------------------------------------------------------
commit;
end loop;
No comments:
Post a Comment