Running sqlldr (sql*loader) as an concurrent program executeable in 11.5.10

Running 11.5.10.2 on Linux
I have a .ctl file written for my linux environment but I am having trouble with the following.
Properly configuring the concurrent program executable. Is there documentation on this setup? I have looked through OTN, MetaLink and the database utils guide, but no luck.
How do you pass the variable of the control file to sqlldr using the executable/concurrent program approach?
How do you pass the variable of the username/password and database to sqlldr using the executable/concurrent program approach?
my sqlldr script is listed below. All other activity takes place in the .ctl file and this is working good.
sqlldr apps/password@dev control='/sea/apps/dev/ora/8.0.6/rates.ctl'

Please see these docs.
11i FND:How to specify Record Terminator In Sql*Loader type of concurrent program [ID 252850.1]
How to Register a Host Concurrent Program in Applications [ID 156636.1]
How To Create A Custom Concurrent Program With Host Method and Pass Parameters To The Shell Script [ID 266268.1
How to Use 9i or 10g Features in SQL*Loader for Apps? [ID 423035.1]
Is there a Method for Returning a 'Warning' Status from Host Language Concurrent Program? [ID 866194.1]
Use Encrypt To Prevent Apps Pwd Being Displayed In Log/Sql Script [ID 377858.1]
Thanks,
Hussein

Similar Messages

  • SQL* Loader Parameters in Concurrent Programs

    Dear All,
    I have used an Execution file type of SQL*Loader. So, I put the execution file name as my .ctl file. I put that .ctl file in my ../bin directory in my custom application tree.
    Can any one tell, how a parameter for datafile, bad file and log file can be passed or can achieve an output report for such a concurrent program out?
    Thanks
    Faisal Anwar Khan.

    Hi
    I agree to what you say. But i want to control the same at SRS Form itself.
    If suppose i do the same at my Custom Program Level it will still allow me to submit null values for the parameter which i do not want to.
    Unless and until the User at the SRS Form passes a value for any one parameter then the system should allow him to submit the request then and there.
    Hope you are clear with the requirement.
    Regards
    Nakul.V

  • Running a SQL Loaded Job from Schedular

    How Can I Run a SQL Loader Job from Schedular ,
    Message was edited by:
    jus

    The trick is to create a wrapper script that is referred to by the PROGRAM object with arguments. The wrapper should do the work.
    /usr/local/bin/do_sqlldr.sh:
    #!/usr/bin/env ksh
    # setup actions
    sqlldr control=...
    Don't forget to check who is the owner of $ORACLE_HOME/bin/extjob and that the owner is available.
    My question is how this can be fitted in an DTAP environment where Developement and Test environment are on the same server and have the same job definitions. Development and Test should use different datafile and logfile locations.
    regards,
    Ronald
    http://ronr.nl/unix-dba

  • Run multiple SQL*Loader control files from command prompt

    I have written control files for 15 different tables with specific data files for each table. I have build the control files using toad for each one of them at once. Now I want to run the sql loader for all the tables one time. I know I cannot run multiple files from toad and not sure If I can run from the command prompt.
    Please let me know If I can.

    skvaish1 wrote:
    Hi,
    On unix you can create a script to runn all sqlldr at once like as followes.
    1. Create a script load_sqlldr.sh with following content.
    export ORACLE_SID=<YOUR DB_SID>
    export ORACLE_HOME=<Your Oracle Home>
    export PATH=$ORACLE_HOME/bin:$PATH
    sqlldr (Full command with parameter for 1st table) &
    sqlldr (Full command with parameter for 2nd table) &
    sqlldr (Full command with parameter for 3rd table) &
    sqlldr (Full command with parameter for 4th table) &
    sqlldr (Full command with parameter for 15th table) &
    2. Then execute the script.
    Regards1. Can I also write script load_sqlldr.sh with following content
    sqlldr user/psswd@db_name control=controlfile1.ctl
    sqlldr user/psswd@db_name control=controlfile2.ctl
    sqlldr user/psswd@db_name control=controlfile3.ctl
    sqlldr user/psswd@db_name control=controlfile15.ctl
    2. Then execute the script.

  • How Can I Run a SQL Loader Job from Schedular

    How Can I Run a SQL Loader Job from Schedular , So that It Runs every Day.

    Depends on a couple of factors.
    If you are on a UNIX platform, you can create a shell script and schedule it with cron.
    If you are on a Windows platform, you can create a batch file and schedule it with the Windows scheduler.
    Or, if you are on Oracle 9i or 10g, you could use the external table feature instead of SQL*Loader. Then you could write a stored procedure to process the external table and schedule it using the Oracle scheduler (DBMS_JOB). This would probably be my preference.

  • PL/SQL log in java concurrent program is missing

    Hi,
    I'm experiencing something strange with EBS R12 concurrent program logs.
    Our concurrent program is just a normal program that runs fine in most cases. It is written in java, which calls PL/SQL procedures. Usually the log is concatenation of logs from both like following
    (log from mid-tier java codes ...)
    Start of log messages from FND_FILE
    (log from database tier PL/SQL codes ...)
    End of log messages from FND_FILE
    But on one customer's environment the PL/SQL log is missing. This makes us unable to see the important messages.
    I tried to directly look at the files but had no luck.
    select 'cat '||c.value||'/'||p.plsql_log
    from fnd_concurrent_processes p, fnd_concurrent_requests r, fnd_env_context c
    where r.controlling_manager=p.concurrent_process_id
    and p.concurrent_process_id=c.concurrent_process_id
    and c.variable_name='APPLPTMP' and r.request_id=...
    (file not exist in file system)
    req=...; nedit ${APPLCSF}/log/l${req}.req&
    (pl/sql part is missing)
    We verified database tier log directory is writable and has free space.
    Also verified that other concurrent programs written in PL/SQL has correct logs.
    How can we get PL/SQL logs? Please help.
    Thanks

    Hi Srini, here are the env details I got from customer:
    1) $ uname -a
    Linux srvoracle06.gpodeacero.corp 2.6.18-194.el5 #1 SMP Mon Mar 29 22:10:29 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
    2) select banner from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    PL/SQL Release 11.1.0.7.0 - Production
    CORE 11.1.0.7.0 Production
    TNS for Linux: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 – Production
    3) The EBS version result is:
    Oracle Applications : 12.1.2
    Hi Hussein, about enabling trace for concurrent program, how to do that? I guess you are not refering to database SQL trace right?

  • Executing sqlldr (sql loader) from java and returning the error code

    I'm wandering do sqlldr return any error code whenever it hit error while running in java.
    For example, if i run in command prompt using the command below,
    C:\ >sqlldr uid/pwd data=abc.dat control=abc.txt
    It might give me some indicator that error occurs such as
    SQL*Loader-601: For INSERT option, table must be empty. Error on table CURRENCY
    or
    SQL*Loader-500: Unable to open file (abc.txt)
    SQL*Loader-553: file not found
    SQL*Loader-509: System error: The system cannot find the file specified.
    But when i run in java using the code below,
    Runtime rt = Runtime.getRuntime();
    Process proc = rt.exec("sqlldr uid/pwd data=abc.dat control=abc.txt");
    int exitVal = proc.waitFor();
    System.out.println("Process exitValue: " + exitVal);
    it will only give me the same exitValue of 1(i presume its error) / 0 (i presume no error) instead of the details of the error.
    How can i get the exact error code/message if i were to execute it using java?
    Any solution?

    mg,
    I don't think user576271 wants the exit code, I think [s]he wants the error message.
    But wouldn't error messages from SQL*Loader be sent to the stderr stream, and not the stdout stream?
    In which case user576271 would need method "getErrorStream()" of class java.lang.Process, no?
    Good Luck,
    Avi.

  • SQL not working as Concurrent Program

    Hi
    I have the following sql pl/sql script which when I run in TOAD, works fine and successfully updates the custom tables
    declare
    v_position_id number;
    v_curr_org_id number;
    v_new_org_id number;
    begin
    select pos.position_id
    into v_position_id
    from xxsac_all_positions_f pos
    where pos.name like '%'||'&1%'||'%'
    and pos.effective_end_date > sysdate;
    select curr_org.organization_id
    into v_curr_org_id
    from xxsac_all_organization_units curr_org
    where curr_org.name = '&2'
    and curr_org.date_to is null;
    select new_org.organization_id
    into v_new_org_id
    from xxsac_all_organization_units new_org
    where new_org.name = '&3'
    and new_org.date_to is null;
    update xxsac_all_positions_f
    set organization_id = v_new_org_id
    where position_id = v_position_id
    and organization_id = v_curr_org_id
    and effective_end_date > sysdate;
    update xxsac_all_assignments_f
    set organization_id = v_new_org_id
    where position_id = v_position_id
    and organization_id = v_curr_org_id
    and effective_end_date > sysdate;
    update xxsac_all_positions pos
    set organization_id = v_new_org_id
    where position_id = v_position_id
    and organization_id = v_curr_org_id
    and date_end is null;
    commit;
    end;
    However when I create a concurrent program with 3 parameters to run the script - while it runs successfully, it doesn't actually update any of the columns I'm trying to update.
    Any ideas?
    Thanks
    Martin

    Pl post details of OS, database and EBS versions.
    All code in EBS requires these two parameters - "errbuf out varchar2, retcode out varchar2"
    Creating a PL/SQL Concurrent Program in Oracle Applications [ID 73492.1]
    FAQ (Customization) [ID 105127.1]
    https://forums.oracle.com/forums/search.jspa?threadID=&q=retcode+AND+errbuf&objID=c3&dateRange=all&userID=&numResults=15
    HTH
    Srini

  • Run SQL Loader script from Unix env

    Hi,
    We are using HP-UNIX server. The control file of SQL Loader is placed in oracle home\bin folder in the unix server. I created Executable for this SQL Loader control file in concurrent program and attached into a request group.
    Then I ran it from a responsibility, I am getting the below error.
    +-----------------------------
    | Starting concurrent program execution...
    +-----------------------------
    SQL*Loader-350: Syntax error at line 16.
    Expecting "," or ")", found "TIMESTAMP".
    GL_DATE TIMESTAMP 'yyyy MM dd hh:MI:SS:AM',
    ^
    SQL*Loader: Release 8.0.6.3.0 - Production on Sun Sep 5 15:28:45 2010
    (c) Copyright 1999 Oracle Corporation. All rights reserved.
    SQL*Loader-350: Syntax error at line 16.
    Expecting "," or ")", found "TIMESTAMP".
    GL_DATE TIMESTAMP 'yyyy MM dd hh:MI:SS:AM',
    ^
    My Actual Control file is,
    LOAD DATA
    INFILE '/usr/........xyz.txt'
    BADFILE '/usr/........xyz.bad'
    DISCARDFILE '/usr/........xyz.dsc
    APPEND
    INTO TABLE gl_interface_stg
    FIELDS TERMINATED BY "|" TRAILING NULLCOLS
    GL_DATE TIMESTAMP 'yyyy MM dd hh:MI:SS:AM',
    CATEGORY_NAME,
    JOURNAL_DESCRIPTION,
    JOURNAL_NAME,
    BATCH_NAME,
    BATCH_DESCRIPTION,
    ACCOUNT_CODE,
    PROCESSING_STATUS CONSTANT 'N'
    If I run the above control file from my local machine (windows) using SQLLDR username/pwd @servername control='c:/abc.ctl' from the command prompt, then all the records from xyz.txt file pushed into staging table.
    Where as, If I schedule the above control file and trying to run from a GL responsibility, I am getting the above error message.
    Do I need to modify the control file scripts in order to run from UNIX environment?
    Pls advice how to do it from UNIX environment.
    Thanks in advance.

    Hi,
    SQL*Loader-350: Syntax error at line 16.Please see if these docs help.
    SQL*LOADER-350 SYNTAX ERROR [ID 1019271.102]
    LDR-00350 TOKEN LONGER THAN MAX ALLOWABLE LENGTH ERROR WHEN LOADING ASCII FILE [ID 1020091.6]
    Do I need to modify the control file scripts in order to run from UNIX environment?
    Pls advice how to do it from UNIX environment.See these docs.
    How to Use 9i or 10g Features in SQL*Loader for Apps? [ID 423035.1]
    11i FND:How to specify Record Terminator In Sql*Loader type of concurrent program [ID 252850.1]
    Thanks,
    Hussein

  • Transformation in SQL Loader

    Hi all,
    I am in the process of loading the data using sql loader. I need to transform the data when I load
    I have a data in flat file as below
    1     10,20,30,40     vijay
    2     10,20     jagdeeshI need to load this data as
    1     10     vijay
    1     20     vijay
    1     30     vijay
    4     40     vijay
    2     10     jagdeesh
    2     20     jagdeeshIs it possible to load the data as above.
    Thanks,
    Vijayaraghavan K

    Oracle 10.2.0.4
    create table TMP_MESS_MISSED (
    extension varchar2(100),
    pin varchar2(30)
    create view TMP_MESS_MISSED_VI
    as
    select *
    from TMP_MESS_MISSED
    create trigger TMP_MESS_MISSED_VI_IO
    instead of insert on TMP_MESS_MISSED_VI
    REFERENCING NEW AS NEW OLD AS OLD
    BEGIN
    insert into TMP_MESS_MISSED(extension, pin)
    values('AAA'||:new.extension, :new.pin);
    END;
    CTL file:
    load data
    infile *
    replace
    into table TMP_MESS_MISSED_VI
    FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
    extension,
    pin
    BEGINDATA
    72014848332,0
    74014848401,103
    72014848430,0
    77017067666,0
    72017773973,0
    72018181288,106
    72018181288,8
    72018841396,0
    72023498477,0
    72023604787,0
    72023604787,2
    running sqlldr
    SQL*Loader: Release 10.2.0.4.0 - Production on Wed May 5 14:00:31 2010
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    SQL*Loader: Release 10.2.0.4.0 - Production on Wed May 5 14:00:58 2010
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    Commit point reached - logical record count 12
    RESULT:
    select * from TMP_MESS_MISSED
    AAA72014848332      0
    AAA74014848401      103
    AAA72014848430      0
    AAA77017067666      0
    AAA72017773973      0
    AAA72018181288      106
    AAA72018181288      8
    AAA72018841396      0
    AAA72023498477      0
    AAA72023604787      0
    AAA72023604787      2
    Regards
    Andrey

  • SQL*Loader-128:  Error in Concurrent program of type SQL* Loader

    Hi,
    Am facing below error with CP of SQL*Loader execution format. Both Control and data files are placed under bin directory under CUSTOM TOP.
    CP doesnt have any parameter. I believe we dont need to pass login details to a CP. So how can we default the DB Login to SQL Loader in CP?
    Appreciate your quick help.
    SQL*Loader-128: unable to begin a session
    ORA-01017: invalid username/password; logon denied
    SQL*Loader: Release 10.1.0.5.0 - Production on Wed Dec 14 02:03:59 2011
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    SQL*Loader-128: unable to begin a session
    ORA-01017: invalid username/password; logon denied
    Program exited with status 1
    Concurrent Manager encountered an error while running SQL*Loader for your concurrent request 1040692.
    Review your concurrent request log file for more detailed information.
    Here the Control and Data file for the same.
    Control file:
    LOAD DATA
    INFILE 'XXX_Customer_Master.dat'
    BADFILE 'Customer_bad.bad'
    DISCARDFILE 'Customer_discard.bsc'
    APPEND
    INTO TABLE XXX_AR_CUSTOMERS_INT FIELDS TERMINATED BY "|" OPTIONALLY ENCLOSED BY '"'
    ORIG_SYSTEM_PARENT_REF ,
    ORIG_SYSTEM_CUSTOMER_REF,
    CUSTOMER_NAME,
    CUSTOMER_NAME_PHONETIC,
    COUNTRY,
    STATE,
    CITY,
    ADDRESS1,
    POSTAL_CODE,
    RECORD_NUMBER          SEQUENCE(MAX, 1),          
    CREATED_BY                CONSTANT -1,
    CREATION_DATE           CONSTANT SYSDATE,
    CUSTOMER_TYPE          CONSTANT 'R',
    INSERT_UPDATE_FLAG           CONSTANT 'I',
    LAST_UPDATE_DATE           CONSTANT SYSDATE,
    LAST_UPDATE_LOGIN          CONSTANT -1,
    LAST_UPDATED_BY          CONSTANT -1,
    ORG_ID               CONSTANT 102,
    PRIMARY_SITE_USE_FLAG     CONSTANT 'Y',
    SITE_USE_CODE          CONSTANT 'BILL_TO'
    *Data file:*
    'XXX_Customer_Master.dat'
    50|792086|Test Customer |Test Customer |759843055|Australia|VIC|MELBOURNE|"Level 4 457 St Kilda Road"|3004
    59|792232|Test Customer |Test Customer |751756404|Australia|ACT|Tuggeranong|PO Box 1035|2901

    Do we have to create soft link like we create for host program directory ?How to Register a Host Concurrent Program in Applications [ID 156636.1]
    How To Create A Custom Concurrent Program With Host Method and Pass Parameters To The Shell Script [ID 266268.1]
    How To Setup A Custom Concurrent Host Program [ID 147455.1]
    Also, please see (How to Use 9i or 10g Features in SQL*Loader for Apps? [ID 423035.1]).
    Thanks,
    Hussein

  • Report runs OK through concurrent program, but not when called through URL

    We have a custom 6i report developed that works successfully 100% of the time when run through a concurrent program.
    We are now attempting to integrate this into an OAF application. To do this, we build the necessary call to the reports server by reading different profile options, etc and come up with a URL like this:
    http://ebsd777.xxxxx.com:8000/dev60cgi/rwcgi60?d777_APPS+report=XXMFG_ESPEC_REPORT.rdf+P_SPEC_ID=43+DESFORMAT=PDF
    This report works 90% of the time when called like this, but the other 10%, we get the following error:
    "Error: The requested URL was not found, or cannot be served at this time.
    Incorrect usage."
    Trying to find what the differences are between the reports that work and those that don't - found that reports which fail seem to extend out further to the right than the reports that do work. But, these reports still fit on standard letter paper in landscape format - as we can verify through the concurrent program call.
    Is there some sort of report server setting or parameter which we can change to get this to work when called through the reports server URL?
    Any thoughts would be appreciated!
    Thanks,
    Craig

    Hi,
    Please post the application release along with the database version and OS.
    But when i call the same program through the pl/sql executable of another concurrent program , it does not print the pdf output by defaultHow do you call the program? What is the value of the number of copies profile option?
    Please see if these docs help.
    Note: 757901.1 - How To Restrict The Number Of Copies To 1?
    Note: 729117.1 - How To Specify the Number of Copies to Print by Report?
    Thanks,
    Hussein

  • Oracle EBS sql*plus concurrent program

    Hello,
    I have created some sql*plus concurrent programs. When I run the query in sql*plus or sql developer the results are as expected but when run as a concurrent program I am getting additional rows in the output. This seems to only occur when there are calls to API's such as ARPT_SQL_FUNC_UTIL.
    get_salesrep_name_number.
    I am not sure where the extra results are coming from since I can't get them in a query but for a small number of cases I am getting unwanted records. I would really like to just have it return the same results as when run outside the context of the concurrent program. Is there any settings I can put in for this? The api's used in the query (function calls) were used since they are taken from standard Oracle views. I would prefer to leave them in as we know they are giving us the correct results and digging into each one to see what it is doing and replacing it with a sub query would take a lot of time.
    I could possibly just change this into a PL/SQL package with utl_file but I would prefer not to go to that effort unless absolutely.
    Any help on this would be much appreciated.

    I have a SQL PLPUS script which generates the CSV file, the problem is whenever I run manually(@c:\future_cost.sql) it's works.
    I am trying to generate this CSV from Concurrent program my request is completed successfully but it is not throughing data into my CSV.What do you mean by concurrent program?
    The more information you provide, the chances of getting accurate answer will increase! :)

  • Concurrent program Do not Insert Data Into Interface Tables!

    Hi there:
    I am facing a problem with my concurrent program whenever I execute my stored procedure in SQL/PLUS it's work fine data load into the AP_INTERFACE/LINES.
    Whenever I try to load data through my concurrent programs it doesn't load into AP_INTERFACE/LINES and concurrent request successfully completed but don't load data.
    This is code query take a look.
    CREATE OR REPLACE PROCEDURE CINDNOTE(errbuff OUT VARCHAR2,
    retcode OUT NUMBER,
    p_org IN VARCHAR2,
    p_from_date IN VARCHAR2,
    p_to_date IN VARCHAR2)
    --p_org_id IN NUMBER,
    *Module Name AP DEBIT NOTE INTERFACE
    *Description This Package contains PL/SQL to support the
    * the DEBIT NOTE Inward Interface to AP
    *Author Zeeshan Hussain Siddiqui
    *Date 15 May, 2007
    *Modification Log
    *Developer Version Date Description
    *Zeeshan Hussain Siddiqui 1.0.0.1 15-MAY-2007 This interface integrated to AP
    AS
    ap_sequence NUMBER;
    reject_debit CHAR:='D';
    --v_invoice_lookup_code VARCHAR2(25):='Debit Memo';
    --v_negative_amt1 CHAR:='(';
    --v_negative_amt2 CHAR:=')';
    v_code VARCHAR2(250):='01.01.000.10450.00.00000';
    v_description VARCHAR2(250);
    V_rma_no VARCHAR2(10):='RMA#';
    from_date DATE;
    to_date DATE;
    CURSOR rejected_cur
    IS
    SELECT HR.full_name,ORG.organization_code InvOrg,
    ROUND(NVL((CR.unit_price*quantity_rejected*-1)+NVL(CR.gst_amount*-1,0),0),2)
    Invoice_Amt,ROUND(NVL(CR.unit_price*quantity_rejected*-1,0),2) AMT,ROUND(NVL(CR.gst_amount*-1,0),2) GST_AMT,
    POS.vendor_site_code,CR.date_of_disposition disposition_date,POS.vendor_site_id,CR.organization_id,
    (CASE WHEN CR.organization_id =305 THEN '01' WHEN CR.organization_id =304 THEN '01'
    WHEN CR.organization_id =450 THEN '07' WHEN CR.organization_id =303 THEN '02' ELSE '00' END)||'.'||
    (CASE WHEN CR.organization_id=305 THEN '02' ELSE '01' END)||'.000.'||(CASE WHEN CR.disposition=4
    THEN '10430' WHEN CR.disposition=6 THEN '10433' WHEN CR.disposition=3 THEN '10430'
    ELSE '00000' END)||'.'||'00.00000' Distribution_Code,
    PO.vendor_id,CR.reject_number,CR.disposition,CR.po_number,CR.unit_price,CR.rework_po_no,
    CR.shipping_memo, PO.vendor_name,
    CR.debit_note_number Invoice_Number,CR.account_number,CR.currency_code,
    CR.shipped_via,CR.vendor_rma,POC.first_name||' '||POC.last_name Contact,POS.phone,
    SUBSTR(POS.Fax_Area_Code,1,10)||'-'||SUBSTR(POS.Fax,1,20) Fax_Number,
    SUBSTR(POS.Address_Line1,1,100) Address,
    SUBSTR(POS.City,1,25)||' '||SUBSTR(POS.State,1,20)||' '||SUBSTR(POS.Province,1,20)"City/State/Prov"
    FROM apps.hr_employees hr,apps.mtl_system_items mtl,
    apps.org_organization_definitions ORG,
    apps.cin_rejects CR,apps.po_headers_all POH,
    apps.po_vendors PO,apps.po_vendor_contacts POC,apps.po_vendor_sites_all POS
    --WHERE TRUNC(CR.date_of_disposition) BETWEEN from_date AND to_date
    WHERE To_char(CR.date_of_disposition,'j') BETWEEN to_char(from_date,'j') AND to_char(to_date,'j')
    AND CR.organization_id =p_org_id ORG.organization_id
    AND ORG.organization_code =p_org
    AND POH.segment1 =CR.po_number
    AND HR.employee_id =MTL.buyer_id
    and CR.organization_id =MTL.organization_id
    AND CR.INVENTORY_ITEM_ID =MTL.INVENTORY_ITEM_ID
    AND PO.vendor_id =POH.vendor_id
    AND POH.vendor_contact_id =POC.vendor_contact_id
    AND POH.vendor_site_id =POS.vendor_site_id
    AND POS.invoice_currency_code =CR.currency_code
    AND CR.disposition IN(3,4,6);
    BEGIN
    from_date:=FND_CONC_DATE.STRING_TO_DATE(p_from_date);
    to_date:=FND_CONC_DATE.STRING_TO_DATE(p_to_date);
    FOR rejected_rec IN rejected_cur
    LOOP
    IF rejected_rec.vendor_rma IS NULL THEN
    v_description:=rejected_rec.shipping_memo||' '||rejected_rec.full_name;
    ELSIF rejected_rec.shipping_memo IS NULL THEN
    v_description:=v_rma_no||rejected_rec.vendor_rma||' '||rejected_rec.full_name;
    ELSIF rejected_rec.vendor_rma IS NULL AND rejected_rec.shipping_memo IS NULL THEN
    v_description:=rejected_rec.full_name;
    ELSIF rejected_rec.vendor_rma IS NOT NULL AND rejected_rec.shipping_memo IS NOT NULL
    AND rejected_rec.full_name IS NOT NULL THEN
    v_description:=v_rma_no||rejected_rec.vendor_rma||' '||rejected_rec.shipping_memo||'
    '||rejected_rec.full_name;
    END IF;
    SELECT AP_INVOICES_INTERFACE_S.NEXTVAL
    INTO ap_sequence
    FROM DUAL;
    INSERT INTO AP_INVOICES_INTERFACE
    INVOICE_ID
    ,VENDOR_ID
    ,INVOICE_CURRENCY_CODE
    ,DESCRIPTION
    ,INVOICE_NUM
    ,VENDOR_NAME
    ,VENDOR_SITE_ID
    ,VENDOR_SITE_CODE
    ,INVOICE_DATE
    ,SOURCE
    ,INVOICE_AMOUNT
    ,INVOICE_TYPE_LOOKUP_CODE
    VALUES
    ap_sequence
    ,rejected_rec.vendor_id
    ,rejected_rec.currency_code
    ,v_description
    ,reject_debit||rejected_rec.reject_number
    ,rejected_rec.vendor_name
    ,rejected_rec.vendor_site_id
    ,rejected_rec.vendor_site_code
    ,rejected_rec.disposition_date
    ,'REJECTS'
    ,rejected_rec.Invoice_Amt
    ,'CREDIT'
    IF rejected_rec.GST_AMT <0 THEN
    INSERT INTO AP_INVOICE_LINES_INTERFACE
    INVOICE_ID
    ,LINE_TYPE_LOOKUP_CODE
    ,DIST_CODE_CONCATENATED
    ,ITEM_DESCRIPTION
    ,AMOUNT
    VALUES
    ap_sequence
    ,'TAX'
    ,v_code
    ,v_description
    ,rejected_rec.GST_AMT
    END IF;
    INSERT INTO AP_INVOICE_LINES_INTERFACE
    INVOICE_ID
    ,LINE_TYPE_LOOKUP_CODE
    ,DIST_CODE_CONCATENATED
    ,ITEM_DESCRIPTION
    ,AMOUNT
    VALUES
    ap_sequence
    ,'ITEM'
    ,rejected_rec.Distribution_Code
    ,v_description
    ,rejected_rec.AMT
    COMMIT;
    END LOOP;
    END;
    Please reply me ASAP.
    Thanks,
    Zeeshan

    Hi All,
    I have created a package with a procedure. This procedure is used for inserting records into the custom tables created by me. When I am running the script in back end, it is running in reasonable time and giving back the desired output.
    But, as per requirement, I have to run this package-procedure via a concurrent program. When I am submitting the request, it is taking hours to complete. Also I am using BULK COLLECT and FORALL(Since the number of records are more than 3 lacs) and firing COMMIT after every FORALL. But when I am quering the table, after an hour or so, no rows are returned.
    Please help and reply asap.
    Thanks in Advance....!!

  • Sql -loader and parallel

    Hello,
    I'm trying to use sql-loader with parallel option.
    I have loaded data with and without parellel but it takes same time. I don't appreciatte a better perfomance with parallel.
    In the called to sqlldr i'm adding PARALLEL=TRUE. That is the only change i have made.
    Do i have to make any 'alter table' with my Oracle table??.
    Any advice will be greatly appreciatted.
    Nauj

    The PARALLEL=TRUE parameter will not, by itself, result in any performance gain at all. It is really just a flag which tells SQL*Loader to allow multiple sessions to perform direct loads at the same time. It is up to you to actually spawn multiple SQL*Loader sessions on different portions of the data (e.g. you might divide your source data into multiple files and run distinct SQL*Loader sessions on each file concurrently)

Maybe you are looking for