Oracle form: how to retrieve data from database to pop list

I have problem in retrieving data from database to item list in
oracle forms.
Can anyone help me.
thanks.

The next is an example but you can find this information in
Forms Help:
DECLARE
     G_DESCS RECORDGROUP;
     ERRCODE NUMBER;
     rg_id RECORDGROUP;
     rg_name VARCHAR2(40) := 'Descripciones';
BEGIN
     rg_id := FIND_GROUP(rg_name);
     IF Id_Null(rg_id) THEN
     G_DESCS := Create_Group_From_Query (rg_name, 'SELECT
DESCRIPCION DESCRIPCION, DESCRIPCION DESC2 FROM FORMAS_PAGO);
     ERRCODE := POPULATE_GROUP(G_DESCS);
     POPULATE_LIST('FORMAS_PAGO.CMBDESCRIPCION',G_DESCS);
     END IF;
END;
Saludos.
Mauricio.

Similar Messages

  • How to retrieve datas from database to dropdown list in jsp

    hai.
    please tell me how to retrieve a perticular field list from database to a drop down list using jsp. i am new to jsp. i am doing employee management system. in that i need to edit employee's details as like.
    so that i want to display employee id's in a drop down list. i want to retrieve from database and display.
    please help me in this .
    advance thanks.

    Hello friendz,
    If tht is the i wud suggest if guyz can go wid AJAX...
    try to make use of xmlHttp Object and generate a new dependent drop down by using a property from a bean->servlet->VIEW(FORM)
    else save the form state in a session and then refersh it. once all in again.
    i had a similar problem which i solved in the following way
    Hi friend,
    I had a similar situation and i tried to solve it by using XmlHttpRequest Object(used in AJAX).
    U can checkout the below example just for further reference delete
    UserForm.jsp:
    ==========
    <head>
    <script>
    var xmlHttp
    function showState(str)
    xmlHttp=GetXmlHttpObject()
    if (xmlHttp==null)
    alert ("Browser does not support HTTP Request")
    return
    var url="getState.jsp"
    url=url+"?count="+str
    url=url+"&sid="+Math.random()
    xmlHttp.onreadystatechange=stateChange
    xmlHttp.open("GET",url,true)
    xmlHttp.send(null)
    function stateChange()
    if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
    document.getElementById("state").innerHTML=xmlHttp.responseText
    </head>
    <body>
    <select name='country' onchange="showState(this.value)">
    <option value='india>india</option>
    </select>
    <br>
    <div id='state'>
    <select name='state' >
    <option value='-1'>pickone</option>
    </select>
    </div>
    </body>       
    getState.jsp
    ============
    <%@page language="java" import ="java.util.Hashtable" import ="java.util.Set" %>
    <%
    String country=request.getParameter("count");
    response.setContentType("text/html");
    response.setHeader("Cache-Control","no-cache");
    try{
    Hashtable ht = (Hashtable)session.getAttribute("<ATTRIBUTE_NAME>");
    String buffer="<select name='state'><option value='-1'>Pick One</option>";
    Set s=ht.keySet();
    Object keys[]=s.toArray();
    int size=keys.length;
    for(int i=0; i < size;i++){
    buffer=buffer+"<option value='"+ht.get(keys).toString()+"'>"+ht.get(keys).toString()+"</option>";
    buffer=buffer+"</select>";
    response.getWriter().println(buffer);
    catch(Exception exp){
    response.getWriter().println(exp);
    %>

  • How to retrieve data from database to the structure(complicated)

    Hello everyone:
           I want to retrieve data from database to the structure. but the structure defined like this below:
    TOLERANZOB LIKE QAMV-TOLERANZOB
    TOLERANZOB1 LIKE QAMV-TOLERANZOB
    so how can I retrieve the data from the database ? make sure that the two fields contain data both.
    Thanks in advance .
    Regards
    Nick

    Hi Nick,
    To retreive data for TOLERANZOB from QAMV,
    If you know the key fields then use
    SELECT SINGLE TOLERANZOB FROM QAMV INTO TOLERANZOB WHERE keyfields.
    else, you can use
    SELECT TOLERANZOB FROM QAMV UPTO ONE ROWS INTO TOLERANZOB WHERE....
    Once you retreive the data using the select query, you can check if it is initial and if not move the data from TOLERANZOB to TOLERANZOB1.
    <b>Reward points for helpful answers.</b>
    Best Regards,
    Ram.

  • How to Retrieve data from database into another form ?

    Good Day!
    Am currently new at JSP. I've been studying it for awhile and still getting the hang of it. We are working on a project.
    Editing a given data. We have to retrieve the given data and post it to another form "Editing form".
    Since we can retrieve data using JSP but how are we going to post it to another form? I mean how are we going to transfer data from one form to another?
    Can anyone help me with codes please..

    The client is a web browser.
    The client submits a request (click a link, visit a form)
    The server gets to respond to this
    - look at request parameters from the client
    - access database
    - produce resulting html page
    - send page back to client.
    The standard pattern is to retrieve data from the database in java code, and then load that data into a bean.
    You then make that bean available as an attribute
    It is then available for use in your JSP - either <jsp:useBean> tag or using ${ELexpressions}
    All you can pass from the client to the server is request parameters - which are always strings.
    Draw a picture of where the information is, and the information flows. Very rarely does it go directly from one "form" to another.
    Cheers,
    evnafets

  • How to retrieve data from table(BOM_ITEM)

    Hi All,
    I wrote webservices using axis1.4 to get BOM information from SAP.. funtional module is CAD_DISPLAY_BOM_WITH_SUB_ITEMS
    webservices works fine..I'am able to retrieve data from Export Parameter..But not able to retrieve data from table
    How to retrieve data from table(BOM_ITEM)..?
    Cheers, all help would be greatly appreciated
    Vijay

    Hi,
    1. Create Page Process.
    2. Select Data Manipulation
    3. In category select "Automated Row Fetch"
    4. Specify process name, sequence, select "On Load - Before Header" in point.
    5. Specify owner, table, primary key, and the primary key column(Item name contains primary key).
    6. Create a process.
    7. In each item select "Database Column" in "Source Type".
    Regards,
    Kartik Patel
    http://patelkartik.blogspot.com/
    http://apex.oracle.com/pls/apex/f?p=9904351712:1

  • Retrieving Data from database to combobox

    Hi
    Can anyone help in retrieving data from database to combobox..
    All the names of employees and their designations are stored in database.so i want retrieve them in other page.
    both designation and names of employees are comboboxes.
    after loading tha page i need to get all the designations which are stored in database in first combobox and when i select a particular designation i need get all tha names of employees of that designation in other combobox.this has to be done using jsp and ajax.
    please can anyone give me the code for this using Ajax and Jsp.

    Hello Friend try this code
    dbdata.jsp
    <%@page language="java" import="java.sql.*"%>
    <html>
    <%
    Class.forName("..........");
    Connection n=DriverManager.getConnection ("....","...","...");
    Statement st=con.createStatement();
    ResultSet rs=st.executeQuery("select ename from emp");
    %>
    <body>
    <form>
    <select>
    <%
    while(rs.next())
    %>
    <option><%=rs.getString("ename")%></option>
    <%
    %>
    </select>
    </form>
    </body>
    </html>

  • Try to retrieve data from database got error message

    Try to retrieve data from database got error message *"java.lang.ArrayIndexOutOfBoundsException: 2*
    *     sun.jdbc.odbc.JdbcOdbcPreparedStatement.clearParameter(JdbcOdbcPreparedStatement.java:1023)*
    *     sun.jdbc.odbc.JdbcOdbcPreparedStatement.setDate(JdbcOdbcPreparedStatement.java:811)*
    *     guestbk.doGet(guestbk.java:32)*
    *     guestbk.doPost(guestbk.java:73)*
    *     javax.servlet.http.HttpServlet.service(HttpServlet.java:710)*
    *     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)"*
    I have used prepared statment
    java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("dd/MM/yy");
                java.util.Date dt = sdf.parse(str3);
                       Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                       con=DriverManager.getConnection("jdbc:odbc:gbook");
                       //Statement stmt=con.createStatement();
    PreparedStatement ps = con.prepareStatement("SELECT * from gbook where emailid =? AND date =?");
    ps.setString(1,str1);
    ps.setString(2,str2);
    ps.setDate(3,new java.sql.Date(dt.getTime()));
    //ps.executeQuery();
                       //ResultSet rs=stmt.executeQuery("select * from gbook where emailid = str1");
                  ResultSet rs = ps.executeQuery();
                       out.println("<Html>");
                    out.println("<Head>");
                       out.println("<Title>GuestBook</Title>");
                       out.println("</Head>");
                       out.println("<Table border=1 align=center >");
                       out.println("<H4><B><center>Teacher's Lesson Plan</center></B></H4><BR>");
                       out.println("<TR><TD><b>Teacher Name</b></TD><TD><b>Class</b></TD></TR>");
               while(rs.next())
                        ctr++;
                        String email=rs.getString("emailid");
                        String cmt=rs.getString("comment");
                        out.println("<TR><TD>"+email+"</TD><TD>"+cmt+"</TD></TR>");
            }Please anybody help .

    PreparedStatement ps = con.prepareStatement("SELECT * from gbook where emailid =? AND date =?");
    ps.setString(1,str1);
    ps.setString(2,str2);
    ps.setDate(3,new java.sql.Date(dt.getTime()));Your SQL query has 2 placeholders but you try to set 3 values.
    And didn't you read the stack trace?
    guestbk.doGet(guestbk.java:32)You could've tracked down line 32 and seen what was there at that line.
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://www.catb.org/~esr/faqs/smart-questions.html
    ----------------------------------------------------------------

  • How to retrieve data from URL or querystring in bsp pages

    hi
    how to retrieve data from URL or querystring in bsp pages.
    thanks
    Edited by: Vijay Babu Dudla on Mar 23, 2009 7:35 AM

    Hello Friend,
    Vijay is correct.
    REQUEST is a system object available in runtime of BSP application.
    It is the object of interface IF_HTTP_REQUEST.
    Use methof REQUEST -> GET_FORM_DATA( )
    Regards
    Krishnendu

  • Error:Failed to retrieve data from database [Vendor Code:3001]

    Hello FOlks am trying to run a crystal report but when i try to run it somehow returns this error i.e [Error:Failed to retrieve data from database [Vendor Code:3001], I have no clue wats happening with this.Can anybody please throw some light on this.Am providing the sql behind this report for reference.
    SELECT "CLIENT"."CLIENT_NAME",
            "RECOVERY"."AMOUNT",
            "RECOVERY"."RECOVERY_TRANSACTION_INTERNAL",
            "RECOVERY"."ALLOCATION_CHECK_AMOUNT",
            "RECOVERY"."RECOVERY_DATE"
       FROM "HRI1_OWNER"."CLIENT""CLIENT",
            "HRI1_OWNER"."EVENT_CASE""EVENT_CASE",
            "HRI1_OWNER"."SETTLEMENT""SETTLEMENT",
            "HRI1_OWNER"."RECOVERY""RECOVERY"
      WHERE "CLIENT"."CLIENT_ID" = "EVENT_CASE"."CLIENT_ID"
        AND "EVENT_CASE"."EVENT_CASE_ID" = "SETTLEMENT"."EVENT_CASE_ID"
        AND "SETTLEMENT"."SETTLEMENT_ID" = "RECOVERY"."SETTLEMENT_ID"
        AND "CLIENT"."CLIENT_CODE" <> 'CLIENT  1'
        AND "CLIENT"."MAJOR_CLIENT_ID" in
            (Select major_client_id
               from major_client
              where major_client_code in ('LA', 'PFG'))
      ORDER BY "CLIENT"."CLIENT_NAME"Edited by: user11961230 on Nov 12, 2009 6:57 AM

    @oradba:Hi Thanks for getting bak. Well i have ran the query using PL/SQL Developer tool and yes its mapping to ORA-03001:unimplemented feature. i dont know what the problem is.
    @centinul: well i dont have any views in there.but still cudnt figure out why its throwing tht error
    Thanks
    Edited by: user11961230 on Nov 12, 2009 7:12 AM

  • How to Retrieve data from Variant Table

    Can anyone help me by telling how to retrieve data from variant table which was created by user. I am able to see data of variant table only thru cu60 transaction but not se11. I s there any function module to do this?

    Hello Mohan,
    if u already have data and u want to populate it in F4 help then use below code -
    u Have to make use of FM - 'F4IF_INT_TABLE_VALUE_REQUEST'
    REPORT  ZGILL_VALUE_REQUEST                     .
    data: begin of lt_all occurs 0.
            include structure DYNPREAD.
    data  end of lt_all.
    data: begin of lt_selected occurs 0.
           include structure DDSHRETVAL.
    data: end of lt_selected.
    DATA: BEGIN OF lt_code OCCURS 0,
                code LIKE zgill_main-PERNR,
          END OF lt_code.
    data no_dyn like sy-dynnr.
    Parameters : ECODE like zgill_main-PERNR.
    *parameters: pernr like pa0001-pernr .
    no_dyn =  sy-dynnr.   "give the scren no directly or sy-dynnr in case of report.
    At selection-screen on value-request for ECODE.
    select PERNR into table lt_code from zgill_main.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
            retfield               = 'ECODE'
            dynpprog               = sy-repid
           dynpnr                  = no_dyn
          dynprofield              =       'ECODE'
          window_title           = 'Employee Details'
           value_org              = 'S'
          DISPLAY                = 'F'
       TABLES
            value_tab             = lt_code
           RETURN_TAB             = lt_selected.
    EXCEPTIONS
      PARAMETER_ERROR        = 1
      NO_VALUES_FOUND        = 2
      OTHERS                 = 3
    *if sy-subrc eq '0' .
      write: 'success'.
    *endif.
    read   table lt_selected index sy-tabix.
    move lt_selected-fieldval to ECODE.

  • How to retrieve data from domain(Value Range)  of the table

    hi
    how to retrieve data from domain(Value Range)  of the table
    thanks

    Hello,
    You can try using the FM: DOMAIN_VALUE_GET TB_DOMAINVALUES_GET.
    BR,
    Suhas
    Edited by: Suhas Saha on Mar 24, 2009 10:08 AM

  • How to retrieve data from excel sheet

    Hi,
    How to retrieve data from excel sheet into a java file.

    janu05 wrote:
    If we append a $ in the end of the table name it is showing an error saying "invalid name,should not contain any invalid character or punctuation"Great, I'm very happy for you.
    Unless that was a question. In which case you might what to tell us a little more.
    Like which API you are using (assuming we are still on "reading an Excel sheet".

  • How to retrieve data from catsdb table and convert into xml using BAPI

    How to retrieve data from catsdb table and convert into xml using BAPI
    Points will be rewarded,
    Thank you,
    Regards,
    Jagrut BharatKumar Shukla

    Hi,
    This is not your requirment but u can try this :
    CREATE OR REPLACE DIRECTORY text_file AS 'D:\TEXT_FILE\';
    GRANT READ ON DIRECTORY text_file TO fah;
    GRANT WRITE ON DIRECTORY text_file TO fah;
    DROP TABLE load_a;
    CREATE TABLE load_a
    (a1 varchar2(20),
    a2 varchar2(200))
    ORGANIZATION EXTERNAL
    (TYPE ORACLE_LOADER
    DEFAULT DIRECTORY text_file
    ACCESS PARAMETERS
    (FIELDS TERMINATED BY ','
    LOCATION ('data.txt')
    select * from load_a;
    CREATE TABLE A AS select * from load_a;
    SELECT * FROM A
    Regards
    Faheem Latif

  • How to retrive data  from  database views or projection views

    how to retrive data  from  database views or projection views

    Hi chintam,
    1. Very simple
    2. Just like normal select statement.
    3. Select * from VIEWNAME.
    4. (Instead of the tablename, we just have to give the viewname)
    regards,
    amit m.

  • Failed to retrieve data from database?

    I am a new user
    When I try to Preview a document I am prompted to enter in database information.
    I have tried a few times to connect to my server and
    continuously keep getting the same error page
    No matter what I enter in the two fields, this is what pops up.
    "Failed to retrieve data from database"
    " Details: ADO Error Code:0x
    Source: Microsoft OLE DB Provider SQL server
    Description: Invalid object name: ScratchWO.dbo.tblsyslistviewprint'.
    SQL State:42502
    Code:208"
    When the OLE DB(ADO) page opens and asks for a server and a database, what is needed to stop the error from happening
    If anyone has any information that would be great !

    SQL State:42502 means an user authorization error.  Check the user and it's access to the target database.

Maybe you are looking for