Dynamically Merging Columns in a table

Hello All,
Is it possible to merge columns in table based on some set of condition.
The current output is as follows:
Column 1 Column 2 Column 3 Column 4 Column 5
Row1            ""               ""              ""                 ""
SubRow1      ""               ""              ""                 ""
Value 1       Value 2      Value 3     Value 4         Value 5
The output which we need is as follows:
Column 1 Column 2 Column 3 Column 4 Column 5
Merged Row 1 (merged columns)
Sub Row 1 (merged columns)
Value 1 Value 2 Value 3 Value 4 Value 5
Merged Row 2 (merged columns)
Sub Row 2 (merged columns)
Value 1 Value 2 Value 3 Value 4 Value 5
Merged Row 3 (merged columns)
Sub Row 3 (merged columns)
Value 1 Value 2 Value 3 Value 4 Value 5
Thanks.
Kiran

The merge is simple if you do not think about it as in word:))
The merge can be done using scripting: just concatenate the values of the fields into one variable, fill in the value to the first column, change its width (to the width of the previous 4 cols) and hide te remaining/ blank cols.
Have fun, Otto

Similar Messages

  • Dynamically Hiding Column in a Table View in VC Model

    How to dynamacally hide the columns in a table view in a VC model. Through the expression in Control Property, Form element/field or table view as a whole can be made hidden, however, the individual column can not seem to be hidden.
    I am using VC server version 700.8.0.1.
    Any help would be much appreciated.
    Kind Regards
    Sanjoy

    In this scenario, if the source is SAP BI, you can use the webapi commands. If not, you would have to have 2 separate tables in different layers and you can show and hide those layers or UI elements...

  • Splitting and merging columns in a table?

    Hi I have asked this question before. Does any one know how to split a column into two in a table. Know this can be done in a Word Doc. I know the merge works but can't seem to find the split.

    The merge is simple if you do not think about it as in word:))
    The merge can be done using scripting: just concatenate the values of the fields into one variable, fill in the value to the first column, change its width (to the width of the previous 4 cols) and hide te remaining/ blank cols.
    Have fun, Otto

  • How to display records dynamically by columns of the table?

    hi to all,
    i'm trying to figure out quite a long time now. is it possible to populate html table with records via columns? (because most of us are familiar with rows up to the last record) i do have a pseudocode below:
    print ('<table>');
    while (!eof) {
    if (cnt % 4 == 0)
    // breakline w/c means let's have another row since
    // we displayed the records 4x now so we need
    // another row to continue
    else
    // continue column generation
    cnt++
    print ('</table>');
    i don't know if this is quite clear... but i do hope you know what my goal is... i have an app that i need to display (like live.com in searching images) to display all the searched items (and then onmouseover it will get big some sort)... but since the records i have are the ff:
    CREATE TABLE "ERA_DB"."PARTS"
    (     "PARTID" VARCHAR2(15 BYTE) NOT NULL ENABLE,
         "PARTNAME" VARCHAR2(75 BYTE) NOT NULL ENABLE,
         "RETAILPRICE" NUMBER NOT NULL ENABLE,
         "COSTPRICE" NUMBER NOT NULL ENABLE,
         "ACTIVE" NUMBER DEFAULT 1,
         "CATEGORY" VARCHAR2(2 BYTE) DEFAULT 'NA',
         "DESCRIPTION" VARCHAR2(255 BYTE),
         "TYPE" NUMBER DEFAULT 1 NOT NULL ENABLE,
         CONSTRAINT "PARTS_PK" PRIMARY KEY ("PARTID") ENABLE
    i need to display like the ff:
    partname
    partid
    image
    description
    price
    these are inside a box w/ borders (the concept is like live.com in their image search)
    thanks so much!

    This was written for pear::db but I think it should go pretty similar for ADODB.
    $result = $db->query ("SELECT PRODUCT FROM INVENTORY WHERE COMPANY='$_SESSION[company]'");
    while ($data1 = $result->fetchRow(DB_FETCHMODE_ASSOC))
    $data2 = $result->fetchRow(DB_FETCHMODE_ASSOC);
    $data3 = $result->fetchRow(DB_FETCHMODE_ASSOC);
    $data4 = $result->fetchRow(DB_FETCHMODE_ASSOC);
    $rows .= " <tr>\n";
    $rows .= " <td width=150 align=right>".$data1[PRODUCT]."</td>\n";
    $rows .= " <td width=150 align=right>".$data2[PRODUCT]."</td>\n";
    $rows .= ' <td width=150 align=right>".$data3[PRODUCT]."</td>\n";
    $rows .= " <td width=150 align=right>".$data4[PRODUCT]."</td>\n";
    $rows .= " </td>\n";
    $rows .= " </tr>\n";
    }

  • How to make columns in a table dynamic

    Hi,
    I want to make the columns of a table dynamic.
    At design time I dont know how many columns will be required.
    Rows are made dynamic by using the bean concept.
    Please help me in this reference(columns).
    Thanks
    Pooja

    Hi, i don't know how you create the rows dynamically but
    have you tried to use a forEach?
    <af:table ...>
    <af:forEach items="..." var="...">
    <af:column headerText="...">
    <af:outputText value="..."/>
    </af:column>
    </af:forEach>
    </af:table>
    here there is an example of a dynamic panelList:
    <af:panelList rows="3" maxColumns="6">
    <af:forEach items="#{bindings.ContratosView1.rangeSet}" var="li">
    <af:commandLink text="#{li.Codigo}" action="Edit"/>
    </af:forEach>
    </af:panelList>

  • How to bind dynamic columns in ADF table to view object

    In the below piece of code i am trying to bind a dynamically added column to my newly added attribute in view object, but the value expression does not set the value of this attibute in the view object please help on what is wrong in this code ??
    <af:table value="#{bindings.ViewObj1.collectionModel}" var="row"
    rows="#{bindings.ViewObj1.rangeSize}"
    emptyText="#{bindings.ViewObj1.viewable ? 'No rows yet.' : 'Access Denied.'}"
    fetchSize="#{bindings.ViewObj1.rangeSize}"
    filterModel="#{bindings.ViewObj1Query.queryDescriptor}"
    queryListener="#{bindings.ViewObj1Query.processQuery}" varStatus="vs"
    selectedRowKeys="#{bindings.ViewObj1.collectionModel.selectedRow}"
    rowSelection="single"
    binding="#{backingBeanScope.backing_createDTpg1.table1}"
    id="table1"
    columnSelection="single"
    partialTriggers="::addCol ::addColAfter ::addColBefore ::removeCol ::addRow ::addRowAfter ::addRowBefore ::removeRow ::addAction ::addActionAfter ::addActionBefore ::deleteAction :::dialog1 :::d1"
    allDetailsEnabled="true" verticalGridVisible="false"
    horizontalGridVisible="true" width="100%" disableColumnReordering="true"
    selectionListener="#{bindings.ViewObj1.collectionModel.makeCurrent}"
    immediate="true" contentDelivery="immediate"
    editingMode="clickToEdit" autoHeightRows="-1">
    <af:column sortProperty="Sno" filterable="false" sortable="false"
    headerText="Sno"
    align="center" width="28" rowHeader="true"
    inlineStyle="font-style:italic;" frozen="true"
    id="sno" selected="true" headerNoWrap="true"
    displayIndex="0">
    <af:outputText id="ot0" value="#{vs.index+1}"/>
    </af:column>
    <af:column id="separatorColumn" align="center"
    width="15" frozen="true" displayIndex="1"
    rowHeader="unstyled" sortable="false"
    filterable="false" selected="false"
    inlineStyle='background-image:url("jheadstart/images/jsp_forward.png"); background-repeat:no-repeat; outline-color:InactiveCaption; outline-style:solid; outline-width:thin;'
    headerText=""/>
    </af:table>
    DCBindingContainer dcBindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding iterBind =
    (DCIteratorBinding)dcBindings.get("ViewObj1Iterator");
    ViewObject decisionTableView1 = iterBind.getViewObject();
    System.out.println("before getAttributeCount :"+decisionTableView1.getAttributeCount());
    int counter = decisionTableView1.getAttributeCount() + 1;
    AttributeDef attribute =
    decisionTableView1.addDynamicAttribute("condition_" + counter);
    RichColumn column = new RichColumn();
    column.setId("condition_" + counter);
    column.setHeaderText("condition_" + counter);
    column.setNoWrap(true);
    RichInputText inputtext = new RichInputText();
    inputtext.setId("condition_"+counter);
    inputtext.setAutoSubmit(true);
    inputtext.setValueExpression("condition_"+counter,
    getValueBinding("#{row.bindings.condition_" +
    counter +
    ".inputValue}"));
    column.getChildren().add(inputtext);
    RichCommandImageLink headerLink = new RichCommandImageLink();
    headerLink.setText("<<Select Fact>>");
    headerLink.setId("conditionLink_" + counter);
    column.setHeader(headerLink);
    List columnList = this.table1.getChildren();
    int separatorColumnIndex =
    findColumnIndex(columnList, "separatorColumn");
    if (columnIndex == -1 || columnIndex > separatorColumnIndex) {
    columnIndex = separatorColumnIndex;
    System.out.println("Column Index :" + columnIndex);
    column.setDisplayIndex(columnIndex);
    this.table1.getChildren().add(columnIndex, column);

    Sorry Frank i could not figure out what u rtrying to say.
    In my case i have ADF table with two predefined coulmns :
    1 : a serial number read only column
    2 : a separator coumn
    I need help to bind the newly created dynamic attribute in the VO with my newly created column in the ADF table which has a input text as child.
    My problem is binding the is not working properly as values entered in the Table are not reflected in the VO.
    And when i insert a new column in between two columns which has already filled values the data in the rows does not shift coreespondingly..
    Edited by: user10281080 on Jul 27, 2009 12:22 AM

  • Dynamic creation of column in database table

    Can I create columns in a database table dynamically?
    Let's say I have two columns in a table. Users requested to have dynamic columns in the table. They wanted to create any no. of fields in the table dynamically. We can't alter the table every now and then. Is there any solution for this. Please let me.
    Your early response is highly appreciated.
    Thanks

    I can't use "Alter" statement every time. User may need to insert any no.of columns dynamically. There is no fixed columns. Right now there are two columns which are static. Somebody said it is durable through XML. Can you please let me know in detail. I haven't not done anything using XML.
    Thanks for the response.

  • ALV Table and dynamic new column

    Hi,
    I have a ALV table with tree in one column (reccuring context value).
    I would like dynamically to add new columns. I know the method of IF_WD_CONTEXT_NODE_INFO->ADD_NEW_CHILD_NODE, but this is used in another posts/blogs where whole table is generated dynamically. I have a table already and just want to add a new column.
    Is that possible?
    Thank you on advance, cheers.

    Under normal circumstances you could use the Context API method ADD_ATTRIBUTE to create a dynamic attirubte:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/af/cb744176cb127de10000000a155106/frameset.htm
    Unfortunately this is not compatible with the ALV. The ALV only supports static attributes.  Therefore you will need to build up an entire RTTI based structure in memory and then dynamically re-create the entire context. This is a similar example:
    data:
             rootnode_info type ref to if_wd_context_node_info,
             dyn_node type ref to if_wd_context_node,
             dyn_node_info type ref to if_wd_context_node_info,
             tabname_node type ref to if_wd_context_node,
             current_tablename type string,
             tablename type string,
             struct_type type ref to cl_abap_structdescr,
              table_type  type ref to cl_abap_tabledescr,
              comp_tab    type cl_abap_structdescr=>component_table,
              comp        like line of comp_tab,
              my_table    type ref to data,
              my_row      type ref to data.
        loop at field_details assigning <wa_detail>.
    * build a structure description from the list of single fields
              comp-name = <wa_detail>-field_code.
              comp-type ?= cl_abap_datadescr=>describe_by_name( 'STRING' ). "Replace with your dataType
            append comp to comp_tab.
          endloop.
    struct_type = cl_abap_structdescr=>create( comp_tab ).
          dyn_node_info = rootnode_info->add_new_child_node(
             name                   = 'MDM_DATA'
             is_mandatory           = abap_false
             is_mandatory_selection = abap_false
             static_element_rtti    = struct_type
             is_multiple            = abap_true
             is_static              = abap_false ).

  • Merge columns in an ALV Table

    Hi colleagues,
    is it possible to merge two or more columns in ALV Table (like ColSpan in the Matrix-Layout) to write a text over more than one column?
    I haven't found any solution for it until now.
    Best regards
    Stefan

    Although it may not be exactly what you were looking for, you can create a table ColumnGroup:
    http://help.sap.com/saphelp_nw70/helpdata/EN/f0/5d9041d3c72e7be10000000a1550b0/frameset.htm

  • Dynamic columns in ADF Table don't work as they do in dataTable

    Hello!
    I've tried the sample from http://forum.java.sun.com/thread.jspa?forumID=427&threadID=560252 and all is working perfectly fine.
    Since my company has decided to go with ADF I've tried to port this sample to ADF. However I am experiencing one major problem. The dynamically created columns all have the same ID in different rows. That's why only the last row displays the correct values. Has anyone tried to port the sample from the JSF Forum to the ADF Table and succeeded? Is there a way to manipulate the IDs manually and if so, where do we do it?
    Any help would be greatly appreciated.

    The Develop the JSF/Tiles Application section explains the procedure to dynamically bind column values to a JSF data table. ADF JSF table column binding is similar to the JSF datatable.
    http://www.oracle.com/technology/pub/articles/vohra_tiles.html

  • Dynamically reordering columns in ADF Faces Table

    The Rich UI components (see ADF Faces Rich Client Components - Marrying JSF and AJAX together) that the ADF Faces library will contain with the JDeveloper 11g release - and hopefully before that moment - will allow end-users to do all sorts of manipulations with Tables. They will be able to resize columns an drag & drop columns to change the order - much like you can do in Spreadsheet applications like Excel. However, those components are not yet available to us. Yesterday my customer asked me if he could have offer the option to re-order columns in a table to his end users. That means that in any table component, the user can decide which column should be displayed first, which one second and which one last. It happened to be the same customer who was after the feature to show/hide columns at run-time, a challenge easily resolved in a previous article: Having the end-user hide and display columns in a JSF Table Component (http://technology.amis.nl/blog/?p=1331).
    I have written an article that shows how we can implement this feature: have the end-user specify the order of the columns in the table. I have used ADF Faces for this demonstration, but any JSF implementation will do. See: http://technology.amis.nl/blog/?p=1334 for the article.
    best regards,
    Lucas

    Well issue is that
    I have a list of values that can be chnaged any time during application execution sya its list of Fav Fruits..
    and in an other page i need a data table having these fruits as coulmns and their details as rows...
    how to achieve this..
    we can not guess the number of columns before time.. so can make the estimate and hide them.

  • Function short dump - A dynamically specified column name is unknown.

    Hello,
    I've created BRF fuction according to the  Note 1466868 - Dunning by collection strategy with BRFplus. I get short dump during simulation of function with following exception:
    "A dynamically specified column name is unknown. "
    Runtime Errors         SAPSQL_INVALID_FIELDNAME
    Exception              CX_SY_DYNAMIC_OSQL_SEMANTICS
    No.   Ty.          Program                             Include                             Line
          Name
       19 METHOD       CL_FDT_ELEMENT================CP    CL_FDT_ELEMENT================CM012   129
          CL_FDT_ELEMENT=>GET_VALUES_DDIC
       18 METHOD       CL_FDT_ELEMENT================CP    CL_FDT_ELEMENT================CM011   124
          CL_FDT_ELEMENT=>GET_VALUES
       17 METHOD       CL_FDT_WD_RENDER_VALUE_INPUT==CP    CL_FDT_WD_RENDER_VALUE_INPUT==CM00G   139
          CL_FDT_WD_RENDER_VALUE_INPUT=>VALIDATE_VALUES
    In my opinion there is uncorrect query.
    Current version:
    .  SELECT FIKRS AS VALUE NAME AS TEXT FROM FMBS_BS_T
        INTO CORRESPONDING FIELDS OF TABLE lt_value
        WHERE LANGU EQ 'E'.
    instead of:
    .  SELECT FM_AREA AS VALUE NAME AS TEXT FROM FMBS_BS_T
        INTO CORRESPONDING FIELDS OF TABLE lt_value
        WHERE LANGU EQ 'E'.
    My sap version:
    EHP4 FOR SAP ERP 6.0 / NW7.01
      SAP_BASIS     701     0003     SAPKB70103
    Do you know any note or solution  to resolve this problem.
    Best regards,
    Jacek Witczak

    Hi, I came back to working on "Dunning by collection strategy with BRFplus". According to your sugestions, I raised the level of components:
    SAP_BASIS Level 09
    SAP_ABA level 09
    PI_BASIS level 09
    SAP_BW level 09
    But still I have the same short dump.
    Shoudl we raise any other components? Maybe you know note, which resolve this problem?

  • I am unable to sort multiple columns in a table created in Pages.

    I had been using Appleworks up until I installed Lion and have now switched to iWork. I created a table within a Pages document and am able to sort a single column (using the Table Inspector and choosing Sort from  Edit Rows and Columns) but the Sort option is grayed out when I attempt to sort multiple columns.
    In another post, someone talked about this being a problem if you have merged fields. I do not believe I have done this (to be honest I don't know the function of merging fields).
    This is very frustrating as I was easily able to sort these tables in Appleworks.

    Sharon Anderson wrote:
    Thanks for your quick response! I have been trying that but then found that Numbers would only let me print in landscape view so I had to paste the table back into Pages. Is there a way to print in portrat view (from Numbers?)
    Not so. In the lower left corner of the window, there's an icon that looks like a piece of paper. If you see this:
    you are in Sheet View, or normal, mode. If you see this:
    You are in Print View mode. Now you see the icons for portrait and landscape modes. Click your choice. Then arrange your content to fit the pages as you wish.
    Jerry

  • To check whether there is any size mismatch between columns of two tables

    Hi,
    Here i got two tables T and M where i am going to migrate data from T to M. But before migrating i need to check whether all the data in source table fits into destination table columns. The datatypes of all columns in source table T is of Varchar2 only as it is a temp table.
    Ex :- Table 'T' (Source table) with columns
    T_Lat Varchar2(50);
    T_Amt Varchar2(50);
    T_Cat Varchar2(50);
    T_Vat Varchar2(50);
    Now I have another table 'M'(Destination Table) with columns
    M_Lat Varchar2(50);
    M_Amt varchar2(25);
    M_Cat date;
    M_Vat number;
    Now my task is I have to do a prevalidation of the data in 'T' that whether all the data in those columns will suit for the destination table columns respectively (to check whether there is any size mismatch). This check should be done dynamically.
    For suppose, in T_Amt(source column of T table) if text is abt 50 characters, it cant fit M_Amt(destination column of M table). In this case it should throw an error indicating that destination column size is less for the source column.
    Note:- There is no unique mapping column for these two tables and there are about 400 columns in the source table to be validate
    I think it can be done using arrays or plsql tables.
    Can any one help in this regard.

    >
    Now my task is I have to do a prevalidation of the data in 'T' that whether all the data in those columns will suit for the destination table columns respectively (to check whether there is any size mismatch). This check should be done dynamically.
    >
    Just because the source table T_Amt column is defined as 50 doesn't mean any of the data is really that long. So the data itself needs to be checked. That is just what a simple query can do.
    See my answer in this thread Posted: Jul 25, 2012 1:14 PM
    Re: Help in Execute Immediate - Invalid relational Operator
    Here is the modified sample query and results for a query of a clone of the EMP table with some modified data
    select count(*) cnt,
           -- job column
           sum(case when job is null then 1 else 0 end) job_nul,
           sum(case when job = 'SALESMAN' then 1 else 0 end) job_salesman,
           min(length(job)) job_minlength, max(length(job)) job_maxlength,
           min(job) job_min, max(job) job_max,
           -- hiredate colulmn
           sum(case when hiredate is null then 1 else 0 end) hiredate_nul,
           min(hiredate) hiredate_min,
           max(hiredate) hiredate_max
            from emp1
    CNT JOB_NUL JOB_SALESMAN JOB_MINLENGTH JOB_MAXLENGTH JOB_MIN JOB_MAX  HIREDATE_NUL HIREDATE_MIN HIREDATE_MAX
    14    2       4            5             9             ANALYST SALESMAN 0            9/28/0001    12/3/9999With one query and ONE pass thru the table I was able to get the COUNTs, the MIN and MAX values for each column and the MIN and MAX lengths of the VARCHAR2 columns.
    There are 14 total records, 2 where JOB is null, 4 where the JOB is SALESMAN. The MIN length of the JOB data is 5 and the MAX is 9.
    Look at the date values. The results tell me I have some problem data.
    The length data tells me if I try to put the JOB data into another table I need to define the length as at least 9 or it won't fit.
    For your use case you might find that all of the data in the T_Lat column is shorter than 26 and will actually fit into the M_Lat target table column.

  • How to delete a column from the table control in module pool?

    Hi,
      can any one please tell How to delete a column from the table control in module pool?
    thanks in advance
    warm regards
    HareeshKumar N

    hi hareesh,
    I think it is better to hide it.
    How to hide: You can check this link
    Dynamic Hide column in table control

Maybe you are looking for