Connector for SAP Business Suite - SAP Script Generator
Installation
SAP RFC Script Repository
The "SAP Script Generator" generates executable Groovy and Velocity scripts for Intrexx based on the interfaces of SAP function modules. The script just needs a few minor adjustments (e.g., assigning parameters). The generated script is stored in an Intrexx data group and is therefore available later even without a connection to the SAP system. In addition, the SAP documentation for the function module is stored in this data group. Click "SAP RFC Script Repository" here.
You can create a new Groovy script by clicking "New Script" at
.
The following information is required here:
-
SAP Connection
The default setting here is "saperp."
Background: The "SAP Business Suite Connector" application can only access connections named "saperp." For more information on this, see the " Creating a Connection" section.
-
SAP Function Module
Click "Search" at
to search for a function module here. If no input is provided, a list of all function modules is displayed. For our example, we'll use the function module "BAPI_SALESORDER_CREATEFROMDAT2." -
Language
The language you select—for example, "English"—affects the generated comments and the function module documentation. For our example, we'll use the language "German."
-
Script Type
Select here whether the script should be generated in Groovy or Velocity. For our example, we'll use the "Groovy" script type.
-
Stateful
-
Login Type
Select the appropriate option here.
-
RETURN Parameter
BAPI functions typically contain a table parameter of the "BAPIRET2" structure that is of the export type. This table returns messages to the caller. If this is detected or entered manually here, special coding for messages is generated automatically.
-
Using BAPI Commit
The generated script includes an additional call to the "BAPI_TRANSACTION_COMMIT" function module. This setting should be configured for our example.
-
Tables: Evaluate Prefix
With table parameters, it is not always clear whether these tables are used as import or export parameters. That is why the generated script includes code snippets for each table that handle the export and import. In some function modules, the type of table is identified by IT_* or ET_*. This flag enables the automatic removal of redundant code. This setting should be configured for our example.
-
Trace off
In the Groovy script, the variable "g_log" is used to write entries to the log file, which can be accessed in the Processes module via the main menu item Process / Analyze Log File. If this setting is disabled, the use of "g_log" is prevented. This setting should be configured for our example.
Click "Generate" to create the desired script.
The script is displayed in the table.
View Details
Clicking this button loads the input page with additional information.
If necessary, you can delete the generated script by clicking "Delete."
News
The individual steps involved in script generation are displayed here.
Script
You can copy the generated script here. Clicking the "More" link opens another window that displays the code formatted in the corresponding scripting language.
You can copy the finished script here as well.
Function Module Documentation
Clicking the "More" link opens another window that displays the function module's documentation.
Run the generated script
Loads another page, as described above, from which the script can be copied.
Open the documentation
Loads another page that displays the function module's documentation.
More Information
SAP Trust Manager SSO Configuration
API Description, Part 1 - Overview
API Description, Part 2 - SAP Portal Plugin
API Description, Part 3 - Implementing Custom Processing Modules
API Description, Part 4 - Sample Code
Developer's Guide, Part 2 - Integration Scenario: SAP External Data Group
Developer's Guide, Part 3 - Integration Scenario: Scripting
Developer's Guide, Part 4 - Personalized SAP Access / Single Sign-On (SSO)





