At design time, using the toolbar menu option, you can interrogate an SAP endpoint
for IDOC metadata and from that metadata generate a Flat File Schema.
WARNING: In order to connect to the SAP System from Studio, you
must download
and install the SAP Jar file and DLLs onto your Windows development workstation.
If you receive or send your SAP data as a file through a SAP File
Port to the SAP system, you must use the toolbar menu option during design time to generate
a Flat File Schema for your IDOC metadata and use the Read
Flat File and Write Flat File activities
to read and write the SAP data during run time. For more information,
see the following two example orchestrations.
If you receive or send your SAP data directly from the SAP system
using an RFC port, you must use the
SAP Receive IDOC and SAP
Send IDOC activities.
Using the Generated Flat File Schema during Run Time
During
design time, you use the toolbar menu option, to generate a Flat File Schema
that describes the SAP data you receive or send to the SAP File Port.
This section describes how that Flat File Schema is used by the following
two example orchestrations during run time.
Receive SAP Flat File Data from a SAP System Using
an SAP File Port.
This first example orchestration receives
SAP data from a SAP System during run time, using the following activities:
- An SAP data file is placed into a directory that the FTP
Poll Directory activity is polling in. This starts the
processing of the orchestration job.
- The FTP Poll Directory reads the SAP Flat
File data and saves the result into a string variable.
- Using the Flat File Schema generated during design time using
the toolbar menu
option, the Read Flat File activity converts
the SAP data stored in the string variable to XML data and saves the
XML data into an XML variable.
- The Database Insert Rows activity maps
the XML data from the XML variable to some database rows and inserts
these rows into a database
Send SAP Flat File Data From a SAP System Using an
SAP File Port
This second example orchestration sends SAP data
to a SAP System during run time, using the following activities:
- Data is inserted into a database, triggering the Database
Get Inserted Rows activity to start processing.
- The Database Get Inserted Rows activity
gets the data that was inserted into the database and coverts it to
XML data.
- The Write Flat File activity converts the
contents of the XML variable to the SAP Flat File data valid against
the Flat File Schema generated during design time using the toolbar menu option.
- The FTP Put File activity writes the Flat
File data to a file into a directory.
- The SAP System reads the data from the file.
To generate a Flat File Schema from an IDOC:- Select from the toolbar
menu. The SAP IDOC Flat File Schema Generator Step 1 of
2 dialog box shows.
- Enter the SAP connection information as described in the following
table:
Field |
Description |
Location |
|
Host Name |
Specifies the IP address or the workstation
name that contains the SAP system. |
System Number |
Specifies the number that identifies the specific
instance of the SAP system that Studio is to connect to. Your SAP
administrator must supply this information. |
SAP Client |
Specifies a number that identifies Studio as
a client for the SAP system. Your SAP administrator must supply this
information. |
Login |
|
User Name |
Specifies the user name to use when connecting
to the SAP system. |
Password |
Specifies the password to the user name when
connecting to the SAP system. |
- Click Next. The SAP IDOC Flat
File Schema Generator Step 2 of 2 dialog box is displayed.
- Select an IDOC Type and optionally an IDOC SubType using one of
the following options:
- Click [...] to browse for the IDOC Type,
the IDOC SubType, or both. The IDOC List dialog
box opens with the list of IDOC Types and IDOC SubTypes available
on the selected SAP endpoint. Select an IDOC Type, the IDOC SubType,
or both and click OK.
- Enter the IDOC Type, and optionally the IDOC
SubType directly into the respective fields.
- Select the Bundled check box if the incoming
IDOC contains more than one instance of the IDOC message of the same
IDOC Type and IDOC SubType. If Bundled is checked,
the IDOC element in the generated Flat File Schema is a repeating
element.
- Click Finish.
If the generation of the Flat File Schema was successful, the
Flat File Schema is shown in the
Flat File Schemas folder
of the
Project tab.