How to show line feeds in table cell

Dear Expert,
Now we meet one question,we have a long text which include many line feeds,when show it in a cell of one table in smartform.we can only see the line feeds become to  some ##. not do the ENTER or TAB..
    For example, the show like below:
    ABECDEF#MNIOPHN
   not
   ABECDEF
   MNIOPHN
So, Would you like to tell me how to do?
Thanks&Regards,
Kerry

Hi Kerry,
You can use the attributes of class: cl_abap_char_utilities
If it_longtext is the table which contains your longtext data.
DATA:  c_new value cl_abap_char_utilities=>newline,
            v_ltxt type string.
loop at it_longtexts into wa_longtexts.
  concatenate v_ltxt wa_longtexts-text_line  into v_ltxt.
endloop.
refresh it_longtexts[].
split v_ltxt at c_new into it_lontexts.
Regards,
Swarna Munukoti
Edited by: Swarna Munukoti on Dec 4, 2009 11:44 AM

Similar Messages

  • How to show combobox in a table cell

    Hi,
    I set combobox in a table cell but it shows when I click the cell.
    How can I set the combobox and it be visible since the table is showing.

    What you have already done, and the resulting behavior is unclear from your post. Post more details.

  • How can I have multiple lines in a table cell???

    hi
    how can I separate lines in a table cell in LV5.1.1??
    EndOfLine doesn't work, neither does CR or LF..
    has anybody an idea???
    thanks

    thanks.. but there is nothing like "multi line input" in my LV (5.1.1).. I think it might be impossible to
    do it in 5.1.1, it's really time to upgrade ;-)
    cheers

  • How to show a blank or clear cell for the first entry in a numbers pop-up menu on a mac. I can do it on the iPad but not on the mac. Thank you.

    Can you please advise how to show a blank or clear cell as the first option in a pop -up menu on a Mac, I can see how on an IPad but but not on the Mac.
    Thank you.

    Hi grm,
    Yvan Koenig wrote an Applescript to create an popup menu with a true blank menu item. You can find it in Yvan's Box Account public area. Click on for_iWork'09, then for-numbers'09, then look for and download popup_with_nil.zip. Unzip the file, then open it with ScriptEditor.
    Yvan's scripts include instructions (in French and English) on how and where to save the script and how to use it. I haven't read this one recently, so I can't give you any further details on it.
    Regards,
    Barry

  • How can I write into a table cell (row, column are given) in a databae?

    How can I write into a table cell (row, column are given) in a database using LabVIEW Database Toolkit? I am using Ms Access. Suppose I have three columns in a table, I write 1st row of 1st column, then 1st row of 3rd column. The problem I am having is after writing the 1st row 1st column, the reference goes to second row and if I write into 3rd column, it goes to 2nd row 3rd column. Any suggestion? 
    Solved!
    Go to Solution.

    When you do a SQL INSERT command, you create a new row. If you want to change an existing row, you have to use the UPDATE command (i.e. UPDATE tablename SET column = value WHERE some_column=some_value). The some_column could be the unique ID of each row, a date/time, etc.
    I have no idea what function to use in the toolkit to execute a SQL command since I don't use the toolkit. I also don't understand why you just don't do a single INSERT. It would be much faster.

  • How can I copy and paste table cells from Pages into InDesign with minimum reformating?

    How can I copy and paste table cells from Pages into InDesign with minimum reformating?

    Do you mean you want to retain the formatting from Pages, or retain formatting already applied in ID?

  • How to wrap a line in a table cell in adf

    How do I wrap a line of text in a table cell?

    Yes, I tried that. But I have 2 sets of information. I want it to wrap exactly at the start of the second piece of information
    So I am trying to use noWrap in combination with width. How else can I do this. appending \n does not work

  • Lines in shaded table cells do not render properly in pdf created in Word 2010

    When creating a pdf with shaded table cells using MS Word 2010; the black lines in the shaded table cells do not show up when looking at the page at a fit page view (anything under  around 60%). They print, they are there when I zoom in, but will not show up if you zoom out.
    I read a forum post in Adobe here which gave some really logical suggestions, but they didn't seem to work for everyone or the level of effort was not what i can put into it. I also tried some of those and variations of those; but they didn't seem to work.
    http://forums.adobe.com/thread/305508
    Did anyone come up with a solution? Some people were saying it's a bug in pdf software, if that is the case, has anyone heard of a resolution?
    I'm using Windows 7 and word 2010 btw, to create the pdf.
    Thanks!!

    Just as a test, have you tried the MS plugin for PDF creation? I have found with other versions of WORD and Acrobat that PDF Maker and the MS plugin can both fill in dots and dashes on vector graphics (basically what the border is) and yet it comes out correctly with printing to the Adobe PDF printer. Unfortunately I do not have a solution. In my case, it seemed to be related to the vector graphic itself (I could import it to InkScape or other vector graphic tool and save to EMF and it then worked fine. It may be something that MS themselves have messed up in OFFICE 2013. Good luck.

  • Line Binding with table Cell issue

    Hello,
    In my application I need to map data from one table to another table. please see snap from below link
    http://www.pixhost.org/show/3449/12902612_column-linking.png
    if you see the snap you will come to know that I have Map Name "Pankti" from Left Table to Name "Isabella" from right Table.
    I have used my custom tableView Control.
    I have Bind Line cordinates as below
    line.startXProperty().bind(lefttb.widthProperty().add(lefttb.layoutXProperty()));
    line.startYProperty().bind(lefttb.lastcell.getTableRow().layoutYProperty().add(lefttb.lastcell.getTableRow().heightProperty().add(lefttb.lastcell.getTableRow().heightProperty().add(-12))));
    line.endXProperty().bind(righttb.layoutXProperty());
    line.endYProperty().bind(righttb.lastcell.getTableRow().layoutYProperty().add(righttb.lastcell.getTableRow().heightProperty().add(righttb.lastcell.getTableRow().heightProperty().add( -12))));
    Here lefftb = LeftTableView
    righttb = RightTableView
    lastcell is a selected cell of tableview
    I have added these control in Group Container.
    MyProblem is :
    When I scroll in any tableview then the relationship between data are lost and Line had start showing wrong relationship.
    in above example if i scrolled RightTableview then see the result from Below Links
    http://www.pixhost.org/show/3800/12903076_column-map1.png
    http://www.pixhost.org/show/3800/12903157_column-map2.png
    http://www.pixhost.org/show/1297/12903283_column-map3.png
    So what should i do so that my Line always show correct relationship??
    Please download my sample code from
    http://www.freefilehosting.net/columnmapsample
    or
    http://www.filefactory.com/file/4w3dpn0l27rj/n/ColumnMapSample.rar
    Thank You,
    Ronak

    Hi Roank ,
    I think your approach of mapping the table using TableCell is not correct because the tablecell is updated everytime you scroll,click and other events. Although I can't give you full guide but the algorithm must be something like this:
    + Use the index of table cell or item Object instead of using the tableCell.
    + The index of cell is get from cell.getIndex();
    Implementation
    + If the mapping is to be done then you must first save the index of two table in a Map<integer,integer> .
    + Now update the line of mapping only if the index matches in the cellfactory (during update of the table cell).
      Otherwise the line x,y must be set to the last known x,y position of that tablerow indexI think this way the things goes correctly. One thing to remember that tablecell is always updated.
    Thanks
    Narayan

  • Multi line issue in Table Cell Editor

    Hi,
    I am developing an occasionally connected application for handheld devices using NetWeaver Mobile 7.1. In one of the view, I have a table which display items information from the data source. In one of the column I need to display item description so I used TextEdit in the Cell Editor to display the information in multi line format and also wrapping is enabled.
    But during testing of the application the TextEdit control does not wraps the text and as well as only first line of TextEdit control is visible inside the table and rest of the rows are not visible because of table's row height is not adjusted to the TextEdit control. I couldn't find any option to vary the size of the row height of the table.
    Please suggest a solution to bring multi line display with in the table.
    Also, check out my other issue posted here.
    [Issue in wrapping of text in TextEdit control|Issue in wrapping of text in TextEdit control]
    Thanks in advance.
    Regards,
    DVR.
    Edited by: Vinodh Raj D on May 28, 2009 8:18 AM

    Hi Vinodh,
                   Mutliline text in a text view/edit control inside a table cell is not supported.
    You can view multiline text in a text view/edit as a seperate control inside a view. I think in case you want to see the whole address you can create a detail(s) view which can be navigated from the list (table) view.
    Regards,
    Nipun

  • How to populate change from one Table cell to more Tables??

    Dear Friends:
    I have following successfully running code, each can populate 1 table cell updating in ChangeTableSelectionMain1 change to another table in ChangeTableSelectionMain1 also, or populate 1 table cell in ChangeTableSelectionSub1 change to another table in ChangeTableSelectionSub1 also, But cannot populate table cell updating in ChangeTableSelectionMain1 to ChangeTableSelectionSub1, Please advice how to make populating table cell updating in ChangeTableSelectionMain1 to ChangeTableSelectionSub1 successful??
    Thanks.
    [1]. main code:
    package com.com;
    import java.awt.BorderLayout;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JSplitPane;
    import java.awt.GridLayout;
    public class ChangeTableControl1 implements java.io.Serializable{
         private JFrame                frame;
         public static void main(String args[]) {
              try {
                   ChangeTableControl1 window = new ChangeTableControl1();
                   window.frame.setVisible(true);
              } catch (Exception e) {
                   e.printStackTrace();
          * Create the application
         public ChangeTableControl1() {
              initialize();
          * Initialize the contents of the frame
         private void initialize() {
              frame = new JFrame();
              frame.setBounds(0, 0, 1500, 675);
              final ChangeTableSelectionMain1      c1      = new ChangeTableSelectionMain1();
              final ChangeTableSelectionSub1           c2      = new ChangeTableSelectionSub1();
              JSplitPane sp = new JSplitPane();          
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              final JPanel panel = new JPanel();
              panel.setLayout(new GridLayout(1, 2));
              frame.getContentPane().add(panel, BorderLayout.CENTER);
              sp.setLeftComponent(c1);
              sp.setRightComponent(c2);
              sp.setResizeWeight(0.5);
              panel.add(sp);// add right part
                frame.addWindowListener(new WindowAdapter() {
                     public void windowClosing(WindowEvent e) {
                         System.exit(0);
                 frame.pack();
                 frame.setVisible(true);
    }[2]. ChangeTableSelectionSub1
    package com.com;
    import javax.swing.JTable;
    import javax.swing.event.ListSelectionEvent;
    import javax.swing.event.ListSelectionListener;
    import javax.swing.event.TableModelEvent;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import java.awt.FlowLayout;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.io.*;
    import java.text.SimpleDateFormat;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    import java.awt.BorderLayout;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JTable;
    public class ChangeTableSelectionSub1 extends JPanel{
           protected         JButton                bt11 = new JButton("Insert before");
           protected         JButton                bt22 = new JButton("Insert after");
           protected         JButton                bt33 = new JButton("Delete");
           protected      ChangeTableSelectionMain1 lm = new ChangeTableSelectionMain1();
    public ChangeTableSelectionSub1() {
         JPanel pnl = new JPanel();
         pnl.setMinimumSize(new Dimension(200,600));
              //pnl.setPreferredSize(new Dimension(800,600));
              final JTable tbl1 = new JTable(lm.data,lm.columnNames);
              final JTable tbl2 = new JTable(lm.data,lm.columnNames);
              JScrollPane scr1 = new JScrollPane(tbl1);
              JScrollPane scr2 = new JScrollPane(tbl2);
              lm.tbl1.getSelectionModel().addListSelectionListener(new ListSelectionListener()
              public void valueChanged(ListSelectionEvent lse)
                   if (lm.tbl1.getSelectedRow()!=-1)
                        tbl2.clearSelection();
                        System.out.print("[1]. LongguChangeTableSelectionSub get msg from LongguChangeTableSelectionMain");
                        tbl1.clearSelection();
                        revalidate();
              lm.tbl2.getSelectionModel().addListSelectionListener(new ListSelectionListener()
         public void valueChanged(ListSelectionEvent lse)
              if (tbl2.getSelectedRow()!=-1)
                   tbl1.clearSelection();
              System.out.print("[2]. LongguChangeTableSelectionSub get msg from LongguChangeTableSelectionMain");
              revalidate();
         pnl.setLayout(new FlowLayout());
         pnl.add(scr1);
         pnl.add(scr2);
         this.add(pnl);
    public static void main(String []args)
         ChangeTableSelectionSub1 c = new ChangeTableSelectionSub1();
         JFrame frm = new JFrame();
         frm.setSize(920,400);
         frm.getContentPane().add(c);
         frm.setVisible(true);
    }[3]. ChangeTableSelectionMain1
    package com.com;
    import javax.swing.JTable;
    import javax.swing.event.ListSelectionEvent;
    import javax.swing.event.ListSelectionListener;
    import javax.swing.JScrollPane;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import java.awt.FlowLayout;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.*;
    import javax.swing.*;
    public class ChangeTableSelectionMain1 extends JPanel{
           protected         JButton                bt11 = new JButton("Insert before");
           protected         JButton                bt22 = new JButton("Insert after");
           protected         JButton                bt33 = new JButton("Delete");
           protected String[] columnNames = {"First Name",
                        "Last Name",
                        "Sport",
                        "# of Years",
                        "Vegetarian"};
           protected 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)} };
           protected JTable tbl1 = new JTable(data,columnNames);
           protected JTable tbl2 = new JTable(data,columnNames);
    public ChangeTableSelectionMain1() {
         JPanel pnl = new JPanel();
         pnl.setMinimumSize(new Dimension(200,600));
              //pnl.setPreferredSize(new Dimension(800,600));
              JScrollPane scr1 = new JScrollPane(tbl1);
              JScrollPane scr2 = new JScrollPane(tbl2);
              tbl1.getSelectionModel().addListSelectionListener(new ListSelectionListener()
              public void valueChanged(ListSelectionEvent lse)
                   if (tbl1.getSelectedRow()!=-1)
                        tbl2.clearSelection();
                   if (lse.getValueIsAdjusting())
                       System.out.println("Selected from " + lse.getFirstIndex() + " to " + lse.getLastIndex());
                   revalidate();             
              tbl2.getSelectionModel().addListSelectionListener(new ListSelectionListener()
         public void valueChanged(ListSelectionEvent lse)
              if (tbl2.getSelectedRow()!=-1)
                   tbl1.clearSelection();
                   revalidate();
         pnl.setLayout(new FlowLayout());
         pnl.add(scr1);
         pnl.add(scr2);
         this.add(pnl);
    public static void main(String []args)
         ChangeTableSelectionMain1 c = new ChangeTableSelectionMain1();
         JFrame frm = new JFrame();
         frm.setSize(920,400);
         frm.getContentPane().add(c);
         frm.setVisible(true);
    }Message was edited by:
    sunnymanman

    I have following successfully running code, each can populate 1 table cell updating in ChangeTableSelectionMain1 change to another table in ChangeTableSelectionMain1 also, or populate 1 table cell in ChangeTableSelectionSub1 change to another table in ChangeTableSelectionSub1 also, But cannot populate table cell updating in ChangeTableSelectionMain1 to ChangeTableSelectionSub1, Please advice how to make populating table cell updating in ChangeTableSelectionMain1 to ChangeTableSelectionSub1 successful??
    My brain hurts, does yours?

  • Line Feed within the cell in .CSV output file

    Hello Experts,
    I have created one z-report, and the output of the report is in .CSV file format separated by 'semi-colon' as separator.
    Their is one column "Product" in which data is in the format
    <b>"[Product1][Product2][Product3][Product4]"</b>
    My code looks something like this:
    LOOP AT product_new INTO wa_product. 
      CONCATENATE Prod_str
                  wa_product-tdline             
             INTO prod_str.
    ENDLOOP.
    Our requirment is to insert Line-feed between each product entries within the cell.Line-Feed between each product within the cell is possible with ALT+ENTER key
    The output required is
    "[Product1](ALT+ENTER)
    [Product2](ALT+ENTER)
    [Product3](ALT+ENTER) 
    [Product4]"
    I would appreciate if anybody can help me to solve this.. (urgent)
    Thanx.

    Hi
    Go thru these links
    Regarding line feed
    add line feed to string
    When you concatenate try using the abap char utility for newline as well.
    i.e CL_ABAP_CHAR_UTILITIES=>NEWLINE.
    LOOP AT product_new INTO wa_product.
    CONCATENATE Prod_str
    wa_product-tdline
    CL_ABAP_CHAR_UTILITIES=>NEWLINE.
    INTO prod_str.
    ENDLOOP.
    Regards,
    balaji
    **rewrds for helpful answers

  • How to Replace Line feed

    Hi All,
            i want to replace a line feed which is shown as ## in debug mode with space..
    Though i have tried replacing it by giving hexadecimal value of # but still its not gettign replaced.
    So how do i replace these occurences of line feed in the string which i am using..
    Regards,
    Syed

    Hi try this way :
    data: value type string....
    data: lv_feed type c value CL_ABAP_CHAR_UTILITIES=>CR_LF.
    replace all occurrences of lv_feed in value with space.

  • How to display system date on table cells

    hi all,
    I would like to display the PC date onto a specified cell on a table. I have attached here my vis. I don't know how to get the date displayed at the table cell On the front panel when I run it. Please help.
    Attachments:
    data.vi ‏32 KB
    getPCdate.vi ‏9 KB

    Hi,
    The table control is simply a 2D array of string. So all you need to do is to pick up the Date from the appropriate .vi and replace the array element (using replace array subset) and write the whole table back again. (Example attached for LV 6.0.x)
    // it takes almost no time to rate an answer
    Attachments:
    Untitled_1.vi ‏13 KB

  • How to insert line feed in the alert text

    HI,
    I am sending a message from BMP using alert.
    I need to insert a line feed in the error message because the message is a concatenation of multiple error messages.
    Regards
    Vijay.

    You already have the solution. The XML created by EDI disassembler does not have White Space and Indent enabled so what you see is unindented/non-whitepaced XML.
    However if you view it in IE then you will see it indented and properly formatted. I would assume that you want to do something with the disassembled message such as store it or process it as opposed to having someone read it in a browser or notepad++ ?
    because for processing the data whitespace or indentation is not really consequential.
    Regards.

Maybe you are looking for