Print Workbench

ADDON.FICABFPW

SAP Online Help

13.07.2011

Copyright
© Copyright 2008 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation. Linux is the registered trademark of Linus Torvalds in the U.S. and other countries. Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other countries. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. SAP, R/3, xApps, xApp, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.

Print Workbench

690

2

SAP Online Help

13.07.2011

Icons in Body Text
Icon Meaning Caution Example Note Recommendation Syntax

Additional icons are used in SAP Library documentation to help you identify different types of information at a glance. For more information, see Help on Help General Information Classes and Information Classes for Business Information Warehouse on the first page of any version of SAP Library.

Typographic Conventions
Type Style Example text Description Words or characters quoted from the screen. These include field names, screen titles, pushbuttons labels, menu names, menu paths, and menu options. Cross-references to other documentation. Example text EXAMPLE TEXT Emphasized words or phrases in body text, graphic titles, and table titles. Technical names of system objects. These include report names, program names, transaction codes, table names, and key concepts of a programming language when they are surrounded by body text, for example, SELECT and INCLUDE. Output on the screen. This includes file and directory names and their paths, messages, names of variables and parameters, source text, and names of installation, upgrade and database tools. Exact user entry. These are words or characters that you enter in the system exactly as they appear in the documentation. Variable user entry. Angle brackets indicate that you replace these words and characters with appropriate entries to make entries in the system. Keys on the keyboard, for example, F2 or ENTER.

Example text

Example text <Example text>

EXAMPLE TEXT

Print Workbench

690

3

07.SAP Online Help 13.2011 Print Workbench Form Classes Properties and Attributes Form Class Library Smart Form/PDF Indicator Test Print Indicator Object Type (BOR) Document Type Status Package Assignment and Transport Documentation Hierarchy Form Levels 1:1 levels Structure Logic of the Hierarchy Source Text Display of the Form Class Hierarchy Form Class Library Automatically Generated Variable Declarations READ Subroutines GET Subroutines FILL Subroutines Global Area for Own Variables Subroutine TEST_PRINT Subroutine SET_ARCHIVE_INDEX Subroutine PROCESS_AFTER_DOC Subroutine PROCESS_AFTER_FORM Controlled Terminations in Exception Situations Processing Form Classes Creating Form Classes Creating Form Levels Creating 1:1 Levels Enabling Test Prints Example: Flight Notification Application Forms Properties and Attributes Form Classes Form Types SAPscript Form/Smart Form /PDF-Based Form User Includes Print Workbench 690 7 8 9 9 9 10 10 10 10 11 12 12 12 13 14 16 16 17 17 18 19 20 20 21 22 22 23 24 24 25 26 26 27 28 29 29 29 30 30 4 .

PDF-Based Forms Access to Data Read Control Variable C Processing Application Forms Creating Application Forms Inserting Variables in Texts (SAPscript Only) Creating a Summation Reading Additional Data from the Database Dynamic Intervention in the Process Flow in User Exits Transferring Own Data to a Smart Form or PDF-Based Form Optimizing Performance User Exits in Application Forms Declaration of Own Data Areas Exit Before Loop Exit During Loop Exit After loop Text Exit (SAPscript only) Start/End Exit Triggering Controlled Terminations Utilities Test Print Breakpoints and Debugging Copying from Clients Uploading and Downloading Application Forms Creating Links Finding Variables Form Information Administration and Transport Mass Processing Print Workbench 690 5 .2011 31 31 32 33 34 34 36 36 36 37 37 38 39 41 42 42 43 44 44 45 45 46 47 47 48 49 50 50 50 51 51 52 52 53 54 54 55 55 55 Interaction of Application Forms with SAPscript Forms.SAP Online Help Start/End Exit Optional Static User Exits in Generated Print Program Generated Modules Languages Status The Hierarchy of an Application Form Form Levels 1:1 levels Texts (SAPscript Only) Flow Logic and Processing Definition of the Hierarchy 13. Smart Forms.07.

SAP Online Help Mass Activation Transporting Application Forms Using References Versioning and Archiving via Upload/Download Translating Application Forms Worklist Creating Worklists Processing Worklists Collection Process Flow of Collections Variable C Dynamic Modifications in the Process Flow Interaction between Application Forms and Collections Send Type e-mail Data Type EFG_TAB_GENDATA Data Type EFG_TABN_SEL_PER_FCLASS Calling Form Printing in ABAP Programs Module EFG_PRINT Module EFG_PRINT_EXPANDED Print Parameter Structure EPRINTPARAMS Print Parameter Dialog EFG_GET_PRINT_PARAMETERS Initializing and Closing Print Transactions Open/Close Optimization Printing Processes and Printing Scenarios Further Processing of Data in External Systems Archiving/Connection to ArchiveLink Sending as e-mail or Telefax via SAPconnect Send Control Flexible Control and Modification of Print Parameters Using the Print Workbench with Correspondence (CA-GTF-COR) Using Print Action Records Print Action Records (Technical Background) Function Modules for Programming Customizing Individual Creation of Print Action Records Mass Creation of Print Action Records Reorganization Integrating Print Action Records in Application Forms 13.2011 56 57 58 58 59 59 63 63 64 65 67 68 69 69 69 70 70 71 72 73 76 77 78 79 80 81 82 84 85 85 86 87 88 88 89 89 90 90 Print Workbench 690 6 .07.

SAP Online Help 13. Invoices. Changes to form classes delivered have modification status. The Print Workbench is subdivided into the following subobjects: ● Form classes Form classes are defined by SAP applications and contain a modeling as well as access instructions for all of the data that belongs to an application or an application process. and account statements are examples of form classes. for example. Application forms You create application forms based on the form classes delivered. You can define several application forms for each form class. In the Print Workbench you can use Smart Forms (BC-SRV-SSF). different invoices for different business partner groups. the Print Workbench uses the SAP standard components for configuring forms – SAPscript. To configure the forms. You can use form classes to create application forms where you access the data defined in the form classes. SAP delivers example forms that you can use as a reference for your own application forms. dunning notices. Smart Forms. Numerous help functions simplify form creation.2011 Print Workbench Purpose The Print Workbench is a central development environment for creating standardized outgoing correspondence. You can use user exits to adjust the application forms to your requirements. The form classes are delivered with each application component that uses the Print Workbench. SAPscript (BC-SRV-SCR). Integration The Print Workbench (CA-GTF-PWB) is a component of SAP Web Application Server and it can be used with no further prerequisites by every other SAP application. ● You can call up the Print Workbench via the area menu PWB.07. and PDF-based forms. or PDFbased forms (BC-SRV-FP) alternatively. Architecture of the Print Workbench Print Workbench 690 7 .

SAP Smart For ms API Application form Hierarchical display of proc essing logic Form class Data hier arch y ►(De)selection/adjus tment of data creates procurement ► Selection of additional data using ABAP user exits Form class librar y (ABAP Report) Data model(/hierarchy) Data struc tures Access coding ► Packaging of texts (only SAPscript) ► Form type c ontrols processing usi SAPscript. The related Form Class Library contains access instructions in the form of ABAP subroutines. When creating the data hierarchy.2011 Application with correspondence request Call at runtime (EFG_PRINT) S AP Smart Forms PDF-based forms S APs crip delivers Generated function module (Print program) sel ect data from databas e.07. Structure A form class consists of a hierarchy representing a logical view of the data model for each application or an application process. Further controlling properties are defined in the Attributes of a form class. Therefore. particular emphasis was given to a logical view of the data model. the form classes are comparable to logical databases. Smart F orms or PDF-based for ms SAP SAP Customer Form Classes Definition The form class is an application-specific object that contains both the underlying data hierarchy for the application and the database access required for data procurement in the form of ABAP/4 coding. correspondence.SAP Online Help 13. they have the advantage that they can swap two equal levels and duplicate a level in application forms. Use Form classes are used by application forms to create forms. Print Workbench 690 8 . integrates SAPscript. In contrast to logical databases however. that is.

If the indicator is not set. Properties and Attributes Definition The attributes of a form class contain controlling information that is important for further processing. It contains the access commands for the form levels and 1:1 levels declared in the hierarchy. These reflect the hierarchy of the form class and are responsible for transporting data from the application form to the Smart Form or PDF-based form.SAP Online Help 13. Smart Form/PDF Indicator Definition The Smart Form/PDF indicator shows whether a form class is designed for using Smart Forms or PDF-based forms. Form classes are usually independent of the use of the data and particularly of the category of the application form. Print Workbench 690 9 . the form class library is an ABAP report. you cannot use the form class for Smart Forms or PDF-based forms. Structure The attributes of a form class contain the following fields: ● ● ● ● ● ● ● ● Form Class Library [Seite 16] Smart Form/PDF Indicator [Seite 9] Test Print Indicator [Seite 10] Object Type (BOR) [Seite 10] Document Type [Seite 10] Status [Seite 10] Assigned Package [Seite 11] Documentation [Seite 12] Form Class Library Definition For each form class you have to define a form class library [Seite 16]. generated DDIC types are assigned to each form level by the Print Workbench. If the indicator is set for a form class. From a technical view.07. in application forms. for example.2011 Integration Form classes are a fixed component of an application and cannot be changed or replaced.

Object Type (BOR) Structure A <BOR object type> can be assigned to a form class. since the test print is an important tool for developing forms and for error analysis. The object key thus determined is interpreted as hierarchy access and transferred for further processing as the first entry in the first ranges table of the module EFG_PRINT [Seite 71]. It is used for information purposes and test printing. you should only suppress the test print in documented exception cases. the FIND method of the object type entered is called. For all form levels or 1:1 levels of the form class. The following objects and object statuses are considered and checked: ● ● ● The relevant form class library exists and is syntactically correct with regard to ABAP. However.07. correctness. This specification is optional and creates a logical link between the data hierarchy and a BOR object type in the system. since when you determine the initial object key for the test print. Print Workbench 690 10 .2011 Test Print Indicator Definition By setting the indicator Test Print. the obligatory READ and GET/FILL subroutines exist in the form class library. Status Definition The status of a form class indicates the completeness. or none is suitable. you can suppress the test print in the maintenance of an application form for an application. Document Type Definition The specified document type is optional and provides information about which document type is used for archiving documents of the form class. The DDIC structures assigned to a form level or 1:1 level are active. the dialog for the test print can also be carried out via a form routine in the form class library by the application. The BOR object type specified is used as link object in archiving with SAP ArchiveLink.SAP Online Help 13. If no BOR object type is specified. and usability of a form class with regard to use in application forms.

Integration Form classes are transported in the correction and transport system using the transport object EFCL. Package Assignment and Transport Use During creation you have to assign a form class. the system issues corresponding error messages and the form class concerned is not transported. If this condition is not fulfilled. You can change the object catalog entry that arises for the form class later.07. Prerequisites To transport a form class it must be assigned to a transportable package.2011 If the Smart Form/PDF [Seite 9] indicator is set in the form class. the package controls the assignment and the transport. Print Workbench 690 11 . generated DDIC types) are transported via separate transport objects and each have separate package assignments. The system checks whether all referenced subobjects of a form class belong to the same package as the form class itself. The referenced subobjects of a form class (form class library. to a package. the system issues warning messages. If subobjects were referenced in a transportable form class. the system also checks whether all generated DDIC types specified in the form levels existand have the structure derived from the form class.SAP Online Help ● 13. The possible statuses are: ● ● ● Inactive Incorrect Active In the message log. you have to change the package assignment of the form class before the transport. Use The status of a form class is relevant for: ● ● Processing and activating application forms for a form class Transporting form classes The actions are terminated if the form class does not have the status Active. For each change to a form class. you can see the details of the status for the form class check. that is. and these subobjects are assigned to a local package ($*). If a form class was created locally. such as an ABAP program. after a transport request the system checks whether there is an entry for the form class in an open transport request. in package $TMP.

Form Levels Definition The form levels make up the main part of a form class. All of the form levels together. The form levels define the basic framework of a form class and data is added using the 1:1 levels. A form level represents an entity in the data model of the respective application. you can transfer the data declared in the form class to a form. The individual fields of a form level or 1:1 level are defined by an assigned DDIC structure. Integration The hierarchy is a major component of a form class. The fixed assignment of the form class in an application form means that the hierarchy defined in the form class is always the template for the hierarchy in the application form and is always compared to it. Each form level and 1:1 level represent a data structure that is dependent on data that is higher in the hierarchy in accordance with its hierarchical position. Structure The hierarchy consists of two node elements: The form levels and the 1:1 levels.07. The following figure shows the hierarchy of a form class using the standard example delivered. Print Workbench 690 12 . account or business partner. For each level there are subroutines (ABAP form routines) in the form class library that carry out encapsulated data selections in the relevant tables of the database. that is. Integration The documentation of the form class is defined as General Text in the system and you can access it via the form class.SAP Online Help 13. There you can configure the form as required. Using defined data areas. reflect the maximum quantity of data that an application supports for use in forms as standard. Use You transfer the hierarchy of a form class to the application forms. PWB_FLIGHT_NOTIFICATION. Hierarchy Definition You use the hierarchy of a form class to display and model the data of an application or process. The form levels are related to each other in a 1:n relationship. This means that for each entry belonging to a particular form level.2011 Documentation Use In the documentation of a form class you can define information about the data hierarchy and other special features of the form class. for example. all nodes of the hierarchy. there are n entries in the form level below it in the hierarchy.

the execution of a data loop is always connected to a form level. This GET subprogram procures the n data records of the relevant form level dependent on the current data record of the next highest form level so that this can also be processed. Typical examples for 1:1 levels are the long texts (explanatory texts) for each of the entities. you can choose between the following strategies: ○ All the data for a form level is procured in the relevant READ subprogram and defined in the global table.07. Structure The attributes of a form level contain the following information: ● ● ● ● Name of the form level Assigned DDIC output structure or DDIC table Short name Name of the DDIC structure or table type generated if Smart Forms are active in the form class For each form level there are exactly two ABAP subprograms in the form class library: ● READ subprogram The READ subprogram procures the initial data and is called up once at the start of form processing. this means that data buffering is strongly recommended. the data is temporarily stored in these areas.2011 Use In application forms.SAP Online Help 13. you have to decide which strategy to use based on the data constellation and program design. When you are developing a form class. Form levels and 1:1 levels represent a logical or business entity. GET subprogram There is one GET subprogram for each form level. Print Workbench 690 13 . The affiliated READ subroutine is empty. They have a unique and direct relationship (1:1) to their affiliated form level. When you use the subprogram types. in texts. form levels are used to select the data belonging to the form level. for example. In the GET subprogram you procure the current data for the form level from the database directly or from other filled data buffers. you should make sure that GET subprograms can be called up more than once in an application form. The READ subprograms of a form class are called up in the application form in the order in which the related form levels exist in the hierarchy. Global data areas are derived from the name of the form level (WA_<name of form level>). The GET subprogram extracts the n data records required for the current run from the global table. The data selected is placed in global data areas and can be accessed in application forms. ● ○ 1:1 levels Definition The 1:1 levels are directly assigned to the form levels. With regard to performance. A 1:1 level is dependent on the form levels to which it is assigned since the selection criteria for access to the database are in the data already imported for the superordinate form level. Since form levels represent a 1:n relationship between data.

In each run. for example. 4. The complex data type is filled for Smart Forms. each entry for this level equates to a document. The highest form level (also called document level) is very important. Features The system processes the form level according to the following principle: . you can. The current form level entry is imported 2. 1. There must always be an application form for this.. these can then be accessed in texts or user exists in the application forms. The hierarchically subordinate form levels are processed. Example The process logic is described in more detail using the example PWB_FLIGHT_NOTIFICATION. In the application form.SAP Online Help 13. Print Workbench 690 14 ..07. insert additional events (for example. Using this process definition. Structure Logic of the Hierarchy Use The hierarchy of the form class is the tool used to model the dependencies of the data areas and the structure logic for the print transaction.2011 The name of a 1:1 level and the DDIC structure below it is defined in the corresponding form class and cannot be changed. the relevant data for the levels is placed in the global work areas (WA_<name of form level>) of the form class. printing a text or calling a user exit) between events 2) and 3) and between 3) and 4). Data from the appropriate 1:1 levels is imported 3. the hierarchy tree is processed recursively from top to bottom. The structure logic cannot be used in the form class itself.

