How to make a 2-column text in sapscript via standard text?

Hello ABAP Gurus! I'm having a hard time thinking on how I'm going to display a two-column text in the MAIN window of the form Using Form Painter(se71) and Standard Text (SO10). Let's put it this way, the scenario is like you are formatting a paragraph on MS word in to two columns by Format > Columns > Two. What am I going to do  with this similar situation in SAP? Any help will be highly appreciated. Thanks

This is nothing with standard text.
Call READ_TEXT FM and here use two variables ,read first line and move to first variable ,again read second line and move to second variable.
Thanks
Seshu

Similar Messages

  • How to make a 2-column output in sapscript form

    Hello Abap Professionals!
    I have a sample standard text that has this content and layout:
    Part I : This is an example only.This is an example only.This is an example only.
    This is an example only.This is an example only.This is an example only.This is
    an example only.This is an example only.This is an example only.This is an example
    only.This is an example only.This is an example only.This is an example only.
    Part II : This is an example only.This is an example only.This is an example only.
    This is an example only.This is an example only.This is an example only.This is
    an example only.This is an example only.This is an example only.This is an example
    only.This is an example only.This is an example only.This is an example only.
    The problem is....
    HOW can I make it look like this in the MAIN Window of my Sapscript in Form (SE71)
    see the picture below:
    Link: [http://img122.imageshack.us/img122/9416/69640352uy2.jpg]
    -Don't mind the font.. just the format. I want it to be in 2-column and I have to include the standard text in the Main Window of the Form.
    Any help is highly appreciated,
    THANKS in ADVANCE.

    Take two page windows of type MAIN in your page, arrange the page windows as two pages, call the text element from your driver program and write this way in you SAP script...
    /E   <text element>
    /     Part I : This is an example only.This is an example only.This is an        example only. This is an example only.This is an example only.This is an example only.This is an example only.This is an example only.This is an example only.This is an example only.This is an example only.This is an example only.This is an example only.
    /:    NEW-WINDOW
    /    Part II : This is an example only.This is an example only.This is an example only. This is an example only.This is an example only.This is an example only.This is an example only.This is an example only.This is an example only.This is an example only.This is an example only.This is an example only.This is an example only.
    P.S.: let the size of the main window be a bit bigger than it can accomodate the text. The command NEW-WINDOW lets the latter text to be written in the next MAIN window if no variable window is specified.
    <REMOVED BY MODERATOR>
    I.
    Edited by: Alvaro Tejada Galindo on Jun 25, 2008 3:37 PM

  • How to make numbers in message text input  fields left aligned?

    Hi Friends
    I have completed one of my task .but getting result right side of the field.
    how to make numbers in message text input  fields left aligned?
    Thanks
    Aravinda

    Hi ,
    Sorry for late replay i am trying this alos not set that page....
    pageContext.forwardImmediatelyToCurrentPage(null, true, null);
    and one more that kff field working is fine for ex display any text pled displayed properly and only problem is not set the value and HrSitKeyFlex6 and HrSitKeyFlex7 fields are perfectly get the values but not pront HrSitKeyFlex8 that only my issue....
    Regards,
    Srini

  • How to make the vendor column have figure in GRIR line item with RE document type?

    Dear Experts,
         Could you tell me how to make the vendor column have figure in GRIR line item whose document type is RE?
         Thanks!
    Xinling Zhang

    Hi ,
    You are using FAGLL03 .
    FAGLL03 report vendor code is blank
    vendor number in new FAGLL03 tcode (offsetting account information)
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30b96fed-eb5d-2e10-1792-f3ff9f65df8a?QuickLink=index&…
    Also check OSS note
    Note 112312 - Line item: Display of offsetting a/c information
    Note 1034354 - FAGLL03: Display of offsetting account information
    Many Thanks

  • How to make every break column on the top of the rows in the same subgroup

    hi, guys:
    I was wondering if anyone could help me on this problem: I need to set up a break column on a classic report (I ma required to use classic report only), and it works, but I do not know how to make every break column on the top of the rows in the same subgroup. The break column only stays on the left to the rest columns as it is the first column. Anyone could help me on this problem? Here is the query:
    select so.doc_number as "DOC Number", so.offender_id as "Offender ID", so.first_name||' '|| so.middle_name||' '||so.last_name as "Offender Name",
    (select sc1.description from sor_code sc1 where sc1.code_id=so.race) as "Race",
    (select sc2.description from sor_code sc2 where sc2.code_id=so.sex) as "Sex",
    replace(replace(nvl2(sl.address1, sl.address1||' '||sl.address2 ||' '||sl.city ||' '||sl.county||' '||(select sc3.description from sor_code sc3 where sc3.code_id=sl.state)||' '||sl.zip, 'No Known Address'),'#'),',') as "Address",
    (select sof.name||'   '||sof.phone1||'   '||sof.link from sor_offices sof where sof.office_id=sl.jurisdiction) as "Jurisidiction",
    decode(rox.habitual, 'Y', 'Habitual', '') as "Habitual",
    decode(rox.aggravated, 'Y', 'Aggravated', '') as "Aggravated",
    floor(to_number(sysdate-so.date_of_birth)/365) as "Age"
    from sor_location sl, sor_offender so, registration_offender_xref rox, sor_last_locn_v sllv
    where rox.offender_id=so.offender_id
    and sllv.offender_id(+)=so.offender_id
    and sl.location_id(+)=sllv.location_id
    and rox.status not in ('Merged')
    and rox.reg_type_id=1
    and upper(rox.status)='ACTIVE'
    and nvl(rox.admin_validated, to_date(1,'J'))>=nvl(rox.entry_date, to_date(1,'J'))
    and ((so.first_name is not null and upper(so.first_name) like '%'||upper(:P5_TF_FIRST_NAME)||'%') or (:P5_TF_FIRST_NAME is null))
    and ((so.last_name is not null and upper(so.last_name) like '%'||upper(:P5_TF_LAST_NAME)||'%') or (:P5_TF_LAST_NAME is null))
    and ((sl.address1||sl.address2 is not null and upper(sl.address1|| sl.address2) like '%'||upper(:P5_TF_ADDRESS)||'%')or (:P5_TF_ADDRESS is null))
    and ((sl.city is not null and upper(sl.city) like '%'||upper(:P5_TF_CITY)||'%')or (:P5_TF_CITY is null))
    and ((sl.county is not null and sl.county =:P5_SL_COUNTY)or (:P5_SL_COUNTY is null))
    and (((select sc5.description from sor_code sc5 where sc5.code_id=sl.state and sc5.description=:P5_SL_STATE) is not null )or (:P5_SL_STATE is null))
    and ((sl.zip is not null and sl.zip =:P5_TF_ZIP_CODE)
    or (:P5_TF_ZIP_CODE is null))
    union
    select so.doc_number as "DOC Number", so.offender_id as "Offender ID", so.first_name||' '|| so.middle_name||' '||so.last_name as "Offender Name",
    (select sc1.description from sor_code sc1 where sc1.code_id=so.race) as "Race",
    (select sc2.description from sor_code sc2 where sc2.code_id=so.sex) as "Sex",
    replace(replace(nvl2(sl.address1, sl.address1||' '||sl.address2 ||' '||sl.city ||' '||sl.county||' '||(select sc3.description from sor_code sc3 where sc3.code_id=sl.state)||' '||sl.zip, 'No Known Address'),'#'),',') as "Address",
    (select sof.name||'   '||sof.phone1||'   '||sof.link from sor_offices sof where sof.office_id=sl.jurisdiction) as "Jurisidiction",
    decode(rox.habitual, 'Y', 'Habitual', '') as "Habitual",
    decode(rox.aggravated, 'Y', 'Aggravated', '') as "Aggravated",
    floor(to_number(sysdate-so.date_of_birth)/365) as "Age"
    from sor_location sl, sor_offender so, registration_offender_xref rox, sor_last_locn_v sllv
    where rox.offender_id=so.offender_id
    and sllv.offender_id(+)=so.offender_id
    and sl.location_id(+)=sllv.location_id
    and rox.status not in ('Merged')
    and rox.reg_type_id=1
    and upper(rox.status)='ACTIVE'
    and nvl(rox.admin_validated, to_date(1,'J'))>=nvl(rox.entry_date, to_date(1,'J'))
    and ((so.first_name is not null and upper(so.first_name) like '%'||upper(:P5_TF_FIRST_NAME)||'%') or (:P5_TF_FIRST_NAME is null))
    and ((so.last_name is not null and upper(so.last_name) like '%'||upper(:P5_TF_LAST_NAME)||'%') or (:P5_TF_LAST_NAME is null))
    and ((sl.physical_address1 is not null and upper(sl.physical_address1) like '%'||upper(:P5_TF_ADDRESS)||'%') or (:P5_TF_ADDRESS is null))
    and ((sl.physical_city is not null and upper(sl.physical_city) like '%'||upper(:P5_TF_CITY)||'%') or (:P5_TF_CITY is null))
    and ((sl.physical_county is not null and sl.physical_county =:P5_SL_COUNTY) or (:P5_SL_COUNTY is null))
    and (((select sc5.description from sor_code sc5 where sc5.code_id=sl.physical_state and sc5.description=:P5_SL_STATE) is not null )or (:P5_SL_STATE is null))
    and ((sl.physical_zip is not null and sl.physical_zip =:P5_TF_ZIP_CODE) or (:P5_TF_ZIP_CODE is null))
    union
    select so.doc_number as "DOC Number", so.offender_id as "Offender ID", so.first_name||' '|| so.middle_name||' '||so.last_name as "Offender Name",
    (select sc1.description from sor_code sc1 where sc1.code_id=so.race) as "Race",
    (select sc2.description from sor_code sc2 where sc2.code_id=so.sex) as "Sex",
    replace(replace(nvl2(sl.address1, sl.address1||' '||sl.address2 ||' '||sl.city ||' '||sl.county||' '||(select sc3.description from sor_code sc3 where sc3.code_id=sl.state)||' '||sl.zip, 'No Known Address'),'#'),',') as "Address",
    (select sof.name||'   '||sof.phone1||'   '||sof.link from sor_offices sof where sof.office_id=sl.jurisdiction) as "Jurisidiction",
    decode(rox.habitual, 'Y', 'Habitual', '') as "Habitual",
    decode(rox.aggravated, 'Y', 'Aggravated', '') as "Aggravated",
    floor(to_number(sysdate-so.date_of_birth)/365) as "Age"
    from sor_location sl, sor_offender so, registration_offender_xref rox, sor_last_locn_v sllv, sor_alias sa
    where rox.offender_id=so.offender_id
    and sa.offender_id=so.offender_id
    and sllv.offender_id(+)=so.offender_id
    and sl.location_id(+)=sllv.location_id
    and rox.status not in ('Merged')
    and rox.reg_type_id=1
    and upper(rox.status)='ACTIVE'
    and nvl(rox.admin_validated, to_date(1,'J'))>=nvl(rox.entry_date, to_date(1,'J'))
    and ((sa.first_name is not null and upper(sa.first_name) like '%'||upper(:P5_TF_FIRST_NAME)||'%') or (:P5_TF_FIRST_NAME is null))
    and ((sa.last_name is not null and upper(sa.last_name) like '%'||upper(:P5_TF_LAST_NAME)||'%') or (:P5_TF_LAST_NAME is null))
    and ((sl.address1||sl.address2 is not null and upper(sl.address1|| sl.address2) like '%'||upper(:P5_TF_ADDRESS)||'%')or (:P5_TF_ADDRESS is null))
    and ((sl.city is not null and upper(sl.city) like '%'||upper(:P5_TF_CITY)||'%')or (:P5_TF_CITY is null))
    and ((sl.county is not null and sl.county =:P5_SL_COUNTY)or (:P5_SL_COUNTY is null))
    and (((select sc5.description from sor_code sc5 where sc5.code_id=sl.state and sc5.description=:P5_SL_STATE) is not null )or (:P5_SL_STATE is null))
    and ((sl.zip is not null and sl.zip =:P5_TF_ZIP_CODE)or (:P5_TF_ZIP_CODE is null))
    union
    select so.doc_number as "DOC Number", so.offender_id as "Offender ID", so.first_name||' '|| so.middle_name||' '||so.last_name as "Offender Name",
    (select sc1.description from sor_code sc1 where sc1.code_id=so.race) as "Race",
    (select sc2.description from sor_code sc2 where sc2.code_id=so.sex) as "Sex",
    replace(replace(nvl2(sl.address1, sl.address1||' '||sl.address2 ||' '||sl.city ||' '||sl.county||' '||(select sc3.description from sor_code sc3 where sc3.code_id=sl.state)||' '||sl.zip, 'No Known Address'),'#'),',') as "Address",
    (select sof.name||'   '||sof.phone1||'   '||sof.link from sor_offices sof where sof.office_id=sl.jurisdiction) as "Jurisidiction",
    decode(rox.habitual, 'Y', 'Habitual', '') as "Habitual",
    decode(rox.aggravated, 'Y', 'Aggravated', '') as "Aggravated",
    floor(to_number(sysdate-so.date_of_birth)/365) as "Age"
    from sor_location sl, sor_offender so, registration_offender_xref rox, sor_last_locn_v sllv, sor_alias sa
    where rox.offender_id=so.offender_id
    and sa.offender_id=so.offender_id
    and sllv.offender_id(+)=so.offender_id
    and sl.location_id(+)=sllv.location_id
    and rox.status not in ('Merged')
    and rox.reg_type_id=1
    and upper(rox.status)='ACTIVE'
    and nvl(rox.admin_validated, to_date(1,'J'))>=nvl(rox.entry_date, to_date(1,'J'))
    and ((sa.first_name is not null and upper(sa.first_name) like '%'||upper(:P5_TF_FIRST_NAME)||'%') or (:P5_TF_FIRST_NAME is null))
    and ((sa.last_name is not null and upper(sa.last_name) like '%'||upper(:P5_TF_LAST_NAME)||'%') or (:P5_TF_LAST_NAME is null))
    and ((sl.physical_address1 is not null and upper(sl.physical_address1) like '%'||upper(:P5_TF_ADDRESS)||'%') or (:P5_TF_ADDRESS is null))
    and ((sl.physical_city is not null and upper(sl.physical_city) like '%'||upper(:P5_TF_CITY)||'%') or (:P5_TF_CITY is null))
    and ((sl.physical_county is not null and sl.physical_county =:P5_SL_COUNTY) or (:P5_SL_COUNTY is null))
    and (((select sc5.description from sor_code sc5 where sc5.code_id=sl.physical_state and sc5.description=:P5_SL_STATE) is not null )or (:P5_SL_STATE is null))
    and ((sl.physical_zip is not null and sl.physical_zip =:P5_TF_ZIP_CODE) or (:P5_TF_ZIP_CODE is null))I set up "Jurisdiction" to be displayed as the first column in report attributes and set up the first column to be break column, under the "When displaying a break column use this format, use #COLUMN_VALUE# subs", I fill in "Jurisdiction".

    lxiscas wrote:
    Hi, fac586:
    I am sorry for not being able to provide project online oracle to ask the question as some of the data needs to be approved to release.You don't need to use the actual data. Create simple test cases using data from Oracle's sample schemas: SCOTT, OE, HR etc.
    I actually want something like this:
    Jurisdiction: Bartlesville Police Department, 918-338-4001, http://www.cityofbartlesville.org/departments/police/
    Smith , Carl Sherman      ......
    Smith , Tommy Nesby .....
    Jurisdiction: Canadian County Sheriff's Office, 405-262-4787, Fax - 405-422-2430
    Smith , Gabriel Ray      ...
    Smith , Michael Bert   ...I omit the sensitive data with ...
    but right now it shows as this way:
    Jurisdiction: Bartlesville Police Department, 918-338-4001, http://www.cityofbartlesville.org/departments/police/  Smith , Carl Sherman      ......
    Smith , Tommy Nesby .....
    Jurisdiction: Canadian County Sheriff's Office, 405-262-4787, Fax - 405-422-2430   Smith , Gabriel Ray      ...
    Smith , Michael Bert   ...Is that possible to show the data as the upper way?The best way to do this is using a report with a custom named column template as in this example. See the following threads for solutions to similar problems:
    <li>{thread:id=2402836}
    <li>{message:id=9816577}

  • How to make a particular column bold in alv?

    Dear  Experts,
    I have searched many threads on this. I have used control break events to get the subotals and totals. The requirement is to make the text and the figure of subtotal and total bold.
    I am still not able to find the thread to make a particular column text in bold. And about colouring, I have used collect statement in my final structure so I am unable to use cellcolor type lvc_t_scol.
    Is there any way to make the subtotals and totals in bold? If not able, I may go for coloring.
    Regards
    Mani

    Hello mani,
    Try this:
    TYPES : BEGIN OF ty_outtab,
            celltab TYPE lvc_t_styl.
            INCLUDE STRUCTURE mara.
    TYPES   END   OF ty_outtab.
    DATA  : gt_outtab  TYPE TABLE OF ty_outtab WITH HEADER LINE,
                 gs_layout  TYPE lvc_s_layo,
                 ls_celltab TYPE lvc_s_styl,
                 lt_celltab TYPE lvc_t_styl.
    SELECT * FROM MARA INTO CORRESPONDIG FIELDS OF TABLE gt_outtab UP TO 20 ROWS.
    ls_celltab-style = '00000121'.
    INSERT ls_celltab INTO lt_celltab INDEX 1.
    READ TABLE gt_outtab INDEX 1.
    gt_outtab-celltab = lt_celltab.
    INSERT gt_outtab INDEX 1.
    gs_layout-stylefname = 'CELLTAB'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
      EXPORTING
        i_structure_name = 'MARA'
        is_layout_lvc    = gs_layout
      TABLES
        t_outtab         = gt_outtab
      EXCEPTIONS
        program_error    = 1
        OTHERS           = 2.
    I hope you help.

  • How to make links in dynamic text?

    Hi All,
    I need to know how to make links in dynamic text. I have
    created a
    table to hold the dynamic copy, and the copy is added through
    a CMS page
    that I created. This Admin page is accessed through a
    browser, and I
    don't know how to attach a link to selected text within a
    browser. Can
    anyone point the way? It's probably so easy I'll feel dumb.
    Thanks,
    Brett

    "Brett" <[email protected]> wrote in message
    news:fpf7j6$23m$[email protected]..
    > Thanks Hunter,
    >
    > Yes, I suppose a legend on the admin page would provide
    a solution. And
    > ultimately, if the client doesn't feel confident doing
    writing the HTML
    > they would have to pay me to do it for them. OK, that
    works for me.
    The only other thing might be to use something like FCK (or
    one of the many
    others... ContentSeed, I think is one Murray mentions often)
    for the CMS,
    that would give an easier option for the end user. WebAssist
    has an
    FCK-based plug-in called iRite that can give a more
    wordprocessing-like feel
    to the field (i.e., they could just highlight the text and
    then click a
    button to add the link).

  • How to make a summary column appear only once (in the first page only) in SSRS 2008?

    Hello Everyone,
    How to make a summary column appear only once (in the first page only) in SSRS 2008?
    Regards
    Gautam S
    Regards

    Hi,
    Assuming you have test data like this ;
    select 'abc'as [GROUP],'NN' name , 1 id
    union all
    select 'abc' as [GROUP] ,'PP' name , 1 id
    union all
    select 'abc'as [GROUP],'RR' name , 2 id
    Step1  : take Tablix with row group as your group Name .
    Step2 : right Click on Row Group Details -> Delete-> Delete Group Only
    Step3 : In Count Cell use below expression ;
    =CountDistinct(Fields!id.Value)
    Follow this link;
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/b6b45917-0a26-4d15-be46-2c6a2697d6e9/distinct-rows-sum?forum=sqlreportingservices#5ffdee06-c2c8-44ea-a3a5-b958488bb6b5
    Thanks
    Please Mark This As Answer or vote for Helpful Post if this helps you to solve your question/problem. http://techequation.com

  • How to make newly added columns appear In IR report

    Hi.
    I am using APEX 4.0.1. I've created an IR report and then, subsequently, needed to add several column sto the underlying SQL query.
    When I save the changes, APEX tells me that it will add the new columns and that I need to run the IR report and either click "Reset" or use the Actions menu to make the new columns appear in the report. I did the latter and the new columns do appear just fine.
    However, when I then tried to modify the column labels, I am unable to see these in the report "Attributes" section. And so, I can't access their labels.
    How do I get the new columns to appear in the Attributes section of the iR report?
    Thanks in advance for any help.
    Elie

    Hi, LittleFoot (sorry, I don't see your actual name).
    Thanks very much for responding.
    I've done exactly what you've described.
    I added several new column sto the SQL query underlying the IR. I then re-ran the default Primary report, added the new columns via the Actions -> Select menus, and then saved the report.
    When I then go into the IR Attributes page, the new columns are not there. I've closed/re-opened my browser. I don't know what the issue is.
    I'm wondering ... would the fact that the underlying query is SELECTing from a view rather than a table make any difference? I wouldn't think it would.
    Thank you for any help.
    Elie

  • How to Make a line of text smile?

    Is it possible to type on a path in Motion, so I can then animate the path and make a line of text look like it is smiling? Or any advice as how I can go about this?
    Thanks

    I have not watched the tutorial, but was going to post that I used a 3 point bezier open line shape that I keyframed into a smile, used that as the shape in a "Geometry" layout and it worked fine...
    It was a bit slow to render, but not too bad. Sorry I didn't keep it to post online...
    Patrick

  • How to make only one column non reorderble

    I want to make only one column (Column 0) of my JTable non reorderble.
    I also want to make the same column non resizable and I want to give it a specific size.
    Please help me on this?

    I have implemented a RowHeaderTable class which displays 1, 2, 3, ... in the first column. The column is in the scrollpane's RowHeaderView, so it is not resizable nor reorderable. But its width can be set in your code. Maybe this is what you need.
    Use the class the same way you use a JTable, except 3 added methods:
    getScrollPane();
    setMinRows(int r);
    setRowHeaderWidth(int w);
    Note: The table works perfectly in skinless L&F, such as the default java L&F. It looks ugly in Liquid L&F because I don't know how to steal column header's UI to use on a JList. If someone can help me on this one, I thank you in advance.
    * RowHeaderTable.java
    * Created on 2005-3-21
    * Copyright (c) 2005 Jing Ding, All Rights Reserved.
    * Permission to use, copy, modify, and distribute this software
    * and its documentation for NON-COMMERCIAL purposes and without
    * fee is hereby granted provided that this copyright notice
    * appears in all copies.
    * JING DING MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE
    * SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING
    * BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY,
    * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. JING DING
    * SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT
    * OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
    import java.awt.BorderLayout;
    import java.awt.Component;
    import javax.swing.AbstractListModel;
    import javax.swing.JFrame;
    import javax.swing.JList;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.ListCellRenderer;
    import javax.swing.UIManager;
    import javax.swing.event.TableModelEvent;
    import javax.swing.event.TableModelListener;
    import javax.swing.table.DefaultTableModel;
    import javax.swing.table.JTableHeader;
    import javax.swing.table.TableCellRenderer;
    import javax.swing.table.TableColumn;
    import javax.swing.table.TableModel;
    * @author Jing Ding
    public class RowHeaderTable extends JTable {
      private int minRows = 10;                         // Minimum size of the row header.
      private static final int DEFAULT_WIDTH = 30;
      private JScrollPane jsp;
      // The row header is a JList with the same appearance as the column header.
      private JList rowHeader;
      // Repaint row header whenever the table inserts or deletes rows.
      private TableModelListener tmListener = new TableModelListener(){
        public void tableChanged(TableModelEvent e){
          if(e.getType() != TableModelEvent.UPDATE)
            rowHeader.repaint();
      /** Create a new instance of RowHeaderTable.
       * @param model
      public RowHeaderTable(TableModel model){
        setModel(model);
        initializeHeader();
        jsp = new JScrollPane(this);
        jsp.setRowHeaderView(rowHeader);
      private void initializeHeader(){
        rowHeader = new JList(new AbstractListModel(){
          public int getSize(){ return Math.max(getModel().getRowCount(), minRows); }
          public Object getElementAt(int index){ return "" + ++index; }
        setRowHeaderWidth(DEFAULT_WIDTH);
        rowHeader.setFixedCellHeight(getRowHeight());
        rowHeader.setCellRenderer(new TableRowHeaderRenderer());
      public void setRowHeaderWidth(int w){
        rowHeader.setFixedCellWidth(w);
      public void setMinRows(int m){ minRows = m; }
      public void setModel(TableModel model){
        super.setModel(model);
        model.addTableModelListener(tmListener);
      /**Use this method to get the scrollPane, instead of new JScrollPane(table).
       * @return
      public JScrollPane getScrollPane(){ return jsp; }
      protected class TableRowHeaderRenderer implements ListCellRenderer{
        TableCellRenderer colHeaderRenderer;
        public TableRowHeaderRenderer(){
          JTableHeader header = getTableHeader();
          TableColumn aColumn = header.getColumnModel().getColumn(0);
          colHeaderRenderer = aColumn.getHeaderRenderer();
          if(colHeaderRenderer == null)
            colHeaderRenderer = header.getDefaultRenderer();
        public Component getListCellRendererComponent(JList list, Object value,
            int index, boolean isSelected, boolean hasFocus){
          return colHeaderRenderer.getTableCellRendererComponent(
              RowHeaderTable.this, value, isSelected, hasFocus, -1, -1);
      public static void main(String[] args){
        try {
          UIManager.setLookAndFeel("com.birosoft.liquid.LiquidLookAndFeel");
        }catch (Exception e){ e.printStackTrace(); }
        String[] columnNames = {"First Name",
            "Last Name",
            "Sport",
            "# of Years",
            "Vegetarian"};
              Object[][] data = {
                   {"Mary", "Campione", "Snowboarding", new Integer(5), new Boolean(false)},
                   {"Alison", "Huml", "Rowing", new Integer(3), new Boolean(true)},
                   {"Kathy", "Walrath", "Knitting", new Integer(2), new Boolean(false)},
                   {"Sharon", "Zakhour", "Speed reading", new Integer(20), new Boolean(true)},
                   {"Philip", "Milne", "Pool", new Integer(10), new Boolean(false)}
        DefaultTableModel dtm = new DefaultTableModel(data, columnNames);
        RowHeaderTable rht = new RowHeaderTable(dtm);
        rht.setMinRows(0);
        JFrame frame = new JFrame("RowHeaderTable Demo");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.getContentPane().add(rht.getScrollPane(), BorderLayout.CENTER);
        frame.pack();
        frame.setVisible(true);
        dtm.addRow(new Object[]{"Mary", "Campione", "Snowboarding", new Integer(5), new Boolean(false)});
        dtm.addRow(new Object[]{"Mary", "Campione", "Snowboarding", new Integer(5), new Boolean(false)});
        dtm.addRow(new Object[]{"Mary", "Campione", "Snowboarding", new Integer(5), new Boolean(false)});
    }

  • WPF: How to make the first column does not show row separator and Left column separator in DataGrid?

    Our WPF application uses DataGrid.
    One of request is that first column of DataGrid does not show row separator and also does not show Left column separator. So it looks like the first column does not belong to the DataGrid. However, when select a row, the cell of first column still get selected.
    How do we make it? Thx!
    JaneC

    Hi Magnus,
    Thanks for replying our question and provide your solution!
    Your solution works by setting "HorizontalGridLinesBrush" and "VerticalGridLinesBrush" to {x:Null} in the DataGrid style and modify "CellStyle" in first column as following:
    <DataGridTextColumn MinWidth="32"
    Binding="{Binding CellName}"
    CanUserReorder="False"
    CanUserSort="False"
    Header="Cell}"
    IsReadOnly="true" >
    <DataGridTextColumn.CellStyle>
    <Style TargetType="DataGridCell">
    <Setter Property="IsEnabled" Value="False"></Setter>
    <Setter Property="Template">
    <Setter.Value>
    <ControlTemplate TargetType="{x:Type DataGridCell}">
    <Border BorderThickness="0" BorderBrush="{x:Null}"
    Background="{Binding Background, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" Margin="-1">
    <Grid Background="{TemplateBinding Background}" VerticalAlignment="Center" Height="42">
    <ContentPresenter VerticalAlignment="Center"/>
    </Grid>
    </Border>
    </ControlTemplate>
    </Setter.Value>
    </Setter>
    </Style>
    </DataGridTextColumn.CellStyle>
    </DataGridTextColumn>
    We found another way to achieve it by using DataGridRowHeader. The good way to use DataGridRowHeader is that we do not need to make the first column ReadOnly (click on first column does not select whole row anymore). Select RowHeader in a row will select
    whole row. Move scroll bar horizontally, the row header still keep in visible area.
    <Style TargetType="{x:Type DataGridRowHeader}" x:Key="dataGridRowHeaderStyle">
    <Setter Property="VerticalContentAlignment" Value="Center" />
    <Setter Property="HorizontalAlignment" Value="Center" />
    <Setter Property="Height" Value="42" />
    <Setter Property="SeparatorBrush" Value="{x:Null}" />
    <Setter Property="FontSize" Value="16" />
    <Setter Property="Template">
    <Setter.Value>
    <ControlTemplate TargetType="{x:Type DataGridRowHeader}">
    <Grid>
    <Border x:Name="rowHeaderBorder"
    BorderThickness="0"
    Padding="3,0,3,0"
    Background="{Binding Background, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"
    BorderBrush="{x:Null}">
    <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
    </Border>
    </Grid>
    </ControlTemplate>
    </Setter.Value>
    </Setter>
    </Style>
    <DataGrid>
    <DataGrid.RowHeaderStyle>
    <Style TargetType="DataGridRowHeader" BasedOn="{StaticResource dataGridRowHeaderStyle}">
    <Setter Property="Content" Value="{Binding CellName}" />
    <Setter Property="Width" Value="35"/>
    </Style>
    </DataGrid.RowHeaderStyle>
    </<DataGrid>
    JaneC

  • How to make a grid column a linked column?

    Is there any way to make a grid column a linked column?
    I have a cardcode column in a grid, which I want to link with BP master link object.  If I try to do it the same way I do for matrix, it gives me 'specific cast not valid' error; whereas the same property works fine with matrix.
    help will be appreciated...
    Binita

    You need to do the following:
    string colUid = "yourUid";
    oGrid.Columns.Item(colUid).Type = BoGridColumnType.gct_EditText;
    EditTextColumn col = (EditTextColumn)oGrid.Columns.Item(colUid)
    col.LinkedObjectType = "2"; //2 = Buisness Partner (The id behind the BoLinkeObjectType as a string)

  • How to make a entire column editable in an ALV grid

    Hi all,
             I am trying to make a column editable in an ALV grid. For that I wrote the following code. In the below code I have set the 'edit' field of ls_fcat to 'X'. But Iam getting Runtime error. Can anyone help in resolving this problem or suggest any method to make a column editable in an ALV grid.
    form prepare_fc  changing go_fieldcat type lvc_t_fcat.
    data: ls_fcat type lvc_s_fcat.
    refresh: go_fieldcat.
    clear: ls_fcat.
    ls_fcat-reptext   = ' Safety Stock Figures'.
      ls_fcat-coltext    = 'Safety Stock Figures'.
      ls_fcat-fieldname  = 'EISBE'.
    ls_fcat-ref_table  = 'IMAT'.
      ls_fcat-edit = 'X'.
    modify go_fieldcat from ls_fcat.
      APPEND LS_FCAT TO GO_FIELDCAT.
    endform.
    Thanks & Regards,
    Vishnu Priya.

    ls_fcat-edit = 'X'.
    is correct only.
    have a look into this code
    struct_grid_lset  TYPE lvc_s_layo,
    i_grid_fcat    TYPE lvc_t_fcat
    DATA ls_fcat TYPE lvc_s_fcat.
      CLEAR ls_fcat.
      ls_fcat-fieldname = 'MONTH'.
      ls_fcat-ref_table = 'TYPE'.
      ls_fcat-ref_field = 'C'.
    <b>  ls_fcat-edit      = 'X'.</b>
      ls_fcat-coltext   = text-030."Month
      ls_fcat-seltext   = text-030.
      APPEND ls_fcat TO p_i_grid_fcat.
      CLEAR ls_fcat.
      ls_fcat-fieldname = 'YEAR'.
      ls_fcat-ref_table = 'TYPE'.
      ls_fcat-ref_field = 'C'.
      ls_fcat-coltext   = text-031."Year
      ls_fcat-seltext   = text-031.
      APPEND ls_fcat TO p_i_grid_fcat.
    CALL METHOD o_grid->set_table_for_first_display
          EXPORTING
            i_bypassing_buffer    =  space
            is_variant            =  ws_f_grid_disvar
            i_save                =  ws_c_grid_save
            is_layout             =  struct_grid_lset
          CHANGING
            it_outtab             =  i_grid_outs[]
            <b>it_fieldcatalog       =  i_grid_fcat[]</b>
            it_sort               =  i_sort_fcat.      " Period
    Also Check this code.Another way using field symbols.
    i_fieldcat    TYPE lvc_t_fcat,
           w_layout TYPE lvc_s_layo ,
           w_variant TYPE disvariant.
    FIELD-SYMBOLS : <lfs_fieldcat> TYPE lvc_s_fcat.
    *Default display
      LOOP AT p_fieldcat ASSIGNING <lfs_fieldcat>.
        CASE <lfs_fieldcat>-fieldname.
          WHEN 'GL_ACCT'.
            <lfs_fieldcat>-coltext = text-050.
            <lfs_fieldcat>-no_out = ' '.
            <lfs_fieldcat>-scrtext_l = text-050.
           <b> <lfs_fieldcat>-edit    = 'X'.</b>
    WHEN OTHERS.
        ENDCASE.
      ENDLOOP.
    Hope this helps.

  • How to make a sortable column in a table to do a case insensitive sort ?

    Hi :
    I am using Jdeveloper Studio Edition Version 11.1.1.1.0 and my table columns are sortable but i want to make sure that it case insensitive sort ,for example if i have following column values :
    abc,def,ABC,ghi
    Sorted results should not be likes this : abc,def,ghi,ABC
    instead of this it should be like this : abc,ABC,def,ghi
    Please let me know more about it.
    Thanks
    AN

    Dear,
    I'm using the same configuration, Could u tell me how did u done the sort in a column in any case.
    Regards,
    RengarajR
    Edited by: Rengaraj Rengasamy on Oct 19, 2009 1:34 AM

Maybe you are looking for

  • Fatal (??) crash out of nowhere

    Hello There! Recently I bought a MSI K8T Neo FISR2 board with a A64-3200+ CPU. Still need to buy some other parts, but I couldn't wait. So I installed everything, and it worked perfect. Specs: 300WATT PSU (Cheap-ASS ) MSI K8T Neo FISR2 (bios default,

  • Problem when creating Expense Report

    Dears, When i tried to create Expense Report, this error appear after submitting the dates of the trip. Changes in settlement past trigger retroactive settlement. Entry not found in table T706U. Argument: 98P NO 20120118 The estimated travel amount c

  • HT204053 i need to update the apple ID on my iphone 4.  how do i accomplish this.

    i have a iphone 4 and need to update the id on the phone it's self.  cannot find a straight forward answer for this.  is there a procedure for this?

  • Greetings, The moment I Add google translation

    The moment I Add google translation html code and preview the page there appears a large white gap after footer which kind of looks awkward, any solutions? Please advise Ashraf Ali

  • Lightroom CC starts once, but fails on second time

    After resolving the "Start" problem fixed by "Log off/Log in" in Create Cloud, I finally be able to try Lightroom CC. But when I quit Lightroom, and restart it a second time, it crashes : If a remove the "catalog" on file system, ligtroom starts agai