Connector for SAP Business Suite - SAP Script Generator
1. Installation
SAP function modules can provide very complex parameters. To prevent errors
when generating the script, a script generator is provided with Intrexx.
The application, which contains this, can be imported
into your portal as usual. You can find the import file
sap-business-suite-connector.zip
in the installation directoryadapter/sap.
To be able to use the application, the Connector for SAP Business Suite needs
to be installed and
configured.
2. 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
Data source of the SAP system
SAP function module
You can search for a function module by clicking on
Search.
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 language selected, e.g. English,
modifies the generated comments and function module documentation.
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 main menu
Process / 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.
3. Notifications
Each step of the script generation is shown here.
4. 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.
5. 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.