Show TOC

Formatting Is IncorrectLocate this document in the navigation structure

Use

This section explains what to do if paragraph or character formats are incorrect when you print out a form.

Procedure

Do the following to localize the error:

  • Is SAPscript actually being used for printing?

    Some applications (such as the Reportwriter) that use the SAPscript editor for maintaining texts do their printing using the "normal" ABAP list printing. In this case, SAPscript formatting options have no effect at all.

    You can check whether SAPscript is being used for printing by checking attributes of the spool request in transaction SP01. If the spool request uses ABAP printing, then a format name beginning with X_ appears in the Format field. If the spool request uses SAPscript formatting, then a name such as DINA4, INCH12 that does not begin with X appears.

    Note

    In the print programs in some SAP applications (for example RFDUZI00), you can request on-screen formatting of the form that is to be printed. This is realized in SAPscript by setting DEVICE=SCREEN. This switch causes SAPscript not to format the output as for a printer, but instead to format the output as a normal list for screen display. In that case, the screen display contains the pushbutton Print. You can choose this pushbutton to output the list using the regular ABAP function for printing lists. A print preview for DEVICE=PRINTER (which can be printed by SAPscript) can be identified by the fact that "print preview"appears in the title bar of the screen.

  • What are the typeface attributes in the form? The typeface used for printing a piece of text is determined by the following settings:

    • Default type setting for the form (in Start of the navigation path Header Next navigation step Font Attributes End of the navigation path)

    • Font attributes of the paragraph used or of the default paragraph (in Start of the navigation path Paragraphs Next navigation step Font Attributes End of the navigation path)

    • Font attributes of any character format used (in Start of the navigation path Character Strings Next navigation step Font Attributes End of the navigation path)

    • Fonts and type faces supported by the device type in use

      Note

      SAPscript must choose a printer font (font available on the target printer) that meets the font attributes specified for the form. If the requested typeface does not exist on the target printer, then SAPscript chooses a substitute. If the substitute is not an exact match to the SAPscript typeface, then this substitution can produce output errors.

  • Are both the paragraph and character formats defined in the form?

  • If the incorrectly formatted text is inserted into the main window (MAIN) using INCLUDE, then check that no style is assigned to the text that is included. If a style (or form that includes styles) is assigned to the document, then these formats are used to format the included text.

  • If the incorrectly formatted text is inserted with the INCLUDE... PARAGRAPH <format name> command, then check to be sure that there are no INCLUDE commands in the included document. Specifying a paragraph format for an INCLUDE does not work for "nested"INCLUDEs.

  • Use the following procedure to test whether a text element in a form is correctly formatted. This procedure lets you test without having to start the print program in the SAP application, which may require considerable knowledge of the application.

    To test a text element, do the following:

    1. Copy the form to a name in the customer name space, Z<xxxx>, ZTEST, for example. Use transaction SE71 to do this.

    2. Edit the copy of the form. Specify the text element that you want to test as the default text element in the window in which it is defined. That is, put the text element right at the start of the window text, and do not use the /e element_name identifier with it.

    3. Activate the test form.

    4. Create or change a standard text. Assign your test form to the document by choosing Start of the navigation path Format Next navigation step Form End of the navigation path. You can do this in the standard SAPscript text processing function (transaction SO10).

    5. Print the test document on the printer at which the output errors occurred.

    If the text element is incorrectly formatted, you can correct it in your standard text document. You can then transfer the corrections to the original text element in its form.