Connector for SAP Business Suite - SAP Script Generator

Installation

SAP function modules can offer very complex parameters. To prevent errors when generating the script, a script generator is provided with Intrexx. You can easily import the application that contains it into your portal. You will find the import file "sap_business_suite_connector.zip" in the installation directory "adapter/sap". The prerequisite for using the application is the installation and configuration of the connector for SAP Business Suite. Further information on the Script Generator can also be found in the Developer Manual Part 1.

SAP RFC script repository

The "SAP Script Generator" generates executable groovy and velocity scripts for Intrexx from the interfaces of SAP function modules. The script requires only minor adjustments (e.g. mapping of parameters). The generated script is stored in an Intrexx data group and is therefore still available even without a connection to the SAP system. Additionally, the SAP documentation of the function module is stored in this data group. Click here on "SAP RFC Script Repository".

A new Groovy script can be created by clicking on "New script".

The following entries are required here:

  • SAP connection

    The default setting here is "saperp".

    Background: The "SAP Business Suite Connector" application can only access connections with the name "saperp". Further information on this can be found in the section Creating a connection.

  • SAP function module

    Click on "Search" to search for a function block. If no entry is made, a list of all function blocks is displayed. The function module "BAPI_SALESORDER_CREATEFROMDAT2" is used for our example.

  • Language

    The selection of the language, e.g. "English", affects the generated comments and the generated function block documentation. For our example, the language "German" is used.

  • Script type

    Here, select whether the script should be generated in Groovy or Velocity. The "Groovy" script type is used for our example.

  • Stateful

  • Login type

    Select the applicable option.

  • RETURN Parameter

    BAPI functions usually contain a table parameter with export character of the structure "BAPIRET2". Messages are returned to the caller in this table. If this is recognized or manually entered here, special coding for messages is also generated.

  • Use BAPI Commit

    The generated script contains the additional call of the function module "BAPI_TRANSACTION_COMMIT". This setting is defined in our example.

  • Tables: Evaluate prefix

    With table parameters, it is not always obvious whether these tables are used as import or export parameters. For this reason, parts of code are generated in the generated script for each table that map the export and import. In some function modules, the nature of the table is denoted with IT_* or ET_*. The flag activates the automatism that superfluous code sections will be left out. This setting is defined in our example.

  • Trace from

    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 Process / Analyze log file. If the setting is deactivated here, the use of "g_log" is prevented. This setting is defined in our example.

Click on "Generate" to generate the desired script.

The script will now be shown in the table.

Show details

Click on this button to load the edit page with more information.

If required, the generated script can be deleted again by clicking on "Delete".

Messages

Each step of the script generation is shown here.

Script

The generated script can be copied from here. Clicking on the "More" link opens another window from which the code is displayed formatted in the corresponding script language.

The script can also be copied from here.

Function module documentation

Click on the "More" link to open another window in which the documentation for the function block is displayed.

Call up generated script

Loads another page as described above, from which the script can be copied.

Call up documentation

Loads a new window where the documentation of the function module will be shown.

More information

General

Installation

Create connection

Integration in applications

SAP Trust Manager SSO configuration

API Description Part 1 - Overview

API Description Part 2 - SAP Portal Plugin

API description part 3 - Implementation of own processing modules

API description part 4 - sample coding

Developer manual part 1

Developer's Guide Part 2 - Integration scenario SAP external data group

Developer's Guide Part 3 - Scripting integration scenario

Developer Manual Part 4 - Personalized SAP Access / Single Sign On (SSO)

Developer's Guide Part 5 - Addons

Developer manual Appendix

Developer manual - Sample coding