Pass input value to a concurrent program of type PL/SQL procedure

Hi,
I have created an executable program which is based on "PL/SQL Stored Procedure" method and created a concurrent program which calls this executable. It is available from SRS.
The relevant stored procedure requires an input variable as parameter.
How can I pass this parameter when calling the concurrent program from SRS? I tried to follow the same logic as when passing parameters while calling SRS based on "Oracle reports", so create a new parameter, but "token" field is disabled.
Please help me which is the trick here.
Thank you.

Pl see these MOS Docs
73492.1 - Creating a PL/SQL Concurrent Program in Oracle Applications
1016543.102 - Custom Stored Procedure Run as Concurrent Request Fails w/ PLS-306 AND ORA-6550
HTH
Srini

Similar Messages

  • How to pass input value to the IN parameter in a function

    Hi ,
    I'm new to pl/sql programming.
    The below function is used inside a package and the package is invoked in visual studio.
    The function uses 2 input parameters.
    Out of which 'in_report_parameter_id' value comes thru job processor service 's job request.
    The second IN paramter values are hard coded in the function.
    I'm not able to understand this.
    If the values are hard coded , how to make sure that only the hard coded values are the right ones?
    Please anyone could explain to me?
    I really dont have good idea about how to pass INPUT parameter to the functions or procedure
    Is there any nice document which could give me good understanding about what are the ways or types we could pass values to the input parameter in subprograms?
    thanks in advance.
    CREATE OR REPLACE FUNCTION get_class_text_str
         in_report_parameter_id IN NUMBER,
         in_which                IN VARCHAR2 DEFAULT 'SELECT'
    RETURN VARCHAR2
    IS
             end_text            VARCHAR2 (50)   := '';
             my_class_text_str  VARCHAR2(10000) := '';
             my_class_value_str VARCHAR2(10000) := '';
         CURSOR class_text(c_1_text VARCHAR2, c_2_text VARCHAR2) IS
         SELECT c_1_text || report_parameters.report_parameter_value
                               || c_2_text
                               || report_parameters.report_parameter_value
                               || '" '
          FROM report_parameters
         WHERE report_parameters.report_parameter_id     = 3690
           AND report_parameters.report_parameter_group  = 'CLASS'
           AND report_parameters.report_parameter_name   = 'CLASS'
    GROUP BY report_parameters.report_parameter_value
    ORDER BY CAST(report_parameters.report_parameter_value AS NUMBER);
    BEGIN
         IF (in_which = 'SUM') THEN     
              OPEN class_text ( 'SUM(NVL("Class ', '", 0)) "Class ' );
         ELSIF (in_which = 'PERC')THEN
              OPEN class_text ( 'ROUND((("Class ', '" / "Total") * 100), 2) "Class ' );
              end_text := ', DECODE("Total", -1, 0, 100) "Total" ';
         ELSE
              OPEN class_text ( 'SUM(DECODE(bin_id, ', ', bin_value, 0)) "Class ' );
         END IF;
         LOOP
              FETCH class_text INTO my_class_value_str;
              EXIT WHEN class_text%NOTFOUND;
              my_class_text_str := my_class_text_str || ', ' || my_class_value_str;
         END LOOP;
         CLOSE class_text;
         my_class_text_str := my_class_text_str || end_text;
         RETURN my_class_text_str;
    END get_class_text_str;
    /Edited by: user10641405 on Nov 19, 2009 8:16 AM
    Edited by: user10641405 on Nov 19, 2009 8:30 AM

    This is not a design I would use, but should work if coded properly. I would probably build a reference cursor query as text and use one open fetch and close.
    You have 2 input parameters, in_report_parameter_id and in_which. I could not find where in_report_parameter_id was used in the program, but the value passed in for in_which is being used in IF logic to decide how to open the cursor. After the cursor is open rows are being fetched and eventually the cursor is closed.
    The values in_which are compared to are hard-coded. It is the programmer's job to make sure the values listed are the right values and the actions taken are also correct. Your program is assuming that if the first 2 values are not encountered the third one listed is the one you want.
    To pass input values to a procedure you merely provide the values as a literal or variable in the call, something like
    whatever := get_class_text_str(1,'SELECT');

  • How do I pass input values from an OTL timecard to a Fast Formula (FF)?

    Hi - I hope my question is a simple one, but after hours of searching I have a feeling it is not. I currently have a FF rule that checks if benefit hours were entered in whole or half day increments. If not, an error is shown after 'Continue' is clicked. I fully understand the setup of this rule and all I want to do is enhance it a bit. I want to verify if the Task Code and Expenditure Type code combination that is coded is correct. If they are not, I want to flag it. My issue is: I have not been able to pass the values of Task Code and Expenditure Type to the FF successfully. They are not database values and any aliases I try do not work (I assume they would be input variables passed to the FF). Any tips would be appreciated.
    Thank you,
    Rob

    You should read these values from the attributes pl/sql tables in your FF code. The timecard related info gets passed to the FF as context when you are creating a time entry rule FF.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                               

  • Passing Input values to Adapter Module

    Hi
    I have write some simple adapter module in my sender file adapter.
    in order to make it more flexible i need to pass 2 input parameters  at run time so that I can update the Values in SAP tables using JCO CALL along with filename.
    please advise how to get pass input value from my ejb module.
    regards
    Gabriel

    >
    Gabriel Sagaya Selvam wrote:
    > Hi
    > I have write some simple adapter module in my sender file adapter.
    > in order to make it more flexible i need to pass 2 input parameters  at run time so that I can update the Values in SAP tables using JCO CALL along with filename.
    >
    > please advise how to get pass input value from my ejb module.
    >
    > regards
    > Gabriel
    refer this blog - https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/6107. [original link is broken] [original link is broken] [original link is broken]
    you can add flexibility by adding the module key parameters. Base the code as a reference where the author uses parameters configured in the adapter to be used to in the logic

  • I am facing error while running Quickpay in Fusion payroll that "The input value Periodicity is missing for element type KGOC_Unpaid_Absence_Amount. Enter a valid input value". Any idea?

    I am facing error while running Quickpay in Fusion payroll that "The input value Periodicity is missing for element type KGOC_Unpaid_Absence_Amount. Enter a valid input value". Any idea?

    This is most probably because the Periodicity input value has been configured as "Required" and no value has been input for it.
    Please enter a value and try to re-run Quick Pay.

  • How to pass class object  as in parameter in call to pl/sql procedure ?

    hi,
    i have to call pl/sql proecedure through java. In pl/sql procedure as "In" parameter i have created "user defined record type" and i am passing class object as "In" parameter in call to pl/sql procedure. but it is giving error.
    so, anyone can please tell me how i can pass class object as "In" parameter in call to pl/sql procedure ?
    its urgent ...
    pls help me...

    793059 wrote:
    I want to pass a cursor to a procedure as IN parameter.You can use the PL/SQL type called sys_refcursor - and open a ref cursor and pass that to the procedure as input parameter.
    Note that the SQL projection of the cursor is unknown at compilation time - and thus cannot be checked. As this checking only happens at run-time, you may get errors attempting to fetch columns from the ref cursor that does not exist in its projection.
    You also need to ask yourself whether this approach is a logical and robust one - it usually is not. The typical cursor processing template in PL/SQL looks as follows:
    begin
      open cursorVariable;
      loop
        fetch cursorVariable bulk collect into bufferVariable limit MAX_ROWS_FETCH;
        for i in 1..bufferVariable.Count
        loop
          MyProcedure( buffer(i) );   --// <-- Pass a row structure to your procedure and not a cursor
        end loop;
        ..etc..
        exit when cursorVariable%not_found;
      end loop;
      close cursorVariable;
    end;

  • Job scheduling(passing the values to the child program)

    when i'm trying to schedule a background job(using job_open job_submit and job_close) i'm passing the values of the selection screen(parent program) to my child program using set parameter id. And trying to get the values using get parameter id in the cild program.
    But the values of the parent program are not being passed to the child program what may be the cause for it?

    rathan,
    Why con't you use
    SUBMIT... [VIA SELECTION-SCREEN]
    [USING SELECTION-SET <var>]
    [WITH <sel> <criterion>]
    [WITH FREE SELECTIONS <freesel>]
    [WITH SELECTION-TABLE <rspar>].
    When you start an executable program, the standard selection screen normally appears, containing the selection criteria and parameters of both the logical database connected to the program and of the program itself (see Direct Execution - Reports). When you start an executable program using SUBMIT, there are various additions that you can use to fill the input fields on the selection screen:
    SUBMIT... [VIA SELECTION-SCREEN]
    [USING SELECTION-SET <var>]
    [WITH <sel> <criterion>]
    [WITH FREE SELECTIONS <freesel>]
    [WITH SELECTION-TABLE <rspar>].
    These options have the following effects:
    VIA SELECTION-SCREEN
    The selection screen of the called executable program (report) appears. If you transfer values to the program using one or more of the other options, the corresponding input fields in the selections screen are filled. The user can change these values. By default, the system does not display a selection screen after SUBMIT.
    USING SELECTION-SET <var>
    This option tells the system to start the called program with the variant <var>.
    WITH <sel> <criterion>
    Use this option to fill individual elements <sel> of the selection screen (selection tables and parameters). Use one of the elements <criterion>:
    <op> <f> [SIGN <s>], for single value selection
    If <sel> is a selection criterion, use <op> to fill the OPTION field, <f> to fill the LOW field, and <s> to fill the SIGN field of the selection table <sel> in the called program.
    If <sel> is a parameter, you can use any operator for <op>. The parameter <sel> is always filled with <f>.
    [NOT] BETWEEN <f1> AND <f2> [SIGN <s>], for interval selection
    <f1> is transferred into the LOW field, <f2> into the HIGH field, and <s> into the SIGN field of the selection table <sel> in the called program. If you omit the NOT option, the system places the value BT into the OPTION field; if you use NOT, the system fills OPTION with NB.
    IN <seltab>, transferring a selection table
    This addition fills the selection table <sel> in the called program with the values of the table <seltab> in the calling program. Table <seltab> must have the structure of a selection table. Use the RANGES statement to create selection tables.
    WITH FREE SELECTION <freesel>, user dialog for dynamic selections
    To use this option, the called program must be connected to a logical database that supports dynamic selections. In the calling program, use the function modules FREE_SELECTIONS_INIT and FREE_SELECTIONS_DIALOG. They allow the user to enter dynamic selections on a selection screen. One export parameter of these function modules has structure RSDS_TEXPR from the RSDS type group. Transfer the values of this export parameter by means of the internal table <freesel> of the same structure to the called report.
    WITH SELECTION-TABLE <rspar>, dynamic transfer of values
    You need an internal table <rspar> with the Dictionary structure RSPARAMS. The table then consists of the following six fields:
    SELNAME (type C, length 8) for the name of the selection criterion or parameter
    KIND (type C, length 1) for the selection type (S for selection criterion, P for parameter)
    SIGN, OPTION, LOW, HIGH as in a normal selection table, except that LOW and HIGH both have type C and length 45.
    This table can be filled dynamically in the calling program with all of the required values for the selection screen of the called program. If the name of a selection criterion appears more than once, the system creates a multiple-line selection table for that criterion in the called program. If the name of a parameter appears more than once, the system uses the last value. Note that LOW and HIGH have type C, so that the system executes type conversions to the criteria of the called program. This is important for date fields, for example. Before your program is used in a live context, you should check it using the VIA SELECTION-SCREEN addition.
    Except for WITH SELECTION-TABLE, you can use any of the above options several times and in any combination within a SUBMIT statement. In particular, you can use the WITH <sel> option several times for one single criterion <sel>. In the called program, the system appends the corresponding lines to the selection tables used. For parameters, it uses the last value specified. The only combination possible for the WITH SELECTION-TABLE option is USING SELECTION-SET.
    If the input fields on the selection screen are linked to SPA/GPA parameters, you can also use this technique to pass values to the selection screen (see Passing Data Between Programs).
    The following executable program (report) creates a selection screen containing the parameter PARAMET and the selection criterion SELECTO:
    REPORT  demo_program_submit_rep1.
    DATA number TYPE i.
    PARAMETERS      paramet(14) TYPE c.
    SELECT-OPTIONS  selecto FOR number.
    The program DEMO_PROGRAM_SUBMIT_REP1 is called by the following program using various parameters:
    REPORT demo_program_submit_sel_screen NO STANDARD PAGE HEADING.
    DATA: int TYPE i,
          rspar TYPE TABLE OF rsparams,
          wa_rspar LIKE LINE OF rspar.
    RANGES seltab FOR int.
    WRITE: 'Select a Selection!',
    SKIP.
    FORMAT HOTSPOT COLOR 5 INVERSE ON.
    WRITE: 'Selection 1',
         / 'Selection 2'.
    AT LINE-SELECTION.
      CASE sy-lilli.
        WHEN 4.
          seltab-sign = 'I'. seltab-option = 'BT'.
          seltab-low  = 1.   seltab-high   = 5.
          APPEND seltab.
          SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN
                          WITH paramet eq 'Selection 1'
                          WITH selecto IN seltab
                          WITH selecto ne 3
                          AND RETURN.
        WHEN 5.
          wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.
          wa_rspar-sign = 'E'. wa_rspar-option = 'BT'.
          wa_rspar-low  = 14.  wa_rspar-high = 17.
          APPEND wa_rspar TO rspar.
          wa_rspar-selname = 'PARAMET'. wa_rspar-kind = 'P'.
          wa_rspar-low  = 'Selection 2'.
          APPEND wa_rspar TO rspar.
          wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.
          wa_rspar-sign = 'I'. wa_rspar-option = 'GT'.
          wa_rspar-low  = 10.
          APPEND wa_rspar TO rspar.
          SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN
                          WITH SELECTION-TABLE rspar
                          AND RETURN.
      ENDCASE.
    Pls. reward if useful...

  • How to create a value sets for concurrent program?

    Hi Friends,
    I am creating a concurrent program with a parameter period...
    In the value set for the parameter period, I am using the following query :
    ---where application_id = 101
    and set_of_books_id = :$PROFILES$.gl_set_of_bks_id
    and closing_status IN ( 'O', 'F', 'C')
    order by period_year, period_num' ----
    In my cursor, i have a condition 'where set_of_books_id = ' ---
    How can I pass the above set of books id into the cursor ?? it is not working when I am defining another parameter as Book and passing that value to the cursor....
    I need that period parameter to return all the periods for the set of books where we are running the concurrent request from...I also need to get the set of books id for my cursor...
    Hope I am making sense...All that I am trying is to have period parameter and also a SOB id in cursor condition...
    Rgds,

    Hi Vamsi /Nitin,
    Let me explain the whole thing now.....
    My plsql procedure is ......
    CREATE OR REPLACE procedure GL_INT(
         perrbuff     out varchar2,
         pretcode     out varchar2,
    pbook          in varchar2,
    pperiod          in varchar2
         ) is
    cursor cur1 (p_sdate in date, p_edate in date )is
    select distinct group_id groupid,
    user_je_source_name source
    from gl_interface
         where accounting_date >= p_sdate
    and accounting_date <= p_edate
    and set_of_books_id = pbook;
    cursor cur2 is
    select distinct start_date sdate,
         end_date edate, period_name period
    from gl_period_statuses
    where      period_name = pperiod
         and set_of_books_id = pbook
         and application_id = 101;
    i               cur1%rowtype;
    j               cur2%rowtype;
    begin
    open cur2;
                   fnd_file.put_line(fnd_file.output,'PERIOD'||'----'||'GROUPID'||
                                       '----'|| 'SOURCE');
              loop
                   fetch cur2 into J;
    exit when cur2%notfound;
                   open cur1(J.sdate,J.edate);
                   loop
              fetch cur1 into I;
                        exit when cur1%notfound;
              fnd_file.put_line(fnd_file.output, J.period||'----'||I.groupid||'----'||
                                  I.source);
                   end loop;
              end loop;
         Close cur1;
    close cur2;
    Exception when others then dbms_output.put_line(SQLERRM);     
    end;
    ==================================================================================================
    For SOB value set, I have passed the default value as vamsi suggested ($profiles$.gl_set_of_bks_id)....
    For period value set, I have entered query as ..where application_id = 101
    and set_of_books_id = :$PROFILES$.gl_set_of_bks_id
    and closing_status IN ( 'O', 'F', 'C')
    order by period_year, period_num...................
    It still doesn't work....I don't know how to derive those Periods based on the SOBs and at the same time pass SOB id into the cursors...
    Please help...
    Rgds,
    Murali

  • Setting profile option values using Java Concurrent Program

    Hi,
    I have a java concurrent program in which i am trying to update a profile option which is enabled only at site level, but the values are not getting committed once the CP completes.
    1. I am using CpContext.getProfileStore().SetProfile(<name>,<value>) to set the value.
    2. I am printing CpContext.getProfileStore().getProfile(<name>) in the same run and this works.
    3. BUt once the CP completes, the values are gone. Seems we have to issue a commit.
    3. So i used CpContext.getJDBCConnection().commit; Even this doesn't commit.
    Pls. suggest. Has anyone used these APIs to update profile options?
    Thanks,
    Suresh.

    I am not not a java expert, but pl see if MOS Docs 305710.1 (A SAMPLE JAVA CONCURRENT PROGRAM) and 827563.1 (How To Create a Java Concurrent Program?) can help
    HTH
    Srini

  • Pass Input Values to BI Publisher Report Layout from BI Answers Dashboard

    Has anyone been able successfully pass user input values from a BI Answers dashboard prompt into a BI Publisher report? I'm trying add user inputted text (notes, comments) into a report he/she runs.
    I've been trying with no success. I've matched the name of the presenation variables in Answers to the parameter definitions in BI Publisher.
    I've declared the parameter in the RTF template as below:
    1. Declaration
    <?param@begin:param1?>
    2. retrive value:
    <?$param1?>
    If i run it directly from BI Publisher, there is no issue. When I pass the value from an Answers dashboard, the text is never displayed in the report?
    Any suggestions?
    Thanks,
    Lael
    Oracle Business Intelligence 10.1.3.4.2
    BI Publisher 10.1.3.4.1
    Red Hat 5.6
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    AIX 6.1

    Hi Vishal,
    Refer: http://blogs.oracle.com/xmlpublisher/entry/running_bip_reports_in_biee_wi
    or
    http://kirti-bi-solutions.blogspot.com/2009/06/passing-parameters-from-obiee.html
    thanks,
    Saichand.v

  • How to pass a value and call SE38 program using SUBMIT statement

    Hello Friends
    I am trying to write a batch program in SE38, that calls other SE38 Programs.
    I don't want to use Parameter command to see the value on screen.
    All I want is to send a range of date (ToDate & FromDate) and generate different reports satisfying this date range condition.
    Can some one please help me with this. I would really appreciate it.
    I have tried the command SUBMIT with options of filling the input fields of the subsequent programs but I don't want to do this.
    I want all the sub programs to be called one after another and the reports generated using the date varialbles I send from the main program.
    I don't want to use se37 functions because of the client's request.
    Any help will be highly appreciated.
    Tks
    Ram

    Yes I am using SUBMIT command but I was not using the right options with the SUBMIT command and once I used the right options, it worked.
    Tks
    Ram

  • How do I pass input values from a html page to a jsf page

    hi,
    In my project,for front view we have used html pages.how can I get input values from that html page into my jsf page.for back end purpose we have used EJB3.0
    how can I write jsf managed bean for accessing these entities.we have used session facade design pattern and the IDE is netbeans5.5.
    pls,help me,very urgent
    thanx in advance

    Simplest way is to rewrite html page into jsf page.
    You can use session bean in your managed bean like this:
    import javax.naming.Context;
    import javax.naming.InitialContext;
    public class ManagedBean {
    private Context  ctx;
    private Object res;
    // session bean interface
    private Service service;
              public ManagedBean() {
                try{
                     ctx = new InitialContext();
                     res = ctx.lookup("Service");
                     service = (Service) res;
               catch(Exeption e){
    }Message was edited by:
    m00dy

  • Java Concurrent Program - connecting to MS SQL Server

    Hi,
    I hope this is correct forum to post this question.
    I am writing a JCP which will connect to a MS SQL Server DB, pull data from a table and populate this data into a custome table in EBS (R12.1.1) database. But I am facing some issues.
    When I run run this concurrent program from EBS, I get following exception message:
    Wed Aug 08 01:18:04 GMT 2012: In openConection()
    Wed Aug 08 01:18:04 GMT 2012: Before Loading Driver com.microsoft.jdbc.sqlserver.SQLServerDriver
    Wed Aug 08 01:18:04 GMT 2012: openConection() ClassNotFoundException: java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
    Wed Aug 08 01:18:04 GMT 2012: Before Calling processPrintMachineRecords()
    Wed Aug 08 01:18:04 GMT 2012: Exception:: java.lang.NullPointerException
    Wed Aug 08 01:18:04 GMT 2012: In closeSQLServerConnection().......closing JDBC Connection
    Wed Aug 08 01:18:04 GMT 2012: Connection object was null, hence skipping close
    Wed Aug 08 01:18:04 GMT 2012: After Calling processPrintMachineRecords()
    The I read somewhere on internet that I should set CLASSPATH in options field of concurrent program definition. So I provided classpath as follows:
    -cp /rs01/u02/applmgr/utyeb02/apps/apps_st/appl/au/12.0.0/appsborg.zip:/rs01/u02/applmgr/utyeb02/apps/apps_st/comn/java/classes/apps.zip:/rs01/u02/applmgr/utyeb02/apps/apps_st/comn/java/classes/sqljdbc_4.0/enu/sqljdbc.jar
    In this classpath sqljdbc.jar contains the classes for connecting to MS SQL Server DB. However after giving classpath like this I started getting different error:
    Exception in thread "main" java.lang.NoClassDefFoundError: oracle/apps/fnd/cp/request/Run
    Caused by: java.lang.ClassNotFoundException: oracle.apps.fnd.cp.request.Run
         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    It appears from the error message that after giving this CLASSPATH, program was not able to find the "Run" method itself. In otherwords, CLASSPATH screwed it further.
    Can anybody please point out what am I doing wrong here?
    Regards
    Java Code:
    package oracle.apps.custom.printmachine;
    import java.sql.*;
    import oracle.apps.fnd.cp.request.* ;
    import java.io.*;
    import oracle.apps.fnd.util.*;
    public class PrintMachineInterface implements JavaConcurrentProgram {
    public static final String M_SUCCESS = "SUCCESS";
    public static final String M_ERROR = "ERROR";
    public static final String M_WARNING = "WARNING";
    int mRequestStatus = -1;
    int max_number_of_records = 99999999;
    private String mSqlServerHost = "mysqlserver.domain.com";
    // Application Short Name
    private String applName;
    CpContext mCtx;
    LogFile logFile;
    OutFile outFile;
    Connection mConn = null;
    ReqCompletion lRC;
    public PrintMachineInterface(){
    // if no parameter value is specified for APPLNAME then use FND
    //as default value
    applName = "FND";
    private void logMessage(String str) {
    java.util.Date now = new java.util.Date();
    logFile.writeln(now.toString() + ": " + str, LogFile.STATEMENT);
    static String mInsertRecord = " Declare " + " BEGIN "
    + " INSERT INTO XXGFN_GBL_CE_PM_STAGE(ID, KEY, FILENAME, PRINTED_AT, CREATED_AT, DOCTYPE, LANGUAGE, OU, TRX_ID, DOC_ID, REQ_ID, TEMPLATE, PAGES, DOC_TEXT, TIMES_RECEIVED)"
    + " VALUES (:1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13, substr(:14,2000), :15);"
    + " COMMIT;"
    + " END;";
    static Connection con = null;
    public void openConection() {
    logMessage( "In openConection()");
    try {
    logMessage( "Before Loading Driver com.microsoft.jdbc.sqlserver.SQLServerDriver");
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    logMessage( "After Loading Driver com.microsoft.jdbc.sqlserver.SQLServerDriver");
    logMessage( "Attempting to connect to " + mSqlServerHost);
    con = DriverManager.getConnection("jdbc:microsoft:sqlserver://" + mSqlServerHost + ":1433;User=sql_user;Password=sql_pwd");
    logMessage( "After con assigned from getConnection(jdbc:microsoft:sqlserver://" + mSqlServerHost + ":1433;User=pm_dba_access;Password=*****");
    } catch (java.lang.ClassNotFoundException e) {
    logMessage("openConection() ClassNotFoundException: " + e);
    } catch (SQLException ex) {
    logMessage("openConection() SQLException: " + ex);
    public void closeSQLServerConnection() {
    try {
    logMessage( "In closeSQLServerConnection().......closing JDBC Connection");
    if (con != null)
    logMessage( "Con is not null");
    con.close();
    logMessage( "Con Closed Successfully");
    else
    logMessage( "Connection object was null, hence skipping close");
    } catch (SQLException ex) {
    logMessage("SQLException: " + ex);
    } catch (Exception ex) {
    logMessage("Exception in closeSQLServerConnection() : " + ex);
    private void populate_staging_table(
    String p_id,
    String p_key,
    String p_filename,
    String p_printed_at,
    String p_created_at,
    String p_doctype,
    String p_language,
    String p_ou,
    String p_trx_id,
    String p_doc_id,
    String p_req_id,
    String p_template,
    String p_pages,
    String p_doc_text,
    String p_times_received
    PreparedStatement lStmt = null;
    logMessage("Populating data from PrintMachine history table");
    try {
    lStmt = mConn.prepareCall(mInsertRecord);
    lStmt.setString(1, p_id);
    lStmt.setString(2, p_key);
    lStmt.setString(3, p_filename);
    lStmt.setString(4, p_printed_at);
    lStmt.setString(5, p_created_at);
    lStmt.setString(6, p_doctype);
    lStmt.setString(7, p_language);
    lStmt.setString(8, p_ou);
    lStmt.setString(9, p_trx_id);
    lStmt.setString(10, p_doc_id);
    lStmt.setString(11, p_req_id);
    lStmt.setString(12, p_template);
    lStmt.setString(13, p_pages);
    lStmt.setString(14, p_doc_text);
    lStmt.setString(15, p_times_received);
    lStmt.execute();
    lStmt.close();
    } catch (SQLException s) {
    logMessage("Exception thrown w/ error message: "
    + s.getMessage());
    s.printStackTrace();
    finally {
    try {
    if (lStmt != null)
    lStmt.close();
    } catch (SQLException e) {
    logMessage("SQLException: " + e);
    private void processPrintMachineRecords() {
    int number_of_recs = 0;
    try {
    PreparedStatement stmt = con.prepareStatement("SELECT TOP 1000 ID, Key, Filename, PrintedAt, CreatedAt, Doctype, Language,OU, TransactionID, DocumentID, RequestID, Template, Pages, Documenttext, TimesReceived FROM PM_DATA.dbo.History" );
    ResultSet rst = stmt.executeQuery();
    while (rst.next()) {
    number_of_recs++;
    if (number_of_recs == max_number_of_records) break;
    populate_staging_table(
    rst.getString(1), rst.getString(2)
    ,rst.getString(3), rst.getString(4)
    ,rst.getString(5), rst.getString(6)
    ,rst.getString(7), rst.getString(8)
    ,rst.getString(9), rst.getString(10)
    ,rst.getString(11), rst.getString(12)
    ,rst.getString(13), rst.getString(14)
    ,rst.getString(15)
    stmt.close();
    rst.close();
    mConn.commit();
    } catch (SQLException ex) {
    logMessage("SQLException: " + ex);
    catch (Exception ex) {
    logMessage("Exception:: " + ex);
    closeSQLServerConnection();
    public void runProgram(CpContext pCpContext) {
    applName = "XXGFN";
    String l_file_path = null;
    mCtx = pCpContext;
    //get handle on request completion object for reporting status
    lRC = pCpContext.getReqCompletion();
    // assign logfile
    logFile = pCpContext.getLogFile();
    // assign outfile
    outFile = pCpContext.getOutFile();
    // get the JDBC connection object
    mConn = pCpContext.getJDBCConnection();
    l_file_path = ((new File(outFile.getFileName())).getParent() == null ? ""
    : (new File(outFile.getFileName())).getParent());
    // get parameter list object from CpContext
    ParameterList lPara = pCpContext.getParameterList();
    while (lPara.hasMoreElements())
    NameValueType aNVT = lPara.nextParameter();
    if ( aNVT.getName().equals("APPLNAME") )
    applName = aNVT.getValue();
    /** openConection() Opens the connection to SQL Server Database*/
    openConection() ;
    logMessage("Before Calling processPrintMachineRecords()");
    processPrintMachineRecords();
    logMessage("After Calling processPrintMachineRecords()");
    try{
    setCompletion(ReqCompletion.NORMAL, "Request Completed Normal");
    } catch (Exception e) {
    setCompletion(ReqCompletion.ERROR, e.toString());
    } finally {
    pCpContext.releaseJDBCConnection();
    * Sets the request completion status based on proper precedence. ERROR >
    * WARNING > NORMAL
    * @param pStatus
    * Status of the request.
    * @param pCompletionText
    * Request's completion text.
    public void setCompletion(int pStatus, String pCompletionText) {
    if ((pStatus == ReqCompletion.ERROR)
    || ((pStatus == ReqCompletion.WARNING) && (mRequestStatus != ReqCompletion.ERROR))
    || ((pStatus == ReqCompletion.NORMAL)
    && (mRequestStatus != ReqCompletion.WARNING) && (mRequestStatus != ReqCompletion.ERROR))) {
    mRequestStatus = pStatus;
    lRC.setCompletion(pStatus, pCompletionText);
    }

    ok
    i used Template.java as input
    useful MOS:
    How To Create a Java Concurrent Program? [ID 827563.1]
    Java Concurrent Program FAQ [ID 827575.1]
    i used
    //goto ms sql server 2008r2       
            try{
             Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");        
             con = java.sql.DriverManager.getConnection( 
                                          "jdbc:sqlserver://1.2.3.4:1433;databaseName=test;selectMethod=cursor", 
                                          "test", "test");          
              if(con!=null) System.out.println("Connection Successful!");
            }catch(Exception e){
              e.printStackTrace();
              System.out.println("Error Trace in getConnection() : " + e.getMessage());
            }1.2.3.4 - ip of instance with sqlserver2008r2 :)
    in your code
    >
    try {
    logMessage( "Before Loading Driver com.microsoft.jdbc.sqlserver.SQLServerDriver");
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    logMessage( "After Loading Driver com.microsoft.jdbc.sqlserver.SQLServerDriver");
    logMessage( "Attempting to connect to " + mSqlServerHost);
    con = DriverManager.getConnection("jdbc:microsoft:sqlserver://" + mSqlServerHost + ":1433;User=sql_user;Password=sql_pwd");
    logMessage( "After con assigned from getConnection(jdbc:microsoft:sqlserver://" + mSqlServerHost + ":1433;User=pm_dba_access;Password=*****");
    } catch (java.lang.ClassNotFoundException e) {
    logMessage("openConection() ClassNotFoundException: " + e);
    } catch (SQLException ex) {
    logMessage("openConection() SQLException: " + ex);
    >
    try my case for Driver and Connection
    put result .class file to needed directory
    put sqljdbc4.jar to /rs01/u02/applmgr/utyeb02/apps/apps_st/comn/java/lib
    and for concurrent program option
    -classpath /rs01/u02/applmgr/utyeb02/apps/apps_st/comn/java/classes:/rs01/u02/applmgr/utyeb02/apps/apps_st/appl/au/12.0.0/appsborg.zip:/rs01/u02/applmgr/utyeb02/apps/apps_st/comn/java/lib/sqljdbc4.jaralso useful mos:
    Classpath Setting of Third Party Jar Files in R12 Java Concurrent Program (JCP) [ID 1292694.1]

  • 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

  • Passing value from ADF to BPEL, and to PL/SQL  procedure

    1. I have created BPEL which take 2 inputs and concatenate them.
    2. have created a PL/SQL procedure for invoking this BPEL( working fine).
    Now i need to create a simple ADF page which contain 2 text box, 2 for input and 1 for result(concatenate), this will take 2 inputs and send them into BPEL, this will invoke the BPEL process and perform the necessary concatenate function...
    in addition to this, i am passing code into PL/SQL procedure ...
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body xmlns:ns1="http://xmlns.oracle.com/OrderImportDemo">
    <ns1:InputRequest>
    <ns1:FirstName>abcdef</ns1:FirstName>
    <ns1:LastName>aaaaaa</ns1:LastName>
    </ns1:InputRequest>
    </soap:Body>
    </soap:Envelope>';
    this code will take vaule from BPEL and run properly.
    can you please help me,

    thanks for help, but the problem is diff.
    i don't have any schema, what i want i need to create a adf page that will contain 3 tent field, 2 for input and 1 for output. when i will enter 2 input field and click on ok button, this will invoke BPEL, BPEL will take these 2 inputs and do the concat on this and send back to adf with result.

Maybe you are looking for

  • Problem with ssl in weblogic 10.3

    I would like to connect from web application on my weblogic to webservices(they are on https) on other server(IIS). What should I add to my weblogic? KeyStore with appropriate certificate? I got this kind of error when I set keysore prime.jks in webl

  • USB ports no longer working after 10.4.7 update

    Hi, I ran the latest update (10.4.7) on my machine which is a G4 Quicksilver PowerPC. I have an Apple 17 inch flat screen display that has two USB ports attached. I had my keyboard plugged into one of the USB ports on my flat screen. After the update

  • Adapter module not working

    Hi to all, I have written a custom adapter module that I use in a sender channel. I have deployed the EJB with NWDS. However, the module seems to be ignored from the adapter. Why? Can anyone suggest me? Thanks!

  • SSHD starts after reboot?

    Hi! I need to make a script which disables telnet, ftp etc. accesses to a Solaris 9 host in order to use only SSH connections to that machine. I would like to be sure before disabeling all those services that ssh is enabled and the daemon will start

  • Why don't I have enough access privlages?

    I can't sync my phone.  A window pops up saying I don't have enough access privlages to perform the task. How do I gain access privlages to sync my phone?