Estimating number of concurrent requests

Hello,
I want to estimate the number of concurrent requests that my server application may need to handle.
Here are 3 approaches I tried to compute the probability of concurrent requests. Each of them gives different results, and obviously some of the results are palin wrong.
It's been a while since I've learnt probabilities, I used to be comfortable with them back then, but this time's over it seems.
Can you help me point out the flaw in the reasoning of each approach (that's for my culture), and, better yet, suggest how to correctly estimate the reasonable number of concurrent requests the server will have to handle (that's for my current problem)?
Preliminary assumptions:
Here are the figures, to fix ideas, and illustrate examples given below of the approach I took.
The application will have 1000 users, each of them issuing 10 requests per day.
Each request take approx 1 minute to be processed.
Users are supposed evenly distributed over worlwide timezones, and the requests are supposed to be evenly distributed over the time of a day (which is not true for a single given user, but is true if enough users are evenly distributed over timezones).
Users are supposed to work independantly of each other, so the probabilities of their actions are independant.
*1) Approach 1: brute linear approach:*
Each user uses 10 requests * 60s/rq = 600s of server time per day.
1000 users therefore use 600,000 seconds of server time; as there are 86400s per day, in average the server is serving *600K/86,K = approx 7* request at any instant of the day.
*2) Approach 2: estimate probability of N concurrent requests*
Each user uses 600s of server time per day.
So the probability to be serving one given user at any given instant of one day seems to be *600/86,400 = approx 0.007*
The probability to be serving N given users at any given instant is therefore 0.007 pow N.
As we don't care about which specific N users are served, the probability to be serving whatever N users is therefore: *(0.007 pow N)xC(1000,N)* where C(1000,N) is the binomial coefficient for subsets of N elements among 1000.
For N=7 it gives a probability of approx 151%
For N=10 it gives a mighty 68%
You have to wait above N=20 to fall under a 1% probability
*3) Approach 3: estimate probability of "not N" concurrent requests*
Each user uses 600s of server time per day.
So the probability to not serve one given user at any given instant of one day seems to be *85,800/86,400 = approx 0.993*
The probability to not serve N given users at any given instant is therefore *0.993 pow N* .
This probability is interesting for big values of N (the probability to serve m users = probability to not serve N=1000-m users), which for N=993 gives 0.09%
But if I multiply by the binomial coefficient, the value is much above 1 for almost all values of N (interestingly, N=999 gives 95%, and N=1000 (0 user served) is 0.09%, but these results are probably artifacts of the floating point computations).
What mixes me up are the following questions:
Q1) Is approach 1 reasonable enough?
It seems to be modelling a degenerate form of approach 2, where the requests would not be randomly spread over the day, but optimally organized in queues.
I cannot force this usage pattern.
Q2) How would you approach this estimation? Do you have a better approach?
Q3) Obviously the formula in approach 2 is wrong at some point as for certain values of N it is above 1.
It is expected that the probability for these values of N is 1, as the linear formula prooves that it is not possible to fit all 40000 requests into one day under a concurrency level of 7. But >1 is mathematically incorrect, so what is the flaw in the reasoning, that leads to this formula?
Q4) What worries me in approach 2 is that I actually use approach 1 to compute the basic probability of 0.007, then use this result in the supposedly more general formula. I'm not sure whether the computing of the 0.007 qualifies as a deduction or as an assumption?
Q5) What's wrong with approach 3 (probability to not serve N clients)? Why are the results inconsistent with approach 2?
Q6) What worries me too is that I based all three approaches on instants of duration zero ("the probability that at any instant..."). Should I instead try to compute "the probability that over a period of 1 second, one user issues a request"? How does this modify the reasoning and the formulaes?
Thank you in advance for your help.
J.

