Sapscript:To place text elements according to x-y coordinates

Hi All,
I have a requirement in which I have to print texts through sap script very accurately .Their x-y coordinate  position is given.
I know to use this for boxes but can some one guide me to use these for the texts
Regards,
Vivek

See the simple box command i did for main window..
IF &PAGE& EQ '1'.                             
BOX FRAME 10 TW                               
POSITION WINDOW                               
BOX WIDTH '74' CH HEIGHT '3.1' LN FRAME 10 TW I
POSITION XORIGIN '3.0' CM                     
BOX WIDTH 0 CM HEIGHT '34.5' LN FRAME 10 TW   
POSITION XORIGIN '5.0' CM                     
BOX WIDTH 0 CM HEIGHT '34.5' LN FRAME 10 TW   
POSITION XORIGIN '7.2' CM                     
BOX WIDTH 0 CM HEIGHT '34.5' LN FRAME 10 TW   
POSITION XORIGIN '8.3' CM                     
BOX WIDTH 0 CM HEIGHT '34.5' LN FRAME 10 TW   
POSITION XORIGIN '9.5' CM                     
BOX WIDTH 0 CM HEIGHT '34.5' LN FRAME 10 TW   
POSITION XORIGIN '12.0' CM                    
BOX WIDTH 0 CM HEIGHT '34.5' LN FRAME 10 TW   
POSITION XORIGIN '14.5' CM                    
BOX WIDTH 0 CM HEIGHT '34.5' LN FRAME 10 TW   
POSITION XORIGIN '17.0' CM                    
BOX WIDTH 0 CM HEIGHT '34.5' LN FRAME 10 TW   
ENDIF.                                        
IF &PAGE& NE '1'.                             
POSITION WINDOW                               
BOX WIDTH '74' CH HEIGHT '36.5' LN FRAME 10 TW
POSITION WINDOW                               
BOX WIDTH '74' CH HEIGHT '3.1' LN FRAME 10 TW INTENSITY 10  
POSITION XORIGIN '0.9' CM                                   
BOX WIDTH 0 CM HEIGHT '36.5' LN FRAME 10 TW                 
POSITION XORIGIN '3.0' CM                                   
BOX WIDTH 0 CM HEIGHT '36.5' LN FRAME 10 TW                 
POSITION XORIGIN '5.0' CM                                   
BOX WIDTH 0 CM HEIGHT '36.5' LN FRAME 10 TW                 
POSITION XORIGIN '7.2' CM                                   
BOX WIDTH 0 CM HEIGHT '36.5' LN FRAME 10 TW                 
POSITION XORIGIN '8.3' CM                                   
BOX WIDTH 0 CM HEIGHT '36.5' LN FRAME 10 TW                 
POSITION XORIGIN '9.5' CM                                   
BOX WIDTH 0 CM HEIGHT '36.5' LN FRAME 10 TW                 
POSITION XORIGIN '12.0' CM                                  
BOX WIDTH 0 CM HEIGHT '36.5' LN FRAME 10 TW                 
POSITION XORIGIN '14.5' CM                                  
BOX WIDTH 0 CM HEIGHT '36.5' LN FRAME 10 TW                 
POSITION XORIGIN '17.0' CM                                  
BOX WIDTH 0 CM HEIGHT '36.5' LN FRAME 10 TW                 
POSITION XORIGIN '19.7' CM                                  
BOX WIDTH 0 CM HEIGHT '36.5' LN FRAME 10 TW                 
ENDIF                                                       
adjust the box position as like main window size.

