Sapscript : Printing Text In same line

Hi Friends,
           I have created 2 standard text.
           I want to print the follwing in the same line -
           First standard text + <A hard coded value> + Second standard text.
<b>           I have coded like this -</b>
           /:   INCLUDE SLP OBJECT TEXT ID ST LANGUAGE ZH
        =     : 999
        /:    INCLUDE YEARS OBJECT TEXT ID ST LANGUAGE ZH
           First two are coming in the same line but third one is coming in second line.
Please suggest.
Regards
Kishor

Hii
'=:' works but try it by increasing your window size
otherwise use READ_TEXT fm
You pass it the Text Identification Details
and it will retrieve the texts into the internal table (IT_TEXTS).
Internal table to store standard texts
DATA: IT_TEXTS like T_LINE occurs o with header line.
CALL FUNCTION 'READ_TEXT'
     EXPORTING
        CLIENT                  = SY-MANDT
          id                      =       "Text ID
          language                =       "Laguage
          name                    =       "Text name
          object                  =       "text object
        ARCHIVE_HANDLE          = 0
   IMPORTING
        HEADER                  =
     tables
          lines                   = IT_TEXTS   "Internal table
   EXCEPTIONS
        ID                      = 1
        LANGUAGE                = 2
        NAME                    = 3
        NOT_FOUND               = 4
        OBJECT                  = 5
        REFERENCE_CHECK         = 6
        WRONG_ACCESS_TO_ARCHIVE = 7
        OTHERS                  = 8
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
The main inputs for the FM are Text name, Language, Text ID and Text object and can be located using the following procedure.
<b>Step 1 Display the desired text with transaction (i.e. ME23)
Step 2 Show long text for a particular text (i.e. Deliver To)
Step 3 Select ‘Header’ from the Goto menu (Goto->Header). The following screen should appear displaying info needed to retrieve text using the ‘READ_TEXT’ function module (Text name, Language, Text ID, Text object)</b>
Regards
Naresh

