Dynamic Columns with dynamic header colspans

Hi All,
Our project requires creation of dynamic data table at runtime. Following are the requirements.
1.The number of columns and column headers should be dynamic. Basically the column headers are the Month names.
2.Some or All of the above displayed months can be further split into 3 columns based on further values selected by the user. The months to be split into 3 columns will be identified only at runtime based on some calculations. When this happens, that particular month header should span 3 columns and an additional header for the 3 split columns have to be displayed. Check the screen shot below.
----------------------------------------------------------------------------------|-------------|
Year: 2008 | Year: 2009 |
----------------------------------------------------------------------------------|-------------|
|Current Month | | |
-------------------------------------|--------------|-----------------------------|-------------|
Sep | Oct | Nov | Dec | Year Total| Jan |
------------------|------------------|--------------|-----------------|-----------|-------------|
| | |2008 |2009 |Total| | |
------------------|------------------|--------------|-----|-----|-----|-----------|-------------|
Old |New |Total|Old |New |Total | | | | | | |
Value|Value | |Value|Value| | | | | | | |
-----|------|-----|-----|-----|------|--------------|-----|-----|-----|-----------|-------------|
xx | xx | xx | xx | xx | xx | xx | xx | xx | xx | xx | xx |
-------------------------------------------------------------------------------------------------Points to be noted:
1.The colspan for the Year header is dynamic based on the months displayed for the previous, current, next year.
2.The ‘Current Month’ header is dynamic based on the month selected in the drop-down.
3.The colspan for the month is dynamic based on whether it is displaying single column or 3 columns
4.The header for the 3-column split is dynamic based on which are the months to be displayed with 3-column split.
5. Irrespective of the month selected, DEC is always split into 3 columns.
Is this achievable in JSF? Please let me know if anyone has worked on a similar requirement.
Thanks and Regards,
Anitha.

Hi charishma/Raymond,
Thanks for your response.
charishma,
I checked the link you provided and the code in that page. For me it looks like the colspan and rowspan are set by the user. Can it be done dynamically? I am still not in the development phase. I am still evaluating the possibilities. So it would be great if you can tell me if my requirements will be met with rich faces.
Raymond,
I am still in the evalution phase of whether this requirement is possible or not?
In short, my requirement is to display columns dynamically. Based on certain conditions, each of the column can be further split to 3 more columns with 3 sub-headers below the main header. There are 4-5 rows of headers available for which the colspan has to be calculated dynamically depending on the total number of columns.
The columns should be editable. i.e., the columns contain textboxes where the user can enter data. Again, the editable columns and non-editable columns are determined at run-time based on certain calculations.
Is this possible? If not, i need reasoning as to why it is not acheivable.
If it is not at all posible then the client is ready to compromise on the editing part. That is, data entry can be in a pop-up whereas, the the datatable should just display the data dynamically so as to print it for a report.
Please let me know the possibility of this requirement.
Thanks and Regards,
Anitha.

