Integrating external data

There are several ways in which GuiXT can help you to integrate external data sources into SAP ERP. Here we describe the techniques together with their pros and cons:

A You display a small image on the SAP ERP screen. When the user clicks on the image, a program is started that displays additional data in a separate window. The program parameters are taken from the current SAP ERP screen.

B Use the GuiXT html Viewer and invoke a program (e.g., CGI) on a server (intranet or internet) that reads the external data and returns an html page with this data.

C You use the GuiXT call statement in order to call a dll function. This dll function returns some strings that you display with GuiXT Text commands directly in the SAP ERP screen. The dll function can also generate an html file or an rtf file that you integrate into the SAP ERP screen with the GuiXT Viewer.

D You display your own pushbutton on the SAP ERP screen. When the user presses the button, an InputScript is processed (see InputAssistant). The InputScript can do various things: get data via other SAP ERP screens, call ABAP functions via RFC, call dll functions. The InputScript sets GuiXT variables that can be displayed with Text statements or with the GuiXT Viewer template-function.

You will need the following GuiXT components (version 2000 Q3 01 or higher for the template-function of the Viewer in B-D):

A GuiXT
B GuiXT+Viewer
C GuiXT (perhaps Viewer as well)
D GuiXT+InputAssistant (perhaps Viewer as well)


A (via an image)

Example:

Image (20,1) “moreinfo.gif” Start=“\\P450\prog1\sqlread1.exe &[Material]“

Advantages:

  • You can use a programming language of your choice for the .exe program
  • The display of the external data is completely independent of the SAP ERP screen layout
  • The new window remains visible even if the user leaves the current SAP ERP screen

Disadvantages:

  • The user has to click on the image first
  • You cannot use values that the user has just entered unless you first press the “Enter” button; (you will always get the last value that SAP ERP displayed in this field).

B (with GuiXT html Viewer)

Example:

View (16,1) (24,120) template=“\\P450\html\mat1.html”

All &[...] variables in the html file are replaced with their current values. You can also use URLs in the html file that carry these values to CGI programs, or you can have Java script coding in the html file that works with the SAP ERP value.

Advantages:

  • The HTML display is directly integrated into the SAP ERP screen
  • You can use html tools in order to design the layout, you can use Java script in the html file for sophisticated features
  • You can offer the user further actions (within html or going back to SAP ERP), or hyperlinks to the internet
  • The user can print locally what he sees

Disadvantages:

  • You have to know the necessary html techniques for reading external data from html

C (with dll-call)

Example:

Call “extinfo” dll=“gxexit” In=“&[Material]“ Out=“Info1″ Out=“Info2″ Out=“Info3″
Text (16,1) “External Info1″
Text (16,30) “&[Info1]“
Text (17,1) “External Info2″
Text (17,30) “&[Info2]“
Text (18,1) “External Info3″
Text (18,30) “&[Info3]“

or

Call “extinfo” dll=“gxexit” In=“&[Material]“ Out=“Filename”
View (16,1) (24,120) “&[Filename]“

Advantages:

  • The display is directly integrated into the SAP ERP screen
  • You can use html or rtf functionality for the display
  • You can offer the user further actions (within html or going back to SAP ERP), or hyperlinks to the internet
  • The user can print locally what he sees

Disadvantages:

  • You have to know how to implement the dll (normally done in C++, VB is possible as well)

D (with InputScript)

Example:

Pushbutton (16,1) “External data” Process=“MatExtData.txt”
   using Material = [Material]
if V[MatExtData=X]
   View (16,20) (24,120) template=“MatExtData.html”
endif

In this case the InputScript would set some variables that are used in the template-file. The InputScript could use various techniques (like dll-calls) in order to set the variables

Advantages:

  • The display is directly integrated into the SAP ERP screen
  • You can use html or rtf functionality for the display
  • You can offer the user further actions (within html or going back to SAP ERP), or hyperlinks to the internet
  • The user can print locally what he sees
  • You can mix additional SAP ERP information and external data sources
  • You get the values that the user just entered

Disadvantages:

  • You have to know how to implement the dll or the ABAP function if you want to use them in the InputScript
  • The pushbutton always invokes a function (Default: Enter-button) in SAP ERP.

Integrating external data