Similar Messages

  • Printing everything on same line

    Hi all,
    I want to write text on a text File in a formatted manner, such that there is line break after every line.The problem I am facing is that it print everything on same line. When we use "/n" it generates a dummy character. We are using FileWriter
    String s="Hello"+"\n"+"Everybody";
    FileWriter f=new FileWriter("abc.txt",true);
    f.write(s);
    f.close();
    I want every time this code is runs it should print sentences on different line.

    Then I would recommend that you wrap a PrintWriter around your FileWriter and use its methods named println(), then you won't have to worry about newlines yourself. Since a newline is different depending on what OS you run your program on, that is a safer approach than just typing "\n" (which only works as newlines on Unix type OS's btw, on Windows it comes out as garbage when viewd in for example Notepad since Windows uses "\r\n" for newline)
    Like this (reusing your code)
    FileWriter fw = new FileWriter("abc.txt",true);
    PrintWriter pw = new PrintWriter(fw);
    pw.println("Hello");
    pw.println("Everybody");
    pw.close();Another alternative is to use System.getProperty("line.separator") instead of "\n" to make it work on all platforms.
    HTH,
    Fredrik

  • How to print a text of type text element and include text in same line

    hi,
    I am working on forms,
    i have to display like this in the form
    1.RFQ number, 2.Header text
    explanation for numbers
    1. The RFQ number is displayed using a variable so the text type is Text Element
    2. Header text, has to be got form the standard text , so the text type is include text.
    how can i print both in the same line.

    Hi ,
    You can use a charecter variable whos length >= length of RFQ no + Length of Header string .
    Concatenate both in this variable. And print the variable.
    Pls reward if useful.
    Laxman

  • SAPscript address name1 and name2 - print on the same line

    I want to print name1 and name2 on the same line in an address on a check. Does anyone know how to do that ? I am usign the ADDRESS SAPscript command.

    The ADDRESS command allows you to format according to different countries postal formats. If you want to put two lines in one, I don't think you can use the ADDRESS command, but will have to format it yourself.
    Rob

  • Is there a way to print over the same line of text?

    Hey everyone, does anyone know if it's possible to write over the same line in a console window? I am formatting a diskette an currently it is going:
    1 percent complete
    2 percent complete
    3 percent complete
    4 percent complete
    5 percent complete
    I am currently doing:
    System.out.println(bufferedReader.readLine());
    to display this .. is there anyway to write over and over on the same line?
    Thanks again.

    I just thought of something!!! Try this:
    System.out.println("When the zeros have printed twenty times the disk has been formatted\n");
    System.out.println("|-----------------------------------|"\n)
    Then add the zeros to the line underneath it as it formats.  This will give a progress bar effect.  The zeros, when completely done, should fill up the whole |---| segment.
    Hope this helps.
    Virum                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Printing Text with multiple Lines

    Hello,
    i want to print a list and in that is text with multiple lines.
    In the PrintPreview and in the Printout i get only one line.
    How is the best way to do this?
    Thank you,
    Markus
    Private Function Print_Remarks_Control_Get(ByVal pstrText As String) As TextBox
    Dim TextBox_Out As New TextBox
    With TextBox_Out
    .Text = pstrText
    .HorizontalAlignment = Xaml.HorizontalAlignment.Left
    .VerticalAlignment = Xaml.VerticalAlignment.Top
    .FontSize = 16
    .Margin = New Thickness(15)
    .AcceptsReturn = True
    .MinWidth = 800
    .MinHeight = 600
    End With
    Return TextBox_Out
    End Function
    Sub PrintPageList_Prepare()
    Dim i As Integer
    Dim objVM As clsTextVM
    Dim lstText_List As ObservableCollection(Of clsText)
    Dim ctrPrint_StackPanel As StackPanel
    Dim ctrPrint_Title As TextBox
    Dim ctrPrint_Description As TextBox
    Dim ctrPrint_Remarks As TextBox
    Dim objText As clsText
    mPrintPageList.Clear()
    objVM = DirectCast(Me.DataContext, clsTextVM)
    lstText_List = objVM.CustomClass_List
    ctrPrint_StackPanel = Print_StackPanel_Get()
    For i = 0 To lstText_List.Count - 1
    objText = lstText_List.Item(i)
    If objText.Name.Length > 0 Then
    ctrPrint_Title = Print_Title_Control_Get(objText.Name)
    ctrPrint_StackPanel.Children.Add(ctrPrint_Title)
    End If
    If objText.Description.Length > 0 Then
    ctrPrint_Description = Print_Description_Control_Get(objText.Description)
    ctrPrint_StackPanel.Children.Add(ctrPrint_Description)
    End If
    If objText.Remarks.Length > 0 Then
    ctrPrint_Remarks = Print_Description_Control_Get(objText.Remarks)
    ctrPrint_StackPanel.Children.Add(ctrPrint_Remarks)
    End If
    Next
    mPrintPageList.Add(ctrPrint_StackPanel)
    End Sub
    Private Sub OnGetPreviewPage(sender As Object, e As GetPreviewPageEventArgs)
    ' Das ist die MessageBox
    ' Windows.UI.Popups.MessageDialog()
    PrintPageList_Prepare()
    mPrintDok.SetPreviewPage(e.PageNumber, Me.mPrintPageList(e.PageNumber - 1))
    End Sub

    Yes, not only RichEditBox but also RichTextBlock can also do this. Besides TextBox also have TextWrapping functionality.
    -James
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Column printing on the same line in reports

    guys,
    i have a report with lets say n no. of columns. Now i want to display column 1 and 2 on the same line, i.e without giving a line break (given the fact that my report is page wise and not tabular). Can i do that? If so, then how?
    Any help will be highly appreciated. Kindly reply asap

    Hi Mike,
          Sorry, I should have realized you were using LabVIEW's HTML VIs - and it doesn't look like they provide for Table "Nesting" (at least through 7.1)!
    Here's a couple of VIs that might help you out.  Util.HTML.Table builds the HTML for a table.  SideBySide.vi uses this Util to embed two tables into an HTML Report.
    I whipped these up just for you - so they may need "polishing".  Should you need to fine-tune the table-appearance, I'm afraid you're on your own, though there's lots of help on the web.  Don't worry, HTML is pretty easy - and you'll find a nice HTML resource here. 
    Cheers!
    Message Edited by tbd on 03-05-2007 12:47 AM
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
    Attachments:
    Util.HTML.Table.vi ‏63 KB
    SideBySide.vi ‏68 KB

  • Standard text (SO10) - To print the text in same line

    In Standard text (SO10) I would like to have my text in a single line. For that I have used the extended line (=) tag. But It is not working.
    Can anyone help me how can I achieve this.
    Actually how many characters I can put in a single line. I think it is 72. But my text is less than 72 characters.
    Can anyone Please help me.
    Regards
    Meshack Appikatla.

    A Text Symbol in Script or Smartform can take lenght of Maximum 80 characters. Any thing more than that will be truncated even if the window is long enoguh to hold more than 80 characters. Si your character formated need to be have the PROTECTED option checked.
    At Topic:
    Try increasing the window size in lenght or width, If that is not possible pratically, you can try by decreasing the font size.

  • Printing Strings on same line questions

    I need to know how to print the same number of _ (underscores) as there are letters in a given string. I already have the int of the number of characters in the string but how do i use that to print the same number of underscores in ONE line, not vertically. responses are appreciated.

    In your loop that prints the underscores, use System.out.print("_"), rather than System.out.println("_"). Read the javadocs to see the difference between these two methods.

  • Can only type text on same line?

    when i enter some text and hit the "enter" button, photoshop returns me to the center of the text i just typed, not the next line below.  how do i fix this?

    The same question was anwered here:
    http://forums.adobe.com/message/3208247#3208247
    Have a look at that link.

  • How to print text in two lines using REUSE_ALV_LIST_DISPLAY

    hai gurus,
    i want to print the heading of the column in two lines using the REUSE_ALV_LIST_DISPLAY fucntion module
    fro example if column is for DOCUMENT TYPE
                DOCUMENT TYPE
              shoudl be printed as
            DOCUMENT
              TYPE
    regards
    afzal

    Let me know if this helps...I don't know why the formatting is not working...
    <MODIFIED BY MODERATOR - RESPECT THE 2,500 CHARS LIMIT>
    Edited by: Sourav Bhaduri on Jan 15, 2010 2:37 AM
    Edited by: Sourav Bhaduri on Jan 15, 2010 2:42 AM
    Edited by: Alvaro Tejada Galindo on Jan 14, 2010 5:58 PM

  • How to merge objects or have italics and plain text on same line?

    Okay, here's my problem - I've been making DVDs in CS5 for a couple of years. In my main menu it usually says something like "Play show title here" and the show title is italicized. Unfotunately, now in CS6, I suddenly can't just highlight the show title and change it to italics, because now it wants to italicize the entire line including the word "Play". If I make "Play" a separate title, so that I can have it in standard font, I can't figure out how to merge it with my show title so that they are highlighted together and work as one single button. Frustrating. Any solutions?

    I don't recall if we found a way to do it in Encore; it is so much simpler in Photoshop.
    The problem in Encore is selecting only the text, not the whole text box.

  • How to print text in a new line in a text view.

    Hi,
    I have a situation where I need to print two lines inside a text view.
    for eg:     Bye Bye < user name>
                  Have a nice day!!
    I am assigning this to the context by conactenating   Bye Bye   < user name>   Have a nice day!!.
    But the text view prints it a same line.
    How can I print Have a nice day!!. in the second line. 
    Any suggestions and ideas are welcome and  appreciated.
    Thanks and regards.

    Hi,
    This link will help you to do all the functions in text view using HTML.
    [html in text view|http://help.sap.com/saphelp_erp2005/helpdata/en/08/5696420cc2c56ae10000000a155106/content.htm]
    Karthik.R

  • Standard text printed only on one line

    Hi experts,
    I have a standard text in several lines:
    Line 1
    Line 2
    Line 3
    but in the pdf form it's printing in the same line:
    Line 1 Line 2 Line 3...
    Any suggestions ?
    /Kiehn

    Hello!
    1) When you say you have Standard text is several line that does not mean, that system have is in several lines.
    I don't know if you are aware or not, but while SAP system always stores long texts in 70 (or about so) char segments the fact that they are printed on one or several lines is controlled solely by formatting column that precedes each line in TLINES table. So, does your text has line breaks or new paragraph marks before those lines?
    2) If everything in above is correct, than maybe you have to check the format you use to transfer text from SAP to Adobe (in interface/context). Please, recheck what is stated [here at SAP Library|http://help.sap.com/saphelp_nw70/helpdata/en/04/ecfab99fc345f8826490df387aaf82/frameset.htm]. All this together with correct format for field (Rich text or Plain text) plus (as stated by poster above) "Allow multiple lines" and "Expand to Fit" (vertically) formatting should do the trick.
    Regards,
    Petr Perstnev

  • Printing on chars on the same line using system.out.println

    i have the following string:
    String msg = "This is a message brought to you by one and the only";
    msg.toCharArray(); //converted to a char array.
    i've written a loop which goes through each of the char elements
    and puts it in it's own array:
    int i = 0;             
    while (i < msg.length)
                    char[] test = {msg};
    System.out.println(test);
    the problem is system out println prints out each of the elements on seperate lines is
    it possible to have them in one line to reform the original string?

    No exactly sure what you are trying to do. Does this
    help?
    String msg = "This is a message brought to you by one
    and the only";
    char[] test = msg.toCharArray();
    System.out.println(test);
    not really because i want to convert the string to a char array and then reform it in another char array and then i can choose which elements i want included and not to be so that it can be printed on the same line. I can do it the following way:
    char[] test = {test[0], test[1]]};
    but say i want all the letters containing the chracter T (and again i can use the above solution and select the elements from the string but i don't want to hardcode it, say the string changes etc) in the test array so then i thought of writing a loop:
    while (test[i] == 'T')
    char[] test2 = {test[i]};
    System.out.println(test);
    i++;
    but it puts each T in a new line...

Maybe you are looking for