Show TOC

 Reference Information for Defining Style Sheets Locate this document in the navigation structure

This and the subordinate sections provide an overview of how you can use XSL style sheets and Cascading Style Sheets (CSSs to define your own layout for browser-based PI sheets and process manufacturing cockpits .

Two XML documents are created in the system for each control recipe to be sent or for each cockpit you have activated: one document for the layout definition (layout.xml) and one document that contains the data from the control recipe (data.xml). The latter of these files is converted to an HTML document directly in the browser using a single XSL style sheet. The following files are used:

  • The XML document

    The system automatically generates two XML documents when a control recipe is sent or when a cockpit is activated. They are stored in the Business Document Service (transaction OAER with class name POC_PIDOC , class type OT and the control recipe number or plantPICockpitname as the object key).

    data.xml

    This file contains all the layout-relevant information from the control recipe or cockpit definition. This means it comprises all the information from the process instructions that are required to generate the layout. XML tags along with attributes, if available, are used to describe meta data, phases, process instructions, output and input fields (including long texts), calculation fields, function calls as well as requested signatures and digital signatures in the XML document.

    layout.xml

    This file contains the layout definition that you have stored in the long text for characteristic PPPI_LAYOUT. If you have not specified a layout definition there, the system uses the relevant standard layout (PMC_STY_DEFAULTXIE6.XSL).

  • The document type definition (DTD)

    The Document Type Definitiondetermines rules on how the individual XML elements, attributes, and other data can be defined and represented in a logical relationship in an XML document. The XML documents generated in PP-PI follow DTD files that are stored in the Web Repository (transaction SMW0 package CMX_POC) as object name with the file extension DTD (*.DTD).

  • The XSL style sheet

    An XSL style sheet for PI sheets or cockpits defines how the XML document (data.xml) is to be converted to an (X)HTML document before it is displayed. The conversion takes place directly in the browser (Internet Explorer version 5 or higher).

    The XSL style sheets generally contain references to Cascading Style Sheets (CSS), images, and other files. These files are then integrated with the (X)HTML document when it is loaded. Files that are loaded from the SAP system can never be accessed through the file system of the client server.

    An XSL style sheet can be used for any number of PI sheets or cockpits with completely different contents.

    If you do not define your own layout based on your own XSL style sheet or if you do not declare your own XSL style sheets correctly in the layout definition, the system automatically uses the standard style sheet (PMC_STY_DEFAULTXIE6.XSL) shipped with PP-PI. Copies of this are available as templates for individual solutions in the Business Document Service (transaction OAER) or the WebRepository (transaction SMW0):

    For cockpits: PMC_STY_C_DEFAULTX.XSL and PMC_STY_C_DEFAULTXIE6.XSL

    For PI sheets: PMC_STY_DEFAULTX.XSL and PMC_STY_DEFAULTXIE6.XSL

    For the archiving of PI sheets: PMC_STY_A_DEFAULTX.XSL and PMC_STY_A_DEFAULTXIE6.XSL

For more information on:

Communication Between the Browser and the SAP System

To make sure that the HTML document displayed at runtime supports all the functions of a PI sheet or cockpit and guarantee the communication with the SAP system, you must define the XSL style sheet in such a way that certain types of information are correctly included in the HTML document.

The first step that ensures communication between the HTML document and the SAP system is the integration of a JavaScript. In addition, there are elements in the HTML document (such as pushbuttons, input fields, and so on) that trigger certain transactions in the SAP system and as a result change their statuses. This communication is initialized by using additional element IDs and attributes defined by SAP.

Note the following when defining style sheets:

  • There may be several, nested HTML documents for each PI sheet and cockpit. At runtime, the SAP system must know which of these documents are the main documents of a PI sheet or manufacturing cockpit. The logical document is initialized by means of the document ID, that is identical to the PI sheet number or cockpit name.

    For more information, see Reference Information: Definition and Initialization of Logical Documents .

  • PI sheets and cockpits contain different elements that communicate with the SAP system (for example, input fields, pushbuttons, and so on). An adequate HTML component must be created for each of these elements in the HTML document. In the XSL style sheet, you must also take into account that the runtime environment in the HTML document expects additional information for each component.

For more information, see Reference Information: Definition of ERP-Active Components .

  • The context menus of PI sheets and cockpits contain functions that refer to the entire document or individual fields within the document. You can use the XSL style sheet to determine which menu functions should also be available as commands (pushbuttons).

    For more information, see Reference Information: Definition of Commands .

  • You can define hyperlinks that refer to documents in the SAP system (such as work instructions) in PI sheets and cockpits. In the XSL style sheet, you can define that these documents are only provided by the SAP system when they are actually called and not before. Otherwise, all SAP documents belonging to a PI document are loaded directly when the PI sheet or cockpit is loaded.

    For more information, see Reference Information: Definition of Hyperlinks .

  • Some texts in PI sheets and cockpits must be made available in several different languages (for example, menu functions). This means that when you log on to the SAP System in a different language, these texts must come up in the correct language. In the XSL style sheet, you can use text symbols that you have created in an ABAP program for these multilingual texts. These text symbols can then be translated using the SAP translation tools.

    For more information, see Reference Information: Using Text Symbols .