RFC

Example: Displaying additional data with RFC

You can use GuiXT+ InputAssistant in order to present additional information on R/3 standard screens. There are essentially 2 different methods available: you can use RFC, or you can use an InputScript. In this example we use the RFC technology.

The advantage of the RFC solution is that it is very flexible and powerful. You are not restricted to the information found on R/3 standard screens, since you can use ABAP coding and SQL to read the necessary information. Compared to the modification of standard screens and standard programs, it is a clean solution, without the risk of affecting the R/3 application logic. On the other hand, it requires an extra communication step for each RFC call contained in the script.

Please install GuiXT version 4.2S or higher for this example.

1 SAP standard screen Let us assume that you want to display some additional information. For example, some special material attributes, not contained in the SAP standard, that you store in separate database tables. You want to integrate this information into the standard MM03 screen.

Transaction MM03, Basic data 1

As an example we want to display the manufacturer information.

(This information is also stored in the standard table MARA, but for our example it makes no difference)

2 Additional information:

Manufacturer

The user sees the screen above; your own attribute box Manufacturer is fully integrated into the standard screen. It is only displayed when the Basic data 1 page is active in this tabbed dialog.

3 GuiXT script

(based on R/3 Rel. 4.5B)

In the script you first look for the correct transaction MM03 and the correct page Basic data 1.

The RFC call uses the variable &[Material] from the screen. The parameter is passed to the ABAP function as IN1, the export parameters are OUT1 and OUT2 (see function definition below).

After the call you can use the string variables &[Matline1] and &[Matline2] in all GuiXT commands. You could, for example, also return a product image file name that you display via the Image command.

4 SE37 Definition of RFC function The ABAP function module is implemented in R/3, Transaction SE37 (Function Builder).

Do not forget to mark the "RFC" button in the function module definition.

5 Export-Parameters

The Import-Parameter IN1 is defined in the same manner. The field SY-LISEL is a 255-byte character field which is always available. You could use any other reference field of type C as well.

6 ABAP coding

Here you can read R/3 standard tables or your own database tables. You can also call other function modules.