Print data at new line in SAP Scripts

Hi,
Is there any way that i can print data at new line in sap scripts. I am looping my data and its printing in the same line but i need to print it at new line. Is there any formating options or any command to do that.
Thanks

Than you must take all the values from the internal table into the different variables and than print them.
In program:
READ TABLE ITAB INTO WA_TAB INDEX 1.
IF SY-SUBRC = 0.
  VAR1 = WA_TAB-FIELD1.
ENDIF.
* read all the lines and fill the VAR variables
In SAPScript:
/E LINE_VAR
/P &VAR1&
/P &VAR2&
/P &VAR3&
/P &VAR4&
Regards,
Naimesh Patel

Similar Messages

  • I  want to write data in 10th line or 20th line in sap scripts

    i  want to write data in 10th line or 20th line in sap scripts,how can write it

    Give 10 line feeds in your Paragraph Formats
    then write your Data there &DATA1&
    again give 10 line feeds and write your data2 there
    Reward Points if helpful .
    Regards,
    Ismail

  • Data passing from abap to SAP Scripts

    Hi all,
    I am facing a  problem while passing the data from abap progrm to sap scripts.
    I have designed asap script which contains the main window and the text elements.
    I have to print the line item in the text element 'LINE_ITEM'
    the following :
    &wa_bseg-belnr& ,, &wa_bseg-wrbtr&.
    In the abap code :
    I have data in my internal table,
    I have used the write_form
    ELEMENT       = 'ITEM_LINE'
    FUNCTION      = 'APPEND'
    TYPE          = 'BODY'
    WINDOW        = 'MAIN'
    But When i execute the pgm my data is not disaplyed in the print.
    What could be the reason,.
    Please help me soon
    Regards,
    Priya

    hi can u check once the text element name in abap code and script main window 's text element name.it must be same
    in script u have to give like this
    \E LINE_ITEM
    in program
    u have to pass the parameters
    ELEMENT = 'LINE_ITEM'
    FUNCTION = 'APPEND'
    TYPE = 'BODY'
    WINDOW = 'MAIN'
    reward points if useful.
    Thanks,
    Usha

  • How to delete a line in SAP Script

    Hi,
         How to delete a line in SAP Script.
    Cheers
    S Kumar

    Okay.if still you are looking the option of deleting line there is one solution.
    Just delete the all contents of perticuler(which needs to deleted) line including the tag column(Where you are /*) and save.if you see again than line would not be seen as blank,you will found it has been deleted.

  • Create new window in SAP Script

    Dear All
       how to create new window in sap script
    Regards
    Suresh
    Edited by: Alvaro Tejada Galindo on Apr 9, 2008 11:58 AM

    Hi,
    To create a new window in scripts.
    1.  After opening the form in SE71   Click on Windows push button.
        it will gives a screen  list of windows in a page
    2. Click on Edit option in menu bar  in Edit-->Create Element click it will gives a popup window in the window give Name of the window and short description press enter  like that you can create windows in  a page
    3.  Click on Page windows it will gives a screen where that window you want to place in that page.    Click on Edit option on menu bar Edit-->Create Element
    it will gives a list of windows which your created in a page   here you have to select which window you want to place.  Double click on that window it will adds on the page and give the bottom of the screen you can find  standard attributes block
    there you have to give the position of the window in a page. 
    or
    Click on setting option on menu bar  settings-->form painter
    it will gives a GUI editor here you can drag the window position it is easy to use.
    then you can see the layout.
    Thanks
    Ganesh

  • Dotted vertical line in sap script

    Hi all,
      Can anyone help me drawing dotted vertical line in sap script?
    Thanks in advance.
    bipen

    hi,
    u can use
    for a horizontal line---
    &ULINE(71)&
    for a vertical line---
    &vline&
    regards,
    krishna

  • Same set of data should print twice on same page in SAP SCRIPT

    Hi Experts,
    I come across a requirement where I need same set of data in sap script should print twice as it is on same page.
    and if first page overflow, then same scenario should continue till complete data is printed. Basically main window data should print twice in two blocks on same page.
    E.g.
    If I have 10 line item which is to be printed on top window on  first page. Now I want that same 10 lines should be printed in a block below the first block. Data should flow similarly across multiple pages.
    Hope my question is pretty clear. I am expecting suitable answers from experts.
    Thanks in advance.
    Regards,
    Vijay

    Hi
    I had the same request for a check form in Canada. I solved it by writing the line item output into variables and print these variables in a second window. It was ~10 hours of effort, not a real nice technical solution but it worked.
    If you require I can send you a PDF of the sap script form definition. You can contact me at [email protected] Answers can take 1 week or more. 
    Best regards
    JD

  • BOX command does not print vertical/horizontal lines in SAP Script

    Dear all,
    in sap script we are using the BOX command to draw some boxes. DUring the print preview, all the boxes look
    just fine including horizontal and vertial lines. But, when we print the output, I get the output minus
    the vertical lines and some horizontal lines.
    Regards,
    rukku
    Edited by: Rukmangada Reddy Ramala on Mar 23, 2010 2:23 PM

    Hi rukku,
    Which device type are you using?
    Please have a look at SAP notes:
    77976, 19807 and 183948.
    Regards,
    David

  • How to create new page in SAP Script?

    Moved to correct forum by moderator.  Duplicate deleted.  Do NOT post the same question in two forums.
    Hello friends,
    I am modifying one SAP script.
    It is already contains 2 pages. FIRST and NEXT.
    All I have to do is to create one more page which should be display as last page.
    And this last page should display some data.
    I tried and created a new page in SE71 but when i execute the program, it doesn't show newly created (LAST) page.
    Please guide me.
    REgards,
    RH
    Edited by: Matt on Nov 7, 2008 4:26 PM

    Hi
    U need to force the call of this new page.
    I suppose your sapscript is arrange with 2 page: FIRST and NEXT, where FIRST has NEXT as next page.
    So the system automatically print the pages FIRST and NEXT: u need to insert the statament:
    /: NEW-PAGE LAST
    in the MAIN window.
    U can create a text element NEW_PAGE and you'll call it as soon as you've finished to print the main data:
    /E NEW_PAGE
    /: NEW-PAGE LAST
    U can use the fm CONTROL_FORM
    Max

  • How to print a Barcode VERTICALLY in a SAP Script ?

    Dear Experts..
    I have to print a Barcode <b>vertically</b> in a SAP Script.
    Could you please help me regarding this.
    Thanks in advance.

    Hey SR,
    follow these steps :
    Bar code  in Smartform :
    General definition of Bar code:
    Bar codes are standardized characters of a symbol made up of a group of lines and spaces that can be recognized by an optical scanner. Bar codes uniquely identify article data, production numbers or transport units, for example. They can also contain additional information such as batch number, expiration date or weight.
    Example
    In the Logistics Execution System (LES), certain field entries can be represented by bar codes and printed on the transfer documents. This simplifies certain data entry processes such as order confirmation.
    Type of bar code:
    Bar codes are based on a binary principle and consist of a series of stripes/gaps of different widths. The sequence of the stripes or gaps results in an (alpha) numeric statement. Bar codes are read optically. Due to varying requirements, bar codes may differ with regard to the following aspects:
    •     printer tolerance
    •     decoding tolerance
    •     character width
    •     automatic check
    •     number of characters
    Steps to implement bar code in the smartform:
    •     Use the transaction code smartstyle. Give a suitable name .Choose create.
    •     In change mode of the Smart Style select the Character formats node and choose Create.
    •     In the Character format field enter a two-character character key.
    •     Select the desired attributes of the Bar Code on the tab Standard Settings.
    •     Choose Activate.
    •     Assign the character format to the field or character string in the smartform.
    •     Activate the smartform.
    •     Test the same.
    Regards,
    Kunal.

  • Creation of New Page in SAP Script

    Hi Experts,
    Please advice when will a new page trigger in SAP Script :
    As per my requirement I need to create a new page for an existing layout and make changes to the second page alone...
    but this page should be triggered only for a specific condition. Is it possible to trigger second page when it satisfies certain conditon?
    I have searched SDN regarding the same but most of them have recommended to use NEW-PAGE...but as per my understanding NEW-PAGE is used when certain data needs to be printed on the next page ( not on the new page ).
    Thanks
    Karthik.R

    Ok friend,
    Try using the conditions in your driver program using 'CONTROL_FORM' function module. or using some other condition in it.
    You can also give conditions in text editors and you can trigger the pages.
    i think these links will help you in solving your solution just check these Link: [new page based on condition in sap script|new page based on condition in sap script; this is just an hint from this you can develop the idea.
    Link: [Breaks in Smartforms|LAST PAGE FOR SAP SCRIPT;.
    Also there are other few related links in SDN which will help you.
    I think this must solve your issue if you still face any queries please revert back to me i will help you.
    Thanks,
    Sri Hari

  • Get no. of lines in sap script

    I am using Command  'Address / End address' in sap script for printing address.
    How do I get the Number of Lines we get from this command.

    /: ADDRESS [DELIVERY] [TYPE t] [PARAGRAPH a] [PRIORITY p] [LINES l]
    /: ENDADDRESS
    LINES
    This specifies how many lines may be used for formatting the address.
    If there are too few lines available to allow all the address data to be formatted,
    then the data specified in the PRIORITY parameter are omitted.
    If there is no LINES parameter and if this command is in a layout set window of
    a type other than MAIN, then the number of lines available for formatting
    the address are automatically calculated based on the current output position
    and the size of the window.

  • New page in sap script

    hi all,
    my requirement is i want to display internal table items in new page when forst page is filled.
    ihve given the code like
    loop at it_table.
    write form
    given the text element inthe write form.
    endloop.
    how to trigger new-page when the first page is filled. in this code.ihve created new page and in script and first pages next page is new page.how to call this page.data is displayed in new page with out any format.
    regards,

    Hello everyone.
    I have a similar requirement. When printing a sales order, I need to always print a bitmap in the 2nd page. This means that:
    If the order's line items can fit in the first page's main window, I want to have a two pages output, one page with line items and one page with the bitmap.
    If the order's line items cannot fit in the first page's main window, I want to have three (or more) pages output, first page with line items, second page with the bitmap and the remaining pages with line items.
    I have defined three pages: "first", "second" and "next".
    "First" page has "second" page as next.
    "Second" page has "next" page as next.
    "Next" page has "next" page as next.
    The problem is that when all line items fit in the main window of the "first" page, the "second" page is not triggered. How can I figure out that there will be only one page printed in order to trigger a new one explicitly as soon as the loop in the line-items' internal table finishes?
    Can it be done with an 'IF &SAPSCRIPT-FORMPAGES& = 1' statement? If yes, where should I put it? I have tried it and it doesn't work.
    Thank you in advance.
    Edited by: George Serfiotis on Oct 30, 2009 10:52 AM

  • How to avoid word cut when switching to next line in sap scripts

    Hi,
    i have long text in my sap transaction, i am fetching using READ_TXT, it contains 5 lines like below
    Which is the output length of one line of text in the program
    for theobject list print Text length equal to exactly 132 characters.
    Which isthe output length of one line of text in the program for the object list print
    Text length equal to exactly 132 characters.Which isthe output length of one line of text i
    n the program for the object list print Text length equal to exactly 132 characters.
    my script output line length is 132 chars., now i need to print  in script without cutting the words when switching to new line.
    how to achieve this functionality.
    Thanks
    Srini

    Hi Srinivas,
    You can use RKD_WORD_WRAP or TEXT_SPLIT FM to split the string into N character with out word break.
    Regards,
    Pavan

  • Avoid printing the Country name in the SAP Script

    Hi All,
    I am printing the address of the ship to  customer in SAP script using ADDRESS and ENDADDRESS. The address is formatting based on the country code that I am passing in the COUNTRY parameter. Everything looks fine. But here my requirement is It has to display the address according to COUNTRY parameter and it should display all the part of the address except country name.
    I  am using the following syntax
    /:   ADDRESS PARAGRAPH AD LINES 7
    /:     NAME     &IT_SOLDTO_ADDRS-NAME1&, &IT_SOLDTO_ADDRS-NAME2&
    /:     STREET   &IT_SOLDTO_ADDRS-STRAS&
    /:     POBOX    &IT_SOLDTO_ADDRS-PFACH&  CODE &IT_SOLDTO_ADDRS-PSTL2&
    /:     CITY     &IT_SOLDTO_ADDRS-ORT01&, &IT_SOLDTO_ADDRS-ORT02&
    /:     POSTCODE &IT_SOLDTO_ADDRS-PSTLZ&
    /:     COUNTRY  &IT_SOLDTO_ADDRS-LAND1&
    /:     REGION   &IT_SOLDTO_ADDRS-REGIO&
    /:   ENDADDRESS
    for example if I pass COUNTRY = 'DE', it is printing country name as 'GERMANY'.
    Please advise me how to avoid the country name alone from printing in the address.
    It is very urgent requirement. Points will be awarded for helpful answers.
    Regards,
    Yellappa.

    Hello.
    Since it's only one script, you can always do it without command address, like this:
    * &IT_SOLDTO_ADDRS-NAME1& &IT_SOLDTO_ADDRS-NAME2&
    * &IT_SOLDTO_ADDRS-STRAS&
    * &IT_SOLDTO_ADDRS-ORT01& &IT_SOLDTO_ADDRS-ORT02&
    * &IT_SOLDTO_ADDRS-PSTLZ&
    If a field is not formatted as your needs, you can always convert it yourself, it's not that hard (in driver program or create a PERFORM in script).
    Hope this solves your problem.
    Best regards.
    Valter Oliveira.

Maybe you are looking for