Entering content frame

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

Definition

Web Item used to help you insert other Web templates into a Web template.

Use

With the Web Template Web Item, you can easily manage consistent sections in your Web applications centrally in a Web template and can integrate them into any Web template as needed. 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 remains the same.

Structure

In addition to its general attributes, the Web item Web Template has the following specific attributes:

Attributes

Description

Only <body> tag

(USE_ONLY_BODY)

'X' = Yes (standard setting), '  '  = No

Only use the contents of the <body> tag

If you set this attribute, only the contents of the body tag will be used for the Web template to be inserted.

Caution

This attribute has to be set if the Web template to be inserted represents an entire HTML document including <HTML> tag.

Web Template

(TEMPLATE_ID)

Technical name of the Web template that is to be inserted.

Prefix for the logical name

(NAME_PREFIX) (optional)

Prefix for the logical name of the objects that are contained in the Web template.

Since the objects in the main template and in the inserted Web template share a namespace and can be linked to one another through their names, you can make them unique in an associated scenario with the prefix assignment for the main template and the inserted Web template. The prefix assignment is useful when the same logical name for Web items and data providers are used in both the main template and in the inserted Web template, but when these should be separated from one another.

Example: You are using a data provider DP1 in the main template with the query “sales revenue". In the inserted Web template, a data provider DP1 is also used, but this time with the query "costs". In order to have the „costs“ query displayed in the inserted Web template, it is necessary to assign the data provider for the inserted Web template with a prefix.

The following table provides you with an overview of the effects of the prefix assignment on working with the Web API.

Prefix assignment and its significance

Prerequisites

Name Prefix Assignment

No Name Prefix Assignment

Same logical name of Web items in the main template and in the inserted Web template.

Web API – commands must address the Web item of the inserted Web template with name prefix and logical name. The following conventions apply:

PREFIX.NAME

Example: The Web Item of the inserted Web template has the logical name ITEM_1 and the prefix is ABC. The Web item is addressed with ABC.ITEM_1. 

Initialization of the Web item corresponds to the initialization of the main template.

Same logical name of data providers in the main template and in the inserted Web template.

Web API – commands must address the data provider of the inserted Web template with name prefix and logical name. The following conventions apply:

PREFIX.NAME

Example: The data provider of the inserted Web template has the logical name ITEM_1 and the prefix is ABC. The data provider is addressed with ABC.DP_1.

The data binding takes place using the data provider of the main template.

 

In addition, you can use the following attributes (parameters), which are notavailable to you in the Web Application Designer, which, however, can be inserted using the HTML view of the Web template.

Attribute

Description

Overwriting the Web item initialization

(SET_ITEM_I; ITEM_ID_I / ITEM_CLASS_I)

If you use this attribute, the initial Web item settings in the Web template to be inserted will be overwritten. For a possible scenario for the use of this attribute, see example 3 under Structure linkWeb Template.

Overwriting the data provider initialization

(SET_DATA_PROVIDER_I) (optional)

If you use this attribute, the initial data provider settings in the Web template to be inserted will be overwritten.

Note

All executed attributes cannot be changed using command URLs.

For more information about using the Web Template  Web item and its functions, see Structure linkWeb Template.

 

 

 

 

 

 

Leaving content frame