Product Lifecycle Management Blogs by Members
Get insider knowledge about product lifecycle management software from SAP. Tap into insights and real-world experiences with community member blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

Basics of WWI Report Template

WWI reports enables to output data from the specification database and other SAP components, and graphic symbols on reports. You can use phrase management to store multilingual text, graphics on the report as language-independent. SAP EH&S use a modified version of Microsoft Word (Windows Word processor Integration (WWI)) to create the layout of the reports.

Transaction: CG42 – Edit Report Template

One can search the required template by name or wild card (*) search to get the required template.

Status of the Reports

Template can be in different statuses based on the if the template has been correctly edited or not. The possible status are:

ER – Errors                  When report template has error in WWI console – one would first need to check the errors in the console and correct them to move to In-Work Status.

IW - In work                  When the template is checked and ready to be released.

RE – Released             When the Report template changes are complete and checked and ready to be used in a generation.

IP - In process on WS   When a user is editing the template at the front-end.

Unknown                     When Error occurs in the system, MS word crashes or any server error occurs while saving the file, the status of the report template is in Error.

Some of the Possible Messages:

  • Report should not be in released status if you want to make changes to the same- in order to make any changes in the report template, the user should first Cancel release of the report. : Document CHAPTER_XXXXX with version has a status that prevents changes

          Use Cancel Release button


  • One might also get the message – the Report Template is being used in a generation variant – proceed with the Cancel Release.

  • If you get the message- 'report template is being edited at the front end' then you would have to Utilities – Reset front End before proceeding with making the changes to the template.

Main Screen of the report editor

WWI allows to create language-independent document templates using symbols. Various tools make it easier for the user to create templates with the correct syntax:

Symbol tree can been seen on the left hand corner of the screen. The parallel display of the symbol tree, the document template in Microsoft Word, and the tab pages for editing the various symbol and control object types on one screen with different windows gives the user a better overview when working.

The symbol tree lists all available specification, parameter, and descriptor symbols. The specification symbols are based on the property tree, which the user can change during editing.

  1. With  (Find in Symbol Tree), you navigate to the required symbol in the symbol tree.
  2. With (Find Object in Template), the system searches for the object selected in the symbol tree from the cursor position in the document template. When you select a symbol in the symbol tree, it is entered in the appropriate tab page.
  3. With (Edit Object from Template), you transfer a WWI object from the document template to the tab page. With (Edit WWI Object in Template), you replace the object selected in the template with the object in the active tab page. The object type must match for this.
  4. The (WWI Wizard) helps you create headings, tables, and lists.
  5. Repeating groups are used to assign a characteristic to the value assignment type and for precise data output with multiple value assignments.
  6. (Character Sizing) ensures that text is adjusted optimally to the size of the text box.
  7. Using blank compression and conditional output, you can define the output of data depending on whether other data exists.
  8. With (Extract), you can increase the size of the display of small areas on labels or in text boxes to edit them zoomed.
  9. With (Include Template), you can include another document template in your document template.
  10. (Check Template) lists all errors and warnings. You can automatically select the symbol that needs correcting by double-clicking the message.
  11. (Preview) allows you to preview the finished report.
  12. (WWI Settings) allow you to make default settings for the preview, the Wizard, and the colours for the symbol types.

Sections of the WWI report template editor:


Report Symbols:

A placeholder in a document template by means of which data can be printed on reports.

The data originates from the following SAP components:


  1. Specification management (specification symbols) - Placeholder for Graphic, phrase, or code of a phrase-enabled characteristic (symbol group Phrase ) Non-phrase-enabled characteristic or table field (symbol group Symbol ). Table field of the Recipe Management component (symbol group Formula or Scope of Application )
  2. Descriptor symbols - Placeholder for phrase texts and phrase-related fields (phrase codes, graphics, and so on).
  3. Other SAP components (Parameter symbols) - Placeholder for values from table fields of other SAP components like Materials Management and Sales & Distribution. Components related to Global Label Management (GLM)

Mandatory Symbols

You can specify which Symbols (properties/Characteristics ) must exist on a report for it to be considered complete from a business point of view. You have the following options for setting up such mandatory report symbols:


  1. In Customizing for Basic Data and Tools: You can define a symbol as a general mandatory symbol by assigning the symbol a message type in the Message field in the IMG activity Check and Specify Report Symbols . If no value exists for the symbol during generation, an appropriate message appears on the report and in the report log.
  2. When editing a symbol with the Windows Word processor Integration program, you can enter a message type. Sym. field on the Symbol tab page. When the report is generated, the system then checks whether the value exists for the symbol at the relevant position. If the value does not exist, a message informing of this appears on the report.

Symbols contain key information that the SAP system uses to access the specification database or other SAP tables automatically and to output the corresponding values on the report.


The various aspects of the WWI Editor as follows:


