URGENT: SapScript Layout printing

hi all,
i have to develop a form which look something like this (click the link for layout)  
<a href="http://www.geocities.com/xwing88/layout.JPG">LAYOUT</a>
my problem is for columns: Date, Vessel & Remark, these are include texts.
- i need to print the column lines
- the texts should not overlap the column lines
- how should the window placement be? i've tried the first 5 columns from left is the main window, the remark column is a VAR window which displays the text only, however at the end of the text i'm supposed to display the attachment list. i've tried displaying the list from an internal table but the form only prints the last record, even if there's 3 records, all printing the same value
- i've even tried the whole thing is the main window. my problem arises when i tried to print the include texts. if i use the include text command from sapscript and supply the PARAGRAPH to the command, the texts will be printed a line below, displaying a line feed. however if u use FM READ_TEXT in the print program and use element to control, i ahve the same line feed problem as well. the remark column is printed a line below.
-how to make all the text starting from the first line?
-how do i keep all the text within the column line? what if the texts are very long??
plz any help or suggestions are very much appreciated. any tips will do...
thank you.

Hi!
This is very complicated task in SAPScript.
- If the texts are constant, or they are not changing very frequently you might create windows for all grids. You will place the relevant text in the right window, you can address windows dynamically.
- You might try to read the text within the printer program (using FM READ_TEXT) and separate the corresponding lines into a table. Then loop at the table and just simply print the lines, and use BOX command for the frames
- Or you might write it in SMARTFORM, which makes this task easier. This is one of the smartform's advantages, it can handle cells very well.
Regards
Tamá

