Start of Content Area

Function documentation Web Template Locate the document in its SAP Library structure

Use

This Web item can be used to manage consistent sections of different Web templates centrally within one Web template, which you can then insert into any Web template as required. In this way, you can define a header or footer section with the corporate logo and heading as a Web template and can integrate this Web template into your Web applications as a Web Template Web item. This Web template is then inserted during runtime. In contrast to HTML frame technology, the system does not generate a new page during this process. The context of the main template thus remains the same. In this way, you can display text elements and so on from data providers for the main template in the inserted Web template.

Prerequisites

You have saved a Web template in which you are managing consistent sections.

Example

In the following examples, you can see schematic illustrations of possible application scenarios for the Web Template:

Example 1

This graphic is explained in the accompanying text

The above graphic shows a simple application scenario for the Web Template Web item that functions in this case as a reusable header section with corporate logo and heading (without additional Web items or data providers) and that can be inserted into every other Web template.

Example 2

This graphic is explained in the accompanying text

The graphic above shows an application scenario for the Web Template Web item, into which a Text Element Web item was then inserted. Since the context of the main template remains the same for the Web-template-in-Web-template concept, text elements of data providers for the main template are displayed with the Text Elements Web item. For this reason, you also work in this scenarios with prefix assignment.

Example 3

This graphic is explained in the accompanying text

The graphic above shows a complex application example for the Web Template Web item. A Web Template Web item was inserted into the main template that contains a Web Template Web item (footer section with text elements) and a Web item for visualization of the data (in this example, a chart). By inserting the Web Item – Initialization attribute, the type of display can be overridden so that the data, for example, is displayed in a table instead of in a chart, as they were originally shown.

In the following, you see an excerpt from the HTML source text for the above scenario:

<object>

<param name="OWNER" value="SAP_BW"/>

<param name="CMD" value="GET_ITEM"/>

<param name="NAME" value="TEMPLATE_MAIN"/>

<param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_TEMPLATE"/>

<param name="WIDTH" value="652"/>

<param name="GENERATE_CAPTION" value=""/>

<param name="TEMPLATE_ID" value="TEMPLATE_INCLUDE"/>

<param name="SET_ITEM_1" value="CHART_1"/>

<param name="ITEM_CLASS_1" value="CL_RSR_WWW_ITEM_GRID"/>

ITEM: TEMPLATE_MAIN

</object>

The Web Template Web item has the logical name TEMPLATE_MAIN. This Web template includes another Web template with the logical name TEMPLATE_INCLUDE. It converts the Chart Web item into a table.

 

For more information about the Web Template Web item, see Web Template.

 

End of Content Area