1.Report Template Symbol Tree – Shows the property tree structure with different properties that can be added in the report template and the Symbols corresponding to the property.

The below screenshot shows the different Symbols which are part of the Property ‘OECD and company information Syngenta’ and can be used to be added in the report template:


The Symbol Tab shows the details of how the symbol would be added in the report template.

  1. Mult. Value Asst – shows if the report should display all the value assignments of the report
  2. Separator for Mult. Val. - shows the separator between multiple value
  3. Message for Mandat. Sym. – if the Symbol is  mandatory and if the system should issue an warning.
  4. GPC – indicates how the symbol would be expanded
  5. IT – Indicates which ID LISTING you want to use or which identifier the user wants to be displayed on the report
  6. NM -  Lets the user select a Function Module (FM or Method) for certain symbols

2. Descriptor Symbols are used to add phrases to the report template such as any disclaimers, header/footer phrases.

One would have to select the appropriate Descriptor Symbol to display the phrase text, code, key, Graphic, etc. The editor would also need to select the appropriate- Phrase Library, Phrase group and the phrase text that he wants to display in the report.

Repeating groups show the value assignment type of a property under which all the related symbols can be entered. The repeating group can be a  of different categories as in the screenshot below.

All the Symbols for the particular property tree need to be looped in the same repeating Group. Similarly, components, User defined Text, Sources and Assessments are used as slave repeating group in the master repeating group.

Data Output Restriction

One can use the following identification codes to define a data output restriction if not all of the symbol’s data records:

Identification Code in Symbol

Meaning

N

The system selects the data record with the number n.

*

This wildcard selects all data records it finds.

n-m

The system selects the data records from number n to number m.

n-*

The system selects all data records starting from number n.

Blank Compression – 

Used for suppressing a particular symbol or section based on its availability or no. User can change all symbols displayed as a condition in the Blank Compression dialog box in the control symbols area by positioning the cursor on the symbol required and choosing Modify or Delete.

In the blank compression dialog box in the operator area, specify whether the conditions entered are to be linked with

AND ( * ) or OR ( + ).

Word enters blank compression in your template according to the conditions defined. All entries between the beginning and end of the control section are not output. WWI reacts as follows:

"+" = OR: If no value is found for at least one control symbol, blank compression is activated. No text is output.

"-" = AND: If no value is found for all control symbols, blank compression is activated. No text is output.

“With Alternative” Blank Compression - In the dialog box for blank compression, you can specify that an alternative statement is output in your report template. The alternative statement is inserted as an additional control symbol (for example, <13CNG000> ) by the Windows Wordprocessor Integration (WWI) program.

Conditional Output  - Is used in order to display or not display certain sections, symbols based on certain condition checks.

The conditional output around the section that is to be output if the condition is fulfilled. The section can contain any type of object, such as Microsoft Word texts, graphics, symbols, and phrases. User can define a number of conditions that must be fulfilled before a section is output.

User can define an alternative for the output, that is an alternative section that is output if the condition is not fulfilled. The condition consists of the following parts:

  • Symbol whose content must fulfil the condition
  • Comparison operator, such as Equal To (EQ), Greater Than (GT), or Text Comparison (LK)
  • Comparison value, that is a value or string against which the system checks

User can also enter a symbol as a comparison value. The system then compares the content of this symbol with the content of the symbol that must fulfil the condition.

To define a conditional output in a document template, proceed as follows:

  1. In the template, select the data around which you want to define the conditional output, that is the texts, graphics, symbols, and phrases that should be output only if the condition is fulfilled. If the template does not yet contain this data, insert it and then select it.
  2. Choose the Condit. Output tab page.
  3. In the symbol tree, select the symbol that must fulfil the condition and on the Condit. Output tab page, choose  with the quick info text Insert Symbol from Tree below the table. The system inserts a table row for the condition and enters the symbol for the chosen condition in this row.
  4. If you still want to edit the symbol, for example, if you want to change the specified identification type or identification category in a condition for identifiers, choose  with the quick info text Edit Symbol from Table , enter the required data for the symbol, and confirm your entries.
  5. Define the required conditions in the table, and if you have more than one condition, specify whether these are to be logically linked with AND or OR. Note the following when entering the comparison value:
    • If the comparison value is a number, enter it without any other characters.
    • If the comparison value is a text for a text comparison (operator LK), enter the text in double quotation marks.
    • If the comparison value is a symbol, enter the string S: in front of the symbol.
  6. If you want to define an alternative, set the With Alternative indicator.
  7. Choose  with the quick info text Insert WWI Object in Template above the tab pages. The system inserts the symbols for the conditional output around the selected section. If you set the With Alternative indicator, an additional line is inserted in the template for the alternative, introduced by the hidden characters <15CIF .
  8. If you set the With Alternative indicator, place the cursor at the end of the line for the alternative and define the data that the system should output if the condition is not fulfilled.
  9. Check and save the template.

