Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
thomas_szcs
Active Contributor
0 Kudos

Since Web Dynpro is a web based technology as it uses HTTP as its underlying protocol, URLs play a major role when it comes to add images or to refer to other kinds of external or internal resources. Web Dynpro ABAP offers many options here.

At all the places where URLs can be used, the target can be described using one of the following notations:

  • file.ext for local files of a component
  • path/file.ext for local files of a component inside sub folders
  • /path/file.ext for server relative paths
  • http://domain/path/file.ext for absolve paths
  • {WD Component}/path/file.ext for resources inside other components
  • {WD Application} for starting another Web Dynpro application
  • $RFC connection$/path/file.ext for using a sm59 RFC connection
  • [WWWDATA]/path/file.ext for accessing content inside of the SAP Web Repository
  • @xx@, ICON_... or WEBICON_... for standard icon resources

The @xx@ notation cannot be used at design time, but works at runtime. The reason is that we would like to enforce developers to use semantic names rather than cryptic ones at design time while preserving the possibility to connect to existing business logic. There, developers use the icon_* constants, which have values of type @xx@. Additionally, there are many applications that store these values into their database tables and would like to reuse them. Hence, Web Dynpro ABAP supports this scenario.

Especially useful is the possibility to specify the URL of a Web Dynpro application as {WD Application} as the name of the actual URL depends on many factors, such as if the application had a namespace or not. A developer should always use this notation instead of trying to build an URL by concatenating server name, path and application name into an URL string. Of course, URL parameters are supported.

There is a sample application called SWDP_TEST_ICON_SOURCES. It ships with NW2004s and uses images to test all the above mentioned notations. Feel free to copy and paste. 😉

Our documentation of course contains this information as well. You can find it here.

1 Comment