Document Properties

From SAP Enable Now Wiki

Scope

  • Simulation content object > Document Properties macro

Purpose

The Document Properties macro provides a way of including additional, custom information into a generated document. For example, you may have a requirement to have the name of the person who approved the simulation/document for release to be included on the actual generated document. To do this, you could define a property of Approver, and then set the value of this property to the name of the approver.

You can provide up to six custom properties in a single Document Properties macro. If you need more than six custom properties, just use multiple Document Properties macros.

Example 1: Definition of properties for the Document Properties macro as defined in the Word document

This relies on the property Names being defined (via the Custom tab under Advanced Properties) in the Microsoft Word document on which the generated document is based, and placeholders being included in the document itself where you want the value of this property to be inserted. The BPP Document and the Audit and Compliance document already include such properties and value placeholders. For the BPP Document, the Document Properties macro is automatically inserted as a part of the BPP Macros Set. Example 1 shows the predefined custom properties for the BPP Document.

In the example shown, the properties are shown before the document has been generated, so the Value texts default to be the same as the Name. When the document is generated, each text in the Value column is replaced with the contents of the Value property for the associated Name property, taken from the Document Properties macro.

Example 2: Contents of the Document Properties macro for the BPP Document, showing the default custom properties and sample values for these

An example of the Document Properties macro for the BPP Document is shown in Example 2. You can easily correlate the custom properties in the Word document to the properties defined in the macro.

To tie it all together, Example 3 shows the section of the generated BPP Document where the custom document properties are used (this is at the bottom of the first page). In this example, the placeholder fields into which the property values are placed are shaded, and the field codes (instead of their values) are shown, so you can see the property names.

Example 3: Generated BPP Document showing Document Properties macro placeholders


Use

From within the Project Editor, select the Start step, and then select menu option Insert > Insert Documentation Macro > Document Properties.

Properties