Similar Messages

  • How to convert PO sapscript layout to pdf - need VERY URGENT Help

    Dear All,
    Requirement: PO sapscript layout after some modifications (say, ZMEDRUCK) has to be converted to pdf. Through me9f user will be able to give ranges of PO numbers and can view the print preview for the po. After that on clicking the print button we get the printout of the pos one after another based on the user input of PO numbers.
    Our requirement is that when the user will click on the "Print Preview" of po (rather than pressing the print button) it i.e. PO sapscript layout has to get converted to pdf.
    If you have already encountered this scenario, could you please send me the source code regarding this at the earliest. If you want to email it to my personal id, please let me know so that I can give it to you. Thank you.
    It will be very beneficial for mine if you can send me some source code in this regard. (FYI. We want only “Print output” of PO sapscript. So, Print Program /SMB40/FM06P [after copying it to our ZSMB40/FM06P program] need to be modified for downloading the PO into PDF where there is no FMs like OPEN_FORM, WRITE_FORM, CLOSE_FORM. So already available source code in SAP forums can not help me.)). Kindly help me at the earliest. It’s VERY URGENT…
    Thank you.
    Thanks & Regards
    Sudipta

    Hi Chaith,
    Could you please provide me the source code regarding this at the earliest.
    We want only “Print output” of PO sapscript. So we need to modify only the Print Program SAPFM06P after copying it to ZSAPFM06P for downloading of modified PO (ZMEDRUCK) sapscript layout into PDF.
    I am already having some source code from sdn portral. I am attaching it herewith. But it's not working as some constants and variable values need to be given. We want to take download of PO into PDF from ME9F transaction itself.
    Could you please provide necessary values in the missing constants and variables and kindly resend the corrected modified Source code to me so that I can run the same code to  download the modified PO ZMEDRUCK into PDF . Need YOUR URGENT HELP...
    DATA: l_druvo LIKE t166k-druvo,
            l_nast  LIKE nast,
            aux_nast LIKE nast,
            l_from_memory,
            l_doc   TYPE meein_purchase_doc_print,
            ent_screen TYPE c,
            ent_retco TYPE i,
            toa_dara TYPE toa_dara,
            arc_params LIKE arc_params,
            aux_form LIKE tnapr-fonam.
      DATA: otf LIKE itcoo OCCURS 0 WITH HEADER LINE,
            lt_docs      TYPE TABLE OF docs,
            pdf_bytecount TYPE i,
            nom_archivo TYPE string.
      aux_form = 'ZMEDRUCK'.
      l_from_memory = c_true.
      SELECT *
        FROM nast
        INTO aux_nast
        UP TO 1 ROWS
        WHERE kappl = c_po     " Purchase Order
        AND   objky = t_datos-ebeln
        AND   aktiv = space
        ORDER BY erdat DESCENDING eruhr DESCENDING.
      ENDSELECT.
      aux_nast-sort1 = c_swp.
      CLEAR ent_screen.
      CLEAR ent_retco.
      IF aux_nast-aende EQ space.
        l_druvo = c_1.
      ELSE.
        l_druvo = c_2.
      ENDIF.
    l_druvo = '2'.
      CALL FUNCTION 'ME_READ_PO_FOR_PRINTING'
        EXPORTING
          ix_nast        = aux_nast
          ix_screen      = ent_screen
        IMPORTING
          ex_retco       = ent_retco
          ex_nast        = l_nast
          doc            = l_doc
        CHANGING
          cx_druvo       = l_druvo
          cx_from_memory = l_from_memory.
      CHECK ent_retco EQ 0.
      CALL FUNCTION 'ECP_PRINT_PO'
        EXPORTING
          ix_nast        = l_nast
          ix_druvo       = l_druvo
          doc            = l_doc
          ix_screen      = ent_screen
          ix_from_memory = l_from_memory
          ix_toa_dara    = toa_dara
          ix_arc_params  = arc_params
          ix_fonam       = aux_form                            
        IMPORTING
          ex_retco       = ent_retco.
      CLEAR otf.
      CALL FUNCTION 'READ_OTF_FROM_MEMORY'
        EXPORTING
          memory_key   = l_nast-objky  " PO Number
        TABLES
          otf          = otf
        EXCEPTIONS
          memory_empty = 1
          OTHERS       = 2.
      CALL FUNCTION 'CONVERT_OTF_2_PDF'
        IMPORTING
          bin_filesize           = pdf_bytecount
        TABLES
          otf                    = otf
          doctab_archive         = lt_docs
          lines                  = pdfout
        EXCEPTIONS
          err_conv_not_possible  = 1
          err_otf_mc_noendmarker = 2
          OTHERS                 = 3.
      CONCATENATE c_dest t_datos-ebeln c_ext INTO nom_archivo.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          bin_filesize = pdf_bytecount
          filename     = nom_archivo
          filetype     = c_bin
        IMPORTING
          filelength   = pdf_bytecount
        TABLES
          data_tab     = pdfout.

  • SAPScript font printing

    Dear all,
    I have a same version of SAPScript layout in both Dev and Prod server. But the printing in Dev suddenly having alignment problem. Below is the printing example before and after in DEV; the spacing between each character become wider:
    Before:
    Production order : 123456789
    Name             : Test123
    After:
    P r o d u c t i o n  o r d e r : 123456789
    N a m e             : Test123
    FYI, the paragraph being used for above printing is HELVE 8.0, and the Device type is ZSWIN (copied from SAPSWIN) type L. I did checked on SE73 - printer font, the required font is there.
    Will it caused by the recent SP(SAP_BASIS and SAP_ABAP) that applied on DEV? I'm in SAP 4.7
    Base on your experience, could you please point me out what went wrong and what should i check?
    Thanks in advance.

    Hi Bhaskar,
    Thanks for your post, however may i know how Print-control affect my case here? I don't see the relation, could you please elaborate further?
    FYI i did checked the output type's font(SE73) for output type ZSWIN in both DEV and PROD, they having the same fonts.
    I'm totally running out of idea on how to get it solve.
    Any suggestions are welcome, please....

  • Sapscript - layout form

    Hi,
    Can you explain about the sapscript layout, with example?
    Thanks in advance.

    Hi,
    Create the SapScript Layout using Tcode:SE71,then create a page called 'PAGE1', create a Paragraph called 'AS' and use the below code in the Text Element of the Main Window. Then the values will be displayed in the SapScript when you try to execute its Print Program supplied in the other post.
    Example Code:
    /E   MAIN    
    AS   &NAME&  
    Apart from this, TNAPR is the table which contains the details of the print program and form.
    Hope this helps.
    Please reward if useful.
    Thanks,
    Srinivasa

  • SAPscript layout -Repeating Main window in same page

    Hi,
    I have a requirement in sapscript layout to duplicate content within a page in two sections, of which the content can span across multiple pages.
    Can anyone give an idea how this can be achieved.
    This particular layout has 3 sections:
    1st window (Top window): invoice Details (multiple items)
    2nd window (Middle window): Check Details single item
    3rd window (Bottom window): invoice Details (multiple items) {same content of the 1st window}
    The invoice details can span across multiple pages.
    Main window alone works perfect with the requirement.
    I have attempted with a copy of a Main window for the 3rd window, and as it's specified it can only continue from the 1st main Window and i couldn't find a way to control it's value passing from the calling program.
    I have also tried using a dynamic window for the 3rd window, but haven't worked  to get the desired values shown across multiple pages. When it cross to a new page it repeats its last value across all pages.
    Please help me with this. Thanks in Advance.
    Regards,
    Viraj.

    The Standard layout only prints the invoice details once.
    If your existing layout prints invoice repeated, which means that already a customization is in place which repeats the invoice breakdown.
    If the items are being repeated in the main window, it could be that the repetition customization is done on the calling program, then a solution could be to remove/comment that call  in the calling program by searching text element name.
    If the items are being repeated from a non-main window, then a solution could be to remove/comment the entire element in the non-main window.
    hope this helps
    Best Regards,
    Viraj.

  • Attachment of Word/PDF to Sapscript layout

    Hello everyone,
    Need some help regarding attachment of document in script.
    I know that we can convert the ouput of a SAPscript form to a PDF in a mail attachment or a spool.
    But what we require is attaching a word/pdf document to an existing SAPscript so we can print it at the end of the existing SAPscript layout as terms & conditions.
    Has anyone does this before? I know how to upload word documents in ole and in document management, but am unsure if its possible to add it to a layout. We can add bmp/tiff files, but pdf files??
    Please advise! Thank you in advance.
    Regards,
    Ketaki

    Hi Rich
    Great to hear that someone has already solved the challenge we are facing now.
    We have to print some PDF’s which are stored in iXOS archiving system and linked with archive link to a SD invoice.
    Is it possible you describe a bit more detailed your solution and if possible you send a copy of the coding to me.
    Thanks in advance.
    Walter Wohlgemuth

  • Number pages in sapscript layout

    Hi experts,
    What type of variables normally used in sap script to output data? 
    How do you number pages in sapscript layout outputs? 
    Thanks and Regards,
    Logu.

    Hi,
    ·     &SAPSCRIPT-FORMPAGES&:
    This field contains a number representing the total number of pages of the currently formatted form (any output between START_FORM and END_FORM). The page counter mode (START, INC, HOLD) of the individual pages is ignored. You can use this symbol to formulate information like
    ‘Page x of y’ for your output.
    ·&SAPSCRIPT-JOBPAGES&:
    This field contains a number representing the total number of pages of all forms contained in the currently formatted print request, in other words, of all forms created using the OPEN_FORM, START_FORM.. ENDFORM, START_FORM.. END_FORM,..., CLOSE_FORM function modules.
    &PAGES& current page.
    Thanks,
    Arunprasad.P
    Reward if useful.

  • Where is the language derived for the sapscript layout?

    hi all ,
    where is the language derived for the sapscript layout? in the print program ? where should i control this ?
    best regards
    Kevin

    Hi,
         It may be depend upon the Vendor's or customer's language of the business documents used to print(Sales Orders, Purchase Orders)
    You can change in Layout
    Regards
    Bala Krishna
    Edited by: Bala Krishna on Dec 22, 2008 2:57 PM

  • SAPScript Duplex Printing (SD Invoice)

    Hi all gurus,
    After reading some threads and as I told on this "answered" question from Manfred:
    Re: Duplex Printing SapScript: Invoice - Printer tries but fails backside?
    We need to print SD invoices in duplex mode.
    Settings that we have changed by now:
    - Sapscript: first page printmode as DUPLEX, next as default -> OK
    - Since read from official SAP documentation, for sapscript duplex you don't need to change display type or device type from SPAD. So I left the one was been used. Anyway, to be sure, I change its print mode to DUPLEX. I have also check if the print control SPMDU appears on the device -> OK
    - The printer we use is an OCE MP 1020 which can print on duplex mode and has PCL
    - I have tried printing the text SAPSCRIPT-PRINTMODETEST from SO10 but duplex does not work. They print on different pages.
    Following those instructions, I could not manage to do it.
    I have some questions:
    - Do we need to configure the printer locally in any way?
    - About the example "SAPSCRIPT-PRINTMODETEST", do you need to configure something before testing it for duplex printing?
    Could you please explain the needed steps to accomplish SAPScript duplex print?
    Thanks in advance,
    John

    Hi Aidan,
    Thanks for your response.
    I have changed the device type from SAPWIN to HPLJ4000.
    When I try to print the text: SAPSCRIPT-PRINTMODETEST
    The SAPLPD.LOG says:
    (11:10:16) Number of processors: 4
    (11:10:16) Icon DLL loaded.
    (11:10:16)
    (11:10:16) Network Communication via SAP-NiLib
    (11:10:16) Hostname: xxxxxxxx
    (11:10:16) IP Address: 9954064.2684488.2684488.1617840
    (11:10:16)
    (11:10:16) SAPLPD Version 6.29 for Windows/NT (OPT) is listening
    (11:10:16) OS-Info: version = 6.1, build = 0/7601, text = Service Pack 1
    (11:10:16) Copyright © 1992-2001 SAP AG
    (11:10:16)
    (11:10:26)
    (11:10:26) Receive job for printer __DEFAULT (Berkeley LPD protocol / RFC1179)
    (11:10:26) send_status called
    (11:10:26) send_status called
    (11:10:26) send_status called
    (11:10:26) send_status called
    (11:10:26) send_status called
    (11:10:26) Job 002aBOrZ.IS1 for user XXXXXX queued.
    (11:10:26) Job 002aBOrZ.IS1 (raw) started on printer \XXXXXXXXXX
    (11:10:26) Job 002aBOrZ.IS1 (raw) with 4955 bytes finished
    The printer is not printing any page :S
    This is the printer model:
    http://www.oce.co.uk/products/mp1020/specifications.aspx
    It supports PCL and Postscript
    What could be the problem?
    Thanks in advance

  • Layout & printing of avery labels...

    I am trying to figure out how to layout & print avery labels...5160 with a picture/symbols.
    I do not want to print from address book...I want to be able to print an entire page of the same symbol like I could on a pc in word!

    Try Avery's own software for the purpose:
    http://www.avery.co.uk/avery/en_gb/Templates-&-Software/Software/Avery-DesignPro -for-Mac.htm

  • How to design rows and columns in sapscript layout

    Hi friends,
    Please let me know how to design rows and columns in sapscript layout with example?
    Thanks,
    Yogesh

    Hi friends,
    Please let me know how to design rows and columns in sapscript layout with example?
    Thanks,
    Yogesh

  • To check the transport request of SAPScript layout

    Hi Experts,
    I'd like to ask how to check the transport request assigned to SAPScript layout created in SE71. Im using SAP version 4.5b.Thanks!
    Best Regards,
    Kurtt

    Hi,
    Go to transaction SE03, then select search for objects in request/ tasks, then click on execute button. Then pass required options like PgmID, Obj, Obj. name (Example: R3TR, FORM, Form name) then Execute.
    Reward points if useful.
    Thanks & Regards,
    Vasudeva Rao

  • Sapscript's print preview problem

    Hi everybody!
    My problem is in sapscript's print preview.
    When I call the transaction directly the print preview is ok. But when I call that same transaction through a CALL TRANSACTION command from others reports, the print preview is showed as a simple report output, like it's printed with WRITE commands.
    Has anyone got an idea about this?
    Thanks,
    Raphael

    Hi Curtis!
    Yes, I'd found the answer.
    To solve that, when use the CALL TRANSACTION command, you have to set the parameter CTU_PARAMS this way:
    CTU_PARAMS-NOBINPT = 'X'.
    Doing that, the system knows that it isn't a batch procedure.
    Regards,
    Raphael

  • Addding body content to the mail sent by sapscript layout output report

    Hi,
    I have a report which sends the output of a sapscript layout  as an email.Is there any way i can add some body content to the mail which the report is sending.
    This include is getting called from my report to send email - RVADOPFO
    Thanks
    Bala Duvvuri

    Issue is fixed .instead of using the standard open_form functionality I am getting back the OTF output and converting into pdf and using mail fms i am sending it along with body.
    Thanks
    Bala Duvvuri

  • How to retrieve the Sapscript layout changes for a particular Transport request in development server after this Transport request so many requests created  ?

    Dear Abapers,
    I request the Abapers kindly reply for this blog
    I want to retrieve the sapscript layout changes for a particular transport request in development server after that many transport request created and moved to quality ? 
    I checked in SE03 transaction the transport request was there.  But I want to retrieve the existing transport request which is not moved to Quality?
    Is it possible to retrieve the existing transport request in development which is not moved to quality ?
    Like how we retrieving the programs using versions in development server,  In the same way I want to retrieve the sapscript layout in development server ?
    Thanks & Regards
    Muzeebur Rahiman.S

    Hi,
    There is no version management for SapScript or Smartforms .
    When you write "transport request in development which is not moved to quality" - was the transport ever released and exported from the development system? If yes, and if the "Transport files" are still available in "Transport directory" (or if the transport files were backed up and could be retrieved), the transport could be imported again. If the TR was not exported, you are out of luck, I believe...
    I would not recommend you do it on your own even if you happen to have enough authorizations (consult with Basis and/or Transport Admin, if you have one in your organization). I would not recommend that it's imported on a development system or QA system, even if the transport contains no other objects - only the SapScript form in question. Import it on a "sand-box" that gets overwritten by system copy from time to time... Once the transport is imported, you should have the old version of SapScript in that system and could analyse the changes and perform manual merge.
    cheers
    Jānis

Maybe you are looking for

  • Photos will not sync to order

    Hello All i have about 3000 photos on my ipod but for some reason when i open then they will not appear to order (in "my pictures" folder they are all set to "arrange to.. when taken") for some reason they will not sync or show to that order. any sug

  • [solved] ssh will only login to /bin/bash

    I have a machine with a few users and an ssh server. I would like to setup a user with rbash or nologin for the shell but if i do that, I can't ssh onto that user. my /etc/passwd zidar:x:1000:100:zidar:/home/zidar:/bin/bash smotko:x:1001:1001::/home/

  • How to get data from external source

    Hi experts,    I want to get data from a different source e.g. from oracle. How can i get the data in BW?? Sam

  • Read field value from another page

    Hallo, I have PAGE1.HTM (with MVC) with 2 input fields (country and state). For field STATE there´s a F4-button which calls PAGE2.HTM (page with logic) and in order to display the correct information for states I need to get the value in field countr

  • Is there a need for a lightweight synchronization protocol?

    iDS has the multimaster replication protocol, but that is a pretty heavyweight protocol. iDS supports two other options which can be used to sync up using regular LDAP operations - the Retro Changelog and persistent search. Do people use Retro Change