How to create a dynamic table (repeating) with static header?

Hello
My purpose is to create a table which should be dynamically filled at runtime depending on the number of elements in the datasource($record.list). If the list is empty, the table shouldn't be displayed at all.
I created a subform which holds a table, ticking "Repeat Subform for each data item" and I set the binding of the table elements to $record.list[*].myelement. This works fine so far.
For the table header I created a second subform with a table having exactly the same size like the other table with text fields that contain the table header texts.
My problem now is that I would like to control the display of the subform which serves as table header row depending on whether $record.list is empty or not.
What's the best way to do this? How can I have access to the datasource for a form?
Thank you very much for your help!!!
Best regards
Bettina Hepp

Hi,
Instead of creating the header row outside the table.
Create it inside the same table as header row.
So when you create a condition then automatically applicable for the header row also.
This is the best option.
Regards,
sasi

Similar Messages

  • How to create a dynamic table region with dynamic VO

    Hi All,
    I have a requirement to create a dynamic table region with a dynamic VO.
    I need this because at runtime only the user will select the table name. So based on that table name, i have to create a table region to display the records.
    I already created a dynamic VO. Could anyone share the code for dynamic table region creation.
    Thanks in Advance.
    Thanks and Regards,
    Myvizhi

    Hi All,
    I have a requirement to create a dynamic table region with a dynamic VO.
    I need this because at runtime only the user will select the table name. So based on that table name, i have to create a table region to display the records.
    I already created a dynamic VO. Could anyone share the code for dynamic table region creation.
    Thanks in Advance.
    Thanks and Regards,
    Myvizhi

  • How to create a dynamic table region with dynamic VO in processFormRequest

    Hi All,
    I have a requirement to create a dynamic table region with a dynamic VO.
    I need this because at runtime only the user will select the table name. So based on that table name, i have to create a table region to display the records.
    I already created a dynamic VO. Could anyone share the code for dynamic table region creation.
    Thanks in Advance.
    Thanks and Regards,
    Myvizhi
    Edited by: Myvizhi Selvi on May 20, 2013 6:21 PM

    Hi,
    You can use following sample code to create advance table columns dynamically with colum groups as well.
    It assumes that you have already created advance table with ID EmpTblRN.
    Below code returns column heading dynamically and if you keep your VO column names and attributes
    same in all the cases (COL1, COL2.....) then you can easily use a loop to create advance table columns.
    It is attaching VO attributes to OAMessageStyledText bean in the last.
    Hope it helps.
    OAAdvancedTableBean advTable = (OAAdvancedTableBean)webBean.findChildRecursive("EmpTblRN");
    Serializable [] param = {currentWindowSeq.toString()};
    Datum[] colHeadingArray = (Datum[])am.invokeMethod("getColumnHeading", param);
    String oldGrpName = null;
    String newGrpName = null;
    OAColumnGroupBean columnGroup = null;
    DictionaryData columnFormat = new DictionaryData();
    columnFormat.put(WIDTH_KEY, "4%");
    for (int i = 0; i < colHeadingArray.length; i++)
    try
    oracle.sql.STRUCT os = (oracle.sql.STRUCT)colHeadingArray;
    Object[] colHeadAttr = os.getAttributes();
    newGrpName = (String)colHeadAttr[0];
    if(newGrpName!=null)
    if(!newGrpName.equals(oldGrpName))
    // Create a column group, create the set the column header,
    // and add the column group under the advanced table
    columnGroup = (OAColumnGroupBean)createWebBean(pageContext, COLUMN_GROUP_BEAN, null, "ColGroup"+i);
    OASortableHeaderBean columnGroupHeader = (OASortableHeaderBean)createWebBean(pageContext, SORTABLE_HEADER_BEAN, null, "ColGroupHeader"+i);
    columnGroupHeader.setText(newGrpName);
    // Retrieve from message dictionary
    columnGroup.setColumnHeader(columnGroupHeader);
    advTable.addIndexedChild(columnGroup);
    oldGrpName = newGrpName;
    // Create a column, create the set the column header, and add the column
    // under the column group
    OAColumnBean column1 = (OAColumnBean)createWebBean(pageContext, COLUMN_BEAN, null, "Column"+i);
    OASortableHeaderBean column1Header = (OASortableHeaderBean)createWebBean(pageContext, SORTABLE_HEADER_BEAN, null, "Column1Header"+i);
    column1Header.setText(colHeadAttr[1].toString());
    column1.setColumnHeader(column1Header);
    column1.setColumnFormat(columnFormat);
    columnGroup.addIndexedChild(column1);
    // Create the actual leaf item under the first column
    OAMessageStyledTextBean leaf1 = (OAMessageStyledTextBean)createWebBean(pageContext, MESSAGE_STYLED_TEXT_BEAN, null, "Leaf"+i);
    //OARawTextBean leaf1 = (OARawTextBean)createWebBean(pageContext, RAW_TEXT_BEAN, null, "Leaf"+i);
    leaf1.setViewAttributeName("Week"+(i+1));
    String destination = "OA.jsp?page=/xxqc/oracle/apps/per/leaveadvance/webui/EmployeeLeaveDetailPG&personId={@PersonId}";
    destination = destination + "&startDate="+colHeadAttr[1].toString()+"-"+(String)colHeadAttr[0];
    destination = destination + "&addBreadCrumb=Y&retainAM=Y";
    leaf1.setDestination(destination);
    OADataBoundValueViewObject cssjob = new OADataBoundValueViewObject(leaf1,"Color"+(i+1));
    //leaf1.setAttributeValue(oracle.cabo.ui.UIConstants.STYLE_CLASS_ATTR, cssjob);
    leaf1.setAttributeValue(UIConstants.RENDERED_ATTR, cssjob);
    column1.addIndexedChild(leaf1);
    catch(Exception e)
    System.out.println("e"+e);

  • How to create a dynamic table were the JTable columns keep varying

    How to create a dynamic table were the JTable columns keep varying based on the input to the jtable

    Oooh, I lied. DefaultTableModel has an API for adding and
    removing columns. I didn't know that. You should have read
    the API.
    As for preferring to extend AbstractTableModel rather than
    DefaultTableModel, I think it's more correct. DefaultTableModel
    is a simple implementation of Abstract for basic cases. It isn't
    intended to be extended. I figure most people extending
    DefaultTableModel are also extending JFrame, JPanel, and Thread
    instead of encapsulating the first two and implementing
    Runnable for the third.

  • How to create a Dynamic table without knowing fieldcat size

    Hi all, i'm trying to insert a (Jointer) of 3 selections form diffrent tables in an other dynamic table but i dont know the size of my final table, so i dont know how to create a fieldcatalog.
    Can we create an internal table with those caractiristics ????

    Hi,
    If you know which fields (ABAP Dictionary) you're selecting then you know their size; use the following FM call: DD_NAMETAB_TO_DDFIELDS
    Then you can use the following method to create your dynamic table: cl_alv_table_create=>create_dynamic_table
    Arash

  • How to create a dynamic table?

    Hello experts!
    I would be very grateful for assistance with a complicated requirement I have gotten.
    I am working within a user exit in BI-IP and one of the parameter in the method is a table (whose structure is dynamic):
    C_TH_DATA     Changing     Type     HASHED TABLE     Transaction Data
    Due to the requirements I have I need to create a table based on the C_TH_DATA table BUT with a few additional fields.
    I have posted my first attempt below (it is syntactically correct).
    Does my approach make sense???
    Grateful for any suggestions.
    Greetings,
    Martin
    method IF_RSPLFA_SRVTYPE_IMP_EXEC_REF~EXECUTE.
      field-symbols:
        <f_ref_data>        type  any,
        <f_interim_data>    type  any,
        <f_new_data>        type  any,
        <f_itab>            type  any table,
        <f_infoprov>        type  RSINFOPROV,
        <f_infoprov_ref>    type  RSINFOPROV,
        <f_ref_data_BCCMP07>  type  any,
        <f_ref_data_BCCMC02>  type  any,
        <f_spc>             type  /bic/oiBHSPC0,
        <f_spc_ref>         type  /bic/oiBHSPC0,
        <f_blcopem1>        type  /bic/oiblcopem1,
        <f_blcopem1_ref>    type  /bic/oiblcopem1,
        <f_blcalpo0>        type  /bic/oiblcalpo0,
        <f_blcalpo0_ref>    type  /bic/oiblcalpo0.
      data:
        l_r_data1            type  ref to data,
        l_r_data2            type  ref to data,
        l_d_sumcostpo        type  f,
        l_d_deltacostpo      type  f,
        l_d_sumdeltacostpo   type  f.
    Generate new (empty record)
      create data l_r_data1 like line of c_th_data.
      assign l_r_data1->* to <f_new_data>.
      TYPES:
        BEGIN OF l_modif_c_th_data,
          l_r_itab    type  ref to data,
          thiscostpo  type  /bic/oiblcopem1,
          thiscostto  type  /bic/oiblcopem2,
          thiscostcm  type  /bic/oiblcopem3,
          thismanpo   type  /bic/oiblmansec1,
          thismanto   type  /bic/oiblmansec2,
          thismancm   type  /bic/oiblmansec3,
        END OF l_modif_c_th_data.
      data:
        l_r_itab    type  ref to data.
      create data l_r_itab type table of l_modif_c_th_data.
      assign l_r_itab->* to <f_itab>.
    Generate new (empty record)
      create data l_r_data2 type l_modif_c_th_data.
      assign l_r_data2->* to <f_interim_data>.

    Hi marcin,
    thanks for your answer.
    Im trying your examples ( /people/marcin.pciak/blog/2010/09/09/do-you-really-know-everything-about-typing--part-2 ) but your example dumps.
    DATA gr_elemdescr_p   TYPE REF TO cl_abap_elemdescr.
    DATA gr_elemdescr_i   TYPE REF TO cl_abap_elemdescr.
    DATA: gt_components   TYPE cl_abap_structdescr=>component_table,
            wa_component    LIKE LINE OF gt_components.
      DATA: gr_structdescr  TYPE REF TO cl_abap_structdescr.
      wa_component-name = 'HEADCOUNT'.
      wa_component-type = gr_elemdescr_i.
      APPEND wa_component TO gt_components.
      wa_component-name = 'CAPACITY'.
      wa_component-type = gr_elemdescr_p.
      APPEND wa_component TO gt_components.
      gr_structdescr = cl_abap_structdescr=>create( gt_components ).  <= causes error CX_SY_STRUCT_COMP_TYPE
    DATA gr_data TYPE REF TO data.
      CREATE DATA gr_data TYPE HANDLE gr_structdescr.
    I suspect Im doin something wrong.

  • How to create a dynamic screen (play with containers !) ?

    Hello,
    Here is the screen I want to do (one splitter with two containers) :
    |                               
    |    | button 1 |          | button 2 |             
    |________________________________________
    |                                                                          
    |                                                                          
    |         My_container                            
    |                                                                          
    |________________________________________
    I would like to perform these actions :
    - click on button 1 : an ALV (cl_gui_alv_grid) is displayed in "my_container"
    - click on button 2 : an html document (CL_DD_DOCUMENT) is displayed in "my_container"
    The first action is always a success : if I click on button 1 or 2 the corresponding object is correctly displayed in my container.
    But the second action always failed if I click on another button : nothing happens.
    Example :
    1- I click on button 1 : my alv appears
    2- I click on button 2 : nothing happens, I can see that contents of my containers have been changed (in debug) but my screen is not updated.
    I tried to free my container with call method or "free" instruction but it's not working.
    Do you have any idea ?
    I can send my code if it could help.
    Thanks,
    Simon
    Edited by: Simon Desbonnets on Dec 1, 2010 9:20 AM

    Hello,
    Ok here is another code : one docking container with two buttons. One click on a button update the main screen to show either an alv, either a cl_dd_document (I used your code, you could be able to run it quickly):
    First part : class, perofrms and declarations :
    DATA: it_sbook      TYPE TABLE OF sbook,
          it_sflight    TYPE TABLE OF sflight,
          alv          TYPE REF TO cl_gui_alv_grid,
          doc_container TYPE REF TO cl_gui_custom_container,
          document      TYPE REF TO cl_dd_document,
          docking               TYPE REF TO cl_gui_docking_container.
    *       CLASS cl_my_event_handler DEFINITION
    CLASS cl_my_event_handler DEFINITION.
      PUBLIC SECTION.
        METHODS:
          handle_submit_buttons FOR EVENT clicked OF cl_dd_button_element
                                                           IMPORTING sender.
    ENDCLASS.                    "cl_my_event_handler DEFINITION
    *       CLASS cl_my_event_handler IMPLEMENTATION
    CLASS cl_my_event_handler IMPLEMENTATION.
      METHOD handle_submit_buttons.
        CASE sender->name.
          WHEN 'BUT1'.
            CALL METHOD doc_container->set_visible
              EXPORTING
                visible = 'X'
              EXCEPTIONS
                OTHERS  = 3.
            CALL METHOD alv->set_visible
              EXPORTING
                visible = space
              EXCEPTIONS
                OTHERS  = 3.
          WHEN 'BUT2'.
            CALL METHOD doc_container->set_visible
              EXPORTING
                visible = space
              EXCEPTIONS
                OTHERS  = 3.
            CALL METHOD alv->set_visible
              EXPORTING
                visible = 'X'
              EXCEPTIONS
                OTHERS  = 3.
        ENDCASE.
      ENDMETHOD.                    "handle_submit_buttons
    ENDCLASS.                    "cl_my_event_handler IMPLEMENTATION
    DATA: my_handler TYPE REF TO cl_my_event_handler.
    *&      Form  create_ctrl_panel
    *       Create 2 buttons in the docking container
    FORM create_ctrl_panel .
      DATA button1 TYPE REF TO cl_dd_button_element.
      DATA button2 TYPE REF TO cl_dd_button_element.
      DATA : dd_doc_btn TYPE REF TO cl_dd_document,
             form_btn TYPE REF TO cl_dd_form_area.
      CREATE OBJECT dd_doc_btn.
      CALL METHOD dd_doc_btn->add_form
        IMPORTING
          formarea = form_btn.
      CALL METHOD form_btn->add_button
        EXPORTING
          label  = 'Button 1'
          name   = 'BUT1'
        IMPORTING
          button = button1.
      SET HANDLER my_handler->handle_submit_buttons FOR button1.
      CALL METHOD form_btn->add_button
        EXPORTING
          label  = 'Button 2'
          name   = 'BUT2'
        IMPORTING
          button = button2.
      SET HANDLER my_handler->handle_submit_buttons FOR button2.
      CALL METHOD dd_doc_btn->merge_document.
      CALL METHOD dd_doc_btn->display_document
        EXPORTING
          parent             = docking
        EXCEPTIONS
          html_display_error = 1
          OTHERS             = 2.
    ENDFORM.                    " Create_ctrl_panel

  • Creating a Dynamic table

    Could anyone please help me,
    how to create a dynamic table. That is a table where the user can insert his own text.
    thanks

    Well quicly you can create a jtable whose fields in each columns are editable.
    I use sun's forte to do that.

  • How to create a Dynamic Datatable with sorting functioanlity

    Hi,
    I am new to JSF and need some help can some one please tell me how to create a dynamic datatable with sorting functionality. I am reading data data from a database table and wants to build the datatable dynamically based on the columns returned. I know how to created a datatble with a fixed number of columns but can't figure out how to create a datatable dynamically with sort functionality. Any small example will help.
    Thanks

    Hi,
    Here is what I have so far and can't figure out how to add the sorting functionality. Any help is appreciated.
    Managed Bean:
    private List<MyDto> data ;
        public HtmlDataTable getDataTableOne ()
            if ( dataTableOne == null )
                populateCheckBoxes () ; // Preload.
                populateDynamicDataTableOne () ;
            return dataTableOne ;
        public void populateCheckBoxes ()
            data = new ArrayList<MyDto> () ;
            MyDto myDto1 = new MyDto () ;
            MyDto myDto2 = new MyDto () ;
            MyDto myDto3 = new MyDto () ;
            MyDto myDto4 = new MyDto () ;
            myDto1.setChecked ( true ) ;
            myDto1.setValue ( "myDto1" ) ;
            myDto2.setChecked ( false ) ;
            myDto2.setValue ( "myDto2" ) ;
            myDto3.setChecked ( false ) ;
            myDto3.setValue ( "myDto3" ) ;
            myDto4.setChecked ( true ) ;
            myDto4.setValue ( "myDto4" ) ;
            data.add ( myDto1 ) ;
            data.add ( myDto2 ) ;
            data.add ( myDto3 ) ;
            data.add ( myDto4 ) ;
        public void populateDynamicDataTableOne ()
            dataTableOne = new HtmlDataTable () ;
            UIOutput header = new UIOutput () ;
            header.setValue ( "" ) ;
            UIColumn tableColumn ;
            tableColumn = new UIColumn () ;
            HtmlOutputText textHeader = new HtmlOutputText () ;
            textHeader.setValue ( "" ) ;
            tableColumn.setHeader ( textHeader ) ;
            HtmlSelectBooleanCheckbox tCheckBox = new HtmlSelectBooleanCheckbox () ;
            tCheckBox.setValueBinding ( "value" , FacesContext.getCurrentInstance ().getApplication ().createValueBinding ( "#{row.checked}" ) ) ;
            tableColumn.getChildren ().add ( tCheckBox ) ;
            // Set output.
            UIOutput output = new UIOutput () ;
            ValueBinding myItem = FacesContext.getCurrentInstance ().getApplication ().createValueBinding ( "#{row.value}" ) ;
            output.setValueBinding ( "value" , myItem ) ;
            // Set header (optional).
            UIOutput header2 = new UIOutput () ;
            header2.setValue ( "" ) ;
            UIColumn column = new UIColumn () ;
            column.setHeader ( header2 ) ;
            column.getChildren ().add ( output ) ;
            dataTableOne.getChildren ().add ( tableColumn ) ;
            dataTableOne.getChildren ().add ( column ) ;
    MyDto.java
    public class MyDto
        private Boolean checked;
        private String value;
        public MyDto ()
        public void setChecked ( Boolean checked )
            this.checked = checked;
        public Boolean getChecked ()
            return checked ;
        public void setValue ( String value )
            this.value = value;
        public String getValue ()
            return value ;
    JSP
    <h:dataTable id="table" value="#{myRequestBean.data}" binding="#{myRequestBean.dataTableOne}" var="row" />Thanks

  • How to create an internal table with fields from different sources

    Hi.
    I need to create an internal table where some of the fields are from a database table, and the other fields are user specified. How do i do that?
    Example:
    DB table ZTAB with fields ZTAB-FIELD1, ZTAB-FIELD2.
    I want to create an internal table ITAB with the fields ZTAB-FIELD1, ZTAB-FIELD2 from ZTAB. In addition, I also want to have one more field RECORD_NO, which is not from ZTAB. How do I do it? Could I do something like below?
    DATA BEGIN OF ITAB.
            INCLUDE STRUCTURE ZTAB.
    DATA RECORD_NO TYPE I.
    DATA END OF UPLINE.
    Or, are there more efficient way of doing it? Thanks.

    hi KIan,
    go:
    general type
    TYPE : BEGIN OF ty_itab,
               field1 TYPE ztab-field1,
               field2 TYPE ztab-field2,
    *your own fields here:
               field TYPE i,
               field(30) TYPE c,
               END OF ty_itab.
    work area
    DATA : gw_itab TYPE ty_itab.
    internal table
    DATA : gt_itab TYPE TABLE OF ty_itab.
    hope this helps
    ec

  • How to create user editable Crystal Report with dynamic dataset

    What I would like to achieve:
    A program loads a report in runtime updates list of database fields (possibly includes sample data), open report in "Crystal Reports 2011" (or 2008) where user customizes report and saves it. Later on the program loads the report, fills actualized data and displays it in .net report viewer.
    What I do:
    CrReport = New CrystalDecisions.CrystalReports.Engine.ReportDocument
    CrReport.Load(TemplateFilename)
    Dim Results As DataTable
    DataTable is filled from a database
    CrReport.SetDataSource(mResults)
    CrReport.SaveAs(NewReportPath, True)
    The NewReportPath is opened in the default program.
    What are the problems
    The report is open in preview mode (not in design).
    When the field is added to the report the designer asks for XML datasource on preview.

    The short answer is that it is not possible. I broke the question to other two: How to save a report that it opens without preview? and How to create user editable Crystal Report with dynamic dataset, where it is possible to find details. Key answer is Re: How to create an editable previewable report?

  • How to create database and table with GUI?

    How to create database and table with GUI?
    for linux can do that?
    or have only way to create table by use sql*plus.
    everyone please help me.
    thanks

    go to www.orasoft.org
    here is a gui tool.
    null

  • How to create a cutoms table with a heading

    Dear Freinds,
    I have a requirement where i have to create the Custom as below .........my functional is
    saying that he want table as below
                                              outpatient  
    employeeno
    class
    startdate
    enddate
    spouse
    1stchild
    2nchild
    How can we create like this table having outpatient  as heading
    and a fields  as
    employeeno , class,startdate,enddate,spouse,1stchild,2ndchild
    how can we create in a custom table..... i have never seenlike the above requiremnt.
    Please suggest me how to create. I can send the Excel sheet where they have given the above requiremnt...... plelase any body can suggest me so that i can your personnel id's . Pleast a bit urgent.
    regards
    syamala

    While waiting to hear back, I was able to write the query results from an outside Oracle server, to a table on the local SQL Server, and do the LEFT OUTER JOIN required for the final query and report to work.  That was with this syntax:
    <CFQUERY name="AddTableRecords" datasource="MyTable">
    TRUNCATE TABLE ITE_Temp
    <CFOUTPUT query="ITE2">
    INSERT INTO ITE_Temp
    (FullFile,EmployeeCount,DTL_Amount,EmployeeType,station)
    VALUES
    ('#TrueFile#', #CountOfEmployee#, #DTL_SUBTOT#, '#EMPTYPE#', '#ARPT_CD#')
    </CFOUTPUT>
    </CFQUERY>
    However, I was not able to write to a temporary table AND read the results. I got the syntax to run to write the above results to a temporary table.  But when I tried to read and output the results from the temp table, I got an error.  Also, it wouldn't take the single "#" (local) only the global "##" table var, using this syntax.  Note that if I didn't have the DROP TABLE in the beginning, the 2nd time you run this query, you get an error telling you the table already exists.
    <CFQUERY name="ITE_Temp2" datasource="MyTable">
    DROP TABLE ##MyTemp2
    CREATE TABLE ##MyTemp2
    FullFile char (7) NOT NULL,
    EmployeeCount int NULL,
    DTL_Amount decimal NULL,
    EmployeeType char (3) NULL,
    station char (3) NULL
    <CFOUTPUT query="ITE2">
    INSERT INTO ##MyTemp2 VALUES
    '#ITE2.TrueFile#',
    #ITE2.CountOfEmployee#,
    #ITE2.DTL_SUBTOT#,
    '#ITE2.EMPTYPE#',
    '#ITE2.ARPT_CD#'
    </CFOUTPUT>
    </CFQUERY>
    So even though the above works, I could use some help in reading/writing the output.  I've tried several things similar to below, but they don't work.  It't telling me ITE_Temp2 does not exist.  It's not easy to find good examples of creating temporary tables in SQL Server.
    <CFQUERY name="QueryTest2" datasource="SkynetSQL">
    SELECT *
    FROM ITE_Temp2
    </CFQUERY>
    <CFOUTPUT query="ITE_Temp2">
    Output from Temp Table<br>
    <p>FullFile: #FullFile#, EmployeeCount: #EmployeeCount#</p>
    </CFOUTPUT>
    Thanks for any help/advice.
    Gary.

  • How to create a transparent table(z table) dynamically

    Hi,
    Can anyone explain me how to create a transparent table(z table) dynamically in the program.
    Any function module or suggestions welcome.

    Hi Mithun
                 we will not create transparent table in the program . you could do it by using native SQL in the ABAP Program . the sample is show in below .
    This is a sample that show how to connect to Database directly and can use the native SQL to select , create or delete table.
    PARAMETERS dbs TYPE dbcon-con_name default 'SDB'.
    DATA carrid_wa TYPE scarr-carrid.
    DATA lv_int  TYPE i.
    *Types
    data: begin of ty_equi,
    equipment(25) type c,
    SERIALENERGY(25) type c,
    end of ty_equi.
    *Internal Tables
    data it_equi like table of ty_equi.
    data wa_equi like line of it_equi.
    DATA dbtype TYPE dbcon_dbms.
    SELECT SINGLE dbms
           FROM dbcon
           INTO dbtype
           WHERE con_name = dbs.
    IF dbtype = 'ORA'.
      TRY.
          EXEC SQL.
            CONNECT TO :dbs
          ENDEXEC.
          IF sy-subrc <> 0.
            RAISE EXCEPTION TYPE cx_sy_native_sql_error.
          ENDIF.
          EXEC SQL.
            OPEN dbcur FOR
              SELECT
                     EQUIPMENT,
                     SERIALENERGY
                     FROM emd.meter
          ENDEXEC.
          DO.
            EXEC SQL.
              FETCH NEXT dbcur INTO :wa_EQUI
            ENDEXEC.
            IF sy-subrc <> 0.
              EXIT.
            ELSE.
              WRITE: /
              wa_equi-equipment,
              wa_equi-SERIALENERGY.
            ENDIF.
          ENDDO.
          EXEC SQL.
            CLOSE dbcur
          ENDEXEC.
          EXEC SQL.
            DISCONNECT :dbs
          ENDEXEC.
        CATCH cx_sy_native_sql_error.
          MESSAGE `Error in Native SQL.` TYPE 'I'.
      ENDTRY.
    ENDIF.
    Regards
    Wiboon

  • How to use JSTL create a dynamic table according to a database???

    How to use JSTL create a dynamic table according to a database in a web page? Who can help me? Thanks.

    How to use JSTL create a dynamic table according to a
    database in a web page? Who can help me? Thanks.???
    Could you rephrase your quesion?
    Do you want to display records by reading from a table in DB?

Maybe you are looking for