Creating HTML Templates
Use
For screen-based Web applications you can select the transaction screens for which an HTML template should be explicitly generated. Generating templates explicitly is useful if the SAP GUI features are insufficient for your needs and you would need to adapt the standard generated template anyway and you would like to improve the layout. This is the case for example when you want to insert hyperlinks.
Prerequisites
You must already have created the corresponding Internet service.
Procedure
To create an HTML template from the tree display in the object list:
-
Right-click the name of the service.
-
From the context menu, choose .
The system displays the Web Application Builder: Copy HTML Template dialog box.
-
Enter the theme for the service and define the other options.
The other definitions depend on the type of Internet service. For more information, see Creating an Internet Service.
For a screen-based Web application choose Generate HTML from screen and specify the screen number for which the HTML template should be generated using the F4 key. During generation, the static screen information is analyzed and an appropriate HTMLBusiness function is displayed for each screen element.
You can change the appearance of the generated HTML page by selecting a generation style.
Generation style
Meaning
Classical
The template is generated by using HTML tags. The screen fields (values, labels, ...) are referenced using the field labels with the same names and their attributes with the assistance of HTMLBusiness expressions and statements. The screen elements are positioned with HTML <p> tags and not with absolute specifications. See Example.
HTML business
The template is generated by using HTML tags and HTMLBusiness functions. The layout of the screen elements is analogous to the ITS WebGUI. However, the screen elements are always positioned using <p> tags. See Example.
WebGUI
The template is generated by using HTML tags and HTMLBusiness functions. Both the layout and the positioning of the screen elements is analogous to the ITS WebGUI. Positioning is defined using absolute values. See Example.
ITSmobile
You may create the new generation style ZMYGENMOBILE with the class CL_ITS_GENERATE_HTML_MOBILE as a template for the generator. You then use this new style instead of the default generation style Mobile Devices to address your own generator when creating templates. See Example.
-
Choose
to save.The system then displays the Create Object Directory Entry dialog box.
-
Assign a Package to the template and choose
.
Result
The generated template appears in the object list under Templates. The generated contents of the template are displayed in the Editor.