Message – display all the error or warning messages generated by the WWI report generator.

There can be warning and Error Messages which would be displayed in this tab. Warnings are mostly syntax based and could be ignored.

To check the document template created, the system creates a structure file in ASCII format that contains all control objects in the template:

The syntax checks on the structure file are as follows:

  1. Analysis of the structure file (finds symbols and control data)
  2. Check for all symbols and their parameters
  3. Check for all repeating groups and their parameters
  4. Check for all symbol nesting
  5. Creation of error message log
  6. Saving the structure information


On the Messages tab page, choose the function  with the quick info text Go To to localize the error in the document template and correct the syntax.Use the check boxes as indicators for already corrected warnings or errors. Read the detailed error description using the Long Text function. Choose  to delete the message.

WWI Editor main screen  - This is a report template screen where one can call includes or add the report symbols. It has a MS Word interface with certain functionalities disabled.


Use of Includes

Includes allow the WWI report editor to call another template in the main template. One can specify the Include the template name, version and the report template type in the include statement:

<20INCLUDE("SDS_2014_2_BASIC_02",01,SBV)

This allows the user to subdivide complex templates into individual templates and thus make them easier to handle. In addition, for parts that are identical in several templates , one can create them in a separate template and include this in all relevant templates. This makes editing and managing document templates easier.

Do NOT use included templates within repeating groups because this has a negative impact on performance. During report generation, the system expands the included template and fills its symbols with data.

The following prerequisites must be fulfilled before you can include a document template:

  1. The template has one of the following statuses:
    1. a.     In Work (IW)
    2. b.    Released (RE)
  2. The syntax is free of errors.
  3. The template can also be used alone.

The control symbol for including a template has report symbol type 20. The string <20INCLUDE introduces the syntax. Following this, parentheses enclose the template, version, and document type, each separated by commas. The template is enclosed in double quotation marks. The “greater than” (>) sign closes the syntax.

Example - <20INCLUDE("Test",01,SBV)> means that the template Test with version 01 is included. The template has the document type report template ( SBV ).

Note:

  1. Specifying a version and document type is optional. If you do not specify a version, the system uses the following version of the template:
    1. When testing the layout of a report, the system uses the newest version that has the status In Work(IW) or Released (RE).
    2. When creating a report as the result of a report request, the system uses the newest released version.
  2. If you do not specify a document type, the system uses the document type of the template into which the template is to be included.


Activities

To include a document template in another document template, proceed as follows:

  1. Position the cursor in the template at the place at which the template is to be included and choose  with the quick info text Include Template .
  2. Select the template you want to include and confirm your entry.
  3. Check and save the template.


Example of Compositions used in Section 3


Used in a table format in the WWI Template to display the hazardous ingredients, etc. The table header is created in a separate table in the layout. In the generated document, the two tables merge because only hidden paragraph marks appear in the layout between the header table and the data table. Handling the header separately has the following advantages:

  1. The header can be suppressed if no value assignments or components exist.
  2. The header is displayed only once (not for each value assignment), which means the use of conditioned text is not required.
  3. When the table header is output, the first value assignment and the first item of the component are queried (repeating groups limited to “1” in each case). The specification key of the component is checked again for safety (the specification key is a required entry field when entering component data)


The actual table then contains the output of the data from all value assignments and items.

The generated report can then be printed incorrectly only if the first value assignment of the value assignment type (in this example SAP_EHS_1012_004) is a value assignment without components.

Layout Example:

<11BRG069(M,SAP_EHS_1012_004;1)><11BRG012(S:POS;1)>¶

<13BNG000(+:01GESTRSUBID)>¶

<03EHS_L_TEXT(CED-H02.00000040)>¶

<03EHS_L_TEX T(CUST-H02.00100050)>

<03EHS_L_TEXT(CUST-H02.00100020)>

<03EHS_L_TEXT(CUST-N15.00208930)>

03EHS_L_TEXT(CUST-N15.00310270)>

<03EHS_L_TEXT(CUST-E11.00900120)> [%]

<13ENG000> ¶

<11ERG012><11ERG069>¶

<11BRG070(M,SAP_EHS_1012_004;)><11BRG013(S:POS;*)>¶

<13BNG001(+:01GESTRSUBID)>¶

<01GESTRIDENT(I:NAM,TRIV,)>

<01GESTRIDENT(I:NUM,CAS,)>

<Data>

<Data>

<Data>

<13ENG001>¶

<11ERG013><11ERG070>¶

Generated Output:

Hazardous ingredients

Chemical name

CAS no.

Symbol(s):

R phrases:

Concentration [%]

Xylene, mixed isomers

1330-20-7

Xn; Xi

R10; R20/21; R38

