Retrieve a line of text in a TextField ?

Is it possible to get the text on a specific line in a text
field and appy it to the text property of another field?
For example, given a dynamic text field:
jack be nimble
jack be quick
jack jumped over
the candlestick
Somehow extract "jack be quick" and put it into a variable or
another text field. My impression is that each line of a tex field
is indexed but how can it be retrieved?

DataInputStream is for reading primitives, but I came up with a (untested) workaround:
DataInputStream dis = new DataInputStream(new FileReader("bleh"));
StringBuffer s = new StringBuffer();
char c;
while((c = dis.readChar()) != '\n') {
s.append(c);
String line = s.toString();
StringBuffer is used because it gives better performance than String.
NOTE: I have NOT tested this.

Similar Messages

  • How to retrieve the Line item Text

    Hello,
    I need to retrieve the Line item Text in the PO (Material PO text). Can anyone provide me a sample code? i need to display this in a smartform.
    I could not retrive it from the Function Module READ_TEXT.
    Can any one help me regarding this?
    Regards,
    kvsskirankumar

    HI,
    Use function module READ_TEXT to fetch PO line item text by passing id, language, name and object.
    For Ex:-
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
        CLIENT             = SY-MANDT
        id                      = 'F01'
        language          = 'E'
        name                 = << concatenate PO number & line item>>
        object                = EKKO
      tables
        lines                   = g_t_ltext.
    Thanks & Regards
    Sudheer Madisetty

  • Text in the textfield  has "=" symbols at end of each line. how to remove ?

    For certain cases, if one does cut & paste (multiple lines of text ) into the text area from email, the symbol ("=") appears at end of each line. I was told to handle such cases and remove the "=" at end of each line from the text area. If I replace "=" with space, It would replace every single appearance of "=" with space instead of just only at the end. Any help will be greatly appreciated.
    -thanks

    Hi
    Try to find out new line character.And if position of thses "=" is specific to new line char. you search it out from there and then can replace with any char or space.
    Hope this will work .

  • Limiting amount of lines dynamic text field

    Dear Flash Forum
    I'm retrieving text content from an xml file and I need to
    limit the amount of lines. Basically if the content needs 10 lines
    to be displayed only the first 5 should show up. No scrolling.
    Can this be done?
    Any leads or ideas appreciated.
    Thanks
    Stephan

    The thing is, if there's only 2 lines, the text field should
    be only 2 lines high... (there are other elements around the
    textfield that adjust to the size of the textfield.)

  • How do I create 2 motion tweens for one line of text?  the text needs to "fly-in-right", I can do that,

    how do I create 2 motion tweens for one line of text?  the text needs to "fly-in-right", I can do that, then it needs to "fly-out-bottom" again, I can do that, but not on the same line of text...any ideas...

    my question
    1- there is any way to assign the Fetch process to specific region so the process take all item in these region only.
    2- how can create manual process to fetch row into specific items in page ( i tray these code
    SELECT col1, col2, col3 ....
    INTO :P1_ITEM1, :P1_ITEM, :P1_ITEM...
    FROM table
    WHERE id = :P_id ) but no data retrieve .
    I do not think that it is possible to have more than one Automated Row Fetch process in a given page. See the thread:
    ORA-01403: no data found : Unable to fetch row multiple automated row fetch
    On your second question, the manual process should work provided:
    P_ID has a value when the process executes. You can do it this way:
    i. Make this process as a on-load After/Before header process
    ii. Make sure that P_ID page item has value when the process executes (set it from another page or before the pl/sql process executes)

  • Reading Individual Lines of Text Into An ArrayList or Vector From A File

    I am trying to read each individual line of text of a .txt file into an ArrayList or Vector. I seem to get the same results no matter which Object I am using (ArrayList or Vector). The text file is a comma-delimited text file to be used as a database. I want to separate each line as an individual record then dump it into an ArrayList or Vector and have them loop through a StringTokenizer() class so that I can be sure each line has the correct number of fields before I commit it to a serialization file. Currently, the proper amount of records seems to be forming in the initial part of the program, I am just remiss at properly placing them in the Vector, or StringTokenizer classes so I can further manipulate them. I'm using the LineNumberReader class to get line numbers to use as record numbers and for loop indexes. I'm not sure (obviously) if this is a correct way to do it or not.
    Any help is greatly appreciated in advance.
    Thanks for all your time.
    int n = 0;
              try {
                    * read each individual line and count it as a separate record. 
                    * place each record into an array or may be a string if it has 9 tokens
                    * if a record hasn't got 9 tokens, it isn't a record
                    * place each array or string into a Vector
                   in = new LineNumberReader(new FileReader(filename));
                             while ((record = in.readLine()) != null) {
                             n = in.getLineNumber();
                             rawData = new Vector();     
                             for (int i = 0; i < n; i++) {
                                  rawData.add(record);     
                             if (record == null)
                             break;
    *The following System.out.println() statement shows that all lines are correctly retrieved from the text file
    *as separate records
                        System.out.println("Record No. " + n +  "= " + record);     
                   //Debug
    /** When these print lines execute it reveals that only the last record has been inserted into the Vector as
    *    many times as I have records in the text file.
                        System.out.println("Number of Records = " + n);
                        System.out.println("VectorSize = " + rawData.size());
                        System.out.println("First rawDataElement = " + rawData.firstElement());
                        System.out.println("Second rawDataElement = " + rawData.get(1));
                        System.out.println("Third rawDataElement = " + rawData.get(2));
                        System.out.println("Fourth rawDataElement = " + rawData.lastElement());
    *  Next run each record through a StringTokenizer to be sure that there the correct number of fields present
    *  If it contains the correct number of fields, dump it into an alternate ArrayList or Vector.
    *  As it is now, the StringTokenizer gives a NullPointerException
                        for (int i = 0; i < n; i++) {
                             StringTokenizer recordSet = new StringTokenizer((String) table.get(n), ",");
                                 while (recordSet.hasMoreTokens()) {
                                     if (recordSet.countTokens() == 9) {
                                           data = new Vector();
                                           data.add((Object) recordSet.nextToken(","));
                                           System.out.println("Vector data size = " + data.size());
                                           System.out.println("Second dataElement = " + data.get(0));
                            System.out.println("String Tok recordSet = " + recordSet.countTokens());                                  System.out.println("Number of Records = " + n);
                        System.out.println("First dataElement = " + data.firstElement());
                        System.out.println("Second dataElement = " + data.get(0));
                        System.out.println("Third dataElement = " + data.get(2));
                        System.out.println("Fourth dataElement = " + data.lastElement());
                   } catch (FileNotFoundException e) {
                        System.out.println(e);
                   } catch (IOException e) {
                        System.out.println(e);
         }

    I think your logic is broken.
    rawData = new Vector();
    creates a new instance of Vector for every record.
    Your add() within a for loop adds the same record to the Vector n times. I think what you really want is something like this:in = new LineNumberReader(new FileReader(filename));
    rawData = new Vector();
    while ((record = in.readLine()) != null) {
        n = in.getLineNumber();
        rawData.add(record);     Mark

  • How 2 Copy Header & Line Item Text from Purchase Order 2 Out Bound Delivery

    Hi SD Gurus,
    I want to copy header and line item text from Purchase Order to Out Bound Delivery (This is required in Stock Transfer Process).
    I have been able to do successful config. for copying header and line item text from Sales Order to Outbound Delivery but config. doesn't seems to be same for copying text from PO to OBD.
    Is there any way to achieve the same? Can some expert show the way to achieve this.
    Thanks in advance.
    Warm regards,
    Rahul Mishra

    Hi Ravikumar thanks for u quick reply.
    This is wht is currently coded.
    concatenate values to get item text for read text function
       invar3+0(10) = invar1. "PO number
       invar3+10(5) = invar2. "PO line number
       SELECT SINGLE * FROM stxh WHERE tdobject = 'EKPO'
                                   AND tdname   = invar3
                                   AND tdid     = 'F01'
                                   AND tdspras  = sy-langu.
       IF sy-subrc = 0.
         invar4 = invar3.
    reading the text for the document items.
         CALL FUNCTION 'READ_TEXT'
           EXPORTING
             id       = 'F01'
             language = sy-langu
             name     = invar4
             object   = 'EKPO'
           TABLES
             lines    = it_itab.
    I have seen some PO's which have info rec texts in that, which gets pulled by the above code...first thing is its id is F02 which exist in STXH table also there is other text with F01 id, and hence the table it_itab gets both these text hence no pbm.
    but i came across a PO which has only one text which is info rec text with id F05 and is not store in stxh and hence doesnot get pulled by read_text fm. How do i change my cod to get this text which should not hamper other PO's as well.
    As mentioned in above msgs, this F05 could be retrieved by providing object name as EINE.
    anyhelp will be appreciated and rewarded.
    thanks

  • Printing two lines of text in Print Module

    Is it possible to print two, or more lines of text, say on a contact sheet, such as filename and caption. If so, how?

    Lightroom automatically wraps text under the thumbnail in contact sheets. The Text Template Editor does not allow you to enter line breaks. So, if your Filename is long enough to fill the first line, the caption will start with the second. If not, you can tweak the template somehow so that it looks the way you want.

  • Document line item text in Clearing document

    Dear All,
    Document line item text
    My client want the vendor invoice line item text(BSIK-SGTXT) to be captured in the corresponding clearing document line item text field(BSAK-SGTXT).
    (i.e) The vendor invoice and its payment clearing document should have the same text in the document line item text filed.
    According to me i can use  a substition rule and a user exit to assign the values. but here comes a problem* i have one clearing document against 3 to 4 vendor invoice documents* so my programming logic has got stucked here? like which vendor invoice line item text the clearing document should pick up?
    is there any other enhancements possible or can some one help me with the programming logic to be applied here.
    Thank you
    Regards,
    Vasanth D

    like which vendor invoice line item text the clearing document should pick up?
    is there any other enhancements possible or can some one help me with the programming logic to be applied here
    Why don't you discuss the issue with your client?  As you said, if you pay 5 invoices in a single run, the payment document item text can't carry all of those texts unless you use the long text.  What is the reason for the requirement?  Perhaps there's another solution.

  • Report for Vendor line item with GL line item text

    Hello SDN,
    We need to add the GL Line item text to a vendor line item report. I don't think adding a GL field is available option in the FBL1N report. Is there a way to display the Vendor name, Vendor number, Open amount and the GL line item text in a report without ABAP invovlement?
    I would really appreciate your help. Thank you.
    Edited by: nsap_fico on Aug 10, 2011 6:29 PM

    Some alternative is in KSB1 (Cost center line item report) - you can change the layout and include offsetting account and its text.
    But, in vendor line item report, if you want vendor number, vendor number, GL account number (offsetting) account and its text, then you should go with abap development.
    Have a look at the following note, if really serves your purpose.
    Note 1504612 - Line items: Offsetting account info (BAdI FI_ITEMS_CH_DATA)

  • How can I make a gray box or gray screen in Pages over a few lines of text?

    How can I make a gray box or gray screen in Pages over a few lines of text?

    Thanks. Almost what I was looking for.
    While that makes for a gray over the lines, it still does not form a box.
    Any other suggestions to form a solid rectangular gray box?

  • How can I change or reduce the line spacing to single in a "multiple lines of text" column in a list?

    We keep many logs in a simple list format. One of the columns requires a description using the "multiple lines of text" default column. Sometimes the person making the entry needs to complete about 20-30 lines of text. Users are requesting we reduce
    the amount of space advanced between lines to save space and be more concise. Is there a way to reduce the line spacing for the column entries to single spacing without code?
    Maree N Percival

    We determined that the site column settings were incorrect for allowing single spacing, we changed the site column setting from "Enhanced rich text (Rich text with pictures, tables, and hyperlinks)" to  "Rich text (Bold, italics, text alignment, hyperlinks)"
    and it is now keeping the text in single spaced lines.
    <label for="onetidRichText">Specify the type of text to allow:</label> 
    <input id="onetidRichTextPlain" name="RichText" title="Plain text" type="radio" value="PLAIN" />
    <label for="onetidRichTextPlain">Plain text   </label>
    <input id="onetidRichTextCompatible" name="RichText" title="Rich text (Bold, italics, text alignment, hyperlinks)" type="radio" value="COMPATIBLE" />
    <label for="onetidRichTextCompatible">Rich text (Bold, italics, text alignment, hyperlinks)</label>
    <input id="onetidRichTextFullHtml" name="RichText" title="Enhanced rich text (Rich text with pictures, tables, and hyperlinks)" type="radio" value="FullHtml" />
    <label for="onetidRichTextFullHtml">Enhanced rich text (Rich text with pictures, tables, and hyperlinks)</label>
    Maree N Percival

  • How copy just line in text file with cat? (SOLVED)

    Hi.
    How i make to copy just only line in text file with cat?
    For example:
    [:0.0]
    file=/home/Arch/./.wallpaper.png
    mode=0
    bgcolor=# 0 0 0
    I want copy just "/home/Arch/./.wallpaper.png" part.
    Actually i want create a shortcut for last wallpaper set from Nitroget, then i put this in SLim background.
    Recently i use hsetroot for wallpaper (~/.wallpaper.png) and i create a shortcut in /usr/share/slim/theme/MYTHEME whith ln -s ~/.wallpaper.png /usr/share/slim/theme/MYTHEME/background.png.
    I want make a same with Nitrogen.
    I now this looks like crazy, but...
    Sorry my English.
    Last edited by kramerxiita (2008-06-04 16:50:48)

    moljac024 wrote:
    kramerxiita wrote:
    moljac024 wrote:How can you make SliM change the background ? You link the theme background to another file ?
    Yes. In theme directory i put background.png shortcut for my wallpaper. So, when a change wallpaper, slim background change too.
    Example:
    ln -s mywallpaper.png /usr/share/slim/themes/default/background.png
    So, Slim background always is my wallpaper.
    So the wallpaper has to be a *.png ?
    No, jpg is possible. But when you create a symbolic link, remember put the extension too. If change png to jpg, change a symbolic link extension.
    But, remember if slim theme directory have background.png and background.jpg, Slim always choice .png. So, put only one this.

  • Smartforms: How to CC email & Include a few lines of Text in Body of email?

    I have created a smartform and have it outputting PDf documents and sending then via e-mail and it all works great.  Except u2026 now I would like to CC someone and also have a few lines of text in the e-mail.  Does anyone have any ideas?
    Here is my code:
    IF p_mail = 'X'.
        wa_ctrlop-device = 'MAIL'.
        PERFORM mail_recipient_object.
        PERFORM mail_sender_object.
        PERFORM mail_appl_object CHANGING g_mail_app_obj.
      ENDIF.
      LOOP AT my_table.
        CONCATENATE 'ECS' comp_year izhr_emp_comp_summary-emp_lname INTO wa_outopt-tdtitle separated by space.
        CALL FUNCTION func_mod_name
          EXPORTING
            CONTROL_PARAMETERS      = wa_ctrlop
            MAIL_APPL_OBJ           = g_mail_app_obj
            MAIL_RECIPIENT          = email_recipient
            MAIL_SENDER             = email_sender
            OUTPUT_OPTIONS          = wa_outopt
            USER_SETTINGS           = u2018Xu2019
          IMPORTING
            DOCUMENT_OUTPUT_INFO    = document_output_info
            JOB_OUTPUT_INFO         = t_otfdata
          TABLES
            I_MYTABLE                 = imy_table
          EXCEPTIONS
            FORMATTING_ERROR        = 1
            INTERNAL_ERROR          = 2
            SEND_ERROR              = 3
            USER_CANCELED           = 4
            OTHERS                  = 5.
       ENDLOOP.
    Determines the Recipent of the E-Mail
    FORM mail_recipient_object.
      CALL FUNCTION 'CREATE_RECIPIENT_OBJ_PPF'
        EXPORTING
          ip_mailaddr       = email_address     "E-mail Addr:Input Screen
          ip_type_id        = 'U'               "Internet Address
        IMPORTING
          ep_recipient_id   = email_recipient   "Recipient Obj Key
        EXCEPTIONS
          invalid_recipient = 1
          OTHERS            = 2.
      IF sy-subrc <> 0.
        MESSAGE e531(0u) WITH text-003.                      "Error E-Mailing
      ENDIF.
    ENDFORM.    "mail_recipient_object.
    *Sender of E-mail
    FORM mail_sender_object.
    CALL FUNCTION 'CREATE_SENDER_OBJECT_PPF'
        EXPORTING
          ip_sender      = sy-uname             "User Logged in
        IMPORTING
          ep_sender_id   = email_sender
        EXCEPTIONS
          invalid_sender = 1
          OTHERS         = 2.
      IF sy-subrc <> 0.
        MESSAGE e531(0u) WITH text-e15.                      "Error E-Mailing
      ENDIF.
    ENDFORM.    "mail_sender_object.
    *Creates Mail Application Object to E-Mail Smartform
    FORM mail_appl_object CHANGING g_mail_app_obj.
      SELECT SINGLE * FROM soud WHERE sapnam LIKE sy-uname AND deleted = ' '.
      IF sy-subrc NE 0.
        CALL FUNCTION 'SO_USER_AUTOMATIC_INSERT'
          EXPORTING
            sapname            = sy-uname
          EXCEPTIONS
            no_insert          = 1
            sap_name_exist     = 2
            x_error            = 3
            sap_name_not_exist = 4
            OTHERS             = 5.
      ENDIF.
      CLEAR sofmfol_key.
      sofmfol_key-type = 'FOL'.
      sofmfol_key-year = soud-inbyr.
      sofmfol_key-number = soud-inbno.
      bor_key = sofmfol_key.
      IF NOT bor_key IS INITIAL.
        swc_create_object folder 'SOFMFOL' bor_key.
        IF sy-subrc = 0.
          swc_object_to_persistent folder g_mail_app_obj.
          IF sy-subrc NE 0.
            CLEAR g_mail_app_obj.
          ENDIF.
        ENDIF.
      ELSE.
        CLEAR g_mail_app_obj.
      ENDIF.
    ENDFORM.    "mail_appl_object.

    Get rid of the smartform-based mail sending code if you can.  That interface is quite old, simplistic, and inflexible (i.e., you can't do what you're asking).  I would use class CL_BCS.  It's especially much easier once you have developed a (custom) standard email wrapper class for sending various types of emails, including smartform-based PDF-attached emails.  You can even go with HTML and dress-up your emails a bit.

  • Text in Dynamic Textfield gets cut off

    Hi
    I have a dynamic text field which is just one line of text.
    For some reason letters like g or p that go below the regular
    line of text get cut off.
    I have made the field bigger, and also played around with the
    _height Property but it doesn't make a difference.
    I have imported the font into the Library. When I embed it
    the font doesn't cut off but looks very different. And if I change
    the field to a static field it doesn't cut off either, but the font
    looks a little different as well.
    Any ideas?

    Why should I start a new thread if this one was never resolved and I am still having the same problem?
    ANYWAY,
    I was able to fix this by finding an answer on a different forum.
    Simply increase the text leading using the text format option, like so:
    var format:TextFormat = new TextFormat();
    format.leading = 2;
    field_txt.defaultTextFormat=format;

Maybe you are looking for

  • Revenue Recognition based on User Status of assigned Sales Order line item

    Dear Community members, We have requirement to recognize / de-recognize revenue posted to WBS for calculation of RA, based on the 'User status' of the assigned Sales Order line item. To elaborate requirement further - 1) WBS Element - XXX - 10 ( with

  • Problem in using c:foreach

    hi My taglib direcive is : <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>And i m using this code : <c:forEach var="list" items="${movie}"> <tr><td>${list}</td></tr> </c:forEach>The error is : org.apache.jasper.JasperException: The absol

  • How can I stop Dreamweaver spoiling my code layout?

    For example, if I have: <div class="Something"> <some other stuff> </div> Then if I save the file and close and reopen it again, I sometimes find Dreamweaver has changed it to: <div class="Something"> <some other stuff></div> Which IMO is far less re

  • IPhone 3G will not charge properly

    I've had my iPhone 3G for about two months now, but in the last week the phone has begun to have issues with charging properly. The phone will not properly show the charge progress on the screen (IE it won't show the meter filling while it's plugged

  • IWeb - Poster Frame

    I just launched a new website and have had no problems except for getting the poster frame to work properly. I don't like the poster frame (frame of video to freeze) on three of the video, so I adjusted to the desired frame using the poster frame in