Show TOC

imageURL FunctionLocate this document in the navigation structure

Use

Purpose

Generates dynamic links to graphics files, based on language and theme.

Syntax

imageURL(~type=<expression>, ~name=<expression> {,~theme=<expression>,} {,~language=<expression>})
            

Parameters

Parameter

Meaning

~name

Graphic file name.

~type

Graphic file type.

~language

Current logon language.

~theme

Theme.

Description

Note

From ITS 1.1 (R/3 Release 3.1H), the imageURL function is obsolete.

In later versions, you should use the mimeURL Function function instead. Currently, imageURL is supported only to ensure compatibility with existing HTML templates.

The imageURL function specifies links to graphics files. These files are not stored in the ITS directory but in the directory of the HTTP server.

When specifying links to graphics files, you cannot specify a simple relative URL. The URL must contain parameters that tell the type of graphic file and as well as the service and theme to which it belongs. imageURL also lets you access images according to their language. This allows the management of multi-lingual images.

Except for the name, specify all parameters relative to the sub-directory within the ITS directory system. The URL generated depends on these values and the ~ URLimage parameter defined in the global service file global.srvc. The imageURL function creates the basic URL as follows:

<~URLimage>/<~type>/<~language>/<~theme>/<~name>
            

or specifically:

/<HTTP server root directory>/SAP/ITS/GRAPHICS/<type>/<language>/<theme>/<name>
            

If the ~Language and ~Theme parameters are not specified, the values from the service description or the current logon language are used. The values assigned to the parameters are taken without checks from the ITS to make up the URL. In this way, you can create further sub-directories (linked to the graphics directory) and they can be addressed via the imageURL function.

Values that are not defined or are empty are removed from the directory structure.

Example

Here are some examples (where ~language is EN and ~theme is not defined):

  1. <img src="`imageURL(~type="backgrounds", ~name="marmor.gif")`">

    results in:

    <img src="/sap/its/graphics/backgrounds/EN/marmor.gif">

  2. <img src="`imageURL(~language="", ~name="marmor.gif")`">

    results in:

    <img src="/sap/its/graphics/marmor.gif">

  3. <img src="`imageURL(~theme="ides", ~name="marmor.gif")`">

    results in:

    <img src="/sap/its/graphics/EN/ides/marmor.gif">

  4. <img src="`imageURL(~type="backgrounds", ~theme="ides", ~language="DE", ~name="marmor.gif")`">

    results in:

    <img src="/sap/its/graphics/backgrounds/DE/ides/marmor.gif">