Professional Documents
Culture Documents
Version 6.0.0
SC18-9954-01
WebSphere DataStage Pack for SAP R/3
®
Version 6.0.0
SC18-9954-01
Note
Before using this information and the product that it supports, read the information in “Notices” on page 103.
Terminology
The terms used in the IBM WebSphere DataStage Pack for SAP R/3 to describe all
the stages are defined below:
Term Description
ABAP Advanced Business Application Programming. The language developed by
SAP for application development purposes. All R/3 applications are
written in ABAP.
BAPI Business Application Programming Interface. A precisely defined interface
providing access to processes and data in business application systems.
BAPIs are defined as API methods of SAP objects. These objects and their
methods are stored in the Business Objects Repository.
BOR Business Object Repository, which is the object-oriented Repository in the
SAP BW system. It contains, among other objects, SAP Business Objects
and their methods.
Business Object
The representation of a business entity, such as an employee or a sales
order, in the SAP Enterprise system.
Control record
A special administrative record within an IDoc, one for each IDoc. The
control record contains a standard set of fields that describe the IDoc as a
whole.
ERP Enterprise Resource Planning business management software.
IDoc Intermediate document. An IDoc is a report, that is, a hierarchal package of
related records, generated by R/3 Enterprise in an SAP proprietary format.
An IDoc, whose transmission is initiated by the source database, exchanges
data between applications.
IDoc type
Named metadata describing the structure of an IDoc that is shared across
databases. It consists of a hierarchy of segment record types.
MATMAS01
An example of an IDoc type.
The ABAP Extract stage lets your company maximize its existing investments in
large ERP systems by complementing SAP standard software and consulting
services. It does this by automatically generating the ABAP program to extract data
from the R/3 Repository. The ABAP Extract stage lets users of all levels efficiently
build an extraction object, then generate an extraction program written in the SAP
proprietary ABAP programming language. Or, you can use an SQL query to
generate the ABAP program.
See the Terminology section for a list of the terms used in this section.
Functionality
The ABAP Extract stage has the following functionality and enhancements:
v Lets you choose and define SAP connections using the GUI. You can select an
IBM WebSphere DataStage connection to SAP instead of entering the information
into the stage interface.
v Uses the ABAP Program page for all ABAP-related functionality.
v Lets you view the development status of the ABAP program.
v Lets you view referenced and referring tables.
v Lets you use the SQL Query Builder or an extraction object to generate the
ABAP program.
v Lets you overwrite the ABAP program as you save it to R/3.
v Uses the Data Transfer Method page for the functionality of the data transfer
methods.
v Uses the functionality of the former Access page for RFC-connection failures as
you exit the stage editor.
v Lets you synchronize and validate R/3 columns and WebSphere DataStage
columns.
v Supports NLS (National Language Support). For information, see WebSphere
DataStage Server Job Developer Guide.
v Supports the SAP R/3 remote function call (RFC) data transfer method on
Unicode systems.
ABAP program is automatically generated to extract data from the SAP R/3
repository. This is done by the ABAP Extract stage and is explained below:
1. Link 1. The GUI client component logs on to the SAP R/3 Enterprise
application server and retrieves metadata information.
2. Link 2. The GUI client component reads and writes job properties (for example,
extraction object, ABAP program, logon information, and so on) between the
GUI client component and the WebSphere DataStage repository.
3. Link 3. The runtime server component reads job properties from the
WebSphere DataStage repository.
4. Link 4. The runtime server component makes a remote function call (RFC) to
run the ABAP program and processes the generated data set.
Installation prerequisites
In addition to the software requirements for the Pack, the following are required
for installing the ABAP Extract stage:
v FTP server on the machine where the temporary extraction files from the R/3
Enterprise are stored
v Database account with read access to the R/3 Enterprise data dictionary tables
The RFC source file (ZDSRFC.TXT for non-unicode and ZDSRFCU.txt for unicode
SAP Systems) required to install the RFC is on the same CD as the GUI client
component. The text file is in the RFC directory.
The R/3 Administrator must install these two components by using the Transport
Management System (Transaction STMS), which is the recommended method
described in the next section. You can also create them manually by following
step-by-step procedures (see the following instructions and those in Creating an
authorization profile manually).
You can then import them within R/3 Enterprise by doing one of the following:
If you are importing at this level, you can do the following (instead of the previous
steps 3-7):
1. Log onto the target system and client as the R/3 Enterprise Administrator.
2. Create a development class named ZETL that is assigned to a transport layer
according to the system landscape for your company. You can use Transaction
SE80 to create this class.
3. Add the transport request to the buffer using the following syntax:
tp addtobuffer <transport request> <SID>
For example, tp addtobuffer P46K9 nnnnn DD1
4. Import the transport request using the following syntax:
tp import <transport request> <SID> client=<NNN>
where <NNN> is a client number like 800.
For example, tp import P46K9nnnnn DD1 client=800
5. Verify that the Z_RFC_DS_SERVICE RFC function module and
Z_DS-PROFILE profile are successfully imported and activated.
Creating a job
To create and build your job:
1. Create a WebSphere DataStage job using the IBM WebSphere DataStage and
QualityStage Designer Client.
2. Create a new ABAP Extract stage.
3. Define the properties for the ABAP Extract stage.
4. Define the R/3 Enterprise connection information.
5. Select the data transfer method.
6. Specify the ABAP program parameters.
7. Define the data to be extracted.
8. Compile the job.
You can change the default character set map defined for the project or the job by
selecting a map name from the list. This tab also has the following components:
v Show all maps. Lists all the maps supplied with WebSphere DataStage. Maps
cannot be used unless they are loaded using the WebSphere DataStage
Administrator Client.
v Loaded maps only. Displays the maps that are loaded and ready to use.
v Use Job Parameter . Lets you specify a character set map as a parameter to the
job containing the stage. If the parameter has not yet been defined, you are
prompted to define it from the Job Properties dialog.
v Allow per-column mapping. Lets you specify character set maps for individual
columns within the table definition. If per-column mapping is selected, an extra
property, NLS Map, appears in the grid in the Columns tab.
For more information about NLS or job parameters, see WebSphere DataStage
documentation.
Continue by creating an ABAP extraction stage that uses the RFC data transfer
method.
For best performance, define two MPP system nodes for each processor on the SAP
R/3 system.
See the description of configuring the parallel engine in IBM Information Server
Planning, Installation, and Configuration Guide for details.
7. Configure the remote shell test using the rsh command. For example:
rsh dsserv1 uptime
rsh dsserv2 uptime
8. Ensure that the file /etc/hosts has an entry for each node.
9. Review the description of the parallel engine configuration file in IBM
WebSphere DataStage and Quality Stage Parallel Job Developer Guide.
10. Enable ABAP parallel job execution on a non-conductor node in an MPP
system by creating an empty file named slave in the project directory on the
non-conductor node. For example, if the project is named sapr3 and the
conductor node is dsserv1, create the empty slave file on node dsserv2 as
follows:
/opt/IBM/InformationServer/Server/Projects/sapr3/slave
See IBM Information Server Planning, Installation, and Configuration Guide for
information about configuring MPP on Microsoft® Windows systems.
By default, a newly created stage uses the connection most recently selected by the
current user for other stages of this type. Since the number of R/3 systems
accessed by a given WebSphere DataStage installation is likely to be small, the
default connection is generally correct.
Extraction Object, Review Code, and Launch SAP GUI (formerly on the General
page) are now on the ABAP Program page.
The selected connection provides all needed connection and default logon details
to communicate with the corresponding R/3 Enterprise system. You can add new
entries here and modify or delete existing entries from the list of connections.
New, Properties, and Remove are administrative connection operations. They let
you manage the list of connections that is maintained on the WebSphere DataStage
server machine from this dialog:
v New. Click to open the Connection Properties dialog, which lets you define the
properties for the new connection. It is added to the list of connections. Here
you can specify SAP connection details and default logon details for the new
connection. The Connection and Logon Details page opens by default (see the
following section).
v Properties. Click to open the Connection and Logon Details page of the
Connection Properties dialog, showing the properties of the selected connection.
This is the same dialog that is opened when you click New, but in this context
the connection name is read-only (see Defining connection properties).
v Remove. Click to delete the selected connection after your confirmation.
Use the dialog to create a new SAP connection, or to view the properties of the
currently selected connection, depending on whether you open it using New or
Properties on the Select WebSphere DataStage Connection to SAP dialog
respectively.
Load balancing
Select Use Load balancing on the Connection and Logon Details page of the
Connection Properties dialog (see Connection and Logon details page) to balance
loads for SQL queries when connecting to the SAP R/3 system. Load balancing at
design time works as follows:
Use the Data Transfer tab on the Output page to transfer data. It is similar to the
Runtime page for the previous version of the ABAP Extract stage. It shows only
controls relevant for the selected transfer method.
This page displays the selected Data Transfer Method, which controls how to
process the data set. Choose one of three data transfer methods:
v CPI-C Logon. Default. Transfers data from the SAP application server directly to
the WebSphere DataStage server, without using FTP or other utilities.
The Local File → option has no effect, that is, no flat files are generated in the
SAP application server. The SAP user name must be the CPI-C user type.
v FTP. Uses the FTP service in the SAP application server to get the data set from
the SAP application. (The buttons for ABAP program loading in the former
version are now on the ABAP Program page.)
Choosing FTP enables the FTP Logon fields, which are required. Enter the path
name for the data file on the remote system to use during run time in Path of
Remote File. This path name is used to access the data file when you may not
have direct access to the data file. The data file contains the data extracted from
R/3. This file is transferred back to the WebSphere DataStage server system.
Alias for Remote Path. Optional. You cannot access the data file using the path
name in the Path of Remote File field, for example, if the system administrator
has restricted access to a directory in the path. In this case, use a relative path
name to access the file. If the WebSphere DataStage server cannot transfer the
data file using the path specified in the Path of Remote File field, it uses the
path in the Alias for Remote Path field to access the file.
Alternate Host Name. Specify an alternate host name for FTP to use as an alias
to access files on the application server’s machine (where the ABAP program
runs). This is necessary if, for security reasons, FTP cannot access files on the
application server’s machine using the application server name.
Run the program as a background process. Specifies whether to run ABAP
programs in the background (the default is cleared). For details, see Running
programs in the background.
Use SAP Logon Details. If selected for a CPI-C data transfer method, User
Name and Password are read-only and display the corresponding values from
the General page.
v Local File. Use this option if the file containing the data set cannot be accessed
using FTP. The resultant data set file can be placed on the WebSphere DataStage
server machine by the Administrator, and WebSphere DataStage can then access
it from there using the Local File option.
This includes program generation (formerly done using the Extraction Object
dialog on the Access General page), editing, saving, and validation.
Note: When you save the ABAP program to R/3, you see a warning if a
program with the same name already exists on the R/3 system (you can
overwrite the program).
You can also click Load Program to R/3, Save Program as File , Clear program,
Edit program , Editor options , or Validate program if appropriate.
The SQL Builder interface is the same as for other stages, for example, the Oracle
Call Interface stage.
If you select Build SQL Query as the Generation Method on the Output ABAP
Program page and click Build , the Build Open SQL Query dialog opens with the
Tables page on top.
The generated SQL is customized to match the specific SQL syntax of the source
database and conforms to the SAP proprietary Open SQL syntax used by ABAP
programs.
The first five pages of the Build Open SQL Query dialog correspond to a clause in
the generated SQL. The SQL page shows the complete SQL statement as
determined by the settings in the preceding pages.
Click > and the selected table appears in the Selected tables list.
Join Type determines the type of join (see Join to -> buttons) between two or more
specified tables as follows. The tree representation of join nesting is described later.
v Inner >. Adds the table using inner join.
v Left >. Creates other types of joins.
v Right >. Creates other types of joins.
Show Related Tables displays tables related to the selected table through foreign
or primary keys. The related tables are listed in two folders that appear in a tree
structure below the selected table. These folders are labelled Referenced Tables
and Referring Tables. When related tables are added to the join tree (Selected
Tables), default join conditions are created automatically based on the key
relationships.
The join condition and join type of the selected join are shown in controls below
the join tree. Through these controls, you can modify the properties of the join.
Each table entry in Available Tables includes both the name and the Short Text for
the table to help you identify the entries.
The fields in Available columns include the Short Text for each field to help you
identify the ones you want.
Click > and the selected columns appear in the Selected columns list.
The Agg menu includes these options: SUM, AVE, MIN, MAX, and COUNT. The
menu lets you add new columns that apply one of these functions to the selected
available column.
Columns in the Selected columns list can be reordered using the MOVE UP and
MOVE DOWN buttons.
Columns in the Selected columns list can be removed using the < (remove
selected) and << (remove all) buttons.
Click Find to open a dialog that lets you search for a field in Available columns or
Selected columns, depending on where the focus is when you click Find.
Use the Key column check box to specify which columns should be used as key
columns for the link.
When you click OK, the entire query is validated. The stage validates the syntax of
the Where and Having tabs and verifies the presence of at least one table and at
least one selected column. Errors are reported as warnings, but you can exit the
dialog without fixing the errors.
You can use WebSphere DataStage job parameters on the Where tab of the SQL
Builder by typing the parameter reference into one of the grid boxes. In this case,
the parameter references are in the standard format that is used elsewhere in
WebSphere DataStage (#PARAM#, where PARAM is the name of the job
parameter).
For example, the #LANG_LOW# and #LANG_HIGH# parameters specify the range
of values for the Where clause. You can click the SQL page to see the conversion of
parameter references to the format required by ABAP (see Build Open SQL Query
SQL page. This conversion is done automatically when the SQL is generated.
See Using job parameters for information about using WebSphere DataStage job
parameters with extraction objects.
When you click OK, the entire query is validated. The stage validates the syntax of
the Where and Having tabs and verifies the presence of at least one table and at
least one selected column. Errors are reported as warnings, but you can exit the
dialog without fixing the errors.
You can use WebSphere DataStage job parameters on the Having tab of the SQL
Builder by typing the parameter reference into one of the grid boxes. In this case,
the parameter references are in the standard format that is used elsewhere in
WebSphere DataStage (#PARAM#, where PARAM is the name of the job
parameter). You can click the SQL page to see the conversion of parameter
references to the format required by ABAP (see Build Open SQL Query SQL page.
This conversion is done automatically when the SQL is generated.
See Using job parameters for more information about using WebSphere DataStage
job parameters with extraction objects.
The Available columns are the ones selected on the Select page. The columns
listed higher in the Order by columns list have a higher precedence in the
resulting sort order. You can modify the precedence by using the MOVE UP and
MOVE DOWN buttons.
To change Ascending to Descending (or vice versa), click Ascending in the list
control. A combo box appears that allows changes.
The metadata is obtained directly from the R/3 system from which the data is
extracted.
The Open SQL statement is like the statement that appears in the generated ABAP
program, but without the INTO clause.
The SQL page displays the conversion of parameter references to the format
required by ABAP. This conversion is done automatically when the SQL is
generated.
Click OK to accept the SQL statement or Cancel to discard all the input.
Use any of the following methods to search for an SAP table to add to the
extraction object. Click the appropriate button, choose the appropriate command
from the Extraction Object Editor shortcut menu, or use the shortcut keys.
v Add tables from Search (Alt+s)
v Add tables from Module Tree (Alt+m)
v Add tables from Logical Database (Alt+l)
Before learning how to add a table, read the next section about navigation.
Navigation
When you navigate the SAP R/3 Module Tree or the SAP R/3 Logical Database
Tree, double-click an entry to expand it. Because R/3 Enterprise is such a large
system, load metadata only when you want to interact with the system.
In the Extraction Object Tree, the root is the highest level and the field is the
lowest level. Since WebSphere DataStage processes input as a rowset, the second
level must only have one table.
The following navigation guidelines pertain to the Build Extraction Object dialog.
Common operations have corresponding buttons and shortcut menu commands.
v You cannot delete the root.
v You can relocate a table by selecting and dragging it to the desired location.
Adding a table
1. Click Add Tables → From Search or choose Add Tables from the Extraction
Object Editor shortcut menu. The R/3 Table Searching & Adding dialog box
opens.
2. To find a table, do one of the following:
v Type a full or partial table name using the * or % wildcard in the Table
Name field. For example, you can type t00, t00*, or t00%. You can use * or %
interchangeably in one table name.
v Type a description in the Table Description field. You can type a full or
partial name using a wildcard (* or %). This name is case-sensitive.
v Create a combination of table name and table description values. Use the
AND or OR option buttons to specify the Boolean relationships among the
selection criteria.
Click Search. The Search Results for Table grid is filled in. The dialog box
name is replaced by ″Searching result: n entries found.″
3. Do one of the following:
v Highlight a table, then click Table Definition, or choose Table Definition
from the Table List Operations shortcut menu. The Table definition dialog
opens.
v Highlight one or more table columns, then click Add to EO Tree or choose
Add to Extraction Object from the Table Definition Operations shortcut
menu. The columns are added to the Build Extraction Object dialog. Close
the Table definition dialog.
v Click Print, or choose Print from the Table List Operations shortcut menu to
send the search results to the printer.
v Click Save As, or choose Save As from the Table List Operations shortcut
menu to save the search results to a flat file.
4. To view the table contents, click Table Content, or choose Table Content from
the Table List Operations shortcut menu. The Table Contents dialog box
opens.
The table content list on the left under Select Field for Selection Criteria
displays the associated column details. You can search for a string in the field
name or a description using the Find What field, the Direction list, and Find.
Using Find What is especially helpful for searching large tables.
You must specify selection criteria in order to view the table contents.
a. To add a single value, select the column for which you are specifying the
condition. Select a comparison operator from the Operator list under Single
Value Operation.
Type the comparison value in the Value field.
Click Add Single Value. The selection criteria is added to the SQL
Selection Criteria box.
Note: If you make an error in specifying the condition, you can remove
the condition from the SQL Selection Criteria box by clicking Clear
Condition. This removes the entire selection criteria definition from the
box. You can also manually edit the SQL condition.
c. If you do not specify any fields, this stage by default loads every field back
into the Fields for Selection list. If you use RFC to connect to the SAP
application server and the table is large (that is, the record length is large),
then you can load nothing back. In this case, make sure that the record you
want to view is less than 512 bytes long. After you specify the selection
criteria, click View Contents. A Table Content dialog showing the table
contents opens. The rows are displayed in 500-row lots.
Select one of the following using the buttons or commands on the Table
Content Operations shortcut menu:
d. Click Save As to save the table contents to a flat file using the Save As
dialog box.
e. Click Print to send the table contents to the printer.
Close this dialog and the Table Content dialog to go to the R/3 Table
Searching & Adding dialog box.
5. After you verify that you have the correct table, select the table from the grid in
your R/3 Table Searching & Adding dialog box, and click Add to Extraction.
Select one of the following using the buttons or the shortcut menu on the R/3
Table Searching & Adding dialog box:
v Select Save As to save the table columns to a flat file using a standard Save
As dialog box.
v Select Print to send the table columns to the printer.
6. Close the R/3 Table Searching & Adding dialog box. The Build Extraction
Object dialog now shows the added table.
Note: If you make an error in specifying the condition, you can remove the
condition from the ABAP SQL Condition box by clicking Clear Condition.
This lets you regenerate the program with all your custom insertions after you
modify the SQL query.
R/3 Enterprise
data type Description Examples
ACCP Posting period YYYYMM Type the value in single quotation
marks. Type a year and month in the
format YYYYMM, for example, `199906’.
CHAR Character strings Type the value in single quotation
marks, for example, `xyz’.
CLNT Client Type the value in single quotation
marks, for example, `800’ (three digit).
CUKY Currency key, referenced Type the value in single quotation
by CURR fields marks, for example, `USD’ for US
dollars, or `EUROS’ for Euros.
CURR Currency field, stored as Type a numeric value, for example,
DEC 500.00.
Validation is based on the data transfer method selected on the Data Transfer
Method tab of the Output page. (The system automatically supplies this data
transfer method information for the Runtime Validations dialog.)
FTP transfers
For FTP transfers, the following operations are considered:
v Data Transfer Method. The FTP Logon is validated using the FTP logon details
specified in the FTP logon section on the Data Transfer Method tab of the
Output page. The value specified in Application Server on the General tab of
the Output page is used as the FTP server. Path of Remote File is validated to
check if it has a value. If no value is specified in Absolute Remote Path and
Path of Remote File, an error occurs.
v SAP Connection/Logon. SAP connection and logon information is validated
based on the method selected to load and run the ABAP program. For Design
time or Manual Load and Manual Run, SAP logon information is not required
and is not checked. However, for a Runtime Load or when WebSphere
DataStage runs the ABAP program, the SAP connection and logon are validated
using the values specified on the General tab of the Output page.
v Check installed RFC. As for the CPI-C transfer type, the validation routine
checks whether the correct version of RFC (Z_RFC_DS_SERVICE) is installed
and activated on the R/3 Enterprise system.
v ABAP Options. Again, based on the method selected to load and run the ABAP
program, this section requires different validation sequences. For Design time
Load or Manual Load and Manual Run, the validation routine only checks
whether the ABAP program exists in the WebSphere DataStage repository. In the
case of Runtime Load or when WebSphere DataStage runs the ABAP program,
the validation routine also checks the syntax of the ABAP program.
CPI-C transfers
You can also perform validations for CPI-C data transfers. For these transfers, the
following operations are considered:
v SAP Connection/Logon. SAP connection and logon are validated using the
details specified on the General tab of the Output page. However, if you specify
CPI-C User Name and Password in the CPI-C logon details section, these values
are used instead. After a successful logon, the system also determines whether
the user type is CPI-C and indicates this with a message.
v Check installed RFC. This component is shipped with the Pack and must be
installed on the R/3 Enterprise system. The validation routine checks whether
the correct version of RFC (Z_RFC_DS_SERVICE) is installed and activated on
the R/3 Enterprise system.
v ABAP Options. Based on the method selected to load the ABAP program, this
section requires one of the following validation sequences:
– Design time Load and Manual Load. The validation routine only checks
whether the ABAP program exists in the DataStage Repository.
– Runtime Load. The validation routine also checks whether the ABAP
program is syntactically correct.
RFC transfers
When you validate RFC data transfers, the following operations are considered:
v SAP Connection/Logon. Validates the SAP connection and logon using the
details specified on the General tab of the Output page. After a successful logon,
the system also determines whether the data transfer type is RFC and indicates
this with a message.
v Check installed RFC. This component is shipped with the Pack and must be
installed on the R/3 Enterprise system. The validation routine checks whether
the correct version of RFC (Z_RFC_DS_SERVICE) is installed and activated on
the R/3 Enterprise system.
v ABAP Options. Based on the method selected to load the ABAP program, this
section requires one of the following validation sequences:
– Design Time Load and Manual Load. The validation routine checks whether
the ABAP program exists in the DataStage Repository.
– Runtime Load. The validation routine also checks whether the ABAP
program is syntactically correct.
The IBM WebSphere DataStage IDoc Extract stage, which lets WebSphere
DataStage capture IDocs from R/3 source systems to be used as source data for
WebSphere DataStage job data streams. It lets you browse R/3 Enterprise IDoc
metadata, select IDoc types to process, and extract the data from IDocs.
The IDoc Extract stage includes a set of tools and a custom GUI to passively
retrieve and process IDocs generated by R/3 Enterprise. It complements the
WebSphere DataStage ABAP Extract , which is described in part 1 of this guide.
You can use only standard SAP interfaces to access IDoc metadata and content. No
ABAP code is uploaded to R/3 source systems for IDocs.
NLS (National Language Support) is supported for the IDoc Extract stage.
Functionality
The IDoc Extract stage has the following functionality:
v Retrieval of IDocs generated by R/3 Enterprise as source data for IBM
WebSphere DataStage job data streams.
v Simultaneous connections to multiple R/3 Enterprise instances from WebSphere
DataStage.
v Ability to define a unique directory for each IDoc type, R/3 source combination.
v IDoc metadata browser capability.
v Automatic and manual job processing modes.
v Automatic re-connections to R/3 Enterprise.
v A separate client utility, the WebSphere DataStage Administrator for SAP. It
manages and configures R/3 connection and IDoc type properties.
v A persistent staging area (PSA) on the WebSphere DataStage server for storage
of IDocs retrieved from R/3 source systems.
v Performance features for a high volume of data.
v A mechanism for coordinating the processing of IDocs from the PSA.
The source data is delivered to WebSphere DataStage rather than being actively
requested from the source as in the traditional data access stages. Consequently, a
background listener receives the IDocs as an R/3 source system delivers them to
WebSphere DataStage. The listener stores each received IDoc in a persistent staging
area (PSA), which conceptually serves as the data source for the IDoc Extract stage.
This stage is a source stage, which means that it has no input links. It reads the
IDoc from the PSA, parses its content, and forwards this content as relational rows
down the output links of the stage for processing by downstream stages.
The custom GUI, which interfaces directly with an R/3 system, helps you design
jobs that use the IDoc Extract stage. You can select from a list of available IDoc
types and choose the IDoc segments you want. IDoc segment metadata is
automatically retrieved and used to populate a column grid for each output link
associated with a segment.
The following diagram illustrates the architecture of the system. The runtime
components include the listener subsystem and the IDoc Extract stage. These two
components provide the IDoc retrieval and processing functions for the system, as
described in the following sections.
DataStage
IDoc metadata repository
IDoc
R/3 source R/3 source R/3 source plug-in
system 1 system 2 system n
IDocs
Configuration requirements
WebSphere DataStage Systems. You need to install the following components: two
on the WebSphere DataStage server system and two on the client.
v WebSphere DataStage server system:
– Listener subsystem, which installs and registers the listener manager as a
service executable. See Listener subsystem for details.
– IDoc Extract stage.
v WebSphere DataStage client system:
– IDoc Extract client GUI.
– WebSphere DataStage Administrator for SAP utility.
As with the ABAP Extract stage, the installation is facilitated by a prior installation
of the SAP GUI.
R/3 Source Systems. Some configuration on all R/3 source systems is required to
identify WebSphere DataStage as a target system. Otherwise, the listeners cannot
connect to RFC ports in order to receive IDocs.
For our system to acknowledge receipt of IDocs from R/3, it must send a message
of type STATUS back to the sending R/3 system. The logical system corresponding
to our RFC server can participate in various distribution model views. In these
Note: You must use a user name and non-blank password for WebSphere
DataStage logon credentials to use the IDoc stages. This means you must clear
Omit on the Attach to Project dialog in WebSphere DataStage, otherwise,
unexpected results occur.
Runtime components
The IDoc Extract includes the listener subsystem and the IBM WebSphere
DataStage stage components. The following sections describe the listener
subsystem.
For information about the stage and the administrative functions, see IDoc extract
for SAP R/3 Enterprise stage and Administrator for SAP Utility.
Listener subsystem
The listener subsystem includes the following components:
v Listener manager
v One or more RFC listener servers
This architecture is similar to that of the IBM WebSphere DataStage Pack for SAP
BW. It lets multiple R/3 sources deliver IDocs to WebSphere DataStage. It runs as a
daemon on UNIX, as a service on Microsoft Windows NT®.
Listener manager
The listener manager detects changes in RFC servers by doing the following:
1. At startup, the manager reads a configuration file that contains parameters
describing R/3 connections, which are defined by the IBM WebSphere
DataStage job designer.
2. For each configured R/3 connection, the listener manager starts an RFC listener
server in a separate background process. The manager ensures that all its
associated listener servers remain active and connected to R/3.
3. If it finds any irregularities, it tries to restart the server in question.
4. Additionally, if connection parameters change while a server is connected, the
manager stops the server and uses the updated connection parameters to
restart it.
5. The listener subsystem sends any error messages or messages reported by R/3
to a log file, one for each listener. The log file contains error messages
encountered by the listener subsystem as well any messages reported by R/3.
You can view the contents of the log file manually, or use the WebSphere
DataStage Administrator for SAP utility.
Listener server
Listener servers run in the background, listening on R/3 transactional RFC (tRFC)
ports, waiting for IDocs to be delivered by R/3. An R/3 administrator must
The stage runtime component parses the IDoc content and forwards the content as
relational rows down the output links for the stage for processing by downstream
stages.
If you need to stop or start the RFC Listener Manager on Windows NT, we
recommend that you use the Windows NT Service Manager dialog as follows:
1. Choose Start > Settings > Control Panel to display the Windows NT Control
Panel.
2. Double-click Services to display the Services dialog.
3. Select the WebSphere DataStage (IDoc Manager) service.
4. Click the start/stop button to start or stop the RFC Listener Manager.
5. Click Close to exit the Services dialog.
If you shut down the RFC Listener Manager, the RFC Listener Manager shuts
down all individual RFC Listener Servers.
For details about using the Windows NT Services dialog, see the Windows NT
documentation and online help.
If you need to stop or start the RFC Listener Manager on UNIX, we recommend
that you run the dsidocd.rc script for your platform with the stop or start command
options. The location of the script for all UNIX platforms is given below:
Platform
Script
HP-UX 11i (Itanium® 64 bit) v2
$DSSAPHOME/DSSAPbin/dsidocd.rc
Linux $DSSAPHOME/DSSAPbin/dsidocd.rc
Example:
The following sections describe the execution modes available on a per-IDoc basis.
The PSA is a configurable property of an IDoc type and the R/3 connection from
which it arrives.
Example. The following diagram represents four RFC listener servers associated
with a single WebSphere DataStage server instance. Each RFC listener server listens
on one of four R/3 instances: development, QA, and two production instances.
Assume six WebSphere DataStage jobs are on this server.
R/3 Dev R/3 QA R/3 Prod P1 R/3 Prod P2
R/3 instances
Listener servers
A B A A B C PSA/IDoc type
DataStage jobs
J1 J2 J3 J4 J5 J6
The relationship between WebSphere DataStage jobs and the IDoc types they
process is as follows:
v J1 processes IDoc type A from the R/3 development instance.
v J2 processes IDoc type B from the R/3 development and QA instance.
v J3 processes IDoc type A from the R/3 QA instance.
v J4 processes IDoc type A from the R/3 production instance P1.
v J5 processes IDoc type B from the R/3 production instance P1.
v J6 processes IDoc type C from the R/3 production instance P2.
When the process runs, it scans the PSA, identifying all IDocs that have been
successfully processed by all jobs having an interest in the particular IDoc. When
these IDocs are identified, they are deleted from the file system or archived to
another location. If they are archived, it is the responsibility of the user to maintain
the archive.
Inactive jobs
Inactive jobs are those that have not recently run. If a job stops being run, IDocs
that are to be processed by the job accumulate. They are not cleaned up because
the cleanup process detects that the inactive job has not yet processed the IDocs
and may never process them. If the job never runs again, the IDocs will
accumulate indefinitely.
To resolve this issue, a job attains an inactive status with respect to the listener
subsystem when it has not been run for 40 days. Forty days is the default value,
which you or the WebSphere DataStage Administrator Client can modify using the
WebSphere DataStage Administrator for SAP. When a job becomes inactive, its
unprocessed IDocs are not saved or archived by the cleanup process. For more
information, see Administrator for SAP Utility.
Configuration files
Because R/3 connection parameters and IDoc type properties are outside the scope
of individual IBM WebSphere DataStage jobs, they are not stored in job definition
files in the WebSphere DataStage repository. External configuration files store these
parameters and properties. We recommend that you use the IDoc Extract GUI to
modify settings for these configuration files. This section describes the various
configuration files that are used by the server to manage R/3 connection
parameters and IDoc type properties:
v DSSAPConnections.config
v IDocTypes.config
v <IDocType>.config
Note: On UNIX platforms, the dsenv file in the WebSphere DataStage server
directory must contain a umask setting so that users have read and write
permissions on these configuration files. (Windows NT platforms handle this
automatically.)
IDocTypes.config file
When the listener manager starts, it starts a listener server for each connection
described in this file. The previous example contains a single connection,
PA45VERSION3.
When an IDoc type is first associated with a connection during job design, the
client GUI creates a directory in the IBM WebSphere DataStage server directory
called DSSAPConnections/<ConnectionName>/IDocTypes/<IDocTypeName>.
v ConnectionName specifies one of the connections defined by the NAME=
parameter in the DSSAPConnections.config file.
v IDocTypeName is a directory that specifies the name of an IDoc type.
The IDocTypes.config file specifies the directory locations for writing each type of
IDoc that has been configured for that connection. It has the same format as the
DSSAPConnections.config file, but it contains different fields. For example:
DSIDOCTYPES=<BEGIN>
<BEGIN>
USE_DEFAULT_PATH=FALSE
IDOC_FILES_PATH=/u1/IDocs/MATMAS01
NAME=MATMAS01
<END>
<BEGIN>
USE_DEFAULT_PATH=TRUE
IDOC_FILES_PATH=
NAME=CREMAS01
<END>
<END>
<IDocType>.config file
The <IDocType>.config exists in every IDocTypeName directory that is configured as
a destination for a particular IDoc type, either by default or that you explicitly
specify.
IDocType is the type name of the IDoc. This configuration file contains all the
information that is specific to that IDoc directory location. For example:
IDOC_COUNT=100
DSUSERNAME=johnharvey
DSPASSWORD=py~sZiv.
AUTORUN_ENABLED=TRUE
ARCHIVE_IDOC_FILES=FALSE
USE_DEFAULT_LOGON=FALSE
For more information about the management of these configuration files, see the
Administrator for SAP Utility section.
The IDoc Extract stage is a passive stage that has output links but no input links.
If you process only segments E1MARAM and E1MAKTM, for example, the data
contained in other segments is ignored. Segments are records within an IDoc that
can be child or parent segments. They include administrative fields such as the
IDoc number, the segment number, and the number of the parent segment. Child
segments have a many-to-one relationship to parent segments.
The selection of E1MARAM, which has child segments, does not imply that all its
child segments are included. Only the segment fields of E1MARAM are processed.
The segment fields for E1MARAM correlate with the column definitions for the
output link on which E1MARAM is associated. The segment fields for E1MAKTM
become the column definitions for a second output link. Use the custom GUI to
define the column metadata definitions. When a segment is chosen for a link, the
GUI displays the available segments fields that you can select for output. The GUI
then automatically translates the R/3 metadata for the selected segment fields to
equivalent WebSphere DataStage metadata definitions and populates the column
grid.
Examples
Note: WebSphere DataStage uses the segment definition name, for example,
E2MAKTM001, rather than the segment type name. The distinction between the
two is beyond the scope of this document. For more information, consult your SAP
documentation.
When the job is run, the stage reads unprocessed IDocs of the specified type from
the appropriate location in the PSA. Unprocessed IDocs are identified by a
bookmark file that is maintained for each IDoc type. (See the next section and PSA
maintenance for details about bookmarks.)
When subsequent jobs are run, only those IDocs that arrived following the current
bookmark are processed. This prevents a job from repeatedly processing the same
set of IDocs.
If a job fails, you can use the reset functionality for the job to restore the bookmark
to its original state.
Test Mode. To prevent the bookmark for the job from being updated, you can
process IDocs in Test Mode (set on the General tab of the Stage page). For more
information, see About the Stage General page.
This scheme lets more than one job process IDocs of the same type from the same
location in the PSA. Since the bookmark coordinates the access for each job to
IDocs of the same type in a given PSA, it is not possible for one job to exhaust the
IDocs before a second job has the opportunity to process them.
Note: On UNIX platforms, the WebSphere DataStage server must be started so that
users who want to run a job have write permission on the bookmark file. This also
applies to the saprfc.ini file, which the job maintains in the WebSphere DataStage
project directory.
For information about using stages in WebSphere DataStage jobs, see WebSphere
DataStage Server Job Developer Guide.
When you start the stage GUI from the WebSphere DataStage Designer Client to
edit an IDoc Extract stage, the General tab of the Stage page opens.
For a newly created stage, the connection for the stage defaults to the last one you
selected for another stage of this type. If only one WebSphere DataStage connection
to an R/3 Enterprise system is defined on the WebSphere DataStage server
machine, a new stage defaults to that connection regardless of whether you
previously created an IDoc Extract stage.
The IDoc Listener Settings options function in the same way as the corresponding
options in the IDoc Listener Settings of the WebSphere DataStage Administrator for
SAP utility. In addition, the Number of servers for this connection field selects the
number of listening processes for the IDoc connection in the WebSphere DataStage
IDOC Manager. This property improves the performance during IDoc extraction.
Use SAP R/3 transaction SMSQS to configure multiple IDoc connections.
Add, Properties, Import into, Export and Remove are administrative connection
operations. They let you manage the list of connections that is maintained on the
WebSphere DataStage server machine from the Select DataStage Connection to SAP
dialog. They function in the same way as the corresponding buttons on the
DataStage Connections to SAP page of the WebSphere DataStage Administrator for
SAP utility.
Configure an IDoc type as follows. The subsequent sections describe these steps in
detail.
1. Click Select to open the Select IDoc Type dialog for selecting an IDoc type.
2. Select a type, and click OK.
3. A prompt can appear about an unconfigured IDoc type. Click Yes to configure
the IDoc type for use with WebSphere DataStage.
4. Define the IDoc type configuration properties on the IDoc Type Properties
dialog.
5. The selected IDoc type and its component segment types are now visible on the
IDoc Type tab of the Stage page. The Select IDoc Type dialog displays all the
released IDoc types defined on the R/3 Enterprise system. It has the following
components:
v Connection. The connection name for the R/3 system whose IDoc types are
being shown is indicated at the top of the dialog.
v Description. A description of the R/3 system.
v IDoc Types. A list of all the released IDoc types defined on the R/3 system.
v Find. Click to open a Find IDoc Type dialog. It lets you search for IDoc
Types that contain user-specified substrings in their name or description.
v Properties. Click to view and change the WebSphere DataStage configuration
for the selected IDoc type.
The IDoc Type Properties dialog contains various parameters set to default values.
The default settings are usually appropriate.
1. Name is the name of the selected IDoc type (read-only) with its description in
the Description field.
2. Directory containing temporary IDoc files for this IDoc type and connection
is the path name for storing IDoc files for this IDoc type and connection.
Initially, the directory is set to a default location, and the edit box is read-only.
To enter your own directory, clear the Use default directory box.
If Use default directory is selected, the default path name is displayed, and the
control is read-only.
3. Click Browse to browse for an alternate directory to store IDoc files for this
IDoc type and connection. If Use default directory is cleared, this button is
enabled.
4. Click Use default directory to browse for an alternate directory for storing
IDoc files for this IDoc type and connection. If cleared, Directory containing
temporary IDoc files for this IDoc type and connection and Browse are
enabled, and you can specify an alternate directory. Otherwise, WebSphere
DataStage uses a default location.
If the directory does not exist, and you save changes to the IDoc type
configuration, the system tries to create the directory. If it cannot, you must
choose another directory.
If the directory has already been configured for this IDoc type using a different
WebSphere DataStage connection to SAP, you are warned that stages that read
IDocs of this type process IDocs arriving from all connections that share this
directory for the type.
After you acknowledge this message, the values displayed in the dialog for the
other configuration details are refreshed to match those already defined for the
type through the other connections. Any changes you make to the
configuration details for an IDoc type whose PSA is shared between two or
more connections affect all connections processing this type from this PSA.
5. Click Archive processed IDoc files to archive processed IDocs rather than
permanently remove them. The archive location is at the same level as the PSA
for the IDoc.
It is the responsibility of the Administrator to oversee the permanent storage of
archived IDocs, for example, moving them to an alternate disk location or
removable storage media. You cannot restore processed IDocs.
Note: See “Setting batch size for manual IDoc extraction” on page 36 for
additional information.
7. The DataStage Logon Details for Running the Jobs area specifies the
WebSphere DataStage logon user name and password, and whether to use the
defaults for the connection.
8. Specify a specific job to run automatically in the Assign job section:
v Select Run specific job to specify the project name and job name that is to
run automatically when the stage receives the number of IDocs in the Run
jobs that extract IDocs of this type after receiving field. In the Project
Name field, choose the name of the project that is to run automatically. The
Project Name field includes up to two project names:
– The most recent, saved project associated with this IDoc type
– The current project
v Clear Run specific job to automatically run all jobs that extract this IDoc
type when the stage receives the specified number of IDocs.
9. After you select an IDoc type and optionally define IDoc Type configuration
properties, the Select IDoc Type dialog closes, and you return to the IDoc Type
tab of the Stage page, with the properties of the selected IDoc type now visible.
The IDoc Components area shows the control record and all the segments
defined for the IDoc type with their descriptions. (The control record, one for
each IDoc, is an administrative record that contains a standard set of fields
describing the IDoc as a whole.) This area contains the following information:
v Name. Shows the hierarchical relationship among the segments using a tree
structure with their descriptions.
(A segment type can appear only once within an IDoc type. The names for
the segments are the segment definition names, not the segment type names.
You can infer the segment type name from the segment definition name.)
v Assigned Output Link. After particular segments in the IDoc Type are
assigned to the output links of the stage, the IDoc Components control
shows the names of the links in the Assigned Output Link column of the
control. This gives you an overview of which segments are being extracted
by the stage.
The General tab of the Output page shows the segment type or control record for
each output link as described in subsequent sections.
If this is already done in your SAP application, set R/3 Version on the IDoc Type
Properties dialog to the same value that is set for the IDoc type in the R/3 system
itself (See Connection and Logon Details page).
R/3 Version lists the version that is the same or earlier than that of the R/3 system
that is specified in the connection. It defaults to the current version of the R/3
system.
Version 46E and Later. By default, the IDoc Extract product only knows about R/3
46D or earlier. If you have an R/3 system that is later than 46D, the program reads
the version from the R/3 system and automatically adds it to the list.
Missing Versions. But suppose the R/3 system is Version 46F. The combo box then
includes the 46F, but may be missing 46E. If you want to specify 46E, type the
value directly into the edit control of the combo box.
When you click OK, the system verifies that the specified R/3 Version is unknown,
and prompts:
R/3 version "46E" is not among the versions currently
known to DataStage. Would you like "46E" to be added to
the list of known versions?
If you click Cancel, the IDoc Type Properties dialog stays open.
If you enter an incorrectly formatted version and click OK, the following error
appears:
″xx″ is not a valid R/3 version. A correctly formatted version must consist of two digits
followed by an upper case letter.
If you enter a version number that is later than that of the R/3 system specified in
the connection, you see the following error:
R/3 Version ″xxx″ is greater than ″xxx″, the version of the connection. The R/3 version for
the IDoc type must not be greater than the version of the connection.
If you change the port version of the connection for the stage or the R/3 version of
the IDoc type for the stage, the stage automatically refreshes itself using
appropriate IDoc metadata. If the either of these versions is changed before you
open the stage editor, the act of opening the stage editor produces the following
warning:
Either the port version has changed for connection ″xxx″, or the R/3 version in the
configuration for IDoc type ″xxx″ has changed. The IDoc metadata for the stage will now
be fixed.
Adding columns
When you choose a segment or the control record on the General tab on the
Output page, a corresponding list of columns is automatically generated.
You can view and modify these columns using the Columns tab on the Output
page.
The Save IDoc Segment Definition dialog contains the following fields:
v Data source type. The type is always IDoc.
v IDoc type. The name of the data source.
v Segment name. The name of the table or file.
v Short description. The brief description of the IDoc segment.
v Long description. The detailed description of the IDoc segment.
The IBM WebSphere DataStage Load stage is a passive stage that has input links
but no output links. Use this stage to generate IDocs from source stages to load
data into R/3 Enterprise.
The user interface for the IDoc Load stage is almost identical to that of the IDoc
Extract stage.
As with the ABAP Extract for SAP R/3, the installation is facilitated by a prior
installation of the SAP GUI.
R/3 Source Systems. Some configuration on all R/3 source systems is required to
identify WebSphere DataStage as a target system.
After installing the stage GUI, start the stage editor from the WebSphere DataStage
Designer Client by doing one of the following:
v Double-click the stage in the Diagram window
v Select the stage and choose Properties from the shortcut menu.
v Select the stage and choose Edit > Properties from the WebSphere DataStage
Designer Client window.
Note: You must use a user name and non-blank password for WebSphere
DataStage logon credentials to use the IDoc stages. This means you must clear
Omit on the Attach to Project dialog in WebSphere DataStage, otherwise,
unexpected results occur.
Each input link loads records for a particular segment type within the IDoc type
that is selected for the stage. A column list for each link is generated automatically,
based on the fields of the selected segment type. In addition, special columns are
generated to represent primary and foreign key values for each link. These key
values allow the runtime to determine which child segment records flowing into
one link belong to each parent segment record that flows into a different link.
For a root-level segment type, the foreign key value identifies the specific
generated IDoc into which the segment records will be incorporated.
Since the column lists for an IDoc Load for SAP R/3 stage are generated
automatically, Transformer stages map values from source data columns to the
columns generated from the fields of the segment types. In each Transformer stage,
you must also map source data values to values that can be used as primary and
foreign keys for the segments. Values for the key columns not actually loaded as
data into the IDocs, but are only used to correlate records flowing into separate
links.
For root-level segment types, the foreign key identifies the IDoc for the segments.
When you start the stage GUI from the WebSphere DataStage Designer Client to
edit an IDoc Load for SAP R/3 stage, the General tab of the Stage page opens by
default.
The main phases in defining an IDoc Load for SAP R/3 stage from the Stage
dialog box are as follows. See the following sections for details.
1. Select a connection to SAP.
2. Select an IDoc type.
3. Optionally define a character set map.
4. Define the data on the input links.
Click OK to close this dialog box. Changes are saved when you save the job
design.
Use the following components on this tab to connect to an SAP R/3 system:
v WebSphere DataStage Connection to SAP. The WebSphere DataStage
connection to the SAP R/3 system that is defined on the server machine and
shared by all users connected to that machine. The fields in this area are
read-only and are obtained from the connection that you selected. For more
information, see Selecting the WebSphere DataStage Connection to SAP.
For a newly created stage, the connection for the stage defaults to the last one you
selected for another stage of this type. If only one WebSphere DataStage connection
to an SAP R/3 system is defined on the server machine, a new stage defaults to
that connection regardless of whether you previously created an IDoc Load for
SAP R/3 stage.
This dialog lets you choose a WebSphere DataStage connection to the SAP R/3
system. The selected connection provides all needed connection and default logon
details that are needed to communicate with the corresponding SAP R/3 system.
New, Properties, and Remove are administrative connection operations. They let
you manage the list of connections that is maintained on the WebSphere DataStage
server machine from the Select WebSphere DataStage Connection to SAP dialog:
v New. Click to open the Connection Properties dialog, which lets you define the
properties for the new connection. Here you can specify SAP connection details
and default logon details for the new connection. The Connection and Logon
Details page opens by default.
0 - All IDocs will be sent in one packet as a part of a single SAP IDoc Load
transaction. If the transaction fails, no IDocs will be loaded into SAP system.
1- The default IDoc packet size is 1, this maintains the current IDoc Load stage
behavior. Each IDoc is loaded as a part of separate SAP IDoc Load transaction.
`n’- `n’ IDocs are part of a single SAP IDoc Load transaction, where `n’ is defined
as a number greater than 1. If `n’ was set to 10, and there are 50 IDocs to be
loaded, then 5 transactions are used, each sending 10 IDocs in the packet. If there
is a problem in the fourth transaction, 30 IDocs will have been committed in three
separate transactions, no IDocs from the forth transaction will be loaded and the
fifth transaction will not occur.
Click Select to open the Select Message Type for IDoc Type dialog to choose a
message type from the available types. Message Type defaults to the first available
message type for the selected IDoc type.
For more information about NLS or job parameters, see WebSphere DataStage
documentation.
Begin the selection process from the General tab on the Input page:
The Input page has an Input name field, the General and Columns pages, and the
Columns button. The Input link pages are almost identical to the Output link
pages of the IDoc Extract for SAP R/3 stage. They display the fields to load.
v Input name. The name of the input link. Choose the link you want to edit from
the Input name list box.
v Click the Columns button to display a brief list of the columns designated on
the input link. As you enter detailed metadata in the Columns page, you can
leave this list displayed.
After you choose the input link from the Input name box, the following steps
summarize how input links function. The subsequent sections describe these steps
in detail.
1. Click Select beside IDoc Component to Load on the General tab of the Input
page to open the Select IDoc Component to Load dialog. The IDoc Component
to Load, Description, and Fields in Component information is displayed after
you select a segment for the link.
2. The selected segment type and its fields to load now appear on the General tab
of the Input page.
3. Columns are automatically generated for each link when the segment type is
selected.
4. You can delete unnecessary columns.
5. Columns for missing fields can be added by clicking Add Columns on the
Columns tab of the Input page.
You select the segment definition for each link from the Select IDoc Component to
Load dialog.
The most recent released version of the IDoc and its segments are used.
1. Select a segment type and click OK.
2. The dialog closes, and you return to the General tab of the Input page with the
IDoc Component to Load, Description, and Fields in Component information.
Modifying columns
When you choose a segment from the Select IDoc Component to Load dialog, a
corresponding list of columns for the link including key columns is automatically
generated.
P-keys (primary keys) are named after the segment type. F-keys (foreign keys)
relate records for input links to parent records. As a result, metadata is
synchronized throughout the links when changes are made to it. F-keys and P-keys
are automatically updated, giving users flexibility in using data from different
columns in the source data.
You can view and modify these generated columns using the Columns tab on the
Input page.
The Columns tab of the Input page has the following components:
v The Corresponding Load Field for Column ″xx″ is the single-row grid near the
bottom of the tab showing the load field that corresponds to the selected
column. (The value changes depending on the selected column.) It includes
Name, Description, Internal Type, and Length information. In this window, for
example, no values are displayed since a key column was selected with no
corresponding segment field.
v Click Add Columns to add columns for any fields that are not currently
represented in the columns list. The Add Columns dialog appears where you
can select from the available load fields for columns.
You can also delete any unneeded columns.
v Click Validate Columns to check the column list for consistency with the
segment fields.
v Key Columns. Click to open the Key Columns for Link dialog. This lets you
change the number of columns that represent the primary and foreign key for
the link (see Synchronizing columns).
v Save. Click to open the Save IDoc Segment Definition dialog to save the
metadata definitions when you finish defining the columns for the link.
Any generated value can be used as the value for the column, but for each value
of the key, there must be exactly one record that is received through the link.
60 Integration Guide for WebSphere DataStage Pack for SAP R/3
Select a corresponding segment type for the rest of the input links the same way as
previously described. As each segment type is being selected using the Select IDoc
Component to Load dialog, segment types that have already been assigned a link
are indicated in the Assigned Input Link column.
Use Validate All on the General tab of the Stage page to detect when a link is
assigned to a segment, but the links are not assigned to their ancestors. If you try
to assign a segment type whose parent segment type has not been assigned to
some other link, you are warned, but you can continue.
Synchronizing columns
It is sometimes more convenient to use more than one column for a particular key.
Use Key Columns to open the Key Columns for Link dialog. This lets you change
the number of columns that are used to represent the primary and foreign key for
the link. If you change the primary key to two, for example, and click OK, the
column list is refreshed, generating as many columns for each key as requested.
Changing the number of columns that are used for a primary key also causes the
column lists for links that include a corresponding foreign key to be updated.
Likewise, changing the number of columns used for a foreign key causes the
corresponding primary key columns to be updated in the link representing the
parent segment type.
BAPIs are standard SAP interfaces that are used by the stage to integrate with SAP
R/3 systems. They are technically implemented using function modules that are
RFC-enabled (Remote Function Call) inside SAP systems.
You can use the BAPI stage to interface with the my-SAP Business Suite, which is a
family of solutions and integrated application platforms, such as CRM, SCM, and
so forth that are supplied by SAP. Use the BAPI stage within IBM WebSphere
DataStage as a passive stage, for example, to load data into and extract data from
SAP R/3 Enterprise as the target system. Do this by using the library of Business
Application Programming Interfaces (BAPIs), which is provided and maintained by
SAP. The databases always remain in a consistent state after executing the BAPIs
(methods).
The BAPI stage lets you use these BAPIs to design load or extract jobs. You can do
this because the stage captures the metadata for each BAPI and dynamically builds
the complex RFM call to execute these BAPIs.
You can use the BAPI stage GUI to select a Business Object and its BAPI from the
SAP R/3 system and display the corresponding interface which you can use to
load or extract data. The runtime component for the stage loads or extracts data
into or from the SAP application server.
Functionality
The BAPI stage has the following functionality:
v Lets you choose and define SAP connections using the GUI.
v Lets you explore the SAP BOR, dynamically choose any BAPI, and store its
metadata in the job.
v Lets you view the BAPI interface using a function module (RFC) with its import,
export, and table parameters, and optionally decide which parameters to use
when executing the BAPI.
v Works with the my_SAP Business Suite products.
v Loads and extracts data into and from SAP R/3 using BAPIs with appropriate
log information.
Application layer
1 4
2 3 5
In summary, the stage can dynamically call any BAPI and process the returned
data appropriately, based on whether it is a load or an extract BAPI.
If the job uses multiple input or output links, each link must define a unique BAPI,
that is, a link cannot contain a BAPI that is already used in another link in the
same job.
To build a job:
1. Create a WebSphere DataStage job using the WebSphere DataStage Designer
Client.
2. Create the BAPI stage, adding the stages and links you need to load and extract
data. Double-click the BAPI stage icon to open the stage editor dialog (GUI).
3. Define the stage properties.
4. Define the SAP R/3 connection details and the SAP logon information.
5. Specify the properties for input links for loading data to SAP R/3.
6. Specify the properties for output links for extracting data from SAP R/3.
7. Compile the job.
You can change the default character set map defined for the project or the job by
selecting a map name from the list.
For more information about NLS or job parameters, see WebSphere DataStage
documentation.
For more information about creating or defining new connections and deleting
existing connections, see the following section and Administrator for SAP Utility.
The Application Server and the System Number controls are replaced by Message
Server, System ID, and Group controls so that connection details specific to load
balancing can be entered.
The Input page has an Input name field, the General, BAPI, Logs, and Columns
pages, and the Columns button.
v Input name. The name of the input link. Choose the link you want to edit from
the Input name list.
After you select a BAPI on the BAPI Explorer dialog, the General tab
automatically displays the selected Business Object, BAPI, and short description of
the selected BAPI.
This interim dialog opens only for release 4.6 and later of SAP. Otherwise, the
BAPI Explorer window opens.
After you select a component ID, this dialog contains only those Business objects
that belong to the selected application component. The list of available application
components to choose from is dynamically built, depending on the accessed
system.
v BAPI’s to Display. You can show only released BAPIs (the default) or all BAPIs
in the BAPI Explorer window. You must ensure unreleased BAPIs are complete
and ready to use, or a warning appears. (Click Show All BAPIs to see those
BAPIs that are unreleased.)
v OK. Click to open the BAPI Explorer dialog.
v Cancel. Click to return to the Input or Output General page.
When you move the cursor over a parameter, its shape changes, indicating that
you can activate or deactivate parameters.
Fields that are required for tables parameters appear on the Columns page.
Fields that are required for export parameters appear in a grid on the Input Logs
page, not on the Input Columns page, because they contain return values from the
BAPI call.
The reference structure being used for each parameter appears with a short text
description of the parameter. This helps you decide whether to activate a particular
parameter.
All fields in the grid except the first (BAPISeqNo) are derived from reference
structures for the import and tables parameters that get activated on the Input
BAPI page.
As for other stages, you can use the following components for the column
definitions:
v Save. Click to open the Save Table Definition dialog to save column definitions
to the WebSphere DataStage repository.
v Load. Click to open the Table definitions dialog to load the column definitions
from the WebSphere DataStage repository into other stages in your job design.
This resizable window looks exactly like the Input General page, except that the
selected BAPI extracts data from SAP.
The Output page has an Output name field, the General (the default), BAPI, Read
Logs, and Columns pages, and the Columns button.
v Output name. The name of the output link. Choose the link you want to edit
from the Output name list.
After you select a BAPI on the BAPI Explorer dialog (see BAPI Explorer dialog),
the General tab of the Output page automatically displays the selected Business
Object, BAPI, and short description of the selected BAPI.
This page displays the attributes for the selected BAPI. As for the Input BAPI page,
you can design and determine the runtime behavior of the selected BAPI.
The color of the icons beside parameter names indicate whether they are active:
v Green. Indicate active parameters that are used when dynamically building the
BAPI call at runtime.
v Red. Indicate inactive parameters that are unused when calling the BAPI.
The reference structure is being used for each parameter with a short text
description of the parameter to help you decide whether to activate a particular
parameter.
For output links, the following parameters appear on the Columns page:
v Parameters activated on the Export tab
v Tables parameters that are activated for extracting values
Fields for import parameters and the table parameters activated for Input Import
appear on the Output Read Logs page. This is because these fields are not
extracted when the job runs but need to be read (loaded) to call a BAPI.
The BAPI input file for import parameters passes data to the BAPI as
comma-separated values (CSV). The file has the same encoding as the SAP R/3
platform (therefore, on Unicode platforms, the file encoding is Unicode). You
specify the full path and file name of the input file in the Input File for Import
Parameters field of the Output Read Logs tab.
The input parameters can be structures or tables. The input-file format matches the
columns that are displayed by the BAPI Output Read Logs page.
v Each column displayed by the Read Logs page is represented in the input file as
a comma-delimited field.
v Each line in the file represents a call to the BAPI. Each call takes the input data
from one line. (To pass multiple lines to BAPI tables, use the Load design.)
v Use SAP R/3 to display the data in a table or structure.
Sample
The following example input file makes five BAPI calls. Each call takes the input
data from one line. (Each line in this example is truncated to fit the page.)
4500000153,,,,,,abc,,,,,,12,,,,,org,,,,345,f,,,,,,,,,,,,,,,,,,,,,,,,,IS,22,1,,,
4500000153,12345,d,text0,,,,,,,,,,,,,,,1234567890.123,pou,uis,opu,opi,45678,,,,
4500000153,,,,,,abc,,,,,,12,,,,,org,,,,345,f,,,,,,,,,,,,,,,,,,,,,,,,,IS,22,1,,,
4500000153,22347,d,text1,,,,,,,,,,,,,,,2234567890.123,pou,uis,opu,opi,45678,,,,
4500000153,,,,,,abc,,,,,,12,,,,,org,,,,345,f,,,,,,,,,,,,,,,,,,,,,,,,,IS,22,1,,,
The grid displays those fields that correspond to the parameters selected on the
Import tab on the Output BAPI page and the fields that correspond to parameters
activated on the Tables tab for Input on the Output BAPI page.
For example, if the selected BAPI for the stage is PurchaseOrder.GetDetails and the
connection name is C46, the default directory for import values is:
DSHOME\DSSAPConnections\C46\BAPIs\Extracts\PurchaseOrde
r.GetDetails
You can specify another directory to store these import values by clearing Use
defaults and browsing for existing directories or by entering a value in the edit
control.
Click Browse beside Location for Log Files to open the Browse directories dialog
to select a directory.
You can also click Browse beside Input File for Import Parameters to open a
dialog to select a file.
Runtime component
The BAPI stage runtime component is a modified sequential file stage that
supports multiple links in both directions. It dynamically builds a call to the
selected BAPI and runs that call.
Input links. The return values from the BAPI call are stored in the appropriate
directory that you specify on the Input Logs page.
The name of the log files corresponds to the parameter names that are activated for
the BAPI, for example:
v Export parameters. If an export parameter named PURCHASEORDER is
activated for the BAPI, a log file named PurchaseOrder.txt is created in the
Export directory in the directory specified on the Input Logs page.
v Tables parameters. You can use table parameters to import or export values.
Two log files are created for each parameter, which contain the following:
For example, for the table parameter named DESCRIPTION, log files named
DESCRIPTION.TXT and DESCRIPTION_RETURN.TXT are created.
Output links. The job expects import values to be available in the Import directory
that gets created under the pathname specified on the Output Read Logs page. The
name of the log files corresponds to the parameter names that are activated for the
BAPI, for example:
v Import parameter. If an import parameter named PURCHASEORDER is
activated for the BAPI, a log file named PurchaseOrder.txt is expected to be in
the Import directory in the path name specified on the Output Read Logs page.
v Tables parameters. You can use table parameters to import or export values.
Two log files are created for each active parameter, which contain the following:
– The parameter name with the .TXT suffix
– The parameter name with the __Return suffix
The Pack includes a stand alone utility called WebSphere DataStage Administrator
for SAP that lets you manage the configurations of the various R/3 connection and
IDoc type objects that are beyond the scope of a WebSphere DataStage job.
You can invoke this utility from the WebSphere DataStage program group on a
WebSphere DataStage client machine to do the following:
v Define the connection to the SAP database.
v Monitor the activity of the IDoc listener.
v Migrate connection and IDoc type configuration settings from one WebSphere
DataStage installation to another.
v Modify connection and IDoc type configuration settings.
v Schedule cleanup of temporary IDoc files.
The following steps let you define a WebSphere DataStage connection to SAP. The
subsequent sections describe these steps in detail.
1. Run the WebSphere DataStage Administrator for SAP on a WebSphere
DataStage client machine.
2. Click Add > New to define the properties for the new connection.
3. Enter a connection name, a description, and SAP connection and logon details.
The WebSphere DataStage Connections to R/3 page has the following components:
v Add. Click to open a popup menu with the New and Import items. Do the
following:
1. Click New to open the Connection Properties dialog, which lets you define
the properties for the new connection. Here you can specify Connection
Name, Description, and SAP connection and default logon details for the
new connection (See Defining WebSphere DataStage connections to SAP
R/3).
2. Click Import to open a standard Open File dialog that lets you select the
export file to be imported. This lets you import a new connection (see
Importing new connections).
v Properties. Click to open the Connection Properties dialog, showing the
properties of the selected connection. This is the same dialog that is opened
when you click New on the Select DataStage Connection to SAP dialog, but in
this context the connection Name is read-only, and the Add button is replaced
by an OK button.
v Import into. Click to import IDoc type configurations into the selected
connection that already exists. A standard Open File dialog appears so you can
select a file to be imported (see Importing IDoc type configurations).
v Export. Click to save the configuration information for the selected connection
and all its associated IDoc types into a file (see Exporting connections).
v Remove. Click to delete the selected connection after your confirmation.
v IDoc Types. Click to see the IDoc types for the selected connection. It opens the
IDoc Types dialog (see IDoc Types dialog). This button does not appear on the
Select WebSphere DataStage Connection to SAP dialog.
v IDoc Log. Click to open the IDoc Log dialog. This dialog displays log messages
reported by the IDoc listener for the connection (see the section IDoc Log
dialog). This button does not appear on the Select WebSphere DataStage
Connection to SAP dialog.
If Listen for IDocs received through this connection is cleared on the IDoc
Listener Settings page, the Import Into, IDoc Types, and IDoc Log buttons on this
page are disabled when you select that connection. Also, if this same option is
cleared, Import and Export operations apply only to the properties for the
The WebSphere DataStage Connections to R/3 page lets the RFC Server make a
non-load balancing connection even if load balancing is specified in the connection
configuration and provides an option that prevents the Listener from sending
status updates back to the R/3 system when IDocs are received.
The Connection and Logon Details page opens by default. Group appears for this
window when Use load balancing is set.
Load balancing
Select Use Load balancing on the Connection and Logon Details page of the
Connection Properties dialog to balance loads when connecting to the R/3 system.
Load balancing works as follows:
1. R/3 lets you make logon connections through a message server. The message
server uses an algorithm that considers server workload and availability to
choose an appropriate application server to handle the logon.
When connections are configured, you can choose a load balancing connection
to a message server rather than a specific R/3 instance to retrieve and validate
IDoc types and metadata.
The listener server does NOT use this connection to listen for IDocs arriving on an
RFC port since this is an RFC server connection. Load balancing is only a client
connection feature.
This page lets you make an additional load balancing test connection as follows:
1. Select Listen for IDocs received through this connection so that a listener
server runs continuously on the WebSphere DataStage server machine. This
check box is selected by default. If selected, this option indicates that the
connection is enabled for use with IDoc Extract or IDoc Load.
If Listen for IDocs received through this connection is cleared, the other
controls on the IDoc Listener Settings page and DataStage Job Options for
IDocs page are disabled (including the labels for the controls). Also if cleared,
the Import Into, IDoc Types, and IDoc Log buttons on the DataStage
Connections for R/3 page of the WebSphere DataStage Administrator for SAP
utility are disabled when you select that connection.
2. Specify IDoc Listener Program ID. The listener registers this program ID with
the R/3 system. Use the same program ID for the tRFC port on the SAP R/3
system to be invoked when the R/3 system sends an IDoc to WebSphere
DataStage.
3. Clear Return status update upon successful receipt of IDoc to prevent the
listener from sending status messages to the R/3 system when IDocs are
received. (It is set by default.) Do this to reduce the load incurred by the R/3
system when it sends IDocs to WebSphere DataStage.
4. If you select Use load balancing on the Connection and Logon Details page,
and the load balancing test connection succeeds, an additional test connection
is made using the IDoc Listener SAP Connection Details that you specify.
If this test connection fails, the following warning appears:
Currently unable to connect to SAP using the IDoc Listener
connection information specified for this connection. Do
you want to save your changes anyway?
Separate connection details must be provided for the listener, since the Listener
cannot make a load-balancing connection. If load balancing is indicated on the
Connection and Logon Details page, you can modify the Application Server,
System Number, and Router String controls shown on the IDoc Listener Settings
page.
The Application Server, System Number, and Router String information is used
by the listener when it connects to the R/3 system. If you clear Use load balancing
on the Connection and Logon Details page, the listener uses the connection details
specified on that page. In that case, the Application Server, System Number, and
Router String controls on the IDoc Listener Settings page displays values copied
from the Connection and Logon Details page, but these values are read-only
(disabled).
Click WebSphere DataStage Job Options for IDocs to open the page:
Exporting connections
To export connections by saving configuration information into a file:
To set the properties of the IDoc types for the selected connection:
1. Open the IDoc Types dialog by clicking on IDoc Types on the WebSphere
DataStage Connections to SAP page.
This dialog is similar to the Select IDoc Type dialog, except OK is replaced by
Close, and there is no Cancel.
The Connection field specifies the connection whose IDoc types are displayed
in the list with descriptive text in the Description field.
2. Click Find to open a Find IDoc Type dialog to search for IDoc types that
contain user-specified substrings in their name or description as in the Select
IDoc Type dialog.
3. Click Properties to examine and change the WebSphere DataStage
configuration for the selected IDoc type using the IDoc Type Properties dialog.
(You can also do this by double-clicking an IDoc type in the list.)
You already have these two components installed on your R/3 system if you
imported transport requests. However, if this import is unsuccessful, you can
manually create these components in your R/3 systems (see Creating an
authorization profiles manually and Installing the RFC function code manually.
The section also describes the configuration of the SAP Dispatch/Gateway service.
It further includes information about packaged extraction jobs that include
common extraction scenarios which you can customize for your environment.
The IBM WebSphere DataStage ABAP Extract for R/3 stage addresses this concern
and provides a comprehensive and flexible way to communicate with R/3 systems
without compromising the security aspects that already exist.
Depending on the level of security desired and the type of system (DEV, QAS, or
PRD) from which to extract data, you can assign the standard SAP S_A.DEVELOP
profile or Z_DS_PROFILE that is shipped as a transport request on the Pack client
CD to ABAP Extract stage users. The Z_DS_PROFILE, which you can install by
importing the transport request or create manually, contains the minimum
authorizations for designing and running WebSphere DataStage jobs.
These limited authorizations ensure that ABAP Extract stage users can run only
those transactions to which they have permissions and are denied access to other
transactions. For more details about each authorization, see Creating an
authorization profile manually.
Authorization
Object Text Authorization
S_RFC Authorization check for RFC Z:DS_RFC
access
S_DATASET Authorization for file access Z:DS_DATASET
S_CPIC Calls from ABAP programs Z:DS_CPIC
S_TABU_DIS Table maintenance (using Z:DS_TABU
standard tools, such as
SM30)
S_BTCH_JOB Background Processing: Z:DS_BJOB
Operations on Background
Jobs
S_XMI_PROD Authorization for external Z:DS_XMI
management interfaces (XMI)
To upload or delete ABAP code, SAP users (CPIC and Dialog) must be
registered within SAP as developers. To do this, log on to the Online Support
System (OSS), and select the appropriate SAP installation number. Go to
Register > Register Developer, and type the SAP user name. OSS provides a 20
character access key. Record this access key, and create a dummy ABAP
program. When SAP prompts you for an access key, type this OSS key, and the
system will confirm it.
For security purposes, the Program name and Company name are required and
are case sensitive.
Default Pass
Parameter name Type Reference type value Optional value
I_SER VE_TYPE LIKE SY-TFILL Yes
I_TABLE_NAME LIKE DD02T-TABNAME Yes Yes
I_REPORT_NAME LIKE D010SINF-PROG Yes Yes
I_DELIMITER LIKE SONV-FLAG SPACE Yes Yes
I_NO_DATA LIKE SONV-FLAG SPACE Yes Yes
I_ROWSKIPS LIKE SOID-ACCNT 0 Yes Yes
I_ROWCOUNT LIKE SOID-ACCNT 0 Yes Yes
I_CURR_VARIANT LIKE RSVAR-VARIANT Yes Yes
I_VARI_DESC LIKE VARID Yes Yes
Exception
TABLE_NOT_FOUND
WRONG_TYPE
TABLE_WITHOUT_DATA
OPTION_NOT_VALID
FIELD_NOT_VALID
DATA_BUFFER_EXCEEDED
REPORT_NOT_FOUND
Unix: /etc/services
# SAP Port
sapdp00 3200/tcp
sapdp01 3201/tcp
sapdp02 3202/tcp
sapdp03 3203/tcp
sapdp04 3204/tcp
sapdp05 3205/tcp
sapdp06 3206/tcp
sapdp07 3207/tcp
sapdp08 3208/tcp
sapdp09 3209/tcp
sapdp10 3210/tcp
sapdp11 3211/tcp
sapdp12 3212/tcp
sapdp13 3213/tcp
sapdp14 3214/tcp
sapdp15 3215/tcp
sapdp16 3216/tcp
sapdp17 3217/tcp
sapdp18 3218/tcp
sapdp19 3219/tcp
sapdp20 3220/tcp
sapdp21 3221/tcp
sapdp22 3222/tcp
sapdp23 3223/tcp
sapdp24 3224/tcp
sapdp25 3225/tcp
sapdp26 3226/tcp
sapdp27 3227/tcp
sapdp28 3228/tcp
sapdp29 3229/tcp
sapdp30 3230/tcp
sapdp31 3231/tcp
sapdp32 3232/tcp
sapdp33 3233/tcp
sapdp34 3234/tcp
Packaged extractions
The ABAP Extract for SAP R/3 stage includes packaged extraction jobs that help
you understand common extraction scenarios.
You can customize these jobs for your ETL initiatives by providing parameters
specific to your environment and by using the extraction object and corresponding
ABAP that already exist in the job. The ABAP Extract stage also includes jobs that
extract long text fields from R/3. The following list describes these jobs and the
SAP tables from which they extract data:
v LongTextCPIC. This job uses CPIC data transfer method to extract long text
from VarChar fields. It decompresses them using the READ_TEXT function
module.
Note: The Extraction Object and the corresponding ABAP program cannot be
regenerated since it overwrites the code to call the function module.
v LongTextFTP. This job uses the FTP data transfer method to extract long text
from VarChar fields. It decompresses them using the READ_TEXT function
module.
Note: The Extraction Object and the corresponding ABAP program cannot be
regenerated as this results in overwriting the code to call the function module. If
Path of Remote File in the Output >Runtime tab is changed, you must
manually search for the old path in the ABAP program and replace it with the
new one.
v MARAextract. Extracts a range of materials from MARA and their
corresponding descriptions from the MAKT table.
v MaterialExtract. Extracts data from the primary material tables, namely, MARA,
MARM, MBEW, MVKE, MARC, MARD, MCHB, MKOL, MLGN, and MLGT.
v SalesExtract. Extracts data from the VBAK and VBAP tables.
v SalesCustomerMasterExtract. Extracts data from the KNA1, KNB1, and KNVV
tables.
You can customize these jobs for your ETL initiatives by providing parameters
specific to your environment and by using the extraction object and corresponding
ABAP that already exist in the job. The ABAP Extract stage also includes jobs that
extract long text fields from R/3. The following list describes these jobs and the
SAP tables from which they extract data:
v LongTextCPIC. This job uses CPIC data transfer method to extract long text
from VarChar fields. It decompresses them using the READ_TEXT function
module.
Note: The Extraction Object and the corresponding ABAP program cannot be
regenerated since it overwrites the code to call the function module.
v LongTextFTP. This job uses the FTP data transfer method to extract long text
from VarChar fields. It decompresses them using the READ_TEXT function
module.
Note: The Extraction Object and the corresponding ABAP program cannot be
regenerated as this results in overwriting the code to call the function module. If
Path of Remote File in the Output >Runtime tab is changed, you must
manually search for the old path in the ABAP program and replace it with the
new one.
v MARAextract. Extracts a range of materials from MARA and their
corresponding descriptions from the MAKT table.
v MaterialExtract. Extracts data from the primary material tables, namely, MARA,
MARM, MBEW, MVKE, MARC, MARD, MCHB, MKOL, MLGN, and MLGT.
v SalesExtract. Extracts data from the VBAK and VBAP tables.
v SalesCustomerMasterExtract. Extracts data from the KNA1, KNB1, and KNVV
tables.
When a file is created, ownership is set to the user id of the process that created
the file. Group ownership is set to the primary group of the user who created the
file. Its permissions are then determined by its file creation mode minus the value
of its umask. Child processes inherit the umask value and user id of a process.
For example, if the default file creation mode of a file is -rw-rw-rw- (666), and the
umask for the process is 002, the file created has permissions of -rw-rw-r-- (664).
This means the user and the user’s group have read and write permissions but
everyone else only has read permissions.
Files created by the IDoc Extract Pack are subject to two sets of permissions,
depending on how they are created:
v The first set belongs to those files that are created by child processes of the
dsidocmgr executable, such as the dsIDocsvr executable.
v The second set belongs to those that are created by IBM WebSphere DataStage
client connections, such as the IDoc stage editor and the WebSphere DataStage
Administrator for SAP.
These files inherit the user ID and group ID of the user logged into the
WebSphere DataStage client and the umask setting of the WebSphere DataStage
server process owner. The umask is not that of the user logged in to the client.
Several other files with the .config suffix reside in this directory. (The client creates
these for internal purposes.)
v The IDoc.SegmentAdminFields.3.config and IDoc.SegmentAdminFields.2.config files
are created the first time a user accesses metadata for an IDoc from a particular
ALE port version.
The user who first logs into WebSphere DataStage to perform these activities owns
these files, which are subject to the umask setting that the server was started with.
When a connection to SAP is created, a directory with the same name given to the
connection is created containing a subdirectory called IDocTypes. These directories
are owned by the user who creates the connection, with permissions subject to the
umask setting that the server was started with.
Note: Users who want to create a connection to SAP either using the stage editor
or the WebSphere DataStage Administrator for SAP must have write permissions
to the DSSAPConnections.config file and the DSSAPConnections directory.
When the first IDoc type is configured, a file called IDocTypes.config is created in
the IDocTypes directory, so the user who configures this first IDoc type must have
write permissions to the IDocTypes directory. Remember that this directory was
created by the user who defined the connection and may be different than the user
defining the first IDoc type.
When a user configures subsequent IDoc types, that user must have write
permissions to the IDocTypes.config file and permissions to create the directory
location (PSA) to be configured for that type. This directory can be configured
anywhere on the file system, but is created by default in the IDocTypes directory.
In the configured PSA, another file with the .config suffix is created that contains
parameters for this IDoc type. The user who logs into WebSphere DataStage to
configure this IDoc type owns these files, which are subject to the umask setting
that the WebSphere DataStage server was started with.
Any user who later modifies the configuration for an IDoc type must have write
permissions to:
v The IDocTypes.config file
v The directory the IDoc type is to be written to
v The IDoc type config file in that directory
If the modification is to specify a new directory location, the user must have
permission to write to the new directory location.
The first user who runs a job that is not in test mode, which reads IDocs of a
specified type from a specified directory location, must have permission to create a
bookmark file. The bookmark file is created in the directory from which the IDocs
for that type are read. This file is named for the IDoc type with the .bmk suffix and
In addition, a file named saprfc.ini exists in all project directories after the first
WebSphere DataStage job is run. This is the case with any WebSphere DataStage
Pack for SAP R/3, such as the ABAP Extract and the Load Pack for SAP BW. The
user who runs the job owns the saprfc.ini file, with permissions subject to the
umask setting with which the WebSphere DataStage server is started. Each
subsequent job run removes and recreates this file, so all the users who want to
run jobs in this project must be able to write to this file. For example, if user A
runs a Load Pack for SAP BW job, and user B subsequently runs an IDoc Extract
job, the job fails unless user B has permission to remove and recreate this file.
Since you cannot use the crontab command to manipulate the crontab files of other
users, the information in the IDOC Cleanup and Archiving page of the IBM
WebSphere DataStage Administrator for SAP only applies to the user logging in to
the tool.
For example, if user A schedules a cleanup for 12:00 every Saturday, and user B
wants to change the cleanup schedule, user B can add this entry, but it will not
remove the entry for user A. Likewise, when user B logs into the tool, the cleanup
settings do not reflect the settings user A established. WebSphere DataStage has the
same limitation when you log in to the WebSphere DataStage Director Client.
Recommendations
v The umask setting should apply a consistent set of permissions to all users who
log in to IBM WebSphere DataStage for the purposes of administering the IDoc
Extract functionality. In addition, the umask setting should be consistent for all
users running WebSphere DataStage jobs for all SAP R/3 products.
For example, if only one user will ever administer WebSphere DataStage
connections to SAP or run WebSphere DataStage jobs using SAP R/3 stages, the
umask should be 022. If only users from the same group will perform these
functions, the umask should be 002. If you want users to administer WebSphere
DataStage connections to SAP or run WebSphere DataStage jobs using SAP R/3
stages regardless of user id or group, the umask must be explicitly set to 000.
v For consistent permissions, the dsidocmgr executable should be invoked with
the same umask as the WebSphere DataStage server. The dsidocd.rc script used to
start the dsidocmgr references the dsenv file containing the environment settings
for the WebSphere DataStage server. Therefore, the dsidocmgr executable should
use an explicit umask contained in this file.
100 Integration Guide for WebSphere DataStage Pack for SAP R/3
Accessing information about the product
IBM has several methods for you to learn about products and services.
You can order IBM publications online or through your local IBM representative.
v To order publications online, go to the IBM Publications Center at
www.ibm.com/shop/publications/order.
v To order publications by telephone in the United States, call 1-800-879-2755.
Your feedback helps IBM to provide quality information. You can use any of the
following methods to provide comments:
v Send your comments using the online readers’ comment form at
www.ibm.com/software/awdtools/rcf/.
v Send your comments by e-mail to comments@us.ibm.com. Include the name of
the product, the version number of the product, and the name and part number
of the information (if applicable). If you are commenting on specific text, please
include the location of the text (for example, a title, a table number, or a page
number).
IBM may not offer the products, services, or features discussed in this document in
other countries. Consult your local IBM representative for information on the
products and services currently available in your area. Any reference to an IBM
product, program, or service is not intended to state or imply that only that IBM
product, program, or service may be used. Any functionally equivalent product,
program, or service that does not infringe any IBM intellectual property right may
be used instead. However, it is the user’s responsibility to evaluate and verify the
operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter
described in this document. The furnishing of this document does not grant you
any license to these patents. You can send license inquiries, in writing, to:
For license inquiries regarding double-byte (DBCS) information, contact the IBM
Intellectual Property Department in your country or send inquiries, in writing, to:
The following paragraph does not apply to the United Kingdom or any other
country where such provisions are inconsistent with local law:
INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS
PUBLICATION ″AS IS″ WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS
FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or
implied warranties in certain transactions, therefore, this statement may not apply
to you.
Any references in this information to non-IBM Web sites are provided for
convenience only and do not in any manner serve as an endorsement of those Web
sites. The materials at those Web sites are not part of the materials for this IBM
product and use of those Web sites is at your own risk.
IBM may use or distribute any of the information you supply in any way it
believes appropriate without incurring any obligation to you.
IBM Corporation
J46A/G4
555 Bailey Avenue
San Jose, CA 95141-1003 U.S.A.
The licensed program described in this document and all licensed material
available for it are provided by IBM under terms of the IBM Customer Agreement,
IBM International Program License Agreement or any equivalent agreement
between us.
All statements regarding IBM’s future direction or intent are subject to change or
withdrawal without notice, and represent goals and objectives only.
This information is for planning purposes only. The information herein is subject to
change before the products described become available.
This information contains examples of data and reports used in daily business
operations. To illustrate them as completely as possible, the examples include the
names of individuals, companies, brands, and products. All of these names are
fictitious and any similarity to the names and addresses used by an actual business
enterprise is entirely coincidental.
COPYRIGHT LICENSE:
104 Integration Guide for WebSphere DataStage Pack for SAP R/3
Each copy or any portion of these sample programs or any derivative work, must
include a copyright notice as follows:
© (your company name) (year). Portions of this code are derived from IBM Corp.
Sample Programs. © Copyright IBM Corp. _enter the year or years_. All rights
reserved.
If you are viewing this information softcopy, the photographs and color
illustrations may not appear.
Trademarks
IBM trademarks and certain non-IBM trademarks are marked at their first
occurrence in this document.
Adobe®, the Adobe logo, PostScript®, the PostScript logo are either registered
trademarks or trademarks of Adobe Systems Incorporated in the United States,
and/or other countries.
Intel®, Intel logo, Intel Inside® logo, Intel Centrino®, Intel Centrino logo, Celeron®,
Intel Xeon®, Intel SpeedStep®, Itanium and Pentium® are trademarks of Intel
Corporation in the United States, other countries, or both.
Java™ and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in
the United States, other countries, or both.
UNIX is a registered trademark of The Open Group in the United States and other
countries.
Notices 105
106 Integration Guide for WebSphere DataStage Pack for SAP R/3
Index
Special characters batch size
IDoc Extract stage 36
D
.bmk file suffix 98 bookmark files 39 data transfer methods
bookmark files for IDoc Extract ABAP Extract 13
PSA 43 DataStage Administrator for SAP 81
A BOR browsing DataStage Connections to SAP page
DataStage Administrator for SAP 75
ABAP definition 2 BAPI plug-in 68
BOR definition 2 DataStage Job Options for IDocs page
ABAP Editor 16
Build Extraction Object DataStage Administrator for SAP 79
ABAP Extract 15
program generation, ABAP defining
ABAP Extract plug-in
extract 16 ABAP Extract Stage properties 7
functionality 3
Build Extraction Object dialog 16 IDoc Extract stage 45
overview 3
Build SQL query properties for IDoc types for IDoc
ABAP Extract programs
program generation, ABAP Extract 48
RFC data transfer 8
Extract 15 defining ABAP Extract Stage
running in background 15
Build SQL Query dialog 16 properties 7
ABAP Extract Stage dialog 7
building defining BAPIs
ABAP Program Development Status,
extraction objects or SQL queries, BAPI plug-in 68
ABAP Extract 16
ABAP Extract 16 defining character set mapping
ABAP Program page 15
SQL queries, ABAP Extract 16 IDoc Load plug-in 58
ABAP RFC extraction job
Business Object definition 2 defining character set maps
troubleshooting 10
ABAP Extract plug-in 7
accessibility 101
BAPI plug-in 65
activating BAPI parameters
defining IDoc Load input data 59
BAPI plug-in 69 C defining IDoc Load stage 55
Add Columns dialog 52 character set maps defining IDoc type configuration
ADM_ prefixes ABAP Extract plug-in 7 properties
IDoc extraction 51 cleanup scheduling IDoc Extract 47
administrative fields crontab command 99 defining input properties
IDoc extraction 51 cofiles and data files BAPI plug-in
Administrator for SAP utility 75 copying, for ABAP Extract 5 BAPI Input General page 67
architecture columns defining log files 69
BAPI plug-in 64 adding for IDoc extraction 52 defining output properties
IDoc Extract plug-in 32 columns and corresponding segment ABAP Extract 7
archiving IDocs 39 types defining SAP connections
archiving processed IDocs IDoc Load plug-in 61 BAPI plug-in 66
IDoc Extract 48 configure IDoc types defining stage properties
assigned input links 58 IDoc Load plug-in 57 BAPI plug-in 65
authorization profile, ABAP Extract 4 configuring global properties 75 design time connection, IDoc Extract
automatic job mode, IDoc extraction 49 connecting to SAP R/3 systems from stage 46
DataStage destination, RFC 8
IDoc Extract plug-in 45 documentation
B Connection Properties dialog accessible 101
background processing, ABAP accessing from ABAP Extract GUI 12 dsenv file
Extract 15 BAPI plug-in 67 IDoc Extract plug-in 39
BAPI definition 2 connections dsidocd.rc script
BAPI Explorer dialog managing for IDoc Extract 46 permissions 99
BAPI plug-in 68 selecting for ABAP Extract 11 RFD Listener Manager 35
BAPI input file for import connections to SAP
parameters 72 ABAP Extract 11
BAPI Input page
BAPI plug-in 68
Control record definition 2
control records
E
IDoc extractions 49 E2MAKTM
BAPI plug-in 69, 70
CPI-C data transfer method, ABAP example of translation to DataStage
BAPI plug-in runtime component 73
Extract 13 columns 43
BAPI Stage dialog 65
creating programs manually, ABAP Enter program as text
BAPI Stage General page 66
Extract 16 program generation, ABAP
BAPISeqNo field
creating tables 18 Extract 16
BAPI plug-in 70
crontab command 99 ERP definition 2
batch count
errors
WebSphere DataStage limit for
IDoc extraction 50
IDocs 36
F ABAP Extract 6
importing into existing connections
F-keys 60
filtering Business Objects
DataStage Administrator for SAP 80 N
importing the RFC and authorization NLS page
BAPI plug-in 68
profile, ABAP Extract 4 ABAP Extract plug-in 7
Find IDoc Type dialog 81
Input BAPI Export page BAPI plug-in 65
IDoc Extract plug-in 47
BAPI plug-in 69 IDoc Load plug-in 58
format error
Input BAPI Import page 69
IDoc extraction 50
Input BAPI Logs page
FTP data transfer method, ABAP
Extract 13
BAPI plug-in 69
input file for import parameters,
O
functionality opening, ABAP Extract 16
BAPI 72
ABAP Extract plug-in 3 Output General page
installation prerequisites
BAPI plug-in 63 ABAP Extract plug-in 10
ABAP Extract plug-in 4
IDoc Extract plug-in 31 IDoc extraction
iRFC function module, ABAP Extract 4
IDoc Load plug-in 53 IDoc Extract Output General
page 50
Output page
G J ABAP Extract plug-in 7
job mode overview
generation methods, ABAP Extract
IDoc Extract stage 49 ABAP Extract plug-in 3
programs 15
IDoc Extract plug-in 31
I K
IDoc control records 49
Key Columns for Link dialog P
IDoc Load plug-in 61 Pack definition 2
IDoc definition 2
IDoc Extract plug-in parent and child segment types
overview 31 IDoc Load plug-in 61
IDoc Extract stage L partner number
connection, design time 46 legal notices 103 IDoc Load plug-in 57
IDoc extraction listener log files permissions
by IDoc number 37 IDoc Extract plug-in 34 IDoc Extract bookmark files 44
IDoc number, extracting by 37 listener servers permissions on bookmark file 44
IDoc extraction batch size, manual IDoc Extract plug-in 34 Port Version list
job 36 listener subsystem DataStage Administrator for SAP 79
IDoc extraction components IDoc Extract plug-in 34 port versions
selecting 51 load balancing IDoc extraction 50
IDoc extraction job BAPI plug-in 67 preventing updates in bookmark files 43
automatically run all jobs 49 DataStage Administrator for SAP 77 processing IDocs using DataStage
automatically run one job 49 load methods, ABAP Extract 16 summary 31
running manually 49 loading program generation
IDoc Listener Settings page ABAP programs, ABAP Extract 16 ABAP Extract 15
DataStage Administrator for SAP 78 local storage for IDocs 37 Program Generation Options dialog 16
IDoc Load Columns page 60 log files directory programs
IDoc Load Input General page 59 BAPI plug-in 70 running in background, ABAP
IDoc Load plug-in 58, 60 logs Extract 15
overview 53 IDoc listener 81 PSA
IDoc Log dialog bookmark files for IDoc Extract 43
DataStage Administrator for SAP 81 PSA definition 2
IDoc segment definitions PSA property 37
saving for IDoc extraction 52
IDoc type definition 2
108 Integration Guide for WebSphere DataStage Pack for SAP R/3
Q selecting segment definitions
IDoc Load plug-in 59
viewing Tables parameters
BAPI plug-in 69
qRFC data transfer, ABAP program 9 specifying
ABAP program properties, ABAP
R
Extract 15
Stage General page
W
WebSphere DataStage Administrator for
R/3 source systems configuration IDoc Extract plug-in 45
SAP utility 75
IDoc Extract plug-in 33 IDoc Load plug-in 55
restore bookmark files to original Stage IDoc Type page
state 43 IDoc Extract plug-in 47
return parameters 70 starting and stopping RFC Listener Z
RFC data transfer Manager on UNIX 35 Z_DS-PROFILE profile, ABAP Extract 6
ABAP Extract job 8 status, program development Z_RFC_DS_SERVICE RFC function
RFC data transfer method, ABAP ABAP Extract 16 module, ABAP Extract 6
program 9 summary ZDSRFC.TXT file, ABAP Extract 4
RFC definition 2 output links for IDoc extraction 51 ZETL development class, ABAP
RFC destination, creating 8 processing IDocs using DataStage 31 Extract 6
RFC, importing for ABAP Extract 4 summary of IDoc Extract stage and
root segments links 44
IDoc Load plug-in 61 synchronizing columns
run methods, ABAP Extract 16 IDoc Load plug-in 61
running background processes, ABAP
Extract 15
T
tables
S creating 18
SAP XI support, design time Tables log files
connection 46 BAPI plug-in 73
saprfc.ini file 44, 99 temporary IDoc files directory for IDoc
IDoc Extract plug-in 44 extraction
permissions 99 path name for temporary IDoc files
Save IDoc Segment Definition dialog 52 for IDoc extraction 48
IDoc Load plug-in 60 temporary segment index files
scheduling jobs IDoc Load plug-in 57
IDoc Extract 49 Terminology 1
screen readers 101 Test Mode
Segment definition 2 IDoc Extract Stage General page 45
segment definition names processing IDocs 43
IDoc extraction 49 testing load balancing 78
segment type definition 2 tp import, ABAP Extract 5
Select Application Component ID dialog trademarks 105
BAPI plug-in 68 Transaction SE80, ABAP Extract 6
Select DataStage Connection to SAP Transaction STMS, ABAP Extract 4
dialog transferring data
ABAP Extract plug-in 11 methods for ABAP Extract 13
BAPI plug-in 66 transport control program, ABAP
IDoc Extract plug-in 46 Extract 5
Select IDoc Component to Extract Transport Management System, ABAP
dialog 51 Extract 4
Select IDoc Component to Load dialog tRFC data transfer, ABAP program 9
IDoc Load plug-in 59 tRFC port definition 2
Select IDoc Type dialog tRFC ports 34
IDoc Extract plug-in 47
IDoc Load plug-in 57, 58
selecting V
ABAP Extract data transfer validating
methods 13 ABAP Extract stage 11
selecting a BAPI validating columns 60
BAPI plug-in 68 Validation Stage dialog 11
selecting DataStage connection to SAP Variant definition 2
IDoc Load plug-in 55 versions of R/3
selecting IDoc types DataStage Administrator for SAP 79
IDoc Load plug-in viewing Export parameters
IDoc Load Stage IDoc Type BAPI plug-in 69
page 57 viewing Import parameters
selecting IDoc Types BAPI plug-in 69
IDoc Extract plug-in 47
Index 109
110 Integration Guide for WebSphere DataStage Pack for SAP R/3
Printed in USA
SC18-9954-01