New Page Format implentation in Sap Scripts and Reports

Hi,
   I want to print Report details and also some of the SAP Script details on the paper size of 350MM width and 310MM Height in the PORTRAIT format.
   So i created new page format with these dimensions.
   How i can use this for reports. So i can set these parameters while taking output from Report.
   Pls specify if any configuration required for this.
Thanks in Advance,
Regards,
Pavan.

In SAPscript, you set the Page Format for the document in the "Page Format" field of the "Basic Settings" page of the documents "Header" information. The popup list of this field will show all available formats in your system, so this is a ggod way to make sure your new format is set up properly.
For reports, page format is set either with the LINE-SIZE addition to the REPORT and NEW-PAGE commands, or through the PARAMETERS addition to the NEW-PAGE command. When you use LINE-SIZE the print system picks the format for you, based on the available formats in the systems.
I don't remember if there is an activation step for Page Formats, or if saving is all you have to do.

Similar Messages

  • Issue in New Page Display in a SAP Script

    Hi All
             I have applied a line count logic in my SAP script, such that if lines are more than 32, Sub Total is displayed on this page(Sub Total needs 4 lines to display) and from next page,another heading starts. (Total around 39 lines can be displayed  in one page)
    Sub Total Text contains 2 lines of text, and 2 blank lines after it (Total 4 lines)
    Now, if number of lines is around 36, Sub Total, doesnt fully display in this page and the 2 blank lines gets passed to the next page. And I am also firing a new page from my code. As a result, the 2nd page comes fully blank and the data is now being displayed at the 3rd page. How can I prevent the 2nd page from coming blank ??
    I am using Function Module 'CONTROL_FORM' (or WRITE_FORM) to fire a new page.
    I do not want to apply a line count logic for this as this wont be fool proof !!
    I hope I have made the issue clear. Kindly help !!
    Thanks
    KP

    Hi,
    otherwise u can do one thing: U call the PERFORM in the SCRIPT FORM passing the &PAGE&(Contains the current Page No) value to it. take a loal variable and pass the PAGE value to the local variable and check for every line whether both &PAGE& & local varaiable are same, if not then set the FLAG value to 'X' (it means the new page has triggered).
    Eg:
    In Script:
    /:  lv_tabix = lv_tabix + 1.
    /: PERFORM new_page_flag IN PROGRAM ZXXXXX
    /: USING &PAGE&
    /: USING &lv_tabix&
    /: CHANGING &FLAG&
    In ZXXXXX Program:
    FORM new_page_flag USING int_tab STRUCTURE itcsy
                                CHANING out_tab STRUCTURE itcsy.
    data : lv_page TYPE i,
             lv1_tabix TYPE i.
    READ TABLE int_tab WITH KEY name = 'LV_TABIX'.
    IF sy-subrc EQ '0'.
      lv1_tabix = int_tab-value.
      clear : int_tab.
    ENDIF.      
    IF lv1_tabix EQ '1'.
      lv_page = '1'.
    ENDIF.
    READ TABLE int_tab WITH KEY name = 'PAGE'.
    IF lv1_tabix GT '1'.
      IF lv_page NE  int_tab-value.
        READ TABLE out_tab WITH KEY name = 'FLAG'.
        IF sy-subrc EQ 0.
           out_tab-value = 'X'.
           MODIFY out_tab.
           clear : out_tab.
        ENDIF.
      ENDIF.
    ENDIF.
    IF sy-subrc EQ '0'.
      lv_page = int_tab-value.
    ENDIF.                          
    Hope it helps!!
    Rgds,
    Pavan

  • New Page Format in Smartforms

    Hi All,
    I am working on smartforms.
    I have created a new page format of width 25 cm and width 30cm according to client's requirement.
    Smartform is  for customer invoice which is a pre-printed and i have to get data into that.
    In sform i have given the my own page format name.
    Now problem is am getting print preview correctly but while giving print its givivng the error
    ' OUTPUT COULD NOT BE ISSUED' and print is not coming.
    Please help me regarding this issue.
      Thanks in advance.
    Regards,
    Murthy.

    Hi,
    I have checked it but its ok.
    I have created page format through SPAD only.
    Regards,
    Murthy.

  • Creation of new page format

    Hi
    I have created new page format and added it to format and then to device by using SPAD.
    This new page size is 8 X 6 Portrait( Is there any standard sap page format available with this size)
    the problem is that when print out is taken by using script the first page of the first document is correctly printed , But from second document onward the printer scrolls more than required, the print out is taken in continues page.
    Where to set the scrolling space and all
    Hoping help

    I think it is Printer problem. Check your printer settings.

  • What is the diff b/w Sap Scripts and Smart Forms

    Hi,
          Whats the diff b/w SAP Scripts and Smart Forms..
             I need the internal explanation for both Smart Forms and SAP Scripts mean when we execute what happens whether Print Program r Forms starts execution 1st  and SIMILARLY FOR SMARTFORMS WHETHER FM'S  R FORMS.
    Thanks & Regards,
    Gopi.

    Hi
    Difference with SMARTFORMS vs. SapScript(SE71)
    The Following are the differences :-
    a) Multiple page formats are possible in smartforms which is not the case in SAPScripts
    b) It is possible to have a smartform without a main window .
    c) Labels cannot be created in smartforms.
    d) Routines can be written in smartforms tool.
    e) Smartforms generates a function module when activated.
    f) Unlike sapscripts (RSTXSCRP), you cannot upload/download Smartform to your local harddisk.
    It was said that it was provided in CRM 3.0 version, but not available in R/3. You can download smartforms into Local PC in a XML format. In the same way you can upload this XML format into Smartform. From the smartform editor itself you can call download option, if you are working in CRM 3.0 environment.
    In R3 also, you can download into XML format. However, it's not sure about uploading. Refer to the program 'SF_XSF_DEMO'.
    In 4.7 Enterprise, other have seen this utlity which is completey missing in 4.6c. There is functionality to downlaod a complete form or only a particular node. (Utilities -> Download form). It will create a XML file and save it in the hard disk.
    For others, if you want to download/upload the Smartforms source, you will need the help from the Basis people. What you can do is to create a Transport and then FTP down to your local harddisk. When you need the Smartform source in another system, you have FTP up the Smartforms file back to the SAP server. Finally, the Basis team, will tp it into your system.
    g) The protect and endprotect command in sapscript doesn't work with smartforms. For example on a invoice: First data of position no 80. is printed on page one, other data of position no 80 is printed on page 2. And there's nothing you can do about it. Actually, there is something you can do about it. By using a folder node and checking the 'protect' checkbox, everything in that folder will be page protected.
    check out this link:
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    Reward points if helpful.
    Regards,
    Swathi.

  • How to create new Page Format

    Hello
    i want to create new page format in sap script
    can any body guide to crate this & how to assign this
    thnks in advance

    Hi Nitin,
    You can create a new page format by transaction code SPAD. Here you will have to create a cutomised page format for ex: 'ZPAGE'.
    After this you will have to create a format type 'ZPAGE'. Assign the page format 'ZPAGE' to format type 'ZPAGE'. Pls make sure that both the names are identical.
    Once you do that you will have to assign the format type ZPAGE to the printer which you want to use.
    Now you can use this page format in your script.
    Hope this helps.
    Sushil

  • Calling different pages in a single sap script based on conditions?

    Hi All,
             Can anyone please give me an example of how to call different pages in a single sap script based on condition. Eg., i need to call 5 differnet pages from a single sap script based on 5 company codes.
    Please help
    Regards
    Priya

    This approach to make call from SAPscript. Its concept is similar to make call to a subroutine in another program. I would presume you understand how to use USING and CHANGING parameter. =)
    SAPscript -
    /: Perform get_date in program z_at_date
    /:    using &p_year&
    /:    changing &new_date&
    /: endperform.
    program z_at_date -
    form get_date TABLES rec_in  STRUCTURE itcsy
                                    rec_out STRUCTURE itcsy..
    DATA:
       v_year type char10.
    sap script and subroutine uses itcsy structure to transmit parameters
    first parameter is incoming while second parameter is out going
    their function is like an internal table with header line
    all data types between SAPscript and subroutine are string.
    so, you might need additional conversion.
    read incoming parameter with exact name from SAPscript
      READ TABLE rec_in WITH KEY name = 'P_YEAR'.
      IF sy-subrc EQ 0.
        v_year = rec_in-value.
      ENDIF.
    to return value, use the exact name on the second structure
        CONCATENATE v_year v_year INTO v_year.
        READ TABLE rec_out WITH KEY name = 'NEW_DATE'.
        IF sy-subrc EQ 0.
          rec_out-value = v_year.
          MODIFY rec_out TRANSPORTING value WHERE name = 'NEW_DATE'.
        ENDIF.
    endform.
    Hope this helps =)

  • SAP SCRIPT and the report

    Hi Peers,
    I am working on the report which calling the Form from SAP Script and displaying the form.
    I wanted a selection screen in which if the user enters some value it should automatically preview in the form.
    I am really new to the ABAP Pls some help on this .
    Any code is appreciated.
    Every answers will be rewarded.
    Pls peers help on this.
    Seema.

    Hi,
    where is a simple example:
    PARAMETERS: KUNNR(10).
    PARAMETERS: PREVI AS CHECKBOX DEFAULT 'X'.
    START-OF-SELECTION.
      PERFORM OPEN_FORM.
      PERFORM START_FORM.
      PERFORM PRINT_DATA.
      PERFORM END_FORM.
      PERFORM CLOSE_FORM.
    *&      Form  OPEN_FORM
    FORM OPEN_FORM.
      CLEAR ITCPO.
      ITCPO-TDCOPIES = 1.
      ITCPO-TDDEST = PRINTER.
      IF PREVI = 'X'.
        ITCPO-TDPREVIEW = 'X'.
      ENDIF.
      ITCPO-TDNEWID = 'X'.
      ITCPO-TDDATASET = 'test'.
      ITCPO-TDSUFFIX1 = PRINTER.
      ITCPO-TDSUFFIX2 = 'test'.
      ITCPO-TDDELETE = ' '.                " Não eliminar imediatamente
      CALL FUNCTION 'OPEN_FORM'
           EXPORTING
                DEVICE   = 'PRINTER'
                DIALOG   = ' '
                FORM     = 'YOUR_FORM_NAME'
                LANGUAGE = SY-LANGU
                OPTIONS  = ITCPO
           EXCEPTIONS
                CANCELED = 1
                DEVICE   = 2
                FORM     = 3
                OPTIONS  = 4
                UNCLOSED = 5
                OTHERS   = 6.
    ENDFORM.                    " OPEN_FORM
    *&      Form  START_FORM
    FORM START_FORM.
      CALL FUNCTION 'START_FORM'
           EXPORTING
                LANGUAGE = SY-LANGU.
    ENDFORM.                    " START_FORM
    *&      Form  PRINT_DATA
    FORM PRINT_DATA.
      SELECT * FROM KNA1 WHERE KUNNR EQ KUNNR.
        CALL FUNCTION 'WRITE_FORM'
             EXPORTING
                  ELEMENT = 'TEST'
                  WINDOW  = 'MAIN'.
      ENDFORM.                    " PRINT_DATA
    *&      Form  END_FORM
    FORM END_FORM.
      CALL FUNCTION 'END_FORM'.
    ENDFORM.                    " END_FORM
    *&      Form  CLOSE_FORM
    FORM CLOSE_FORM.
      CALL FUNCTION 'CLOSE_FORM'
           EXCEPTIONS
                UNOPENED = 1
                OTHERS   = 2.
    ENDFORM.                    " CLOSE_FORM
    Then, you must create your SapScript in order to print some information.
    Regards,

  • Regarding debugging in sap script and smart form

    hi guys,
    can any one tell me what are the different steps and options available to debug a SAP SCRIPT and a SMARTFORM.
    thank you very much
    pavan

    Scripts:
    1. In the form, Utilities->debugger / RSTXDBUG FM for debugging script
    2. Generally SAP script contains the Layout and corresponding print program.
    First go to SE71 and enter ur script name. In the same screen go to Utilities->click on activate debugger option.
    Now go to SE 38 and enter ur Print Program name and execute the program.
    Now you can debug the script Page wise and window wise.
    Smartforms:
    In the Smartform, create a Code Node and within the Code Node you can hardcode a normal abap Break Point.
    Insert a "Program Line" just above the node you want to debug and this program line write a normal abap breakpoint. So whenever you call the smartforms, it will stop at this breakpoint and you can debug onwards.
    Other way to debug smartform is to debug the Function Module of that smartforms.
    You can also use <b>smartform trace (transaction SFTRACE)</b>.
    Have a look at below link.
    http://help.sap.com/saphelp_erp2004/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
    I hope it helps.
    Best Regards,
    Vibha
    *Please mark all the helpful answers

  • Printing Problem in New Page Format

    Hi Everybody,
                  I have an issue lying  long time in my Company.
            Abap person asked me to create a new page format with new page sizing and all. i created it. this is actually for Voucher printing which does not require A4 size. so that i specified specific paper size in that.
         Voucher is Printing in the Specified Size, ok. But, after printing it, the printer automatically Rolls till the end of the paper.(Probably this would have taken A4 by Default)
         the issue is, we need to stop this rolling and we need to make this printing as specified.since it is continuous printing, every time we cant manually rotate the page.(Printer Epson Dot Matrix)
    Is this either can be sorted out by ABAP or Basis Person.  
       What can be done from Our Basis Side?
    Thanks,
    Siva

    Hi,
    How you solved this problem?
    I am also facing the same problem.
    Thanks in advance
    Sameer Dhuke
    Edited by: sameer dhuke on Feb 16, 2010 11:27 AM

  • Want to move documents from old pages to new pages format. How?

    Want to move/change pre-Yosemite Pages documents to the new Pages format. How?

    As I mentioned earlier, the Pages v5.5 document architecture is alien to Pages v5.2.2 on Mavericks. Yes, you can drag/drop the v5.5 document onto an open Pages for iCloud beta session. No, you cannot download this v5.5 document to Mavericks, and successfully open it in Pages v5.2.2. You get this familiar greeting.
    Plan B is to open the document in Pages for iCloud beta. On the toolbar, click the Wrench icon, and choose Download a copy, and then pick Word. By the time you go through all this nonsense, you could have selected Share > Send a Copy > Mail > Word and opened via email on Mavericks.
    Of course, if one had started their word processing in Office for Mac 2011 Word, this obtuse means of backward document sharing would have been an non-event.

  • Customer Statement using SAP Script and Standard print program RFKORD10

    Using sap script and standard print program RFKORD10 I need to create a customer statement where the main window will be as follows
    Invoice #     InvoiceDate  CustomerPO  Debit Amt  Credit Amt  Total
        6        7           8               9               10               11
        6        7           8               9               10               11
                                     Totals               12             13              14
    Where company code BKORM-KUKRS
                Invoice              BSID-BELNR
                Invoice date      BSID-BLDAT
                Customer PO    VBKD-BSTKD
    For each document number selected there will be one to many records in VBRP.  For each invoice item in VBRP:
    u2022     Select BSTKD from VBKD where
    o     VBELN = VBRP-VGBEL and
    o     POSNR = VBRP-VGPOS
    u2022     If no hits then select BSTKD from VBKD where
    o     VBELN = VBRP-VGBEL
    If there is more than one PO per invoice then list them in the Customer PO field without repeating the other fields.PO shouldnu2019t come more than once per invoice.
                 Debit Amt         if BSEG-SHKZG = S then WRBTR ELSE 0
                 Credit Amt        if BSEG-SHKZG = H then WRBTR ELSE 0
                 Total                  Debit Amt u2013 Credit Amt
                  Totals                Subtotals
    It will be of great help if some one can help me with the script and the alterations required in standard print program RFKORD10
    Points will b rewarded for sure.
    Thanks.

    Hi Suganya,
    The custom form is getting displayed properly. But the requirement is to have it as an editable PDF. So the functional team is working on configuring the settings of PDF forms with customers email address.
    But for right now, i customized the standard form F140_ACC_STAT_01 and standard print program RFKORD10_PDF and did the configuration. It is getting displayed (I tested only with the transaction FBL5N - customer open line items..)
    Please let me know any further details on this.
    Poornima

  • How to use msword as editor in sap script and smart form..

    how to use msword as text editor in sap scripts and smartforms..

    Hi
    Go through the link given below :
    Saptechnical. com
    tutorials
    smartforms
    you will find solution for how to use MS word as editior.
    Or
    Call transaction I18N
    go to I18N Customizing -> MS Word as Editor.Choose the Help-Button and follow the instructions.
    If transaction I18N is not available in your system yet (see SAP Note 848036), you can also enable this feature via program RSCPINST.
    Call transaction SE38, enter program RSCPINST and press F8. On the next screen,select Goto -> Set MS Word as Editor.
    With Regard
    Nikunj shah

  • ? MSWORD as EDITOR in sap script and smart forms ?

    Hi friends,
    How to use MSWORD as EDITOR in sap script and smart forms.
    Edited by: Julius Bussche on Jul 17, 2008 12:45 PM

    hi,
    Call transaction I18N
    go to I18N Customizing -> MS Word as Editor.Choose the Help-Button and follow the instructions.
    If transaction I18N is not available in your system yet (see SAP Note 848036), you can also enable this feature via program RSCPINST.
    Call transaction SE38, enter program RSCPINST and press F8. On the next screen,select Goto -> Set MS Word as Editor.

  • String search in SAP Script and Smartforms

    Hi All,
    We have an urgent requirement where we need to search for a character string in all SAP Scripts and Smartforms in our system.
    It would also help if we can get the names of programs/function modules which are internally generated for the same.
    Any pointers on the same would be helpful.
    Regards,
    Saurabh

    You can create a variable window in the main window.
    You can restrict the last item of the main window by varying the size of main window. In your wite-form ,
    CALL FUNCTION 'WRITE_FORM'
          EXPORTING
             element                  = 'ITEM'
          function                 = 'SET'
          type                     = 'BODY'
          window                   = 'MAIN'
          EXCEPTIONS
            element                  = 1
            function                 = 2
            type                     = 3
            unopened                 = 4
            unstarted                = 5
            window                   = 6
            bad_pageformat_for_print = 7
            spool_error              = 8
            codepage                 = 9
            OTHERS                   = 10.
        IF sy-subrc <> 0.
    DO this. in the bottom of the main window, create a variable window.
    you can add your text in the variable window inside main window.
    it will be displayed just after the item ends.
    Reagrds,
    Pritha.
    Message was edited by:
            Pritha Agrawal

Maybe you are looking for