Similar Messages

  • Page number after printing a text element in SAPScript

    Hello to all,
    is it possible to know the page number in which SAPScript print a text element?
    Thanks and regards
    Franco

    Hi!
    &PAGE& variable gives you the actual page.
    /E MYELEMENT
    /: DEFINE &MYPAGE& = &PAGE&
    I hope it works...
    Regards
    Tamá

  • Need info about text elements used in Smartform / Sapscript

    Hi experts
    I am working on Smartform / Sapscript i am facing the problem mentioned below
    I want the info regarding all the text elements used in Form / Script
    Can u please suggest me the name of table
    I have already used STXH table but it is not giving me the all text elements
    I mean i want that if i enter some formane ...i should get all the text elment contained in it
    Plz help me
    Thanks

    Hi Gaurav,
        Try out the fn module "READ_TEXT".
    Hope it helps you.
    Regards,
    CS.
    Note: Reward points if helpful.

  • In which table the lines of the SAPScript form text elements are found?

    Hello,
    I want to write a report analyzing the lines contained in the text elements of an SAPScript form. From which table can I select the data? Regards.
    Lars.

    Sorry.. forgot to mention the FM name.
    You can use FM 'READ_TEXT'.
    pass 'ST' for ID.
    and 'TEXT' for OBJECT
    and pass the name of text element to NAME u will get the
    text element.

  • How to copy a text element to another in sapscript

    Question
    Have a bug in the system and need to copy an existing text element to a new one.
    How do you do this.
    I have found the text elelement in tihe MAIN window - the code /E   510-C  <-- this needs to be copied to a new text element called /E    510-A.  I can cust and paste this into the text element screen  But doesn't the 510-A refer to some text created via SO10?  But then doesn't sapscript require you to use an include to get the text in there?
    HELP - 2 days from go -live here!!
    Thanks and big points to who can ever help!

    Text elements are specified with "/E".  These are different from STANDARD TEXT objects that you define in SO10 and reference with the INCLUDE statment.
    Text elements are called from the ABAP print program.  If you copy text element 510-C to 510-A, the ABAP print program has to call element 510-A to execute the statements in this section.
    Are you dealing with errors from a syntax check?

  • SAPSCRIPT - TEXT ELEMENT

    Hi ,
       In print program there is a text element 525.
       I am using that text element to print the line items in sapscript.
       But this 525 text element is not trigered in sapscript.so help me out
       to solve this issue.
      I am using RFFOUS_C  print program to print DD data in F110 transaction.
    Thanks.

    Hi Pandiyan
    Did you get the solution for your problem. I am facing the same situation. Text Element 525 is not getting triggered when I am using RFFOUS_C program and a customised script. If you had figured out this problem could you please tell me the solution.
    Appreciate your help.
    Alok

  • I have to place uline in text-element

    hi experts,
           i have to place uline in text-element ( means layout ) .
    pls any one suggest.
    thanks&regards,
    praveen

    I WOULD RECOMMEND YOU TO CREATE A PARAGRAPH
    FORMAT AND USE THIS PARAGRAPH FORMAT FOR EXAMPLES
    1 Create PARAGRAPH format LI
    2 set Alignment-Left, Line Spacing- 1.0 & LN (LINES).
    Use this in your script.
    OR USE LIKE
    &ULINE(20)&
    rgds
    rajesh
    Edited by: RAJESH KUMAR on Aug 7, 2008 10:49 AM
    Edited by: RAJESH KUMAR on Aug 7, 2008 10:55 AM

  • Text element in Sapscript

    Hi friends,
    When I do client copy, text elements are not getting transferred.
    Can anyone help me ???

    Hello Priya,
                    Text elements are client dependant. Just import them into other client using Change requests or copy then into the client. Then only ur problem will be solved.
    Regards,
    Priyanka.

  • Sapscript text Element Problem

    Hi i have this following form AP checks which is not printing one of the line which it used to. I made some changes on other windows but for some reason it stopped print the text line it used to.
    Here is the part of the code in the main window that's not printing...
    /E  513
    /*  ------------------ Payment on behalf of --------------------------------
    AS  Payment is made on behalf of &REGUD-ABSTX&,
          &REGUD-ABSOR&.
    /E  514
    /* ------------------ Signature -------------------------------------------
    /: INCLUDE &REGUD-TXTUN& OBJECT TEXT ID ADRS
    I need to print the line where it says "Payment is made on...."
    Can any one tell me what are those /E 513 is?
    They have all these numbers infront of a small paragraph.
    I am guessing some program is calling the paragraphs by those numbers as the paragraph in the program doesn't appear they way it appears in the printout.
    Please help.

    TEXT ELEMENTS WITH NAMES
    You recognize named text elements by the paragraph format /E. Such a paragraph may look like this:
    The character string NAME represents the name of the text element. This name can be up to 30 characters long and may consist of letters, digits and/or special characters. The name is followed by the text lines of this text element. The end of a text element definition is marked by the beginning of the next text element (the next /E line).
    Note that names of text elements are valid only locally. That is, different windows may contain text elements with the same names.
    To output named text elements, you must use the interface function module WRITE_FORM, which is called in the print program.
    The example below shows text elements for a column heading within an invoice (AS indicates the standard paragraph format and , , indicates the tab):
    You can output named text elements only in the windows, in which they are defined. For this reason, you need in the interface function module WRITE_FORM, apart from the name of the text element, the name of the window in which the text element is defined. You call the interface function module from within the print program.
    http://abapprogramming.blogspot.com/2007/10/sap-script-2.html
    Regards,
    Amit

  • SapScript  'MAIN' Window without 'Text Element'

    Why is it, if we run 'MAIN' Window without defining 'Text Element'(/E), it displays the contents twice.. The same doesn't happens with other 'Variable' windows..

    Hi Main window is different from Var window.
    Var window will call only once .
    But main window it will call many times, it will go to Driver program and come back to populate the data.
    for Clear info debug and see.
    regards
    vijay

  • Text element not gettin refreshed in smart form

    Hi
    Text element does not get refreshed in the smart form preview. 
    I have a selection screen on which i have a few selection parameters and three application
    toolbar buttons. "Save" , "Preview" and "Print". At the end of selection screen I have a
    button "text" which when clicked takes me to the text element editor(FM  'TEXT_EDIT' )
    I have to enter a project number on the selection screen, enter all other details and
    then click on the "Text" button. I would then change /edit some text etc and come back
    to sel screen. Now i click on preview , the smart form shows up and the text gets dispalyed
    with the modified text. 
    I am passing the text name by appending "sometext" + project number to the TEXT_EDIT
    and while eiditing and as a parameter to the smart form. In the smart form i have given the variable in the "include text".
    Now Herez the problem.
    I am still in selection screen and clik on the "text" button and it takes me to the
    text editor. Now i add more lines, save and come back. Now i clik on preview
    button and it displays the old text data.
    When i come out of the transaction and renter , clik on the preview it displays data
    correctly. Now if i repeat the steps
    1.edit text button , add a few lines
    2.preview button, shows data as entered in step 1.
    3.edit text button, add few more lines
    4.preview button .. the text displays is from step 1 and not 3.
    I am not sure if this is lot of info for anybody to write an answer straight away but
    if u need more info i can provide. I can do a read_text in the smart form but its toooooo
    much of a pain for the data i need to display. million adjustments to be taken care of.
    What could be the problem ? I have given all the basic settings like save parameter
    in edit_text fm , checked all the print preview options in sdn.
    Here are my questions
    1. Why is the text element not getting refreshed.
    2. After a form is displayed for preview , will it store anywhere in the buffer ? if yes
        is there any method to clear it ?

    Hi,
      The problem is not with text elements, it might be your size of window which you are using to display the text elements. Check your window size and modify that accordingly.
    Cheers,
    Bujji

  • Text elements not centered anymore once project goes live

    Hi guys,
    I've discovered Edge Animate a few days ago and I really love that it looks and feels a lot like After Effects - you should exchange and implement some functions of EA to AE (i.e. the curves easing options) & vice versa though
    What I went through, until know
    First of all, I am a Worpdress user using a responsive theme and the Edge Suite plug in.
    I've created a typo animation using a custom licensed web font and it took me a while to get it to work properly - the web-kit generated by the myfonts.com kit builder didnt' work with EA, so I had to let fontsquirrel create one instead. Now, the SVG font file gets exported upon export, but the EOT, WOFF and TTF files don't - not sure if it's a bug, but it's an easy thing to copy the files via FTP to the "../uploads/edge_suite/project/..." folder in order to fix this.
    My Problem
    After uploading the animation to my server via the Edge Suite plug in, approx. 50% of the text elements are not in the right place anymore. The affected elements are all offset by a fixed amount of pixels vertically, while they actually should be centered. When I run the HTML file of the exported web animation locally, everything's fine though.
    The problem occurs in Chrome, Safari, Firefox and on the iPhone.
    Has anyone experienced a similar issue?
    Will

    It seems like it is related to Wordpress or the Edge Suite plug in.
    HTML
    I've uploaded the animation (using web publishing) to a folder on my server, and everything is fine.
    Wordpress
    I have analysed the code of the animation being rendered on my Wordpress site, but the CSS coordinates all correspond to the parameters inside EA.
    I've also installed the Edge Suite plug on a different Wordpress installation (a complete different site) of mine, and the results are even worse. It seems like the origin of some elements is being tossed around space.
    That said, I'm clueless.

  • How to call new window and text element without changing print program

    Hi Friends,
       I have requirement like this . i have a standard print prog and custom form. i want add 2 to 3 extra windows in the form and i have to print some data. but how can v do this with out changing the print program. i know that to pick new fields through subroutines. but how can v call new windows and new text elements with out changing the print program.
    usually in the print program we write as follows.
    write_form
    window = 'HEADER'
    textelemtn = 'HEADER'
    can we accomplish this one also through subroutines or any other way is there.
    can any one pls suggest this.
    Thanks in advance.
    Rahul

    u  copy the standard print program and make custom program.
    write your own codes in it.
    assign this program in the place of standard print program.
    Reward points, if helpful.

  • Smartforms,How to display different standard Text in a Text element.

    In smartform,if I want to according to the different conditions,display one of the serveral different standard Text objects which all  maintained in SO10 in a same text element,how to do it?
    if i put them in serval text elements, each condition only display the corresponding text element,but the text content can not display in the same position.
    Is there anyone can tell me?
    thanks.

    use Alternative to control it no problem
    for example you want to display the different SO10 to same position TEMPLATE's row 1 col2
    TEMPLATE1
    Alternative case1
    YES
    INCLUDE TEXT1(display SO10) [set output option line1 column2]
    NO
    Alternative case2
    YES
    INCLUDE TEXT2(display SO10) [set output option line1 column2]
    NO
    Alternative case3
    every case your SO10's text is always display at line2 column2
    just try to test it ,you can know

  • Addition of extra Space issue in site studio text element

    Hi,
    we have implemented WCM for our website. We are in webcenter PS3 version.
    At places where we have used text element for titles of various sections,
    if we append one extra space and save it, it displays as   in front end.
    When we remove the space, it does not clear. But if we cut and paste once the word once again it is perfect.
    Is there any solution to trim that space when it is displayed at front end. Please suggest.
    Regards,
    Bhaskar

    enclose your text element with strTrimWs.
    Removes spaces from the beginning and end of a string.

Maybe you are looking for