How to create a table dynamically in webdynpro

hai everybody
in webdynpro we know how to create at design time
but i want to create it at runtime that is dynmamically i want to set the rows and coloums of the table at run time
Thanks & Regards
sravan

I guess this should work,
Suppose you want to dynamically create a Table (say Category) having a column called Category Code, then in the wdDoModifyView() hook method, just add the following code snippet,
if (firstTime) {
//Create the Table UI Element
IWDTable table = (IWDTable) view.createElement(IWDTable.class, null);
//Set the Table Header
IWDCaption tableCaption = (IWDCaption) view.createElement(IWDCaption.class, null);
tableCaption.setText("Category Table Contents");
table.setHeader(tableCaption);
//Create and add a Column UI element for the above table     
IWDTableColumn column = (IWDTableColumn) view.createElement(IWDTableColumn.class, null);
table.addColumn(column);
//Set the required column header using the caption (Category Code here)                         
IWDCaption caption = (IWDCaption) view.createElement(IWDCaption.class, null);
caption.setText("Category Code");
column.setHeader(caption);
//Create a TableCellEditor and bind it to an attribute of the Category Node in the context     
IWDTextView editor = (IWDTextView) view.createElement(IWDTextView.class, null);
editor.bindText("tb_Category.cat_code");
column.setTableCellEditor(editor);
//Finally add the Table UI element to the view          
IWDUIElementContainer root = (IWDUIElementContainer) view.getRootElement();
root.addChild(table);
You need to follow the same procedure for adding multiple columns to the table.
Hope this answers your question!
Regards
Kishan

Similar Messages

  • How to create alv table dynamically by performing action on the button.

    Hi all,
    my requirement is to create alv table dynamically.
    that is i will create two buttons
    1) show alv table
    2) close alv table
    if user selects show alv table then the alv table should be displayed.
    and if user selects clsoe alv table then the alv table should be closed.
    to create alv table dynamically  i have followed this procedure.
    under view properties i have added salv_wd_table component. then under the action of showalvbutton i went to code wizard and i have selected instantiate used component component use salv_wd_table. the following code will be generated
    with this code i am unable to display alv table dynamically correct me where i went wrong kindly send me the necessary steps how to create alv table dynamically
    data lo_cmp_usage type ref to if_wd_component_usage.
    lo_cmp_usage =   wd_this->wd_cpuse_salv_wd_table( ).
    if lo_cmp_usage->has_active_component( ) is initial.
      lo_cmp_usage->create_component( ).
      endif.
    to close table i have used the following code. with this code i am able to achieve the functionality to delete the alv table
    data lo_cmp_usage type ref to if_wd_component_usage.
    lo_cmp_usage =   wd_this->wd_cpuse_salv_wd_table( ).
    if lo_cmp_usage->has_active_component( ) is initial.
      else.
      lo_cmp_usage->Delete_component( ).
    endif.
    Thanks & Regards,
    Naveen
    Edited by: naveen.webhelp on Feb 10, 2011 5:52 AM

    Hi
    ALV table will be shown in the viewcontainerUI element.
    it is shown there empty if you dont fill the node bound to the data node of the interface controller of the comp usage
    SALV_WD_TABLE.
    and if you are not getting the table filled in the first place.
    then check have you mapped the DATA node to some node in the comp controller
    wht basically is your requirment is that you want to show ALV gird on click of one button and delete it on click of other button.
    there are many ways to do so.
    best way is control the visiblity of the viewcontainer UI element which containes the TABLE view of SALV_WD_table comp.
    create an attribute of type WDUI_VISIBILITY name say VIS.
    now go to the layout and bound hte visible property of the viewcontainer to this attribute VIS.
    then in the showalv grid button's eventhandler write
    wd_context->set_attribute(
    name = 'VIS'
    value = '02'
    and in the wddoinit and delete alv grid button's event handler write
    wd_context->set_attribute(
    name = 'VIS'
    value = '01'
    thanks
    sarbjeet singh

  • How to create internal table dynamically based on a table entry

    hi Experts,
      I have table yprod_cat. It has product categories.
      In my ABAP program I need to create internal table dynamically based on the number of entries in the table.
      For example:
      If the table has 3 entries for product category
      1. Board
      2. Micro
      3. Syst
    Then create three (3) internal tables.
    i_board
    i_micro
    i_syst
    How can we do this? Any sample code will be very usefull
    Thanks & Regards
    Gopal
    Moderator Message: No sample codes can be given. Please search for them or work it!
    Edited by: kishan P on Jan 19, 2011 4:22 PM

    Our APEX version is 4.2We are using below SQL query to display radio groups dynamically..
    SELECT APEX_ITEM.RADIOGROUP (1,deptno,'20',dname) dt
    FROM dept
    ORDER BY 1;
    Created a form using SQL type and given abouve SQL query as source.. But when we run the page, there were no radio groups displayed in the page..
    Below is the output of the query..
    <input type="radio" name="f01" value="10" />ACCOUNTING
    <input type="radio" name="f01" value="20" checked="checked" />RESEARCH
    <input type="radio" name="f01" value="30" />SALES
    <input type="radio" name="f01" value="40" />OPERATIONS
    >
    If Tabular Form:
    Edit Region > Report Attributes > Edit Column > Change the Column type to "Standard Report Column"
    If normal Page Item:
    Edit Page Item > Security > Escape special characters=No.
    Pl read the help on that page item to understand the security risk associated with =NO.
    Cheers,
    Edited by: Prabodh on Dec 3, 2012 5:59 PM

  • How to create a table dynamically

    Hello All,
    I want to create a table dynamically in DDIC. I know that there is function module exist DB_CREATE_TABLE but i am getting some errors while using it.
    Could any please post some code for it.
    Regards,
    Lisa

    Here is the code i have writen my self.
    PARAMETERS: tabname TYPE dd02l-tabname,
                fldname TYPE dd03p-fieldname,
                rollname TYPE dd03p-rollname.
    DATA: gt_cl_bc_dyn TYPE REF TO zcl_bc_dyn,
          status TYPE sy-subrc.
    data: lct_table type ZTT_ZTSITAB.
    INITIALIZATION.
      tabname = 'ZTEST1'.
      CREATE OBJECT gt_cl_bc_dyn.
    START-OF-SELECTION.
      CALL METHOD gt_cl_bc_dyn->create_table
        EXPORTING
          tabname   = tabname
          fieldname = fldname
          rollname  = rollname
          itab      = lct_table
        IMPORTING
          status    = status    .
      IF status = 0.
        WRITE: 'Table creation is successful'.
      ELSE.
        WRITE: 'Table creation is unsuccessful'.
      ENDIF.
    Code in the method
    METHOD create_table.
      DATA: ls_dd02v_wa TYPE dd02v,
            ls_dd09l_wa TYPE dd09l,
            ls_dd03p TYPE dd03p,
            lt_dd03p TYPE TABLE OF dd03p,
            rc TYPE sy-subrc.
      ls_dd02v_wa-tabname = tabname.
      ls_dd02v_wa-tabclass = 'TRANSP'.
      ls_dd02v_wa-contflag = 'A'.
      ls_dd09l_wa-tabname = tabname.
      ls_dd09l_wa-tabkat = '0'.
      ls_dd09l_wa-tabart = 'APPL0'.
      ls_dd03p-tabname = tabname.
      ls_dd03p-fieldname = fieldname.
      ls_dd03p-position = '0001'.
      ls_dd03p-keyflag = 'X'.
      ls_dd03p-rollname = rollname.
      APPEND ls_dd03p TO lt_dd03p.
      CALL FUNCTION 'DDIF_TABL_PUT'
        EXPORTING
          name                    = tabname
         dd02v_wa                = ls_dd02v_wa
         dd09l_wa                = ls_dd09l_wa
       TABLES
         dd03p_tab               = lt_dd03p
       EXCEPTIONS
         tabl_not_found          = 1
         name_inconsistent       = 2
         tabl_inconsistent       = 3
         put_failure             = 4
         put_refused             = 5
         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.
      CALL FUNCTION 'DDIF_TABL_ACTIVATE'
        EXPORTING
          name              = tabname
       IMPORTING
         rc                = rc
       EXCEPTIONS
         not_found         = 1
         put_failure       = 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.
      status = rc.
    ENDMETHOD.

  • How to create internal table dynamically?

    hi all
    I have a particular internal table in memory area( thru EXPORT TO MEMORY ID ....)
    how can i create an internal table of this type in another program at runtime  ?
    this internal table need not be a data dictionary type.
    i.e., i need to create an internal table of type which
    is stored in a particular memory-id.
    Regards,
    Naveen........
    null

    Hi,
    Check this code :
    TYPE-POOLS: slis.
    FIELD-SYMBOLS: <t_dyntable> TYPE STANDARD TABLE, 
                    <fs_dyntable>,                    
                    <fs_fldval> type any.             
    PARAMETERS: p_cols(5) TYPE c.   
    DATA:        t_newtable TYPE REF TO data,
                 t_newline  TYPE REF TO data,
                 t_fldcat   TYPE slis_t_fldcat_alv,
                 t_fldcat   TYPE lvc_t_fcat,
                 wa_it_fldcat TYPE lvc_s_fcat,
                 wa_colno(2) TYPE n,
                 wa_flname(5) TYPE c. 
    * Create fields .
      DO p_cols TIMES.
        CLEAR wa_it_fldcat.
        move sy-index to wa_colno.
        concatenate 'COL'
                    wa_colno
               into wa_flname.
        wa_it_fldcat-fieldname = wa_flname.
        wa_it_fldcat-datatype = 'CHAR'.
        wa_it_fldcat-intlen = 10.
        APPEND wa_it_fldcat TO t_fldcat.
      ENDDO. 
    * Create dynamic internal table and assign to FS
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = t_fldcat
        IMPORTING
          ep_table        = t_newtable. 
      ASSIGN t_newtable->* TO <t_dyntable>. 
    * Create dynamic work area and assign to FS
      CREATE DATA t_newline LIKE LINE OF <t_dyntable>.
      ASSIGN t_newline->* TO <fs_dyntable>.
    DATA it_fieldcatalog TYPE lvc_t_fcat.
    DATA lr_table TYPE REF TO data.
    FIELD-SYMBOLS <lt_table> TYPE table.
    *-- Import the fieldcatalog
    IMPORT it_fieldcatalog TO it_fieldcatalog
           FROM MEMORY ID 'CREATE_DYNAMIC_TABLE'.
    IF sy-subrc <> 0.
      EXIT.
    ENDIF.
    *-- Create the dynamic table with the field catalog as structure
    CALL METHOD cl_alv_table_create=>create_dynamic_table
      EXPORTING
        it_fieldcatalog           = it_fieldcatalog
      IMPORTING
        ep_table                  = lr_table
      EXCEPTIONS
        generate_subpool_dir_full = 1
        OTHERS                    = 2.
    IF sy-subrc <> 0.
      EXIT.
    ENDIF.
    *-- Convert the reference into a table
    ASSIGN lr_table->* TO <lt_table>.
    IF sy-subrc <> 0.
      EXIT.
    ENDIF.
    *-- Export the created table so that the function module can import it
    EXPORT lt_table FROM <lt_table>
           TO MEMORY ID 'CREATE_DYNAMIC_TABLE'.
    Regards
    L Appana

  • How to Create a Table Component Dynamically based on the Need

    Hello all,
    I have a problem i need to create dynamically tables based on the no of records in the database. How can i create the table object using java code.
    Please help.

    Winston's blog will probably be helpful:
    How to create a table component dynamically:
    http://blogs.sun.com/roller/page/winston?entry=creating_dynamic_table
    Adding components to a dynamically created table
    http://blogs.sun.com/roller/page/winston?entry=dynamic_button_table
    Lark
    Creator Team

  • How to create a table to use in webdynpro ABAP

    Hi Guys,
    Can anybody let me know how to create a table to use in webdynpro ABAP. I am new to ABAP. It would appreciable if i get useful answer.  Thanks In Advance
    Regards
    Ravi

    Hi! You can use transaction code SE11.  Please refer to http://help.sap.com/saphelp_nw70/helpdata/en/6c/f2934259a5c66ae10000000a155106/frameset.htm
    Please note that table name should start with 'Y' or 'Z' - by SAP naming conventions object names starting with 'Y' and 'Z' are reserved for customer application development.
    Please reward points if helpful

  • Can we create internal table dynamically ? how?

    hi to all experts,
                           can we create internal table dynamically ? how?plz explain me with an example.Anybody with good example  will be rewarded.it was asked in an interview what the answer for it

    HI
    Yes you can create
    see this
    /people/rich.heilman2/blog/2005/07/27/dynamic-internal-tables-and-structures--abap
    JUST USE THIS CODE AND DO THE ESSENTIAL CHANGES ACCORDING TO YOU
    STEP: 1 - get backend field catalog (currently displayed alv)
    CLEAR: tl_fieldcatalog. REFRESH: tl_fieldcatalog.
    CALL METHOD w_grid->get_backend_fieldcatalog
    IMPORTING
    et_fieldcatalog = tl_fieldcatalog.
    STEP: 2 - create a new fieldcatalog for dynamic internal table
    CLEAR: sl_fieldcatalog.
    CLEAR: t_outtab_fieldname. REFRESH: t_outtab_fieldname.
    CLEAR: tl_fieldcatalog_new. REFRESH: tl_fieldcatalog_new.
    CLEAR: t_download_fieldname. REFRESH: t_download_fieldname.
    CLEAR: t_download_fieldheading. REFRESH: t_download_fieldheading.
    LOOP AT tl_fieldcatalog INTO sl_fieldcatalog.
    STEP: 2.1 - populate data in T_OUTTAB_FIELDNAME
    APPEND sl_fieldcatalog-fieldname TO t_outtab_fieldname.
    STEP: 2.2 - populate TL_FIELDCATALOG_NEW & T_DOWNLOAD_FIELDNAME
    IF sl_fieldcatalog-no_out EQ ''.
    IF sl_fieldcatalog-fieldname NE 'STATUS'
    OR sl_fieldcatalog-fieldname NE 'MESG_STATUS'
    OR sl_fieldcatalog-fieldname NE 'ZLOCK'
    OR sl_fieldcatalog-fieldname NE 'T_PLANT'
    OR sl_fieldcatalog-fieldname NE 'T_CSR'.
    If field is COMM_PLANT, change its length
    IF sl_fieldcatalog-fieldname EQ 'COMM_PLANT'.
    sl_fieldcatalog-outputlen = 1800.
    sl_fieldcatalog-intlen = 1800.
    sl_fieldcatalog-dd_outlen = 1800.
    ENDIF. "comm_plant
    sl_fieldcatalog_new = sl_fieldcatalog.
    APPEND sl_fieldcatalog_new TO tl_fieldcatalog_new.
    APPEND sl_fieldcatalog-fieldname TO t_download_fieldname.
    APPEND sl_fieldcatalog-scrtext_l TO t_download_fieldheading.
    CLEAR: sl_fieldcatalog, sl_fieldcatalog_new.
    ENDIF.
    ENDIF.
    ENDLOOP.
    STEP: 3 - create dynamic internal table
    FREE: ref_download.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
    EXPORTING
    I_STYLE_TABLE =
    it_fieldcatalog = tl_fieldcatalog_new
    IMPORTING
    ep_table = ref_download
    E_STYLE_FNAME =
    EXCEPTIONS
    generate_subpool_dir_full = 1
    OTHERS = 2
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ASSIGN ref_download->* TO <ft_download>.
    CREATE DATA ref_wa LIKE LINE OF <ft_download>.
    ASSIGN ref_wa->* TO <fs_download>.
    STEP: 4 - populate data in dynamic internal table
    LOOP AT t_outtab INTO wa_outtab.
    LOOP AT t_download_fieldname.
    ASSIGN COMPONENT t_download_fieldname OF STRUCTURE
    <fs_download> TO <fs_download_field>.
    IF t_download_fieldname-field EQ 'COMM_PLANT'.
    STEP: 4.1 - get long text from database table
    CLEAR: wal_table.
    SELECT SINGLE * FROM zshaven_plnt_txt
    INTO wal_table
    WHERE vbeln = wa_outtab-vbeln
    AND posnr = wa_outtab-posnr
    AND del_no = wa_outtab-del_no
    AND del_itm = wa_outtab-del_itm.
    IF sy-subrc EQ 0.
    STEP: 4.2 - break long-text into separate lines
    CLEAR: tl_text. REFRESH: tl_text.
    SPLIT wal_table-plant_comm
    AT '~'
    INTO TABLE tl_text.
    STEP: 4.3 - Combine these separate lines with space in
    between two lines
    CLEAR: wal_text, final_text.
    LOOP AT tl_text INTO wal_text.
    IF final_text IS INITIAL.
    final_text = wal_text.
    ELSE.
    CONCATENATE final_text '-' wal_text
    INTO final_text.
    REPLACE '-' WITH ' ' INTO final_text.
    ENDIF.
    ENDLOOP.
    STEP: 4.4 - move long text to work-area
    <fs_download_field> = final_text.
    ENDIF. "subrc
    ELSE. "t_download_fieldname
    READ TABLE t_outtab_fieldname
    WITH KEY field = t_download_fieldname-field.
    ASSIGN COMPONENT t_outtab_fieldname-field OF STRUCTURE
    wa_outtab TO <fs_outtab_field>.
    <fs_download_field> = <fs_outtab_field>.
    ENDIF.
    ENDLOOP.
    STEP: 4.5 - Move data from work-area to dynamic internal table
    APPEND <fs_download> TO <ft_download>.
    CLEAR: <fs_download>.
    ENDLOOP.
    STEP: 5 - download
    CALL FUNCTION 'DOWNLOAD'
    EXPORTING
    filename = 'C:\zshaven.xls'
    filetype = 'DAT'
    filetype_no_show = 'X'
    filetype_no_change = 'X'
    TABLES
    data_tab = <ft_download>
    fieldnames = t_download_fieldheading
    EXCEPTIONS
    invalid_filesize = 1
    invalid_table_width = 2
    invalid_type = 3
    no_batch = 4
    unknown_error = 5
    gui_refuse_filetransfer = 6
    customer_error = 7
    OTHERS = 8.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.

  • How to create a table component dynamically in netbeans 6.0 (JSF 1.2)?

    How to create a table component dynamically in netbeans 6.0 (JSF 1.2)?
    This example http://developers.sun.com/jscreator/reference/techart/2/createTableDynamically.html works only with JSF 1.1.

    Please help my write correct code.
    How to replace this strings for run example?
    rowGroup.setValueBinding("sourceData", getApplication().createValueBinding("#{Page1.tripDataProvider}"));
    staticText1.setValueBinding("text", getApplication().createValueBinding("#{currentRow.value['TRIP.TRIPID']}"));

  • How to create a table,columns,rows dynamically

    Hi All,
    I would like to build an application which takes from date and to date as inputs and click on button it should create a table dynamically in the following format( rows - project Act1,Service Act2 etc....columns dates and total should be display rowwise and columnwise)
    From 06.22.2009            To 06.23.2009    Go(button)
                          06.22.2009 06.23.2009    Total
    Project act1    2                  2                  4
    Project Act2
    Service Act1    3               3                    6
    Total               5                5
    How do i build this application
    I should have ALV capability so that I can download.
    Thanks
    Bala Duvvuri
    Edited by: Bala Duvvuri on Jun 23, 2009 5:21 AM
    Edited by: Bala Duvvuri on Jun 23, 2009 5:22 AM
    Edited by: Bala Duvvuri on Jun 23, 2009 5:25 AM

    DATA lo_table_settings TYPE REF TO if_salv_wd_table_settings.
      DATA lo_standard_functions TYPE REF TO if_salv_wd_std_functions.
      DATA lo_column_settings TYPE REF TO if_salv_wd_column_settings.
      DATA lo_column TYPE REF TO cl_salv_wd_column.
      DATA lo_column_hdr TYPE REF TO cl_salv_wd_column_header.
      lo_table_settings ?= lo_table.
      lo_table_settings->set_selection_mode( cl_wd_table=>e_selection_mode-auto ).
      lo_table_settings->set_cell_action_event_enabled( value = abap_true ).
      lo_table_settings->set_width( value = '100%' ).
    set default ALV Functions off
      lo_standard_functions ?= lo_table.
    lo_standard_functions->set_sort_headerclick_allowed( abap_false ).
      lo_standard_functions->set_filter_filterline_allowed( abap_false ).
      lo_standard_functions->set_filter_complex_allowed( abap_true ).
      lo_standard_functions->set_sort_complex_allowed( abap_true ).
      lo_standard_functions->set_column_selection_allowed( abap_true ).
      lo_standard_functions->set_view_list_allowed( abap_true ).
      lo_standard_functions->set_pdf_allowed( abap_true ).
      lo_standard_functions->set_export_allowed( abap_true ).
      lo_standard_functions->set_dialog_settings_as_popup( abap_true ).
    lo_standard_functions->set_display_as_allowed( abap_true ).
    lo_standard_functions->set_graphic_allowed( abap_true ).
      lo_column_settings ?= lo_table.
    *To create a row with heading Matter No.
      lo_column = lo_column_settings->get_column( 'MTRID' ).
      lo_column_hdr = lo_column->create_header( ).
      lo_column_hdr->set_text( 'MATTER NO.' ).
    same way for other required field.

  • How to create a table with events in smartforms?

    How to create a table with events view in smartforms?
    It doesn't like general table with header, main area and footer.
    for example:
    in smartforms: LE_SHP_DELNOTE
    table name is TABLEITEM(Delivery items table)

    Vel wrote:
    I am creating XML file using DBMS_XMLGEN package. This XML file will contain data from two different database tables. So I am creating temporary table in the PL/SQL procedure to have the data from these different tables in a single temporary table.
    Please find the below Dynamic SQL statements that i'm using for create the temp table and inserting the data into it.
    Before insert the V_NAME filed, i will be appending a VARCHAR field to the original data.
    EXECUTE IMMEDIATE 'CREATE TABLE TEMP_TABLE (UNIQUE_KEY NUMBER , FILE_NAME VARCHAR2(1000), LAST_DATE DATE)';
    EXECUTE IMMEDIATE 'INSERT INTO TEMP_TABLE values (SEQUENCE.nextval,:1,:2)' USING V_NAME,vLastDate;What exactly i need is to eliminate the INSERT portion of it,Since i have to insert more 90,000 rows into it. Is there way to have the temp table created with data in it along with the sequence value as well.
    I'm using Oracle 10.2.0.4 version.
    Edited by: 903948 on Dec 22, 2011 10:58 PMWhat you need to do to eliminate the INSERT statement is to -- as already suggested by others - eliminate the temporary table. You don't need it. It is just necessary overhead. Please explain why you (apparently) believe that the suggestion of a view will not meet your requirements.

  • How to access internal table data from webdynpro to Flex application.

    Hi Connoisseur
    The data transfer from Abap WebDeypro to flex island works well. I followed , there is an example from Thomas Jung (by the way as always Great Work) and  Karthikeyan Venkatesan (Infosys) but this example covers simple type only.
    There is no example with complex types like arrayCollection which handle the transfer of data from flex to WebDynpro.
    i tried to do pass internal table value  to flex-datagrid.but its not work.
    i would like to know
    1.how to access internal table data from webdynpro to Flex application.
    2.how to pass the internal table to flex-datagrid.
    2.how to pass dynamically in ADOBE flex.
    3. how to do Flex is receiving the wd context data?
    4. how can we update WD context with FLEX data.
    Ple give me sample example and step by step procedure.
    Regards
    laxmikanth

    Hi Laxmikanth,
    Please refer this...
    Flash island: update complex type from flex
    Cheers..
    kris.

  • How to create  some columns dynamically in the report designer depending upon the input selection

    Post Author: ekta
    CA Forum: Crystal Reports
    how  to create  some columns dynamically in the report designer depending upon the input selection 
    how  export  this dynamic  report in (pdf , xls,doc and rtf format)
    report format is as below:
    Element Codes
    1
    16
    14
    11
    19
    10
    2
    3
    Employee nos.
    Employee Name
    Normal
    RDO
    WC
    Breveavement
    LWOP
    Sick
    Carers leave
    AL
    O/T 1.5
    O/T 2.0
    Total Hours
    000004
    PHAN , Hanh Huynh
    68.40
    7.60
    76.00
    000010
    I , Jungue
    68.40
    7.60
    2.00
    5.00
    76.00
    000022
    GARFINKEL , Hersch
    66.30
    7.60
    2.10
    76.00
    In the above report first column and the last columns are fixed and the other columns are dynamic depending upon the input selection:
    if input selection is Normal and RDO then only 2 columns w'd be created and the other 2 fixed columns.
    Can anybody help me how do I design such report....
    Thanks

    Hi Developer life,
    According to your description that you want to dynamically increase and decrease the numbers of the columns in the table, right?
    As Jason A Long mentioned that we can use the matrix to do this and put the year field in the column group, amount fields(Numric  values) in the details,  add  an filter to filter the data base on this column group, but if
    the data in the DB not suitable to add to the matrix directly, you can use the unpivot function to turn the column name of year to a single row and then you can add it in the column group.
    If there are too many columns in the column group, it will fit the page size automatically and display the extra columns in the next page.
    Similar threads with details steps for your reference:
    https://social.technet.microsoft.com/Forums/en-US/339965a1-8cca-41d8-83ef-c2548050799a/ssrs-dataset-column-metadata-dynamic-update?forum=sqlreportings 
    If your still have any problem, please try to provide us more details information, such as the data structure in the DB and the table structure you are currently designing.
    Any question, please feel free to let me know.
    Best Regards
    Vicky Liu

  • Plese Help...i have to create a table dynamically using JSP

    Hi all,
    Depending upon what user fills as year & month I have to create a table dynamically.The table should look like this...
    DAY     S     M     T     W
    DATE     1     2     3     4
    Name1     -     -     -     -
    Name2     -     -     -     -
    I know how to get total no available days of any month so i'll use for loop to create <tr>
    The info i need is-
    How to get the first day of the month ,the user entered using calendar because the first row should start with it.
    and the second thing is...
    How to keep incrementing it in the loop..like after sun-->mon-->tue....sat-->sun....
    & also..sat & sun cols should be of different colors than other weekdays
    Please help me.

    Sounds like you already knows about the Calendar class. You should use that class to get the first day of the month.
    Kaj

  • How to fill internal table dynamically

    Hi All,
       how to fill internal table dynamically.
    for example:
    begin of itab occurs 0,
    empid like pa0000-pernr,
    empname like pa0001-ename,
    grade(5),
    end of itab.
    now i want to append dynamically field itab-grade along with rest fields.
    is this possible?? if yes kindly let me know how to do that.
    Regards,
    Kiran I

    Hi kiran,
    To fill and create and internal table dynamically you can use this code.
    TYPE-POOLS: slis.
    DATA: it_fcat TYPE slis_t_fieldcat_alv,
          is_fcat LIKE LINE OF it_fcat.
    DATA: it_fieldcat TYPE lvc_t_fcat,
          is_fieldcat LIKE LINE OF it_fieldcat.
    DATA: new_table TYPE REF TO data.
    DATA: new_line  TYPE REF TO data.
    FIELD-SYMBOLS: <l_table> TYPE ANY TABLE,
                   <l_line>  TYPE ANY,
                   <l_field> TYPE ANY.
    is_fieldcat-fieldname = 'FIELD1'.
    is_fieldcat-ref_field = 'MATNR'.
    is_fieldcat-ref_table = 'MARA'.
    APPEND is_fieldcat TO it_fieldcat.
    is_fieldcat-fieldname = 'FIELD2'.
    is_fieldcat-ref_field = 'SPRPS'.
    is_fieldcat-ref_table = 'PA0001'.
    APPEND is_fieldcat TO it_fieldcat.
    is_fieldcat-fieldname = 'FIELD3'.
    is_fieldcat-ref_field = 'BEGDA'.
    is_fieldcat-ref_table = 'PA0002'.
    APPEND is_fieldcat TO it_fieldcat.
    Create a new Table
    CALL METHOD cl_alv_table_create=>create_dynamic_table
      EXPORTING
        it_fieldcatalog = it_fieldcat
      IMPORTING
        ep_table        = new_table.
    Create a new Line with the same structure of the table.
    ASSIGN new_table->* TO <l_table>.
    CREATE DATA new_line LIKE LINE OF <l_table>.
    ASSIGN new_line->* TO <l_line>.
    Test it...
    DO 40 times.
      ASSIGN COMPONENT 'FIELD1' OF STRUCTURE <l_line> TO <l_field>.
      <l_field> = '12345'.
      ASSIGN COMPONENT 'FIELD2' OF STRUCTURE <l_line> TO <l_field>.
      <l_field> = 'X'.
      ASSIGN COMPONENT 'FIELD3' OF STRUCTURE <l_line> TO <l_field>.
      <l_field> = '20030101'.
      INSERT <l_line> INTO TABLE <l_table>.
    ENDDO.
    LOOP AT <l_table> ASSIGNING <l_line>.
    ASSIGN COMPONENT 'field1' OF STRUCTURE <l_line> TO <l_field>.
      WRITE  / <l_line>.
    ENDLOOP.
    regards,
    Aashish Garg

Maybe you are looking for

  • Error message: "FireWire connections are not supported.  To transfer songs"

    I recently purchased a Monster iCarPlay to play my ipod in my car. I have had no problems until recently. Upon disconnecting my ipod from the iCarPlay wire, I the following message popped up: "FireWire connections are not supported. To transfer songs

  • Error while posting downpayment documents in transaction f-53

    Hi, I am sending this mail once again as my earlier two messages was blocked by moderators. I don't know the reason for the same. I didn't used any mocky languages or abusing words.  Normally the questions are blocked if the total no of postings are

  • How do I create email list in Numbers

    I am trying to create a list of email addresses in Numbers which I can copy and paste into an email.

  • Weird problem with 290x Lighting on boot

    Hi all, yesterday i took a 290x Lighting, and after installed it i got some very strange problem on system boot. When i turn on the PC it appear a strange cyan line on the left side of the screen: When windows (8.1) is about to begin the system goes

  • Flash Player Buttons in Encore

    Can the buttons (start, stop,etc.) be removed from flash player? After building my slideshow it has buttons on the bottom. I would like to remove them. Any ideas would be great. Thanks.