TAB in SAPSCRIPT

Hi,
I need to display two lines per loop in a sapscript. I managed to add the second line by just adding a symbol after the first line but I want to indent it. I kept on pressing tab but it seems like it has no effect.
How do I put tabs in a line if theres only a single symbol there? For example, &V_TEST&, Is there a code I need to put before that to indent it several tabs?
Thanks in advance.
Kenny

Well,  for format consistancy,  I think that you should separate the two lines with separate text elements.
/E  Line_one
Z1  &V_TEST1&
/E  Line_two
Z1  ,,&V_TEST2&
Here, notice that Z1 has a tab setup and it is being used only for the LINE_TWO text element,  this will give you your indent for the second line.  You must add this tab to the paragraph format Z1.
Also, your print program,  you should call the WRITE_FORM twice,  once for each text element.
Regards,
Rich Heilman

Similar Messages

  • Default tab in sapscript

    Hi ABAP Gurus,
    How do you set the default tab in SAPSCRIPT? 
    I need to put a tab prior to the item text (or to this statement):
    /: INCLUDE &RT_NAME& OBJECT EKPO ID F01 LANGUAGE EN
    I went to SE71>header>basic settings
    then i added a certain value at "Tab Stop";  Unfortunately, when i tested the form. The "tab" was not implemented. 
    Thanks in advance.  Points will be given...
    Best Regards.
    Brando

    Hi,
    You can put the Default paragraph fprmat in the SAPSCRIPT, then inside the paragraph format, maintain the TAB so that this will become defalut TAN for that SAPSCRIPT
    Regards
    Sudheer

  • Using Tabs in Sapscript

    Hi developers,
    I am new at Sapscript and I'm having a lot of troubles trying to understand how to use tabs ',,'.
    I set the position for tabs but I really don't understand how it works... (My aim is to make the column of a table aligned).
    Wich is the relation between what I wrote into this position and what i display?
    Does this: '',,&field_name1&,,&field_name2&,," write field_name1 in the first position and field_name2 in the second one? Do I have to use different notation? (like repeating ,, twice ',,,,' or three times ',,,,,,' for second and third position and so on...)
    ...As you understand I'm really confused!!
    Thanks,
    Simone

    Hi,
    Regarding your query:-
    Does this: '',,&field_name1&,,&field_name2&,," write field_name1 in the first position and field_name2 in the second one.
    You are absolutely right.
    Now suppose you want to position the first field_name1 in the second tab position ( defined in the corresponding paragraph ) then you will use ,,,,&field_name1& If you want to position at say 5th tab posistion then it should be ,,,,,,,,,,(total 10,)&field_name1& etc etc
    As mentioned by the previous post, just remember ,, means 1 tab position. Thus if you count total no of ,, appearing before the field, that will give you the tab position where that particular field is being positioned.
    I hope this helps,
    Regards
    Raju chitale

  • Passing the data from a internal tabe to sapscript form

    Hi folks,
    I have an question, how to pass an each character value of a field into the sapscript form separately,
    I have an field value from an internal table in the print program say - itab-ssn = 123789345 and I need to pass each character separately into the sapscript form. How do you write the code in the sapscript text editor
    I tried this piece of code did not work...
    &itab-ssn(0)&,, &itab-ssn(1)&,, &itab-ssn(2)& and relaised it adds up characters as I go on...
    I just need  1   2   3   7  8 ...
    How to do that?
    Thanks,
    SK

    Try &itab-ssn0(1)&,, &itab-ssn1(1)&,, &itab-ssn+2(1)& and so on
    Formatting option +n(a) where n is the offset and a the length
    Regards,
    Nick

  • Tab spaces in SAPScript RDI output

    Hi,
    Is there a way to test the spacing while using TABs in SAPScripts which has an RDI output?
    I've been trying to display some text on my output and I've tried different spacing/tabs. Nothing seems to work. We produce a PDF at the end and since my development system is not connected to the server which produces physical PDF's, I have to release my changes to the Test system each time I want to try different combinations which is very annoying.
    Thanks,
    Tabraiz
    Edited by: tabraiz khan on Aug 31, 2011 1:13 PM

    Hi,
    I'm afraid, RDI output has no print preview type of option for you to print. I would rather suggest you to get the PDF printer installed on your development system to preview RDIs.
    Thanks.
    Ravi

  • SAPScript Tab Spacing Issue

    I notice how tab spaces in tab script don't follow the paragraph formatting i set once the line is long enough for two rows.
    Any ideas on how to work around with this?

    Hi,
    refer How to use tabs in SAP Script !
    Using Tabs in Sapscript
    Thanks,
    Chandra

  • PO- Output to the PO creators by email in pdf

    Hi ALL,
    we have a requirement is to have the PO- Output  to the PO creators by email in pdf. Format.  how can we acheive this requirement , what is the partner function can be used for person who creates PO , where can we maintian his eamil ID .
    please advise.
    Regards,
    Amara.

    hi
    You need to do some configuration for this.
    u2022     Go to NACE.
    u2022     Select EF and click on OUTPUT TYPES.
    u2022     Then select Output Type NEU and click on processing routines .
    u2022     In that you have to add a new entry - medium 5 .
    u2022     Then you need to assign a program, form routine and form.
    u2022     You can use the standard program i.e. SAPFM06P, FORM routine is always ENTRY_NEU and standard MEDRUCK.
    u2022     Then in PARTNER FUNCTION you need to add a new entry : medium - 5 and function - VN .
    u2022     For subject of the mail go to Mail Title and Texts. In title give PO No. &EKKO-EBELN& .
    u2022     Under General data -> Replacement of text symbols give programme as SAPMM06E and Form Routine as TEXT_SYMBOL_REPLACE.
    u2022     Now the subject will be PO No. 1800004202.
    u2022     You need to maintain your email id in tcode SU01 and also the vendor's email id.
    u2022     Now while creating a new purchase order , change the medium to External Send .
    u2022     Then goto Communication Method and select CS01. ALSO make sure that the Cover Page Text has value PO No. &EKKO-EBELN& .
    u2022     Goto tcode ME9F .
    u2022     Execute.
    u2022     Select the checkbox and click on Output Message.
    u2022     You will get a message MAII 00000000000001 generated .
    u2022     Use note no 191470
    now to get the po in pdf u hav eto go to SCOT and here in internet tab maintain SAPscript/Smart Forms PDF
    regards
    KI

  • Problem printing smartform

    Hello, everyone, thank you very much for the support I can provide. My problem is as follows:
    I have developed a SmartForms at which define the window is
    to 5 cm from the top but when I do physical printing the text included in the sale appears to the top margin 7.5 cm. The same happens with the left margin. In display mode appears correctly SmartForms.
    The printer is an Epson FX-890, page format is a format Z.
    The steps were performed following
    1. Create the page format z
    2. Create the form of editing and page formatting reference z.
    3. Add the edit form z EPESCP9 device type.
    4. Create and the reference printer device type EPESCP9.
    What is the reason why time SmartForms design and display appear correctly but when I print the physical does not respect the margins defined at design time?
    Thanks for the help.

    Hi,
    I met this problem several times - it usually is connected with output device drivers.
    You can do:
    - move SmartForms windows to get correct printout
    - in SPAD change output device parameters (Output Attributes tab, Additional SAPscript and Smart Form information frame)
    You probably have Print Preview correct
    - You can also try to print on a different printer (or i.e. any local PDF printer) - printout should be correct.
    Regards,
    Przemysław

  • Delivery note issue-VL03N

    Hi ,
    Is it possible to include the info in 'texts' tab in SAPSCRIPT.
    I mean when you goto VL03N,
    and click on heder icon ,you will see the texts tab there.
    Thanks
    Venkat

    HI
    Yes
    U need to call those text in your sapscript.
    The texts shown there are standard text, so u can use the statamente INCLUDE in the window where u need to print the text:
    /: INCLUDE &TEXT NAME& OBJECT &OBJECT& ID &ID&
    The TEXT NAME should be the number of delivery
    U should check the header data of the text in order to find out the object and id
    Max

  • Urgent! How to display more than 1 line of text in SAPSCRIPT using tab

    Hi, i would like to know how do i display all the text (which may consist of more than 1 line) that i have extracted using a READ_TEXT FM in my print program? Once the text has been extracted and displayed, i would like the proceeding lines of text (if there are more than 1 line) to begin at a certain margin (i have defined a paragraph format as 6.2cm in tab option).
    Have a look at the part of the print program that has the READ_TEXT FM statements which is going to extract the text from the PR Document header:
    LOOP AT ITAB.
      CLEAR: PR_TXT, PR_TXT[].
      L_NAME = ITAB-BANFN.
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
          CLIENT                  = SY-MANDT
          ID                      = 'B01'
          LANGUAGE                = SY-LANGU
          NAME                    = L_NAME
          OBJECT                  = 'EBANH'
          ARCHIVE_HANDLE          = 0
    *      LOCAL_CAT               =
        TABLES
          LINES                   = PR_TXT
        EXCEPTIONS
          ID                      = 1
          LANGUAGE                = 2
          NAME                    = 3
          NOT_FOUND               = 4
          OBJECT                  = 5
          REFERENCE_CHECK         = 6
          WRONG_ACCESS_TO_ARCHIVE = 7
          OTHERS                  = 8.
      LOOP AT PR_TXT.
        MOVE: ITAB-BANFN TO PTXT_TAB-BANFN,
              SY-TABIX TO PTXT_TAB-POSNR,
              PR_TXT-TDLINE TO PTXT_TAB-LINE.
        APPEND PTXT_TAB.
      ENDLOOP.
    As for my SAPSCRIPT, i did the following:
    *  Purchase Request Header   : &PTXT_TAB-LINE(C)&
    I would like all of the proceeding lines of text to appear at the same margin as when the first line of &PTXT_TAB-LINE& started (which i have found out is 6.2cm, so i created a tab called HT for this)
    Message was edited by: Bernard Loh

    REPORT ZZZZANC9 .
    tables mara.
    data: i_mara like mara occurs 0 with header line.
    select matnr from mara
    up to 100 rows
    into corresponding fields of table i_mara
    where matnr ne space.
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
      APPLICATION                       = 'TX'
      ARCHIVE_INDEX                     =
      ARCHIVE_PARAMS                    =
      DEVICE                            = 'PRINTER'
      DIALOG                            = 'X'
       FORM                              = 'ZZZZANC1'
      LANGUAGE                          = SY-LANGU
      OPTIONS                           =
      MAIL_SENDER                       =
      MAIL_RECIPIENT                    =
      MAIL_APPL_OBJECT                  =
      RAW_DATA_INTERFACE                = '*'
    IMPORTING
      LANGUAGE                          =
      NEW_ARCHIVE_PARAMS                =
      RESULT                            =
    EXCEPTIONS
       CANCELED                          = 1
       DEVICE                            = 2
       FORM                              = 3
       OPTIONS                           = 4
       UNCLOSED                          = 5
       MAIL_OPTIONS                      = 6
       ARCHIVE_ERROR                     = 7
       INVALID_FAX_NUMBER                = 8
       MORE_PARAMS_NEEDED_IN_BATCH       = 9
       SPOOL_ERROR                       = 10
       OTHERS                            = 11.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    loop at i_mara.
    mara-matnr = i_mara-matnr.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'MATERIAL'
      FUNCTION                       = 'SET'
      TYPE                           = 'BODY'
      WINDOW                         = 'MAIN'
    IMPORTING
      PENDING_LINES                  =
    EXCEPTIONS
       ELEMENT                        = 1
       FUNCTION                       = 2
       TYPE                           = 3
       UNOPENED                       = 4
       UNSTARTED                      = 5
       WINDOW                         = 6
       BAD_PAGEFORMAT_FOR_PRINT       = 7
       SPOOL_ERROR                    = 8
       OTHERS                         = 9
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    endloop.
    CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
      RESULT                         =
      RDI_RESULT                     =
    TABLES
      OTFDATA                        =
    EXCEPTIONS
      UNOPENED                       = 1
      BAD_PAGEFORMAT_FOR_PRINT       = 2
      SEND_ERROR                     = 3
      SPOOL_ERROR                    = 4
      OTHERS                         = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Look through above code. Sapscript should contain a text element (/E control) as below
    /E   MATERIAL         
       &mara-matnr&

  • Sapscript: Do not interpret two commas in text as tab

    Since Sapscript interprets two commas in a row as a tab, this causes a problem for any form which prints out any text containing two commas. Does anyone know a way to get Sapscript to ignore these commas?

    Hello friend,
    Welcome to SDN.
    The interpretation is different.
    Situation 1
    /: Do,,not,,interpret,,two,,commas,,in,,text,,as,,tab
    "the output will look like below text with tabs in between each word.
    Do  not interpret two commas  in  text  as  tab
    Situation 2.
    "Define two variables in script editor like below and display.
    /: DEFINE text1 = 'Do not interpret two,,commas in text as tab'
    /: DEFINE text2 = ',,Text will be displayed like this'
    /: &text1&,,&text2&
    "The output will be like below
    Do not interpret two,,commas in text as tab ,,Text will be displayed like this
    "It does not care what is there inside program symbols &text1& and &text2&
    I think that you will understand.
    Thanks
    Venkat.O

  • Indent /tab position for text from INCLUDE texts in SAPscript

    Hi, ABAP colleagues!
    Need your help on this sapscript problem:  How to align texts taken from "INCLUDE TEXT" in SAPscript, according to tab defined in Paragraph Format?
    Or, how to control tab positions for texts which were extracted from “INCLUDE text” commands in SAPscript?
    I defined a paragraph format with tab stop at 8 CH so that with 2 commas (,,) my text will be displayed there.  However it always appears to the left (e.g. 1st column) and not indented at the proper column for description/text (e.g. which is in second column). 
    Pls help, bec a different heading and information is not acceptable to client for the Thailand characters. 
    Above is the description of the problem.  Below are some technical details.
    For specific example, I am editing Zversion of standard sap MM form MEDRUCK Window Main -  Text Element Item Text.
    BG ,,&TTXIT-TDTEXT&
    /: INCLUDE &T166P-TXNAM& OBJECT &T166P-TDOBJECT& ID &T166P-TDID&
    /: NEW-PARAGRAPH BG
    So far, tried these approaches:
    PARAGRAPH
    NEW-PARAGRAPH
    LANGUAGE '2'
    THANGSAN font
    Any ideas?
    Thank you so much in advance for all your help. Our project team will really appreciate it. May the Lord bless you as we go through our SAP work!
    Sincerely,     
    Celeste

    Hello Caleste,
    Please let me know what settings you have done to solve this issue.
    Help me with steps for Spool Request/Print settings.
    Regards!!
    Surya

  • 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

  • Tab problem in sapscript

    Hi all,
    My requirement is I need to print a form in this format in sapscript: -
    All these are in the same text element.
    What happen now is the Text Id cannot display in the correct tab when there is more than one line.
    Not correct (now)
    Type:        TEST FS SPARE
    Text Id :   
    1234,12345,123456,1234567,12345678,123456789,1234567890,123456,1234567,123456,1234567,12345678,1234567,12345678
    Description: Spare Part
    Expected result
    Type:        TEST FS SPARE
    Text Id :    1234,12345,123456,1234567,12345678,123456789,1234567890,
              123456,1234567,123456,1234567,12345678,1234567,12345678
    Description: Spare Part
    Here is my code
    /E      DETAILS
    HA     Type: ,,,,,,,,&RIWO1-MATKTX(C)&
    HA     Text Id.: ,,,,,,,,&GV_FETXT&
    HA     Description.: ,,,,,,,,&GV_DESCP&
      DATA: lv_count TYPE i.
      loop at iviqmfe where fenum > 0 and kzloesch eq space.
        lv_count = lv_count + 1.
        if lv_count EQ 1.
          MOVE iviqmfe-fetxt to gv_fetxt.
        else.
          concatenate gv_fetxt iviqmfe-fetxt into gv_fetxt SEPARATED BY ','.
        endif.
      endloop.
      loop at iviqmfe where fenum > 0 and kzloesch eq space.
        perform print_element using 'DETAILS' 'MAIN'.
      endloop.
    Thanks in advance.

    Hi,
    Instead of using ' ,,,,,, ' again and again,  try giving some value in Tabs in Paragraph formats.. with certain length..
    Hope this helps..

  • Tab positions in sapscripts

    I am trying to change a paragraph format such that the tabs contain positions and so the text is displayed starting at a specific position in the document. But adding the tab positions is not moving the actual text. What could I be doing wrong?

    CP is the paragraph format
    CP        Contact Person                  LEFT           0,10  CM    0,00  CM
    15.00  CM          LEFT
    This is how I am using it
    CP           &acc-sydt&,,&acc-contact&,,&PAGE& / &sapscript-formpages(2)&
    This is the window it is been used in
    DATE       Date, Your contact and page    9,70 CM   2,00 CM  10,00 CM   1,00 CM
    Now I would expect the contact text to start from 15.00 cm. But it does not, it starts right after the date