Similar Messages

  • ALV Display dynamic column with multiline header

    Hi All.
    I need to create alv display with dynamic number of columns. Also, it contains two header line. Kindly help me in coding.
    The required format is this format.
    Product | Week1 | Week2 |.......| WeekN
    |--||---|--
                | Sales   | Sales   |.......| Sales
    |--| |---|--
    PRD1   | value    | Value    |.......| Value
    PRD2   | value    | Value    |.......| Value
    PRD3   | value    | Value    |.......| Value
    Thanks.
    Sadhna

    Hi Sadhana,
    You mean to say that your internal Table contains
    ABCDEF are the fields in your Internal table.
    A--BCD---E-----F
    1--12---13---a11----1
    2--11---01---b9-----0
    3--01---00---c32----0
    4--14---01---d21----0
    Now using Dynamic Internal Table it should display the output as follow :
    A--BCF---a---b-c----d
    1--12---13---111-9-32--21
    Here you want to display the the fields of D as header and E as its corresponding values...?
    Please let me knwo if you mean the same..
    Regards,
    Kittu

  • How to create dynamic DataTable with dynamic header/column in JSF?

    Hello everyone,
    I am having problem of programmatically create multiple DataTables which have different number of column? In my JSF page, I should implement a navigation table and a data table. The navigation table displays the links of all tables in the database so that the data table will load the data when the user click any link in navigation table. I have gone through [BalusC's post|http://balusc.blogspot.com/2006/06/using-datatables.html#PopulateDynamicDatatable] and I found that the section "populate dynamic datatable" does show me some hints. In his code,
    // Iterate over columns.
            for (int i = 0; i < dynamicList.get(0).size(); i++) {
                // Create <h:column>.
                HtmlColumn column = new HtmlColumn();
                dynamicDataTable.getChildren().add(column);
                // Create <h:outputText value="dynamicHeaders"> for <f:facet name="header"> of column.
    HtmlOutputText header = new HtmlOutputText();
    header.setValue(dynamicHeaders[i]);
    column.setHeader(header);
    // Create <h:outputText value="#{dynamicItem[" + i + "]}"> for the body of column.
    HtmlOutputText output = new HtmlOutputText();
    output.setValueExpression("value",
    createValueExpression("#{dynamicItem[" + i + "]}", String.class));
    column.getChildren().add(output);
    public HtmlPanelGroup getDynamicDataTableGroup() {
    // This will be called once in the first RESTORE VIEW phase.
    if (dynamicDataTableGroup == null) {
    loadDynamicList(); // Preload dynamic list.
    populateDynamicDataTable(); // Populate editable datatable.
    return dynamicDataTableGroup;
    I suppose the Getter method is only called once when the JSF page is loaded for the first time. By calling this Getter, columns are dynamically added to the table. However in my particular case, the dynamic list is not known until the user choose to view a table. That means I can not call loadDynamicList() in the Getter method. Subsequently, I can not execute the for loop in method "populateDynamicDataTable()".
    So, how can I implement a real dynamic datatable with dynamic columns, or in other words, a dynamic table that can load data from different data tables (different number of columns) in the database at run-time?
    Many thanks for any help in advance.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    flyeminent wrote:
    However in my particular case, the dynamic list is not known until the user choose to view a table. Then move the call from the getter to the bean's action method.

  • Draw Dynamic Column with Static Columns

    Hi All
    I have to show dynamic columns with static columns including column header and I am choosing the Cross Tab style. I have done this already in SSRS but failed to do in Crystal Report version (Crystal Report Basic for Visual Studio 2008).
    Name             Hair Color      City        Age           Mobile                        Email
    Jannie            Brown          Dublin        15         +353 122 1234567     Email Address
    John               Black            Dublin       20          +353 145 1234567      Email Address
    Dynamic Columns
    Name , Hair Color , City Age
    Static Column
    Mobile, Email
    I also face empty rows in cross tab report.
    Please help and give me a chance of thanks.

    Thank you very much for your kind response. Actually i have dynamic Store Procedure  results based on parameters and yes static column will never changed
    Store Procedure Result
    Mobile                        Age            Email                       Key              Value
    +3531221234567     15             Email Address         Name           Jannie
    +3531221234567     15             Email Address         Hair Color    Brown
    +3531221234567     15             Email Address         City              Dublin
    +3531451234567     20             Email Address         Name           John
    +3531451234567     20             Email Address         Hair Color     Black
    +3531451234567     20             Email Address         City              Dublin
    And I want to draw report in following style
    Name     Hair Color     City      Age      Mobile                       Email
    Jannie   Brown          Dublin   15     +3531221234567       Email Address
    John     Black             Dublin   20     +3531451234567       Email Address

  • Dynamic columns with grouping.... in crystal report...using java /c# api ??

    I need to create a report with dynamic columns
    for e.g/
                                           Pre   Scen 1   Scen 2   Scen 3   Scen 4   Scen 5   Scen 6      .....
    *Total                          4.5118   4.5118    4.5118   4.5118   4.5118        4.5118   4.5118     *
    *Canada                    1.7180    1.7180    1.7180   1.7180  1.4103     8.4103      8.4103     *
       BG                           1.6224    0.9641    1.0473   1.0473  6.4635     6.4635  1.6224     
       BI                              0.044     0.0827     0.3578   0.3578 0.0560     0.0560   0.0744     
      DIN                    0.0056     -0.0655     -0.0215     -0.0215     -0.0210     -0.0210     0.0056     
    *Czech Republic     1.7180     1.7180     1.7180     1.7180     18.4103     18.4103     18.4103     *
      CEE               0.0275     1.0000     0.7359     100.0000     0.0858     0.0858     0.0275     
    *Israel               1.7180     1.7180     1.7180     1.7180     18.4103     18.4103     18.4103     *
      F                    0.0077     1.0000     0.7359     100.0000     -0.0035     -0.0035     0.0077     
    *United States          1.7180     1.7180     1.7180     1.7180     18.4103     18.4103     18.4103     *
      A                    0.0144     0.1871     91.0473     0.0679     0.0544     0.0544     0.0144     
      AA                    0.0428     0.0626     0.3578     0.0675     0.1175     0.1175     0.0428     
      AB                    0.0431     0.1553     -0.0215     0.1685     0.1199     0.1199     0.0431     
    in this report....grouping will be parameterized ....and total also required at every stage...
    so how can i add the columns dynamically ?
    number of columns are not fixed...they may be 20...30....etc

    Requirement is...
    I have a table scn ... where i can make entries any time....assume they are some rules...
    I have another table called t1 ... where i need to calculate values of t1 again some specific rules are table scn.
    So for each t1 there will be one row with columns as scn entries which I select on interface.
             Original Value  --  Sc1 ......  Sc2  ...... Sc3  ......  Sc4 ......  Sc5 . . . . . .. .
    t1...................xx...... xx..........xx..........xx........ xx........ xx
    t3...... .............xx...... xx..........xx..........xx........ xx........ xx
    t4....................xx...... xx..........xx..........xx........ xx........ xx
    selection of these scn columns will be dynamic....so i cant create n number of columns in the report template and hide them as per requirement....it will not work.
    Wat is a feasible solution to create such kind of report ?
    Can we create template in C# or .net ?
    IF yes...do we have to save every time in order to render report ?
    e.g.   one report may contain 4 columns and other 10 ... so do i have to create new rpt file each in order to render the report ?
    Please if any1 have approach to create this kind of report then it will very helpful....
    Edited by: pchawan on Jul 19, 2011 11:28 PM

  • How to create report with dynamic columns with static row labels

    Hi All,
    I am creating one report as per attached format. I have labels on the right side of the report
    and data in 3 columns. The data is taken dynamically from the command query.
    It gets data from 3 different result sets/command queries.
    I tried creating the report horizontally instead of vertically, but the logo image I am not able to rotate in 270degrees.
    Can anybody tell me how to create the report...??

    Hi Abhilash,
    Thanks for the quick reply.
    Actually the problem is with the image, as I am not able to rotate 270 degree. Crystal report cannot support the rotation of image.
    i have another problem, I have to create a report in which
    Lables are fixed on the left side of report and 3 columns per portrait page. Those columns are
    dynamically created and shown in the report.
    The format is like the above. Can you please help me in doing this report, as I tried it doing
    with CrossTab. I am really stuck to this report.

  • How to generate a dynamic column with unique value in AMDP

    Hi Collegue,
    For AMDP I have a table with material plant,i have to assign a unique number to each unique combination of material,plants into a dynamic column say sequence.
    Please suggest me how to proceed.
    Regards,
    Saurabh

    hi
    Firstly, have a look at the following code to see how this can be implemented -
    REPORT ZTEST.
    perform test.
    class test definition.
      public section.
        methods: create_screen.
    endclass.
    class test implementation.
      method create_screen.
        data:  report_line(72),
               report_source like table of report_line.
        data: err_message(240),
              err_line type i,
              err_word(100).
        report_line = 'REPORT TEST.'.
        append report_line to report_source.
        report_line = 'PARAMETERS: P_TEST TYPE I.'.
        append report_line to report_source.
        report_line = 'START-OF-SELECTION.'.
        append report_line to report_source.
        report_line = 'WRITE : P_TEST.'.
        append report_line to report_source.
        syntax-check for report_source message err_message
                                       line    err_line
                                       word    err_word.
        if err_message is initial.
          INSERT REPORT 'ZZZTESTZZZ' FROM REPORT_SOURCE.
          SUBMIT ZZZTESTZZZ VIA SELECTION-SCREEN AND RETURN.
        endif.
      endmethod.
    endclass.
    form test.
      data test type ref to test.
      CREATE OBJECT TEST.
      call method test->create_screen.
    endform.
    As you can see, the report is being written dynamically. Once the INSERT REPORT statement is executed, the program is available. you can you external subroutine calls to pass the data between the programs now.
    Regards,
    ravish
    <b>plz dont forget to reward points if helpful</b>

  • Dynamic table with dynamic drop-down list values

    Hi,
    I need to display a dynamic table with 2 columns on an interactive form.
    My Context is defined as below:
    Root
    StudentData     0..n
    StudentName
    StudentCourses     0..n
    Text
    Value
    The 1st column should display student name, 2nd column should display student courses. The courses will be different for each student. I populated the context properly. I checked it by printing them. My DDL is bound to "Student Courses".
    When there is one row -> The DDL is populated with the courses of student 1 (as there is only one).
    When there are more rows -> The DDLs for all the students are populated with all the courses of all the students.
    I want to see the data populated like:
    TEXTFIELD    DROP-DOWN LIST
    Student 1------Student1-Course1
    Student1-Course2
    Student1-Course3
    Student 2------Student2-Course1
    Student2-Course2
    Student2-Course3
    I tried to do this in plain web dynpro using SVS.. it is also working similarly.
    I have set the singleton property of nodes "StudentData" and "StudentCourses" to false.
    Could any one tell me where I am going wrong?
    Thanks
    Ram

    Ram,
    I'm not sure how much this will help, but I know I had the same problem as you when I tried to get a similar thing working, but I can't remember which of the many changes I made fixed the problem, so I'll just show you my code and perhaps you can see if anything is different than yours.
    Here's where I'm creating my dropdown - in my case EastNew_RegOut is the same as your StudentData, and RateTypeDropValues is the same as your StudentCourses (the comments in the code are not meant to sound bossy to you, this is actually an example piece of code that other developers in my company "steal", so I have to put very specific instructions in there!):
    int nodeSize = wdContext.nodeEastNew_RegOut().size();
    for (int i = 0; i < nodeSize; i++) {
         //create an element called "table", that's the element at i.  So, basically it's a row.  Maybe I should have
         //called it "row" instead of table.
         IPublicDeviceExchange.IEastNew_RegOutElement table = (IPublicDeviceExchange.IEastNew_RegOutElement)wdContext.nodeEastNew_RegOut().getElementAt(i);
         //this line of code just executes an rfc that finds out what rates need to be in the dropdown for this particular row
         executeRateTypeDropdown(rateCategory, table.getNum(), wdContext.currentEastNew_MeterOutElement().getReggrp());
         //clear out what's already in there before we re-populate it.
         table.nodeRateTypeDropValues().invalidate();
         //now, I'm looping through all the values in the *actual* rate type dropdown (the one that's an RFC, populated by the above "execute" method)
         for (int j = 0; j < wdContext.nodeEastRatetype_DropdownOut().size(); j++) {
              //for each element in the *actual* Rate type dropdown, I'm going to create an element in my node that I created
              //and set the values from the *actual* one as the values in my node.
                        IPublicDeviceExchange.IRateTypeDropValuesElement element = wdContext.createRateTypeDropValuesElement();
              IPublicDeviceExchange.IEastRatetype_DropdownOutElement rateTypeOut = (IPublicDeviceExchange.IEastRatetype_DropdownOutElement)wdContext.nodeEastRatetype_DropdownOut().getElementAt(j);
              element.setText(rateTypeOut.getText());
              element.setValue(rateTypeOut.getRatetype());
              //here's another key - notice how I don't say wdContext.nodeRateTypeDropValues() - it's the one that's
              //directly off that table I created earlier - the thing that's essentially a row in my newReg table.
              //So, what I'm doing here is adding that new element I created to the dropdown FOR THAT ROW!               
              //(btw, if you're trying to duplicate this, and this method does not exist for your "table" object, it's
              //probably because you didn't listen to me above and you didn't create your node with the singleton property
              //set to false.)
              table.nodeRateTypeDropValues().addElement(element);
    As for my layout... my table is bound to the EastNew_RegOut node, and the column with the dropdown is bound to RateTypeDropValues.Value  (that's probably obvious, but there you have it anyway)
    Finally, in my context, EastNew_RegOut is singleton = true (I was surprised about this, actually, I would have assumed it was false) with a selection of 0..1 and RateTypeDropValues has singleton set to false with a selection of 0..1
    I hope that helps to some degree!
    Jennifer

  • Dynamic accordion with dynamic datagrid

    I’m trying to create a dynamic accordion with embedded
    datagrids in each accordion area. I have the base working but have
    2 problems I can’t seem to figure out.
    Bases; the accordion uses a repeater and vbox with a custom
    component from a webservice result set to create the accordion. The
    custom component has another webservice that gets a value from the
    repeater to pass it to the custom component.
    My 2 problems:
    1. how do I prevent the custom component from running the
    webservice until the accordion item is clicked or the area is
    visible? Otherwise I end up will a bunch of queries hitting the DB
    and if there is several items for the accordion and many items from
    the datagrid its slower.
    2. how can I get the datagrid query to refresh when the
    accordion item is clicked? Because the data may change I am not
    able to see the updated data unless I reload the entire
    application.
    1 thing I did try. With the tab control you can use the
    show() event and the data will refresh just fine, but with the
    accordion, the show() event does not seem to fire. Its as if they
    are all visible.
    Any help here would be much appreciated, I’ve been
    racking my brain for days now and I sure it is something simple
    that I am missing. Thanks in advance.
    See the example code below.
    the application code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute"
    width="100%"
    height="100%"
    initialize="ws.getMethod1.send()"
    xmlns:output="com.comp.*">
    <mx:Script>
    <![CDATA[
    import mx.controls.Alert;
    [Bindable]
    public var thisWsdl:String = '
    http://localhost/webservice/service.cfc?wsdl';
    ]]>
    </mx:Script>
    <mx:WebService id="ws"
    wsdl="{thisWsdl}"
    useProxy="false"
    showBusyCursor="true"
    fault="Alert.show(event.fault.faultString, 'Error');"
    concurrency="multiple" requestTimeout="30">
    <mx:operation name="getMethod1">
    <mx:request>
    <param1>{param1data}</param1>
    <param2>{param2data}</param2>
    <param3>{param3data}</param3>
    </mx:request>
    </mx:operation>
    </mx:WebService>
    <mx:Accordion width="100%" height="100%"
    fillColors="[#808080, #808080]">
    <mx:Repeater id="rp"
    dataProvider="{ws.getMethod1.lastResult}">
    <mx:VBox label="{String(rp.currentItem.catname)}"
    backgroundColor="#C0C0C0" width="100%" height="100%"
    paddingRight="10">
    <output:comp catid="{rp.currentItem.catid}"/>
    </mx:VBox>
    </mx:Repeater>
    </mx:Accordion>
    </mx:Application>
    the component code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:VBox xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="100%"
    height="100%"
    focusIn="ws.getMethod.send()"
    horizontalAlign="center"
    backgroundColor="#FFFFFF">
    <mx:Script>
    <![CDATA[
    import mx.controls.Alert;
    [Bindable]
    public var thisWsdl:String = '
    http://localhost/webservice/service.cfc?wsdl';
    [Bindable]
    public var catid:int;
    ]]>
    </mx:Script>
    <mx:WebService id="ws"
    wsdl="{thisWsdl}"
    useProxy="false"
    showBusyCursor="true"
    fault="Alert.show(event.fault.faultString, 'Error');"
    concurrency="multiple" requestTimeout="30">
    <mx:operation name="getMethod2">
    <mx:request>
    <catid>{catid}</catid>
    </mx:request>
    </mx:operation>
    </mx:WebService>
    <mx:DataGrid id="itemGrid"
    dataProvider="{ws.getMethod2.lastResult}" width="700"
    height="250">
    <mx:columns>
    <mx:DataGridColumn width="100" dataField="itemid"
    headerText="Item Id"/>
    <mx:DataGridColumn wordWrap="true" dataField="itemname"
    headerText="Item Name"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:VBox>

    Perhaps you could use the change event of the accordion, or
    the show event of the child containers?
    Tracy

  • Dynamic itab with Dynamic Where clause

    Hi, Dear All,
    Can someone provide a code extract for Dynamic where clause, i had already done with dynamic itab for a given set of fields, and i need to add where clause dynamically for a given field for a given range of values.
    select (i_fields) into table <dyn_table>
                      from (p_table)
                     where (v_where).
    In the above except the where clause, everything is done. Please help me.
    with best regards
    Mahesh

    Hi,
    here is the code extract for your reference.Pl. correct me.
    with regards
    REPORT  Z_DYN_ITAB                              .
    TYPE-POOLS: SLIS.
    DATA:NAME(100) TYPE C.
    TYPES: BEGIN OF ITAB_TYPE,
            WORD(20),
          END   OF ITAB_TYPE.
    DATA: ITAB TYPE STANDARD TABLE OF ITAB_TYPE WITH HEADER LINE.
    DATA: vg_fields(255) TYPE c,
          i_fields LIKE TABLE OF vg_fields.
    DATA: it_fcat TYPE slis_t_fieldcat_alv,
          is_fcat LIKE LINE OF it_fcat,
          ls_layout TYPE slis_layout_alv.
    DATA: it_fieldcat TYPE lvc_t_fcat,
          is_fieldcat LIKE LINE OF it_fieldcat.
    field-symbols: <dyn_table> type standard table,
                   <dyn_wa>,
                   <dyn_field>.
    data: dy_table type ref to data.
    data: dy_line type ref to data,
          xfc type lvc_s_fcat.
    DATA: v_where TYPE string, " Variable for storing where clause.
          v_dynamic(18) TYPE c, "variable to store select option datatype
          o_field TYPE REF TO cx_root," object to catch exception
          text TYPE string. "string variable to store exception text.
    CONSTANTS: c_var(15) TYPE c VALUE ' IN S_RANGE'.
    selection-screen begin of block b1 with frame.
    parameters: p_table(30) type c default 'T001',
                p_name(100) type c,
                p_field(10) TYPE c. " Parameter to capture field name.
    SELECT-OPTIONS: s_range FOR v_dynamic. " Select-option for range.
    selection-screen end of block b1.
    start-of-selection.
    NAME = p_name.
    SPLIT NAME AT ',' INTO TABLE ITAB.
    LOOP AT ITAB.
    is_fcat-fieldname = itab-word.
    is_fcat-tabname = p_table.
    APPEND is_fcat to it_fcat.
    ENDLOOP.
    LOOP AT it_fcat INTO is_fcat.
      is_fieldcat-fieldname = is_fcat-fieldname.
      is_fieldcat-tabname = is_fcat-tabname.
      APPEND is_fieldcat TO it_fieldcat.
      CONCATENATE is_fieldcat-tabname is_fieldcat-fieldname INTO
            vg_fields SEPARATED BY '~'.
      APPEND vg_fields TO i_fields.
    ENDLOOP.
    perform create_dynamic_itab.
    perform get_data.
    Create dynamic internal table and assign to FS
    form create_dynamic_itab.
    call method cl_alv_table_create=>create_dynamic_table
    exporting
    it_fieldcatalog = it_fieldcat
    importing
    ep_table = dy_table.
    assign dy_table->* to <dyn_table>.
    Create dynamic work area and assign to FS
    create data dy_line like line of <dyn_table>.
    assign dy_line->* to <dyn_wa>.
    endform.
    form get_data.
    Select Data from table.
    CONCATENATE p_field c_var INTO v_where.
    TRY.
    select (i_fields) into table <dyn_table>
                      from (p_table)
                     where (v_where).
    if sy-dbcnt = 0.
    write : text-t02.
    endif.
    *Write out data from table.
    Loop at <dyn_table> into <dyn_wa>.
    do.
    assign component sy-index of structure <dyn_wa> to <dyn_field>.
    if sy-subrc <> 0.
      exit.
    endif.
    if sy-index = 1.
      write:/ <dyn_field>.
    else.
      write: <dyn_field>.
    endif.
    enddo.
    endloop.
    Exception Catching.
    CATCH cx_root INTO o_field.
    text = o_field->get_text( ).
    Calling Function to give information message regarding Exception
    CALL FUNCTION 'POPUP_TO_INFORM'
    EXPORTING
    titel = text-t03
    txt1 = text
    txt2 = text-t04.
    TXT3 = ' '
    TXT4 = ' '
    LEAVE TO LIST-PROCESSING.
    ENDTRY.
    endform.

  • Dynamic table with dynamic binding

    Hello,
    I'm really not sure if I can realize that kind of feature using a table :
    I've created a dynamic table that have a dynimac number of columns except two.
    I've setted the value of the table to a certain list to fill out the two static field I need now to fill the data for each row for the dynamic columns but that kind of datas are inside another list
    Is it possible to manually create Row for Table and set the columns values ?

    Hi,
    I could not use both solution because I've two list (two data model) from different source, when the jsf page is generated it generated the correct number of column and output text but when I try to retrieve the component output text for example the 1 row and the second output text I got a null pointer exception because the column only have 1 child and not the full elements that we can see at html rendering.
    There is no solution for getting the full list of components before the page is generated ? because findComponent recursivly called doesn't found what I want.

  • Dynamic columns with Excel Source?

    I have Excel file number 1 with columns A ja B.
    I have database table with columns A,B,C,D,E,F,G,H etc. (there are 100 columns)
    I know how to import normally data with Excel Source and OLE DB Destination with Excel file 1.
    Now I have new need.
    I should be able to import dynamically Excel files with any combination of columns.
    It should be automatic import with For Each Container.
    When new files like below is imported, I should not be make any changes to SSIS.
    Excel 2) Columns A, G, X (so column A data must be added to column A in database etc)
    Excel 3) Columns B, C, G, Y (so column B data must be added to column B in database etc)
    Excel 4) Columns D, X
    IS THIS POSSIBLE WITH SSIS? HOW?
    CUSTOM CODE IS NEEDED? ANY POINTERS TO SOLUTION?
    Kenny_I

    How you are going to deal with the rows here?
    For example, 
    Excel 2) Columns A, G, X (so column A data must be added to column A in database etc)
    when Excel 3 files are processing are you going to update the record that you added in Excel
    2.
    Excel 3) Columns B, C, G, Y (so column B data must be added to column B in database etc)
    Excel 4) Columns D, X
    when Excel 4 files are processing what is your scenario for column X which you just added in
    Excel 2. Are you going to update it or add new rows here.
    As Arthur has suggested generating your package in code seems the way to go for but before that you need
    to think about all the scenarios.
    Vikash Kumar Singh || www.singhvikash.in

  • SQL from Table Column with Dynamic URL Problem

    This is the SQL I'm attempting to save to a table column via the Object Browser;
    select
    "a"."PBR_BRIEF_ID" "Brief ID",
    "a"."PROJECT_NUMBER" "Project",
    "b"."DESCRIPTION" "Description",
    "b"."ACTUAL_END_DATE" "Actual End",
    "b"."RFS_DATE" "RFS",
    "b"."LOCATION_CODE" "Location",
    ''||"b"."ESA_CODE"||'' "ESA",
    "b"."PROJECT_USER_STATUS" "Status",
    "b"."PROJECT_TRIGGER" "Trigger"
    from
    UPT1TRIAL.FUND_PLAN_BRIEF_LINK_CCR@NDSD "a",
    UPT1INTEGRAL.INT_PROJECT_DATA@NDSD "b"
    where
    "a"."PBR_BRIEF_ID" = :P3_BRIEF_ID and
    "a"."PROJECT_NUMBER" = "b"."PROJECT_DEFINITION_NUMBER"
    The intesting bit is the following, where a URL is return behind a particular column;
    ''||"b"."ESA_CODE"||'' "ESA",
    It's interesting because when I click on "Apply Changes" in the Object Browser, the text that appears in the column is as follows, i.e. with APP_ID and SESSION populated;
    ''||"b"."ESA_CODE"||'' "ESA",
    Why would that happen??
    The full SQL above is used in an application page with a SQL Query (PL/SQL function body returning SQL query). The basic SQL works OK but because of what the Object Browser is doing, the link does not.
    Message was edited by:
    Damian - apologies for lack of formatting!!
    Message was edited by:
    Damian

    Damian,
    Use
    & lt;
    for your &lt; tags and then the message will appear in the proper format.
    If you are using dynamic sql to generate an url with APP_ID and SESSSION you could:
    a) create page items (P1_APP_ID and P1_SESSION)
    b) compute those page items to the actual APP_ID and SESSION_ID
    c) use the value of those items while generating your dynamic sql (instead of APP_ID and SESSION)
    Then, your links will show the right APP_ID and the right SESSION.
    Denes Kubicek

  • Finding column count with dynamic columns and dynamic tables

    I've done some PL/SQL for awhile now but was trying to devise a solution for the following problem:
    I wish to find the number of times a specific value for a column exists in all the tables that contain the field and I have access to see with the current user. The column name and value will be passed in via parameters.
    I was hoping to use something like
    select table_name from all_tab_columns where column_name = <variable table name>;
    then use the results from this to create a select statment based off the tables from the select above. I know the difference between dba_tab_columns and all_tab_columns - I want to make sure that I only retrieve the values i have access to.
    Can anyone point me to some guide / website / reference material I can read to catch up on the idea of creating this statment?
    Thank you.

    Hi,
    it's a test version.
    You can naturally tune it, but it seemed to work:
    declare
    pi_column VARCHAR2(30) := 'DEPTNO';
    pi_value VARCHAR2(4000) := '20';
    v_count NUMBER := 0;
    v_count_tab NUMBER;
    BEGIN
    FOR I IN (select owner, table_name from dba_tab_columns
              where column_name = pi_column
    LOOP
        EXECUTE IMMEDIATE 'SELECT count(*) FROM '||i.owner||'.'||i.table_name||
                          ' WHERE '||pi_column||' = :pi_value'  INTO v_count_tab USING pi_value; 
        v_count := v_count + v_count_tab;
    END LOOP;                   
    dbms_output.put_line(v_count);
    END;Regards

  • Dynamic sql with dynamic bulk collection variable

    Hi,
    I am facing the issue while bulk collecting dynamic sql query data into dynamic variable.
    Eg:
    query1:= << dynamic select query>>
    Execute immediate query1 bulk collect into Dynamic_varibale;
    here dynamic_varible is pl/sql table type with 1 column.
    How do i declare "dynamic_variable" here????
    please suggest...

    create type t_id is table of number
    SQL> create type t_id is table of number
      2  /
    Type created.
    SQL> declare
      2
      3   v_tid t_id;
      4   v_results sys_refcursor;
      5
      6   v_employee_id number;
      7   v_name varchar2(100);
      8
      9   v_sql varchar2(1000);
    10
    11
    12  begin
    13   v_tid := t_id(7902,7934);
    14
    15  --
    16
    17
    18   v_sql := 'select empno, ename from scott.emp ' ||CHR(10)
    19           || 'where empno in (select column_value from table(cast(:v_tid as
    t_id)))';
    20
    21   dbms_output.put_line(v_sql);
    22   dbms_output.put_line('----------');
    23
    24   open v_results for v_sql using v_tid;
    25
    26
    27   IF v_results IS NOT NULL
    28     THEN
    29        LOOP
    30           FETCH v_results
    31            INTO v_employee_id, v_name;
    32
    33           EXIT WHEN (v_results%NOTFOUND);
    34           dbms_output.put_line(v_name);
    35        END LOOP;
    36
    37        IF v_results%ISOPEN
    38        THEN
    39           CLOSE v_results;
    40        END IF;
    41    END IF;
    42
    43  end;
    44  /
    select empno, ename from scott.emp
    where empno in (select column_value from
    table(cast(:v_tid as t_id)))
    FORD
    MILLER

Maybe you are looking for

  • Database field won't display

    I'm new to Crystal Reports in .NET but I do have my 1st report working except for one field that I'm trying to use in a sub report.  It's in my database fields just like the other field for the sub report.  I can see data for both fields in the Brows

  • Error message R6034 and Error 7 (windows error) 1114

    Hi! I have tried installing the latest itunes update and it has failed. I get the runtime error message R6034 and Error 7 (windows error) 1114. I have tried many times, uninstalling and reinstalling the versions as advised in some of the related thre

  • Cookies not deleting correctly in Safari

    Why do my cookies re-appear after I reset Safari (4.02). Same issue with version 4.01. I've deleted the cookie file and that appears to work but I don't know why I need to do anything beyond resetting the browser. I've also deleted the cookie files f

  • Change field name in sql statement

    How can one change a field name in a specified table using an sql statement? Thanks. Dan.

  • I can't see video from an AVCHD clip in Quicktime 10.4

    When I open up a camera video in AVCHD i can't see any video,  I just hear the Audio.  I'm using Quicktime 10.4 and my OS is Yosemite 10.10.1 I have 16 GIGs of Ram installed in my 3.5GHZ 6 core Intel Xeon E5 Mac Pro Am I missing a codec?