Tab position in sap script

Hi all,
i have following fields to print..
ZEILE, MATNR ,CHARG, KOSTL, LGORT, MENGE ,MEINS, maktx,
and format is like:
item matrial batch costcen. sto.
mat desc. qty Un
zeile matnr charg kostl lgort
maktx                     menge meins
and in this format I want to display menge and meins fields in right alingment ,
Plz help me...
I gave tab like
1 cm left
4 cm right
5 cm left
in paragraph p1.
Plz help me....

Hi,
You create paragraph format P
In TABS as you mentioned like below
No           Position                  Unit                   Alignment
1             1,00                        CM                    Left-Aligned
2             2,00                        CM                    Left-Aligned
3             3,00                        CM                    Left-Aligned
4             4,00                        CM                    Left-Aligned
5             5,00                        CM                    Left-Aligned
6             6,00                        CM                    Right-Aligned
7             7,00                        CM                    Right-Aligned
8             8,00                        CM                    Left-Aligned
In smartform or sapscripts text editor you need to mentioned like below
,,matnr,,kunnr,,bukrs,,vbeln,,posnr,,menge,,mein,,quan
it will showing in output above showing position
i hope it will help ful you
regards
bhupal

Similar Messages

  • How to set the position in SAP Script

    Hi Professionals,
    Can anyone tell me that How can I set the position of an bitmap Image (after inserting) in SAP Script ?
    by default position is in Left, I need to align it in center or somewhere else.
    Anybody knows, kindly reply!
    Thanks
    Devinder

    Hi,
    But Can we assign a window under another window. Because I want to insert a bmp picture on particular position.
    example:- there is a digital signature and wanted to insert upon a name.
    So, there is a text (which is customer name) and digital signature (in bmp picture format) upon it.
    Thanks
    Devinder

  • How to change sign negative to positive in sap script form

    Hi Guru,
    I had wriiten a below piece of code in my sap script form.Now I need all the negative sign to be convert to positive number means
    if KOMVD-KWERT = 123,98.00-  ,    then require 123,98.00 ..
    And for this I know the synatax is
    &KOMVD-KWERT(S)& .Bur the probleam is how to manage this  (I13) ...Because if i am wriiting
    &KOMVD-KWERT(S)(I13)&    getting no value ...Please help..
    IF &TNAPR-KSCHL& = 'ZD06'.
    &KOMVD-KWERT(I13)&
    endif.
    Thanks
    susri

    Hi SUSRIKANT,
    You can try this logic .
    DATA  : LV_KWERT TYPE STRING,
                  LV_LEN TYPE I,
                 LV_F_KWERT TYPE STRING.
    LV_KWERT = KOMVD-KWERT.
    LV_LEN = STRLEN( LV_KWERT ).
    LV_LEN = LV_LEN - 1.
    IF LV_KWERT +LV_LEN(1) = '-'.
    LV_F_KWERT = LV_KWERT + 0 (LV_LEN).
    ELSE.
    LV_F_KWERT = LV_KWERT.
    ENDIF.
    I hope this logic will be helpful for your issue.
    Thanks & Regards,
    Kumaran Duraiswamy.

  • Script Paragraph Format-TAB position Problem....

    In Script- Medruck , There is a line:
    IM   ,,,,,,Qty. ,,Unit   ,,Deliv. date ,,,,&ETUHRTXT&
    where IM is a paragraph format with TAB positions at:2,3,23,24,34,40,51,57.
    what is the meaning of ,,,,,,Qty ????
    what is the difference in writing :
    IM ,,Qty,,Unit,,Deliv. date,,&ETUHRTXT&                                 AND
    IM   ,,,,,,Qty. ,,Unit   ,,Deliv. date ,,,,&ETUHRTXT&
    How would the Display look like??

    Hi Srikar again,
    If you are putting one tab position after every field, in this case count tab position from the starting i.e. from first variable and go on countin till end . This will take you adding position one after other and it will not overlap.
    e.g. Mat,,qty,,price
    and tab position as 1 : 5  2: 10 3: 15 4:20
    then mat will start at 1 to 5 and qty will from 10 onward.
    Regards,
    Vijay

  • Sap script block positioning.

    hi,
    i have 2 pages in my sap script.
    both the pages have the same "main" window.
    i have given box command in the begining of this main window:
    /:BOX XPOS '.5' CM YPOS '0' CM WIDTH '25' CM HEIGHT '1'  CM FRAME 0 TW  INTENSITY 15
    /:BOX XPOS '.5' CM YPOS '0' CM WIDTH '25' CM HEIGHT 0 TW FRAME 10 TW
    /:BOX XPOS '.5' CM YPOS '1' CM WIDTH '25' CM HEIGHT 0 TW FRAME 10 TW
    The problem i am facing is :the box is coming at the right place for 1st page, but at the top of the page for the next window. i think it must be taking y coord. from the top of the page for the next window.
    Please give a suitable solution for this,
    thanks in advance,
    Ravindra

    hii Ravindra,
    try this out
    /: POSITION XORIGIN '11.21' YORIGIN '5.31' MM
    /: SIZE HEIGHT '2' MM WIDTH '76' MM
    /: BOX  FRAME 10 TW INTENSITY 10
    This can be usefull if you gave several boxes that share the same parameters.
    If you want to set the position realtively to the window use POSITION WINDOW
    to set the position to the top/left start of the window. Then use POSITION
    to set the current position relatively to the start of the Window.
    Note that you uses "+" or "-" in the ORIGIN position to the set the position relatively.
    /: POSITION WINDOW
    /: POSITION XORIGIN '5' MM  YORIGIN '10' MM
    the position is now 5 MM from the left and 10 MM from the top of the window
    NOTE: After using the position command you can move the current position
    realtively to the last used position
    /: POSITION XORIGIN '10' MM  YORIGIN '20' MM
    Now the position will be X = 15 and Y = 30
    Drawing a line. You can draw a line by setting the Height or Weidth to 0
    and add a frane. E.g. a horizontal line:
    /: SIZE HEIGHT '0' MM WIDTH '200' MM
    /: BOX FRAME 10 TW XPOS '11.21' MM YPOS '14.81' MM INTENSITY 100
    i guess this will help
    revert  back for more help
    Regards
    Naresh

  • SAP Script absolute text positions

    HI everyone,
    I am kind of new to SAP Script and I have some trouble defining correct positions of text.
    The point is the following:
    I got a lot of boxes, frames and so on with fixed positions.
    Every of these boxes and frames create a kind of table with a fixed amount of lines (for instance 5 lines each table).
    For instance
    Box1
    Customer
    cust1
    cust2
    Box2
    discount
    dis1
    dis2
    I create the boxes by using variable windows fix on the page. The text needs to be written at the main window as I do not know the exact amount of lines (max 5, but can be less). For example, if I can only receive 1 instead of 5 customers, the text for discounts will not be placed at the dicount table correctly. How can I solve this problem? I can not write multiple lines of text in variable windows by using a loop. If I am writing the text at the main window the start of these texts will not be static and absolute?
    Greetings from Berlin
    Robert
    Edited by: RQuade on Nov 29, 2010 11:13 PM

    You can both write text lines and draw boxes within the MAIN window processing.  Check the help files for the BOX and POSITION commands for the box positioning.  You may want to google the SAPScript Made Easy Guide and download it as well.

  • Script TAB position issue

    Hi,
    I have an issue in creating Tab position under Paragraph section.  I have to display a column like which 10 character length and it is numeric value and also it needs to right justified. 
    if i make the tab right justified .. will system start printing it from right to left or left to right? this is my question.

    Hi,
    if it's right justified it will work as below,
    say you have a tab format
    P1 5CM Right justified,
    in this case it leaves 5CM from the left side of your window & then starts printing from RIGHT TO LEFT.
    say if it's left justified output is,
    >--5CM---->TEST
    right justified output will be,
    >----
    >TEST.
    >--5CM>
    hope this helps.
    Regards,
    Raghavendra

  • Vertical line issue in SAP Script main window

    Hi All,
    I want to draw a vertical line in my main window in SAP Script output.
    But problem is in main window i am printing some texts at the beggining then i am printing line items.
    So this is not fixed line (box). It may increase/decrease based on text available before line items.
    How can i manage this prining vertival line as i don't know height, top of this line!
    Thanks in advance.
    Thanks,
    Deep.

    Hai Deep,
    Use Elements as suggested by Kodarapu.
    Now goto Paragraph Formats create a format for Item lines.
    ex.
    Name Paragraph Format as 'IL' Now click on the Push Button "Tabs" on bottom Right.
    now in "Tab Position" enter the spacing that you need for your item dispaly
    ex.
    Number     Tab position       Alignment
    1               6.00   CH          LEFT
    2               25.00  CH         LEFT
    3               54.00  CH         LEFT
    The above example is for 3 items
    Now in your Script Windows-> Main
    do the following.
    /E           ITEM_LINE_A
    IL           &EKPO-EBELP&,,&EKPO-EMATN&,,,,&EKPO-TXZ01&
    Hope it SOlves your Issue.
    Cheers,
    Suvendu

  • How to leave half line space in SAP Script

    Actually , I have a doubt regarding half line spacing on SAP Script ..
    I am working on Cheque Printing with  fbz5
    Now the issue in  the date, there are 8 box for the date in cheque .
    i.e  0 2 0 7 2 0 1 4
    Currently the date is comming on the cheque box ..like half up the box and half inside
    IF I give one space in cheque  window of my script with  /   its taking complete 1 space
    and result is ,it going down ..with one space
    I want to leave exact half line space ..so date is  adjusted  in the middle .
    I also tried moving my cheque  window from  upper margin in all format(CH , CM , MM  IN ..) above
    But it is taking exact one space .

    Hi Darshit,
    While creating the tab position, you have a option of line spacing.
    make it to 0.5 lines, to make exact half line.
    And also another way out, you can check by moving the 8 box created for the date up by 0.5 lines.
    Regards,
    Ganesh Lathi.

  • How to print ADDRESS in SAP Script

    Hi All,
    I want to print address using ADDRESS command in SAP script. I am using folowing code:
    ADDRESS PARAGRAPH AS
           TITLE       &ADRS-ANRED&
           NAME        &ADRS-NAME1&, &ADRS-NAME2&,
           STREET      &ADRS-STRAS&
           POBOX       &ADRS-PFACH& CODE &ADRS- PSTL2& CITY &ADRS-PFORT&
           POSTCODE    &ADRS-PSTLZ&
           REGION      &ADRS-REGIO&
           CITY        &ADRS-ORT01&, &ADRS-ORT02&
           COUNTRY     &ADRS-LAND1&
           FROMCOUNTRY &ADRS-INLND&
    ENDADDRESS
    Here in output I am getting Title, name1, & name2 in different lines. But I want that Title, name1 and name2 in same line.
    I tried putting title, name1 and name2 in same line but then neither title nor name1, name2 are getting displayed.
    Please tell me how I can do the same.
    I have heard that SAP displays the address according to country standard. Please let me know in which table the country specific setting is stored.
    Regards,
    Vijay

    Hi,
    country code stored in this T005T. Adjust the tab positions on script then only u will get all the title, name1, name2 will get in one line.
    regards,
    ravi shankar reddy

  • Fixing Program symbols in SAP Scripts

    Dear All
    I am new to SAP Scripts, Can any one tell me how to set or fix the position of program symbols in an SAP Script at particular coloumn. For example, i have to print 6 program symbols, prog symb "Documnet Num" has to be printer on 20 coloumn of the paper, how can we do this?
    Thank you

    Hi,
    Create new paragraph and in secion 'tabs', define columns and their positions. In your window you can use that new paragraph in the following way:
    XX &var1&,,&var2&,,&var3&,,
    XX stands for paragraph name
    ,, stands for a tab defined in paragraph XX

  • Vertical Printing in SAP Script,

    Dear Friends,
    I have one requirement in SAP Script.
    I need to print Fixed Text in SAPScript but Vertical .
    Could anybody help me on this issue.
    Regrads
    Vijay

    hI
    PCL5 commands are specific to HP printers. So you need to find out the exact printer control language for your Datamax printer becoz even if you follow exactly the same as the steps below, you may not be able to get your desired output, becoz your printer may not understand PCL5 commmands.
    Note: The steps illustrated below are what I did for the HP printer that I used. Caution: If you try to use it on other printers, be prepared for cases like infinite loop- the printer may keep on churning out pages of unreadable characters. Also,you won't be able to see the effect in Print Preview because print commands will only be effected during the actual printing.
    I have used the PCL5 commands from this document: http://h20000.www2.hp.com/bc/docs/support/SupportManual/bpl13210/bpl13210.pdf (refer to P79)
    1/ Go to T-code: SPAD > Full administration > Device Type tab > Display Print controls
    2/ Change to Edit mode > Click on Create icon > create a Print Control say ZR090, add the Comment > Check 'Use in SAPscript Drivers', 'Use by SAP' > Save it
    3/ Go to T-code: SPAD > Full administration > Device Type tab > Choose your Device Type: say HPLJ4 (it is recommended that you copy the Standard Device Type to a new Device Type ZHPLJ4 so that future upgrades will not affect your Device Type.) > Display. (Do select the Device Type of your printer, since I am using HP 4000 series, I chose HPLJ4)
    4/ Change to Edit Mode > Print Control tab > Click the Standard Print Controls button on the Application toolbar > Put cursor on the newly created Print Control name in Step 1 and hit the Choose icon on the Application toolbar. The name should appear right at the bottom of the Print Control list. For that Print Control name, select radiobutton for 'Direct', and 'Converted' and the control character sequence is: \e&a90P (if you need a 90 degrees rotation), \e&a0P (for 0 degree), \e&a180P (for 180 degrees), and \e&a270P (for 270 degrees) > Save it. (These are the PCL5 commands specific to HP prnters)
    5/ Note: You need to create another Print Control for a 0 degrees rotation to switch back to the normal printing orientation after printing your rotated text. So repeat Step 2 and Step 4 for a 0 degrees rotation
    6/ In your smartform, Create a Command before the Text you want to rotate (Right Click on the Node > Create > Flow Logic > Command > Under Generate Attributes tab > Output Options > Include Printer Control > click the Search Help and find the Print Control ZR090 which will rotate everything after this Command to 90 degrees.
    7/ After rotating the part of text, if you want to rotate it back to the normal printing direction, insert another Command as in Step 6, but choose the Print Control for the 0 degrees.
    8/ Print your smartform to see if that is your desired output.
    Note: from my trial-and-errors, exploration and testing, I feel in my opinion, it might not really be worth the while to work on this. Because it needs alot of trials-and-errors and print commands are very specific to the printers (so if client changes the printer, your smartform may be rendered useless unless it uses the same Printer Control Language). Further, I have another problem with this. Even if you manage to rotate the text successfully, the position of the text may not be want you want (becoz of what the command tries to do) . Then you have to take into account the position in the designing of the form.
    So here is what I suggest, if you really want to use Printer Controls, search the internet for equivalent Printer Control Language for your Datamax printer (Note that even if you find, the way to use may be different from the above Steps. For eg. for Zebra Printers, the way to rotate text is different as shown in OSS Note 750772).
    Alternatives:
    1/ Or you could create a bitmap picture with the rotated text, like wat many have suggested
    2/ Find a font type that is able to change the words into a vertical orientation (there are upside-down fonts for a 180 degrees rotation, so you might want to do a search for a font that meets your requirement) and then upload to SAP.
    3/ The last one which might be more viable is to use Adobe Interactive Forms. A colleague told me that one is able to change orientation of text in it (I have not tried it before) but you can do some exploration b4 commiting to using it. You don't have to output to PDF to use it. Normal printing is also possible. The T-Code for this is: SFP (type 'S*' for SAP examples, do an exploration on Layout tab, maybe it can provide a new alternative).

  • HI, Alignment Problem in SAP Script

    Hi Friends
    I am working on SAP Script, I have the problem alignment, in the first row I need to show 8 values,
    among them all the times length is not same, so my script is not displaying in proper alignment,
    I have tried with all the ways which I known, specifying the length, and using (*), but still it is not
    coming properly, is there any method to specify the position exactly like as in reposrting.
    Please help me in this, this is very urgent.
    Thanks and Regards
    Praveeb

    Hi Nagesh
    Thanks for your reply,
    I am displaying in the first row,  here I am mentioning the filed and lenght of the field
    1) Date(10)
    2) Reference No(16), .
    3) Fiscal Year(4),
    4) Internal Reference(3),
    5) Item Text (50)
    6) Due Date (10)
    7) Original Currency(3)
    8) Amount (18).
    In the field item text length is vary from each entry, it wont be static all the times, if one customer having having 10 records, all ten line items are not coming in the proper order, after displaying the item text, remaining fields are running out from the alignment. I am using tab space as 2 characters, I kept even so many conditions on the item text lenght, but still there are problems. I tried with specifying the length in
    the script for the symbols also no use and I passed (*), this is also not working properly. Here I am sending the code of my script. Please have a look and give me a suggestion please.
    bold Heading bold
    Date,,,,  ACR Ref No,,,,  UW-  Inst- Cedant,,,,,,,,,,
         ,,,,,,,,,,,,Due Date,,,, Original-,,,,Amount
         &wa_final-date(10)&,,&wa_final-xblnr(16)&,,&w_year(4)&,,
         &wa_final-xref1(3)&,,&wa_final-sgtxt(50)&
         ,,,,,,,,&wa_final-zfbdt(10)&,,,,&wa_final-waers(6)&,,,,&w_amt3(18)&
           &wa_final-date(*)&,,&wa_final-xblnr(*)&,,&w_year(4)&,,
         &wa_final-xref1(3)&,,&wa_final-sgtxt(*)&
         ,,,,,,,,&wa_final-zfbdt(*)&,,,,&wa_final-waers(*)&,,,,&w_amt3(*)&

  • SAP Script - Formatting Line

    Hi Experts,
    In a classical ABAP report we make use of
    write:/20 'Text'.
    to print text from the 20th column. Can we do something similar in a SAP Script Page Window. I have a box and lines drawn. Now I want the text to start exactly after the vertical line(column). Is there a way to do in SAP Script.
    Regards
    Abdullah.

    You can use Paragraph format in SE71 Transaction,
    here you can able to see Tab position ,give first tab would be 20 char alignment would be Left or right.
    If you need design the box ,then i am giving simple example below :
    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                 
    Thanks
    Seshu

  • Sap scripts print modes

    What are the print modes available in the sap scripts?

    Hi
    Parent Topic: SAPScript
    HOWTO:Sap script
    Edit this entry - Discuss - Rename - Watch - History - 
    Major contributors: gopang, cmurphy262 | All Contributors
    Your votes have been tallied! See which wiki entry took top honors and find out who is this year's Wiki Ironman.  View the winners. 
    White Papers
    Do You Need a Fax Server? A Special Guide on Fax Servers and SAP Electronic Document Delivery
    Achieving Real-Time Supply Chain Integration
    E-Invoicing for Business Process Efficiency with SAP(R) Systems
    Jobs
    SAP Consultants (Any City) - SD, MM, PP, FI/CO, CS, ABAP (Dice) 
    SAP ABAP LEAD (Dice) 
    SAP ABAP Workflow Developer -Contract (Dice) 
    Community Content
    3 days until GO-LIVE!!! (Blogs)
    RE: RE: RE: RE: RE: Lost connection when using tcode FS00 (Groups)
    SAP SCRIPT
    Table of contents Show TOCHide TOC 
    1. 1 Concepts
    1.1. 1.1 Modifying SAP Forms
    1.2. 1.2 Forms: Concepts
    1.3. 1.3 Client and Language Versioning: Concepts
    2. 2 Componentes
    2.1. 2.1 Header Data
    2.2. 2.2 Paragraph Formats and Attributes
    2.2.1. 2.2.1 Standard Paragraph Attributes
    2.2.2. 2.2.2 Font Attributes for Paragraphs
    2.2.3. 2.2.3 Tabs in Paragraph Formats
    2.2.4. 2.2.4 Paragraph and Heading Numbering
    2.3. 2.3 Character Formats and Attributes
    2.3.1. 2.3.1 Standard Attributes for Character Formats
    2.3.2. 2.3.2 Font Attributes for Character Formats
    2.4. 2.4 Windows
    2.4.1. 2.4.1 Default Paragraph
    2.5. 2.5 Pages
    2.5.1. 2.5.1 Defining Follow-On Pages in Duplex Print Modes
    2.5.2. 2.5.2 Testing Tray Selection and Print Mode Selection
    2.6. 2.6 Page Windows
    2.7. 2.7 Text Elements
    2.7.1. 2.7.1 Default Text Element
    2.8. 2.8 Main Window
    3. 3 Técnicas
    3.1. 3.1 Displaying Versions of Forms
    3.2. 3.2 Including Graphics
    3.2.1. 3.2.1 Using Boxes, Lines, and Shading
    3.2.2. 3.2.2 Supported Printers
    3.2.3. 3.2.3 Boxes, Lines, Shading: BOX, POSITION, SIZE
    3.2.3.1. 3.2.3.1 BOX Command
    3.2.3.2. 3.2.3.2 POSITION Command
    3.2.3.3. 3.2.3.3 SIZE Command
    3.2.4. 3.2.4 Pre-Setting BOX Position Arguments
    3.2.5. 3.2.5 Using the Commands in Texts and Forms
    3.2.6. 3.2.6 Tips and Guidelines
    4. 4 Design Tools
    4.1. 4.1 Form Components
    4.2. 4.2 Processing in Overview
    4.2.1. 4.2.1 Defining Header Data
    4.2.1.1. 4.2.1.1 Completing the Header Data After Defining the Attributes
    4.2.1.2. 4.2.1.2 Passing Data to an External Program
    4.2.2. 4.2.2 Defining Paragraph Formats
    4.2.3. 4.2.3 Defining Character Formats
    4.2.4. 4.2.4 Defining Pages
    4.2.5. 4.2.5 Defining Windows
    4.2.6. 4.2.6 Using Text Elements in Page Windows
    4.2.7. 4.2.7 Defining Page Windows
    4.2.7.1. 4.2.7.1 Filling Page Windows with Text
    4.2.8. 4.2.8 Using Text Elements in Page Windows
    4.2.9. 4.2.9 Defining Main Windows in Page Windows
    4.3. 4.3 Test-Printing a Form
    5. 5 Releasing Forms
    6. 6 SAPscript Control Commands
    6.1. 6.1 Syntax of Control Commands
    6.2. 6.2 Explicit Page Break: NEW-PAGE
    6.3. 6.3 Preventing Page Breaks: PROTECT
    6.4. 6.4 Next Main Window: NEW-WINDOW
    6.5. 6.5 Assigning a Value to a Text Symbol: DEFINE
    6.6. 6.6 Formatting Date Fields: SET DATE MASK
    6.7. 6.7 Formatting Time Fields: SET TIME MASK
    6.8. 6.8 Country-Dependent Formatting: SET COUNTRY
    6.9. 6.9 Position of the Leading Sign: SET SIGN
    6.10. 6.10 Initializing Numbered Paragraphs: RESET
    6.11. 6.11 Including Other Texts: INCLUDE
    6.12. 6.12 Changing the Style: STYLE
    6.13. 6.13 Formatting Addresses: ADDRESS
    6.13.1. 6.13.1 Parameters
    6.14. 6.14 Setting a Footer Text in the Main Window: BOTTOM
    6.15. 6.15 Conditional Text: IF
    6.16. 6.16 Finding a Match: CASE
    6.17. 6.17 Calling ABAP Subroutines: PERFORM
    6.18. 6.18 Inserting Print Controls: PRINT-CONTROL
    6.19. 6.19 Boxes, Lines, Shading: BOX, POSITION, SIZE
    6.20. 6.20 Hexadecimal Data: HEX, ENDHEX
    6.21. 6.21 Summing a Program Symbol: SUMMING
    6.21.1. 6.21.1 Summing and Carrying Forward is Incorrect
    7. 7 SAPscript Symbols
    7.1. 7.1 Syntax of Symbols
    7.2. 7.2 System Symbols
    7.2.1. 7.2.1 Current Date
    7.2.2. 7.2.2 Current Day Number
    7.2.3. 7.2.3 Current Month Number
    7.2.4. 7.2.4 Current Year Number
    7.2.5. 7.2.5 Current Day Name (Long Form)
    7.2.6. 7.2.6 Current Month Name (Long Form)
    7.2.7. 7.2.7 Current Time
    7.2.8. 7.2.8 Hours Component of Current Time
    7.2.9. 7.2.9 Minutes Component of Current Time
    7.2.10. 7.2.10 Seconds Component of Current Time
    7.2.11. 7.2.11 Current Page Number
    7.2.12. 7.2.12 Page Number of the Next Page
    7.2.13. 7.2.13 Selected Device Type
    7.2.14. 7.2.14 Spaces
    7.2.15. 7.2.15 Underline
    7.2.16. 7.2.16 Vertical Line
    7.3. 7.3 Program Symbols
    7.3.1. 7.3.1 SYST: System Fields in the ABAP Programming Environment
    7.3.2. 7.3.2 USR03: User Address Data
    7.3.3. 7.3.3 SAPSCRIPT: General SAPscript Fields
    7.4. 7.4 Standard Symbols
    7.5. 7.5 Text Symbols
    7.6. 7.6 Formatting Options
    7.6.1. 7.6.1 Offset
    7.6.2. 7.6.2 Output Length
    7.6.3. 7.6.3 Omitting the Leading Sign
    7.6.4. 7.6.4 Leading Sign to the Left
    7.6.5. 7.6.5 Leading Sign to the Right
    7.6.6. 7.6.6 Omitting Leading Zeros
    7.6.7. 7.6.7 Space Compression
    7.6.8. 7.6.8 Number of Decimal Places
    7.6.9. 7.6.9 Omitting the Separator for ‘Thousands’
    7.6.10. 7.6.10 Specifying an Exponent for Floating Point Numbers
    7.6.11. 7.6.11 Right-Justified Output
    7.6.12. 7.6.12 Fill Characters
    7.6.13. 7.6.13 Suppressing Output of Initial Values
    7.6.14. 7.6.14 Ignoring Conversion Routines
    7.6.15. 7.6.15 Changing the Value of a Counter
    7.6.16. 7.6.16 Preceding and Subsequent Texts (Pre-Text / Post-Text)
    7.7. 7.7 Country-Dependent Formatting
    7.7.1. 7.7.1 Date Mask
    7.7.2. 7.7.2 Time Mask
    7.8. 7.8 Formatting Conventions
    7.8.1. 7.8.1 Primary Formatting of System Symbols
    7.8.2. 7.8.2 Primary Formatting of Standard Symbols
    7.8.3. 7.8.3 Primary Formatting of Program Symbols
    7.8.4. 7.8.4 Primary Formatting of Text Symbols
    7.8.5. 7.8.5 End Formatting
    1 Concepts Edit section
    1.1 Modifying SAP Forms Edit section
    If you want to modify SAP forms, set up your development environment as follows:
    1. Make sure that no SAP-standard forms are stored as client-specific copies in your development client. Such forms should be held only in client 000, the SAP development and installation client. If you access an SAP-standard form from another client, then the central copy in client 000 is used.
    If you need to remove SAP-standard objects from your development client, see Notes 10388 and 3355 in the SAP Online Service System (OSS). These notes explain the procedure for saving modified forms and then deleting all forms.
    2. To modify SAP standard forms,
    Copy the forms you need from client 000 to your development client.
    Rename the forms using a name from the customer name reserve (names starting with Y or Z).
    Copy the forms to one of your own Y or Z development classes.
    Renaming the SAP standard object makes it possible to manage and transport your changes with the SAP workbench organizer. The organizer is not activated for SAP-standard objects that are modified in clients other than 000.
    3. To put your modifications into effect, you must also modify the ABAP print program used to print documents that use this form. You should rename such print programs and store them in your own Y or Z development classes.
    You can use the SAP Customizing System to replace the SAP print program with your modified print program in the affected applications
    1.2 Forms: Concepts Edit section
    Forms are used to control the page layout and also the text formatting in your documents. Before formatting a document for output to the screen or to a printer, you must assign a form to it. If you do not specify a form for a document, then the SYSTEM form is assigned to the document by default.
    Application-specific forms are used in SAP applications to specify the page layout for such special documents as invoice or checks. These forms specify the structure of the information on the page(s) of such a document. They define, for example, the address header, item lines, the footer, and so on. There are two ways to format texts with forms:
    In the standard SAPscript text processing (Tools  Word processing  Standard text), you can select a form for a document. You can then type text into the main window of the form and output the document in the format defined in the form.
    For example, you can select a form for a letter. You can then type the body text of the letter in the main window. When you print the letter, the default text elements in the other windows of the form (heading, footer, and so on) are printed with the body text.
    A document can be generated by a print program in one of the SAP applications. The print program uses a form to generate the document. Most correspondence and document generation in the SAP System are handled by way of print programs.
    A print program selects the text elements that are to be printed in the windows of a form. It may also collect information from the user or ask the user to input text directly, as in some correspondence functions. The print program may also provide data for variables defined in the form.
    Finally, the print program uses the form to format the document for display or printing.
    1.3 Client and Language Versioning: Concepts Edit section
    Forms and styles are client-specific. That is, a form or style other than the SAP standard in client 000 is available only in the client in which it was created.
    Forms and styles are also language-specific. That is, the definitions and texts in a form or style are defined for a particular language. Forms and styles can be translated using the standard SAP translation tools.
    Client 000 Defaulting: SAPscript accords forms and styles in client 000 a special status.
    If a form or style that is used in a document is not available in the client in which the document is being printed, then SAPscript checks for the form or style in client 000. If it is found there, then the client 000 version is used to print the document.
    SAP standard forms and styles are always held in client 000. You can take advantage of the client 000 defaulting as well by storing your Yxxx and Zxxx forms and styles there. That way, if a local version of a form or style is not present in a client, the client 000 version is used instead.
    Language rules: SAPscript uses the following rules to manage versions of forms and styles in different languages:
    The language in which a form or style is created is its "original language." You can translate a form or style into other languages using SAP’s translation tools.
    If a form or style is needed only in its original language and need not be translated, then you can indicate this in the language attributes in the header data. The form or style then does not appear in work lists in the translation tools.
    In versions other than the original language version, changes to a form or style are limited only to translation of texts. No changes to definitions and attributes are permitted.
    2 Componentes Edit section
    2.1 Header Data Edit section
    You can find header data in both form and style maintenance. In style maintenance, it is used primarily to present important information – information designed to make it easier for the end user to select a style. The header data in form maintenance, on the other hand, is used for information and control purposes. For this reason, the header data of a form will be described in more detail.
    Below, the header data is described as it appears in the alphanumeric Form Painter.
    Like the header data of a style, the header data of a form comprises two parts: the data set by the system and the data you are expected to enter. The latter is dealt with separately.
    Device-independent entries.
    Description
    A short explanatory description of the form (also applies to the style), designed to make selection easier for the end user.
    Form class
    You can assign a form to a class to help you organize and search for forms. The default set of classes is the set of program classes in your system.
    Start page
    Tells the print program which page format in a form to use first for printing.
    Default paragraph
    Paragraph set to * in standard text maintenance.
    Tab stop
    A grid set at specified intervals in all windows defined in the form. However, you should note that the tab stops are only valid in paragraphs where you have not defined your own tabs.
    Language, Original language, Translation applic
    Use these fields to record the master language and language of the current version of a form. Marking Translation applic makes the form accessible for translation from the SAP System’s translation tools (transaction SE63).
    Device-dependent entries.
    You can only enter values here that are supported in the R/3 printer definition. If you make other entries, this leads to errors in the check routine.
    Page format
    Determined from the spool administration table with transaction SPAD. Make sure there is a printer assignment – there must be an additional spool format for the printer with the same page format.
    Orientation
    Depends on the page format selected. This can also be determined from the spool administration table. Please note that the formats landscape and portrait are not supported by all printers.
    Lines per inch (LPI)
    Basis for converting the unit of measurement LN in style and form maintenance. The value 6.00 is set by the system, as this value is supported by all printers.
    Characters per inch (CPI)
    Basis for converting the unit of measurement CH in style and form maintenance. The value 10.00 is set by the system, as this value is supported by all printers.
    Font attributes
    With these fields, you can set the default font for a form. The default font applies if other objects do not specify a font. SAPscript suggests a default font, which you can change.
    2.2 Paragraph Formats and Attributes Edit section
    In SAPscript, paragraphs are formatted using formats and their corresponding attributes. Text processing is simplified by the use of different paragraph attribute groups:
    Standard
    Font
    Tabs
    Outline
    There are naming conventions for paragraph tags:
    The paragraph tag can have one or two characters.
    The first character in the paragraph tag must be a letter, the second a letter, number, or blank; special characters are not valid.
    The paragraph format must be identified in the Description field.
    2.2.1 Standard Paragraph Attributes Edit section
    In the Standard attribute group, you find the general attributes that can be defined in paragraph formats:
    Description
    Precise explanation of your paragraph tag, so that the user can immediately identify it.
    Left or right margin
    Amount of space between the paragraph and the left or right border of the form window.
    Indent first line
    Indent of the first line of a paragraph. If the value is positive, it is indented to the right, if it is negative, it is indented to the left.
    If you specify a negative value, then you must place the minus sign after the number: 1- .
    Space before and space after
    Space before and space after control the amount of space between paragraphs. The actual space between paragraphs results from the space after the preceding paragraph and the space before the following paragraph.
    Alignment
    Alignment of a paragraph.
    Left-aligned
    LEFT
    Right-aligned RIGHT
    Centered CENTER
    Justified BLOCK
    Line spacing
    Spacing between the lines. The default value is 1 line; the LPI value (lines per inch) in the header data is used to calculate the line spacing.
    No blank lines
    Suppression of blank lines. You can control whether the blank lines of a paragraph should be suppressed in the printout or not:
    No entry
    blank lines not suppressed
    X blank lines suppressed
    Page protection
    Cohesion of a paragraph. It is possible to determine whether or not a paragraph can be divided by a page break.
    No entry
    no page protection (default)
    X all lines of the paragraph are on one page
    Next paragraph same page
    Cohesion of two adjacent paragraphs. Here you can define whether the subsequent paragraph should begin on the same page (that is, at least the first line of the subsequent paragraph must be on the same page).
    No entry
    subsequent paragraph is output on the same page or the next page, depending on the amount of space (default)
    X subsequent paragraph begins on the same page
    2.2.2 Font Attributes for Paragraphs Edit section
    You can specify font attributes for paragraph formats. They control the font used in the text. You can specify these attributes both for the default font in the header and for particular paragraph formats:
    Font family
    Enter a font supported in the SAPscript font maintenance.
    Font size
    Enter the size of a character font. It is measured in 1/10 point.
    Bold/Italic
    Specify whether to use bold-face printing or italics.
    Underlined
    Mark this attribute to underline entire blocks of text.
    When defining a paragraph format, use More to specify these underline attributes:
    Spacing between the base line and the underline
    Thickness
    Intensity
    Intensity is expressed in percent: 0 % is a black underline; 100 % is no underline.
    If you defined default underlining in the header, then the fields for underline attributes are already displayed on the screen.
    The following selection criteria apply to the font attributes bold, italics, and underlined:
    Off attribute is not set
    Retain inherited
    On attribute is set
    The combination of font family, font size, bold type attribute and italics attribute is referred to as a system font or SAP font. To use the SAPscript font maintenance, choose Tools  Word processing  Font.
    2.2.3 Tabs in Paragraph Formats Edit section
    You can define as many tab positions as you require for each paragraph format. The text can be aligned in different ways:
    Left-aligned with LEFT
    Right-aligned with RIGHT
    Centered with CENTER
    At the sign with SIGN
    At the comma or decimal point with DECIMAL
    You can control the tab feed in a paragraph with tab positions. The tab stops you define in the paragraph format replace the tab spacing you defined in the header data of the form. However, this depends on the extent to which you have defined tab stops in the paragraph format. If there are fewer tabs in the paragraph formats than in the header data, the tab stops of the header data are used for the rest of the line. The tab stops are represented as, , in the text editor.
    You can use different units of measurement to define a tab position:
    CH Characters
    CM Centimeters
    MM Millimeters
    PT Points
    TW Twips (1/20 point)
    The unit of measurement CH is converted to an absolute unit of measurement using the CPI value (characters per inch) from the header data of the form.
    2.2.4 Paragraph and Heading Numbering Edit section
    The paragraph numbering and marking attributes are used to structure texts into chapters, subchapters, and sections. Numbering is carried out automatically by SAPscript.
    You can create an outline with the entry options available:
    Outline
    Enter the name of the highest-level paragraph in an outline hierarchy here. The outline hierarchy is created by assigning this paragraph to all outline paragraphs.
    Outline level
    Enter the level in the outline hierarchy. The outline levels of the paragraphs are numbered upwards from 1; the highest outline level therefore has the outline number 1.
    Number margin
    Specify the space between numbering and window border. Note that your numbering may extend into the text area of the paragraph if the difference between the left margin and the number margin is not great enough to hold the numbering characters.
    Left/right delimiter
    Specify the character that precedes or follows the numbering.
    Number chaining
    Specify whether you want the paragraph numbering of the paragraph to be preceded by the numbering of all higher paragraphs in the hierarchy.
    Example for number chaining
    with   without
    3.     3.
    3.1     1.
    3.2     2.
    3.2.1     1.
    Character string
    Specify the numbering format. The numbering can be assigned a different font or character format to the rest of the paragraph.
    Numbering type
    ARABIC
    Arabic numerals: 1, 2, 3.
    CHAR Fixed character: letter or numeral, entered in the field
    LETTER Letters: A-Z
    ROMAN Roman numerals: I, II, III, IV
    Depending upon the numbering type that you select, the following attributes may also apply:
    Fixed character
    Define the fixed character to be used for numbering. You should only make an entry in the field Fixed character if you have specified CHAR as the numbering type. Fixed characters include + - and o .
    Output length
    Enter the number of characters for Arabic numerals.
    Upper case
    Specify for letters or Roman numerals.
    2.3 Character Formats and Attributes Edit section
    Character formats, as opposed to paragraph attributes, allow you to format entire blocks of text within a paragraph.
    Character attribute groups can be:
    Standard
    Font
    When you define character formats, observe the following naming conventions:
    The character format can have one or two characters.
    The first character must be a letter, the second a letter, number, or blank; special characters are not valid.
    Enter a simple explanation in the field Description. It is intended to help the user make a selection.
    2.3.1 Standard Attributes for Character Formats Edit section
    Marker
    Links a search key to the selected character string when the end user uses this character format. Examples include glossary, hypertext, and data element links. Here, selected character strings are assigned the appropriate key.
    Bar code
    Bar code that is required for certain variables and is known to the printer, for example EAN8. The character string is printed as a bar code if the character string concerned is selected.
    Bar code names, such as EAN8, refer to system bar codes. These are defined in the SAPscript font maintenance (Tools  Word processing  Font).
    Protected
    The character string is not split by a line break, but printed together on the next line.
    Hidden
    The character string is not printed. The text is only visible in the text editor.
    Superscript/subscript
    The character string is printed half a line higher or lower.
    The following options are available for defining these attribute types:
    Off
    Attribute is not set
    Retain Attribute is inherited
    On Attribute is set
    2.3.2 Font Attributes for Character Formats Edit section
    Font attributes can be specified for character formats as well as for paragraph formats. You have the same options as for defining font attributes for paragraph formats.
    2.4 Windows Edit section
    Windows are defined in form maintenance. They represent areas that are positioned on pages – as page windows – and in which at a later time text is printed. You must define at least one window for each form. Otherwise, SAPscript cannot format the text.
    You can assign window names and window types. However, note that you can define only one main window per form.
    Use one of these window types:
    MAIN
    Main window in which continuous text is printed. This is the window used by dialog users of a print program and form. For example, the body text of a letter would be entered in MAIN.
    The text in the main window can extend over several pages. If the text fills one page, output continues in the window of the next and subsequent pages, as long as MAIN has been defined for these pages.
    VAR
    Window with variable contents. The text can vary on each page in which the window is positioned. Variable windows are formatted for each page.
    To every window you can assign text, which is printed in the corresponding window when the form is formatted. To assign text, use text elements, which are stored with the form.
    To create and maintain text elements with the SAPscript Editor, choose Text elements. Should the text selected for the window exceed the window size, then the text is cut off.
    CONST
    Window with constant contents that is formatted only once.
    Currently, CONST windows are processed in the same way as VAR windows. You should only use windows of type VAR.
    2.4.1 Default Paragraph Edit section
    For a particular window, you can override the default paragraph format that is set in the form header. Enter the default format that should apply in the window in the Default paragraph field in the window definition screen.
    2.5 Pages Edit section
    You must define at least one page for every form. And you must designate a "first" page in the form header. Otherwise text formatting is not possible. In addition, you should inform the system which page is to be used after reaching the end of the first page. If you do not specify a next page, the output of your text ends at the end of the current page.
    To define a page, give it a name and specify attributes for it:
    Name of the next page
    Page counter mode
    INC Increases the counter by 1
    HOLD Counter remains unchanged
    START Sets the counter to 1
    You can display the contents of the page counter with the system symbol&PAGE&.
    Numbering type of the page counter
    ARABIC Arabic numerals
    LETTER Letters
    ROMAN Roman numerals
    Although CHAR is displayed as an entry option for the numbering type of the page counter, internally CHAR is converted to ARABIC.
    Output length for page numbering with numerals
    Upper or lower case for numbering with Roman numerals or letters
    Resource name
    With Resource name, you specify that the paper for this page should be taken from a particular paper tray at the printer.
    In Resource name, enter the print control that has been defined for switching to the paper tray you want to use. In printer types pre-defined by SAP, these print controls are generally as follows:
    TRY01 Select first paper tray
    TRY02 Select second paper tray (if available at the printer)
    TRY03 Select third paper tray (if available at the printer)
    TRYEN Print envelopes (if available at the printer)
    TRYMN Switch the printer to manual paper feed (if available at the printer). The printer pauses until you feed a sheet of paper into it.
    TRYME Switch the printer to manual envelope feed (if available at the printer). The printer pauses until you feed an envelope into it.
    You can use all tray selection print controls except TRY03 with suitably equipped printers that are defined with the following SAP device types: HPLJSTND, HPLJ_II, HPLJIIID, HPLJ4, LX4039, and SNI20XX8.
    You can use TRY01, TRY02, TRY03, and TRYMN on suitably equipped printers that are defined with these device types: KYOF1000, KYOF1200, KYOFS1500.
    See the spool system (transaction SPAD) to check on how your printers are defined.
    Print mode
    With Print mode, you can specify single- or double-sided printing for a page. You can choose from the following values:
    ' ' Currently active printing mode continues unchanged.
    S The page is printed in simplex mode. That is, the printer should print on only one side of the paper. If another mode was previously active, then the printer is switched to simplex mode with the start of the page.
    D The page is printed on the first side of a sheet in duplex mode. If another mode was previously active, then the printer is switched to duplex mode with the start of the pageand continues in this mode.
    T The page is printed on the first side of a sheet in tumble duplex mode. That is, the printer prints on both sides. The page on the second side is always inverted, so that the footer of the second page is printed opposite the header of the first page.
    If another mode was previously active, then the printer is switched to tumble duplex mode with the start of the page and continues printing in this mode.
    Print modes are currently supported for printers that use the PCL-5 language. These are printers that are defined with the following SAP device types: HPLJ_II, HPLJIIID, HPLJ4, LX4039, SNI20XX8.
    See the spool system (transaction SPAD) to check on how your printers are defined.
    The print controls for these functions are SPMSI (begin simplex printing); SPMDU (begin duplex printing); SPMTU (begin tumble duplex printing); SPMFS (print on first side of sheet in duplex or tumble duplex mode); and SPMBS (print on second side of sheet in duplex or tumble duplex mode).
    2.5.1 Defining Follow-On Pages in Duplex Print Modes Edit section
    You switch to duplex or tumble duplex mode with a form page for which one of these modes is specified. To continue printing in the current mode, for follow-on pages you must define another page in which the Print mode field is empty. Otherwise, the following pages after the mode switch will continue to be printed only on the front sides of new sheets of paper.
    The reason: When SAPscript sends a page with Print mode D or T to the printer, it not only sets the print mode accordingly. To ensure that the first page in the new mode is correctly output, SAPscript also instructs the printer to output the page on the front side of a sheet. If SAPscript sends a sequence of D or T pages to the printer, the output is printed only on the front side of each sheet.
    You define a first page named FIRST for a form to be printed in duplex mode. You therefore set the Print mode in FIRST to D.
    To make the duplex printing work correctly, you must define a second page FOLLOWER in which Print mode is left empty. In the form definition, you specify FOLLOWER as the follow-on page for FIRST and for itself as well.
    Your text is then printed in duplex mode. FIRST switches the printer to duplex mode and forces printing of the first page on the front side of a new sheet. FOLLOWER accepts the duplex mode and sends no further mode print controls to the printer. The printer therefore alternately prints FOLLOWER pages on the fronts and backs of sheets.
    2.5.2 Testing Tray Selection and Print Mode Selection Edit section
    SAP provides predefined SAPscript documents with which you can test whether tray selection and print mode selection are working properly on your printers.
    For tray selection, print the SAPscript document SAPSCRIPT-TRAYTEST, ID ST, Language D or E.
    For print mode selection, print the SAPscript document SAPSCRIPT-PRINTMODETEST, ID ST, Language D or E.
    2.6 Page Windows Edit section
    When you define page windows, the window names are linked to page names. You must specify the position and size of the window on the assigned page.
    Define the position of a window by specifying the left margin and upper margin and the size of a window by specifying its width and height.
    Left margin
    Space between the window and left margin of the page
    Upper margin Space between the window and upper margin of the page
    Window width Width of the window depending on the page format selected
    Window height Height of the window depending on the page format selected
    Note that the width of the main window must be the same on all pages. All other window types can have different sizes and positions on different pages.
    To print multiple columns, define several main windows on a page. As text entry is continuous, once the first main window has been filled, output continues in the second main window.
    Rewards if helpfull
    Regards
    Pavan

Maybe you are looking for