When it becomes difficult to get closed form solutions then resort to simulation. The following is a basic event simulation of 1 days of your problem as I understand it but using a uniform random active period. It will be trivial to change the active distribution to match your exact requirement. You will need to add JFreeChart to the classpath to run it.
One advantage of this form of simulation is that one can easily add logic such as that to throttle the response and then examine how this affects users.
import java.awt.Dimension;
import java.awt.geom.Point2D;
import java.util.ArrayList;
import java.util.List;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Random;
import javax.swing.JFrame;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartPanel;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.data.DomainOrder;
import org.jfree.data.xy.AbstractXYDataset;
public class Sabre20090403
    private static final double MEAN_TIME_BETWEEN_ACTIVE = 24D * 60 * 60 / 10; // seconds
    private static final double MEAN_PROCESSING_TIME = 60; // seconds
    static class Context
        public String toString()
            return "Number active = " + numberActive;
        public void appendPoint(double x, double y)
            Point2D.Double p = new Point2D.Double(x, y);
            results.add(p);
        public Point2D.Double[] getPoints()
            return results.toArray(new Point2D.Double[0]);
        private final List<Point2D.Double> results = new ArrayList<Point2D.Double>();
        private int numberActive = 0;
    abstract static class Task implements Comparable<Task>
        abstract void run();
        public double getEventTime()
            return time_;
        public int compareTo(Task other)
            if (time_ < other.time_)
                return -1;
            else if (time_ > other.time_)
                return +1;
            else
                return 0;
        protected double time_ = 0; // in seconds
    static class TerminalTask extends Task
        public TerminalTask(double simulationDuration)
            time_ = simulationDuration;
        public void run()
            System.out.println("Simulation finished");
    static class PrintTask extends Task
        public PrintTask(Context context, double printInterval)
            context_ = context;
            printInterval_ = printInterval;
        public void run()
            context_.appendPoint(time_, context_.numberActive);
            System.out.println("Time " + time_ + "\t" + context_);
            time_ += printInterval_;
        private final double printInterval_;
        private final Context context_;
    static class User extends Task
        public User(Context context)
            context_ = context;
            run();
        public int getID()
            return ID;
        public void run()
            active = !active;
            if (active)
                context_.numberActive++;
                // Uniformly distributed from 0.5 mpt to 1.5 mpt
                double p = random.nextDouble();
                time_ += MEAN_PROCESSING_TIME * (0.5 + p);
            } else
                double p = random.nextDouble();
                // Exponential distribution with mean of MEAN_TIME_BETWEEN_ACTIVE
                double delta = -MEAN_TIME_BETWEEN_ACTIVE * Math.log(p);
                time_ += delta;
                if (context_.numberActive > 0)
                    context_.numberActive--;
        private boolean active = true;
        private final int ID = nextID++;
        private static int nextID = 0;
        private final Context context_;
        private static Random random = new Random();
    static class Problem implements Runnable
        private Queue<Task> eventQueue = new PriorityQueue<Task>(20000);
        public void run()
            final Context context = new Context();
            for (int i = 0; i < 1000; i++)
                eventQueue.offer(new User(context));
            eventQueue.offer(new PrintTask(context, 60 * 10L)); // 10 minutes print interval
            eventQueue.offer(new TerminalTask(24L * 60 * 60)); // 1 day
            while (true)
                final Task task = eventQueue.poll();
                task.run();
                if (task instanceof TerminalTask)
                    break;
                else
                    eventQueue.offer(task);
            final AbstractXYDataset xyDataset = new AbstractXYDataset()
                private final Point2D.Double[] points = context.getPoints();
                public double getXValue(int series, int item)
                    return points[item].x / 60.0;
                public double getYValue(int series, int item)
                    return points[item].y;
                public DomainOrder getDomainOrder()
                    return DomainOrder.ASCENDING;
                public Comparable getSeriesKey(int index)
                    return "P" + index;
                public int getSeriesCount()
                    return 1;
                public Number getX(int series, int item)
                    return new Double(getXValue(series, item));
                public Number getY(int series, int item)
                    return new Double(getYValue(series, item));
                public int getItemCount(int series)
                    return points.length;
            final JFrame frame = new JFrame("");
            final JFreeChart jfreechart = ChartFactory.createXYLineChart("Simulation", "Time (minutes)", "Number active", xyDataset, PlotOrientation.VERTICAL, true, true, false);
            final ChartPanel panel = new ChartPanel(jfreechart);
            panel.setPreferredSize(new Dimension(1024, 768));
            frame.setContentPane(panel);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.pack();
            frame.setLocationRelativeTo(null);
            frame.setVisible(true);
        public static void main(String[] args)
            new Problem().run();
}Edited by: sabre150 on Apr 3, 2009 7:34 PM

