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". In order to use the application, the Connector for SAP Business Suite must be installed and configured. 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 an executable Groovy and Velocity script 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 on "SAP RFC script repository" on this page.

A new Groovy script can be generated 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 the field is empty, every function module will be listed. For our example, the function module "BAPI_SALESORDER_CREATEFROMDAT2" will be used.

  • Language

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

  • Script type

    Here, select whether the script should be generated in Groovy or Velocity. We will use Groovy in our example.

  • Stateful

  • Login type

    Select the applicable option.

  • RETURN param

    BAPI functions usually contain a table parameter (with an export nature) from the structure "BAPIRET2". Messages are returned to the caller in this table. If this is recognized or manually provided, special coding will be generated for the messages.

  • Use BAPI commit

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

  • Tables: Analyze prefix

    With table parameters, it is not always clear whether these tables are used as import or export parameters. Therefore, code sections are generated for each table which depict 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 off

    The variable "g_log" will be used in the Groovy Script to write entries to the log file; the log file is available from the Process menu / Analyze log file in the Processes module. If this setting is deactivated, the use of "g_log" will be 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.

View details

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

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

Messages

Each step of the script generation is shown here.

Script

The generated script can be copied from here. If you click on the "More..." link, another window will open where the code will be shown in the respective scripting language.

The script can also be copied from here.

Function module documentation

If you click on the "More..." link, another window will open where the documentation of the function module will be shown.

Call up generated script

Loads a new window 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

Creating a 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 - Implementing custom processing modules

API description Part 4 - Sample coding

Developer's Manual part 1

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

Developer's Manual Part 3 - Scripting integration scenario

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

Developer's Manual Part 5 - Add-ons

Developer's Manual Appendix

Developer's Manual - Example Coding