Managing Templates

Use

You can change the View in the ALV Grid Control. If the data are displayed in an Excel view, the Excel sheet view is based on template. Normally, this is a standard template delivered by SAP. The templates work in the background and you do not have to do anything to use them. If you want to use other templates, note the following:

Background

The Excel templates are connected to a layout and are saved together with this layout. These templates are stored in the Business Document Service.

The following types of template are available:

  • Templates delivered by SAP available to all users (object key SAP_STANDARD_TEMPLATE)
  • Templates for all customers available to all users (object key CUS_STANDARD_TEMPLATE)
  • Templates you have created that only you can use

Procedure

Selecting templates

  1. To select an Excel template for your Excel view, choose ® Change layout.
  2. In the Change Layout dialog box, choose the View tab page.
  3. To display the available Excel templates, choose View as under Excel.

A list of the available Excel templates appears. You can restrict this setting according to type and language using the toolbar.

  1. To choose a template, select a template and choose . The template is added to the Selected template list. To undo this step, choose .
  2. To apply this template for your Excel view, choose .
  3. In the Save Layout dialog box, you assign your template to a layout.

If the template you chose is the basis of the Excel view, you must select the layout to assign to the template. If this prerequisite is met, Excel will always use your template.

Creating your own templates

  1. To create an Excel template for your Excel view, choose ® Change layout.
  2. In the Change Layout dialog box, choose the View tab page.
  3. Select an SAP standard template and choose to check the document out of the Business Document Service (BDS).
  4. Save the template and tailor it to your need.
  5. To add your tailored template to the template selection, choose to check the template into the BDS.
  6. Enter the path where your template is stored and confirm your entry. The new document is uploaded from your local hard disk and checked into the BDS.
  7. To use the template for your Excel view, proceed as described under Selecting templates.
  8. Assign your template to a layout by choosing and Saving Layout.

To delete your own templates from the selection list, choose .

Creating templates for all customers

  1. To create a template for all customers, start report BC_BDS_UPLOAD.
  2. On the following screen, enter the Language and select CUS STANDARD Template.
  3. Enter the path where your template is stored and confirm your entry. The template is added to the selection list (with object key CUS_STANDARD_TEMPLATE) on the View screen of the Change Layout dialog box.
  4. To use this template for your Excel view, proceed as described under Selecting templates.

Deleting templates from the BDS

From time to time, you will need to delete the following templates :

  • Temporary templates
  • Templates not assigned to a layout (such as due to transports of the ALV layout)

To delete the templates, run report BC_BDS_GUIDS in the ABAP Editor.

On the Delete ALV Objects from the BDS screen, you can display and delete templates from both categories.

To display the existing objects in the BDS, proceed as follows:

  1. Ensure Simulation is selected.
  2. Choose the templates by selecting the relevant check boxes.
  3. Choose .

To delete existing objects from the BDS, proceed as follows:

  1. Deselect Simulation.
  2. Choose the templates by selecting the relevant check boxes.
  3. Choose .