Similar Messages

  • How to change priority number in concurrent requests

    hi ,
    i have a doubt about priority (50)number in concurrent request page. can we change it some other number, if it does plz give an suggestion how to change that number.
    thanks&regards
    baleeswar

    Post your questions here.
    General EBS Discussion
    Check this out:
    http://www.dba-oracle.com/art_dbazine_conc_mgr.htm

  • Number of concurrent managers

    Hi,
    how to change the number of concurrent managers ?
    Many thanks before.

    Hi Shashi,
    In our R12 test environments , the defualt number of concurrent managers are 3, where as the average number of Concurrent Request are 12 at a time and see 20-30 concurrent requests in pending and nothing in CRM. Can you please advise how can I increase the default number of concurrent manager from 3 to 8. Do you mean number of CM or number of processes? If you want to increase the number of concurrent managers, refer to the document below. For increasing the number of processes you can do from (Concurrent > Manager > Define).
    Also we has custom requests with an average of 1-2 at a time, so reading on some of the previous posts, It was recommended to have custom manager to handle the custom request. Can you please tell me how to create Custom Managers.It is recommended you have custom concurrent managers to process your custom concurrent programs.
    Note: 170524.1 - How to Create a Custom Concurrent Manager
    Oracle Applications System Administrator's Guide Documentation Set
    http://www.oracle.com/technology/documentation/applications.html
    Thanks,
    Hussein

  • Taking in many concurrent requests via a single servlet

    Hi,
    My objective for this topic is to find a way to make my tomcat app able to handle as many as possible concurrent requests.
    My app spec is
    -servlet running on Tomcat 5.0
    My app is a mobile text messaging app that receives requests via a single servlet, called InboundRequest. This servlet will,
    1. Read the HTTP params in the request
    2. Decide to which other servlet classes it should forward to (RequestDispatcher)
    3. The recipient servlet will read the HTTP param, process it and outputs the data via OutboundResponse java class.
    So, my issue is,
    1. What factor decides the number of concurrent requests my InboundRequest servlet can handle? Is it my code or Tomcat itself or the server hardware
    2. Since I'm using Request Dispatcher forwarding, if say i have a request that takes 5 seconds to complete the its task (to output the result via OutboundResponse), will in inhibits/stops any other requests that comes in during that 5 seconds?
    I appreciate all expertise i can get.
    Regards,
    Mel.

    There is nothing to worry about that concurrent request handling as container will create one instance of your servlet and then for each client request it will spwan a single thread which will handel the client request.If u r implementing SingleThreadModel then onle one thread will be spwan and it will handle the requests one by one .So it will be slower .

  • BIA Concurrent Requests

    Hi,
    We are having performance issues in our production BIA  environment. Our BIA system (7.2 revision 11) is running on 11 blades. In the BW system, SM66 all work process are busy with waiting status with many TREX requests. So, we are thinking increasing concurrent requests will help. Could some one please advise?
    At present our BIA system showing no.of concurrent requests:7
    no.of TREX Rfc threads : 462
    no.of work processes(192 DIA, 31 BGB) : 223
    Application Servers:6
    No.of BIA blades: 11
    Based on above info, can some one please suggest, no.of concurrent requests that we need to increase?
    I have another question, we recently increased RSADMIN parameter QUERY_MAX_WP_DIAG value to 11 in our BW system. So, if we increase QUERY_MAX_WP_DIAG to 11 in BW, do we need to increase concurrent requests value in BIA?
    Thanks in advance
    Regards
    Sri.
    Edited by: Srinivas Dasari on Jan 6, 2012 4:53 AM

    Hello Sri
    I believe default value for  QUERY_MAX_WP_DIAG is 6. As you made it 11 now at max 11 parallel processing can happen for one query execution if splitting is possible.
    So may be increase of this value increased the number of concurrent request.
    If you have 11 working blades for BWA , number of concurrent request should generally be 22.
    no of con req = 2X number of blades.
    Please check if all of them are active blades.
    To be in safer side start with 14 or 16 and depending upon the result gradually increase them
    Regards
    Anindya

  • Query to find Concurrent requests executed on each db node in RAC from in last 24 Hours

    Hi
    Could you please help me in getting the query to find total number of concurrent requests executed on each db node in Two DB Node RAC with PCP ( Two CM Nodes) in last 24 hours.

    c2670397-8171-480e-b9f8-8874e77ee0b4 wrote:
    Hi
    Could you please help me in getting the query to find total number of concurrent requests executed on each db node in Two DB Node RAC with PCP ( Two CM Nodes) in last 24 hours.
    Query FND_CONCURRENT_REQUESTS table (ACTUAL_START_DATE and ACTUAL_COMPLETION_DATE columns) -- http://etrm.oracle.com/pls/et1211d9/etrm_pnav.show_object?c_name=FND_CONCURRENT_REQUESTS&c_owner=APPLSYS&c_type=TABLE
    https://community.oracle.com/message/10780262#10780262
    https://community.oracle.com/message/10589420#10589420
    Thanks,
    Hussein

  • How to get EBS Concurrent Request number (and more) into BIP Report Layout

    hi,
    I have been using BIP for 9 months but have several years experience of Reports 6i development (matrix, drill-thru etc). We are beginning to use BI Publisher with EBS and would like to be able to incorporate the Concurrent Request number into the report layout (preferably in the footer area). I have looked back over previous forum posts and have found mention of how to get the report parameters into the XML datastream and template, but nothing for the Concurrent Request number. I've also looked at the DevTools/Reports forum but cannot see anything similar there.
    It would add a lot of value to generated output for end-users if this information (+ environment/instance name etc) can be put into the layout.
    Sean

    Hi
    Create a data query in data template/reports as
    select fnd_global.conc_request_id "REQUEST_ID" from dual
    and this will pick up the request id and then u can use it in the RTF layout
    Hope this helps..

  • Purge Concurrent Request and/or Manager Data program:

    Hi Friends,
    I am purging all my test report output logs using the above program, but the table
    FND_CONC_PP_ACTIONS is not being deleted;
    SQL> select count (*) from FND_CONC_PP_ACTIONS;
    COUNT(*)
    9470
    FND_CONC_PP_ACTIONS
    Stores the post request processing actions(e.g., print, notify) for each
    submitted request. There's a concurrent_request_id here for each request_id
    in the FND_CONCURRENT_REQUESTS.
    How can i forced delete the tables? since im still on the testing phase its OK if i zero out
    all of it.
    Thanks a lot

    or I want it zero (0) to delete all You cannot set it to zero (0). The Age parameter should be between (1) and (9999999).
    Did I mess it up? when I manually deleted the contents of
    I thought I can delete this logs manually because they are on filesystem.
    I thought only the database tables are needed to be cared for. Even though you should not bother yourself and delete the files manually under $APPLOG and $APPLOUT directories since the concurrent request will do the job for you, it is safe to delete it manually. The only impact you would have here is, you would not be able to access the log/out files of the concurrent requests (if the requests still presented in the tables and you can see it from the application).
    Did you try to use the "Count" parameter instead of the "Age"? The "Count" parameter indicates the number of (most recent) records for which you want to save concurrent request history, log file, and report output files.

  • How to submit a concurrent request from a button in Selfservice

    Hi,
    I hope this is the forum where to start.
    I want to submit a concurrent request when a button is pushed in selfservice.
    I've implementend the event for button in java and its woring fine, but how to submit a conurrent request in java?
    Can anyone help me or tell me if this is not the correct forum?
    Thank you!
    Best regards
    Gjermund Lunder
    Developer/DBA

    hi,
    This question suppose to be in framework forum.
    you can try:
    OA Framework provides the ConcurrentRequest class to call the concurrent program from the page. The submitRequest() method in the ConcurrentRequest class takes 6 parameters and returns request id of the submitted concurrent request:
    public int submitRequest(
    String ProgramApplication ,
    String ProgramName ,
    String ProgramDescription ,
    String StartTime,
    boolean SubRequest,
    Vector Parameters ) throws RequestSubmissionException
    ProgramApplication -Application Short name of application under which the program is registered.
    ProgramName - Concurrent Program Name for which the request has to be submitted
    ProgramDescription - Concurrent Program Description
    StartTime - Time at which the request has to start running.
    SubRequest - Set to TRUE if the request is submitted from another running request and has to be treated as a sub request.
    Parameters - Parameters of the concurrent Request
    Here is the example for calling a concurrent program from a OA framework page.
    import oracle.apps.fnd.cp.request.ConcurrentRequest;
    import oracle.apps.fnd.framework.server.OADBTransaction;
    public int submitCPRequest(Number headerId) {
    try {
    OADBTransaction tx = (OADBTransaction)getDBTransaction();
    java.sql.Connection pConncection = tx.getJdbcConnection();
    ConcurrentRequest cr = new ConcurrentRequest(pConncection);
    String applnName = "PO"; //Application that contains the concurrent program
    String cpName = "POXXXX"; //Concurrent program name
    String cpDesc = "Concurrent Program Description"; // concurrent Program description
    // Pass the Arguments using vector
    // Here i have added my parameter headerId to the vector and passed the vector to the concurrent program
    Vector cpArgs = new Vector();
    cpArgs.addElement(headerId.stringValue());
    // Calling the Concurrent Program
    int requestId = cr.submitRequest(applnName, cpName, cpDesc, null, false, cpArgs);
    tx.commit();
    return requestId;
    } catch (RequestSubmissionException e) {
    OAException oe = new OAException(e.getMessage());
    oe.setApplicationModule(this);
    throw oe;
    I got it from http://prasanna-adf.blogspot.com/2008/11/call-concurrent-program-from-oa.html

  • Loading XML File in Oracle Tables through Concurrent Request

    I am posting a working program which reads an XML File and loads in Oracle database table through Concurrent Request. Input parameter for this program is file name. I have added directory name ASPEN_DIR as /interface/inbound in ALL_DIRECTORIES table.
    /* This is a sample program reading an input xml file and loads data in Oracle Database table
    This program is executed through concurrent request and it has an input file name
    it also creates a log for reading and inserting records from file and into a table
    CREATE OR REPLACE PACKAGE BODY CBAP_ACCRUENT_XML_PKG AS
    PROCEDURE read_emp_xml_file (errbuf out varchar2,
    retcode out number,
    in_filename in varchar2)
    is
    my_dir varchar2(10) := 'ASPEN_DIR';
    l_bfile BFILE;
    l_clob CLOB;
    l_parser dbms_xmlparser.Parser;
    l_doc dbms_xmldom.DOMDocument;
    l_nl dbms_xmldom.DOMNodeList;
    l_n dbms_xmldom.DOMNode;
    l_temp VARCHAR2(1000);
    v_empno number(10);
    v_ename varchar2(50);
    v_job varchar2(30);
    v_mgr number(10);
    v_hiredate date;
    v_sal number(10);
    v_comm number(10);
    src_csid NUMBER := NLS_CHARSET_ID('UTF8');
    v_read NUMBER(5);
    v_insert NUMBER(5);
    dest_offset INTEGER := 1;
    src_offset INTEGER := 1;
    lang_context INTEGER := dbms_lob.default_lang_ctx;
    warning INTEGER;
    BEGIN
    v_read := 0;
    v_insert := 0;
    l_bfile := BFileName(my_dir, in_filename);
    dbms_lob.createtemporary(l_clob, cache=>FALSE);
    dbms_lob.open(l_bfile, dbms_lob.lob_readonly);
    dbms_lob.loadclobfromfile(l_clob, l_bfile, dbms_lob.getlength(l_bfile), dest_offset,src_offset, src_csid, lang_context, warning);
    dbms_lob.close(l_bfile);
    -- make sure implicit date conversions are performed correctly
    dbms_session.set_nls('NLS_DATE_FORMAT','''DD/MM/RR HH24:MI:SS''');
    -- Create a parser.
    l_parser := dbms_xmlparser.newParser;
    -- Parse the document and create a new DOM document.
    dbms_xmlparser.parseClob(l_parser, l_clob);
    l_doc := dbms_xmlparser.getDocument(l_parser);
    -- Free resources associated with the CLOB and Parser now they are no longer needed.
    dbms_lob.freetemporary(l_clob);
    dbms_xmlparser.freeParser(l_parser);
    -- Get a list of all the nodes in the document using the XPATH syntax.
    l_nl := dbms_xslprocessor.selectNodes(dbms_xmldom.makeNode(l_doc),'/EMPLOYEES/EMP');
    -- Loop through the list and create a new record in a tble collection
    -- for each record.
    FOR cur_emp IN 0 .. dbms_xmldom.getLength(l_nl) - 1 LOOP
    l_n := dbms_xmldom.item(l_nl, cur_emp);
    v_read := v_read + 1;
    -- Use XPATH syntax to assign values to he elements of the collection.
    dbms_xslprocessor.valueOf(l_n,'EMPNO/text()',v_empno);
    dbms_xslprocessor.valueOf(l_n,'ENAME/text()',v_ename);
    dbms_xslprocessor.valueOf(l_n,'JOB/text()',v_job);
    dbms_xslprocessor.valueOf(l_n,'MGR/text()',v_mgr);
    dbms_xslprocessor.valueOf(l_n,'HIREDATE/text()',v_hiredate);
    dbms_xslprocessor.valueOf(l_n,'SAL/text()',v_sal);
    dbms_xslprocessor.valueOf(l_n,'COMM/text()',v_comm);
    insert into emp(empno,ename,job,mgr,hiredate,sal,comm)
    values(v_empno,v_ename,v_job,v_mgr,v_hiredate,v_sal,v_comm);
    v_insert := v_insert + 1;
    END LOOP;
    -- Free any resources associated with the document now it
    -- is no longer needed.
    dbms_xmldom.freeDocument(l_doc);
    --remove file to another directory
    commit;
    fnd_file.put_line(fnd_file.LOG,'Number of Records Read : '||v_read);
    fnd_file.put_line(fnd_file.LOG,'Number of Records Insert : '||v_insert);
    EXCEPTION
    WHEN OTHERS THEN
    dbms_lob.freetemporary(l_clob);
    dbms_xmlparser.freeParser(l_parser);
    dbms_xmldom.freeDocument(l_doc);
    retcode := sqlcode;
    ERRBUF := sqlerrm;
    ROLLBACK;
    END read_emp_xml_file;
    END;
    <?xml version="1.0" ?>
    - <EMPLOYEES>
    - <EMP>
    <EMPNO>7369</EMPNO>
    <ENAME>SMITH</ENAME>
    <JOB>CLERK</JOB>
    <MGR>7902</MGR>
    <HIREDATE>17-DEC-80</HIREDATE>
    <SAL>800</SAL>
    </EMP>
    - <EMP>
    <EMPNO>7499</EMPNO>
    <ENAME>ALLEN</ENAME>
    <JOB>SALESMAN</JOB>
    <MGR>7698</MGR>
    <HIREDATE>20-FEB-81</HIREDATE>
    <SAL>1600</SAL>
    <COMM>300</COMM>
    </EMP>
    - <EMP>
    <EMPNO>7521</EMPNO>
    <ENAME>WARD</ENAME>
    <JOB>SALESMAN</JOB>
    <MGR>7698</MGR>
    <HIREDATE>22-FEB-81</HIREDATE>
    <SAL>1250</SAL>
    <COMM>500</COMM>
    </EMP>
    - <EMP>
    <EMPNO>7566</EMPNO>
    <ENAME>JONES</ENAME>
    <JOB>MANAGER</JOB>
    <MGR>7839</MGR>
    <HIREDATE>02-APR-81</HIREDATE>
    <SAL>2975</SAL>
    </EMP>
    - <EMP>
    <EMPNO>7654</EMPNO>
    <ENAME>MARTIN</ENAME>
    <JOB>SALESMAN</JOB>
    <MGR>7698</MGR>
    <HIREDATE>28-SEP-81</HIREDATE>
    <SAL>1250</SAL>
    <COMM>1400</COMM>
    </EMP>
    - <EMP>
    <EMPNO>7698</EMPNO>
    <ENAME>BLAKE</ENAME>
    <JOB>MANAGER</JOB>
    <MGR>7839</MGR>
    <HIREDATE>01-MAY-81</HIREDATE>
    <SAL>2850</SAL>
    </EMP>
    - <EMP>
    <EMPNO>7782</EMPNO>
    <ENAME>CLARK</ENAME>
    <JOB>MANAGER</JOB>
    <MGR>7839</MGR>
    <HIREDATE>09-JUN-81</HIREDATE>
    <SAL>2450</SAL>
    </EMP>
    - <EMP>
    <EMPNO>7788</EMPNO>
    <ENAME>SCOTT</ENAME>
    <JOB>ANALYST</JOB>
    <MGR>7566</MGR>
    <HIREDATE>19-APR-87</HIREDATE>
    <SAL>3000</SAL>
    </EMP>
    - <EMP>
    <EMPNO>7839</EMPNO>
    <ENAME>KING</ENAME>
    <JOB>PRESIDENT</JOB>
    <HIREDATE>17-NOV-81</HIREDATE>
    <SAL>5000</SAL>
    </EMP>
    - <EMP>
    <EMPNO>7844</EMPNO>
    <ENAME>TURNER</ENAME>
    <JOB>SALESMAN</JOB>
    <MGR>7698</MGR>
    <HIREDATE>08-SEP-81</HIREDATE>
    <SAL>1500</SAL>
    <COMM>0</COMM>
    </EMP>
    - <EMP>
    <EMPNO>7876</EMPNO>
    <ENAME>ADAMS</ENAME>
    <JOB>CLERK</JOB>
    <MGR>7788</MGR>
    <HIREDATE>23-MAY-87</HIREDATE>
    <SAL>1100</SAL>
    </EMP>
    - <EMP>
    <EMPNO>7900</EMPNO>
    <ENAME>JAMES</ENAME>
    <JOB>CLERK</JOB>
    <MGR>7698</MGR>
    <HIREDATE>03-DEC-81</HIREDATE>
    <SAL>950</SAL>
    </EMP>
    - <EMP>
    <EMPNO>7902</EMPNO>
    <ENAME>FORD</ENAME>
    <JOB>ANALYST</JOB>
    <MGR>7566</MGR>
    <HIREDATE>03-DEC-81</HIREDATE>
    <SAL>3000</SAL>
    </EMP>
    - <EMP>
    <EMPNO>7934</EMPNO>
    <ENAME>MILLER</ENAME>
    <JOB>CLERK</JOB>
    <MGR>7782</MGR>
    <HIREDATE>23-JAN-82</HIREDATE>
    <SAL>1300</SAL>
    </EMP>
    </EMPLOYEES>

    http://download-west.oracle.com/docs/cd/B13789_01/appdev.101/b10790/toc.htm
    Take a look at Examples 4-8 and 4-9. Even thought this is 10g doc code should work on 9.2.4 or later

  • XML Output from Concurrent Request DBMS_XMLGEN

    I am trying to create xml output for a concurrent request, using the DBMS_XMLGEN package to generate my XML?
    I have gotten so far as to be able to run my procedure and see the output in TOAD using dbms_output.put_line, but I can't seem to quite get the right link to convert this to Oracle Apps output.
    I have a concurrent request setup to output XML.
    This calls my procedure to return to the output file.
    So far, when I run from APPS, all that shows in the Output file is 'XML document must have a top level element.'
    Here is the relevant code...
    ctx DBMS_XMLGEN.ctxHandle; -- vars to convert SQL output to xml
    xml clob;
    xmlc varchar2(4000);
    off integer := 1;
    len integer := 4000;
    i number := 0;
    rc_data sys_refcursor;
    begin
    -- this calls simple open cursor for sql statement, returns rows
    rc_data := fa10022_data(P_BOOK_TYPE_CODE
    , P_STATE
    , v_BEG_DATE_EFFECTIVE
    , v_END_DATE_EFFECTIVE
    , P_BEG_ASSET_ACCT
    , P_END_ASSET_ACCT
    , v_depr_per_ctr);
    ctx := dbms_xmlgen.newContext(rc_data);
    dbms_xmlgen.setRowsetTag(ctx, 'XXFA10022');
    dbms_xmlgen.setRowTag(ctx, 'G_DATA');
    xml := dbms_xmlgen.getXml(Ctx);
    i := dbms_xmlgen.getNumRowsProcessed(ctx);
    dbms_xmlgen.closeContext(Ctx);
    apps.fnd_file.put_line(apps.fnd_file.output, xml);
    I was also following this link...
    http://www.appsassociates.com/products/Generation_XML_PLSQL.pdf
    any suggestions?
    Thanks!!
    Janel

    That was painful, but it helped!
    Most of it is workflow code...POXMLGEN contains the pertinent coding.
    I think my problem now lies with some of my data. Depending on what is returned, I sometimes receive a warning with no output. I know there are special characters in the data (ex eacute), but I can't tell if that is what is causing the issue. I do have the statement dbms_xmlgen.setConvertSpecialChars(ctx, TRUE); in my code, so not sure what else to do.
    This is what is being returned in OPP log...
    Caused by: oracle.xdo.parser.v2.XMLParseException: Start of root element expected.

  • How to acquire the concurrent request id in data template?

    Hi all,
    I want to know how to acquire the concurrent request from my report data template. I've created a placeholder for my parameter +<parameter name="p_conc_request_id" dataType = "number" defaultValue="0"></parameter>+ and for nothing ... i've got the 0 value.
    I need the concurrent request id in order to detect the user who launched the report. Is there other way on getting the user ??
    Thank you!
    All the best,
    Laurentiu
    Edited by: laurentiu on Jul 8, 2009 5:29 PM

    Hi,
    I read your previous post about this solution but i was not able to retrieve it. Here is step by step what i've done:
    - added the parameter to my data template
    - added the parameter to my concurrent program
    - added the parameter in my pl/sql package
    - i've run my concurrent request and the value returned in my xml is 0 for the concurrent request id parameter
    I don't know where i'am getting wrong ?!?
    Thank you!
    All the best,
    Laurentiu
    Edited by: laurentiu on Jul 8, 2009 6:47 PM

  • Programatically cancel concurrent request

    Hi,
    How to cancel concurrent request from plsql ?
    Thanks a lot.

    Thanx,
    but it seems that it does not work in a trigger on fnd_concurrent_requests table.
    like this one:
    CREATE OR REPLACE TRIGGER aaaa
    after insert on apps.fnd_concurrent_requests
    for each row
    DECLARE
    pragma autonomous_transaction;
    req_id number;
    BEGIN
    if :NEW.concurrent_program_id = 11111
    THEN
    req_id := :NEW.request_id;
    update fnd_concurrent_requests
    set status_code = 'D', phase_code='C'
    where request_id = req_id;
    commit;
    ELSE null;
    END IF;
    END;
    trigger fires but update does not work when i exec the concurrent. Why ??
    if i manually execute this update it works.

  • Forms personalization - passing a parameter to a concurrent request

    I am using forms personalization to give the user the ability to submit a concurrent request from the 'Actions' menu of the form. I would like to be able to pass a field from the form to a parameter of the concurrent request. I know how to set a global variable using forms personalization. Does anyone know how I could use this variable as the default value for the parameter in the concurrent request? (e.g. The concurrent program uses PO number as a parameter - I'd like to be able to pass the PO number from the form to the concurrent request.)

    user572941 wrote:
    I am using forms personalization to give the user the ability to submit a concurrent request from the 'Actions' menu of the form. I would like to be able to pass a field from the form to a parameter of the concurrent request. I know how to set a global variable using forms personalization. Does anyone know how I could use this variable as the default value for the parameter in the concurrent request? (e.g. The concurrent program uses PO number as a parameter - I'd like to be able to pass the PO number from the form to the concurrent request.)Please see if old threads (which discuss the same topic) help -- https://forums.oracle.com/forums/search.jspa?threadID=&q=Forms+AND+personalization+AND+Parameter&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • Forms personalyzation, passing Form field values to SRS concurrent request.

    Hi,
    Iam calling an SRS from forms personlization. Can any body tell me how to pass the Form field values as parameters to the Reports. (Example when they call this Concurrent request from Transactions screen, The invoice number should be defaulted in the report parameter).
    Regards,,
    Anil.

    Hi,
    You can use FND_REQUEST.SUBMIT_REQUEST to submit a concurrent progrm with parameters given.
    For example, get the invoice number into v_invoice_no and call a function included code bellow.
    FND_REQUEST.SUBMIT_REQUEST(
    <app_short_name>,
    <concurrent_short_name>,
    to_char(SYSDATE,'DD-MON-YYYY HH24:MI'),
    FALSE,
    v_invoice_no,chr(0),'','','','','','','','',
    '','','','','','','','','','');-- 100 ARGUMENTS FROM THE BEGINNING
    Where chr(0) must be the last argument.

Maybe you are looking for

  • Confused with this ASA - VPN config issue

    Hello. Can anyone help me here? I am new to the ASA config and commands. Everything works well, enough, on this ASA except the VPN. A client can connect but cannot access anything inside or outside. Here is the config. Can someone please take a look

  • Error while previewing Crystal Reports in SAP B1

    Dear Experts, I have installed the Crystal Reports Addon to SAP B1 2007B, and it works fine with the sample reports in B1. My problem is as given below. I have created Covering Letter report for the Cheque printing functionality. Preview and all is o

  • Re:Problem in Pricing Procedure Determination

    Dear All, I have a problem in Define Pricing Procedure Determination. I am getting an error message " Condition Type BP04 is not in procedure ZBP04A A V". The condition type has been copied from K007. Access Sequence is BP04. In Maintain Pricing Proc

  • Does the Altec Lansing IM500 work with the 2G Nano?

    I can't work out from the Altec Lansing website or Apple Store (or Google) whether the IM500 will work with a 2G Nano. Does anyone here know? Thanks in advance, Mike

  • Common Label for two columns in pivot view??

    Hi Guys, PLs help me.. i want common label or heading columns in pivot view.. Example: Under label1 (i should have two columns like 'A','B'), under label2(shud have colums like 'C','D','E').. i tried with dummy column, i placed it in measures section