Sunil Thamke APPS Techanical Consultant WEDNESDAY, MARCH 31, 2010 UTL file BANK FILE CREATE OR REPLACE procedure

APPS.XXSCC_SAUDI_PAY_OUTPUT_FILE( errbuf OUT varchar2, retcode OUT varchar2 ) IS v_emsg VARCHAR2(2000) := 'Proc Bank Payment interface Failed with ERROR '; v_err_msg VARCHAR2(2000); v_message VARCHAR2(2000); v_no_asset NUMBER := 0 ; Out_File_Handle UTL_FILE.FILE_TYPE; Out_FileErrMsg VARCHAR2(100); lv_total_emp number := 0; lv_total_amt number := 0; lv_date varchar2(10) ; CURSOR lcu_bank_file IS SELECT rownum,pact.payroll_action_id, pact.action_type, pact.consolidation_set_i d, pact.payroll_id, pact.start_date, pact.effective_date, pay.payroll_name, cons.consolidation_set_name, ppy.VALUE netpay, asact.assignment_id, asact.assignment_action_id, asg.employee_number, asg.full_name, asg.original_date_of_hire, asg.grade, asg.ORGANIZATION, asg.POSITION, pym.org_payment_method_name, bnk.bank, bnk.branch, asg.account_name account_name, bnk.account_number, pym.CURRENCY_CODE FROM pay_payroll_actions pact, pay_all_payrolls_f pay, pay_assignment_actions asact, pay_consolidation_sets cons, pay_pre_payments ppy, pay_org_payment_methods_f pym, (SELECT ass.assignment_id, per.employee_number, per.full_name, per.original_date_of_hire, per.full_name account_name, gra.NAME grade, pos.NAME POSITION, org.NAME ORGANIZATION FROM per_all_people_f per, per_all_assignments_f ass, hr_all_organization_units org, per_grades gra, per_positions pos WHERE per.person_id = ass.person_id AND TRUNC (SYSDATE) BETWEEN per.effective_start_date AND per.effective_end_date AND ass.effective_end_date = (SELECT MAX (asg2.effective_end_date) FROM per_all_assignments_f asg2 WHERE asg2.assignment_id = ass.assignment_id) AND ass.grade_id = gra.grade_id(+) AND ass.position_id = pos.position_id(+) AND ass.organization_id = org.organization_id) asg, (select ppm.external_account_id, ppm.org_payment_method_id,

'YYYYMMDD'). MO_GLOBAL.org_payment_method_id = pym. UTL_FILE.Prepayment AND pact.segment1 bank.segment4 account_number from pay_org_payment_methods_f ppm .SET_POLICY_CONTEXT('S'.0 /appsutil/outbound/PRDCLONE_ebsdev'.txt'.pay_external_accounts bnk where ppm.effective_start_date AND pay.consolidation_set_id = cons.PUT_LINE(Out_File_Handle.'PAYROLL_ID' ||chr(9)|| 'EMPLOYEE_NUMBER'||chr(9)|| 'FULL_NAME'||chr(9)|| 'NETPAY'||chr(9)|| 'BANK'||chr(9)|| 'BRANCH'||chr(9)|| 'ACCOUNT_NUMBER' ). FOR c_bank_file IN lcu_bank_file LOOP UTL_FILE.PUT_LINE(Out_File_Handle.payroll_action_id AND asact.assignment_id = asg. lv_total_amt := 0. */ lv_total_emp := 0.effective_date BETWEEN pay.action_type = 'U') -.VALUE('org_id')).FOPEN('/netappbkup/clonescc/oracle/db/tech_st/10.org_payment_method_id AND ppy. Out_File_Handle := UTL_FILE.assignment_action_id AND asact.assignment_id AND ppy.external_account_id=bnk.assignment_action_id = ppy.EXTERNAL_ACCOUNT_ID(+) order by asg. BEGIN select to_char(sysdate. /* UTL_FILE.2.3)|| .action_status = 'C' -.PUT_LINE(Out_File_Handle.lpad('112'.35) ).segment2 branch.effective_start_date AND ppm.payroll_action_id = asact.8)|| rpad('SAUDI CEMENT COMPANY PAYROLL'. bnk.bnk.segment3 account_name.payroll_id AND pact.'XXSCC_Saudi_Payment_Output_file'||lv_date|| '. FND_PROFILE.ORG_PAYMENT_METHOD_ID = bnk.employee_number.'mmddyyyy') into lv_date from dual. bnk.effective_end_date) bnk WHERE pact.effective_end_date AND pact.payroll_id = pay.Completed AND (pact.action_type = 'P' OR pact.'000' || 'SAUDICEM'|| rpad(TO_CHAR(sysdate. bnk.external_account_id AND TRUNC (SYSDATE) BETWEEN ppm. 'W').consolidation_set_id AND pact.

' ').BRANCH.6.NETPAY.18. /*FOR c_bank_file_total IN lcu_bank_file_total LOOP UTL_FILE.-----------.' ').'0')|| rpad(nvl(c_bank_file. RAISE.18.'999'|| lpad(c_bank_file_total. lv_total_emp := lv_total_emp+1. RAISE.INVALID_OPERATION THEN FND_FILE.FOPEN was invalid. Mo dify the INIT.*/ UTL_FILE.35)|| rpad(nvl(c_bank_file.140) ).FOPEN was invalid.'The value provided for the open_mode parameter i n UTL_FILE." or "W.xxs cc_Asset_Details_outbound_file.'0')|| lpad(c_bank_file_total.BANK.' ')." "R.6.payroll_name.PUT_LINE(FND_FILE." ').'The operating system returned an error when trie .PUT_LINE(FND_FILE.'0') ).34)|| lpad(c_bank_file.3)|| rpad(nvl(c_bank_file.PUT_LINE('UTL_FILE could not open or operate on the file as requeste d.LOG. UTL_FILE.2.TOTAL_EMPLOYEE.FULL_NAME. WHEN UTL_FILE. It must be "A.'The Output File is available at this path :-/orabackup/crpinst/UAT/oracle/db/tech_st/10.35) || rpad(nvl(c_bank_file." "R. Modify the I NIT.20)|| rpad('CITY'. DBMS_OUTPUT.PUT_LINE(FND_FILE." or "W.ROWNUM.PUT_LINE(FND_FILE.' ').PUT_LINE(Out_File_Handle.'0')|| rpad(c_bank_file.CURRENCY_CODE. It must be "A.NETPAY. DBMS_OUTPUT.WRITE_ERROR THEN FND_FILE." '). WHEN UTL_FILE. END LOOP.'0') ).INVALID_PATH THEN FND_FILE.PAYROLL_ID.6.ORA parameter initialization file of your instance').9)|| rpad(nvl(c_bank_file.OUTPUT.EMPLOYEE_NUMBER.16) || rpad(nvl(c_bank_file. RAISE. DBMS_OUTPUT. WHEN UTL_FILE.'). -. END LOOP.12)|| 'RIBLSARIXXX'|| rpad(nvl(c_bank_file.PUT_LINE(FND_FILE.PUT_LINE('The file location or the filename is invalid.xls').' ').0/appsutil/outbound/UAT_ebsdev.LOG.PUT_LINE(Out_File_Handle. lv_total_amt := lv_total_amt+c_bank_file.FCLOSE(Out_File_Handle).'0')||lpad(lv_total_emp.LOG. You are trying to write to a read-only file.TOTAL_NETPAY.EXCEPTION PART BEGINS HERE --------------EXCEPTION WHEN UTL_FILE.').'999'|| lpad(lv_total_amt. FND_FILE.' ').15.LOG.ORA parameter initialization file of your instance').' ').'The file location or the filename is invalid.'UTL_FILE could not open or operate on the file a s requested.PUT_LINE('The value provided for the open_mode parameter in UTL_FILE .ACCOUNT_NUMBER.lpad(c_bank_file.INVALID_MODE THEN FND_FILE. You are trying to write to a read-only file.

