Start of Content Area

Background documentation Handling Web Icons  Locate the document in its SAP Library structure

When user interfaces are created for Web applications graphical elements of a fixed size for multiple use are needed, for example for using on buttons or as status icons on screens or in lists. These icons are used as the graphical image of an object or a function. SAP provides predefined Web icons for the standard objects and functions that are used most frequently.

Web Dynpro ABAP provides various techniques to resolve URLs in UI elements (for instance, Image.source):

      Class CL_WD_WEB_ICON is provided to access Web icons.

      New Web icons can be accessed via ~IconAlias , see the table containing supported URL formats.

      A subset of new icons was already available in earlier releases, and had symbolic names starting with WEBICON_* .

Caution

The syntax WEBICON_* is deprecatedsapurl_link_0001_0001_0001. The earlier WEBICON_* names are mapped internally to the new Web icons. Note that the old SAP GUI icons (ICON_*) should no longer be used at all. At the moment there is still no check to find uses of old WEBICON_* and ICON_*. For compatibility reasons the earlier notations are included in the table below.

Supported URL Formats

Format

Description

Translation in

Example(s)

~IconAlias

Format of the new predefined Web icons

Uppercase letters

~Icon/Attachment

~IconLarge/AudioFile

~Pictogram/2PeopleDocCircularArrow

$NAME$ or $NAME$/path

$NAME$ refers to an entry in transaction SM59 for an HTTP connection (type G). If a path is specified, it is attached to the path prefix already defined. This is the only way absolute URLs can be used.

$NAME$ sequence in upper case letters, /path in lower case letters

$MY_HTTP_DESTINATION$/images/hello.gif

/path

Relative path details from a server to a MIME Repository entry. This entry begins with the root of the MIME repository. The URL is always loaded by the active server. If the path is a Web Dynpro path, its name is converted to an icon. Otherwise no checks to ensure the validity of the URL can be made. 

Lowercase letters

/sap/public/images/hello.gif

image.ext or folder/image.ext

Loads an image from the MIME folder of the active component. This is the short form of the following format.

 

s_lr_11417.jpg

hello.gif

images/hello.gif

{/NAMESPACE/COMPONENT}/image.ext or {/NAMESPACE/COMPONENT}/folder/image.ext

The image is specified relative to another component. It can, however, also be a separate component. This means that the image is stored in the MIME folder of the component in question. For components within the SAP namespace the /NAMESPACE/-sequence is not specified.

Namespace and component in upper case, path in lower case.

{WDR_TEST_EVENTS}/s_lr_11417.jpg

 

Note

Note that except for /path (see table) no relative paths are supported, that is no input in form ./path or ../path.

 

For compatibility reasons the existing notations for URL formats

Format

Description

Translation in

Example

ICON_<NAME>

Format of older SAP GUI icons See also NAME column of table ICON.

These icons are not optimized for use in the Web.

Uppercase letters

ICON_CRITICAL

WEBICON_<NAME>

Deprecated format This syntax has been replaced by the notation ~IconAlias, see previous table

Uppercase letters

WEBICON_CRITICAL

[WWWDATA]/objectName

Loads an image from the SAP Web repository of ITS.

 

[WWWDATA]/HELLO_IMAGE

 

Programming Interfaces

The following public APIs are available for your developments:

      Value help: Function module WDY_WB_VD_ICON_PICKER

      Data element: Web icon aliases WDG_UR_WEB_ICON_ALIAS

      Domain: Web icon aliases WDG_UR_WEB_ICON_ALIAS

Test

You can find a test application in the system in component WDR_TEST_WEB_ICONS.

 

 

End of Content Area