Datatable header with a lot of columns

I have a problem: I want to create a datable like Microsoft Excel, and in a <h:column> of datatable, I want to split this column to 3 child columns. So header of this column has 1 merged row, and 1 row with 3 columns.
This is my simulated header:
| Merged row |
| Child row 1 | Child row 2 | Child row 3 |
How to create this header? Please help me. Thanks
TNTVN

use <f:facet name="header" />
example
<h:panelGrid columns="3">
<f:facet name="header">
<h:outputText value="Merged row" />
</f:facet>
<h:outputText value="Child row 1" />
<h:outputText value="Child row 2" />
<h:outputText value="Child row 3" />
</h:panelGrid>

Similar Messages

  • Problem with buttons in datatable header

    Hi
    I have command buttons in the datatable header .When I display the data in columns there is a gap between buttons .I want the buttons should be stretched automatically along with column data there should not be no gap between buttons regardless how big the data is in each column.
    Can anybody help me asap.
    Thanks.

    This issue is that the second header is an instance of the first, so all unmanaged relative code breaks. I would hazzard a guess to say that your add code looks like "$.parent.row1.instanceManager.addInstance(1)." This will break, as the "second" header row no longer sees the 'table' element as it's parent.
    Changing to code to a static reference will fix it... i.e. xfa.form.form1.table1.row1.instanceManager.addInstance(1).
    This should solve it for you... if not, let me know.
    - Scott

  • JTable - Check box in column header with sorting

    Hello
    I have 3 problems/questions.
    1. When adding sorting to a table with
    setAutoCreateRowSorter(true);and you click on a column header, normally a sorting arrow will appear, and indicate in what direction its sorting,
    but in the column head with the checkbox, even though the sorting works, the arrow will never appear. Is there anyway to fix this?
    2. Is there anyway to get the checkboxes in the table cells to be aligned left (I dont mean the columnheader checkbox, but the ones below)?
    3. When you click on the columnheader to either sort or check the checkbox, you will have to wait about a second between each click, or else it won't react and won't sort. sometimes you will have to click twice for it to react. If you click a lot of times fast, then it won't react until you stop for a second, and click again, though it will react only on the first click, but not the secont, third, fourh, and so on, until you stop for a second. Is there anyway to fix this, or atleast make it have a better reaction time?
    This is the code for creating the table:
    public class Example extends JFrame{
        private Container container;
        private JTable exampleTable;
        public Example(){
            container = getContentPane();
            ExamleTableModel examleTableModel = new ExamleTableModel();
            exampleTable = new JTable(examleTableModel);
            TableColumn tc = exampleTable.getColumnModel().getColumn(0);
            tc.setCellEditor(exampleTable.getDefaultEditor(Boolean.class)); 
            tc.setCellRenderer(exampleTable.getDefaultRenderer(Boolean.class)); 
            tc.setHeaderRenderer(new CheckBoxHeader(new MyItemListener()));
            container.add(new JScrollPane(exampleTable), BorderLayout.SOUTH);
            exampleTable.setAutoCreateRowSorter(true);
            setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );       
            this.pack();
            setSize(500,500);
            setVisible(true);
        }This is the code for the checkboxheader:
        class MyItemListener implements ItemListener 
                public void itemStateChanged(ItemEvent e) { 
                    Object source = e.getSource(); 
                    if (source instanceof AbstractButton == false) return; 
                    boolean checked = e.getStateChange() == ItemEvent.SELECTED; 
                    for(int a = 0, b = exampleTable.getRowCount(); a < b; a++) { 
                        for(int c = 0, d = exampleTable.getRowCount(); c < d; c++) { 
                            if(exampleTable.getColumnName(c).equals("")){
                                exampleTable.setValueAt(new Boolean(checked),a,c);
        class CheckBoxHeader extends JCheckBox 
            implements TableCellRenderer, MouseListener {
            protected CheckBoxHeader rendererComponent; 
            protected int column; 
            protected boolean mousePressed = false; 
            public CheckBoxHeader(ItemListener itemListener) { 
                rendererComponent = this; 
                this.setHorizontalAlignment(JLabel.LEFT);
                rendererComponent.addItemListener(itemListener); 
            public Component getTableCellRendererComponent( 
                    JTable table, Object value, 
                    boolean isSelected, boolean hasFocus, int row, int column) { 
                if (table != null) { 
                    JTableHeader header = table.getTableHeader(); 
                    if (header != null) { 
                        rendererComponent.setForeground(header.getForeground()); 
                        rendererComponent.setBackground(header.getBackground()); 
                        rendererComponent.setFont(header.getFont()); 
                        header.addMouseListener(rendererComponent); 
                setColumn(column); 
                rendererComponent.setText("");
                setBorder(UIManager.getBorder("TableHeader.cellBorder")); 
                return rendererComponent; 
            protected void setColumn(int column){this.column = column;} 
            public int getColumn(){return column;} 
            protected void handleClickEvent(MouseEvent e) { 
                if (mousePressed) { 
                    mousePressed=false; 
                    JTableHeader header = (JTableHeader)(e.getSource()); 
                    JTable tableView = header.getTable(); 
                    TableColumnModel columnModel = tableView.getColumnModel(); 
                    int viewColumn = columnModel.getColumnIndexAtX(e.getX()); 
                    int column = tableView.convertColumnIndexToModel(viewColumn); 
                    if (viewColumn == this.column && e.getClickCount() == 1 && column != -1) { 
                        doClick(); 
            public void mouseClicked(MouseEvent e) { 
                boolean active=true;
                JTableHeader header = (JTableHeader)(e.getSource()); 
                switch (e.getID()) {
                case MouseEvent.MOUSE_CLICKED:
                case MouseEvent.MOUSE_PRESSED:
                case MouseEvent.MOUSE_RELEASED:
                    JTable tableView = header.getTable();
                    TableColumnModel columnModel = tableView.getColumnModel();
                    int viewColumn = columnModel.getColumnIndexAtX(e.getX());
                    int column = tableView.convertColumnIndexToModel(viewColumn);
                    Rectangle bounds = tableView.getCellRect(-1, column, false);
                    if (e.getX() > bounds.x + 16) { // only if one the checkbox
                        if (e.getID() == MouseEvent.MOUSE_CLICKED) {active = false;}
                    }else{active=true;}
                if(active){
                    handleClickEvent(e); 
                    ((JTableHeader)e.getSource()).repaint();   
            public void mousePressed(MouseEvent e){mousePressed = true;} 
            public void mouseReleased(MouseEvent e){} 
            public void mouseEntered(MouseEvent e){} 
            public void mouseExited(MouseEvent e){} 
    }If you want the code for the ExamleTableModel, I will post it if you ask (having trouble with the character limit).

    What are you supposed to cast it to? I might have tried to cast it to something wrong.
    I tried
    TableCellRenderer tcr = table.getDefaultRenderer(Boolean.class);
    ((DefaultTableCellRenderer)tcr).setHorizontalAlignment(SwingConstants.LEFT);and that gave me a ClassCastException. But I might have been trying to cast it to the wrong thing.

  • ALV column header with multiple rows and ALV column header span

    How could I have in an ALV a column header on several lines and/or a column header that spans on multiple columns?
    i.e. I would like to have in an ALV two columns, each with it's own distinct header and additionally another column header for both of the columns, that spans across both columns. How could I program this?

    Hi,
    follow below mentioned code
    SET THE LABEL OF THE COLUMN
    DATA: hr_weeknum TYPE REF TO cl_salv_wd_column_header.
    CALL METHOD lr_weeknum->get_header
    RECEIVING
    value = hr_weeknum.
    CALL METHOD lr_weeknum->set_resizable
    EXPORTING
    value = abap_false.
    hr_weeknum->set_prop_ddic_binding_field(
    property = if_salv_wd_c_ddic_binding=>bind_prop_text
    value = if_salv_wd_c_ddic_binding=>ddic_bind_none ).
    set the text of the column
    CALL METHOD hr_weeknum->set_text
    EXPORTING
    value = 'C Form'.
    Regards,
    Srini.

  • Tabular Form based on table with lots of columns - how to avoid scrollbar?

    Hi everybody,
    I'm an old Forms and VERY new APEX user. My problem is the following: I have to migrate a form application to APEX.
    The form is based on a table with lots of columns. In Forms you can spread the data over different tab pages.
    How can I realize s.th similar in APEX? I definitely don't want to use a horizontal scroll bar...
    Thanks in advance
    Hilke

    If the primary key is created by the user themselves (which is not recommended, you should have another ID which the user sees which would be the varchar2 and keep the primary key as is, the user really shouldn't ever edit the primary key) then all you need to do is make sure that the table is not populated with a primary key in the wizard and then make sure that you cannot insert a null into your varchar primary key text field.
    IF you're doing it this way I would make a validation on the page which would run off a SQL Exists validation, something along the lines of
    SELECT <primary key column>
    FROM <your table>
    WHERE upper(<primary key column>) = upper(<text field containing user input>);
    and if it already exists, fire the validation claiming that it already exists and to come up with a new primary key.
    Like I said if you really should have a primary key which the database refers to each individual record itself and then have an almost pseudo-primary key that the user can use. For example in the table it would look like this:
    TABLE1
    table_id (this is the primary key which you should NOT change)
    user_table_id (this is the pretend primary key which the user can change)
    other_columns
    etc
    etc
    hope this helps in some way

  • Datatable header display issue

    Hi,
    I need to display more then one component in the header of a datatable. Currently, we are able to display the table along with the header values using datatable. Next to the header we want to display 2 icons, one to denote sorted by descending and another to denote that
    table values are sorted by ascending. We tried some thing like as show below
    <h:dataTable styleClass="dataTable" value="#{list}" var="plist">
    <h:column>
    <f:facet name="header">
    <h:commandLink action="#{form.sortDescending}">
         <h:graphicImage value="/descending.jpg"/>
    </h:commandLink>
    <h:outputText value="HeaderDisplayName" ></h:outputText>
    <h:commandLink action="#{form.sortAscending}">
         <h:graphicImage value="/ascending.jpg"/>
    </h:commandLink>
    </f:facet>
    <h:outputText id="value" value="#{list.value}" />
    </h:column>
    when I execute the above code, I get to see only the descending image.
    The header name and ascending image are not visible. Could you please help me resolve this issue?
    Thank you,
    DargonHorse

    you should use one component inside a facet.. So, you can solve your problem by encapsulating all that command links and outputtext inside a jsppanel component.. like;
    <f:facet name="header">
    <jsppanel>
    <h:commandLink descending...>
    <h:outputText header >
    <h:commandLink ascending... >
    <jsppanel />
    </f:facet>

  • t:dataTable scrollable with fixed headers

    I need to make my dataTable scrollable with fixed headers, I have seen few solutions like having 2 data Tables one for headers and the other for columns and one more solution is CSS
    In the first solution the column widths in the both tables doesn't match( I think this can be fine tuned to have a fixed column size)
    Can some one help me out in doing this with CSS.

    I did some thing like this, please help me out my columns of botht ables doesn't match
    <htm:table>
    <htm:body>
    <htm:tr>
    <htm:td>
    <t:div>
    <t:div>
    <t:dataTable
         renderedIfEmpty="false"
         preserveDataModel="false"
         preserveSort="true"
         varDetailToggler="detailToggler"
         headerClass="alignLeft"
         rowClasses="oddTableRow,evenTableRow"
         columnClasses="lastName,namePrefix,firstName,middleName,nameSuffix,dirType,orgName,county,city,state,valid,select"
         rows="1"
         value="#{result.result}"
         var="legalProfessional">
    <t:column defaultSorted="false" sortable="true">
              <f:facet name="header">
                   <h:outputText value="Last Name" style="font-size:8pt;" />
              </f:facet>
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <f:facet name="header">
                   <h:outputText value="Name Prefix" style="font-size:8pt;" />
              </f:facet>
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <f:facet name="header">
                   <h:outputText value="First Name" style="font-size:8pt;" />
    </f:facet>
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <f:facet name="header">
                   <h:outputText value="Middle Name" style="font-size:8pt;" />
              </f:facet>
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <f:facet name="header">
                   <h:outputText value="Name Suffix" style="font-size:8pt;" />
              </f:facet>
         </t:column>
         <t:column >
              <f:facet name="header">
                   <h:outputText value="Dir Type" style="font-size:8pt;" />
              </f:facet>
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <f:facet name="header">
                   <h:outputText value="Organization Name" style="font-size:8pt;" />
              </f:facet>
                   </t:column>
         <t:column defaultSorted="false" sortable="true">
              <f:facet name="header">
                   <h:outputText value="County" style="font-size:8pt;" />
              </f:facet>
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <f:facet name="header">
                   <h:outputText value="City" style="font-size:8pt;" />
              </f:facet>
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <f:facet name="header">
                   <h:outputText value="State" style="font-size:8pt;" />
              </f:facet>
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <f:facet name="header">
                   <h:outputText value="Valid" style="font-size:8pt;" />
              </f:facet>
         </t:column>
         <t:column rendered="#{resultPage eq resultsBean.pageSearch}" defaultSorted="false" sortable="true">
              <f:facet name="header">
                   <h:outputText value="Select" style="font-size:8pt;" />
              </f:facet>
         </t:column>
    </t:dataTable>
    </t:div>
    <t:div style="overflow:auto;height:50px">
    <t:dataTable
         renderedIfEmpty="false"
         preserveDataModel="false"
         preserveSort="true"
         varDetailToggler="detailToggler"
         headerClass="alignLeft"
         rowClasses="evenTableRow,oddTableRow"
         columnClasses="lastName,namePrefix,firstName,middleName,nameSuffix,dirType,orgName,county,city,state,valid,select"
         rows="#{sessionUserBean.user.resultsPerPageOption}"
         value="#{result.result}"
         var="legalProfessional">
         <t:column defaultSorted="false" sortable="true">
              <h:outputText value="#{legalProfessional.lastName}" />
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <h:outputText value="#{legalProfessional.namePrefix}" />
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <h:outputText value="#{legalProfessional.firstName}" />
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <h:outputText value="#{legalProfessional.middleName}" />
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <h:outputText value="#{legalProfessional.nameSuffix}" />
         </t:column>
         <t:column >     
              <h:outputText value="#{legalProfessional.directoryType}" />
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <h:commandLink action="#{legalOrganizationSearchByNameBean.searchLegalOrganizationsByName}">
                 <h:outputText value="#{legalProfessional.relatedOrgNormName}" />
                   <t:updateActionListener property="#{legalOrganizationSearchByNameBean.name}" value="#{legalProfessional.organization}" />
                  <t:updateActionListener property="#{legalOrganizationSearchByNameBean.resultKey}" value="#{legalOrganizationBean.legalOrganizationsSearchResultKey}" />               
              </h:commandLink>
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <h:outputText value="#{legalProfessional.county}" />
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <h:outputText value="#{legalProfessional.city}" />
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <h:outputText value="#{legalProfessional.normRegion}" />
         </t:column>
         <t:column defaultSorted="false" sortable="true">
              <t:graphicImage value="images/yellow_check.jpg" border="0" />
         </t:column>
         <t:column rendered="#{resultPage eq resultsBean.pageSearch}" defaultSorted="false" sortable="true">
              <t:commandButton
                   id="viewLegalProfessionalCommand"
                   forceId="true"
                   title="#{bundle.view_entity_title}"
                   value="#{bundle.text_view_value}"
                   action="#{legalProfessionalBean.actionGotoView}">
                   <t:updateActionListener property="#{heavyWeightBean.uuid}" value="#{legalProfessional.profileUuid}" />
                   <t:updateActionListener property="#{legalProfessionalBean.LPAEntity}" value="#{legalProfessional}" />
              </t:commandButton>
         </t:column>
         <t:column rendered="#{pageStatus eq resultsBean.pageAdd || pageStatus eq resultsBean.pageEdit}">
              <!-- Employment relationship with general -->
              <t:commandButton
                   title="Make Employment Relationship."
                   rendered="#{result.key eq legalOrganizationBean.legalProfessionalsResultKey}"
                   value="Employment"
                   action="#{legalOrganizationBean.actionMakeEmploymentRelationship}">
                   <t:updateActionListener property="#{legalOrganizationBean.selectedLPAEntity}" value="#{legalProfessional}" />
              </t:commandButton>
              </t:column>
    </t:dataTable>
    </t:div>
    </t:div>
    </htm:td>
    </htm:tr>
    </htm:body>
    </htm:table>{.lastName{
    width:100px;
    .namePrefix{
    width:100px;
    .firstName{
    width:100px;
    .middleName{
    width:100px;
    .nameSuffix{
    width:100px;
    .dirType{
    width:100px;
    .orgName{
    width:100px;
    .county{
    width:150px;
    .city{
    width:250px;
    .state{
    width:100px;
    .valid{
    width:100px;
    .select{
    width:100px;
    code}

  • Is there a way to create a heading with shading behind the text and thin lines above and below?

    I'm working with InDesign CS6, Windows 7.
    Is there a way, using paragraph rules, to create a heading with shading behind the text and thin lines above and below the text?
    I'd like to create headings that look like these:
    Thank you!

    I have a document where I almost do such, but without the fill. I use a Head Style which Spans Columns for this instance; it allows the haeds to flow and fill the width.
    Paragraph Rules above and below are turned on with plenty of offset.
    I tweaked my setting to accomodate your need - It required only one instance, not above and below, and changing the stroke to a double stroke. 
    It may be necessary to create a custom stroke to modify the proportion of stroke vs fill. There is a difference of thin-thin and  thick-thick, neither of which seemed perfect but might be dependent on the Character height.
    Creating custom strokes is accomplished via the Strokes Panel.

  • How to create a table with varied number of columns?

    I am trying to create a balance table. The colunms should include years between the start year and end year the user will input at run time. The rows will be the customers with outstanding balance in those years.
    If the user input years 2000 and 2002, the table should have columns 2000, 2001, 2002. But if the user input 2000 and 2001, the table will only have columns 2000 and 2001.
    Can I do it? How? Thanka a lot.

    Why did you create a new thread for this?
    How to create a table with varied number of columns?

  • How can i export the data to excel which has 2 tables with same number of columns & column names?

    Hi everyone, again landed up with a problem.
    After trying a lot to do it myself, finally decided to post here..
    I have created a form in form builder 6i, in which on clicking a button the data gets exported to excel sheet.
    It is working fine with a single table. The problem now is that i am unable to do the same with 2 tables.
    Because both the tables have same number of columns & column names.
    Below are 2 tables with column names:
    Table-1 (MONTHLY_PART_1)
    Table-2 (MONTHLY_PART_2)
    SL_NO
    SL_NO
    COMP
    COMP
    DUE_DATE
    DUE_DATE
    U-1
    U-1
    U-2
    U-2
    U-4
    U-4
    U-20
    U-20
    U-25
    U-25
    Since both the tables have same column names, I'm getting the following error :
    Error 402 at line 103, column 4
      alias required in SELECT list of cursor to avoid duplicate column names.
    So How can i export the data to excel which has 2 tables with same number of columns & column names?
    Should i paste the code? Should i post this query in 'SQL and PL/SQL' Forum?
    Help me with this please.
    Thank You.

    You'll have to *alias* your columns, not prefix it with the table names:
    $[CHE_TEST@asterix1_impl] r
      1  declare
      2    cursor cData is
      3      with data as (
      4        select 1 id, 'test1' val1, 'a' val2 from dual
      5        union all
      6        select 1 id, '1test' val1, 'b' val2 from dual
      7        union all
      8        select 2 id, 'test2' val1, 'a' val2 from dual
      9        union all
    10        select 2 id, '2test' val1, 'b' val2 from dual
    11      )
    12      select a.id, b.id, a.val1, b.val1, a.val2, b.val2
    13      from data a, data b
    14      where a.id = b.id
    15      and a.val2 = 'a'
    16      and b.val2 = 'b';
    17  begin
    18    for rData in cData loop
    19      null;
    20    end loop;
    21* end;
      for rData in cData loop
    ERROR at line 18:
    ORA-06550: line 18, column 3:
    PLS-00402: alias required in SELECT list of cursor to avoid duplicate column names
    ORA-06550: line 18, column 3:
    PL/SQL: Statement ignored
    $[CHE_TEST@asterix1_impl] r
      1  declare
      2    cursor cData is
      3      with data as (
      4        select 1 id, 'test1' val1, 'a' val2 from dual
      5        union all
      6        select 1 id, '1test' val1, 'b' val2 from dual
      7        union all
      8        select 2 id, 'test2' val1, 'a' val2 from dual
      9        union all
    10        select 2 id, '2test' val1, 'b' val2 from dual
    11      )
    12      select a.id a_id, b.id b_id, a.val1 a_val1, b.val1 b_val1, a.val2 a_val2, b.val2 b_val2
    13      from data a, data b
    14      where a.id = b.id
    15      and a.val2 = 'a'
    16      and b.val2 = 'b';
    17  begin
    18    for rData in cData loop
    19      null;
    20    end loop;
    21* end;
    PL/SQL procedure successfully completed.
    cheers

  • Excel download problem :--- Header data duplicating in unexpected  columns

    Guys, 
       I   am  able  to  download  the  data onto  Excel  with   Header  data  but  the Header data duplicating in unexpected  columns RHS  upto  all  the  line item columns  below....Below  is  partial   excerpt... 
    Please help....
    DATA:
           BEGIN OF excel_wa,
                posnr               TYPE  vbap-posnr,           "Line Item
                matnr               TYPE  vbap-matnr,           "Mat#
                pmatn               TYPE  vbap-pmatn,           "Pric Mat
                zansicat            TYPE  zmarall-zansicat,     "AnsiCat#
                zansigrd            TYPE  zmarall-zansigrd,     "Grade
                zcurrvaltnarea      TYPE  zco002-zcurrvaltnarea,"Val Area
                zcurrcstusd         TYPE  zco002-zcurrcstusd,   "Cost$
                zzbrndnm            TYPE  mara-zzbrndnm,        "Brand
                zqedscgrp           TYPE  zglbprc-zqedscgrp, "QE Disc Grp
                mstav               TYPE  mara-mstav,        "Status
                prodh               TYPE  vbap-prodh,        "Prod Heir
                kwmeng              TYPE  vbap-kwmeng,       "Qty
                lprc                TYPE  konv-kbetr,  "List Price ZBP1
                sprc                TYPE  konv-kbetr,  "Std Pric ZNAA,ZNAX
                netpr               TYPE  vbap-netpr,  "Quot price
                mrgn                TYPE  konv-kbetr,  "margin%
           END   OF excel_wa,
           BEGIN OF sema_wa,
            posnr            LIKE ws-xxlt VALUE 'STRDFT',
            matnr            LIKE ws-xxlt VALUE 'STRDFT',
            pmatn            LIKE ws-xxlt VALUE 'STRDFT',
            zansicat         LIKE ws-xxlt VALUE 'STRDFT',
            zansigrd         LIKE ws-xxlt VALUE 'STRDFT',
            zcurrvaltnarea   LIKE ws-xxlt VALUE 'STRDFT',
            zcurrcstusd      LIKE ws-xxlt VALUE 'STRDFT',
            zzbrndnm         LIKE ws-xxlt VALUE 'STRDFT',
            zqedscgrp        LIKE ws-xxlt VALUE 'STRDFT',
            mstav            LIKE ws-xxlt VALUE 'STRDFT',
            prodh            LIKE ws-xxlt VALUE 'STRDFT',
            kwmeng           LIKE ws-xxlt VALUE 'N00ADD',
            lprc             LIKE ws-xxlt VALUE 'N02ADD',
            sprc             LIKE ws-xxlt VALUE 'N03ADD',
            netpr            LIKE ws-xxlt VALUE 'N02ADD',
            mrgn             LIKE ws-xxlt VALUE 'N00ADD',
          END OF sema_wa,
          BEGIN OF clhd_wa,
            posnr            LIKE ws-xxlt VALUE 'LineItem#',
            matnr            LIKE ws-xxlt VALUE 'Mat#',
            pmatn            LIKE ws-xxlt VALUE 'VC Mat#',
            zansicat         LIKE ws-xxlt VALUE 'AnsiCat',
            zansigrd         LIKE ws-xxlt VALUE 'Grade',
            zcurrvaltnarea   LIKE ws-xxlt VALUE 'ValnArea',
            zcurrcstusd      LIKE ws-xxlt VALUE 'Currency',
            zzbrndnm         LIKE ws-xxlt VALUE 'Brand',
            zqedscgrp        LIKE ws-xxlt VALUE 'QE disc',
            mstav            LIKE ws-xxlt VALUE 'Status',
            prodh            LIKE ws-xxlt VALUE 'Prod Heir',
            kwmeng           LIKE ws-xxlt VALUE 'Qty',
            lprc             LIKE ws-xxlt VALUE 'List Pric',
            sprc             LIKE ws-xxlt VALUE 'St.Disc',
            netpr            LIKE ws-xxlt VALUE 'Quote Price',
            mrgn             LIKE ws-xxlt VALUE 'Margin%',
         END OF clhd_wa,
         BEGIN OF hdtxt1_wa,
            vbeln      LIKE ws-xxlt VALUE 'Quotation#',
            kunnr      LIKE ws-xxlt VALUE 'Quote Date',
            kvgr3      LIKE ws-xxlt VALUE 'Rep Date',
            pltyp      LIKE ws-xxlt VALUE 'Pric List Typ & Currency',
            waers      LIKE ws-xxlt VALUE 'Sold To',
            knuma      LIKE ws-xxlt VALUE 'Ship To',
            datab      LIKE ws-xxlt VALUE 'Top Parent',
            datbi      LIKE ws-xxlt VALUE 'Sales Org/Sales Dist/CPA',
            note       LIKE ws-xxlt VALUE 'Net Sales',
         END OF hdtxt1_wa,
         BEGIN OF hdtxt2_wa,
            vbeln      LIKE ws-xxlt VALUE '',"Quotation#',
            kunnr      LIKE ws-xxlt VALUE '',"Quote Date',
            kvgr3      LIKE ws-xxlt VALUE '',"Rep Date',
            pltyp      LIKE ws-xxlt VALUE '',"Pric List Typ & Currency',
            waers      LIKE ws-xxlt VALUE '',"Sold To',
            knuma      LIKE ws-xxlt VALUE '',"Ship To',
            datab      LIKE ws-xxlt VALUE '',"Top Parent',
            datbi      LIKE ws-xxlt VALUE '',"Sales Org/Sales Dist/CPA',
            note       LIKE ws-xxlt VALUE '',"Net Sales',
         END OF hdtxt2_wa.
    DATA:
          ivbap      LIKE  STANDARD TABLE OF ivbap_wa,
          imat       LIKE  STANDARD TABLE OF mat_wa,
          icurr      LIKE  STANDARD TABLE OF curr_wa,
          ikonv      LIKE  STANDARD TABLE OF konv_wa,
          ivbpa      LIKE  STANDARD TABLE OF ivbpa_wa,
          ikna1      LIKE  STANDARD TABLE OF kna1_wa,
          iresult    LIKE  STANDARD TABLE OF result_wa,
    *Excel tables
          iexcel     LIKE  STANDARD TABLE OF excel_wa,
          isema_wa   LIKE  gxxlt_s,
          it_sema    LIKE  STANDARD TABLE OF gxxlt_s,
          ihkey_wa   LIKE  gxxlt_h,
          it_hkey    LIKE  STANDARD TABLE OF gxxlt_h,
          iotxt_wa   LIKE  gxxlt_o,
          it_otext   LIKE  STANDARD TABLE OF gxxlt_o,
          iptxt_wa   LIKE  gxxlt_p,
          it_ptext   LIKE  STANDARD TABLE OF gxxlt_p,
          ivkey_wa   LIKE  gxxlt_v,
          it_vkey    LIKE  STANDARD TABLE OF gxxlt_v.
    *Field-Symbols
    FIELD-SYMBOLS:
          <vbap>  LIKE   ivbap_wa,
          <vbpa>  LIKE   ivbpa_wa,
          <mat>   LIKE   mat_wa,
          <sema_wa>,
          <clhd_wa>,
          <hdtxt1_wa>,
          <hdtxt2_wa>.
    *Constants
    CONSTANTS:
          c_auart   TYPE  vbak-auart  VALUE  'AG', "AG = Quotn
          c_parvw1  TYPE  vbpa-parvw  VALUE  'AG',
          c_parvw2  TYPE  vbpa-parvw  VALUE  'WE',
          c_parvw3  TYPE  vbpa-parvw  VALUE  'ZT',
          c_kappl   TYPE  konv-kappl  VALUE  'V',
          c_kschl1  TYPE  konv-kschl  VALUE  'ZBP1',
          c_kschl2  TYPE  konv-kschl  VALUE  'ZNAX',
          c_kschl3  TYPE  konv-kschl  VALUE  'ZNAA',
          c_psize   TYPE  i           VALUE  65535.
    *&      SELECTION-SCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE  text-001.
    SELECT-OPTIONS:
        s_vbeln  FOR  ws-vbeln NO INTERVALS NO-EXTENSION OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK a.
    *&      AT SELECTION-SCREEN.
    AT SELECTION-SCREEN.
      PERFORM validate_screen_entries.
    START-OF-SELECTION.
      PERFORM gather_quot_data.
      PERFORM gather_mat_data.
      PERFORM gather_ansi_data.
      PERFORM gather_customer_data.
      PERFORM gather_price_data.
      PERFORM process_consolidate_data.
    TOP-OF-PAGE.
      PERFORM write_header_data.
      PERFORM write_column_heading.
    END-OF-SELECTION.
      SET PF-STATUS 'XLS'.
      PERFORM display_output.
    AT USER-COMMAND.
      CASE sy-ucomm.
        WHEN 'XLS'.
          LOOP AT iresult INTO result_wa.
            CLEAR excel_wa.
            excel_wa-posnr       = result_wa-posnr.
            excel_wa-matnr       = result_wa-matnr.
            excel_wa-pmatn       = result_wa-pmatn.
            excel_wa-zansicat    = result_wa-zansicat.
            excel_wa-zansigrd    = result_wa-zansigrd.
            excel_wa-zcurrvaltnarea = result_wa-zcurrvaltnarea.
            excel_wa-zcurrcstusd = result_wa-zcurrcstusd.
            excel_wa-zzbrndnm    = result_wa-zzbrndnm.
            excel_wa-zqedscgrp   = result_wa-zqedscgrp.
            excel_wa-mstav       = result_wa-mstav.
            excel_wa-prodh       = result_wa-prodh.
            excel_wa-kwmeng      = result_wa-kwmeng.
            excel_wa-lprc        = result_wa-lprc.
            excel_wa-sprc        = result_wa-sprc.
            excel_wa-netpr       = result_wa-netpr.
            excel_wa-mrgn        = result_wa-mrgn.
            APPEND excel_wa TO iexcel.
          ENDLOOP.
          PERFORM set_up_xxl_structures.
          PERFORM download_xxl.
        WHEN OTHERS.
      ENDCASE.
      FREE: ivbpa, imat, ikna1, ivbap, ikonv, iresult, ws.
    *&      Form  set_up_xxl_structures
          text
    FORM set_up_xxl_structures.
      REFRESH: it_otext, it_sema, it_hkey, it_vkey.
      CLEAR:   result_wa, ivbpa_wa, it_otext, ws.
      MOVE  sy-repid  TO ws-title-repid.
      MOVE 'Section'  TO ws-title-reppart.
      WRITE sy-uzeit  TO ws-title-uzeit USING EDIT MASK '__:__'.
      MOVE  ws-title  TO ws-xxl-title.
      READ TABLE iresult INTO result_wa
                         WITH KEY vbeln = s_vbeln-low.
      READ  TABLE  ivbpa INTO ivbpa_wa
                         WITH KEY vbeln = s_vbeln-low
                                  parvw = 'AG'.
      CONCATENATE ivbpa_wa-kunnr '/'
                  ivbpa_wa-name1 INTO ws-soldto.
      CLEAR ivbpa_wa.
      READ  TABLE  ivbpa INTO ivbpa_wa
                         WITH KEY vbeln = s_vbeln-low
                                  parvw = 'WE'.
      CONCATENATE ivbpa_wa-kunnr '/'
                  ivbpa_wa-name1 INTO ws-shipto.
      CLEAR ivbpa_wa.
      READ  TABLE  ivbpa INTO ivbpa_wa
                         WITH KEY vbeln = s_vbeln-low
                                  parvw = 'ZT'.
      IF   ivbpa_wa-kunnr EQ space.
        CLEAR ivbpa_wa.
        READ  TABLE  ivbpa INTO ivbpa_wa
                           WITH KEY vbeln = s_vbeln-low
                                    parvw = 'AG'.
      ENDIF.
      CONCATENATE ivbpa_wa-kunnr '/'
                  ivbpa_wa-name1 INTO ws-tparent.
      DO.
        CLEAR: isema_wa, ihkey_wa, iotxt_wa, iptxt_wa, ivkey_wa.
        ASSIGN COMPONENT sy-index OF STRUCTURE hdtxt1_wa TO <hdtxt1_wa>.
        ASSIGN COMPONENT sy-index OF STRUCTURE hdtxt2_wa TO <hdtxt2_wa>.
        IF sy-subrc <> 0.
          EXIT.
        ENDIF.
        CASE <hdtxt1_wa>.
          WHEN 'Quotation#'.
            <hdtxt2_wa> = 'Quotation#'.
          WHEN 'Quote Date'.
            <hdtxt2_wa> = 'Quote Date'.
          WHEN 'Rep Date'.
            <hdtxt2_wa> = 'Rep Date'.
          WHEN 'Pric List Typ & Currency'.
            <hdtxt2_wa> = 'Pric List Typ & Currency'.
          WHEN 'Sold To'.
            <hdtxt2_wa> = 'Sold To'.
          WHEN 'Ship To'.
            <hdtxt2_wa> = 'Ship To'.
          WHEN 'Top Parent'.
            <hdtxt2_wa> = 'Top Parent'.
          WHEN 'Sales Org/Sales Dist/CPA'.
            <hdtxt2_wa> = 'Sales Org/Sales Dist/CPA'.
          WHEN 'Net Sales'.
            <hdtxt2_wa> = 'Net Sales'.
        ENDCASE.
        MOVE : 1           TO ihkey_wa-col_no,
               sy-index    TO ihkey_wa-row_no,
               <hdtxt2_wa> TO ihkey_wa-col_name.
        APPEND ihkey_wa TO it_hkey.
        CLEAR ihkey_wa.
        CASE <hdtxt1_wa>.
          WHEN 'Quotation#'.
            <hdtxt2_wa> = result_wa-vbeln.
          WHEN 'Quote Date'.
            WRITE result_wa-erdat TO ws-dat1.
            <hdtxt2_wa> = ws-dat1.
          WHEN 'Rep Date'.
            WRITE result_wa-repdt TO ws-dat2.
            <hdtxt2_wa> = ws-dat2.
          WHEN 'Pric List Typ & Currency'.
            CONCATENATE result_wa-pltyp '/'
                        result_wa-waers INTO <hdtxt2_wa>.
          WHEN 'Sold To'.
            <hdtxt2_wa> = ws-soldto.
          WHEN 'Ship To'.
            <hdtxt2_wa> = ws-shipto.
          WHEN 'Top Parent'.
            <hdtxt2_wa> = ws-tparent.
          WHEN 'Sales Org/Sales Dist/CPA'.
            CONCATENATE result_wa-vkorg  '/'
                        result_wa-bzirk  '/'
                        ivbpa_wa-kvgr3
                        INTO <hdtxt2_wa>.
          WHEN 'Net Sales'.
            <hdtxt2_wa> = result_wa-netwr.
        ENDCASE.
        MOVE : 2           TO ihkey_wa-col_no,
               sy-index    TO ihkey_wa-row_no,
               <hdtxt2_wa> TO ihkey_wa-col_name.
        APPEND ihkey_wa TO it_hkey.
      ENDDO.
      DO.
        CLEAR: isema_wa, ihkey_wa, iotxt_wa, iptxt_wa, ivkey_wa.
        ASSIGN COMPONENT sy-index OF STRUCTURE sema_wa TO <sema_wa>.
        IF sy-subrc NE 0.
          ASSIGN COMPONENT sy-index OF STRUCTURE clhd_wa TO <clhd_wa>.
          IF sy-subrc EQ 0.
            MESSAGE e193 WITH 'OFIL Structures out of synch-Contact IT'.
          ENDIF.
          EXIT.
        ENDIF.
        ASSIGN COMPONENT sy-index OF STRUCTURE clhd_wa TO <clhd_wa>.
        IF NOT <sema_wa> EQ 'NOSHOW'.
          ADD 1 TO ws-xxl-tabix.
          MOVE: ws-xxl-tabix   TO isema_wa-col_no,
                <sema_wa>(3)   TO isema_wa-col_typ,
                <sema_wa>+3(3) TO isema_wa-col_ops,
                ws-xxl-tabix   TO isema_wa-col_src.
          APPEND isema_wa TO it_sema.
          IF ws-xxl-tabix LE ws-xxl-vrtkeys.
            MOVE: ws-xxl-tabix TO ivkey_wa-col_no,
                  <clhd_wa>    TO ivkey_wa-col_name.
            APPEND ivkey_wa TO it_vkey.
          ELSE.
            ADD 1 TO ws-xxl-attcols.
            MOVE: ws-xxl-attcols TO ihkey_wa-col_no,
                  10             TO ihkey_wa-row_no,
                  <clhd_wa>      TO ihkey_wa-col_name.
            APPEND ihkey_wa TO it_hkey.
          ENDIF.
        ENDIF.
      ENDDO.
    ENDFORM.                    " set_up_xxl_structures
    *&      Form  download_xxl
          text
         -->P_IHQEXCEL  text
    FORM download_xxl.  "TABLES  iexcel STRUCTURE excel_wa.
      DESCRIBE TABLE iexcel LINES ws-xxl-count.
      ws-xxl-from = 1.
      ws-xxl-to = c_psize.
      DO.
        IF ws-xxl-from GT ws-xxl-count.
          EXIT.
        ENDIF.
        IF ws-xxl-to GT ws-xxl-count.
          MOVE ws-xxl-count TO ws-xxl-to.
        ENDIF.
        ADD 1 TO ws-xxl-suffix.
        MOVE ws-xxl-suffix TO: ws-xxl-name+6(2),
                               ws-xxl-title+36(2).
        CALL FUNCTION 'XXL_FULL_API'
             EXPORTING
                  n_vrt_keys       = ws-xxl-vrtkeys
                  n_att_cols       = ws-xxl-attcols
                  n_hrz_keys       = ws-xxl-hrzkeys
                  data_starting_at = ws-xxl-from
                  data_ending_at   = ws-xxl-to
                  filename         = ws-xxl-name
                  header_1         = space
                  sema_type        = 'X'
                  so_title         = ws-xxl-title
             TABLES
                  data             = iexcel
                  hkey             = it_hkey
                  online_text      = it_otext
                  print_text       = it_ptext
                  sema             = it_sema
                  vkey             = it_vkey
             EXCEPTIONS
                  data_too_big     = 1
                  file_open_error  = 2
                  file_write_error = 3
                  inv_winsys       = 4
                  inv_xxl          = 5.
        CASE sy-subrc.
          WHEN 1.
            MESSAGE e193 WITH 'dim_mismatch_data'.
          WHEN 2.
            MESSAGE e193 WITH 'file_open_error'.
          WHEN 3.
            MESSAGE e193 WITH 'file_write_error'.
          WHEN 4.
            MESSAGE e193 WITH 'inv_winsys'.
          WHEN 5.
            MESSAGE e193 WITH 'inv_xxl'.
        ENDCASE.
        ADD c_psize TO: ws-xxl-from,
                                ws-xxl-to.
      ENDDO.
    ENDFORM.                    " download_xxl

    Hello Friend,
    You can use GUI_DOWNLOAD FM to get the excel header if that's the only specific requirement.
    [Download Excel including header |Download Excel including header;
    Hope this helps.
    BR,
    Suhas

  • Reports with more than 100 columns

    I am using Apex 3.2. I am using a classic report with more than 100 columns. So to use the custom heading in the report, I exported the page,did modification in exported sql file and imported back.
    But when I am passing the parameters from a input screen for the first time either it is showing the all data avilable in the database or with only header. If I do the refresh in input screen and try it then it is working as intended. I am updating at the below loaction of the page.Let me know if I have to update anything more in the sql file.
    declare
    s varchar2(32767) := null;
    begin
    s := null;
    wwv_flow_api.create_report_columns (
    p_id=> 200100535534034253 + wwv_flow_api.g_id_offset,
    p_region_id=> 2003453533453 + wwv_flow_api.g_id_offset,
    p_flow_id=> wwv_flow.g_flow_id,
    p_query_column_id=> 157,
    p_form_element_id=> null,
    p_column_alias=> 'XYZ',
    p_column_display_sequence=> 157,
    p_column_heading=> 'XYZ 123',
    p_column_alignment=>'LEFT',
    p_disable_sort_column=>'Y',
    p_sum_column=> 'N',
    p_hidden_column=> 'N',
    p_display_as=>'WITHOUT_MODIFICATION',
    p_pk_col_source=> s,
    p_column_comment=>'');
    end;
    /

    Hi,
    Its just a general thought and I realize you know your application and user community better I do, but do you think your users are going to be very happy when they are presented with a report with more than a hundred columns? Have you considered maybe presenting the data in some sort of rolled up form from which the user can then drill down to the data they are particularly interested in. Also, I'm sure your LAN administrator would be happy not to see 100+ column by x number row reports being regularly shipped across the network.
    Also, 100+ column reports suggests tables with 100+ columns which are probably not designed in a very relationally compliant way. I find that good DB design usually results in applications that have to make less compromises, such as hacking export files in order to fool the API into making ridiculous, unsupported and unsupportable compromises.
    Just a thought..................
    Regards
    Andre

  • Table with varying number of columns

    Hello experts,
    my issue:
    I need to print a table with varying number of columns. Depending on if all cells of a certain column are initial the
    whole column should disappear. Hiding is not enough.
    If this columns is in the middle of the table the following columns should move left to fill the gap.
    my approach: (maybe there is an easier one)
    There are 4 different possible situations. My approach was to create 4 different tables with different amount of
    columns. In the interface I fill the table that is really needed from the source table data and fill a flag that characteristics
    the situation, possible values (1,2,3,4).
    In the form I'd like to print the appropriate table depending on the situations.
    my problem:
    How to place all 4 possible tables lying upon each other in the form and print only the needed one depending on the flag value?
    my question:
    Is my approach ok? Or is there an easier one?
    If it is ok. How can I solve the problem regarding printing the right table.
    Thanks in advance!
    Heinz

    Hi Heinz,
    You can handle it with FormCalc Script at initialization.
    Suppose you have a table with name TABLE having a header HEADER and data row DATA:
    TABLE-->HEADER(Cell1...Cell2...Cell3...Cell4)
              --->DATA(Cell1...Cell2...Cell3...Cell4)
    Suppose you want to hide Cell3 for null values, then write below code at initialization of DATA:
    if(DATA[*].Cell3.rawValue eq null)
    then
    DATA[*].Cell3.presence = "hidden"
    HEADER.Cell3.presence = "hidden"
    else
    DATA[*].Cell3.presence = "visible"
    HEADER.Cell3.presence = "visible"
    endif
    Hope it would help.
    Regards,
    Vaibhav

  • C++ CFX - return string type with a lot of '\0'

    Hello
    Header of the function for setting data in query is:
    void CCFXQuery::SetData(int iRow, int iColumn, LPCSTR
    lpszData).
    How to set field of query, or some other return value with
    the "string" type which may conatain string with a lot of '\0'
    signs? SetData function somehow has to know (LPCSTR argument type
    which is pointer), where string is ending, so that's why it's
    getting only string '\0' terminated. If I pass value, function gets
    only that part to the first appearance of that sign. How to return
    to the user all data, or in which function it can be self defined
    (length of returned value)?
    Thanks

    Hi Mercedes
    Change the Isolation property of the iview to url and try to give height as fixed.
    You can adjust the height of iview by adjustHeight method.
    adjustHeight(document.getElementById(<id of ur iview>),<heightyouneeded>).May be this function has to be invoked from separate iview.
    Use this link for reference.
    Automatic Height of iView/Page & Footer in Framework page
    Regards
    Geogi
    Message was edited by: Geogi Luke

  • Report crashes when table having lots of columns and rows, please help

    Hi, Everyone,
    Our system is Apex 4.0.2 with Oracle 11GR2 and Oracle HTTP server in the middle.
    We have a very simple report drawing data from a table with 46 columns ( no binary data) , when the maximun rows is 500, everything is fine; but if I increase the maximum rows to 500000, it crashes repeatedly. We are doing third party database integration , our goal is using Apex simple reports with CSV exporting capability to export tables into text files which can be imported by other databases. I know there are other ways to export table into CSV file, but APEX report seems very easy to use, best of all, non programmers can use it too....
    Our experience shows that: if the table has few columns, like 10 columns, we can use report to dump large number of rows like 200000, but we can't use APEX report for table with lots of columns. the HTTP server log doesn't show any meaningful information. ( we use the Apex Utilities like UNLOAD data with the same crash result).
    Any suggestions are greatly appreciated.

    "Disk cannot be read from or written to" error syncing iPod in iTunes.

Maybe you are looking for

  • HT3472 does apple iphone 5 earphone will support apple ipod 3 generation? my 3 gen ipod is not supporting

    does apple iphone 5 earphone will support apple ipod shuffle 3 generation? my 3 gen ipod is not supporting. please help me out to solve the issue.if any third party earphones support please let me know

  • Transfer data from Torch 9800 to Z10

    I'm trying to pass data from my 9800 to Z10 through BB Link, - I connect my 9800, when BB Link says "Device not supported by BB Link" I choose the "Transfer Data" option. - BB Link starts to copy the data from 9800 -  After the data copy from 9800, B

  • How to make list show up "selectively" on different regions?

    Hi, By default, "list" is in the Shared Component. Is there any way I can make the "list" NOT shared? Meaning that I want to control which "regions" the particular "lists" will show up or not. For example: On my APEX Home page, I want to have 5 Forms

  • Connected Query issue

    Hello - I've been working on creating a payroll report with tax balance and earnings data. I have a query for each set of data. Each set has an emplid and a balance_year as key fields. Since I can get all of the tax balance data in one record I am us

  • Advanced Search Results PHP

    Hello, I am designing my first Dynamic Website in PHP and WAMP and have so far managed to create a working Search Element on my website (search for 20mm on www.reese-test.co.uk ) It shows a linkable pic in "column 1" and Description in "column 2". Wh