>= 50 - <= 100 (Ø 52.5)

Butyl acetate

123-86-4

R10; R66; R67

>= 12,5 - < 20 (Ø 12.5)

2-methylpropan-1-ol

78-83-1

Xi

R10; R37/38, R41; R67

>= 10 - < 12.5 (Ø 10)


Creation of Custom Symbol for Table fields (For Technical Team Only)

If some new custom Parameter Symbols (related to tables in the database structure or function module) need to be created, the steps are as follows:

  1. Go to transaction SPRO. Select the path as follows.

EHS-> Basic Data and Tools->Report Definition->Report Symbols->Specify Report Symbol Group.

  1. The fetching of data fields are available in function modules. A Report Symbol Group will have many Report Symbols. The required Report Symbol Group in which new Report Symbols are required need to be identified and its corresponding 'Foreign key - function module' can be copied to a new Z function module and the newly required code to get new fields can be written in the Z function module.
  2. Also, the 'Foreign key - function module need to be assigned with the new Z function module, and save the  changes in a Customization Request.
  3. After assigning the new Z function module and saving the same, click on 'BACK' button and choose : ‘Check and Specify Report Symbol Groups'
  4. Then click on 'New Entries' to create new Report Symbols.
  5. To create a new Report Symbol, the following details need to be entered respectively
  6. Once the details are entered, SAVE the changes. Now, the newly created Report Symbol will be available under the respective group in transaction CG42 where WWI template can be created or edited. The new Parameter Symbols can be mapped in the same manner as mentioned in the steps above.

How to import the Report templates from SERC content


The SERC content would always have two files associated with each report template (.dat and .doc file)  – both should be uploaded in SAP EHS for every template to work

  1. First upload the dat-files (for example SDS_2014_1_EU_MAIN.dat) and doc-files (for example SDS_2014_1_EU_MAIN.doc) on the application server using transfer format BIN (=>transaction CG3Z).
  2. Then import the dat-file using transaction CG34 "Import Report Templates" or go to Logistics -> Environment, Health and Safety -> Basic Data and Tools -> Tools -> Data Transfer -> Import Report Template
  3. The following settings need to be used:
    1. File with path: <path on application server and file with ending .dat> (Note that each dat-file contains the information to automatically pull the corresponding .doc file.The doc-file itself should NOT be specified for the import.)
    2. Character standard: UFT-8
  4. Choose function "Check file". The SAP System checks if the data can be transferred correctly from the transfer file and matches up the symbols.
  5. Check Symbol Match-up to make sure all symbols are available on system in the correct way.
  6. All entries in the system column must have symbol names. If they do not, check if symbol generation was carried out on your system.
  7. "Transfer/Start Time" will transfer (import) your file.
  8. WWI will automatically open the new template document. Check the template by clicking on the check-button and save it. If you encounter error messages at this stage, you can directly take the relevant actions(i.e. set up missing ID-listings, etc.), or you may save the template anyway and resolve the messages later.

Creation of Generation Variant

The generation variant makes it possible for only permitted specification data to be output on a report because it links the report template with a leading validity area and one or more value assignment ratings.


Using transaction CG2B you can maintain generation variants for every template. Or you go to Logistics -> Environment, Health and Safety -> Basic Data and Tools -> Report Definition -> Edit Generation Variants


  • If there needs to be status check performed before extracting data from a specification. Validity Area specifies the Region for which the data should be picked by the template.
  • The option "Usage check" is utilized to control the way in which the usages are compared. There are four options to select: 0, 1, 2 and 3.If you do not specify a value, the SAP System uses the value 0 as default.
    • Value 0: The usage is appropriate if - with the same rating used - the generation variant validity area that is expanded to its countries and regions is the same as or is a subset of the expanded validity area of the usage with which it is to be compared.
    • Example: Generation variant: DE Value assignment usage: REG_EU If a safety data sheet is created for Germany, value assignment instances are also taken into account that are valid for the validity area REG_EU.
  • These validity areas or languages must be addressed directly by the WWI coding in the template (G-Repeating-Group) to be effective. By the use of these Rating/Validity options, it is for example possible to give out special phrases in English on a template in Chinese or Spanish.
  • In the generation variant the main validity area is defined under "Validity Area"; the area from which the template will draw its data.

How to create WWI report symbols

Run transaction CGCZ "Match up master data" with flag "Generate Symbols" only. This will generate the necessary new WWI symbols for the new characteristics.


Additional information:

In a standard R/3 System automatically created symbols using the transaction CGCZ are generated with descriptions which are copies of the characteristics descriptions in the logon language.

The flag "Regenerate Symbol Descriptions" within transaction CGCZ can be used to generate the symbol descriptions in another language different from the logon language. English or German are possible symbol descriptions languages when property tree packages are installed where the characteristics descriptions are delivered in English and German.

5 Comments