Viewing files in non-SAP windows

In the following example, we will view a GIF image inside a non-SAP window that we will call from the script. To demonstrate this operation, please do the following.
  1. Go to the Easy Access screen in SAP.
  2. open the 'SAPLSMTR_NAVIGATION.E0100.sjs' script file, and enter the following code. Create the script file if it does not already exist. We are using the image file 'test.jpg' but you can use any image file as long as it is one of the supported formats.
    view('test.jpg');

    Since we are not specifying any on-screen coordinates or other parameters, the image will be displayed in the application that the OS specifies for that type of file. Since the image is a JPG, it will be displayed in Windows Picture and Fax Viewer as shown below:

  3. Save the changes and refresh the SAP screen.
  4. The aplication you have selected to open images will launch and display the image as shown below. In our example, we have designated the Windows Picture and Faz Viewer.