Can I create a dynamic cursor in a program unit on oracle form....

Hello folks,
can I create a dynamic cursor on client side ( in a program unit on the oracle form), is it possible, I Know how to create it on server side using Ref cursor, but on client side i got this message (can't be created on client side or something like that).... please if someone can help

> select count(*) from t_comsis
<p>But when you put that select string into a varchar2 variable, it won't compile. Which makes it hard to create anything "dynamic".
<p>In Forms, you can create and populate a record group dynamically, which is ok as long as your select will not retrieve too many (more than several hundred) rows.
<p>Or, your other option is to use the Forms Exec_SQL dynamic sql package.

Similar Messages

  • Can I create a dynamic number of inputs during runtime?

    Can I create a dynamic number of inputs during runtime?
    Oracle 11g
    Application Express 4.0.2.00.06
    Here is my problem:
    We have a table that holds metadata about files (hardcopy or softcopy files).
    We expect we may need more columns in the table at some point and don't want to modify the table or the application.
    So in order to do this I would like to create:
    A table called TBL_FILE with the columns:
    TBL_FILE_ID               NUMBER                (This will be the primary key)
    TBL_FILE_NAME          VARCHAR2(1000) (This will be the name of the file)
    A second table will be called TBL_FILE_META with the columns:
    TBL_META_ID               NUMBER               (This will be the primary key)
    TBL_FILE_ID               NUMBER                (This will be the forign key to the file table)
    TBL_META_COLUMN     VARCHAR2(30)     (This is what the column name would be if it existed in TBL_FILE)
    TBL_META_VALUE          VARCHAR2(1000) (This is the value that record and the 'would be' column)
    So a person can have as much meta data on the file with out having to add columns to the table.
    The problem is how can I allow users to add as much data as they like with out having to re develop the page.
    Other things to note is that we would like this to be on a single page.
    I know how to add we can create multi-row inserts by using a SQL Query (updateable report),
    however the TBL_META_VALUE column in the TBL_FILE_META will sometimes be a select list and other times a text box or number field.
    So I don't see now a SQL Query (updateable report) would work for this and I can't create an array of page items at run time can I?
    Any idea's how I could accomplish this? Is there a better way of doing this?
    Also is there a term or a name for what I am doing by creating these 'virtual' columns in another table?
    I found this method when looking at Oracles Workflow tables.

    Welcome to the Oracle Forums !
    >
    Can I create a dynamic number of inputs during runtime?
    Oracle 11g
    Application Express 4.0.2.00.06
    Here is my problem:
    We have a table that holds metadata about files (hardcopy or softcopy files).
    We expect we may need more columns in the table at some point and don't want to modify the table or the application.
    So in order to do this I would like to create:
    A table called TBL_FILE with the columns:
    TBL_FILE_ID NUMBER (This will be the primary key)
    TBL_FILE_NAME VARCHAR2(1000) (This will be the name of the file)
    A second table will be called TBL_FILE_META with the columns:
    TBL_META_ID NUMBER (This will be the primary key)
    TBL_FILE_ID NUMBER (This will be the forign key to the file table)
    TBL_META_COLUMN VARCHAR2(30) (This is what the column name would be if it existed in TBL_FILE)
    TBL_META_VALUE VARCHAR2(1000) (This is the value that record and the 'would be' column)
    So a person can have as much meta data on the file with out having to add columns to the table.
    The problem is how can I allow users to add as much data as they like with out having to re develop the page.
    >
    Creating Page Items dynamically is not available. You will have to create excess items and hide/show , etc. But you cannot change the Item Type. All in all, too many limitations in this approach.
    >
    Other things to note is that we would like this to be on a single page.
    >
    The 100 item limit will hit you if you go with extra item on page. With Tabular Form that should not be a limitation, unless you are exceeding the 50 item limit of APEX_APPLICATION.G_Fnn items, and the 60 column limitation of Report region with "Use Generic Column Names (parse query at runtime only)" of Dynamic region.
    >
    I know how to add we can create multi-row inserts by using a SQL Query (updateable report),
    however the TBL_META_VALUE column in the TBL_FILE_META will sometimes be a select list and other times a text box or number field.
    >
    If the type if item is variable it only means you need a way to store the item type. Meta Data of the Meta Data.
    >
    So I don't see now a SQL Query (updateable report) would work for this and I can't create an array of page items at run time can I?
    >
    Yes, you can do it. Updatable report/ Tabular Form query can be constructed from the Meta Data using PL/SQL Function Returning SQL Query . It will be a bit of coding in PL/SQL where you use the Meta Data and the Meta Data of the Meta Data to piece together your SELECT with the right APEX_ITEMs. It might have a performance penalty associated with it, but will not be a serious degradation.
    >
    Any idea's how I could accomplish this? Is there a better way of doing this?
    Also is there a term or a name for what I am doing by creating these 'virtual' columns in another table?
    I found this method when looking at Oracles Workflow tables.
    >
    I guess that is just a good TNF. It is the Master-Detail Design Pattern, that sound more modern ? ;)
    Regards,

  • Can you create a template that has a header and footer to forms?

    Can you create a template that has a header and footer to forms?

    Yes but how are they going to create the Landscape versions?
    The problem with doing it in Pages '09 as rotated content is that the Headers and Footers are not rotated and there is inherent clumsiness in the rotated content usually being too large for the page when viewed at 90°.
    Best to make it in two or more separate documents.
    Peter

  • How can i create a dynamic structure based on my input from a select-option

    Hello,
    This is to develop a custom report in FI for G/L Balance based on company code.
    I have an input select-option for Company code.
    Based on the range of company code my output layout should be modified.
    I am not very much sure to create a dynamic internal based on the input from a select-option.
    Can any one please let me know how can i do this.
    I would appreciate for anyone who turns up quickly.
    Thank you,
    With regs,
    Anitha Joss.

    See the following program, it builds a dynamic internal table based on the company codes from the select option. 
    report zrich_0001 .
    type-pools: slis.
    field-symbols: <dyn_table> type standard table,
                   <dyn_wa>.
    data: alv_fldcat type slis_t_fieldcat_alv,
          it_fldcat type lvc_t_fcat.
    data: it001 type table of t001 with header line.
    selection-screen begin of block b1 with frame title text-001.
    select-options: s_bukrs for it001-bukrs.
    selection-screen end of block b1.
    start-of-selection.
      select * into table it001 from t001
                     where bukrs in s_bukrs.
      perform build_dyn_itab.
    *  Build_dyn_itab
    form build_dyn_itab.
      data: index(3) type c.
      data: new_table type ref to data,
            new_line  type ref to data,
            wa_it_fldcat type lvc_s_fcat.
      clear wa_it_fldcat.
      wa_it_fldcat-fieldname = 'PERIOD' .
      wa_it_fldcat-datatype = 'CHAR'.
      wa_it_fldcat-intlen = 6.
      append wa_it_fldcat to it_fldcat .
      loop at it001.
        clear wa_it_fldcat.
        wa_it_fldcat-fieldname = it001-bukrs .
        wa_it_fldcat-datatype = 'CHAR'.
        wa_it_fldcat-intlen = 4.
        append wa_it_fldcat to it_fldcat .
      endloop.
    * Create dynamic internal table and assign to FS
      call method cl_alv_table_create=>create_dynamic_table
                   exporting
                      it_fieldcatalog = it_fldcat
                   importing
                      ep_table        = new_table.
      assign new_table->* to <dyn_table>.
    * Create dynamic work area and assign to FS
      create data new_line like line of <dyn_table>.
      assign new_line->* to <dyn_wa>.
    endform.
    Regards,
    Rich Heilman

  • Can I create a dynamic report in the server without using a report template

    Hi,
    My company just bought a Crystal Report Server XI and it didn't have a report designer.
    I can't start creating report without the designer.
    The question is can  I generate a dynamic report at runtime (on the crystal report server ) without using report template?
    My project requirement is to use a crystal report server to manage the reports.
    Some client web application will just access this report server.
    I  hope the experts can provide me some guidance.
    regards,
    Rulix
    Edited by: Rulix Batistil on Nov 3, 2008 8:08 AM

    Hi Rulix,
    The latest version of CR Server is 2008. Therefore I'm assuming you are using CR Server 2008.
    New in CR 2008 is the .NET report modification software development kit (SDK). The report application server (RAS) SDK is now available for users of Crystal Reports .NET API without the use of a RAS server. Report modification such as changing, adding, or removing database providers, or adding, removing, or creating report objects, parameters, formulas, and sections can be achieved by accessing the RAS SDK through the Crystal Reports .NET SDK.
    Java developers however receive the JRC and Java SDK documentation through the free Crystal Reports for Eclipse download. This product will be updated on a separate schedule from Crystal Reports.
    Further Information and samples are available in our [Developer Library|https://www.sdn.sap.com/irj/sdn/businessobjects?rid=/webcontent/uuid/5001d5de-f867-2b10-00bf-8d27683c85a0]
    Kind regards,
    Tim

  • How can I create classes dynamically?

    Guys
    My requirment is I want to create classes and their instancess too dynamically. First is it possible in Java?
    If so, then my next question is how can I refer such dynamically created classes in my code to avoid compilation error.
    Thanks in advance
    Regards
    Sunil

    For other ways to generate classes on runtime you could also have a look at BCEL:
    http://jakarta.apache.org/bcel
    And dynamic proxies:
    http://java.sun.com/j2se/1.4.2/docs/guide/reflection/proxy.html
    If so, then my next question is how can I refer such
    dynamically created classes in my code to avoid compilation
    error.Generally the classes that you load should either implement some interface or extend some abstract class you know of at compile time so that the compiler knows what methods are available for use. If that's not possible you can only use reflection.

  • Can we create items dynamically or at run time?

    Hello expert,
    can we create some item dynamically at some button click?
    Thanks
    yash

    yash_08031983 wrote:
    Hello expert,
    can we create some item dynamically at some button click?Hello, yash
    You can not create items at run time. But you can manage them at run time by setting Visible property programatically.
    Hope this helps..
    Hamid

  • Can we create a dynamic action for Training and Event Management???

    Hi All
    i need to configure automatic email generation for an employee when he gets booked for a training program in the training and event management module. can we use a dynamic action for it? and how to configure it?? I also guess that i have to use the Feature MAILS for it. but i am not sure abt it and also not sure how to configure it. I will really appreciate if someone can provide me with a step to step configuration for the same. Its urgently sought.
    Thanks and Regards

    Notifications in T&E are done through Workflow.Dynamic Actions are only for PA Infotypes.
    ~Suresh

  • Can we create items dynamically in forms 6i??

    Dear All,
    Is it possible to create items,i.e. Text items,display items etc. dynamically?
    Suppose I select Table name EMP,then it must get all columns from database and place it on form.Now I change table name from EMP to DEPT,now it should get all columns for dept table and place it on same form removing all EMP table colums.I should not have to call another form,i.e. it should be strictly done through single form.
    Thanks in advance

    You can make a form with 10 or more items (depends on the maximum number of the columns you have) and place them in a non base table block. Then you populate the block with a cursor and if you press a button you can populate the same block with another cursor making visible only the columns you need.
    Hope it helps you,
    Fabrizio

  • How can I create events dynamic for a Group/List?

    Hey,
    atm I'm programming a little application where i want to add elements to my center-pane.
    Simpyfied I got:
    - Center Pane : here shall the elements appear on right click in bottom-pane. This pane shall be used as anything like a playground where you can drag/drop and connect items from the bottom-pane
    - Bottom Pane: here I got about 180 elements which are quite equal. This is sth like a menu of items which you can use. I realised them in java classes extended from a parent class with differend calulations.
    What I want:
    I want to create an event handler for EACH of the "menu" elements dynamically. Just sth like:
        for (int i = 0; i < basic_menu_list.size(); i++)
          final Element el = hbox_bottom.getChildren().get(i);
          hbox_bottom.getChildren().get(i).setOnMouseClicked(new EventHandler<MouseEvent>()
            public void handle(MouseEvent event)
              if (event.isSecondaryButtonDown())
                playground.add(el);
                redrawPlayground();
        }But as i expected this doesnt work...
    Now my question:
    How can I solve this problem? Is there any option to listen to all elements of a group without hard-coding every single listener?
    Thanks for your help,
    Martin

    Hello User,
    Why did you expect that it wouldn't work?
    You have an example with "transition" apply on a bunch of circles in the Getting Started with JavaFx (http://download.oracle.com/javafx/2.0/get_started/jfxpub-get_started.htm)
    Here a basic example class...
    import javafx.application.Application;
    import javafx.event.EventHandler;
    import javafx.scene.Node;
    import javafx.scene.Scene;
    import javafx.scene.control.TextBox;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.Pane;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    public class HelloWorld extends Application {
        //~ ----------------------------------------------------------------------------------------------------------------
        //~ Methods
        //~ ----------------------------------------------------------------------------------------------------------------
        public static void main(String[] args) {
            // Entry point
            Application.launch(args);
        @Override
        public void start(Stage mainStage) throws Exception {
            Pane pane = new Pane();
            Scene scene = new Scene(pane, 200, 200);
            VBox vBox = new VBox();
            TextBox input1 = new TextBox();
            TextBox input2 = new TextBox();
            vBox.getChildren().addAll(input1, input2);
            for (Node input : vBox.getChildren()) {
                input.setOnMouseClicked(new EventHandler<MouseEvent>() {
                        public void handle(MouseEvent event) {
                            System.out.println("test click");
            pane.getChildren().add(vBox);
            mainStage.setScene(scene);
            mainStage.setVisible(true);
    }Niculaiu

  • How can I create a dynamic XML driven PDF Portfolio?

    I have built an XML application for which I maintain a library of individual PDF page "templates" used to assemble large (1000+ pages) PDF documents. The page templates are saved as PDFs without page numbers as they can be reused anywhere in any manual, the page numbers are applied during the document assembly process. I am now attempting to implement an update process, in which one template change can impact dozens of large documents. I am therefore looking at moving away from creating these large PDF documents and creating something more along the lines of a Package, Portfolio or other solution in which document pages/templates in the library are linked to rather than combined, so that changes across multiple large documents can be done quickly and transparently to the user. I am sure there is a solution using an Adobe spec like Portfolio or XDP, I just need a nudge down the right path, as nothing in what I've read explicitly states that these technologies can be used for this purpose. I would prefer to stay within technologies I am comfortable with to create/modify the necessary files, whcih are XML/XSLT and ANT. I would also like to know if it's possible to add page numbers on the footer of each page in the Portfolio without modifying the template, and if the resulting Portfolio can be saved as a normal PDF or printed with the dynamic page numbers included.
    I know this might be a tall order but if anyone can help clarify what's possible with existing Adobe technologies it would be greatly appreciated.
    Thanks,
    Keith

    Indeed - PDF Portfolios are a collection of static files attached to a one-page cover sheet, you cannot have references to externally-stored documents.
    You can replace individual files in a Portfolio (by adding a file of the same name) but nothing happens automatically, and the file when added to the Portfolio will have no idea about where it originally came from. There's no concept of "check for updates".

  • How can i create an dynamic report in Java

    hello everybody,
    I want to make dynamic reports in Java. Report contain data and images with good layout.. such as crystal reports presentation..
    Reports fields decided at run time or we can say that it is generated according to user requirement...
    can it is possible in Java. If it is then which tool is better for it..
    please suggest me.. this is very urgent requirement for me...

    i don't know what types of tools are avaiable in market... Tools for what? You still didn't tell us what exactly you want to do.
    i just imagin that
    "An user create a database dynamically on server
    databaseNobody "dynamically creates a database".
    and he decide reports desgin according to
    his requirement..... we provide an control for this
    type possibilities....."
    so this is question is build in my mind.. so i
    forward this question to this forums..
    I am just going to check the physibility of my mind
    imagination...Feasibility you mean. IMHO, the feasibility of creating that stuff yourself is very low. Reinventing the wheel usually doesn't make it better, and it's likely to be more expensive to pay you for creating an inferior solution (not because of lack of skills, but simply because the available products had a few years time to grow, feature-wise) than to simply buy the licenses. Look at Crystal Reports or JFreeChart or Jasper Reports. Or use Google to look up J2EE-based reporting libraries. There might be more.
    Which of these is best, I don't know, I never used any of those. Also, the definition of "best" changes with the requirements. What's better, a Ferrari or a truck?

  • How can I create a dynamic Dropdownlist

    Hi Experts,
    I am new in the adobe forms and I have this problem.
    I am working on a Dropdownlist in Adobe Interactive Form. In my case, my form will be used in Offline-ABAP system without any web dynpro application.
    I have an internal table containing some values like this (number of rows depend on what is store on the database dynamic)
    A0  Dropdownlist1
    A1    Dropdownlist2
    A2    Dropdownlist2
    B0 Dropdownlist1
    B1    Dropdownlist2
    B2    Dropdownlist2
    B3    Dropdownlist2
    B4    Dropdownlist2
    C0  Dropdownlist1
    C5    Dropdownlist2
    C6    Dropdownlist2
    C7    Dropdownlist2
    I would like to create 2 dropdownlist. to be as follows:
    The first dropdownlist must have for example the values A0, B0, C0 .
    When the user select for example B0 from the Dropdownlist1, then dropdownlist2 must have only the value B1, B2, B3 and B4.
    How can i do that as I have seen the example in the purchase order (country and state).
    My requirement is that, the value must be dynamic, that means i must select the value from the SAP-Database into internal table and bind it to my dropdownlist.
    Thanks and Regards.
    mishak

    See the following program, it builds a dynamic internal table based on the company codes from the select option. 
    report zrich_0001 .
    type-pools: slis.
    field-symbols: <dyn_table> type standard table,
                   <dyn_wa>.
    data: alv_fldcat type slis_t_fieldcat_alv,
          it_fldcat type lvc_t_fcat.
    data: it001 type table of t001 with header line.
    selection-screen begin of block b1 with frame title text-001.
    select-options: s_bukrs for it001-bukrs.
    selection-screen end of block b1.
    start-of-selection.
      select * into table it001 from t001
                     where bukrs in s_bukrs.
      perform build_dyn_itab.
    *  Build_dyn_itab
    form build_dyn_itab.
      data: index(3) type c.
      data: new_table type ref to data,
            new_line  type ref to data,
            wa_it_fldcat type lvc_s_fcat.
      clear wa_it_fldcat.
      wa_it_fldcat-fieldname = 'PERIOD' .
      wa_it_fldcat-datatype = 'CHAR'.
      wa_it_fldcat-intlen = 6.
      append wa_it_fldcat to it_fldcat .
      loop at it001.
        clear wa_it_fldcat.
        wa_it_fldcat-fieldname = it001-bukrs .
        wa_it_fldcat-datatype = 'CHAR'.
        wa_it_fldcat-intlen = 4.
        append wa_it_fldcat to it_fldcat .
      endloop.
    * Create dynamic internal table and assign to FS
      call method cl_alv_table_create=>create_dynamic_table
                   exporting
                      it_fieldcatalog = it_fldcat
                   importing
                      ep_table        = new_table.
      assign new_table->* to <dyn_table>.
    * Create dynamic work area and assign to FS
      create data new_line like line of <dyn_table>.
      assign new_line->* to <dyn_wa>.
    endform.
    Regards,
    Rich Heilman

  • How can i create a dynamic cavs simultor for single webservice.

    im using CAVS to create simulator .
    im able to created a simulator that returns a predefined response for any request.but is it possible to create a simulator that can generate response dynamically base on data in the request?.

    See the following program, it builds a dynamic internal table based on the company codes from the select option. 
    report zrich_0001 .
    type-pools: slis.
    field-symbols: <dyn_table> type standard table,
                   <dyn_wa>.
    data: alv_fldcat type slis_t_fieldcat_alv,
          it_fldcat type lvc_t_fcat.
    data: it001 type table of t001 with header line.
    selection-screen begin of block b1 with frame title text-001.
    select-options: s_bukrs for it001-bukrs.
    selection-screen end of block b1.
    start-of-selection.
      select * into table it001 from t001
                     where bukrs in s_bukrs.
      perform build_dyn_itab.
    *  Build_dyn_itab
    form build_dyn_itab.
      data: index(3) type c.
      data: new_table type ref to data,
            new_line  type ref to data,
            wa_it_fldcat type lvc_s_fcat.
      clear wa_it_fldcat.
      wa_it_fldcat-fieldname = 'PERIOD' .
      wa_it_fldcat-datatype = 'CHAR'.
      wa_it_fldcat-intlen = 6.
      append wa_it_fldcat to it_fldcat .
      loop at it001.
        clear wa_it_fldcat.
        wa_it_fldcat-fieldname = it001-bukrs .
        wa_it_fldcat-datatype = 'CHAR'.
        wa_it_fldcat-intlen = 4.
        append wa_it_fldcat to it_fldcat .
      endloop.
    * Create dynamic internal table and assign to FS
      call method cl_alv_table_create=>create_dynamic_table
                   exporting
                      it_fieldcatalog = it_fldcat
                   importing
                      ep_table        = new_table.
      assign new_table->* to <dyn_table>.
    * Create dynamic work area and assign to FS
      create data new_line like line of <dyn_table>.
      assign new_line->* to <dyn_wa>.
    endform.
    Regards,
    Rich Heilman

  • HOW TO CREATE A DYNAMIC CURSOR?

    hi, i have a cursor that i declared it in first_line of my package.
    create or replace package ....
    CURSOR ACCESS_VIEW IS SELECT * FROM SYS.ALL_OBJECTS;
    PROCEDURE PUT...
    FOR REC IN ACCESS_VIEW
    LOOP
    END LOOP;
    in this package and at the first line of 'put' procedure, i will change the ACCES_VIEW CURSOR. how can i do this? pls help me.
    thanx

    in this package and at the first line of 'put' procedure, i will change the ACCES_VIEW CURSOR. how can i do this?
    SQL>  create or replace package pkg
    as
       cursor cur is select * from emp;
       procedure put;
    end pkg;
    Package created.
    SQL>  create or replace package body pkg
    as
       procedure put
       as
       begin
         for c in cur
         loop
            dbms_output.put_line(c.ename);
         end loop;
       end put;
    end pkg;
    Package body created.
    SQL>  exec pkg.put
    SMITH
    ALLEN
    WARD
    JONES
    MARTIN
    BLAKE
    CLARK
    SCOTT
    KING
    TURNER
    ADAMS
    JAMES
    FORD
    MILLER
    PL/SQL procedure successfully completed.
    @Sundar M:
    SQL>  create or replace package pkg
    as
       cur   sys_refcursor;
    end pkg;
    Warning: compiled but with compilation errors
    SQL>  show error
    Errors for PACKAGE PKG
    LINE/COL                                                                       
    ERROR                                                                          
    3/10                                                                           
    PLS-00994: Cursor Variables cannot be declared as part of a package            
    3/10                                                                           
    PL/SQL: Declaration ignored                                                    

Maybe you are looking for