printing a text or calling a user exit) are added to this hierarchy. Since the form level has no further dependent form levels or 1:1 levels. In application forms.SAP Online Help 13. 5. This is necessary.07. if you want to access the same data in different sections of the form. This means the same form levels can appear several times running in the hierarchy. The flight belonging to the current flight booking is read and placed in the work area WA_FLIGHT. You can also process the same form levels several times running in application forms. All bookings for the current customer are imported and placed in an internal table. 4. table SPFLI) for a posting that contains additional information about the unique flight of the posting. 2. There is a 1:1 level posting (FLIGHT. table SBOOK) represent two form levels. Processing of the form level BOOKING begins. This hierarchy is processed as follows: . 6. If all postings have been processed for the current customer. table SCUSTOM) and his postings (BOOKING. for example. This flow logic can be expanded to any number of form levels. Since the form level CUSTOMER has no 1:1 levels.. the processing of the relevant form levels continues. The document is completed and the processing returns to processing step 2. Print Workbench 690 15 . A customer is read from the internal table and archived in the global work area of the form level (WA_CUSTOMER). a new document is opened. At the same time. They have a 1:n relationship since one customer can have several postings. The number of entries in this table is identical to the number of documents created later.. 3.2011 The customer (CUSTOMER. further events (for example. All customers fulfilling the initial selection criteria are imported and placed in an internal table (T_CUSTOMER). the processing of the next posting continues. 1. the processing of the form level BOOKING for the current customer is completed.

This tool enables you to understand the print processes and you can use it for developing form classes and for implementing application forms.the form class library has the status of an ABAP/4 (Online) program.for example in order to be able to ensure a correct syntax check .07. The generated data declaration area is not transferred. In addition. However. Structure A form class library has the following content: ● ● ● ● ● READ and GET subroutines for the form levels READ and FILL subroutines for the 1:1 levels Other subroutines Area for own data declarations to be transferred to print program Generated data declaration area (cannot be changed) For technical reasons . the form class library copies all subprograms into the print program. Print Workbench 690 16 . In particular.2011 Source Text Display of the Form Class Hierarchy Use The source text display enables you to display the processing in a hierarchy in the way it appears later in the generated print program of an application form.SAP Online Help 13. When you generate a print program. the area with its own global data declarations is also copied. Form Class Library Definition The form class library is an ABAP/4 program. the program does not contain any functions that you can run. The name of the program is defined in the attributes of the form class. the dependencies of the different levels and call events of the subprograms are visible. Each form class has its own library. it is regenerated in the print program. Features All of the parts of a generated print program are displayed schematically: ● ● ● ● Global data declarations READ subprogram call Start/end of document The calls of the GET subprograms recursively integrated in the data loops In the list you can double-click in the displayed subprograms and variables to navigate from the form class library.

Both have the DDIC table structure that is defined in the attributes for the level. a global work area and a global internal ABAP/4 table are defined. *******************global workarea declarations************************* DATA: WA_CUSTOMER DATA: WA_BOOKING DATA: WA_FLIGHT TYPE SCUSTOM TYPE SBOOK TYPE SPFLI . Print Workbench 690 17 . for example. The total of all global work areas represents the maximum data list for an application form. It is executed just once at the beginning of the print program. you can use global data areas (WA_*) that are at the same hierarchical level or higher. WILL NOT BE TRANSFERED TO PRINT PROGRAMS** ************************************************************************ … *******************global table declarations**************************** DATA: T_CUSTOMER TYPE TABLE OF SCUSTOM WITH HEADER LINE.07. They are update with every change in the form class hierarchy. In application forms. *§*end*******END-OF-GENERATED-CODE************************************** READ Subroutines Use A READ subroutine exists for each hierarchy level of a form class. They represent relevant data interfaces used. . the internal table T_<level name>. This READ subroutine is used for reading the data from the database. The applications are responsible for initializing the generated data areas. data is retained. DATA: T_FLIGHT TYPE TABLE OF SPFLI WITH HEADER LINE. DATA: T_BOOKING TYPE TABLE OF SBOOK WITH HEADER LINE. The naming of the global work area follows the convention WA_<level name>. . Example Source text of the form class PWB_FLIGHT_NOTIFICATION *§********************************************************************** *****THE FOLLOWING CODE IS GENERATED. NEVER CHANGE IT MANUALLY********** **DATA ONLY FOR SYNTAX-CHECK. the work areas are particularly important. in SAPscript texts for a user. For the subsequent print process. 1:1 levels are at the same hierarchical level as the related form level. Since the generated print programs consist of function groups. particularly for multiple calls.SAP Online Help 13. Integration The data declarations are generated by the Print Workbench automatically in a data area defined for this purpose.2011 Automatically Generated Variable Declarations Use With each form level or 1:1 level.

You can follow two strategies. During the call. you have to decide which strategy to use based on the data constellation and program design.07. Use GET subroutines are used to procure the n data records for a form level dependent on the data of the next highest form level. ● When you are developing a form class. Within the READ subroutine however. There is no GET subroutine for the document level as loop of the hierarchy. The n data records determined are processed sequentially in the generated print program. READ subroutines are at the start of a print program. and called up once only. you only have to extract data from the internal global table T_BOOKING. GET Subroutines Definition With the exception of the document level. and the name of the form level itself. Structure The interface of a GET subroutine contains the variables that are set as prerequisite or result for the call in by the Print Workbench in accordance with their hierarchical position. the name of the next highest form level. Example The source text of the GET subroutine of the form level FLIGHT is as follows. the GET/FILL subroutines can also be used for reading data from the database. *&---------------------------------------------------------------------* *& Form get_form GET_CUSTOMER_BOOKING *&---------------------------------------------------------------------* FORM get_customer_booking TABLES yt_booking STRUCTURE sbook Print Workbench 690 18 . ● All the data for a form level is obtained in the relevant READ subroutine and defined in the global table. the calls of the GET subroutines are dependent on the hierarchy in the application form. The data records received are then processed sequentially. Since the posting data is read from the database in the READ subroutine. Integration The GET subroutines are then called in the generated print program of an application form if a form level is to be processed according to the hierarchy of an application form. exactly one GET subroutine belongs to each form level. you can use all global data areas (<T_*> or <WA_*>) of the same form level or all form levels higher in the hierarchy.SAP Online Help 13. The affiliated READ subroutine is empty. In the GET subroutine you procure the current data for the form level from the database directly or from other applicationdefined data buffers.2011 In addition to the READ subroutine. the GET subroutine then extracts the data records from the table that belong to the current entry of the next highest form level. The name of the GET subroutine is composed of the prefix GET. The GET subprograms are copied to the print program when you activate an application form.

Use There is exactly one FILL subroutine for each 1:1 level. the name of the relevant form level. Integration The FILL subprograms are then called in the generated print program of an application form if the related form level is processed. you only have to extract data from the internal global table T_FLIGHT. Within the READ subprogram however. Just as with the GET subprograms. "GET_CUSTOMER_BOOKING TYPE scustom. 13. LOOP AT t_booking WHERE customid = x_customer-id. Since the posting data is read from the database in the READ subprogram. The name of the FILL subprogram is composed of the prefix FILL. READ TABLE t_flight INTO y_flight WITH KEY carrid = x_booking-carrid TYPE sbook TYPE spfli .2011 FILL Subroutines &DEFINITION& There is exactly one FILL subroutine for each 1:1 level. you can also use the global variables of the 1:1 level higher in the hierarchy. READ subprograms are at the start of a print program. you can use all global data areas (<T_*> or <WA_*>) of the same form level or all form levels higher in the hierarchy. and the name of the 1:1 level. that is. ENDFORM. ENDLOOP. Example The source text of the FILL subprogram of the 1:1 level FLIGHT is as follows.SAP Online Help USING x_customer REFRESH yt_booking. if the data records belonging to the form level are processed sequentially. If 1:1 levels are beneath one another hierarchically.07. the calls of the FILL subprograms are dependent on the hierarchy in the application form. The FILL subprograms are copied to the print program when you activate an application form. APPEND t_booking TO yt_booking. Print Workbench 690 19 . This FILL subprogram provides the relevant 1:1 level data for the current data record of the relevant form level. *&---------------------------------------------------------------------* *& Form fill_form FILL_BOOKING_FLIGHT *&---------------------------------------------------------------------* FORM fill_booking_flight USING x_booking y_flight CLEAR y_flight. and called up once only. Structure The interface of a FILL subprogram contains the variables that are set as prerequisite or result for the call in by the Print workbench accordance with their hierarchical position. The FILL subprograms return the data record of the 1:1 level belonging to the current run. you can also follow both of the strategies described above for the data procurement for FILL subprograms.

This means if: ● A BOR object type is specified in the form class and the object key of this BOR object type is queried via the FIND method and then inserted in to the first line of the ranges table of the module EFG_PRINT. Structure The TOP area is restricted by the following comment lines in the form class library: *&********************************************************************** ***The following code WILL be transported to print programs************* *************PUT HERE YOUR OWN GLOBAL DATA****************************** *type-pools .2011 Global Area for Own Variables Definition If an application requires its own global instructions (for example. " own type-pools " own global data *&*end******END-OF-OWN-GLOBAL-DATA************************************** Do not change the restricting comment lines generated for the TOP area of the form class library. include. The implementation of the subroutine is optional. *data: . however. data. The test print is only possible if the form class supports it. This means that the instructions are valid for all subroutines.. ENDFORM.. you cannot change the frame generated. Subroutine TEST_PRINT Use You can use the test print with real data for checks during form development and maintenance and for the analysis of errors during data procurement of the form class.. The application implements the subroutine TEST_PRINT and specifies the input parameter for the module EFG_PRINT in the subroutine (for example. The comments are generated by the Print Workbench during creation of the form classes.. ● Integration The subroutine TEST_PRINT is called up from an application form for a test print. you have to define the corresponding instructions in a specific area of the form class library. type pools).07. The READ subroutine of the document level must be able to process this information. The area has unique limit characters and relevant comments. via own value queries).. Use The instructions defined for an application form in the TOP area are copied to the corresponding TOP include of the function group when the print program is generated.. Print Workbench 690 20 .SAP Online Help connid = x_booking-connid. " FILL_BOOKING_FLIGHT 13.

set the export parameter y_found to X. Example *&---------------------------------------------------------------------* *& Form Testprint (Optional) * *&---------------------------------------------------------------------* FORM test_print TABLES yt_ranges STRUCTURE efg_ranges yt_ranges1 STRUCTURE efg_ranges yt_ranges2 STRUCTURE efg_ranges yt_ranges3 STRUCTURE efg_ranges yt_ranges4 STRUCTURE efg_ranges yt_ranges5 STRUCTURE efg_ranges yt_ranges6 STRUCTURE efg_ranges yt_ranges7 STRUCTURE efg_ranges yt_ranges8 STRUCTURE efg_ranges yt_ranges9 STRUCTURE efg_ranges USING y_found LIKE rfgen-kennzx y_cancelled LIKE rfgen-kennzx. When you have implemented the subroutine. Print Workbench 690 21 . If there is a termination by the user.2011 Activities Implement a dialog to determine an object key and place this in the ranges tables transferred such that you can use this information for the selection of relevant data in the READ subroutine of the document level. The implementation of the subroutine is optional. CLEAR y_cancelled . set the indicator y_cancelled to X. ***dialog for completion of ranges tables ENDFORM. ***always set this ! y_found = 'X' . If you always call up the Print Workbench once for each document.07. you can specify the complete archive parameters when you call up the module EFG_PRINT. Subroutine SET_ARCHIVE_INDEX Use The subroutine SET_ARCHIVE_INDEX sets the ID relevant for the archiving system. REFRESH yt_ranges . This has the same importance as the object key of the BOR object type used for archiving. however.SAP Online Help 13. The subroutine is called up in the generated module of an application form just before the processing of a document. you cannot change the frame generated.

The implementation of the subroutine is optional. leave frame untouched !!!) * *&---------------------------------------------------------------------* FORM set_archive_index .. Print Workbench 690 22 . The implementation of the subroutine is optional. It is called in the generated print program for the application form. The subroutine is called up in the generated module of an application form just after the processing of an individual document. Example *&---------------------------------------------------------------------* *& Form process_after_doc (OPTIONAL. Activities Implement the application-specific activities for the event specified above. however.SAP Online Help 13. "SET_ARCHIVE_INDEX Subroutine PROCESS_AFTER_DOC Use The subroutine PROCESS_AFTER_DOC is designed for carrying out an application-specific activity after a single document has been processed. Activities Implement the application-specific activities for the event specified above.. all data and form levels of the application form have been processed. leave frame untouched !!!) * *&---------------------------------------------------------------------* FORM process_after_doc. ENDFORM. you cannot change the frame generated. Example *&---------------------------------------------------------------------* *& Form set_archive_index (OPTIONAL. however.07. *** c-archive_index-object_id = wa_. At the time of the call. set the archive index to the value of the object key of the BOR object. * do something ENDFORM. "PROCESS_AFTER_DOC Subroutine PROCESS_AFTER_FORM Use The subroutine PROCESS_AFTER_FORM is designed for carrying out an applicationspecific activity after the application form has been processed. you cannot change the frame generated. The global data areas (WA_*) of the document level are filled in this event..2011 Activities In the global variable c-archive_index-object_id.

Prerequisites To terminate the print transaction.SAP Online Help 13. "PROCESS_AFTER_FORM Controlled Terminations in Exception Situations Use In the subroutines of the form class library exception situations may occur (for example. leave frame untouched !!!) * *&---------------------------------------------------------------------* FORM process_after_form. you can forward the corresponding message with the macro MAC_PRINT_CANCEL_REPEAT. unexpected data inconsistencies). checks. EZ) &4 to &7 – Message parameters 1 to 4 MAC_PRINT_CANCEL_REPEAT If a module called has triggered an exception in a subroutine with the macro MAC_MSG_PUTX..2011 Example *&---------------------------------------------------------------------* *& Form process_after_form (OPTIONAL. Terminations within GET or FILL subroutines end with the printing of the current form. *do something ENDFORM. Example CALL FUNCTION . the open form process is closed so that the next document can be printed in the mass run. The only parameter you have to specify here is the message type. E ) &2 – Message number (for example.’ABCDE’ EXPORTING … IMPORTING Print Workbench 690 23 . use only one of the two macros.07. where the printing of a form must be subject to a controlled termination. Therefore. should always be completed before a text is issued. but do not delete the texts printed in the form up to this point in the spool. All other message activities could disrupt the global print process. 100) &3 – Message class (for example. Procedure If you want to terminate the print transaction of an (application) form. such as for data consistency. call one of the following macros: ● MAC_PRINT_CANCEL In MAC_PRINT_CANCEL the error parameters are transferred in the macro parameters 1 to 7: ○ ○ ○ ○ ● &1 – Message type (for example. Controlled means that before leaving the print module.

Creating Form Classes Use You create a form class if you want to create standardized correspondence for an application or a process. form classes are themselves constantly developing.. or at least check them precisely since incompatible change could invalidate productive application forms. Result If a form class has the status Active.. 13.SAP Online Help … EXCEPTIONS NOT_FOUND OTHERS IF SY-SUBRC NE 0.2011 Processing Form Classes Purpose Creating and processing form classes Prerequisites To process a form class you have to ● ● ● ● Know the processes of the Print Workbench Have good ABAP programming knowledge Know the data model of the underlying application Have reconciled the data mode to the requirements of a document Process Flow Due to constant further development of the related application. In the following dialog box. 1. Once a form class has been created. 2. MAC_MSG_PRINT_CANCEL ‘E’ SY-MSGNO SY-MSGID SY-MSGID SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. In the menu choose Print Workbench Form Class name for the new form class and choose Form Class Process (EFCS).07. = 1 = 2. specify the name of the new form class library (ABAP program) and a short text. Procedure . you can use it for developing application forms. ENDIF. it should be applied and tested using your application forms. Since form classes represent interfaces. Specify a Create. you should avoid changes to the form class hierarchy or the assigned structures. If you also want to define the form class for using Smart Print Workbench 690 24 .

enter a transport request in the dialog box. Prerequisites Form levels are in a 1:n relationship to another. Same Level depending on 4. If you want to use a transportable package. Procedure ..2011 Forms or PDF-based forms (recommended) set the indicator Smart Forms/PDF. also enter the name of the generated structure and the generated table type. 3. 3. you can also select the package $TMP (= local object) and reassign the form class later if necessary. You should therefore buffer to reduce the effect on performance. you should use 1:1 levels. In the Print Workbench menu choose Form Class Process. Create the related READ and GET subprograms by selecting the symbols R and G in the hierarchy. these structures are in a 1:n relationship to existing form levels. choose the node type Form Level. If form levels exist. In the READ subprogram you can first read all the relevant data and can only fill the relevant subareas in the required internal table in the GET subprogram. However. Result The form class has been created. If you initially do not want to transport the form class. it does not have any form levels or a form class library.SAP Online Help 13. In the subsequent dialog box. the values in the global data areas are retained if you call a form or form routine again. Creating Form Levels Use You create form levels to add structures to the dataset of a form class. You now have to create form levels. the program is created automatically by the Print Workbench. 5. The new form level is inserted into the hierarchy. In the following dialog box. This relationship should always agree with the actual relationship in the data model – otherwise the hierarchy has a design error that has a negative effect on the use in application forms and the enhancement of the form class. You can output the remaining fields later if required. and the related subprograms together with the form class library. Since the generated programs are function groups. you can procure all the relevant data in the GET subprogram. 2. Choose Continue. Enter a short text and the output structure. 1:1 levels. 1.. Choose Edit Create Lower Level or Edit Create the hierarchical relationship of the new form level. In the READ or GET form routines. Choose Continue. You are responsible for initializing the global data area <WA_*>. Note that you can call the GET subprograms several times. If the form class library has not been created yet. choose a package for the form class. Alternatively. If the indicator Smart Forms is set in the attributes of the form class. enter a maximum ten character name for the form level and if necessary. 4. place the cursor on an existing form level. The name of the form level is binding and unique within a form class and should be fitting. This means that for n=1. implement the coding for procuring the relevant data for the form level. Print Workbench 690 25 .07.

you can specifically use actual data from the system without having to create a time-consuming test case with integration in an application process. You should therefore configure each form class accordingly. The new 1:1 level is inserted into the hierarchy at the relevant point. In the READ subprogram you can first read all the relevant data and can only fill the relevant subareas in the required internal table in the FILL subprogram. Result You have created a 1:1 level and implemented the relevant data procurement in the relevant subprograms of the form class library.2011 Result You have created a form level and implemented the relevant data procurement in the relevant subprograms of the form class library. Note that you can call the FILL subprograms more than once and should therefore buffer so that you do not affect performance. Prerequisites The data must be in a 1:1 relationship to the data of the relevant form level. Enabling Test Prints Use You can use the test print in the application form for development and later for the error analyses in the application form or the form class. Print Workbench 690 26 . Choose Continue. Procedure . Assign a new maximum ten character name for the new 1:1 level. implement the coding for procuring the relevant data for the 1:1 level. Choose 1:1 level as node type and specify the output structure. To do this. the Print Workbench creates the program automatically.. Alternatively. 3. you can procure all the relevant data in the FILL subprogram. Create the related READ and FILL subprograms by selecting the symbols R and F in the hierarchy. The name of the form level is binding and unique within a form class and should be fitting. Creating 1:1 Levels Use You create 1:1 levels to add to the data list for a form level.07. Place the cursor on a form level or a 1:1 level if the new 1:1 level is dependent on another 1:1 level. If the form class library has not been created yet. In particular. You can now include the 1:1 level in an application form and test that the subprograms work correctly. 2. You can now include the form level in an application form and test that the subprograms work correctly. The output structure must be a DDIC table or structure..SAP Online Help 13. choose Edit Create Lower Level or Edit Create Same Level. You can create additional form levels or 1:1 levels for the form level. 1. In the READ or FILL subprograms. Specify a name for the 1:1 level.

. Since a customer can have several bookings. All 1:1 levels are placed in the hierarchy beneath the associated form levels and can be displayed or hidden by clicking on them. In the attributes of a form class. Form class: flight notification PWB_FLIGHT_NOTIFICATION Confirmation for flight bookings  Customer Customer Form Levels  Booking Booking Flight Flight 1:1 Level This particular form class is attached to the CUSTOMER form level. invoice document). At the time of the test print.SAP Online Help 13.. Implement the subroutine TEST_PRINT [Seite 51] in the form class library such that it corresponds to the dialog for determining the initial object of the form class. specify a BOR object type.2011 Procedure To enable the test print. you have the following options: . Result You can carry out a test print of application forms for a form class. As return parameter the Print Workbench expects the RANGES tables transferred to the application form. The flight assigned to a flight booking is represented by the 1:1 FLIGHT level. Print Workbench 690 27 . The CUSTOMER and BOOKING form levels are in a 1:n relationship to one another. The form class (or the data procurement in its library) must be able to process this. Example: Flight Notification This is an example of the structure of a typical form class using the example of the form class Flight Notification. the Print Workbench uses the FIND method of the object type to determine an object key that is inserted in the first line of the RANGES table transferred to the application form. Additional flight details are stored in the flight that is assigned to a flight booking. this form level is below the level CUSTOMER in the hierarchy. 1.07. 2. Form classes are also frequently attached to a document (for example. All flight bookings for one customer are shown on the BOOKING form level.

data procurement. The generated print program integrates: ● ● ● The SAP application Customer-defined configurations and implementations of user exits Calls of the components SAPscript. and PDF-Based Forms. The status of the application form provides information about whether the application form has no errors and can be run and whether the generated print program is up-to-date with regard to the application form and its subcomponents. but is extended. Smart Form. An application form is printed by calling the module EFT_PRINT that then calls the generated module for the application form. Smart Form. You can determine the form and scope of the data procurement as required and add your own data using user exits. you have to specify the form class. the form levels represent events in the flow logic of the form. you can no longer change the form class. in the case of SAPscript. Afterwards. SAPscript form. Structure The application form consists of: ● ● ● ● ● ● ● Properties/attributes Hierarchy Form (SAPscript.07. or PDF-based) SAPscript texts (SAPscript) User exit includes User top includes Generated print program The core of an application form is the hierarchy. and the form layout. the call of texts. In the events you can define further activities. In the context of application forms. Integration An application form is closely linked with the related form class and integrates the data model and the related data procurement of the application with the requirements of the SAP customer.SAP Online Help 13. you have to configure application forms. This has a similar function to the form class. The form class assigned to an application form determines the structure of the data delivered by SAP. this provides a form class that you have to set as attribute in the application form.2011 Application Forms Definition Application forms are configuration objects and integrate the data structure defined in the relevant form class. Print Workbench 690 28 . Use If standardized correspondence is to be created from an application process. You can also choose between the basic tools for creating the form layout – Smart Form. Application forms are usually defined in Customizing tables or master data in the application. If the application uses the Print Workbench as configuration tool. the form logic you have determined. When you create an application form. such as the call of a user exit or. or PDF-based form.

they are independent of the hierarchy and form levels. Form Classes Definition The form class of an application form contains the data hierarchy and the relevant access coding that belongs to an application for creating a form.SAP Online Help 13.07. The names of these data structures are defined in the form levels of the form class. that is. depending on their position in the hierarchy they can be processed or printed. The form classes are delivered by the applications. In the case of SAPscript. static settings. different functions and options are offered for the form processing and form printing. Use Form classes are used in application forms.2011 Properties and Attributes Definition The attributes of an application form contain all the relevant. This setting is obligatory and cannot be changed once you have created the application form. Print Workbench 690 29 . In the case of Smart Forms and PDF-based forms. data is placed in the generated data structures and transferred to the Smart Form assigned. Use The following form types are possible: ● ● ● ● SAPscript Smart Form PDF-based form Collection Depending on the form type. Form Types Definition The form type of an application form controls the configuration and output of a form. texts are assigned to the hierarchy of an application form. A collection is a grouping of different application forms that are printed or output combined sequentially per call from the application (for example. in the form of an e-mail with attachment).

Use Data instructions (for example. different application forms can reference to the same user include from different clients. The interfaces between the application form and the form used depend on the type of form and must be reconciled with one another. that a user include or Print Workbench 690 30 . and PDF-based forms are integrated in the configuration of the application form. SAP Smart Forms. deletion. Integration SAPscript forms. the user exit subroutines are defined in the USER-EXIT-INCLUDE. pages.SAP Online Help 13. you can enhance the function and dynamics of an application form as required. consistency checks. either a Smart Form. Smart Forms. copying. Since user includes are client-independent as ABAP program objects. The ABAP implementations required are stored in customer-defined includes in the USER-EXIT-INCLUDE and the USER-TOP-INCLUDE.sap. see SAP Help Portal at help. Smart Form. This means that the data is read and the program interfaces of the layout tool are called for the events defined. The application form controls the print transaction. User Includes Definition Using ABAP programming. Use The application form and the related SAPscript. a SAPscript form.and type-justified interface parameters for transferring the selected data: ○ ○ PWB_DATA or the name of the generated DDIC type at document level Data declarations in user top includes For detailed information about SAPscript.com Documentation SAP NetWeaver SAP NetWeaver Release/Language SAP NetWeaver Application Platform (SAP Web Application Server) Business Services PDF-Based Forms. DATA: TOTAL TYPE <Data type>) are implemented in the USER-TOP-INCLUDE. Smart Forms. creation. ● SAPscript ○ ○ ● Window (used in the attributes for text nodes) Form level symbols (WA_*) used in texts Smart Forms and PDF-based forms Name. or PDF-based form are reconciled with one another during the print transaction. windows. Note therefore.2011 SAPscript Form/Smart Form /PDF-Based Form Definition Depending on the form type. or a PDF-based form is defined in the attributes of an application form.07. SAPscript (BC-SRV-SCR). under certain circumstances. paragraph formats) for preparation of the form to be printed. and PDF-based forms. The names of both ABAP includes are defined in the attributes of an application form. and upload/download take place in the processing of the application form. The form contains all relevant layout information (for example. which means that navigation.

Print Workbench 690 31 . Integration The subroutine for the start-exit is called up in the generated print program at the start of form processing before each activity that affects a form. You can use the exits to carry out initial or closing processing. The name of the subroutine is composed of the prefix USER_EXIT and the name specified in the attributes of the application form. after loop). to all data areas generated by the Print Workbench or own data defined in the user top include. The user exits defined in the user exit include are called in the defined events for the form levels (for example. Use The use of these exits is optional.SAP Online Help 13.07. Here all of the activities that affect the form have been completed. Optional Static User Exits in Generated Print Program Definition In addition to the user-defined user exits. call OPEN/CLOSE_FORM modules) since this can lead to errors in the internal form control. In the user exits. Structure The start/end exist is an ABAP subroutine. Integration The user includes are included in the TOP included in the generated function groups of an application form. The end exit is called at the end of the form processing. Start/End Exit Definition To carry out initial and closing activities pre document. before. You can also define and call other user-defined form routines. Here all static. the generated print program contains further static user exits that you can specify in the user exit include in the configuration of an application form. They can refer. you must carry out form activities (for example. you can define a start/end exit in addition to the user exits of the form levels and the text nodes. as in all user exits. Use Static user exits fulfill functions that are independent of the actual data procurement and processing of the hierarchy. Both subroutines have no interface parameters. globally defined Print Workbench variables (C-*) and print parameters have been set.2011 referenced application forms can be changed or invalidated by unintentional changes as part of maintenance of other application forms. during.

● FORM EXIT_BEFORE_PRINT This form is called immediately before the call of a generated module of an individual SAPscript form. There you can modify the import parameter c-pdf_output_options TYPE SFPOUTPUTPARAMS of the module FP_JOB_OPEN.2011 Structure Static user exits are subroutines that have no parameters. You can determine the application form for a generated module or for the function group with the same name with the Persistent Garbage Collector (CA-GTF-TS-PCG) in the Print Workbench menu. At this point. Smart Form. This function group contains all of the settings defined in the application form in the form of coding. The function group and the module are always defined locally ($TMP). Smart Forms. PDF-based forms) that are responsible for the data procurement and processing and. form class. There you can check the uses of generated modules and delete modules no longer used. At the time of activation. You have to regenerate the module for each change to the application form or one of the referenced objects (for example. The Print Workbench gives the name of a user exit. enter the same name. The call takes place exclusively in module EFG_PRINT. creates corresponding calls from the generated print program. or PDF-based form. the application data from the application form or from the form class has not been read yet. see the documentation for the Persistent Garbage Collector [Extern] Print Workbench 690 32 . and performs the user exits. a function group with exactly one function module is generated. the name is different for each application form in each system and client. For more information. the application data from the application form or from the form class has not been read yet. Generated Modules Definition When you activate an application form. user includes). For each application form. place the form in the spool of the SAP system.SAP Online Help 13. You can use the following static user exits: ● FORM CHANGE_SF_OPTIONS This form routine is called immediately before the processor for Smart Forms is opened. for example. A nonPrint Workbench use of the generated module is not permitted. which is called in the print event of an application. The generated module contains all ABAP commands and function calls of the form processing (SAPscript. There you can modify the import parameters of the module SSF_OPEN (if necessary) with ABAP programming: c-sf_control_parameters_ TYPE SSFCTRLOP c-sf_output_options TYPE SSFCOMPOP At this point. At this point. Use The generated module is called if the application form is to be printed.07. the Print Workbench recognizes the existence of the subroutines. ● FORM CHANGE_PDF_OPTIONS This form routine is called immediately before the processor for PDF-based forms is opened. the application data from the application form or from the form class is read completely. Customers can define them in the user exit include.

Integration The languages defined are an integral part of the application form and are transported between systems.07. FILL subroutines) Calls of the program interfaces for SAPscript. Activities To translate application forms. specify the relevant language under Extras Language Select. If you also want to print the form in other languages. Features When you create an application form. The name is different in each system/client and has no self-explanatory semantic. Print Workbench 690 33 . To ensure that the print transaction works without any errors. the client. The definition of an application is not language-dependent. SAPscript form) for all languages used. In order to maintain the SAPscript form and the texts in languages other than your logon language. In the translation transaction the languages are created automatically. If a language is used in which texts or the SAPscript form are missing. To do this. or the language is not defined in the list for the application form. for each application form you can define a list of languages (except the maintenance language) for which the document can be printed. However. you use the translation tools of the Print Workbench. you have to define languages within application forms.2011 Structure The generated module integrates the following parts of an application form: ● ● ● ● The flow logic of the application form according to the hierarchy Data procurement from the form class (call of READ. The language only refers to the languagedependent components (for example. Call of user exit from user include The name of the generated module is composed of the naming convention prefix of the Print Workbench /1PWB/. If you wish to change the language interactively for each application form. Every other (for example. direct) call of the module is not supported by SAP. and a number composed of the date and time of the first generation. Languages Use To create outgoing correspondence in different form languages. choose Extras Language Create. Smart Form. GET. and PDF-Based Forms. standard texts). you first have to add the language to the language pool. the language in which you log on to the SAP system is always set in the pool. printing is immediately terminated. you have to set the internal language variable c-langu in the start exit. Integration The generated module is called up dynamically in the module EFG_PRINT exclusively. You have the following options for printing in different languages: ● ● The language is set at the start of the print process by the application in question and then retained. make sure that you have maintained all language-dependent components of the application form (texts.SAP Online Help 13.

SAP Online Help 13. The Hierarchy of an Application Form Definition The hierarchy of an application form covers all of the information about the relationships of the data belonging to the form levels. Integration The following (sub)objects determine the status of an application form: ● ● ● ● Application form (attribute. If no module has been generated from an application form. hierarchy. Use The hierarchy describes the flow logic of an application form. the status is set to Inactive. attribute. or form interface) When the module is generated.07. You can only print print programs with status Active. or T) Texts for form type SAPscript (SAPscript standard texts) The following figure contains the schematic display of the hierarchy: Print Workbench 690 34 . PDF-based form. form levels) Form class (hierarchy. form class library) User includes (user top include. B‚ D. A.2011 Status Use The status of an application form is defined by different system conditions and different statuses of the application form objects involved. The print program that is called dynamically at runtime by the module EFG_PRINT is generated from the structure of the hierarchy. Structure The hierarchy consists of: ● ● ● ● ● ● Root level (= attribute of the application form) Form levels Document level (= first form level) 1:1 levels Placeholder for user exits (for example. user exit include) Status of form elements (Smart Form. form levels. The hierarchy also defines a flow logic that is used to process all form levels and 1:1 levels and the data linked to these from top to bottom in the generated print program. the current version information of this subobject is written into a local table and then used for determining the status. If one of the above-mentioned subobjects is changed. the form has the status New. It shows whether the generated print program is up to date with regard to the application form and the relevant subobjects.

SAP Online Help The Hierarchy of an Application Form 13. If you use SAPscript. Integration The hierarchy of an application form is the basic configuration for the generation of the print program. If a form level or 1:1 level is not required for printing. For each form level and 1:1 level there is a global variable (work area) which you can access both in texts and also in user exits. WA_CUSTOMER). it still appears in the hierarchy but is no longer considered for printing. a form level was deleted. if. you can delete it or deactivate it. this document level must not be placed equal to another level. The name of the work area is formed from the prefix WA_ and the name of the form level or 1:1 level (for example. If a form level is deactivated. these are printed according to their position. If the system determines inconsistencies between the hierarchy and form classes. In contrast to other form levels however. you can also assign additional SAPscript texts to the hierarchy. for example. The document level is of particular significance to the form levels. For this reason. you have to correct this before you can activate and print the application form. You cannot select or add form levels that are not defined in the form class. Print Workbench 690 35 .texts (only SAPscript)  BOOKING FLIGHT B D User-Exits Form level 1:1 level PWB_FLIGHT_BOOKINGS Line Items By selecting and activating form levels or 1:1 levels you can define which data is to be read.2011 PWB_FLIGHT_NOTIFICATION  Flight confirmation for customer Root level/ Attribute Document level Customer PWB_FLIGHT_HEADER_INFO PWB_FLIGHT_FOOTER PWB_FLIGHT_ADDRESS PWB_FLIGHT_INTRODUCTION PWB_FLIGHT_ITEM_HEADER PWB_FLIGHT_ITEM_HEADER Infor mation for customer Footer (number of pages) Address Letter for customer Heading for line items (MAIN) Heading for line items (TOP ) Booking Flight SAPscript . form class and name of the user exit include and the user top include. The document level is the first form level in the hierarchy and has almost the same attributes as any other form level.07. for example. the hierarchically dependent form levels and the affiliated 1:1 levels are also deleted or inactivated. Please note that when deleting or inactivating a form level. The hierarchy of an application form is always created following the structure of the underlying form class. the number of entries for this form level corresponds to the number of forms created. The root level contains logical data (attributes) for the application form.

However. In the texts. This means that for each entry in a form level there are several related entries for the form level below (for example. form levels at the same level have no hierarchical relationship to one another. together with the application form‟s general process logic. Here too the principle applies that siblings (levels at the same hierarchy level) are independent of one another. However. Print Workbench 690 36 . You can insert texts in the required position of the hierarchy. If you want to output a text for a form level. Texts (SAPscript Only) Definition Texts are a further node type in the hierarchy of an application form of the type SAPscript. The name of a 1:1 level and the DDIC structure below it is defined in the corresponding form class and cannot be changed.07. 1:1 levels Definition The 1:1 levels are directly assigned to the form levels. customer and his flight bookings). The name of a form level and the DDIC structure below it is defined in the corresponding form class and cannot be changed. They have a unique and direct relationship (1:1) to their affiliated form level. A 1:1 level is dependent on the form levels to which it is assigned since the selection criteria for access to the database are in the data already imported for the superordinate form level. Form levels that are hierarchically dependent on one another (parent-child dependency) have a 1:n relationship with one another. you have to enter this text in the hierarchy as a lower level of the form level. you can use the same form level more than once in the hierarchy (duplication). The texts contain the actual contents of the printed form. Form levels and 1:1 levels represent a logical or business entity. This situation is described in more detail in the next section. The hierarchical relationships of the levels are defined in the form class and cannot be changed. you can access all work areas (WA _<level name>) and your own variables that you define in the user top include.SAP Online Help 13. Typical examples for 1:1 levels are the long texts (explanatory texts) for each of the entities.2011 Form Levels Definition Form levels form the basic framework of the hierarchy of an application form.

4. As standard. the loop is left. Alternatively. The data loop over the entries of the internal table begins. if it is a form level. At document level. If the last entry for the current form level is reached. all global data areas of the related active 1:1 levels are filled in sequence.. Smart Forms. You can also use the global data areas of the superordinate form levels and the related 1:1 levels.2011 Flow Logic and Processing Definition of the Hierarchy Definition The application form is a configuration object that is translated in the generated print program in a processing and flow logic at runtime. The table determined is transferred to the user exit. Prerequisites: To use Smart Forms in an application form. The n entries for the current form level are determined for the current entry of the superordinate form level and place in an internal table. 2. For each form level in the application form. At the same time. 7. The exit after loop is called – if it exists. the form level is processed in the same way.. SAPscript is used for print preparation. The next entry in the loop is processed. the integration in the Print Workbench is also different. There you can evaluate and modify the table.07. you can use Smart Forms for the print output. you can use the form classes delivered in different ways. you have to activate the relevant form class for using Smart Forms (see documentation for the indicator Smart Forms in the attributes of the form class). The exit before loop is called – if it exists.SAP Online Help 13. the following steps are executed in sequence: . PDF-Based Forms Purpose In the Print Workbench. Interaction of Application Forms with SAPscript Forms. The exit during loop is called – if it exists. 5. The hierarchically subordinate nodes of the form level are processed. it contains the processing of other dependent form levels. the text is printed. a flow rule is defined for a form level. 1. Print Workbench 690 37 . the global data area (WA_<form level>) is filled with the current line. 8. You can use the global data areas of the superordinate form levels and the related 1:1 levels. In the loop. that is. Since both components are very different. 6. If it is a text (form type SAPscript). 3. additional form control orders are given to SAPscript or Smart Forms. In this user exit you can use and modify all global data areas of the form level and the related 1:1 levels. such as that a document is completed or a new document is starting. Structure The flow logic of an application form is defined recursively.

This means that the form is created interactively between the Print Workbench and SAPscript. The complex data type of the form class agrees with the hierarchy of the form class. For Smart Forms and PDF-based forms. The interface is created appropriate to the application form or the form class. but the data is no longer valuated for immediate output in the form. The SAPscript form assigned to the application form contains settings for the layout such as pages. Access to Data Read Use During the processing of the hierarchy. choose Insert Symbols Program Symbols and select the required symbols. The selected symbol is placed in the buffer and can be inserted again at any point. These work areas are the central interface of the hierarchy to the read data in the application form. the standard variables PWB_DATA and C are added to the form interface. You can also adjust the form elements automatically later using a corresponding help function in the application form. The name of the complex data type for the data transfer to the Smart Form corresponds to the assigned complex data type of the document level. In the generated print program the print transaction consists of alternative calls for data procurement and calls of the SAPscript form processor (for example.2011 Process Flow In the SAPscript scenario. window. the data is read from the database and placed in the global data areas in accordance with the form class definition as for SAPscript. the ● ● Print Workbench 690 38 . A new amodal window containing the form class hierarchy appears. OPEN_FORM. By double-clicking on one of the levels you can display the appropriate symbol. Alternatively. you can copy the symbol into the buffer by double-clicking on it in the list. All of the application form symbols that you can use based on the position of the text in the application form hierarchy appear. as described in point 1. there is one work area for each form level and each 1:1 level and this has the name WA_<Level name>. It is firstly saved in a complex data structure also provided by the form class. the system can create the corresponding form object for an application form automatically. font. WRITE_FORM_LINES). Choose the symbol you want to transfer and choose Enter. The texts are inserted in the hierarchy of the application form and are called up at runtime in accordance with their position in the hierarchy. The nesting of the data is reflected implicitly by a complex data structure for each form level. or on a form level or 1:1 level. START_FORM.SAP Online Help 13. the Print Workbench provides the global data areas of the form levels and 1:1 levels defined in the form classes by the application. The name of the parameter in the form interface must be PWB_DATA. Features In the print program. Place the cursor on the text. Unlike in point 2. The data is transferred from the global data areas to the complex data structure when the text is output for SAPscript. Choose Utilities Display Hierarchy. Select the symbol you require from the list and choose Enter. and choose Extras Display Symbols. The data written in the complex type is controlled by selecting or deactivating form levels and 1:1 levels. these can be accessed in texts with the usual symbol logic for SAPscript. In Smart Forms and PDF-based forms. data is stored in the global work areas.07. You have several options for inserting symbols into a text: ● In the SAPscript text editor. paragraph formats.

Structure The variable C consists of two parts. When you double-click on the table. The character & at the beginning and at the end of the instruction distinguishes SAPscript symbols (variables) from normal text. However. It contains technical data for the application form or the print environment that is relevant for the current print transaction. See also Flow Logic of the Hierarchy [Seite 14]. The first part is transferred to the Smart Form. To do this. In our example.2011 selected symbols are not copied directly to the buffer unless you choose Copy to Buffer. To output the customer number of the current business partner. You can see from the attributes of the form level that the table SCUSTOM is masked by CUSTOMER. the work areas are: ● ● ● WA_CUSTOMER WA_BOOKING WA_FLIGHT In these work areas you can access the texts and the user exits. The global data area that you can access in a text or a user exit depends on the position in the hierarchy. you can see that there is a field ID that contains the customer number. you must include the symbol &WA_CUSTOMER-ID& in the text. The search includes both the names of the variables and their short text. You can ascertain the dictionary structure concerned in the attributes for the relevant form levels or 1:1 levels. The Smart Forms and PDF-based forms contain own methods for accessing the data in the data categories packed. in this case. The variable is replaced with the current content in the print program at the time of printing. A table or structure from the ABAP Dictionary is hidden behind each work area. Example In the example above.07. place the cursor on a form level and choose Find Variable. You can also carry out a cross-level search. TELEFAX)) Print Workbench 690 39 . the global variables WA_* are still available for use in user exits.SAP Online Help 13. Control Variable C Definition The control variable C is a global variable that exists in each application form. All the variables found are listed. Use The variable C enables you to request global information for the application form or the print environment so that you can interpret and process this information either locally in the form or externally. The variable has a fixed structure and is defined globally which means that it can be queried at any time in texts or user exits. This corresponds to the DDIC structure EFG_STRN_PRINTDATA: Field LANGU DEVICE Name Current language for the form Current output type (PRINTER. the customer‟s number is to be printed in the text PWB_FLIGHT_BOOKINGS.

BOR object ID.SAP Online Help 13.2011 RDI FORMKEY FORMCLASS ITCPO ARCHIVE_INDEX COMM_TYPE SENDTYPE SENDTYPE_EXT COPYFLAG TESTMODE ITCPP SAPscript indicator for RDI Current application form Current form class Input print parameter for SAPscript as ITCPO structure Parameters for archiving (BOR object type. RML) send type External send type Document is a copy Test print Print parameter returned by SAPscript as ITCPP structure XSF indicator for print using Smart Forms: Name of collection (if integrated in a collection) Identification from collection (if integrated in a collection) Returns data on the caller Parameter specified by the application for controlling print-relevant parameters Output format of PDF-based forms XSF COLLECTION IDENTIFICATION GET_PWB_DATA ADDITIONAL_PARAM XFP The second part of the variable contains further fields: Field TABIX LINES FORMTYPE NO_ENTRY PA_PRINT PA_UPDATE FORM_LEVEL LEVEL_NUMBER RDI_RESULT SAP_FORM SMARTFORM T_LANGU REC_STRING Name Count variable for the current loop Number of entries in the current loop Form type (Smart Form of SAPscript) Last form level has no entry Print action records should automatically be printed. FAX. Print action records to be updated Current form level Number of form level if multiple selection in the hierarchy SAPscript return structure if RDI has been used Name of SAPscript form Name of Smart Form Table of valid languages Recipient for send type (e-mail address.07. user name) Print Workbench 690 40 . archive object type) BCI send type (INT. fax number.

Processing Application Forms Purpose To create outgoing correspondence. user name) Client of form RDI indicator Indicator whether Smart Form is to be called Indicator whether the data is to be filled in the complex data types (default „X‟) Return result of Smart Form call (structure SSFCRESCL) SF_OUTPUT_OPTIONS SF_CONTROL_PARAMETERS Output options for Smart Forms (structure SSFCOMPOP) Smart Forms: Control structure (structure SSFCTRLOP) You can use the variable C at any time in texts (for example. 1. It is filled by the print program and interpreted later for further processing. or PDF-based form. or PDF-based form. Smart Form. Smart Form. Result When you activate an application form. 4. SAPscript form.07.SAP Online Help 13. the print parameters in CITCPO. The form is only available for printing once it has been activated. You can also change the variable. Maintain the SAPscript form. this generated function module is processed. &C-TABIX&) or in user exits. for example.2011 SEND_STRING MANDT RDI SMARTPRINT SMARTFILL SF_RESULT Sender for send type (e-mail address. Process Flow To create an application form. user includes). You can display a complete list of all fields by displaying the structure EFG_STRN_PRINTDATA_EXPANDED in the ABAP Dictionary. to query the form type. Integration The variable C is globally defined in the generated print program. 3. for example. you must first create the required application form. Via Extras Display Control Variable. however. 2. you can display the most important fields of variable C.. this is only recommended in a few cases. Insert the text nodes in the hierarchy and maintain the texts (only for SAPscript). Implement user exits. a print program is generated in the form of an ABAP function group and a function module. proceed as follows: .. Print Workbench 690 41 . If the application form is called in a print process of the application using the function module EFG_PRINT. fax number. The variable is also defined in the form class library and can be used there. Create an application form and name the subobjects (form class.

5. Create. 3. The application form is created.2011 Creating Application Forms Procedure . 1. You have inserted one or more text nodes in the hierarchy of the application form. 4. 1. In this case. or PDF-based form and activate it. 6... The complete hierarchy of the form class is inserted into the new application form. Edit the texts. Choose Integrate Symbols Program Symbols. consider the conventions and rules for assigning names. Choose the form category (SAPscript. Procedure . Depending on the form category. . You can now start adjusting the hierarchy to your requirements (for example. Place the cursor on the point where you want to insert the symbols. Now select the affiliated form class. If you have specified user includes. Edit the relevant SAPscript. see the naming conventions. 2. Inserting Variables in Texts (SAPscript Only) Use In addition to standardized formulations and headings. Pay particular attention to the hierarchical position of the text. Activate the application form. If you use SAPscript.. 4.. A list of all fields relevant for the text node appears. Again. Result You can now print the application form. 2. Prerequisites The SAPscript form for the application form is active. You can develop it further using the Print Workbench tools (for example.. For all objects. for example. By doing this. add text nodes to the hierarchy. If you want to work with user exits. and adjust it to your requirements. create the includes by double-clicking on the objects in the attributes of the application form. 3. The fields are displayed as symbols – they have a restricting & at the beginning and end. you assign the application form to an application. you have to integrate the data delivered by SAP in the text. Smart Forms.07. Process the required SAPscript text. test print).. 1. delete or deactivate form levels or 1:1 levels not used). If automatic recording of changes is active in the current clients. Choose Continue. the text module of a form contains data from the business process that triggered the printing of a correspondence. specify the name for the relevant form of the respective form tool. 2. Print Workbench 690 42 . specify the name for the relevant user includes. you have to specify a Customizing transport request.SAP Online Help 13. Enter the name of the new application form and select Application Form 3. You cannot change this assignment later. Choose Print Workbench Application Form Edit. or PDF-based form). Smart Form.

Specify a name for the exit before loop (such as INIT_SUM) and the exit during loop (such as PERFORM_SUM). 3.. (such as ADD WA_DOC_ITEM-NETTOBTR TO SUM). 7. Choose D to navigate to the exit during loop. Procedure .. 8. Place the cursor on the form level from which you wish to run the summation. Trigger the summation with the ABAP order CLEAR SUM. 4. DATA SUM LIKE WA_CUSTOMER-FORCURAM >). Activate the application form. Choose Continue.2011 5. 6. 1. SAP recommends that you first run the summation without text nodes in the form. the two symbols B and D (for “before” and “during”) now appear on the level on which the cursor is still placed. First choose B to navigate to the exit before loop. same level). Navigate back to the application form. you want to make the layout of the form dependent on the total. for example. Enter the summation order. 9. The fields include: ○ ○ ○ Fields of all global data areas (WA_*) Fields of the control variable C Variables defined in the user top include 13.SAP Online Help 4. 5. Choose Choose. Issue the total in the form by placing the symbol &SUM& in a text after the form level (for example. 2. Navigate back to the application form. Choose one or more fields from the list. Result The selected symbols are inserted in the cursor position. Result Summation is only performed if you print and it is then output in the text. In the hierarchy display. Choose Goto User top include Display/Process to navigate to the user top include. If you need the total before a text is printed.07. Creating a Summation Prerequisites A user exit include and a user top include are defined in the application form attributes. Determine the global data field the total is to be based on. Choose Continue. WA_CUSTOMER-FORCURAM. 10. 6. You can then issue the text using a second form level with the same name. Print Workbench 690 43 . Navigate back to the application form. for example. Define a summation variable (for example. if.

Choose Goto include. 6. during the processing of an application form. and do not want to (or no longer want to) process the subordinate nodes in the current run. Determine the DDIC table containing the required data. You should only define this macro in the exit during loop and text exit. This macro is not suitable for the exit after loop. This is also applicable if you use the data in another user exit. Place the cursor on the form level for which you wish to read additional data and choose Choose. Only use this procedure if you need data for form printing that the form class does not provide. Result You can use the additional read data as a symbol in a text. Choose Continue. Enter a name for the exit during loop. (for example. 2. ● Print Workbench 690 44 . Dynamic Intervention in the Process Flow in User Exits Use In user exists. on data or data constellations. As standard.07. 4. 1. Choose the symbol D in the hierarchy display to navigate to the user exit. mac_exit If you want to terminate processing for the current node.. you have to read the missing data from the database. SAP provides the following ABAP macros that you can call up in the user exits: ● mac_next If you are in the program loop of a form level. You can use all work areas (including 1:1 levels) that belong to the form level or are higher up in the hierarchy as selection criteria. you can make the process logic of an application form dependent. Enter the command that reads the data from the database.. SELECT * FROM <DDIC-TABELLE> WHERE). The text must come below the form level described above in the hierarchy. you can define the command mac_exit in the user exit. Proceed as follows: . It has no effect there. User top include Display/Process to navigate to the user top 3. 5. the concept of the Print Workbench is such that all data of an application or process is provided in the form class.SAP Online Help 13. in other words it must be a dependent node. for example. you can make the program branch to the next run by using the ABAP macro mac_next. Procedure In the Print Workbench. you discover that the dataset provided by the form class is not sufficient.2011 Reading Additional Data from the Database Procedure If. such as READ_DATA.

. and use them in the related Smart Form or PDF-based form. note the following rules: ● Deactivate or delete the form levels and 1:1 levels in an application form if you do not need them for form processing. Therefore. You cannot activate levels that are not named or are not active in the hierarchy. choose Edit Smart Form Compare or Edit PDF-Based Form Compare Form Interface. To do this. Fill these variables with runtime data using user exits at appropriate places in the hierarchy. In order to be able to activate a form level. 1. in programming. you can also generate the data definitions in a user top include automatically in the respective form interface. it is no longer required due to a specific data constellation. In addition to manual maintenance. Make sure that the data categories are identical.07. Optimizing Performance Use For mass printing. Print Workbench 690 45 .. 3.SAP Online Help ● 13. or the structures do not correspond to the respective aim. Result You can use your own global data of an application in a Smart Form or PDF-based form in the same way as the standard data transferred. mac_activate You can dynamically reactivate a form level (or 1:1 level) if it was deactivated by the macro mac_deactivate in a user exit. If you do not need the standard variables PWB_DATA and C in the form. In the interface of the Smart Form or in the form interface of the PDF-based form. you can remove them from the form interface. Define your own data as global variables in the user top include. When you call this macro. the level must be defined as active in the application form hierarchy. optimal performance in application forms during data processing is very important. regardless of where the macro is called. The Print Workbench indicates that the standard parameters are missing by issuing warning messages that have no consequences. you can define your own data areas in the user top include. for example. define import parameters with the same name as the variables in the user top include. otherwise errors may occur. Procedure .2011 mac_deactivate <Name> You can dynamically deactivate a form level (or 1:1 level) defined in an application form in a user exit if. This deactivation applies for all levels of the same name in the entire form. or they disrupt. ● Transferring Own Data to a Smart Form or PDFBased Form Use If the data defined in the form class is insufficient. the form level <Name> is no longer processed. 2. fill them in a user exit.

The entries of the following loop are transferred to the interface of the subroutine. such as summation. Integration User exits are defined in the form of ABAP subroutines in the user exit include of an application form. The interface of the subroutine contains an indicator (Y_PRINT_TEXT) that shows whether the text is to be printed or not. If you read data in user exits from the database. The reasons for low performance of processes are usually there. Features The following user exit types are available: Name of user exit Exit before loop Reference Form level Call/function The exit is called directly before processing of the entries for a form level. The exit is called after the loop over entries of a form level. in global data in the user top include). The exit is called at the end of processing for a form level. use user exits instead of ABAP similar control commands. The exit is called in the loop of entries of a form level.07. This is the last activity before the next same level or entry of the next higher form level is processed. SAP recommends that you also specify the Print Workbench 690 46 . User Exits in Application Forms Use If you want to access form processing and data procurement and realize other requirements. Avoid naming form levels twice in applications unless this is absolutely necessary and justified. SAPscript is a meta language whose processing is low performance. Exit during loop Form level Exit after loop Form level Text exit (SAPscript only) Text nodes Start exit End exit Application form Application form Activities Before you create one of the above-mentioned user exits. concentrate on the user exits that you have implemented. In user exits you can adjust application forms to your requirements and enhance your functions. interactively.2011 In SAPscript texts. store these in ABAP variables (for example. The exit is called directly before a SAPscript text is printed. With database and ABAP traces.SAP Online Help ● ● ● ● 13. you have to specify the user exit include in the attributes of the application form. (Default = Yes) The exit is called at the start of processing for a form level. These subroutines are called up in the generated print program according to their position in the hierarchy. The global data areas of the form level and the related 1:1 levels are filled with data in this event. you can use the existing user exit infrastructure of the Print Workbench in the application form.

. The user exit then appears as a symbol in the hierarchy of the application form. Example The exits SUM_INIT (before) and SUM_PERFORM (during) exist for the form level BOOKING. Integration The user top included is included in the generated print program of an application form. Specify a ten character (maximum) name. . the system issues corresponding warnings. If you use Smart Forms and PDF-based forms. for example. 2. You have to declare these data areas as ABAP variables in the user top include. in addition to user exits you also need own data areas that you can fill and read when you process forms. If you use the exit more than once (also cross-client).. in user exits. 1. Print Workbench 690 47 . Features The interface of the subprogram for the user exit is generated by the Print Workbench during creation of the exit and must not be changed. it enables you to carry out initializing activities with regard to the form level. Exit Before Loop Use The exit before loop is called up before the data lines for a form level is processed.2011 user top include since there you have to define global data that is used. The internal table is always transferred to the subprogram that is processed next. You can use the user exit includes assigned in several application forms. ○ ○ ○ ○ ○ ○ B for an exit before loop D for an exit during loop A for an exit after loop T for a text exit S for the start exit E for the end exit Select a symbol to go to the user exit maintenance. You can modify the table and its entries in the user exit.SAP Online Help 13. The ABAP variables defined there are therefore available in all user exits. Declaration of Own Data Areas Use To design a flexible and dynamic application form.07. The name must be alphanumeric and unique within the application form. Navigate to the object for which you want to create a user exit (for example. the variables defined in the user top includes are transferred to the generated module of the Smart Form in addition to the complex data type. form level).

2011 For example.SAP Online Help 13. " USER_EXIT_SUM_INIT Exit During Loop Use The exit during loop is called up during the processing of a form level and enables you to carry out activities that have to be performed for each line of the form level. “defined in user-top-include SORT xyt_booking BY fldate ASCENDING forcurkey ASCENDING. Use this user exit to: ● ● ● Perform summations Read additional data from the database Modify global data areas Example *&---------------------------------------------------------------------* *& USER_EXIT_SUM_PERFORM *&---------------------------------------------------------------------* FORM user_exit_sum_perform USING x_booking type sbook value(x_index) type sy-tabix. You use the exit before loop to: ● ● ● ● ● Read additional data from the database Initialize summation variables Sort the table entries to be processed Process SAPscript control commands (for example. you can reassign entries or change values for individual fields. NEW-PAGE orPROTECT) Process SAPscript protect commands Example *&---------------------------------------------------------------------* *& Form USER_EXIT_SUM_INIT *&---------------------------------------------------------------------* FORM user_exit_sum_init TABLES xyt_booking STRUCTURE sbook . In this user exit you can use the work areas belonging to the relevant form level. DATA: local_amount LIKE x_booking-forcuram. and to all form levels higher in the hierarchy.immediately after data is transported to the respective work areas. to the corresponding 1:1 levels. Features The exit during loop runs while the form level is being processed . ENDFORM. CLEAR sum.07. CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY' Print Workbench 690 48 .

for example. In this user exit you can process closing instructions. Features The exit after loop runs after the form level has been processed. NEW-PAGE. ENDPROTECT) Initialize totals fields Print Workbench 690 49 . “execute summation ENDFORM . therefore. It is used for closing activities per form level.SAP Online Help EXPORTING date foreign_amount foreign_currency local_currency * * RATE TYPE_OF_RATE IMPORTING * * exchange_rate foreign_factor local_amount * * * * local_factor exchange_ratex FIXED_RATE = = fremdkurs = local_amount = = faktorsum = = sy-datum = x_booking-forcuram = x_booking-forcurkey = local_currency = 0 = 'M' 13.07.2011 DERIVED_RATE_TYPE = EXCEPTIONS no_rate_found overflow no_factors_found no_spread_found derived_2_times OTHERS = 1 = 2 = 3 = 4 = 5 = 6. after all the levels/texts lower in the hierarchy are processed. ADD local_amount TO sum. You use the exit after loop to: ● ● ● Analyze the summation Process control commands for SAPscript (for example. " USER_EXIT_SUM_PERFORM Exit After loop Use The exit after loop runs after the form level is processed and therefore. implicitly. you can prepare a total for output or insert a manual page break. after all the form levels lower in the hierarchy have been processed.

SAP Online Help

13.07.2011

Text Exit (SAPscript only)
Use
The text exit is called before a SAPscript text is printed for each data line of a form level and can be used for different activities during processing of a form level.

Features
The indicator y_print_text is transferred in the interface of the text exit; it controls whether the text of the text exit is to be printed. This enables you to dynamically control whether the text is to be printed and to carry out additional activities (for example, data selection). If there are alternative text parts, you can use IF instructions in SAPscript texts to decide which text parts are to be printed. For performance reasons however, you should implement these instructions using text exits, since IF instructions in SAPscript texts require a time-consuming interpretations (see also Optimizing Performance [Seite 45]).

Start/End Exit
Use
Exit events are the external parentheses around an application form. In exit events you can carry out initial and final activities per application form.

Features
Selecting from these symbols will bring you to the user exit maintenance. There are also two user exits that can be used, irrespective of the hierarchy, at the beginning and at the end of the form. ● Start exit This exit is processed first when you process the form. At this point, no data has been read and no SAPscript function modules have been called. End exit This exit is processed last when you process the form. At this point, the whole form has been processed and the SAPscript module CLOSE_FORM has been called.

Triggering Controlled Terminations
Use
In user exits and the form routines of a form class, exception situations can occur where the system is to react with a controlled termination. The print process is not to be terminated, only the printing of the current document. To make sure that terminations that disrupt the print process of the Print Workbench do not occur, you can use the ABAP macro MAC_PRINT_CANCEL to define how the termination is to take place.

Procedure
Always use the ABAP macro MAC_PRINT_CANCEL in all user exits (see Controlled Terminations in Exception Situations [Seite 23]).

Print Workbench

690

50

SAP Online Help

13.07.2011

Utilities
Use
To make the development and administration in the Print Workbench more efficient, you can use various tools and functions that are described in more detail below.

Test Print
Use
A test print enables you to output a form during form development, form maintenance, or during the analysis of errors during data procurement (form class) without the related application process. You can set and vary the print data and the print parameters. Use the test print if you want to test the form without integrating it in the print process.

Integration
How the test print is initiated depends on the form class of the application form. Either the user determines an initial object via the FIND method of the BOR object type assigned, or an individual dialog takes place to select an initial object. For some form classes you cannot carry out a test print. If a test print is not possible, the application of the form class must provide an alternative.

Prerequisites
The form class of the application form must support test prints. You can only print active application forms for test purposes.

Activities
You are in the processing or display of an active application form.
...

1. Choose Application Form Test Print Execute. In a selection dialog of the application, choose the initial object for the test print. Choose Continue. 2. Specify the send type, the printer, and the output format for the test print and choose Continue. 3. In the subsequent dialog box, specify the additional print parameters and then choose either Print or Print Preview, depending on whether you want to output the result of the test print on the printer or only display it on the screen. If you repeat the test print, the specifications that you are made are used again. If you want to enter new parameters for the test print, choose Application Form Test Print New Object. If you use an application form of the type Smart Form, SAP recommends that you process the application form and the Smart Form in two separate sessions and carry out changes to the Smart Form and start the test print from the application form simultaneously. You can process the Smart Form in a new session from the processing of the application form via Goto Smart Form Display in New Session.

Print Workbench

690

51

SAP Online Help

13.07.2011

Breakpoints and Debugging
Use
For example, if you want to find out why data was not output in a form or output incorrectly, you can analyze the generated print program in a runtime environment during the test print. The generated print program contains numerous breakpoint instructions that you can use if necessary.

Prerequisites
You have the relevant authorization.

Activities
In the display or processing of an active application form that can be tested, you have the following options:
...

Place the cursor on the places in the hierarchy where you want to carry out an analysis. Via Extras Set/Remove Breakpoints, insert breakpoints into the hierarchy of the application form. Navigate to the generated print program via Goto Generated Module Display or via Goto Generated Module Subprograms and set a breakpoint in the editor. Navigate to – if it exists – the user exit include and set breakpoints in the coding in the ABAP Editor.

● ●

Carry out a test print for the application form. You cannot restart the transaction. In the first case, the ABAP process goes to the ABAP debugger in all relevant subprograms for the respective hierarchy nodes (for example, READ/GET/FILL subprograms, text output). In the other cases, the ABAP processor goes to your breakpoints in the debug session.

Copying from Clients
Use
You can copy application forms from other clients to the current client. Since an application form consists of different (sub)components, these components also have to be copied during the transaction.

Features
The hierarchs and the attributes of the application form are copied, along with the SAPscript form or Smart Form depending on the form type, and if necessary, both user includes. You can also suppress the copying of individual objects or reference to existing objects. You can also overwrite explicit specifications.

Activities
...

1. Choose Print Workbench

Application Form

Tools

Copy from Client.

2. Choose the source clients and an application form. 3. In the following dialog you are requested to name the referenced subobjects (new). Pay attention to the usual naming conventions.

Print Workbench

690

52

Integration All (sub)components of an application form are transported when you upload or download. To upload an application form from a local file. all its components are saved in a local file: ● ● ● ● Hierarchy/attribute of the application form SAPscript form/Smart Form/PDF-based form and form interface depending on the form type SAPscript texts (only for SAPscript) User includes When you upload. a corresponding list appears for you to select from. If the file contains several application forms. The subsequent dialog box is identical to the one for copying or copying from a client.07.. Files created in an earlier release can no longer be read. choose Print Workbench Form Application Form Download.2011 The referenced subobjects of an application form can be used by other application forms. Upload . Choose an application form from the list. Specify the absolute name of the file to be written. select these in the mass processing of application forms and then choose Download with the right mouse button. The internal data format of the files has changed considerably with Basis Release 6. Print Workbench 690 53 . choose Print Workbench Application Form Utilities Upload.SAP Online Help 13.. pay attention to the naming conventions and the existing uses. check precisely before you overwrite them. Features When an application form is downloaded. Activities . The Print Workbench shows multiple use of objects as a warning. Download 1. In mass processing you can also carry out a mass download.. Therefore. Uploading and Downloading Application Forms Use You can upload or download application forms if there is no direct transport connection between SAP systems. To download several application forms (for example.. The data is then read from the system and downloaded to the specified file. To download an application form to a local file. When you name the new subobjects. You can save an application form and its components in a local file of your front-end and then load them to any version-compatible SAP system.20. from other clients). Application 2. you can change all the names of the subcomponents before you save these in the SAP system (see also Copying from Clients [Seite 52]).

SAP Online Help

13.07.2011

Creating Links
Use
If you want to use the same application form in several clients, you can create links to an application form in another client so that it does not have to be transported or replicated. With a link, when you print, only the runtime components from another client are used.

Prerequisites
The target client must not contain an application form with the same name.

Procedure
...

1. Choose Print Workbench

Application Form

Tools

Create Link in Other Client.

2. Specify the (source) clients and the names of the referenced application form and choose Continue. To create several links in one step, proceed as follows:
... ... ...

1. Choose Print Workbench

Application Form

Tools

Mass Processing.

2. Specify the clients and the application forms in the selection conditions and choose Program Execute. 3. Select the application forms that you want to link to, and, using the right mouse button, choose Link. The current clients must not contain the application forms selected for other clients. After a client copy, the application forms are created as links to the source clients. If you want to create real copies of the application forms, you can transport them from one client to another. To manage and automate links over several clients, you can use the reports EFG_CREATE_LINKS and EFG_DELETE_LINKS ; these reports are available exclusively to (system) administrators.

Finding Variables
Use
Depending on the form class, the dataset contains a number of fields that are in different levels and different DDIC structures; under certain circumstances, they may be difficult to find. SAP therefore recommends you use the following procedures.

Features
The Print Workbench provides you with various options for finding variables in the data hierarchy of the form classes: ● ● ● You can display the fields of any node in the hierarchy of an application form and search there. In SAPscript, you can display the available variables in text processing. In Smart Forms, you can display the variables in the hierarchical display of the complex data structure (ABAP Dictionary).

Activities
..

Print Workbench

690

54

SAP Online Help

13.07.2011

1. You are in the processing/display of an application form. To search for a field in the dataset of the form class hierarchy, open the data overview of the form class in question via Extras Display Form Class Hierarchy. 2. On the subsequent processing screen, place the cursor on the form level for which you want to display the related data and choose Edit Display Symbols. In the following dialog box, specify the search term and the search area. The variables found are displayed. For information about integrating variables in a text, see Inserting Variables in Texts (SAPscript only) [Seite 42]. For Smart Forms, you can find additional fields in the ABAP Dictionary. Choose Extras Hierarchy Display.

Form Information
Use
With the function Form Information, you can get a global overview of the complete content of an application form. The printed list can also be used to find symbols used in SAPscript texts and user includes.

Features
The attributes, the hierarchy in flat presentation and the contents of the user exit include and user top include texts are displayed. The contents of the SAPscript form can be printed using a corresponding function for SAPscript forms.

Activities
...

1. Choose Print Workbench 2. Select Utilities

Application Form and specify an application form.

Form Information.

Administration and Transport
Purpose
From an external point of view, the application forms in their entirety represent a large object structure the, due to the heterogeneity of the objects used, is difficult to administrate without special tools. The Print Workbench provides you with functions and tools for managing the objects of the Print Workbench and the referenced objects.

Mass Processing
Use
You use the mass processing of application forms to manage application forms efficiently in a client.

Integration
All subobjects of an application form are used in mass processing.

Print Workbench

690

55

SAP Online Help

13.07.2011

Features
You can use the following functions: ● Cross-client overview of application forms with the following subfields: ○ ○ ○ ○ ○ ○ ● ● ● ● ● ● Status Form class Form Types Name/package of SAPscript or Smart Form and user include Reference client for references Form name

Mass activation Mass check Mass Transport Mass download Individual copy (same or other client) Individual deletion (only same client)

The individual functions are dependent on the selected entries.

Activities
Select the required application forms for which you want to execute a function and then choose the required function with the right mouse button.

Mass Activation
Use
You can use Mass Generation, for example, if you want to activate all or certain application forms in the background with no further dialog.

Prerequisites
The application forms to be activated must not contain errors.

Features
The mass activation program activates any number of application forms in any number of clients and delivers a results log.

Activities
...

1. Choose Print Workbench

Application Form

Tools

Mass Activation.

2. Specify the client and the selection criteria for the application forms to be activated. If you do not want to activate the application forms that have already been activated again, set the indicator Only if Active. 3. Start the program.

Print Workbench

690

56

The client-independent objects are entered in transport requests as standard provided you have assigned them to transportable packages. Print Workbench 690 57 . b. The option you choose depends on the system setting of the client in which the application form is developed or maintained. the result log is made persistent and you can evaluate it with transaction SLG1. independent. The individual objects each have a different transport behavior. Specify a transport request and choose Continue. in a transport request. The system requests this entry before the change. but has a cross-client object catalog entry.. Transporting Application Forms Use An application form consists of different. each time you change a client-dependent object (for example. an entry is created in a Print Workbench transport request for the object concerned. ● Automatic transport If the setting Recording of Client-Dependent Customizing is active. Proceed as follows: a.07. Transport Behavior of the Objects Object Type Application form SAPscript form Smart Form PDF-based form/form interface SAPscript text User includes Generated function group Transport Object (R3TR) EFOM FORM SSFO SFPF / SFPI Client-Independent NO NO YES YES Object Catalog Entry (TADIR) NO YES YES YES TEXT PROG (FUGR) NO YES (NO) NO YES $TMP (LOCAL) An application form has only been correctly transported if all subcomponents have also been transported. select the subobjects to be transported. transportable (sub)objects. c. If you start the program in batch mode. including subcomponents.SAP Online Help 13. Choose Print Workbench Application Form Transport. Exception: The SAPscript is client-dependent. Features You have two options for transporting application forms.2011 In the log you can see whether all activations were successful. In the subsequent dialog box. Manual transport You carry out a manual transport in the following cases if the recording of clientspecific Customizing is not active in the client in which you are developing the application form. application form or SAPscript text).. and/or you want to place the application form. ● .

a corresponding error entry is updated in the transport log of the request. 2. Choose the client and the name of the application form. If errors occur. 2. reactivates it.SAP Online Help 13. Select the application forms that you want to reference to from other clients. To display the application forms of another client. Create multiple references . Activities Create a reference .2011 When it releases the transport request. There must be no application forms with the same name in the current client.07. for example.. Features You create references from one client to application forms of another client and can then use them as if they were in the current client. There must be no application form with the same name in the current client. 1. Versioning and Archiving via Upload/Download Use You can use uploads and downloads for transporting into different systems. The clientspecific objects used for the runtime are read from the referenced client and not the current one. only be changed by certain users in the system. With the right mouse button choose Create References. You no longer need to transport or copy within a system. During the import into the target system. Using References Use You can set references if you want to develop and manage application forms in a system in a central client. but are visible and you can use them for printing. the system checks the application form specified and if necessary. the transported application forms are also activated. You can analyze the corresponding messages in the transport log for the request. the release is terminated.. If an application form cannot be activated. ● ● Integration References to other clients are a proprietary function of the Print Workbench. use mass processing. You can quickly access forms of another client. 3. You can also use uploads and downloads to make the status of individual or all application forms persistent Print Workbench 690 58 .. The changes are visible and valid in other clients immediately. 1. The referenced application forms do not exist physically in the current client.. This has the following advantages: ● You can encapsulate the original versions of the application form in a client defined for this purpose and it can then. Choose Print Workbench Application Form Tools Create Link in Other Client.

Activities To translate application forms. you can assess the general processing status. that is. forms that are not used by an application form. Translation of SAPscript forms not used in the Print Workbench If you use SAPscript forms that do not belong to the Print Workbench. A statistic gives information about the status of translation activities. From the worklist status. you can select the components to be loaded. you can delete worklists and update their status. You therefore have to follow a different translation procedure: ● ● ● You have to create separate worklists for translating application forms. ● Worklist Definition Lists of objects that are to be processed once only within a certain time frame for each language. you can list these with this function and check their translation status.2011 outside the system and thereby carry out versioning or archiving. including their status and the tasks to be carried out for the objects. in mass processing. for example. An integrated versioning of application forms within the SAP system is not supported. ● Mass processing of worklists If there are several worklists in the system. After translation. In particular. you can use further administrative tools that you access via Print Workbench Application Forms Environment Translation Administration. Activities Save the selected or all application forms of a client with the download function.SAP Online Help 13. In an upload.07. Integration The upload and download of application forms contains all components of an application form. you can manage them using this function. proceed as follows: ● ● Create worklist Process worklist In addition. a new transport to the target system must be carried out. Translating Application Forms Use You cannot translate the Print Workbench application forms and SAPscript texts with the standard SAP translation function. The worklist groups the individual entries and manages the list of objects to be processed. Print Workbench 690 59 . Translation should take place in a special client so that a separate transport can be carried out.

Print Workbench 690 60 . By expanding this level you reach the second one.07. the worklist is subdivided into the following object groups: ● ● ● Table short text SAPscript forms SAPscript text The individual objects to be translated are under these object groups. Here. Hierarchy The following figure shows the first level of a worklist with the individual application forms to be translated.SAP Online Help 13.2011 Structure The worklist consists of three hierarchy levels and is subject to status management. By expanding the second level you reach the third level (see figure).

Print Workbench 690 61 .SAP Online Help 13.07.2011 Double-click on the individual objects to translate them.

07.2011 Print Workbench 690 62 .SAP Online Help 13.

Processing Worklists Prerequisites To process a worklist you must first make sure that a worklist exists. Once you have generated the worklist. Result The worklist has been created. 4. 2. Choose Continue. To create a worklist from this list.SAP Online Help 13. See also the section Creating Worklists [Seite 63]. you can process [Seite 63] it. specify your indicator and the date on which the worklist was created and choose Continue.. 3.07. The desired worklist is displayed. Place the cursor on an application form and. You now see all the objects for translation in the application form you have selected. 1. Enter the name and form class of the application form to be translated and the original and target language.. Choose Program Execute. If there are red lines in the list. Red lines signify errors that must be eliminated. choose Print Workbench Application Form Environment Translation Worklist Edit.2011 Creating Worklists Prerequisites .. your initials) Date (for example. The technical key of the worklist is made up of the ID that you entered and the date. choose Translation List Save/Send Worklist. choose Edit Expand Subtree. Log on to the relevant client in the system in which you translate the form. in the menu. You obtain a list of the objects to be translated in the application forms. For more information about the different hierarchy levels. see Worklists [Seite 59]. In the dialog box Indicator for Worklist. notify your system administrator. In the menu. Procedure Preparation . 2. enter the following: ○ ○ ○ ID (for example. and choose Print Workbench Application Forms Environment Translation Create Worklist. the current date) Short text Create 5.. In the dialog box Indicator for Worklist. 1. Execution Translating Table Short Texts Print Workbench 690 63 .

A new window opens displaying the original text as translation reference. Select the required SAPscript by double-clicking it. The total number of lines does not have to match the original. 3. The number and sequence of the paragraphs must.. Result Once all items have been edited and translated. lines. however. The screen Change General Standard Text appears. 1. the translation is automatically released. Translating SAPscript forms ... here you can translate the short text.. Enter the target language required and choose Translation Create/Change. If a standard text has already been translated and released. you can compare the old version with the current version. 2.2011 To select the table short text required. Place the cursor on a SAPscript text and choose Edit SAPscript Text Display Original. In the Form field. 1. the system automatically compares the number and sequence of the paragraphs in the translated text with the original. SAPscript texts consist of: ○ ○ ○ ○ Text Control characters (for example.. To select the SAPscript text required. this version is saved in a Print Workbench buffer. When you release a translation. Print Workbench 690 64 . paragraph format :/) Symbols (for example. the system changes the status of the application form automatically. here you can translate the SAPscript form. This action starts the comparison editor. tabulator. and symbols do not have to be translated. To carry out a version comparison. This provides you with information about which lines have changed in the current version. If there is a text version in the Print Workbench buffer.) Control lines (for example. &DATE&) Note that control characters.07. double-click on the symbol with the quick info text Execute Version Comparison.SAP Online Help 13. place the cursor on the edited text and choose Edit SAPscript Text Release. If the system determines any differences. it issues a warning. double-click on it. match the original. The worklist is considered completed once all application forms have the status Translated. double-click on it. or you can ignore the warning. The screen Translation of Tables with Master and Transaction Data appears. Save your translation and release the translated text. Collection Definition A collection is an application form of the form type collection. enter the form to be translated. Translating SAPscript Texts . If you ignore the warning. The SAPscript Translation screen appears. To do this. The screen Meaning appears. 2. You can navigate within the text to check the cause of the warning. If this text is then changed later. the symbol with quick info text Execute Version Comparison appears next to the text.

for example. and depending on the node type. They are processed at runtime.07. you can control how application forms from other form classes can be included in a collection. For each collection the system generates a local module that contains the complete process flow for the collection. You can define your own parameters for the technical components of a collection. You can process collections using transaction EFRM (SAP menu: Print Workbench Application Form Process). Collections must not contain collections or links. Process Flow The process flow hierarchy of a collection is processed similar to that of an application form. This module also contains the calls of the module EFG_PRINT for printing the application forms to be processed. as for application forms. just as for an application form. and also application forms from different form classes. such as an invoice and the attached payment form. In the user exit include and the user top include. or an e-mail with an electronic document attached.2011 Use You use collections to group application forms so that you can process them together. You can classify the individual application forms so that they are issued sequentially or bundled. As for each application form. This means that wherever you can specify an application form in Customizing. the collection transfers the selection data to the included application form via the interface EFG_PRINT. a sequential page numbering or a connection at the end of the last page. the module is regenerated. you can define the form routines of the user exit or your own data definitions. This means that the system calls the individual nodes from top to bottom hierarchically. In a collection. Process Flow of Collections Purpose A collection enables a dynamic process flow when you print several application forms in the print event. These includes are automatically included in the generated module. During printing. Example Grouping of technically separated documents. a collection‟s assignment to a form class defines how it belongs to an application. for example. carries out one of the following activities: ● ● ● Print application form Create composition Call user exit You can deactivate the node types composition and application form in Customizing so that these are no longer processed. If you make changes to the collection.SAP Online Help 13. You can also deactivate each node dynamically via user exit. A collection is not suitable for combining different components of the same document if there are direct dependencies or references between the individual parts. Using the indicator Cross-Form Class. Structure Each collection is assigned to exactly one form class. or the user includes. the form class. Collections are called up externally like normal application forms via the modules Print Workbench 690 65 . you can also define a collection. you can group both application forms from the same form class. a specific printer.

you have to identify each use uniquely with a simple character string. the application form or form class called must be able to derive the selection parameters required for data procurement from other information. apart from the printer and the storage mode. When an application calls up a collection. you can define an output device and a storage mode. if the fields remain empty. These conditions determine whether the application form is processed. These specifications override existing settings.2011 EFG_PRINT or EFG_PRINT_EXPANDED. either in addition to the output or instead of it. for example. If you use the form type Smart Forms.07. for example. If there is no selection data (ranges table of module EFG_PRINT). If the application has already transferred selection parameters for several form classes when calling EFG_PRINT. Using user exits and the macros MAC_DEACTIVATE and MAC_ACTIVATE. access the variable C and dynamically deactivate specific nodes using the macro provided. and. if the application only transfers the selection parameters for one form class (standard case). including the variables in the user top include In a user exit. For each application form included in the collection. you can also make the issue of an application form or a composition dynamic. Within a user exit. the setting from the print parameters of the print process is retained. Usually.SAP Online Help 13. This variable can be delivered in the collection in a user exit by filling table C-T_GENDATA. You enter the print parameters when you call the collection. This is the only way that the macros MAC_DEACTIVATE and MAC_ACTIVATE. the application form called can return the selected data to the collection using the parameter Data Handling. using the variable X_TAB_GENDATA transferred. for example. For each application form in a collection. this information is forwarded to the relevant application form dependent on the form class. only the selection data for one form class is transferred. and the processes for processing the application form can identify the nodes. You can thereby make the issue of an application form dependent. The import variable X_TABN_SEL_PER_FCLASS of category EFG_TABN_SEL_PER_FCLASS is available in module EFG_PRINT(_EXPANDED) for this. you can supplement the process flow of a collection with additional dynamic logic. To improve your control of the behavior of the collection concerned. you can no longer change the parameters in the collection. you have to create a form routine with the required coding in the user exit include. The data is transferred to the variable C-T_GENDATA in the following key: TYPE KEY ATTR REF_TO_DATA XSTRING = = = = = “PWB_DATA” <Name of application form> <Identification> Data reference from the deep data type of the form class Data as XML. you can configure the behavior of the program as follows: ● ● ● Suppress output Trigger errors Call application form In this case. If you want to use an application form more than once in a collection. on the send type or the RDI or XSF output format. you can define conditions. an application form may have to be called without selection parameters. For each collection there is one generated module that contains the flow logic of a collection. it can transfer additional selection information for other form classes to the collection for processing. various different constellations can occur in the process flow of cross-form class collections. However. To do this. Print Workbench 690 66 . you can.

The control variable C contains information about the process flow.SAP Online Help 13.07. Structure Variable C has the DDIC type EFG_STRN_COLL_CONTROL and has the following structure: Field Name COLLECTION FORMCLASS SENDTYPE LANGU RDI XSF COPYFLAG MAIL_TITLE SENDTYPE_EXT CLIENT ARCHIVE_INDEX ARCHIVE_PARAMS T_GENDATA OCL_ACTIVE ITCPO ITCPP RDIRESULT Data Type EFG_DTE_COLLECTION FORMCLASS RF_SENDTYPE LANGU RF_RDI EFG_DTE_XSF RF_COPYFLAG EFG_DTE_TITLE EFGSENDTYPE_EXT EFG_DTE_SRCCLIENT TOA_DARASAP ARC_PARAMS EFG_TAB_GENDATA EFG_OCLACTIVE ITCPO ITCPP RDIRESULT Description Collection Form classes Send type for a document Language key Raw Data Interface Smart Form output format Document is a copy Title of a document/attachment External send type Source client for access to other clients ArchiveLink structure (DARA) Archive parameters Table for generic data Open/close logic is active SAPscript output interface SAPscript output parameter SAPscript RDI: Return structure in Mode is not spool Smart Forms: Return at the end of form printing Table for OTF data Selections per form class Print parameter for external control Parameter for control of output format for PDF-based forms SF_RESULT T_OTF T_SEL_PER_FCLASS ADDITIONAL_PARAM XFP SSFCRESCL EFG_TAB_ITCOO EFG_TABN_SEL_PER_FCLASS EFG_DTE_ADDITIONAL_PARAM EFG_DTE_XFP Print Workbench 690 67 . Use As in every application form. there is also a global control variable C in the generated print program of a collection.2011 Variable C Definition Global control variable in the generated function module. this information is either exported in user exits or is used for communication with the application forms.

The attributes and conditions assigned to the nodes are evaluated. in the same way as for an application form. Terminates the processing of the collection Triggers exit of the current context (for example. They are transferred to the application form and can be queried in the C variable there.SAP Online Help 13. for example. Features You can use the following macros: Macro MAC_DEACTIVATE <NAME> <IDENTIFIKATION> Function Suppresses the output of the node <NAME> Note If the node is an application form. The parameter <IDENTIFIKATION> acts in the same way as in the macro MAC_DEACTIVATE.07. when calling a module. The node must be actively defined in the collection. You can use the following ABAP macros to control the process flow of a collection dynamically in user exits. the identification in the collection differentiates between the different uses. MAC_ACTIVATE <NAME> <IDENTIFIKATION> Reactivates a node <NAME> MAC_CANCEL <MSGTY> <MSGNO> <MSGID> <MSGV1> … <MSGV4> MAC_CANCEL_SY_REPEAT <MSGTY> Terminates the print transaction with an error message (to be specified) Terminates the print transaction by returning the last error message.2011 The variables T_GENDATA and T_SEL_PER_FCLASS are used for communication and data selection for various application forms. MAC_LEAVE MAC_EXIT Print Workbench 690 68 . which means that using the macro is only recommended if an active node was deactivated via user exit. composition) No error message is triggered. If the identification is empty or the node is a different type. Dynamic Modifications in the Process Flow Use The individual nodes of a collection are processed from top to bottom. enter SPACE for this macro parameter.

The BCS documents must be attached in a composition to the global table G_TAB_BCS_ATTACHMENTS. or whether it is converted into text and inserted in the header area of the e-mail. As line time. You define the individual parts for an e-mail in a composition. This means that you have to create and attach instances of this class in a user exit. You can use the indicator Attachment to control (for send type EMAIL) whether a document is attached as PDF file to an e-mail.07. In cross-form class collections. You have to insert these lines in the global export parameter Y_TAB_GENDATA or the global field symbol <Y_TAB_GENDATA>. You can use a composition to group and bundle application forms.SAP Online Help 13. instead. The application form receives the information about the name of the calling collection via the variable C-COLLECTION and the identification via the variable C-IDENTIFICATION. This is the only way the form class can recognize it. This could originate from other application forms processed in a previous step or. If the line for the respective form class was not transferred by the calling application. An application form can also return data by creating lines of the type EFG_STR_GENDATA in a user exit for processing later in another application form. Send Type e-mail Definition Sending correspondence by e-mail Use If you do not use the external data processing via RDI/XSF for the send type EMAIL. Data Type EFG_TAB_GENDATA Use You use table type EFG_TAB_GENDATA to flexibly transfer data between different application forms involved in the printing process and the superordinate collection. information about the context is transferred to the application form. the logical connection in the e-mail is not created. from a user exit in the calling collection. the printer and spool control of the system does not execute the output.2011 Interaction between Application Forms and Collections If a collection calls up an application form. You can also deliver additional information to the application form via the variable CT_GENDATA. you can also control the selection options transferred for the application forms called via the parameter C-T_SEL_PER_FCLASS. If different application forms are not called up within one composition. These are usually a text and one or more attached documents. Using user exits you can attach Business Communication Service documents to an e-mail. you have to add it to this table. together with data and selection information. the table has the class CL_DOCUMENT_BCS. for example. the system creates an e-mail object from individual form components and forwards this directly to the SAPconnect interfaces. Structure The related data type EFG_STR_GENDATA has the following structure: Print Workbench 690 69 .

Calling Form Printing in ABAP Programs Use An application form is a configuration object from which a runtime object in the form of a function module is generated. you must be able to transfer or hold selection options for several form classes simultaneously. PWB_DATA identifies the data selected in an application form. The structure EFG_STRN_SEL_PER_FCLASS consists of the field FORMCLASS and the selection table EFG_STRN_SELECTION. Print Workbench 690 70 . and ATTR identify/attribute the data record. You can determine the ABAP/DDIC type dynamically using ABAP methods or using the information in TYPE and KEY. The fields REF_TO_DATA and XSTRING contain the data previously determined: ● REF_TO_DATA is an ABAP data reference that you have to remove before accessing the data. The field TYPE identifies a component or application.SAP Online Help 13. Structure Table type EFG_TABN_SEL_PER_FCLASS has the structure EFG_STRN_SEL_PER_FCLASS. For detailed information. If TYPE = PWB_DATA. Before further processing. use the ABAP command CALL TRANSFORMATION.07. the referenced data type is the highest complex DDIC type in the form class. this means that you configure the data of the highest complex data type of the form class and all global variables that are defined in the user top include of the application form here. In the field ATTR. ● Data Type EFG_TABN_SEL_PER_FCLASS Use In order to carry out cross-form class processing in collections. This selection table contains the selection and import parameters (for example. ranges tables) for the module EFG_PRINT. In the case of PWB_DATA. The field XSTRING transports XML data. Table type EFG_TABN_SEL_PER_FCLASS carries out this function. The field KEY identifies an object below the information in TYPE (for example. To do this. you can define additional attributes or information. the name of the application form). you can also use this command to reconvert this data into ABAP variables. For example. The following is a description of how the runtime object is called from an ABAP program to print an application form.2011 Field Name TYPE KEY ATTR REF_TO_DATA XSTRING Data Type EFG_DTE_GENDATA_TYPE EFG_DTE_GENDATA_KEY EFG_DTE_GENDATA_ATTR EFG_DTE_REF_TO_DATA EFG_DTE_GENDATA_XSTRING Description Type ID for data Key for data ID Additional attribute Reference to data RAWSTRING for XML data The fields TYPE. You can assign these fields as you require. KEY. see the documentation for the ABAP Editor (transaction ABAPHELP) ABAP Programming Language Reference.

the form class.07. output formats. or PDF-based form). The parameters of the module contain ● ● ● All controlling information for the Print Workbench (for example. Activities The modules EFG_PRINT and EFG_PRINT_EXPANDED are available. application form. and the form tool used (SAPscript. Structure The interface of the module consists of the following parameters: Import parameters X_PRINTPARAMS X_ARCHIVE_INDEX X_ARCHIVE_PARAMS X_DIALOG EPRINTPARAMS TOA_DARA ARC_PARAMS (Indicator) Structure of the print parameters Archive information per document (optional) General archive information (optional) Execute dialog for print parameters (optional. which is triggered in the module EFG_PRINT_EXPANDED. ITCPO) Information for the data procurement of the form class (ranges tables) The call of the module is independent of the form. The difference is in the use of send control. default: SPACE) Object handle for recipient (optional) Object handle for sender (optional) Print Workbench result structure Result of RDI print Print Workbench result structure X_RECIPIENT X_SENDER Export parameters Y_PRINTPARAMS Y_RDI_RESULT Y_PRINTPARAMS SWOTOBJID SWOTOBJID EPRINTPARAMS RDIRESULT EPRINTPARAMS Print Workbench 690 71 .2011 Integration Form printing is called exclusively via central interfaces of the Print Workbench. form class) Control information for the print process (for example. Smart Form. Use module EFG_PRINT in individual print processes and EFG_PRINT_EXPANDED in mass printing.SAP Online Help 13. Module EFG_PRINT Definition The module EFG_PRINT reflects the central interface for printing an application form.

application form. BOR object type. If the module EFG_PRINT is called.2011 SSFCRESCL Result of printing by Smart Form Table parameters XT_RANGES<number> (10) YT_OTF_DATA EFG_RANGES ITCOO Ranges table for interpretation of data selection in form class OTF data returned (if required by application) The most important control information for printing is in the import structure X_PRINTPARAMS (for example. You can only print application forms that have the status Active. printer). You can also use module EFG_GET_ARCHIVE_PARAMS to fill these structures. without this data. The archiving data that belongs to the application (for example. an activation of the form and generation of the related print program are triggered. optical archiving of correspondence is not possible. Above all. Module EFG_PRINT_EXPANDED Definition The module EFG_PRINT_EXPANDED is an extended variant for calling form printing in the Print Workbench.SAP Online Help Y_SF_RESULT 13. you can use the module EFG_PRINT_EXPANDED to change the print parameters with the send control or send the outgoing correspondence in different ways (for example. the module is designed for mass printing. In comparison to the module EFG_PRINT. document type. The user can also set or modify these by calling the module EFG_GET_PRINT_PARAMETERS. as letter and as e-mail). If the status is not Active. Both object reference IDs X_RECIPIENT and X_SENDER are of the type RECIPIENT and must be created with the BOR methods first.07. while the module EFG_PRINT should be called for individual printing or online printing. Structure The interface of the module consists of the following parameters: Import parameters X_PRINTPARAMS X_ARCHIVE_INDEX X_ARCHIVE_PARAMS X_SENDCONTROL X_RECIPIENT EPRINTPARAMS TOA_DARA ARC_PARAMS SENDCONTROL SWOTOBJID Structure of the print parameters Archive information per document (optional) General archive information (optional) Send control (optional) Object handle for recipient (alternative to X_REC_ADDR and X_REC_PERSNUMBER) (OPTIONAL) Address number of recipient X_REC_ADDR AD_ADDRNUM Print Workbench 690 72 . BOR object ID) is transferred in both import structures X_ARCHIVE_INDEX and X_ARCHIVE_PARAMS. first the status of the form is checked.

Print Parameter Structure EPRINTPARAMS Definition In all programming interfaces of the print workbench a structure of the type EPRINTPARAMS is used. fax) Print Workbench 690 73 .07. Structure The structure EPRINTPARAMS consists of two parts: ● ● Structure EFG_PRINTPARAMS of the Print Workbench The structure ITCPO relevant for the form tool (SAPscript/Smart Forms/PDF-based forms) Structure of EFG_PRINTPARAMS DEVICE ● ● Device type for SAPscript/Smart Forms/PDF-based forms PRINTER for normal print output (default) MAIL for other send types (e-mail.2011 from central address management (optional) X_REC_PERSNUMBER AD_PERSNUM Person number from central address management (optional) Export parameters Y_PRINTPARAMS EPRINTPARAMS Print Workbench result structure Table parameters XT_RANGES<number> (10) EFG_RANGES Ranges table for interpretation of data selection in form class You define the send control in the Customizing of the Print Workbench. It enables you to change the technical print parameters transferred in accordance with the setting in the send control.SAP Online Help 13. It contains all relevant control fields that are relevant for the Print Workbench itself or for SAPscript or Smart Forms. This enables you to send the same correspondence several times using different send types.

07. should no longer be used) Output of spool request at the end of the print process Open/close control is active External send type Indicator: Suppress activation Print Workbench 690 74 .2011 RDI ● ● ● ● ● FORMKEY FORMKEY_RDI DELAYED_PRINT LANGU TEST_MODE DEBUG SENDTYPE RDI indicator for output via SAPscript <space> = Normal output (OTF) X = Output al RDI (via spool) X = Output as simple RDI (via spool) I = output as RDI-IDoc * = Specification in SAPscript form applies Name of application form (Used externally: Name of application form for RDI) Indicator: Creation of print request.SAP Online Help 13. no direct print Language of form Indicator: Test mode Indicator: Debugging mode when calling the generated module Send type: ● ● ● ● PRINTER = Correspondence as printed letter EMAIL TELEFAX RMAIL = SAP internal mail REC_ADDR REC_STRING SEND_ADDR COPYFLAG REC_PERSNUMBER LAST_DOC LAST_DOC_ACT OCL_ACTIVE SENDTYPE_EXT NO_ACTIVATION (Internal use: ID of addressee from central address management) (Internal use: Address as string) (Internal use: Sender address as string) Indicator: Is a copy (Internal use: ID of person number from central address management) Last document in mass case (obsolete.

Instead. Print Workbench 690 75 .07. the system creates a new output request. TDSUFFIX2 agree The output request to be added has not been output or closed The parameter TDNEWID is not set The user creating the output request is the same If one of the conditions listed above is not fulfilled. Whether an existing output request is added or a new request opened depends on the different parameters. such that. If the parameter LAST_DOC_ACT (Output after Last Document) is set. Custom parameters for controlling the print process Indicator for the output format for PDF-based forms (raw data) ● ● ● <space> = Normal output (PDF) X = Output in XFP format with context evaluation X = Output in XFP format without context evaluation The most important ITCPO print parameters for the Print Workbench print processes TDDEST TDNEWID TDIMMED TDFINAL TDTITLE TDSUFFIX1 TDSUFFIX2 Output device (printer) Force new output request Output output request Close output request Name of output request ID 1 ID 2 These print parameters are modified. this prevents output requests that arise during a run being closed or printed (TDIMMED = TDFINAL = <space>).2011 XSF XSF indicator for output via Smart Forms: ● ● ● ● <space> = Normal output (OTF) X = Output in XSF format D = Output in XDF format * = Specification in Smart Form applies GET_XSF NO_OPEN_FORM NO_CLOSE_FORM ADDITIONAL_PARAM XFP Indicator: Return XSF/XDF data to calling application Is obsolete and should no longer be used. for example. Is obsolete and should no longer be used. An output request is only added if: ■ ■ ■ ■ The parameters TDDEST. TDSUFFIX1. in particular for mass printing. the individual documents are inserted sequentially in one or a few output requests and output in a closing event (EFG_PRINT_CLOSE).SAP Online Help 13. TDTITLE. there is only one output request per run or per defined subunit of run.

default ‘X’) No form input (optional) No archiving field (optional) Check archiving parameters (optional) Force SAPscript print parameters dialog box (optional) No print view possible X_NO_PREVIEW (Indicator) Print Workbench 690 76 . all print parameters are optional. The module has the following parameters: Import parameters X_PRINTPARAMS X_ARCHIVE_BOR_OBJECT X_ARCHIVE_ARC_OBJECT X_ARCHIVE_OBJECT_ID X_NO_DELAYED_PRINT X_NO_FORMKEY X_NO_ARCHIVE X_CHECK_ARCHIVE X_FORCE_SAPSCRIPT EPRINTPARAMS SAEANWDID SAEOBJART SAEOBJID (Indicator) (Indicator) (Indicator) (Indicator) (Indicator) Input structure of print parameters BOR object type for archiving (optional) Document type (archive) (optional) ID of BOR object (optional) No option for print requests visible (optional. Print Parameter Dialog EFG_GET_PRINT_PARAMETERS Definition The module EFG_GET_PRINT_PARAMETERS is a dialog that can be configured by the application. Structure You can set the following print parameters: ● ● ● ● ● ● ● Form (form class required) Output format SAPscript Output format Smart Form Indicator Output after Last Document Indicator Deactivate Open/Close Control All print parameters from SAPscript (ITCPO). Since the fields are mostly identical. for example.07. structure ITCPO is also used for Smart Forms and PDF-based forms.SAP Online Help 13. It enables you to enter the user-relevant print parameters for the Print Workbench and for SAPscript/Smart Forms. printer Choose between immediate print or creation of a print request Apart from the printer. in the print transaction.2011 Although the related program interfaces use other structures. the Print Workbench maps the fields of structure ITCPO appropriately.

SAP Online Help (optional) X_ONLY_PRINTER X_NO_LAST_DOC X_NO_DIALOG (Indicator) (Indicator) (Indicator) 13.2011 Only show printer as input field (optional) Output after last document (optional) Suppress dialog (only provide user defaults) (optional) Only offer send type Print (optional) Suppress open/close optimization active option (optional. Features The module EFG_PRINT_INIT has the following structure: Import parameters X_ITCPO X_TAB_FORMKEY X_FORMKEY X_FORMCLASS X_TAB_FORMCLASS Export parameters Y_TAB_ERRORFORMS EFG_TAB_ERRORFORM Table with incorrect ITCPO EFG_TAB_FORMKEY FORMKEY FORMCLASS EFG_TAB_FORMCLASS Print Parameters Table of application forms (optional) Application form (optional) Form class (optional) Table with form classes (optional) Print Workbench 690 77 . default ‘X’) X_ONLY_SENDTYPE_PRINTER X_NO_OCL_ACTIVE (Indicator) (Indicator) Export parameters Y_PRINTPARAMS Y_ARCHIVE_INDEX Y_ARCHIVE_PARAMS EPRINTPARAMS TOA_DARA ARC_PARAMS Print Workbench result structure Archive information (1) Archive information (2) Initializing and Closing Print Transactions Use In mass printing.07. SAP recommends that you initialize and complete the print process both before and after the operational calls of the modules EFG_PRINT or EFG_PRINT_EXPANDED. The module EFG_PRINT_CLOSE postprocesses the output requests that have expired during the print process (usually outputs them) and initializes the internal data buffer in the Print Workbench. The module EFG_PRINT_INIT initializes the print process and makes sure that the application form used and transferred are activated if necessary. If errors occur. the incorrect application forms are reported to the calling application as not capable of being activated.

To do this. the Print Workbench executes the open/close optimization internally. since the change to the control logic can lead to undesired side effects under some circumstances. The performance benefit is between 10% and 30% depending on the number of output requests in the system... In the case of SAPscript. this takes place as follows: OPEN_FORM START_FORM . you do not need to call the OPEN/CLOSE_FORM modules. Print Workbench 690 78 . creating a document means calling the complete SAPscript and Smart Form API.SAP Online Help 13. the output request used is not noted and for the subsequent OPEN_FORM. the calls of OPEN/CLOSE_FORM can be suppressed. The Print Workbench is set up so that if the calling application so requires. <Texts> END_FORM CLOSE_FORM If you work with the same print parameters and want to output the individual documents in the same output request. The calls have such a negative affect on performance that for each CLOSE_FORM. Features If the calling application has set the indicator OCL_ACTIVE in the print parameter structure when calling the print modules EFG_PRINT or EFG_PRINT_EXPANDED.. the Print Workbench provides you with a separate field in the print parameter dialog EFG_GET_PRINT_PARAMETERS. In individual printing. you must be able to parameterize the function. The application has to make it visible and make a default entry. the system has to determine from all of the existing output requests on the database. Due to the considerable improvement in performance described above. However.07.2011 application forms The module EFG_PRINT_INIT has the following structure: Import parameters X_FLG_OUTPUT X_FLG_FINALIZE X_FLG_CLEAR_SPOOLIDS Export parameters Y_TAB_SPOOLIDS TSFSPOOLID Table of expired output requests in main memory (Indicator) (Indicator) (Indicator) Triggers output of spool requests Close output requests Delete spool IDs from main memory Open/Close Optimization Use One of the main requirements of the Print Workbench and the print processes defined by the applications is performance. SAP recommends that you activate this function.

It controls and standardizes the processes for transferring the application data to the form tool selected by the user to process forms. Process Flow From the view of the SAP application.2011 Printing Processes and Printing Scenarios Purpose Strictly speaking. how the data is used is neither known nor relevant. You can prepare the application data as a form in the SAP system using functions of the Print Workbench. From this point of view. it is transferred from the SAP system to SAPscript via the RDI interface. or to Smart Forms via XSF or XDF. the Print Workbench is not a tool for processing forms. and can then be processed according to local requirements using special software. Printing Processes and Output Formats Categor yof application form:  PDF-based form  SAP Sm art Form  SAPscr ipt Data procurement and integration of layout tool Application form Generated print program (function module) Layout & Design PDF-based form Smart-Forms SAPscr iptform Output formats XFP (SAP Spool) PDF (SAP Spool) XSF/XDF (SAP Spool) OTF (SAP Spool) RDI (SAP Spool/IDOC) Logical printer Logical printer Logical printer or IDoc Output Management System (OMS) ➔ External printing • Scenar ions for m ass printing • Postprocessing (use of strike codes.OMR) • Postage determin ation/use of franking mach ines • Information about reduction of po stage • Editors for layout cr eation System for mass printing RDI. the Print Workbench provides a standardized infrastructure for processes that take place during printing triggered by an application and that you can configure accordingly. or the correspondence categories are sorted and mixed. or PDF-based forms or process the data further externally via a raw data interface. and XFP are official certifiable SAP interfaces for the extraction of r aw data The SAP system has no control for external print logistics. Outside of the SAP system. For large volumes of Print Workbench 690 79 . form data and other data is increased.SAP Online Help 13. If the data is processed further externally. The Print Workbench supports all form tools provided by SAP equally and guarantees SAP customers the free selection of a form tool with no functional restrictions.07. such as postage optimization or control of printing processes. XSF. Smart Forms. either with SAPscript.

RDI and XSF). the data is usually not actually processed within the SAP system. XSF/XDF. Smart Forms. SAP provides special device types for this (for example. specify the option in the print options. Print Workbench 690 80 . It is processed outside of the system using external software.2011 data.07. You can define logical output devices in the spool administration and define additional instructions. you have to configure logical output devices in the central SAP printer management (except in RDI IDoc (SAPscript) mode). such as target directories or processing commands for the file. You should also optimize the application forms used for the respective raw data variant. these forward the files that result to an external address. SAP therefore recommends external processing by means of an output management system. XFP) that are an integrated component of the respective form tool and that mutually exclude each other. Features Depending on the form tool used. Further Processing of Data in External Systems Use In mass processes. Prerequisites To process data externally. See also the relevant SAP Notes (for example. Integration Depending on the form tool (SAPscript. PDF-based forms) you can use separate data interfaces (RDI.SAP Online Help 13. you can use the following raw data variants: Form Tool SAPScript Variants RDI RDI Simple RDI Smart Forms XSF XDP PDF-based forms XFP (1) Output Channel IDoc Spool Spool Spool Spool Spool Certifiable Yes Yes No Yes No Yes Compressed variant (pure data) Meta information of layout document Pure data extraction With PDF-based form context evaluation Without PDF-based form context evaluation Comment XFP (2) Spool Yes The supplement Spool defines that the data output is controlled by SAP spooling and the logical output devices. SAP Note 6753). Activities To select one of the data formats supported.

and BOR object types and archives.2011 Archiving/Connection to ArchiveLink Use If a document is dispatched. via RFC or BAPI. the SAP system sends an archiving command to the archive system containing both the document to be archived in a particular format (for example. archive connection). it is often necessary to archive a copy of the document. Features The following different scenarios exist: Preparation in the SAP system with no external processing of data SAPscript. For archiving. During the print process. and are generally defined in the attributes. an invoice document or a contract account) of the SAP system and the technical object in the archive. The formatted document is sent via SAP ArchiveLink to an external archive and archived there. Smart Forms. which means that communication with the SAP ArchiveLink is exclusively via these forms.07. creates a link entry in the SAP system with the data received. the archive generates a 40 character ID and. In SAP ArchiveLink you make all the settings that classify a document and make it accessible for an application. The document types used usually correspond to form classes of the Print Workbench. PDF). Prerequisites SAP ArchiveLink must contain all the required settings. links between document types. Documents are archived in an external optical archive and connected to the SAP system via SAP ArchiveLink. and PDF-based forms support parallel (asynchronous) optical archiving of documents during printing. such as document types.SAP Online Help 13. This link entry represents the logical link between a business object (for example. links. Archiving during form output in SAP system Print Workbench 690 81 . and the following data for the logical link: ● ● ● ● ● Client BOR object type BOR object ID Archive system ID Document Type If archiving is complete. the Print Workbench uses the standard interface of SAPscript or Smart Forms. Integration SAP ArchiveLink is called directly during the print process with the form created completely dynamically provided you have made the system settings necessary for SAP ArchiveLink (document types.

the document formatted by SAPscript is transferred to SAPconnect along with information. and of a corresponding viewer (such as Acrobat Reader for PDF documents). If you choose a send type other than PRINTER.SAP Online Help 13. the outbound document from the SAP system is not archived. for example. SAPconnect is a standard application of the SAP system. EMAIL. This means that the external system has to carry out the functions described above.07. or RMAIL (SAP internal send). using the button Archived Documents in the respective application.2011 SAP Formatted document. such Print Workbench 690 82 . The prerequisite for correct display of a document from the archive is the complete installation of the component SAP ArchiveLink in the SAP GUI of the relevant presentation server. SMS. and the external system also has to control the archiving as well as formatting the document. The external system has to send the required parameters to the archive so that the archive can create the link entry. Activities Activate the archiving by setting the archiving parameter Print and Archive (3) or Only Archive (2) in the dialog box Print Parameters. SAPconnect [Extern] is used for send types TELEFAX. Once you have successfully activated archiving. Sending as e-mail or Telefax via SAPconnect Use You can send documents using various different send types. The raw data must contain the archive parameters. PDF BOR object BOR ID Document type Archive ID Archive Smart Forms SAPscript ASYNCHRONOUS Archive Link BOR object BOR ID Document type Archive ID + Archive document ID Formatting by external system If the document is not formatted in the SAP system and a data format for external processing is used instead. you can access archived documents. example.

Define the communication nodes that define the route that a document sent to SAPconnect is to take. In the dialog box that follows. specify each address according to send type. RMAIL. instead of control by SAPconnect . needed for sending it. you have to differentiate between the following scenarios: ● Preparation in SAP system (no raw data) In this case. the Print Workbench provides the following fields in the C global variables in the generated programs of the application forms: ○ ○ ○ ○ c-sendtype (Print Workbench send type (PRINTER. the preparation is according to the standard procedure of SAPconnect. SMS)) c-comm_type (SAPconnect communication type (FAX. If the address type has been maintained in the master record of the business partner associated with a transaction. In this case. Set the communication methods to SAPconnect. activate the communication types in the SAP menu under Tools Business Communication Office General Office Settings. this address is defaulted in the parameters. e-mail. Print Workbench 690 83 . Prerequisites ● To ensure the correct functioning of the alternative send types.2011 as fax number and e-mail address. Maintain the user data for each communication type. For this purpose. In the SAP menu. customers must integrate these fields explicitly (dependent on the form tool). ● ● ● Features Aside from the standard send type PRINTER. Maintain the address data in the master data of the business partner for the communication types. only a raw data flow is created. All parameters required must be integrated in the raw data flow. With regard to the use of raw data interfaces. TELEFAX. or internal r-mail. e-mail address)) c-send_address (sender address as character string (telefax number.SAP Online Help 13. SAPconnect places the document in a send queue which is released for processing by an administrator or a program that runs periodically. an external system must also take over sending the document. a document can also be sent via SAPconnect as a fax. choose Tools Business Communication Communication SAPconnect.07. Preparation by external systems (raw data) In this case. The document created is placed in the SAPconnect send queue and is transferred later to an external fax or e-mail server to be sent. EMAIL. INT. Specify the send type in the Send Type field. PAG)) c-rec_address (recipient address as character string (telefax number. e-mail address)) ● To be included in the raw data flow. Activities You can define the send type in the dialog box Print Parameters. For detailed information about SAPconnect. RML. see the documentation for the transaction.

SMS) Output format SAPscript (<BLANK>. SAPconnect requires the correct setting. For it to be relevant for the print process. Activities To use the send control. RMAIL. *. to send an application form and/or to send multiples of forms. I. for example. This means that print parameters defined completely in the print transaction are overwritten by a send control on a field basis. Integration You define the send control in the Customizing of the Print Workbench. X.2011 Send Control Use Using send control you can use special print parameters. EMAIL. Print Workbench 690 84 .2. X..SAP Online Help 13. S) Output format Smart Forms (<BLANK>. you must have configured the connected archive via SAP ArchiveLink. Prerequisites If you use archive mode 2 or 3. Enter each send control to be used in Customizing or in the master data of the calling application. the standard setting for the print transaction is used. proceed as follows: .3) Copy indicator (<BLANK>. using different send types (letter. 1. *.. If the send type is not PRINTER. TELEFAX. e-mail). 2. Features Dispatch control consists of control lines that each contain the following fields: ● ● ● ● ● ● ● ● ● send type (PRINTER. X) Output device External send type The send control overwrites on a field basis.07. Define the send controls in Customizing for the Print Workbench in the activity Define Send Control. fax. For empty fields. R) Number of copies (number) Archive mode (1. the calling application must have named a send control in Customizing or in the master data. D) Output format PDF-based forms (<BLANK> X.

. Features You can use the following methods to default and modify the print parameters: ● User-specific default of certain parameters using SET/GET parameter IDs for the print parameter dialog. As standard. The correspondence tool is optimized for the standard sending of mass correspondence and provides the Print Workbench with a standard print process with numerous application and customer exits. such as printer or RDI indicator. For this purpose. you can define certain print parameters as default. However. However. For more information. ● Use of static exits in the application form The generated print program of the application forms contains static user exits that you can use to specify the print parameters that are only relevant for Smart Forms or PDFbased forms. you can only use this method if the send control is integrated in the Customizing or master data of the application you are using.SAP Online Help 13.07. you can create requests for print transactions to carry out the print in a central run (for example. under certain conditions. This is the only way that the required send control is used at the correct time. Print Workbench 690 85 . as parallel background job). the Print Workbench provides various methods that you can use to modify the print parameters. see the documentation for the customer enhancement EFG_PRINTPARAMS. ○ ○ ○ Print parameter dialog default Print parameter dialog subsequent entry In the print run For details about using the individual events or methods. the send control is not defaulted in the print parameters. ● Use of customer enhancement EFG_PRINTPARAMS You use this customer enhancement to default print parameters by means of ABAP. Using the Print Workbench with Correspondence (CA-GTF-COR) Use If you do not want to print correspondence immediately.2011 Flexible Control and Modification of Print Parameters Use The complete set of print parameters specified for each print run is the basis for the complete run.. see SAP note 131277. such as printer and send type. Using user-specific SET/GET parameters. you may have to specify or default the print parameters individually. ● Use of send controls You can use send control to set certain print parameters. The enhancement contains three events or methods: . The correspondence tool carries out this function.

When you create print requests. to carry out collective and parallel printing and to standardize the print process. see the documentation for Correspondence [Extern] Using Print Action Records Use A print action record is a variable text or data supplement that is determined during print processing and can be integrated in form processing. Prerequisites You can only use the correspondence tool if the application/component has implemented a corresponding connection to the correspondence tool. A print action record is used if you also want to print out a variable text in a form.2011 Integration The correspondence tool is not integrated in the Print Workbench. In a print action record. the system creates a request for the correspondence type concerned in the form of a correspondence container. These correspondence containers can then be processed and marked as printed in special print runs. such as the validity or the maximum number of processing. you can define additional parameters. Features If the application supports the creation of print requests for correspondence. For each correspondence container the Print Workbench is called up once. or if you want to send additional information to the recipient in the form of a flyer. Features A print action record consists of the following indicators and fields: ● ● ● ● BOR object type (key field) BOR object key (key field) Form classes From date Print Workbench 690 86 . it is only used by the Print Workbench.SAP Online Help 13.07. Most applications that use the Print Workbench use the correspondence tool before the print modules of the Print Workbench are called. the Print Workbench offers the options Print Immediately and the option of creating print requests. The correspondence tool provides the application and customer with various events for determining the following objects: ● ● ● ● ● ● ● Sender Receiver Language Send control Application form Address type Archiving ID For more information about correspondence.

If you want to create several print action records simultaneously (mass processing). choose Print Workbench Print Action Records Create in the menu. the system searches for print action records with these keys. In the case of Smart Forms. if you use SAPscript.SAP Online Help ● ● ● ● 13. alternatively. The following fields concern the five standard texts: ● ● ● TDNAME1 to TDNAME5 TDID1 to TDID5 TDSPRAS1 to TDSPRAS5 Print Workbench 690 87 . the print action record must be saved as a variable and then output as symbol. fields have been provided in each case for five standard texts and ten flyer IDs. Print Action Records (Technical Background) Features Print action records are defined in the application table EPRINTACT and have the following key fields: ● ● ● FORMCLASS: OBJ_TYPE: OBJ_KEY: Form class BOR object type BOR object key During the print transaction. This is usually displayed by an appropriate form level in the form class. The form level must also be integrated and active in the application form in which it is used. or. you can display the content immediately in the MAIN window or store it temporarily as a variable and then output it as a symbol. you can integrate the search for print action records in the user exits of an application form by means of the programming interface. If a print action record is determined during the printing transaction. you have to create a report using the report SAPRISU_PRINTACTION_GENERATE delivered by SAP as a reference. It also evaluates the following fields to process the print action records: ● ● ● ● ● ● TRIG_FROM: TRIG_TO: From date for processing To date for processing TRIG_COUNT: Total number for processing MODULO: TRIG_DONE: LAST_DATE: Frequency (Example: 3 = every third time) Number of completed operations Date of last processing A print action record contains definitions such as which text is to be printed or which flyer ID is to be used.2011 To date Maximum number of processing times Frequency Priority The search for related print action records must be integrated in the form class. For this purpose. To create individual print action records. The print action records are integrated in an application form either by means of a form level that corresponds to the BOR object of the print action record.07.

You can use this text for any further processing. If you want to incorporate print Print Workbench 690 88 . The texts or flyers to be selected are defined in the Customizing table EPRINTACTF (Define Flyer/Standard Texts for Print Action Records). You can control the function of the module explicitly using its import parameters: ○ ○ ● X_PRINT Texts are printed (only recommended for SAPscript). the fields FLYERID1 to FLYERID10 are decisive. it prints. In the EPRINTACTF table you can either define an ID for a flyer or the key fields for a SAPscript standard text. The module returns a table with these print action records. If you use a text that has not been entered in this table in a print action record. this Customizing table already contains the combinations found in the form classes delivered. the underlying transactions in transaction SO10. In the same way as function module ISU_S_PRINTACT_SEARCH_UPDATE... you can enter these here. When delivered. Function Modules for Programming Use ● ISU_S_PRINTACT_SEARCH_UPDATE This module determines appropriate print action records for the keys described under DDIC. this can lead to errors in maintaining the print action records. you can also control the explicit function externally. If texts or flyers that you set in the creation reports in the print action records are not defined here. You maintain the entries in this table in the Implementation Guide. ISU_S_PRINTACT_PRINT_UPDATE This module determines the relevant text for a print action record and prints it. ● Customizing Use You maintain the system settings for the print action records in the IMG under Print Workbench Print Action Records.SAP Online Help 13. During printing. It also raises the number of times that print action record has been processed by 1. X_UPDATE Print action records are updated ISU_S_PRINTACTION_TEXT_PROVIDE This function module provides the text for a print action record. Choose Define Links between Object Types and Form Classes and define the supported combinations of form class and BOR object types for the print action records.2011 For the ten flyer IDs.07. it is also not displayed by the above-mentioned transactions and when you save the print action record. This function module is called up using the above keys and processes all valid print action records for these keys. Choose Define Flyer/Standard Texts for Print Action Records and maintain the standard texts and flyers that can be selected for the print action records. as a standard. the texts which belong to them and raises the number of times they have been processed by 1. it is deleted from the record completely. If the module finds these print action records. If you need additional combinations. The standard texts that you define here must be maintained using transaction SO10 (standard text maintenance). the function module ISU_S_PRINTACT_SEARCH_UPDATE can find and process a print action record. Activities .

Individual Creation of Print Action Records Use A print action record is created if a letter is to contain some additional item of information. a print action record must be created for each form or each form level on which text is to be printed. In the menu under Print Workbench Create Print Action Records.2011 action records in an application form yourself. This takes place with a report maintained by the user and designated for a specific purpose. you can only create an individual text if you have deleted the print action record. However. 2. you can also set texts or flyer indicators for further processing. In order for the system to determine print action records. You can define this information in a print action record. Mass Creation of Print Action Records Use If an additional variable text is to appear on multiple forms. Features The creation of a print action record is usually triggered by a business transaction. Choose one of the options from the list above and specify the properties of the print action record. Prerequisites Copy the sample report SAPRISU_PRINTACTION_GENERATE and adjust it to meet your requirements. In a print action record.SAP Online Help 13. The following criteria determine the validity of a PAR (print action record): ● ● ● From date To date Frequency You can assign an individual text to each print action record.07. Print Workbench 690 89 . There are therefore different ways of creating a print action record. If required. By calling the Create method for BOR object type BUS4402 (print action record). Activities You can create print action records as follows: 1. These text or flyer indicators are defined in Customizing for print action records. 3. the correct search routines must already be in place in the application forms. create an individual text. The prerequisite for using the report is that the search function for print action records has been implemented in the application form. Print action records are determined and evaluated when application forms are printed. With the Create Print Action Record function in an application. you have to make an entry for the combination BOR object/ form class here.

Features If the print action records are integrated in an application form. In the simplest variant. If you delete directly. printing begins automatically. the form levels can be left in the hierarchy. you determine why the print action records are created and the entities to which they belong. Integration Print action records are either integrated into the form class belonging to an application form with form levels or must be implemented using user exits. you should carry out a reorganization at regular intervals. The texts behind the print action records are printed automatically. information or a note that is temporarily valid). Integrating Print Action Records in Application Forms Use Use a print action record if you want to print a variable text on all forms.07. deletion.SAP Online Help 13. Activities Once you have copied and adjusted the report. the printing of the related texts can be transferred immediately or you can decide how and which part of the print action records is to be printed. in which the print action records exist as a level in the application form. Application forms with print action records already included If the print action records have been implemented in the form of form levels in the form class.2011 Features By adjusting the report. Activities Choose Print Workbench Print Action Records Selection List. Enter the parameters (selection restriction. set Print Workbench 690 90 . Variable means that the text changes over time (for example. Features Using this transaction you can select print action records and either output them in a list or delete them immediately. You can then use the print action records for selection. you can use the indicator Dialog Indicator to control whether there is a security prompt before deletion. If you want to prevent the texts in a print action record from being printed automatically. run it. In the first case you have to leave the level in question in the hierarchy. and dialog indicator) and choose Program Execute. Reorganization Use To keep the number of print action records to a minimum.

2011 global parameter C-PA_PRINT to <blank> in the exit before loop of the form level. and FORMCLASS = <form class> 3. In table EPRINTACTT (transaction SM30). maintain an entry with the following keys: AREA = „Z„. 2. If you do not want the text to be printed automatically. Then enter this dummy value in parameter X_OBJ_KEY when you call the module ISU_S_PRINTACT_SEARCH_UPDATE in the above-mentioned exit. WA_CONTR_ACCT-VKONT for a contract account) for the call. Print Workbench 690 91 .07. Application forms without print action records To integrate print action records in an application form that have not been implemented in the form of a level in the form class. To do this. (for example. Decide for which form level of the form class hierarchy you want to find print action records. 4. you have to perform the following steps: . and X_OBJ_KEY with the entity key from the current form. Determine the position of the call of the print action records in the application form.. Specify the parameters above (form class. evaluate the table of the print action records received. manually create a print action record in transaction EPA1 and define a dummy object for OBJ_KEY. The parameters X_PRINT and X_UPDATE determine whether a print takes place or whether the print action records are updated. X_FORMCLASS with the current form class. LFDNR = <document number>. Specify parameters X_OBJ_TYPE with the BOR object mentioned above. 5. you can also create single print action records that have a generic effect on all combinations of form class and BOR object. Create an exit during loop for the form level in question and. from there. The position corresponds to the form level. Usually you should set both indicators. object key) in the appropriate position in the report. 1.. In addition to mass processing. In mass processing you have to create the print action records with a report based on report SAPRISU_PRINTACTION_GENERATE. call function module ISU_S_PRINTACT_SEARCH_UPDATE. BOR object.SAP Online Help 13. In this case you have to print the text yourself. It is important that you search for an entity that has a corresponding object type in BOR. OBJ_TYPE = <BOR object>.