Use of classes Vs tables

Hi All,
I have e requirement where i need to select data from tables....... It was told to me that i can make use of classes instead of tables...... I am working on Inbound delivery in EWMmodule.......
can any one through some light on this....... how can i make use of classes to get data from sap tables.........
Regards,
Poonam

Hi Faisal,
Just to correct you it's "Methods of Global Persistent Classes".
Not to hide my ignorance in OOPs, but i don't think persistent classes should be used for mundane selects. It's much easier to write, maintain & troubleshoot a select construct than a persistent class
You can go through this discussion on: Why do we need Persistent Classes ?
BR,
Suhas

Similar Messages

  • Help using scanner class to count chars in file

    Hi all, I am learning Java right now and ran into a problem. I need to use the Scanner class to accurately count the number of chars in a file including the line feed chars 10&13.
    This what I have and it currently reports a 201 byte file as having 194 chars:
         File file = new File(plainFile);
         Scanner inputFile = new Scanner(file);
         numberOfChars = 0;
         String line;
         //count characters in file
         while (inputFile.hasNextLine())
              line = inputFile.nextLine();
              numberOfChars += line.length();
    I know there are other ways using BufferedReader, etc but I have to use Scanner class to do this.
    Thanks in advance!

    raichle wrote:
    Wow guys, thanks for the help! I've got a RTFMWell, what's wrong to have a look at the API docs for the Scanner class?
    and directions that go against the specs I said.Is that so strange to suggest a better option? What if I ask a carpenter "how do I build a table with a my stapler?". Should I give the man an attitude if he tells me I'd better use a saw and hammer?
    I'm also aware that it "eats" those chars and obviously looking for a way around that.
    I've looked through the java docs, but as I said, I'm new to this and they're difficult to understand. The class I am auditing req's that this be done using Scanner, but I don't see why you demand an explanation.
    Can anybody give me some constructive help?Get lost?

  • How to use application class reference in the controller methods of BSP

    Hi,
    I have created a bsp application and also created an application class and assigned it to the application class. In the application class, I have created attribute TEXT type string(public and instance parameter).
    In the controller let's say main.do, I am trying to give a value to to the text by adding the following code.
    application->text = 'test'.
    I am getting syntax error saying field 'text' is unknown. It is not contained in one of the specified tables nor defined by DATA statement. 
    Please can someone let me know how to use the application class in the coding with an example. I couldn't find how exactly this has to be reference. Please help.
    Best regards
    Siva

    Hi,
    if you are having main controller and sub-controller then you may need to use below coding to use application class reference.
    *Data declaration
      DATA:  obj_cntrl        TYPE REF TO cl_bsp_controller2,
             obj_sub_cntrl   TYPE REF TO z_cl_sub_cntl,
             application TYPE REF TO z_cl_application.
    *Get the controller
      CALL METHOD obj_main_cntrl->get_controller   "obj_main_cntrl is the object of main controller
        EXPORTING
          controller_id       = 'SUB'   "Controller ID
        RECEIVING
          controller_instance = obj_cntrl  .
      obj_sub_cntrl ?= obj_cntrl  .
      application ?= obj_sub_cntrl ->application.
    or simply use below code in your controller method.
      application ?= me->application.
    Thnaks,
    Chandra

  • Internal class type 023 cannot be used in class maintenance

    Dear PP gurus,
    I am creating class from  t code CL01 and  while entering class type 023         , i am getting a error message
    "Internal class type 023 cannot be used in class maintenance" . when i pressed F4 , in the list 023 is not present.
    In the develpopment client , when i do the same  023 , it allows be to create class
    pls help me wher i am missing or?
    Regards

    Hello All,
    I am facing a similar problem.
    I have checked the following customization "SPRO --> Cross Application component -->Classification system --> Class --> Maintain Object type and class,
    Here select the MARA table click on the object and check class type 023 is assigned or not."
    Class type 023 is not assigned there. When i try to add a new entry I get the following error message
    "Specify the key within the work area".
    I referred to the following note :OSS Note 1066606, but that is concerned with AFS component.
    Kindly provide me a solution as soon as possible.
    Regards,
    Julia

  • How to use global classes and display returned data?

    Hello experts,
    I have the following code in a program which accesses a global class (found in the class library). It executes one it's static methods. What I would like to do is to get hold of some elements of the returned data. How do I do that please?
    Your help is greatly appreciated.
    ***Use global class CL_ISU_CUSTOMER_CONTACT
    DATA: o_ref TYPE REF TO CL_ISU_CUSTOMER_CONTACT.
    DATA: dref_tab LIKE TABLE OF O_ref.
    DATA: begin OF o_ref2,
    CONTACTID               TYPE CT_CONTACT,
    P_INSTANCES             TYPE string,
    P_CONTEXT               TYPE CT_BPCCONF,
    P_CONTROL               TYPE ISU_OBJECT_CONTROL_DATA,
    P_DATA                  TYPE BCONTD,         "<<<=== THIS IS A STRUCTURE CONTAINING OTHER DATA ELEMENTS
    P_NOTICE                TYPE EENOT_NOTICE_AUTO,
    P_OBJECTS               TYPE BAPIBCONTACT_OBJECT_TAB,
    P_OBJECTS_WITH_ROLES    TYPE BAPIBCONTACT_OBJROLE_TAB,
    end of o_ref2.
    TRY.
        CALL METHOD CL_ISU_CUSTOMER_CONTACT=>SELECT  "<<<=== STATIC METHODE & PUBLIC VISIBILITY
          EXPORTING
           X_CONTACTID = '000001114875'   "Whatever value here
          RECEIVING
            Y_CONTACTLOG = o_ref
    ENDTRY.
    WHAT I WOULD LIKE TO DO IS TO MOVE o_ref TO o_ref2 and then display:
    1) P_DATA-PARTNER
    2) P_DATA-ALTPARTNER
    How can I do this please?

    I now have the following code. But when I check for syntax I get different error. They are at the end of the list.
    Here is the code the way it stands now:
    ================================================
    ***Use global class CL_ISU_CUSTOMER_CONTACT
    DATA: oref TYPE REF TO CL_ISU_CUSTOMER_CONTACT.
    DATA: dref_tab LIKE TABLE OF oref.
    DATA: begin OF oref2,
    CONTACTID TYPE CT_CONTACT,
    P_INSTANCES TYPE string,
    P_CONTEXT TYPE CT_BPCCONF,
    P_CONTROL TYPE ISU_OBJECT_CONTROL_DATA,
    P_DATA TYPE BCONTD,      "THIS IS A STRUCTURE CONTAINING OTHER DATA ELEMENTS
    P_NOTICE TYPE EENOT_NOTICE_AUTO,
    P_OBJECTS TYPE BAPIBCONTACT_OBJECT_TAB,
    P_OBJECTS_WITH_ROLES TYPE BAPIBCONTACT_OBJROLE_TAB,
    end of oref2.
    TRY.
    CALL METHOD CL_ISU_CUSTOMER_CONTACT=>SELECT     " STATIC METHODE & PUBLIC VISIBILITY
    EXPORTING
    X_CONTACTID = '000001114875' "Whatever value here
    RECEIVING
    Y_CONTACTLOG = oref
    ENDTRY.
    field-symbols: <FS1>      type any table,
                   <wa_oref2> type any.
    create data dref_tab type handle oref.   " <<===ERROR LINE
    assign dref->* to <FS1>.
    Loop at <FS1> assigning  <wa_oref2>.
    *use <wa_orfe2> to transfer into oref2.
    endloop.
    write: / 'hello'.
    =========================================
    Here are the errors I get:
    The field "DREF" is unknown, but there is a field with the similar name "OREF" . . . .
    When I replace itr by OREF I get:
    "OREF" is not a data reference variable.
    I then try to change it to dref_tab. I get:
    "DREF_TAB" is not a data reference variable.
    Any idea? By the way, must there be a HANDLE event for this to work?
    Thanks for your help.

  • ALV like LIST GRID BLOCKED and HIRARCHIC using oops class SALV

    Hi ,
    Can any one let know me is it possible to display all the Flavours of ALV like LIST GRID BLOCKED and HIRARCHICAL
    using oops class CL_GUI_ALV and class CL_SALV.
    and the relevant events with respect to the type of ALV.
    regards

    Hello
    Have you had a look at the documents of Rich Heilman:
    [ALV Object Model - Simple 2D Table - Event Handling|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/cda3992d-0e01-0010-90b2-c4e1f899ac01]
    [ALV Object Model - Hierarchical Sequential List - The Basics|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b0f03986-046c-2910-a5aa-e5364e96ea2c]
    [ALV Object Model - Simple 2D Table - The Basics|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/eac1fa0b-0e01-0010-0990-8530de4908a6]
    Regards
      Uwe

  • How to use TableSorter class with DefaultTableModel

    Hi Friends
    Please tell me how to use TableSorter Class which is in the Java. Tutorials with DefaultTableModel.
    i saw in a thread there it was given that we have to pass the DefaultTableModel to the TableSorter Class.
    I tried to use like that. But i am getting Error Like Exception occurred during event dispatching:
    I am posting the part of Code where i use the DefaultTableModel
         private void displayavailablity(String selectedAuthor)
                   try
                        Vector columnNames = new Vector();
                        Vector data1 = new Vector();
                        String bname,bauthor,bcategory,bref1,bavail,bid;
                        int bref,mid,num;
                        rs = st.executeQuery("SELECT BId,BName,BAuthorName,BAuthorandPublisher,BCat FROM Books where BAuthorandPublisher='" +selectedAuthor+"'");     
                        ResultSetMetaData md= rs.getMetaData();
                        int columns =md.getColumnCount();
                        String booktblheading[]={"NUMBER","BOOK NAME","AUTHOR","CODE","CATEGORY"};
                        for(int i=1; i<= booktblheading.length;i++)
                             columnNames.addElement(booktblheading[i-1]);
                        while(rs.next())
                             Vector row = new Vector(columns);
                             for(int i=1;i<=columns;i++)
                                  row.addElement(rs.getObject(i));
                             data1.addElement(row);
                             //System.out.println("data is:"+data);
                        ((DefaultTableModel)table.getModel()).setDataVector(data1,columnNames);
                        TableSorter sorter = new TableSorter((DefaultTableModel)table.getModel());
                        rs.close();
                   catch(SQLException ex)
                        System.out.println("ERROR IS HERE");
                        ex.printStackTrace();
         }Please help me on this issue Otherwise Please give me some Sample coding to implement this sorting. with DefaultTableModel
    Thank you for your service
    Cheers
    Jofin

    I don't know about any TableSorter class, but I suppose you mean javax.swing.table.TableRowSorter.
    The TableRowSorter is to be attached to the JTable, not to the data model. Here's a cut'n'paste from the last time I used it:
    RowSorter<TableModel> sorter = new TableRowSorter<TableModel>(tableModel);
    myTable.setRowSorter(sorter);
    And heres from the JDK1.6 documentation:
    TableModel myModel = createMyTableModel();
    JTable table = new JTable(myModel);
    table.setRowSorter(new TableRowSorter(myModel));
    Check out http://java.sun.com/javase/6/docs/api/javax/swing/table/TableRowSorter.html. I find it to be good documentation.

  • Adding custom fields in FPM_FORM_UIBB using feeder class

    Hi,
    We have requirement to add custom fields in form uibb using feeder class in Health and safety module at incidents report.
    Please provide me some usefull documents and reference links.
    Thanks
    Murali Papana.

    Hello Murali,
    1. Copy the Feederclass to customer namespace (ZCL_HRESS_PER_DETAIL_XX)
    2. Create a new TYPE in you class; e.g. S_CUSTOM_FIELDS
    3. Add a type definition
    Example:
    private section.
    *"* private components of class ZCL_HRESS_PER_DETAIL_XX
    *"* do not include other source files here!!!
    "--- BEGIN - Enter here your type definition
      types:
        BEGIN OF S_CUSTOM_FIELDS,
          YOUR_FIELD       TYPE STRING,
        END OF S_CUSTOM_FIELDS .
    "--- END - Enter here your type definition
      constants CV_ACTION_CODE_REFRESHFVALUES type FPM_EVENT_ID value '_REFRESH_VALUES_'. "#EC NOTEXT
      constants CV_ACTION_CODE_ON_CNTR_SELECT type FPM_EVENT_ID value '_ON_COUNTRY_SELECT_'. "#EC NOTEXT
      constants CV_ACTION_CODE_SELECTCOUNTRY type FPM_EVENT_ID value '_SELECT_COUNTRY_'. "#EC NOTEXT
      constants CV_DATA_SHARING type STRING value 'DATA_SHARING_TEXT'. "#EC NOTEXT
      constants CV_COMP_BOL_ATTR type STRING value 'BOL_OBJECT_ATTR'. "#EC NOTEXT
      constants CV_DATA_SHARING_SPACE type STRING value 'DATA_SHARING_SPACE'. "#EC NOTEXT
      constants CV_ADDRESS_COUNTRY_SPACE type STRING value 'COUNTRY_SPACE'. "#EC NOTEXT
      methods GET_INFTY
        returning
          value(RV_INFTY) type INFTY .
      methods CREATE_ADDRESS_ENTITY
        exporting
          !ET_MESSAGES type FPMGB_T_MESSAGES
          value(EV_RESULT) type FPM_EVENT_RESULT .
    4. Edit method IF_FPM_GUIBB_FORM~GET_DEFINITION
    Add the following:
    DATA lt_component_tbl TYPE ABAP_COMPONENT_TAB.
    DATA LS_CUSTOM_FIELDS TYPE S_CUSTOM_FIELDS.
    DATA ls_new_component TYPE ABAP_COMPONENTDESCR.
    DATA lo_new_component TYPE REF TO CL_ABAP_typeDESCR.
    DATA lo_new_component2 TYPE REF TO CL_ABAP_STRUCTDESCR.
    FIELD-SYMBOLS <ls_new_field_descr> TYPE FPMGB_S_FORMFIELD_DESCR.
    FIELD-SYMBOLS <fs_wa_mand_field> TYPE FPMGB_S_FORMFIELD_DESCR.
    APPEND INITIAL LINE TO ET_FIELD_DESCRIPTION ASSIGNING <ls_new_field_descr>.
          <ls_new_field_descr>-NAME = 'YOUR_FIELD'. "Enter here your field
          <ls_new_field_descr>-LABEL_BY_DDIC = 'X'.
          <ls_new_field_descr>-VISIBILITY = '02'.
          <ls_new_field_descr>-DEFAULT_DISPLAY_TYPE = 'IN'.
      " Get table of all fields, visible in GUIBB
      CALL METHOD EO_FIELD_CATALOG->GET_COMPONENTS
        RECEIVING
          P_RESULT = lt_component_tbl.
      " Describe data in LS_CUSTOM_FILED
      CALL METHOD CL_ABAP_STRUCTDESCR=>DESCRIBE_BY_DATA
        EXPORTING
          P_DATA      = LS_CUSTOM_FIELDS
        RECEIVING
          P_DESCR_REF = lo_new_component.
      lo_new_component2 ?= lo_new_component.
      " Add custom fields to field catalog
      ls_new_component-name       = 'LS_CUSTOM_FIELDS'.   "type string,
      ls_new_component-type       = lo_new_component2.    "type ref to cl_abap_datadescr,
      ls_new_component-as_include = 'X'.                   "type abap_bool,
      ls_new_component-suffix     = ''.                   "type string,
      APPEND ls_new_component TO lt_component_tbl.
      TRY.
      CALL METHOD CL_ABAP_STRUCTDESCR=>CREATE
        EXPORTING
          P_COMPONENTS = lt_component_tbl
    *      P_STRICT     = TRUE
        RECEIVING
          P_RESULT     = eo_field_catalog
       CATCH CX_SY_STRUCT_CREATION .
      ENDTRY.
    5. In your GUIBB you have to replace the feeder class to your new customer feder class.
    Hope, I could help you.
    Best regards, Christian

  • ALV using ABAP Classes and Objects

    Hi All,
    I am trying to print the values in my internal table using ALV, using ABAP classes and objects. Here the title for columns are picked based on the title specified in the data element. I want to set the title of my columns by my own. how to achieve this ?. Please provide me a sample code if possible.
    thanks & regards,
    Navneeth.K

    Hello Navneeth
    The following sample report shows how to build and modify a fieldcatalog (routine <b>BUILD_FIELDCATALOG_KNB1</b>).
    *& Report  ZUS_SDN_ALVGRID_EVENTS
    REPORT  zus_sdn_alvgrid_events.
    DATA:
      gd_okcode        TYPE ui_func,
      gt_fcat          TYPE lvc_t_fcat,
      go_docking       TYPE REF TO cl_gui_docking_container,
      go_grid1         TYPE REF TO cl_gui_alv_grid.
    DATA:
      gt_knb1          TYPE STANDARD TABLE OF knb1.
    PARAMETERS:
      p_bukrs      TYPE bukrs  DEFAULT '2000'  OBLIGATORY.
    *       CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS:
          handle_hotspot_click FOR EVENT hotspot_click OF cl_gui_alv_grid
            IMPORTING
              e_row_id
              e_column_id
              es_row_no
              sender.
    ENDCLASS.                    "lcl_eventhandler DEFINITION
    *       CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
      METHOD handle_hotspot_click.
    *   define local data
        DATA:
          ls_knb1     TYPE knb1,
          ls_col_id   TYPE lvc_s_col.
        READ TABLE gt_knb1 INTO ls_knb1 INDEX e_row_id-index.
        CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
        CASE e_column_id-fieldname.
          WHEN 'KUNNR'.
            SET PARAMETER ID 'KUN' FIELD ls_knb1-kunnr.
            SET PARAMETER ID 'BUK' FIELD ls_knb1-bukrs.
            CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
          WHEN 'ERNAM'.
    *        SET PARAMETER ID 'USR' FIELD ls_knb1-ernam.
    *        NOTE: no parameter id available, yet simply show the priciple
            CALL TRANSACTION 'SU01' AND SKIP FIRST SCREEN.
          WHEN OTHERS.
    *       do nothing
        ENDCASE.
    *   Set active cell to field BUKRS otherwise the focus is still on
    *   field KUNNR which will always raise event HOTSPOT_CLICK
        ls_col_id-fieldname = 'BUKRS'.
        CALL METHOD go_grid1->set_current_cell_via_id
          EXPORTING
            is_row_id    = e_row_id
            is_column_id = ls_col_id.
      ENDMETHOD.                    "handle_hotspot_click
    ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
    START-OF-SELECTION.
      SELECT        * FROM  knb1 INTO TABLE gt_knb1
             WHERE  bukrs  = p_bukrs.
    * Create docking container
      CREATE OBJECT go_docking
        EXPORTING
          parent                      = cl_gui_container=>screen0
          ratio                       = 90
        EXCEPTIONS
          OTHERS                      = 6.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Create ALV grid
      CREATE OBJECT go_grid1
        EXPORTING
          i_parent          = go_docking
        EXCEPTIONS
          OTHERS            = 5.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Set event handler
      SET HANDLER:
        lcl_eventhandler=>handle_hotspot_click FOR go_grid1.
    * Build fieldcatalog and set hotspot for field KUNNR
      PERFORM build_fieldcatalog_knb1.
    * Display data
      CALL METHOD go_grid1->set_table_for_first_display
        CHANGING
          it_outtab       = gt_knb1
          it_fieldcatalog = gt_fcat
        EXCEPTIONS
          OTHERS          = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Link the docking container to the target dynpro
      CALL METHOD go_docking->link
        EXPORTING
          repid                       = syst-repid
          dynnr                       = '0100'
    *      CONTAINER                   =
        EXCEPTIONS
          OTHERS                      = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * ok-code field = GD_OKCODE
      CALL SCREEN '0100'.
    END-OF-SELECTION.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'STATUS_0100'.
    *  SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
      CASE gd_okcode.
        WHEN 'BACK' OR
             'END'  OR
             'CANC'.
          SET SCREEN 0. LEAVE SCREEN.
        WHEN OTHERS.
      ENDCASE.
      CLEAR: gd_okcode.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  BUILD_FIELDCATALOG_KNB1
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM build_fieldcatalog_knb1 .
    * define local data
      DATA:
        ls_fcat        TYPE lvc_s_fcat.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
    *     I_BUFFER_ACTIVE              =
          i_structure_name             = 'KNB1'
    *     I_CLIENT_NEVER_DISPLAY       = 'X'
    *     I_BYPASSING_BUFFER           =
    *     I_INTERNAL_TABNAME           =
        CHANGING
          ct_fieldcat                  = gt_fcat
        EXCEPTIONS
          inconsistent_interface       = 1
          program_error                = 2
          OTHERS                       = 3.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      LOOP AT gt_fcat INTO ls_fcat
              WHERE ( fieldname = 'KUNNR'  OR
                      fieldname = 'ERNAM' ).
        ls_fcat-hotspot = abap_true.
        ls_fcat-scrtext_s  = '<short text>'.  " short text of column
        ls_fcat-scrtext_m = '<medium text>'.  " medium text of column
        ls_fcat-scrtext_l   = '<long text>'.  " longtext text of column
        ls_fcat-tooltip      = '...'.  " ALV control: Tool tip for column header
        ls_fcat-coltext    = '...'.   " ALV control: Column heading
        MODIFY gt_fcat FROM ls_fcat.
      ENDLOOP.
    ENDFORM.                    " BUILD_FIELDCATALOG_KNB1
    Regards
      Uwe

  • ALV Tree list output using the Class and method

    Hi,
    How to get the internal table values of ALV Tree List in classes.
    My requirement is i need to store the output values in Ztable of a SAP Transaction of CK86_99.
    for this, i copied the SAP Standard Transaction into Z tcode and i am trying to poplulate the output display into Ztable. But this standard tcode CK86_99 is using the classes of ALV tree list to display output.
    CL_STRUCTURE_EXPLOSION_TREE -- Class
    CONSTRUCTOR - method
    Finally in the above mentioned method, i am able to see the output values of ALV tree list in the internal table of mt_output_table.
    But these are SAP Standard Class and method.
    My doubt is, How to get these internal table values in my Zprogram.
    is there any user exit or badi can we use in the method of class???? Actually my system is 4.6C
    Please suggest me on this problem.
    Thanks in advance
    KBS Reddy

    First your getInstance() method returns 'singleton' which you havent declared/init anywhere.
    your getAll() method needs to be static if you need to call it the way you are doing.
    In your getAll() method u are passing a parameter called patientRecord ... where have you declared/init it.
    i think you have to do something like this ... if i have understood you correctly.
    /* THIS IS IN YOUR SERVLET*/
    Collections c = database.getAll();
    out.println(C);
    /* YOUR FlatfileDatabase CLASS HAS SOMETHING LIKE THIS*/
    public static FlatfileDatabase getInstance() {
    return new FlatfileDatabase();
    public static Collections getAll() {

  • Using Vlookup over several tables

    Hi I have read the following link
    https://discussions.apple.com/message/16992843#16992843
    I am looking to do something similar.  I have got five tables for 5 different classes.
    Column A has names B-K has results of the kids athletics achievements.
    What I would like to do is find the best person across all tables at each event.  I'm not sure if I can do a direct vlookup as it will be referencing from different tables. 
    Is my best option to create a new table which will show the best person for each event from just one table.
    So basically i will create a new table per class table once I have found out who is best in that single class create another table that has best of all classes and then lookup that way?  Although i'm adding tables it seems an easier way of possibly getting the end result?
    Table 1  = Class 1
    Table 2 = Class 2
    Table 3 = Class 3
    New table = best of class,1,2&3
    New table = best?

    Here's an example of VLOOKUP operating across three tables to find the 'best' 'performance. examples are small, but scaleable. "Best' may be either 'largest' (distance or height events–row 2) or 'smallest' (timed events–row 4). Caveats below.
    Formulas differ only in using MAX or MIN to determine the search value:
    Bis::B2: =MAX(Class A :: A,Class B :: A,Class C :: A)
    Bis::B4: =MIN(Class A :: A,Class B :: A,Class C :: A)
    Lookup formulas are the same in both cases:
    A2: =IFERROR(VLOOKUP(B,Class A :: A:B,2,FALSE),IFERROR(VLOOKUP(B,Class B :: A:B,2,FALSE),(VLOOKUP(B,Class C :: A:B,2,FALSE))))
    A4: =IFERROR(VLOOKUP(B,Class A :: A:B,2,FALSE),IFERROR(VLOOKUP(B,Class B :: A:B,2,FALSE),VLOOKUP(B,Class C :: A:B,2,FALSE)))
    Caveat: Like all Lookup formulas, this one will stop at the first occurrence of the value it is looking for. If more than one student has the 'best' score, only one name will be returned. That's not an insurmountable problem. but it is one that won't be solved using only LOOKUP or one of it's variations.
    Regards,
    Barry

  • CSS Class for Table Cell Text

    When we were using messageStlyedText in a table region, it was shriking multiple whitespaces to a single whitespace. To solve the problem we are planning to use "rawText" with <pre> tag. But we are not able to specify the default CSS class for a table cell text. Can you please let us know the CSS class to use so that even if we use rawText UI(font, size etc) is similar to adjacent messageStlyedText columns ?
    Note: We are not using formattedText because it is not allowing to add prompt.

    Please try using CSS class OraTableCellText
    Thanks
    Abhay

  • Table JAVA$CLASS$MD5$TABLE is not created by loadjava

    When loading a class using loadjava, the table JAVA$CLASS$MD5$TABLE is not created (in the schema where the class is loaded) by the loadjava tool although it should do this according to the doc. Where is this table located?
    The class loads successfully and is skipped when loading a second time. The force option is not used.
    Version is: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit

    IN order for a registered schema to be available to other users the schema must be registered as a GLOBAL, rather than a LOCAL Schema. This is controlled by the third agument passed to registerSChema, and the default is local. Note that you will also need to explicity grant appropriate permissions on any tables created by the schema registration process to other users who will be loading or reading data from these tables.

  • Design question about when to use inner classes for models

    This is a general design question about when to use inner classes or separate classes when dealing with table models and such. Typically I'd want to have everything related to a table within one classes, but looking at some tutorials that teach how to add a button to a table I'm finding that you have to implement quite a sophisticated tablemodel which, if nothing else, is somewhat unweildy to put as an inner class.
    The tutorial I'm following in particular is this one:
    http://www.devx.com/getHelpOn/10MinuteSolution/20425
    I was just wondering if somebody can give me their personal opinion as to when they would place that abstracttablemodel into a separate class and when they would just have it as an inner class. I guess re-usability is one consideration, but just wanted to get some good design suggestions.

    It's funny that you mention that because I was comparing how the example I linked to above creates a usable button in the table and how you implemented it in another thread where you used a ButtonColumn object. I was trying to compare both implementations, but being a newbie at this, they seemed entirely different from each other. The way I understand it with the example above is that it creates a TableRenderer which should be able to render any component object, then it sets the defaultRenderer to the default and JButton.Class' renderer to that custom renderer. I don't totally understand your design in the thread
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=680674
    quite yet, but it's implemented in quite a bit different way. Like I was saying the buttonClass that you created seem to be creating an object of which function I don't quite see. It looks more like a method, but I'm still trying to see how you did it, since it obviously worked.
    Man adding a button to a table is much more difficult than I imagined.
    Message was edited by:
    deadseasquirrels

  • To Use  Cursor or  TYPE table Index by PLS_integer

    Hi All,
    Let's see if I have table with no. of records 19,26,20,000.
    If I want to loop through all the records which will be a optimized way To Use Cursor or TYPE table Index by PLS_integer.
    Please guide.
    Thanks.

    What is it you want to do to/with the rows you're looping through?
    Ideally you want to avoid looping, as that's row by row (aka slow by slow) processing and it's expensive time-wise.
    If you're doing DML (insert/update/delete) then you're best off doing it in one sql statement, rather than looping.

Maybe you are looking for

  • Photoshop CC2014 drawing lag issues...

    Every since the big updates of 2014 (CC, Yosemite), and the ensuing debacle of hardware/software issues, I finally have things working again.  Except for one little caveat: Everytime I restart Photoshop (every morning for the most part), if I don't g

  • How do I view Time Machine from a different Mac?

    Using Pondini's excellent tutorial, I navigated to the Time Machine backups from an earlier Mac (on the same "Time Machine" partition of an external HDD.) First, I was at the level of Macintosh HD/Users, and I could see my earlier Mac's users, but th

  • In CIF post processing notable to see target system

    Hi Gurus,               I am not able to see target system in CIF post processing.Can any one explain me where did i miss my settings? Please let me know it will be really great help Thanks & Regards, Kumar

  • Customize from portlet full-screen

    I am calling a portlet in full-screen view ('STARS3.TEACHERS_CLASS_ROSTER.show'). I would like to give the user the option of customizing the parameters (row order, break etc.). What can I do to give them the option to 'cutomize' these options in ful

  • Problem with cfgrid

    I have a sql statement that returns approximately 300 records back. I add these to the cfgrid and then i add two extra columns for a delete button and edit button... However since it takes quite sometime to loop through it to add the buttons because