The current implementation of UTL_FILE limits the size of a line rea d by UTL_FILE.'). WHEN OTHERS THEN Out_FileErrMsg := SUBSTR(SQLERRM.PUT_LINE(FND_FILE. RAISE.'Something went wrong and the PL/SQL runtime engi ne cannot assign blame to any of the previous exceptions.'You are trying to read or write lines in the fil e which are too long.LOG. ').PUT_LINE(FND_FILE. '). FND_FILE. The current implementation of UTL_FILE limits the size of a line read by UTL_FILE. v_message := v_emsg || v_err_msg.FCLOSE(Out_File_Handle).LOG.GET_LINE to 1022 bytes.GET_LINE to 1022 bytes.'). UTL_FILE. RAISE. END XXSCC_SAUDI_PAY_OUTPUT_FILE.d to write to the file'). DBMS_OUTPUT.'The file handle passed to a UTL_FILE program was invalid.PUT_LINE('The file handle passed to a UTL_FILE program was invalid.FOPEN to obtain a valid file handle.PUT_LINE('You are trying to read or write lines in the file which ar e too long. v_emsg:=SQLERRM. RAISE.100).PUT_LINE('The operating system returned an error when tried to write to the file').INVALID_FILEHANDLE THEN FND_FILE. WHEN UTL_FILE.'). DBMS_OUTPUT.PUT_LINE('Some error is there'||SUBSTR(SQLERRM. / Posted by Sunil Thamke APPS Techanical at 12:43 AM No comments: Post a Comment Newer Post Older Post Home Subscribe to: Post Comments (Atom) BLOG ARCHIVE ? 2010 (68) ? December (2) ? October (8) ? September (3) ? August (1) ? July (1) ? June (22) ? May (16) ? April (4) ? March (11) UTL file BANK FILE HRMS API create_element_entry Sales Invoice Report Sales Order Details Customer Details Find Order Number based on receipt Number .INTERNAL_ERROR THEN FND_FILE. Call UTL_FILE.Out_FileErrMsg).PUT_LINE(FND_FILE. DBMS_OUTPUT. WHEN UTL_FILE.PUT_LINE(FND_FILE. WHEN VALUE_ERROR THEN FND_FILE. RAISE. DBMS_OUTPUT.LOG. DBMS_OUTPUT.100)).1. Call UTL_FILE.PUT_LINE('Something went wrong and the PL/SQL runtime engine cannot assign blame to any of the previous exceptions.1.').LOG.FOPEN to obtain a valid file handle.

Powered by Blogger... . Interfaces and Conversions in Oracle Applications Query (Order Management & inventory) UTL_FILES Oracle metadata ? 2009 (3) FOLLOWERS ABOUT ME My Photo Sunil Thamke APPS Techanical View my complete profile Picture Window template.OM Interface (1) Sales Order Interface Stan.

Sign up to vote on this title
UsefulNot useful