Displaying sub table columns in main tablecolumn

HI,
Please let me know the procedure of creating two sub table columns under a main table column.
Example, I have a tablecolumn say MainColumn. Under this MainColumn, I want two sub table columns say SubCol1 and SubCol2.
How to do this?
thanks,
anil.

hi,
Thr is other way to do this. Create  Tables with requrement rows and columns as per ur requirement and Look at ur webdynpro Application Development Environment,In ur Outline View select the parent table Tree structure and find the cloumn name in which u wanted to insert a child table .Then u have drag and Drop the child table over thr now u have a table inside ur table..
[Nt : Repeat the same procedure to insert table inside a
Table].
Regards,
Ramganesh.

Similar Messages

  • How to display sub table and NOT repeat each detail line?

    I am going nuts trying to get this thing to display correctly, so I am someone can help me. I am trying to display a sub table (not subreport - tried that and it doesn't work) for detail records. For Example on an invoice items may have child items.
    I am using Crystal 11
    I have two tables iDetail and iSubDetail
    My detail section looks like this:
    D   iDetail.itemNum                              iDetail.price
               iSubDetail.itemNum
    I have a Left Outer link from iDetail.itemNum  --> iSubDetail.itemNum
    I should see something like this:
    itemOne                  $50.00
         subItemOne
         subItemTwo
         subItemThree
         subItemFour
    itemTwo                $25.00
    itemThree              $30.00
    etc...
    Instead, my Crystal report displays this:
    itemOne                  $50.00
         subItemOne
    itemOne                  $50.00
         subItemTwo
    itemOne                  $50.00
         subItemThree
    itemOne                  $50.00
         subItemFour
    itemTwo                $25.00
    itemThree              $30.00
    etc...
    and of course the total for the invoice is wrong.
    I have tried all the different links and a subreport, but I cannot get it to display correctly. Does anyone have any ideas??

    I tried subreport but I can't figure out how to turn it OFF for non-relative items; from the above example data I would get with a subreport:
    itemOne $50.00
      subItemOne
      subItemTwo
      subItemThree
      subItemFour
    itemTwo $25.00
      subItemOne
      subItemTwo
      subItemThree
      subItemFour
    itemThree $30.00
      subItemOne
      subItemTwo
      subItemThree
      subItemFour
    Looks great for itemOne, but I can't turn it off for itemTwo and itemThree. I have tried hiding the subreport if iDetail.itemNum =
    iSubDetail.itemNumi, but if SubDetail table is accessed it repeats the iDetail record like the original post.
    I tried hiding it in the subreport, but it does not know what the main report record is. I couldn't find anyway to PASS the itemNum from the main report to the subreport. If I could pass it as a variable, I could just hide the subreport when it is NE to iSubDetail.itemNum.
    I kind of got it working by grouping the iDetail record by itemNum. However, the problem with that is when there really is multiple iDetail records, the invoice only shows one!! So, I would still like to find a better solution,
    Thanks for your reply.

  • Display Nothing in table column heding when parameter doesn't have any value

    Hi,
    I created one tabular report . Report has 2 parameters(ex: A and B) both have default values from two different datasets. I am using these parameters in two column headings (col1 has parameter A and col2 has parameter B) in report. My question is, if parameters(A
    and B ) don't have any value from the datasets it should display "Nothing" in the table column headings(col1 and col2). If parameters(A & B) have some value(June & July respectively) it should display in table column headings(col1 and col2).
    Thanks in advance,
    Visu

    Hi Visu,
    According to your description, you want to display the value of two parameters in two column headers. Parameter A in col1, parameter B in col2. And if the parameter returns null value, it should display “Nothing” in the header. If the
    parameter return a value, the value should be displayed in the column header.
    If in this scenario, in order to achieve your requirement, we can refer to the following expression in the two column headers:
    =iif(Parameters!ReportParameter_name.Value
    is nothing,"Nothing",Parameters!ReportParameter_name.Value)
    If there are any misunderstanding, please elaborate the issue for further investigation.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Getting table column header names from database

    Hi,
    We are trying to get table headers from database. So when we query the database it returns multiple rows at the same time. How can we display specific table column headers from the returned result set at respective places.
    We tried using record selection expert but that only works for one selection and not for others.
    How can we do this?

    Thank you Josh and Abhilash for helping us.
    We are using PostgreSql.
    "command_headers" has query which looks like following-
    SELECT id, header  FROM labels
    WHERE id='header.header_1'
    OR id='header.header_2'
    OR id='header.header_3'
    ORDER BY id;
    which will return following result set-
    id                              header
    header.header_1        Header1
    header.header_2        Header2
    header.header_3        Header3
    Our Table structure is something like this-
    Page Header: Header1                        |  Header2                       | Header3                    
    Details:           {command_data.value1} | {command_data.value2} | {command_data.value3}
    command_data is another command which generates data for the table.
    All values in details section coming from command_data is in format string.
    We don't need to apply grouping or sub totals. This is a simple table, showing string values for all columns.
    Preview:
    Header1     |     Header2     |     Header3
    car              |     yello           |     abc
    bike            |     black          |     xyz
    plane          |     white           |     pqr
    Currently, all headers are static labels. How do we use "command_headers" to display all table Headers dynamically? Can we achieve this format using cross tab?

  • How to display images in a table column?

    Hi,
    In a VC model, I have to display images in a table column for each record found.
    How can this be done?
    Regards,
    Nitin

    Hi Nitin,
    It can be done by adding to the table the Image control (can be found under Advanced Controls in the Compose panel).
    In the URL property (in the Configure panel of the Image control) you can define any expression that will return the image URL. For example:
    ="http://hosting.site.url/"&@ImageNameField
    Regards,
    Udi
    Edited by: Udi Cohen on Jun 11, 2008 1:39 PM

  • How to display the sorting arrows in the table column header

    Hi
    I am doing a sorting for some columns from the click of the table column headers, In Developer studio, we are able to view the up and down arrows, I need that also to be made visible at run time, so that the user knows that there exists sorting based on that particular column. Is there any other way of doing it ? I cant place more than one control on the header or wrap the text to two lines..also. please clarify. thanks

    I assume you are using NW 04.
    The table column header contains a IWDCaption element which may display an icon and a text. See property IWDCaption.imageSource.
    The table tutorial might also be helpful.
    Armin

  • How to display only selected columns in the table on the tableview

    Hi All,
    I am displaying in the below tableview the data from the SFLIGHTS tables in the tableview using flow logic. It displays all the columns in the database table. How can I set in the code to display only selected columns and not all columns.
    Also, in these columns displayed I want to make the key columns of SFLIGHT as non editable and the rest of the columns in SFLIGHT editiable. Can you please kindly share the code to implement this.
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page>
        <htmlb:form>
          <htmlb:tableView id              = "tv1"
                           visibleRowCount = "10"
                           selectionMode   = "lineEdit"
                           table           = "<%= flights %>"
                           filter = "SERVER"
                           sort = "server"
                           iterator        = "<%= iterator %>" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    Thanks
    Karen

    Hi,
       Please try this code.
    <!-- To display Table control on BSP page with table internal table it_hist  --!>
              <htmlb:tableView id              = "TV_HIST"
                               headerText      = "Previous History"
                               headerVisible   = "TRUE"
                               footerVisible   = "TRUE"
                               design          = "ALTERNATING"
                               selectionMode   = "LINEEDIT"
                               visibleRowCount = "5"
                               fillUpEmptyRows = "TRUE"
                               table           = "<%= it_hist %>"
                               width           = "500" >
    <!--  to show selected columns give required field name --!>
    <htmlb:tableViewColumns>
      <htmlb:tableViewColumn columnName          = "FIELD1"
                                         title               = "COLUMN1"
                                         horizontalAlignment = "CENTER"
                                         width               = "65" >
                  </htmlb:tableViewColumn>
      <htmlb:tableViewColumn columnName          = "FIELD2"
                                         title               = "COLUMN2"
                                         horizontalAlignment = "CENTER"
                                         width               = "65" >
                  </htmlb:tableViewColumn>
      <htmlb:tableViewColumn columnName          = "FIELD3"
                                         title               = "COLUMN3"
                                         horizontalAlignment = "CENTER"
                                         width               = "65" >
                  </htmlb:tableViewColumn>
      <htmlb:tableViewColumn columnName          = "FIELD4"
                                         title               = "COLUMN4"
                                         horizontalAlignment = "CENTER"
                                         width               = "65" >
                  </htmlb:tableViewColumn>
    <!--  to make column editable set edit property to TRUE --!>
      <htmlb:tableViewColumn columnName          = "FIELD4"
                                         title               = "COLUMN4"
                                         edit = "TRUE"
                                         horizontalAlignment = "CENTER"
                                         width               = "65" >
                  </htmlb:tableViewColumn>
                </htmlb:tableViewColumns>
              </htmlb:tableView>

  • WebDynpro ABAP - Display Short Text instead of values in table column.

    Hi WebDynPro Experts,
        i have Column in a table which displays subject. This column has domain associated ZDE_SUBJECT with fixed values & short text
    Fix.Val    Short Text
    01             Level 1
    02             Level 2
    03             Level 3
    04             Level 4
    05             Level 5
    when i bind this cloumn to a table UI element. And have records for this table. At runtime inside the table column. i see values returned as 01, 02 , 03 ( basically fix val) my requirement is to display the corresponding short text. Is there any easy approach to do this???

    Hi Prash
    I think you need to bind the short text values  to the table UI.
    I am not sure if there is any other easy approach for this.
    Regards
    Naresh

  • How to Display Sub-Columns using ALV Grid

    Hi ,
      Could someone tell me how to display sub-columns under a parent column using ALV Grid. Do we have any standard Program which has this scenario. Please let me know.
    Thanks,
    Abaper.
    Message was edited by:
            ABAP'er

    you can check all with <b>BCALV* or RSDEMO*</b> in SE38 for all Std
    check below
    BCALV_DND_01                   Drag ALV Row to Tree Folder
    BCALV_DND_02                   Drag Icons from Tree to Rows of the Grid
    BCALV_GRID_DND_TREE            ALV Grid: Drag and Drop with ALV Tree
    BCALV_GRID_DND_TREE_SIMPLE     ALV GRID: Drag and drop with ALV tree (simple)
    BCALV_TEST_COLUMN_TREE         Program BCALV_TEST_COLUMN_TREE
    Rewards if useful............
    Minal

  • Negative number cannot be displayed in table if the column is too narrow

    Hi, All
    When a number is formatted  as a certain formatting(not locale formmatting),Negative number cannot be displayed in table if the column is narrower than the negative number, just minus is displayed.
    Can you help me? Thanks.
    Version: EHP1 for netweaver 7.0 SP3
    Best regards,
    Jiande Ding

    Hi,
    I think this has nothing to do with positive and negative numbers, By default the alignment of the text is Left, if you dont want to see '-' sign initially then you can change the alignment of the text to center or right in the display tab of properties for that column.
    As you as saying that at runtime the numbers are visible if manually adjusted. to icrease the width of that column permanently goto Layout tab of the story board and increase the size of the table and then increase the width of the column.
    the Fit Contents in the Layout should be set to "Actual Size".
    Regards,
    Rk.

  • Tableview setting to enable to select the table columns to display

    Hi All,
    In webdynppto in the table ALV display we have the settings option with which users can control what columns of the table to display and what columns to hide in the table display.
    Users can also control the columns of the display to show or hide in the display. Can any of you please clarify how we can do this with the tableview
    The tableview I am using is below what setting do I need to enable to get the column display/hide by users at runtime
    Thanks
    Karen
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
    <htmlb:page>
    <htmlb:form>
    <htmlb:tableView id = "tv1"
    visibleRowCount = "10"
    selectionMode = "lineEdit"
    table = "<%= flights %>"
    filter = "SERVER"
    sort = "server"
    iterator = "<%= iterator %>" />
    </htmlb:form>
    </htmlb:page>
    </htmlb:content>

    hello,
    I do not think it's possible dynamically like ALV...on screen itself...
    to hide / display a column you can code in iterator class with some condition...
    Thanks,

  • Display an icon in a table column

    Hi,
    can i display an icon in a table column ? How
    do I have to handle that ?
    Thank you...
    Claus

    Hi Claus,
    You can use the following as table cell editor:
    1. Image -- just displays plain image
    2. Caption -- dislays image along with text or image only (or text only).
    3. LinkToAction -- same as caption, however provides you a way to have something like "onClick" action.
    Regards,
    VS

  • How to Display Sub-Columns using ALV

    Hi experts,
        Could someone tell me how to display sub-columns under a parent column using ALV. Do we have any standard Program which has this scenario. points are guaranteed for the right answer.
    Thanks in advance
    Sreenivas

    you can check all with <b>BCALV* or RSDEMO*</b> in SE38 for all Std
    check below
    BCALV_DND_01                   Drag ALV Row to Tree Folder
    BCALV_DND_02                   Drag Icons from Tree to Rows of the Grid
    BCALV_GRID_DND_TREE            ALV Grid: Drag and Drop with ALV Tree
    BCALV_GRID_DND_TREE_SIMPLE     ALV GRID: Drag and drop with ALV tree (simple)
    BCALV_TEST_COLUMN_TREE         Program BCALV_TEST_COLUMN_TREE
    Rewards if useful............
    Minal

  • Displaying data from multiple table/column

    hello ..
    anybody can help me how to diplaying data from multiple table/ column in PHP. TQ

    Follow the "How do I SELECT, INSERT, UPDATE and DELETE data from PHP?" example from http://wiki.oracle.com/page/PHP+Oracle+FAQ and change the "select ..." query to your favourite join, e.g.
    select country_name, region_name from countries, regions where countries.region_id = regions.region_id;

  • Displaying 2 tables in 1 frame

    Hi guys,
    I have this problem. I need to display 2 tables (with scroll panes) on a frame. I have tried it a couple of different ways.
    1) Using 1 JPanel that has 1 table and then adding that and another table to a JFrame (GridLayout)
    2) Using GridLayout on a JPanel and adding that to a JFrame
    3) Using 2 JPanel and adding it to a JFrame
    4) Placing both JTables on 1 JPanel and then adding that to the JFrame
    but it doesn't work. It seems that the table that is added first (not to mention the buttons and textfields) doesn't appear (not visible) only the 2nd table is visible.
    This this the latest "version" I've tried.
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.table.TableColumn;
    public class Main {
        //Variable declarations
        private JFrame f;
        private JScrollPane ladderSP, resSP;
        private JPanel p0, p1;
        public Main() {
            createTable();
            createResTable();
            createPanelZero();
            createPanelOne();
            createAndShowGUI();
        private void createAndShowGUI() {
            f = new JFrame("Calculate MW");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.setLayout(new GridLayout(1,2));
            f.setLocation(100, 100);
            f.add(p0);
            f.add(p1);
            f.pack();
            f.setResizable(false);
            f.setVisible(true);
        private void createPanelZero() {
            p0 = new JPanel(new GridLayout(1,2));
            p0.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
            p0.add(ladderSP);
            p0.add(resSP);
        private void createPanelOne() {
            p1 = new JPanel(new GridLayout(1,1));
            p1.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
            p1.add(resSP);
        private JTextField setObjSize (JTextField com) {
            Dimension d = new Dimension(80, 23);
            com.setPreferredSize(d);
            com.setMaximumSize(d);
            com.setMinimumSize(d);
            return com;
        private void createTable() {
            // Variables
            String[] colNames = {"Molecular Weight", "Length (cm)"};
            String[][] data;
            data = getLadder(new File("ladder.txt"));
            JTable table = new JTable(data, colNames);
            table.setPreferredScrollableViewportSize(new Dimension(220, 300));
            // Set 1st column uneditable
            JTextField tf = new JTextField();
            tf.setEditable(false);
            TableColumn wtCol = table.getColumnModel().getColumn(0);
            wtCol.setCellEditor(new DefaultCellEditor(tf));
            // Set the table width
            table.setColumnSelectionAllowed(false);
            table.getTableHeader().setResizingAllowed(false); //not allowing resizing of columns
            table.getTableHeader().setReorderingAllowed(false); //not allowing reordering of columns
            table.setRowSelectionAllowed(false);
            ladderSP = new JScrollPane(table);
        private void createResTable() {
            String[] colNames = {"Partition", "Molecular Weight"};
            String[][] data = new String[1][1];
            JTable table = new JTable(data, colNames);
            table.setPreferredScrollableViewportSize(new Dimension(220, 401));
            //table.setEnabled(false);
            table.setRowSelectionAllowed(false);
            table.getTableHeader().setResizingAllowed(false);
            table.getTableHeader().setReorderingAllowed(false);
            resSP = new JScrollPane(table);
            //resSP.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
        private String[][] getLadder(File file) {
            String line;
            String[] temp = new String[2];
            String[][] sA = new String[30][2];
            int x = 0;
            try {
                BufferedReader reader = new BufferedReader(
                        new FileReader(file));
                while ((line = reader.readLine()) != null) {
                    if (line.length() > 0) {
                        temp = line.split("\\t");
                        sA[x][0] = temp[0];
                        sA[x][1] = temp[1];
                        x++;
            catch (IOException e) {
                System.out.println(e.getStackTrace());
                System.out.println(e.getMessage());
            String[][] tempArr = new String[x][2];
            for (int y=0; y<x; y++) {
                tempArr[y][0] = sA[y][0];
                tempArr[y][1] = sA[y][1];
            return tempArr;
        public static void main(String[] args) {
            Main black = new Main();
    }There are labels and textfields and such but I've cut them out because it seems that having 2 JTables causes the problem to happen.
    Am I doing something wrong?
    Thanks.
    Desmond

    Oh damn I forgot about that, sorry.
    Here is the code again (amended). I've added all the JComponents and made it independent of external sources.
    Does anyone else have this problem or is it only me?
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import javax.swing.*;
    import javax.swing.table.TableColumn;
    public class Main {
        //Variable declarations
        private JFrame f;
        private JScrollPane ladderSP, resSP;
        private JPanel p0, p1;
        public Main() {
            createTable();
            createResTable();
            createPanelZero();
            createPanelOne();
            createAndShowGUI();
        private void createAndShowGUI() {
            f = new JFrame("Calculate MW");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.setLayout(new GridLayout(1,2));
            f.setLocation(100, 100);
            f.add(p0);
            f.add(p1);
            f.pack();
            f.setResizable(false);
            f.setVisible(true);
        private void createPanelZero() {
            p0 = new JPanel(new GridBagLayout());
            p0.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
            //set global gridbag constraints
            GridBagConstraints c = new GridBagConstraints();
            c.anchor = GridBagConstraints.EAST;
            c.insets = new Insets(1, 1, 0, 1);
            //length label
            JLabel lengthLabel = new JLabel("Length (cm): ");
            c.gridx = 0;
            c.gridy = 0;
            p0.add(lengthLabel, c);
            //length text field
            JTextField lengthTF = new JTextField();
            lengthTF = setObjSize(lengthTF);
            c.gridx = 1;
            c.gridy = 0;
            p0.add(lengthTF, c);
            //partition label
            JLabel partitionLabel = new JLabel("Number of partititons: ");
            c.gridx = 0;
            c.gridy = 1;
            p0.add(partitionLabel, c);
            //partition text field
            JTextField partitionTF = new JTextField();
            partitionTF = setObjSize(partitionTF);
            c.gridx = 1;
            c.gridy = 1;
            p0.add(partitionTF, c);
            //ladder label
            JLabel ladderLabel = new JLabel("Ladder: ");
            c.gridx = 0;
            c.gridy = 2;
            p0.add(ladderLabel, c);
            //ladder combo box
            JComboBox ladderCB = new JComboBox();
            Dimension d = new Dimension(80, 23);
            ladderCB.setPreferredSize(d);
            ladderCB.setMaximumSize(d);
            ladderCB.setMinimumSize(d);
            c.gridx = 1;
            c.gridy = 2;
            p0.add(ladderCB, c);
            //calculate button
            JButton button = new JButton("Calculate");
            button.addActionListener(new ActionListener() {
               public void actionPerformed(ActionEvent e) {
                   //blah
            c.gridwidth = 2;
            c.fill = GridBagConstraints.HORIZONTAL;
            c.gridx = 0;
            c.gridy = 3;
            p0.add(button, c);
            //table
            c.gridx = 0;
            c.gridy = 4;
            p0.add(ladderSP, c);       
        private void createPanelOne() {
            p1 = new JPanel(new GridLayout(1,1));
            p1.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
            p1.add(resSP);
        private JTextField setObjSize (JTextField com) {
            Dimension d = new Dimension(80, 23);
            com.setPreferredSize(d);
            com.setMaximumSize(d);
            com.setMinimumSize(d);
            return com;
        private void createTable() {
            // Variables
            String[] colNames = {"Molecular Weight", "Length (cm)"};
            String[][] data = {
                {"220", "2.1"},
                {"160", "2.7"},
                {"120", "3.4"},
                {"100", "3.75"},
                {"90", "3.95"}
            JTable table = new JTable(data, colNames);
            table.setPreferredScrollableViewportSize(new Dimension(220, 300));
            // Set 1st column uneditable
            JTextField tf = new JTextField();
            tf.setEditable(false);
            TableColumn wtCol = table.getColumnModel().getColumn(0);
            wtCol.setCellEditor(new DefaultCellEditor(tf));
            // Set the table width
            table.setColumnSelectionAllowed(false);
            table.getTableHeader().setResizingAllowed(false); //not allowing resizing of columns
            table.getTableHeader().setReorderingAllowed(false); //not allowing reordering of columns
            table.setRowSelectionAllowed(false);
            ladderSP = new JScrollPane(table);
        private void createResTable() {
            String[] colNames = {"Partition", "Molecular Weight"};
            String[][] data = new String[1][1];
            JTable table = new JTable(data, colNames);
            table.setPreferredScrollableViewportSize(new Dimension(220, 401));
            table.setEnabled(false);
            table.setRowSelectionAllowed(false);
            table.getTableHeader().setResizingAllowed(false);
            table.getTableHeader().setReorderingAllowed(false);
            resSP = new JScrollPane(table);
        public static void main(String[] args) {
            Main black = new Main();
    }

Maybe you are looking for