How to get values/data stored in the database into a list-item.

how to get values/data stored in the database into a list-item.
i tried to make a list item without any values assigned to it...but i got the below error.
FRM-30191: No list items defined for required poplist.
or
FRM-32082: Invalid value for given item type.
List EMPNO
Item: EMPNO
Block: EMP
Form: MODULE5
FRM-30085: Unable to adjust form for output.
then according to some docs, i tried the the following for the trigger
when-new-form-instance
declare
     rg_name varchar2(40) := 'emp_rec';
     status number;
     groupid recordgroup;
     it_id item;
begin
     it_id := Find_Item('empno');
     groupid := create_group_from_query(rg_name, 'select empno from emp');
     status := populate_group(groupid);
     populate_list(it_id, groupid);
end;
but yet didnt work... :(
so how the heck do i get values fetched from the database table into the list item?

for list items you need to values in the record group, one is the shown value and one is the returned value.
Check out the online help for the populate_list built-in.
You'll need something like select ename,ename from emp as the record group query.

Similar Messages

  • How to get first 10 records from the database using JSP

    i want ot get first 10 records from the database and then after clicking the next button in the page,it must show the next precceding 10 records from the database.i am getting the first 10 records .but how to post to the same page to get another preceeding 10 record.

    Search the forums - this has been asked a lot. I usually recommend experimenting with tops and order bys until you're satisfied.
    Kind regards,
      Levi

  • Size of data stored in the database

    How can i find the total amount of space data occupies in the database?

    Hi,
    Check the dba_extents view which give u all the allocated extents and their sizes for all the objects in the database.
    Good luck,
    Fred

  • How do you access data stored on the iCloud ?

    im trying to restore my iPod. How do i get my data back on it from the Icloud ?

    To restore from and iCloud backup you have to go to Settings>General>Reset and tap Erase All Content and Settings (which will erase the iPad), then go back through the setup again process as you did when it was new.  When given the option, choose to Restore from iCloud Backup (see image below).  Be sure you are connected to wifi and your external charger as restoring from an iCloud backup can take quite a while to complete.

  • VOFM Custom Routine - Wrong values being stored in the database

    Hi Experts,
    I am using a requirement routine in my Z condition type.
    In invoices for new sales orders, the condition is coming directly at the line item level.
    In the older open sales orders, at the time of creation of invoices we are manually entering this condition type at the header level. We don't enter any value at the header level.  The routine calculates the values properly when we go to the line item condition tabs. But after saving the invoice, in change mode the value is being displayed as 0 against this condition type.
    In case we enter the condition type at the item level, the same values are being displayed and the values get saved correctly. But since the number of line items are generally more than 100 at the invoice level, the users can't be expected to enter all condition type for all the line items.
    I am writing the code in the form kobed_903. form kobev_903 is not accessed. SAP notes says that kobed is for the header and kobev for items. Can anyone suggest what am i doing wrong.
    I am saving values as below.
    read table tkomv assigning <f_komv> with key knumv = komk-knumv
                                                 kposn = komp-kposn
                                                 kschl = 'ZVPR'.
    if sy-subrc eq 0.
      <f_komv>-kbetr = 'Calculated Value'.
      <f_komv>-kwert = 'Calculated Value'.
      <f_komv>-kwert_k = 'Calculated Value'.
      <f_komv>-waers = 'AED'.
      <f_komv>-kwaeh = 'AED'.
    endif.
    *The form ends with
    sy-subrc = 0.
    Thanks,
    Abdullah
    Edited by: Abdullah Ismail on Apr 19, 2010 5:06 PM

    If I enter the condition at the item level, the invoice saves the value. But if I enter the condition at the header level, the value is being displayed at the item level by performing the necessary calculations but it does not save. So I am changing the value of KHERK from D to C in the row of TKOMV for this particular condition type. The values are being stored now but is this advisable?
    Thanks,
    Abdullah

  • How to get performance data out of SCOM and into a 3rd party management tool

    Hi
    I  am creating an integration between a 3rd party management tool and System Center Operations Manager 2012 R2.  I need to export performance data from SCOM into our application for both HyperV servers and virtual machines. Our application runs on
    linux so I cannot do any .NET programming.
    What is the best way to do this? I am aware of using the Usage SPF web service but this will not share performance data for the hyperv servers, just the virtual machines .
    thanks in advance

    Hi,
    We can use SQL query to get SCOM data out, but about how to send those data into your application, this should be related with how you develop your application.
    Here is an article about Operations Manager integation, hope it helps:
    http://social.technet.microsoft.com/wiki/contents/articles/12804.system-center-2012-integration-guide-operations-manager.aspx
    Regards,
    Yan Li
    Regards, Yan Li

  • How to get a routing consistent to the Database

    Hi ABAP,
    my task is to program a RFC-function which can generate routings, copy routings, read routings, and modify routings (with Headdata, Operations, Materialtaskallocation).
    I can use BAPI_ROUTING_CREATE to generate a routing, and to copy a routing.
    Reading a routing is quite easy with normal selects.
    Means i already have accomplished these tasks.
    BUT now i have to modify the routing. The modification itself again is quite easy and doesnt make much problems. The Problem is: How to get the modified routing to the Database in a consistent state? Does anyone of you know of any BAPI´s/Functions/anything which can do that for me?
    Or if not does at least anyone know how the data-model of a routing is?
    If i had a data_model i could do the konsistency checks myself, but since i have no model i dont know what to check against.
    anyway guys thanks for listening.

    Hi Florian  ,
    SAP will track changes happend on some Objects.So u have to find out object class for ROUTING then u can get the data from CDHDR/CDPOS.
    Regards
    Prabhu

  • ADF BC - How to get validation picked up from the database.

    Is there a way the ADF BC can be created so it contains the check constraints from the database?
    I assume if it did, it would pre-fill the "validation" branch in the Entity Object Editor.

    Frank,
    Thank you very much for your reply. I've set "valuePassThrough" property of the dropdownlist to true. In the valueChangeListener, my code looks like this.
    public void TD_valueChangeListener(ValueChangeEvent valueChangeEvent) {
    System.out.println("+++++++++");
    System.out.println("TD_valueChangeListener");
    Number n = null;
    BindingContainer bc = this.getBindings();
    if(bc != null){
    System.out.println("bc is not null");
    //get the selected TD
    FacesCtrlListBinding TdIter = (FacesCtrlListBinding)bc.get("LandLegalView1Td");
    if(TdIter != null){ 
    System.out.println("TdIter is not null");
    if(valueChangeEvent.getNewValue() != null)
    try{n = new Number(valueChangeEvent.getNewValue());}
    catch(Exception e){
    e.getMessage();
    System.out.println("selected TD index="+n);
    //Object td = TdIter.getAttributeFromRow(n.intValue(), "Td");
    Object td = TdIter.getAttribute(n.intValue());
    System.out.println("real value of td=" + td);
    }else{
    System.out.println("TD is null");
    }else{
    System.out.println("TdIter is null");
    My question here is: I tried two ways of getting the real value of the new selected value. One is "Object td = TdIter.getAttributeFromRow(n.intValue(), "Td");". The other is "Object td = TdIter.getAttribute(n.intValue());". None of them give me the new selected value but the old value. Did I do anything wrong?
    Regards,
    Annie

  • How to read a file and save the contents into array list

    i have textfile contains information like:
    Name: James Smith
    Customer no: 663,282
    Post code: BA1 74E
    Telephone no: 028-372632
    Last modified: Feb 10, 2008 6:50:00 PM GMT
    Name: Janet Smith
    Customer no: 663,283
    Post code: BA1 74E
    Telephone no: 028-372632
    Last modified: Jan 11, 2007 8:10:05 PM GMT
    etc...
    how can i read the contents of this textfile and put the data into an ArrayList called ArrayList<Customer> customerList.
    i knew that i need two classes, one for CustomerDetails and one for ReadFile.
    i have already done the customer class as:
    import java.util.Date;
    public class Customer
        String Name;
        int CustomerNo;
        String Postcode;
        String teleNo;
        Date lastModified;
        public Customer(String Name, int CustomerNo, String Postcode, String teleNo, Date lastModified)
         assign(Name, CustomerNo, Postcode, teleNo, lastModified);
        public void assign(String Name, int CustomerNo, String Postcode, String teleNo, Date lastModified)
         this.Name=Name;
         this.CustomerNo=CustomerNo;
         this.Postcode=Postcode;
         this.teleNo=teleNo;
         this.lastModified=lastModified;
        public String toString()
         String allDetails = "Name: "+Name+
             ", Customer No: "+CustomerNo+
             ", Postcode:"+Postcode+
             ", Telephone No: "+teleNo+
             ", Last Modified Date: "+lastModified;
         return allDetails;
    }i just wondering how can i code the ReadFile class?
    can anyone help me please. thank you in advance.

    thank you for your suggestion, but i have already started to code the readCustomer class using the Scanner.
    the code i got so far is:
    import java.util.Scanner;
    import java.io.*;
    public class readCustomer
        public static void main(String[] args)
         readCustomer("Customers.txt");
        public static void readCustomer(String filename)
         try {
             Scanner scanner = new Scanner(new File(filename));
             scanner.useDelimiter(System.getProperty("line.separator"));
             while (scanner.hasNext()) {
              processLine(scanner.next());
             scanner.close();
         } catch (FileNotFoundException e) {
             e.printStackTrace();
        public static void processLine(String line)
         Scanner scanner2 = new Scanner(line);
         scanner2.useDelimiter("\\s*:\\s*");
         String description = scanner2.next();
    *// here is where i am struggling. i don't know how to get the information after the : sign*   
    }i am currently struggling with the processLine method?
    also, i am not sure how to group a set of information and put them into the arraylist.
    Any hint, please. Thank you.
    Edited by: mujingyue on Feb 26, 2008 12:42 PM

  • How to get value and name of the n'th parameter in a pl/sql funct./proced.

    procedure test(name varchar2, birthdate date, zip number, country varchar2);
    in procedure x I do
    test('Michael Postmann', to_date('03.01.1983', 'DD.MM.YYYY'), 7461, 'AUSTRIA');
    And this should htp.print the following:
    test: name=Michael Postmann,birthdate=1983/01/03,zip=7461,country=AUSTRIA
    In procedure test I want to know:
    *) What is the name of myself (the procedure)
    *) Optionally: Am I a procedure or a function?
    *) How many Parameters do I have?
    *) What are the values of them?
    *) What are the names of them?
    *) Optionally: What are the types of them?
    What I actually want to do is:
    I have a procedure for logging errors. So in my program I call this function frequently and I want it to log the current time, a string passed to the logging function, the client's ip, etc.... but it should also log a list of the parametrs and values of the procedure/function where the error occoured.
    Is there any way to do this (I think in C this is done by argc and argv, but a string containing all the information (as you get it from the WebDb when something goes wrong) would be enough)?
    Thx in advance,
    Nomike aka Michael Postmann

    Name of procedure or function can be retrieved using DBMS_UTILITY.FORMAT_CALL_STACK:
    CREATE OR REPLACE FUNCTION fn_whoami (v_in varchar2)
    RETURN varchar2
    AS
    v_stack varchar2(1000) DEFAULT DBMS_UTILITY.FORMAT_CALL_STACK;
    v_job varchar2(500);
    v_name varchar2(100);
    BEGIN
    v_job := SUBSTR(v_stack,INSTR(v_stack,'function'),256);
    v_name := SUBSTR(v_job,1,INSTR(v_job,CHR(10))-1);
    return v_name;
    END fn_whoami;
    select fn_whoami('1') from dual;
    CREATE OR REPLACE PROCEDURE pr_whoami
    AS
    v_stack varchar2(1000) DEFAULT DBMS_UTILITY.FORMAT_CALL_STACK;
    v_job varchar2(500);
    v_name varchar2(100);
    BEGIN
    v_job := SUBSTR(v_stack,INSTR(v_stack,'procedure'),256);
    v_name := SUBSTR(v_job,1,INSTR(v_job,CHR(10))-1);
    dbms_output.put_line(v_name);
    END pr_whoami;
    exec pr_whoami;

  • How to get max date field in the query

    Hi,
    We uploads the data into the cube every week.
    Basically we are planning to put some ticker on the query. This ticker will show the user, upto which date the data is available in the cube.
    I want the query, which will show me only the maximum date (maximum 0calday) from the infocube in the report.
    This in turn, I will use in the ticker and make use of it.
    Can anyone please help in making this query.
    Thanks
    Ramesh Ganji

    if 0CALDAY is used as a characteristic then you have to convert that as a key figure using a replacement path variable.
    Please see the below link for changing 0CALDAY as a key figure using Replacement path
    http://www.sd-solutions.com/documents/SDS_BW_Replacement%20Path%20Variables.html
    https://websmp106.sap-ag.de/~sapdownload/011000358700001963972003E/HowToCalcWithAttr.pdf
    Now you have to create an exception "Top N Rows" based on the replacement path variable created above.
    This will solve your problem.
    Regs
    Gopi.
    Award points if it helps ...

  • How To Remove Other Data Stored on the iPhone 5 by itunes ?

    i have to delete other data because it takes 3.74 GB from my space and i don't need it at all , i just delete all apps and documents but it still 3.74 GB what can i do now !!

    What is "Other" and What Can I Do About It?

  • How to get value in dashboard prompt from database

    Hi All,
    I am using dashboard prompt (Year Prompt) to filter reports on year basis.
    fact table stores the hit date on a particular site linked with date dimension table .
    I have Datas in fact table say from year 2005 to 2009 .In dashboard Prompt it is showing me all the years 1990 to 2021(that are in date dimension).
    I hard coded the value of years in prompt now it only showing me years 2005 to 2009.
    My question is that is their any way that prompt automatically take values from database, those years which are stored in fact table ?
    Thanks in advance.

    Hi...
    Try writing query for dashboard prompt to get desired values..
    *select distinct year(FactTable.HitDate) from SubjectAreaName*
    To work this.. you should have HitDate column in presentation layer. (You can drag this column from fact in BMM and drop in any dimensions of presentation Layer, and name it as HitDate (Fact).. some thing like this...

  • How can i send files stored in the database as an attachment?

    hello
    is it possible to send files witch are stored in database as an attachment ?
    how can i do that?
    thanks

    You need to use a Java stored procedure created within the Orcale 8i database.
    This Java stored procedure should import the java mail classes.
    Qurashi

  • How to get a group created in the OD into ical and EDIT it ?

    hello,
    We would like to use iCal instead of web service to view and edit a group's calendar created in the OD/Repertory (like places or ressources)..
    Viewing is ok by adding the calendar's group link using alt+command S (my iCal is in french so I give you the shortcut)....
    So how do we edit a calendar's group under iCal (like places or ressources) ?
    Thank you

    Hi, you might want to read this thread: http://discussions.apple.com/thread.jspa?messageID=6049520
    Good news is there is a work around.. Bad news is it is sloppy at best. This should have been supported from day 1. I seriously hope they come out with a fix.

Maybe you are looking for