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

Similar Messages

  • 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 service entry sheet based from the PO

    how to create a service entry sheet based from the PO
    Gurus,
    I am creating a service entry sheet from the PO but I am getting an error of u201CPlease maintain services or limits Message no. SE029- Diagnosis(You cannot enter data until the PO item has been maintained correctly) u201C
    The document type of the PO is standard NB, account assignment category is Q- (Proj make to order) and the item category is D(service). Then I am trying also create a PR using account assignment category is Q- (Proj make to order) and the item category is D(service) but still cannot proceed, a message asking me to enter a service entry number. What I know the process is create a PO(maybe based from PR) then post the GR then create a service entry sheet in ML81N but I cannot proceed. Just creating a PR or PO using those mentioned account assignment and item category and getting an error of need to enter a service entry sheet number.
    Please help.thanks!

    HI,
    Process for Creating Service Entry Sheet
    Transaction Code :    ML81N
    1)To open the respective Purchase Order, Click on the u2018Other Purchase Orderu2019, then enter the Purchase Order No.
    2)Click on the u2018Create Entry Sheetu2019 icon(3rd Icon on Top-Left)
    3)Give Short Text (e.g. R/A Bill No. 1) and top service entry sheet number also generated.
    4)Click u2018Service Selectionu2019 Icon on the Bottom of the Screen.
    5)For the 1st Time, when we are making Service Entry Sheet for a respective Purchase Order, we need to u201CAdopt Full Quantityu201D by clicking the Check box next to it, then Enter.  (*For the next time, no adoption is required, just continue)
    6)Select the respective Services by clicking on the Left Hand Side, then Click u2018Servicesu2019 (Adopt services) icon on the Top.
    7)Give the completed Quantity, then Click u2018Acceptu2019 icon(a green flag on the top)
    8)Save .
    9)Service Entry Sheet is SAVED and account posting made.
    Hope, it is useful for you,
    Regards,
    K.Rajendran

  • How to control internal table columns dynamically based on input

    i have 2 fields in the selection screen - user and tcode
    we can give any number of tcodes as in put
    based on requirement i need to display all the tcodes belongs to one user in one row
    in other words
    the out put table columns should increase dynamically based on number of tcodes entered
    in the input
    how to do this?
    Edited by: tummala swapna on Apr 7, 2009 11:55 AM

    This may be useful to you..
    FIELD-SYMBOLS : <FS_TABLE> TYPE ANY TABLE.
    DATA: DREF TYPE REF TO DATA,
          WA_DREF TYPE REF TO DATA,
          DY_LINE TYPE REF TO DATA,
          ITAB_TYPE TYPE REF TO CL_ABAP_TABLEDESCR,
          WA_TYPE TYPE REF TO CL_ABAP_STRUCTDESCR,
          STRUCT_TYPE TYPE REF TO CL_ABAP_STRUCTDESCR,
          ELEM_TYPE TYPE REF TO CL_ABAP_ELEMDESCR,
          COMP_TAB TYPE CL_ABAP_STRUCTDESCR=>COMPONENT_TABLE,
          COMP_FLD TYPE CL_ABAP_STRUCTDESCR=>COMPONENT,
          OTAB TYPE ABAP_SORTORDER_TAB,
          OLINE TYPE ABAP_SORTORDER.
    BEGIN DYNAMIC STRUCTURE FOR FINAL INTERNAL TABLE @@@@@@@@@@@@@@@@@@
    STRUCT_TYPE ?= CL_ABAP_TYPEDESCR=>DESCRIBE_BY_NAME('table or structure name').
    COMP_TAB = STRUCT_TYPE->GET_COMPONENTS( ).
    STRUCT_TYPE = CL_ABAP_STRUCTDESCR=>CREATE( COMP_TAB ).
    ITAB_TYPE = CL_ABAP_TABLEDESCR=>CREATE( STRUCT_TYPE ).
    CREATE DATA DREF TYPE HANDLE ITAB_TYPE.
    ASSIGN DREF->* TO <FS_TABLE>.
    END DYNAMIC STRUCTURE FOR FINAL INTERNAL TABLE @@@@@@@@@@@@@@@@@@

  • 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 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

  • Creation of internal table dynamically based on the Date Range entered

    Hi SAPgurus,
    I have been facing one issue i.e creation of internal table dynamically based on the date range entered in the selection screen. For example the date range I am giving as 06/2006 to 08/2006, it should display the Fieldcatelog dynamically, this part i have completed but the only issue I am facing is to populate the sales data into that fields.
    Right now my program is displaying the ALV like this.
    Ex:
    <b>CSR    District   06/2006  07/2006  08/2006  totals</b>      
    Shiva      New York                             10.00
    Shiva      new york                             30.00
    Shiva      new york                             40.00
    but it should display like this
    <b>CSR    District 06/2006 07/2006 08/2006 totals</b>
    Shiva  New York  10.00   30.00 40.00
    80.00                 
    Please help me in this scenario, how to acheive like this..
    Thanks & Regards,
    Sivaram Kandula

    Hi Sivaram,
                 I also got the same requirement . i saw rich and your code whatever you have uploaded.i have created dynamic internal table but i am facing the issue to populating the data to my dynamic internal table.
    Sivaram, can you please explain your code after this.
    *<dyn_table>
    *tab_item.
      LOOP AT tab_item.
        ASSIGN COMPONENT 1 OF STRUCTURE <dyn_wa> TO <dyn_table>.
        ASSIGN COMPONENT 2 OF STRUCTURE <dyn_wa> TO <dyn_table>.
    *    <dyn_wa> = tab_item-bztxt.
    *    <dyn_wa> = tab_item-total.
    *    APPEND <dyn_wa> TO <dyn_table>.
    **    <dyn_wa> = tab_item-total.
    **    ASSIGN tab_item-bezei  TO <dyn_wa>.
    *  APPEND <dyn_table>.
      ENDLOOP.
    how you are puting the loop at tab_item. but tab_item is already commented.
    can you send me the code after that.
    i am sending some part of my code.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
       EXPORTING
         it_fieldcatalog = gt_fCAT1
       IMPORTING
         ep_table        = new_table.
    ASSIGN new_table->* TO <dyn_table>.
       create data new_line like line of <dyn_table>.
       assign new_line->* to <dyn_wa>.
    select vbeln
            fkart
            vkorg
            vtweg
            fkdat
            spart
            fksto
            from vbrk
            client specified
            into table gt_vbrk
            where mandt = sy-mandt
            and fkart in ('ZF5','ZFR')
            and vkorg = '1100'
            and vtweg = '20'
            and fkdat in s_fkdat
            and spart = '06'
            and fksto = ' '.
       if gt_vbrk[] is not initial.
      select  vbeln
              fkimg
              prsdt
              netwr
              matnr
              arktx
              werks
              mwsbp
              from vbrp
              client specified
              into table gt_vbrp
              for all entries in gt_vbrk
              where vbeln = gt_vbrk-vbeln
              and werks in s_werks
              and matnr in s_matnr.
      endif.
    select mnr ltx spras from t247
    into table it_t247
    where spras = 'E'.
    data: lv_month1 type vbrp-prsdt,
           name1(3) type c,
           s_month type string,
            s_month1 type string,
             s_month2 type string.
    *      lv_netwr1 type vbrp-netwr,
    *          lv_mwsbp1 type vbrp-mwsbp.
          loop at gt_vbrp into gs_vbrp.
            gs_final2-matnr = gs_vbrp-matnr.
            gs_final2-arktx = gs_vbrp-arktx.
            gs_final2-fkimg = gs_vbrp-fkimg.
           lv_month1 = gs_vbrp-prsdt.
            read table it_t247 into wa_t247 with key mnr = lv_month1+4(2).
            if sy-subrc eq 0.
            name1 =  wa_t247-ltx.
            endif.
             concatenate  name1
                       lv_month1(4) into s_month SEPARATED BY '_' .
             CONCATENATE S_MONTH 'QTY' INTO S_MONTH1 SEPARATED BY ''.
              CONCATENATE S_MONTH 'VALUE' INTO S_MONTH2 SEPARATED BY ''.
             gs_final2-month = s_month.
              lv_netwr1 = gs_vbrp-netwr.
            lv_mwsbp1 = gs_vbrp-mwsbp.
            gs_final2-MONTH_QTY = S_MONTH1.
            GS_FINAL2-MONTH_VAL = S_MONTH2.
            gs_final2-value = lv_netwr1 + lv_mwsbp1.
           append gs_final2 to gt_final2.
           clear: gs_final2. "lv_name2.
           endloop.
           if gt_final2[] is not initial.
             sort gt_final2 by matnr month ascending .
             loop at gt_final2 into gs_final2.
            gs_final2_01 = gs_final2.
         collect gs_final2_01 into gt_final2_01.
        endloop.
           endif.
       ENDIF..
    Regards
    Ankur

  • How to create a report with dynamic columns

    Hi all,
    I am using Apex 4.0 with Oracle 10g
    I am creating a report and I need to display columns dynamically based on the item values.
    example:
    I have a table employee with columns name, designation, sal
    In the report page i have a select list with designations and when I select a designation from the select list,
    I need to display the names of the employees horizontally,
    like each name as a new column in the report with that particular designation. and same has to continue when I select different designations.
    Can some one help me how we can do that.
    I appreciate your answer
    Thanks,
    Rik

    Essentially you want to write a pl/sql function which returns a varchar2 string. The contents of the string must be a valid sql statement.
    Once you have done this, you need to add a report region as type sql report and you will have the option of writing it as a query or as a function returning query. Choose function returning query and enter in the function call.
    Note your function must be valid, and must be executable by your apex parsing schema.
    example:
    create or replace
    function test_report(   p1_tablename       in varchar2)
    return varchar2
    is
    v_query varchar2(4000);
    begin
    v_query  :=
    'SELECT * from '||p_tablename;
    return v_query;
    end test_report;Edited by: Keith Jamieson on Aug 15, 2011 4:50 PM

  • How to create a table with editable column values.

    Hi everyone,
    I think this is very simple but i'm not able to find how to do this. This is my requirement. I need to create a table with n columns and 1 row initially. user should be able to enter data into this table and click of a button should insert data into the data base table. Also there should be a button at the bottom of the table to add 1 row to the table.
    I know how to do the insert to database, but can anyone please let me know how to create a table that allows user to enter data and how to create a add 1 row button?
    Thanks in Advance!

    Raghu,
    Go through the ToolBox tutorial Create Page & Advanced table section of OAF Guide.
    Step 1 - You require to create EO & a VO based on this EO. This EO will be of DataBase table where you want to insert the data.
    Step 2 - Create a Advanced table region. (Refer this Adavanced table section for more on this)
    Step 3 - Attach this VO in the BC4J component of Adavanced Table region.
    Regards,
    Gyan

  • 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.

  • I am using iPad pages, and figuring out how to create a table of content.

    Hello
    I am using pages on my iPad Air, and figuring out how to create a table of content? (TOC)
    Anyone can help me please?

    Based on what I have found, at this time, it appears that the only way to add a TOC or Bibliography to a Pages file is via Pages for MAC. Once that is done, you can automatically add entries in Pages for iOS. But you cannot initially add the element.
    It is not out of the question that there are some templates for Pages for iOS available that already have these added and available - but I cannot say first hand. All of the built in templates for iOS appear to be for short format documents and I have yet to find one that includes the TOC or Bibliography.

  • How to create Dimension table

    Hi,
    On practicing I have followed the step. 1st i have created InfoArea, 2nd Infosource, 3rd Application component, 4th Infoobject, and 5th Infocube. I was not able to create dimension table. Could any one help me how to create dimension table.
    Regards.

    Hi Soumendra,
    I think you are stuck in creating the InfoCube (IC), when you create the IC you need to have 3mandatory dimensions like time, unit and data packet as well as Customer defined like say Customer, Product etc.
    You need to insert them in IC and activate them.
    Check the below help file for more info.
    http://help.sap.com/saphelp_nw70/helpdata/en/80/1a643fe07211d2acb80000e829fbfe/content.htm
    Regards,
    Raghu

  • Can any one tell how to create pivot table

    Hi ,
    Am trying to create a pivot tabel in the MDM Import Manager. Iam able to see the preview of the pivot table which i want to create. But when i try to click "OK" button, an error message getting displayed like...
    "The new table cannot be created because the data source is not updatable.You may need the data source to an updatable format such as Microsoft Access before proceeding".
    Due to the above error am not able to create pivot table, plz let me know if any one know how to solve this problem
    Thanks & regards
    Praveen k

    Hi Praveen ,
       The solution to your problem is -
    The data source must be updateable in order for MDM to
    create the new pivot or reverse pivot table. However, you can still
    perform the steps leading up to table creation – including the preview –
    even on a data source that is not updateable, so that you can explore
    pivoting or reverse pivoting as a transformation option. If you then
    decide you want to actually create the new table, convert the data
    source into a format that is updateable (such as Microsoft Access) and
    perform the pivot or reverse pivot on the new data source.
    To create a pivot table, you must identify the source fields that
    participate in the pivot, which ones contain metadata and which ones
    contain data, which ones must be combined, the one-to-one
    correspondence between metadata and data fields and/or field
    combinations, and the key field or fields.
    To create a pivot table:
    1. In the drop-down list of source tables, make sure the table you want to
    pivot is the current source table.
    2. In the Source Hierarchy tree, select all the field nodes corresponding to
    both the metadata fields and the data fields by which you want to pivot.
    3. Right-click on one of the nodes and choose Create Pivot Table from the
    context menu, or choose Source > Create Pivot Table from the main
    menu
    4. MDM opens the Create Pivot Table dialog
    5. In the Key Fields dual-list drop-down control, move one or more fields
    from the Available Fields list to the Selected Fields list to identify the
    key fields on which to perform the pivot
    6. In the dual-list control of fields, drag-and-drop the data fields from the
    Field Values Become Field Names list to the Field Values Become
    Field Values list
    7. If necessary, select two or more fields in either list that must be
    combined into a field combination, and click on the Combine button, or
    right-click on one of the fields and choose Combine from the context
    menu
    8. If necessary, drag-and-drop fields or field combinations within each list
    to create the one-to-one correspondence between metadata fields and
    data fields.
    9. Click on the Preview button to display a preview of the first ten records
    of the pivot table
    10. When you have verified that the pivot operation you have defined will
    have the desired effect, click OK to close the Create Pivot Table dialog.
    11. The MDM Import Manager creates a new table named “table <Pivot>”
    in the data source (where “table” is the name of the original source
    table).
    12. In the drop-down list of source tables, select the newly created pivot
    table on which to perform subsequent import processing.
    Hope that helps ...
    Regards
    Deepak Singh

  • How to create monthly table creation?

    Hi Mates,
    Unable to create table by month in analytic database but load the data to the previous table continuous as attached screenshot, Schema user has the creation privilege. We are using Webcenter interaction 10gR4.
    How to create monthly table creation please?
    Thanks,
    Katherine

    Hi Trevor,
    Thanks for your help.  We were able to create table and load data till Apr as attached.
    However the analytic user privilege has been modified on Apr due to server operation.
    Since then, there was a message saying there is no permission to create tables in the analytic log,
    analytic user privilege has been granted after checked this message, As I suspected, the issue occurred after modifying analytic user privilege.
    Currently, analytic users are granted with all privilege.
    Any idea please?
    Thanks,
    Kathy

  • How to create a table in smart form.

    Hi Folks,
    I need to create a table in  smart form with the following fields:-
    vbrp-arktx,vbrp-fkimg,komv-kbetr,komv-kwert.
    Please let me know how to create a table and how to name the columns,size,and the select query for the same.
    All answers will be duly rewarded.
    K.Kiran.

    Hi,
    Following Links gives Details of Smartforms and how to create tables -
    smartforms - very useful link
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287
    http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
    FAQ
    http://www.sap-img.com/smartforms/smart-006.htm
    http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-press.com/downloads/h955_preview.pdf
    http://www.ossincorp.com/Black_Box/Black_Box_2.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    Siddhi

Maybe you are looking for

  • Failed JNDI - Active Directory binding

    Hello everyone, First off, forgive me if I'm posting to the wrong place and please let me know where I should post. I have a very simple Java application (more or less copied from the Sun tutorial on JNDI) and am trying to connect to a Win 2003 R2 do

  • Source file information

    I have the original source file for an illustrator image used for a business card. My intention is to bring this image to the web.  I would like to make some color changes, is there any way that I can detect or find using the source image the exact f

  • Custom validation template

    Hello, I have issue with validation template. Order Management Super User ->Setup->Rules->Security->Validation templates I made own validation template. It is the same like "Regular Line". I run Tools -> Create validation packages. After this I go to

  • Nokia 6700 browser problem

    I am trying to use the browser that is on default installed on my nokia 6700 but when i try to login in my facebook i can't because the letter's im writing are blank.The probem seems to be only in facebook and i dont know why. When i click okay it sa

  • Options for running older software on Mavericks

    When I try to upgrade, it lists a bunch of software that won't run on Mavericks - does Mavericks have some type of "classic" mode that will enable me to run these programs?