Show TOC

HTML TemplatesLocate this document in the navigation structure

Use

HTML templates are the means by which the Internet Transaction Server (ITS) creates the HTML pages of a Web transaction, that are displayed in a Web browser. For each screen in an SAP transaction, the ITS needs exactly one HTML template.

Each HTML template contains standard HTML code and HTMLBusiness statements. HTMLBusiness is an SAP-specific macro language, which allows you to merge SAP system data into HTML files at runtime. HTMLBusiness statements are not evaluated by Web browsers, but by the ITS, which:

  • Inserts SAP screen data and SAP screen texts into the appropriate HTML template

  • Translates non-SAP texts into the relevant language (using language resource files)

The completed template is then passed to the Web browser.

Creating HTML Templates

When you create an ITS service, you must create an HTML template for each screen in the SAP transaction. To do this, you can use the Web Application Builder, which accesses SAP screen data and generates the corresponding HTML code.

An HTML template is assigned to exactly one service (or exactly one theme, if the service contains more than one theme). Using the parameter ~source you are allowed to load a template of a different service.

Changing HTML Templates

After generating an HTML template, you can change it to:

  • Adapt it to your company's graphic standard

  • Modify the HTML code

    There are several reasons you may want to modify the HTML generated by the Web Application Builder, because the HTML generator cannot know how you want to use the SAP system data in your HTML templates.

    You may wish to use screen fields in different ways (for example, as radio buttons or checkboxes), specify field values in URLs, reformat tables with URLs in a given column, and so on. Also, if the Web transaction sends data over the RFC channel (using the FIELD_SET or FIELD_TRANSPORT macros), you need to add HTML code to handle the data.

You can use the HTML editor integrated in the SE80 to modify HTML templates.

Note

If you make changes to an SAP screen, you may also need to modify the HTML template. You can either modify the template manually or recreate it using the new SAP screen description. If you recreate it, remember that any manual changes you made to the previous template will be lost, so it's a good idea to make backups of all HTML templates before re-generating them.