Printing text at particular position in SAPscript

Hi All,
I want to print text at particular position, I used Command POSITION but it is not working .
As I am using counter as Y position for a box and i want to print lines of text in that box. since I am able to position box according to counter but, texts which I want to display in box is not comming inside the box according to the counter.
Please suggest what command to use for this.
Thanks & Regards
Shweta

Yes Bernsen ,
You are right. POSITION works only with BOX not with text.
And also I can not create text in the another window  as there are two headers of main window in my form . one is for the line Items and after completion of it tis another header which is for the another lineitems say for withholding taxes of the vendor. so I need both the headers in the main window.
Any way finally I got answer of my question. I will want to share with you all what I did:
For the first box headre no y coordinate was required as height was the main thing here.
Then came the line items . I set counter for this line item.
This counter I used as ypos for the box. then for displaying heared text I made some adjustement with this counter as if line item is 2 then I gave one line space .
whereas for multiple lines i.e. if no. of line is more than 2 then I gave 2 line space above the text to fit it into box. as my text was always appearing below drawn box.
Thanks.
Shweta

Similar Messages

  • Printing text in last page main window of a script

    Hi All,
           I want to print some text at the bottom of last page main window.But how can we find that it is last page.I mean which condition we have to put for that.
    I think the below condition like
    If last-page NE ' 0'.
    write : '----
    '..........   will be used for printing at last page footer window.
    what about main window........how to find that it is the main window of last page............
    Thanks in advance ....
    Regards,
    Rakesh.

    Hi,
    you can use this
    IF NEXT_PAGE EQ ' 0 '.
    write the text here.
    ENDIF.
    in the main window itself. Once all the records got printed, it will check that there is no next page. at that time, that was the end of the internal table in the mainwindow and the text will be printed.
    If you want a seperate window, then also the same logic will work.
    If you want a seperate window, then the output look and feel will not be so good.
    I mean where ever the last record got completed, it will print the text if you put it in Main window. other wise statically it will print at a particular position where your window was placed.
    Regards,
    Venkatesh

  • To get the content of a pdf file in a particular position in text format

    I am troubling with geting the content of a pdf file in a particular position.I got the code to get the content of a pdf document as whole in text format.But i only need the content at a particular area.
    i am using PDFTextStripper class in pdfBox jar to get the content as whole.
    pls send some sample code
    pls help me
    Edited by: thomas00 on Sep 21, 2007 2:55 AM
    Edited by: thomas00 on Sep 21, 2007 3:08 AM

    pls any one reply

  • HOW TO DISPLAY THE TEXT ON A PARTICULAR PAGE IN SAPSCRIPTS

    HI,
       HOW TO DISPLAY THE TEXT ON A PARTICULAR PAGE IN SAPSCRIPTS?

    in ur script main window
    /: IF &TTXSY-PAGE& = 15.              
    ur text or standard text           
    /: ENDIF.                             
    use this.
    hope it helps if any issues revert back

  • SAPScript: Is it possible to print text on an angle?

    Hello,
    Is it possible to print text from the lower left corner to the upper right corner using SAPScript?
    Thx.
    Andy Jacobs

    Hi Andrews,
    it is possible to print by placing each characters in different line.
    for example:
                 A
                  N
                   G
                    L
                     E
                      P
                       R
                        I
                         N
                          T
    by using tabs and each character will be placed in an angular fashion using tabs
    Cheers
    VJ
    Message was edited by: Vijayendra  Rao

  • Print text vertically in SAPScript

    Hi,
    How to print text vertically in SAPScript?
    Can we use controls for it?
    Please help its urgent.
    Thanks,
    Madhura

    You can print horizantally. using the following code
    You know the total length of your text right.
    You need to have conditions to avoid unnecessary spaces.
    If &v_text(1)& is not initial.
    ph &v_text(1)&
    endif.
    if &v_text+1(1) is not initial.
    ph &v_text+1(1)
    enddif.
    if &v_text+2(1) is not initial.
    ph &v_text+2(1)
    enddif.
    But we cant rotate letters to left . Not sure . Will explore on it and let you know.
    Reward points if useful.
    Regards,
    Nageswar

  • Printing Text between boxes in sapscript

    Hi Friend ,
    I have a invoice form . There is the adddress window , info window and the main window . I need to insert some text between the space between the MAIN window and the INFO window . Is there a way we can directly print text between Window or Do i need to create a new window ?? How can I go about this . I have already defined the text in SO10 transaction . I am using this command but dont know how to put it in the space between the infowindow and the main window . Please suggest .
    INCLUDE Z_text_insert  OBJECT TEXT ID ST LANGUAGE SP PARAGRAPH HP.
    Thank you ,
    Hari
    Message was edited by:
            Hari G Krishna

    Ya u have to insert a  window between the two windows.Any text to be printed should be in window.
    Check and let me know if u face any problem.
    Regards

  • How to Print text in two main windows

    For printing label have created two main windows on a page. calling function write_form In ABAP Program under do loop for two times. 
    but program prints only one window. why is it so? how can i print text on two windows.
    do 2 times.
      COUNT = COUNT + 1.
    loop at itab WHERE DEPTT LT 200.
        CALL FUNCTION 'WRITE_FORM'
          EXPORTING
            ELEMENT  = 'TEST'
            FUNCTION = 'SET'
            TYPE     = 'BODY'
          WINDOW   = 'MAIN'
          EXCEPTIONS
           ELEMENT   = 1
           FUNCTION  = 2
           TYPE      = 3
           UNOPENED  = 4
           UNSTARTED = 5
           WINDOW    = 6
           OTHERS    = 7.
      endloop.
    enddo.
    Please guide.

    Since the information is variable and coming out of the print program, I can assume you want to print many labels but two to a page. Also, any page numbering, etc will need to be updated. This is easily accomplished with SAPScript but a feature people rarely use I believe. Here are the simple steps:
    1) On the Windows Screen: Creat a main window for the size of the label, etc knowing that you will be putting multiple windows on a page. For example, if page size is 8.5 x 11, maybe your window size is 6 X 4 or something similar. You only need one main window defined.
    2) Now go to Page Windows Screen. Add a window MAIN and down at the bottom where it says Window Type put in MAIN. Next to this field is a little field about two characters long. In here put in '01'.
    3) Now Add another window MAIN and down at the bottom put in '02'.
    Hopefully this gives you the idea. I've done this with up to 30 small windows in order to print variable window for labels on label stock such as Avery 8167, etc. 
    Good Luck!
    Tim Stadler
    Menasha Corporation

  • Geting the content of a pdf file in a particular position

    I am troubling with geting the content of a pdf file in a particular position.I got the code to get the content of a pdf document as whole in text format.But i only need the content at a particular area.
    i am using PDFTextStripper class in pdfBox jar to get the content as whole.
    pls send some sample code
    pls help me

    pls any one reply

  • To print text in sapscrpit.

    I want to print text maintained in standard tcode QM03 in sapscript .
    I have a y-report as driver program and want to print the text maintained for a notification number in the script. I have used "read_text". But i get only partial text.
    In the debugger all the text comes in the variable but only prt of it gets printed in the actual script . Please help

    Hi
    Check the Window size where you are printing the Text from the Variable
    from the read text you will get into the internal table lines
    so format those internal table line field as per the space available for that field and do
    Regards
    ANji

  • Printing tab in Bar Code using SAPScript

    Hi,
    We are trying to print information from multiple fields in Bar code (using Code128 symbology) on our Utility Invoices, printing of which is done using SAPScript.
    Our objective is that when accepting payment using FPCJ transaction, the Cash Desk Operator will use a Bar Code Scanner and import relevant invoice data into multiple fields.
    However, for that to happen, it is necesary to print tab feeds between data of contiguous fields using Bar code.
    We have tried printing tab feeds in Bar Code using hexadecimal '09'. But it has not helped. Can anybody suggest how one can print tab feeds in Bar Code using SAPScript?
    Thanks in advance,
    Arijit Mitra

    Hi
    See the doc related to BARCODE printing and do accordingly
    To Create a Bar code prefix:
    1) Go to T-code - SPAD -> Full Administration -> Click on Device Type -> Double click the device for which you wish to create the print control -> Click on Print Control tab ->Click on change mode -> Click the plus sign to add a row or prefix say SBP99 (Prefix must start with SBP) -> save you changes , it will ask for request -> create request and save
    2) Now when you go to SE73 if you enter SBP00 for you device it will add the newly created Prefix
    Create a character format C1.Assign a barcode to the character format.Check the check box for the barcode.
    The place where you are using the field value use like this
    <C1> &itab-field& </C1>.
    You will get the field value in the form of barcode.
    Which barcode printer are you using ? Can you download this file and see.
    http://www.servopack.de/Files/HB/ZPLcommands.pdf.
    It will give an idea about barcode commands.
    Check this link:
    http://www.sap-img.com/abap/questions-about-bar-code-printing-in-sap.htm
    Check this link:
    http://help.sap.com/saphelp_nw04/helpdata/en/d9/4a94c851ea11d189570000e829fbbd/content.htm
    Detailed information about SAP Barcodes
    A barcode solution consists of the following:
    - a barcode printer
    - a barcode reader
    - a mobile data collection application/program
    A barcode label is a special symbology to represent human readable information such as a material number or batch number
    in machine readable format.
    There are different symbologies for different applications and different industries. Luckily, you need not worry to much about that as the logistics supply chain has mostly standardized on 3 of 9 and 128 barcode symbologies - which all barcode readers support and which SAP support natively in it's printing protocols.
    You can print barcodes from SAP by modifying an existing output form.
    Behind every output form is a print program that collects all the data and then pass it to the form. The form contains the layout as well as the font, line and paragraph formats. These forms are designed using SAPScript (a very easy but frustratingly simplistic form format language) or SmartForms that is more of a graphical form design tool.
    Barcodes are nothing more than a font definition and is part of the style sheet associated with a particular SAPScript form. The most important aspect is to place a parameter in the line of the form that points to the data element that you want to represent as barcode on the form, i.e. material number. Next you need to set the font for that parameter value to one of the supported barcode symbologies.
    Reward points if useful
    Regards
    Anji

  • Splitting a string into multiple parts from particular position (string has no delimiter )

    Hello Gurus,
    I need to make string of having length 1000 into multiple parts from a particular position which has some text without any delimiter and i want to populate each part into an internal table which has one filed...
    eg : string = 'sap abap sap abap sap abap sap abap sap abap sap abap sap abap sap sap sap abap sap abap'
    suppose i want to start splitting from 40th position...assume that i have 3 parts
    and these 3 parts i have put into an internal table..
    lt_itab = [sap abap sap abap sap abap sap abap,
                  sap abap sap abap sap abap sap abap,
                   sap abap sap sap sap abap sap abap]
    plese help!
    any help would be Appreciated ...thank you

    Hi,
    Try this code.
    TYPES: BEGIN OF ty,
            b TYPE string,
            END OF ty,
            tt TYPE STANDARD TABLE OF ty.
    DATA: a TYPE string VALUE 'aaa bbb ccc ddd eee fff ggg hhh iii jjj kkk lll',
           tb TYPE tt,
           wa TYPE ty,
           off TYPE i,
           len TYPE i,
           count TYPE i,
           count1 TYPE i,
           temp TYPE i.
    len = 8.                      "Position
    off = 0.
    count = strlen( a ).
    count1 = count / 8.
    temp = len - 1.
    DO count1 times.
      temp = off + len.
      IF temp > count.
       wa-b = a+off.
      ELSE.
       wa-b = a+off(len).
      ENDIF.
      off = off + len.
      SHIFT wa-b LEFT DELETING LEADING space.
      APPEND wa to tb.
    ENDDO.
    LOOP AT  tb INTO wa.
    write: / wa-b.
    ENDLOOP.

  • Printing text in javabean

    i've done a complete working application of jsp pages that manages employee information. For added usefulness and security, I'm re-translating the pages to include javabeans. however, I've stuck on one issue. how do i get the javabean tp print text, like using the 'out.print' command?
    my codes are as follows:
    package pDirectory;
    import java.io.*;
    import java.sql.*;
    public class retrieve
         public retrieve()
         public void retrieve()
              Connection con=null;
              Statement stmt=null;
              Statement stmt2=null;
              ResultSet rs=null;
              try{
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              con=DriverManager.getConnection("jdbc:odbc:univac","localhost","n28nick");
              stmt=con.createStatement();
              stmt2=con.createStatement();
              String sql="SELECT DISTINCT DEPARTMENT FROM EMPLOYEE";
              rs=stmt.executeQuery(sql);
              while (rs.next())
                   String dept=rs.getString("department");
                   out.print("<option value='"+dept+"'>"+dept+"</option>");
              stmt.close();
              println("</select></td></tr>");
              println("<tr><td width='200'>Employee Designation:*</td><td width='200'>");
              println("<select name='designation'>");
              String sql2="SELECT DISTINCT designation FROM EMPLOYEE";
              rs=stmt2.executeQuery(sql2);
              while (rs.next())
                   String des=rs.getString("designation");
                   println("<option value='"+des+"'>"+des+"</option>");
              stmt2.close();
              con.close();
              catch(Exception e)
                   println("Error: "+e.getMessage());
    }

    Hi
    KEEP a BREAK-POINT and debug the internal table lines how it is coming
    some overlap must be happening ..check.
    Also check the code where you are getting this text into internal table.
    1) One way to debug smartform is to debug the Function Module of that smartforms.
    If you want to debug particular smartform node that the solution would be,
    insert a "Program Line" just above the node you want to debug and this program line write a normal abap breakpoint.
    So whenever you call the smartforms, it will stop at this breakpoint and you can debug onwards.
    2) SFTRACE can be used for debugging SMARTFORMS.
    Read More here.
    http://help.sap.com/saphelp_erp2004/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
    Reward points for useful Answers
    Regards
    Anji

  • Printing text below the photo.

    From Help the Artist
    When I drag the T icon for text from the left side over to just below the photo of my painting so that I can put the titile etc under it all I get is a staight line.  How do I get it to print text?

    Help the artist,
    I am not near my computer just now.  You have identified additional requirements. Your painting is square, but the paper is rectangular.  Something has to give!
    Go to File menu>new>blank file. Enter height  11 in, width 81/2 in, resolution the same value as that of the picture in px per inch, background black.
    Open the picture file, go to Select>all, then Edit>copy. This puts it on the clipboard.
    Go back to the blank file, then Edit>paste
    The painting will be on a separate layer. Position it with the move tool and resize it with the corner handles of the bounding box, if necessary.
    Type your text below the picture. This will be on a separate layer as well. Position the text to suit.
    I have printed many pictures over the years at a resolution less than 300 px/in. I like to be within
    240-300 range. You can ascertain the resolution of the painting file via Image>resize>image size.
    Sent from my iPad

  • How to print text vertically in smart forms

    hi,
    Can any one tell how to print text vertically in smartforms
    ADVANCE THANKS
    GUHAPRIYAN

    HI,
    Chk out  this thread.Maybe it proves helpful.
    Re: vertical writing in smartforms
    Regards,
    Gayathri

Maybe you are looking for