Maybe you are looking for

  • Invoice wise pending GR/IR report

    hello , can anyone tell me how to find the invoice wise pending goor receipt and invoice receipt details , what tables contain that data. i need to write the report on the basis of GL account,,posting date and document type . thanks

  • How to install Vision run-time engine to a desktop PC converted to real-time target

    Hi, all I don't know how can I install the vision run-time engine to a desktop PC which I converted to a real-time target.  The same problem applies to installing real-time run-time engine and labview run-time engine to the real-time target.  The onl

  • Asdoc how to add a custom local namespace with manifest file?

    Hi there, I use the flex 4 beta1 sdk to test the following: I have: MainScreen.mxml: <?xml version="1.0" encoding="utf-8"?> <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"     xmlns:s="library://ns.adobe.com/flex/spark"     xmlns:mx="library://ns.a

  • Help with TOC headings/sections for ebook

    Hi guys, I'm having trouble creating an active Table of Contents for an ebook using Pages. I would like to have the headings on the TOC refer the reader to a page in which the information is contained without the TOC heading appearing on the text. Fo

  • Code of a method longer than 65536 bytes

    I just moved my web application (jsp/servlets, no EJB) from apache tomcat to Oracle 9iAs Container for J2EE (OC4J). Everything is working fine except one jsp file, called "EditTmpForm.jsp". Basically, this jsp file is used to update existing records,