3
Supported SAP Interfaces
This chapter provides an overview about SAP-specific information to assist you in working with the SAP adapter. The following topics are discussed:
Exception Fields
An exception field is added by the SAP adapter when a function is imported into iStudio.
If an error happens during a call, the exception field generally contains a detailed description of the error that occurred. You can then propagate this error string to the calling application.
Consider an example where you have a setup with SAP on one side, an Oracle9iAS InterConnect hub in the middle and a Web front end the other side. Suppose the Web front-end tries to add a record to the SAP side, however the a record with the same primary key already exists in SAP. In this case, you have a non-retryable error. The exception field contains the exception data. This data may be propagated back to the Web front-end. The following is an example of an exception message:
exception: E-OAI0003: Exception occurred during call to
AddWidget@OAI://Messages/WidgetStore
User defined exception
Exception occurred:
Source: WidgetStore::AddWidget
Cause: OAI://Messages/exception=MsgAgentException (Unique ID none)
Exception occurred:
Source: WidgetStore::AddWidget
Cause: OAI://Messages/exception=MsgAgentException (Unique ID none)
Exception data:
struct MsgAgentExceptionData =
String Source = OAIsgProcessMessage(WidgetStore::AddWidget)
String ErrorText = Row exists in ADD or DATAENTRY mode (81,10)
String Explanation = The specified search keys resulted in an existing
level 0 row found when in ADD or DATAENTRY mode.
Inbound to SAP
Sending messages inbound means the SAP adapter is the client and SAP is the server. To send messages to the SAP adapter, ensure that the host definition and login information is set for connecting to the SAP system using the Configuration Editor.
See Also:
Oracle9iAS InterConnect Configuration Editor User's Guide
|
Creating an Application Link Enabling Implemented Procedure
- Start iStudio and open your project.
- Expand the Applications folder.
- Expand your Application.
- Right-click Implemented Procedures and select New.
Figure 3-1 Creating an Implemented Procedure
Text description of the illustration newimplementedprocedure.gif
The Implement Wizard--Select a Procedure dialog displays.
Figure 3-2 Implement Wizard --Selecting a Procedure
Text description of the illustration selectaprocedure.gif
- Select the Application and Message Type from the dropdown menus.
- Select a procedure and click Next.
The Implement Wizard--Define Application View dialog displays.
Figure 3-3 Implement Wizard - Define Application View - Importing SAP
Text description of the illustration impleventimport.gif
- Click Import and select SAP from the dropdown menu.
The SAP Login dialog displays.
If this is the initial login for this machine, enter the correct information.
If this machine has been logged in to SAP before, enter the password on the SAP Login dialog and click OK.
Once logged in to SAP, the Component Selector dialog displays.
Figure 3-4 Component Selector for Application Link Enabling
Text description of the illustration aleidoc.gif
- Expand the ALE tree until the correct component displays for selection.
- Select AdvancedSend or Send and click OK.
The Send
method populates the control record of the intermediate document from the parameters set up in the SAP R/3 configuration editor. The AdvancedSend
method allows more flexibility. When you use this method, you must pass the control data to the method.
The Define Application View dialog displays with the selected component and its attributes.
Figure 3-5 Populated Implement Wizard - Define Application View dialog
Text description of the illustration implaledefineapp.gif
- Click Next.
The Define Mappings dialog displays.
- Define the mappings and click Finish.
The new populated procedure displays in the right panel.
Importing Attributes from SAP
When you use iStudio to import attributes from SAP, you must first log in to SAP. When logging into SAP from iStudio, the login fields automatically populate, leaving the Password field the only field that requires input.
To import attributes from SAP:
- Click Import and select SAP on the Define Applications View dialog.
The SAP Login dialog displays.
The first time you log in from a new workstation, you are required to enter information in every field that is required for your setup. Every subsequent login from that workstation only requires a password to log in. For every iStudio session, only one login is required.
Figure 3-6 Initial SAP Login dialog
Text description of the illustration istudiosaplogin.gif
- Enter information in the following fields:
- User--The user ID for the SAP R/3 system.
- Password--The user password for the SAP R/3 system.
- Client--The client number for the SAP R/3 system.
- Router--A destination router used to connect to the Application Server or Message Server. For example:
/H/UNICENTER/H/204.79.199.5/H
.
- Language--The language required by SAP R/3 system. By default the Language parameter retrieves the language information from the users operating system.
- Application Server--Select if using the Application Server and enter information the following fields:
- Server Host--The identification of your SAP R/3 system. This value defines a connection to an Application Server representing a single SAP R/3 system.
- System Number--The SAP System number identifying the system on the host. This number specifies the TCP/IP service of the Remote Function Call Gateway containing the registered Agent.
System Number further identifies the Host to a specified Service level. The service is the TCP/IP service name (a port number through \winnt\system32\drivers\etc\services
). For example, using ss1:00
as the connecting host in the browser, the 00
is what SAP calls the system number. When specifying a service name, sapgw00
, the 00
also represents the system number. That is, if an SAP R/3 system uses system number 23
, then ss1:23
is in the login dialog and uses sapgw23
as the service number for the SAP Agent. sapgw
is a name assigned on installation to identify the gateway machine.
- Message Server--Select if using the Message Server and enter information in the following fields:
- Server Host--The Server type which identifies the Message and provides the Server host name. This value defines a connection to a message server acting as a load-balancing server redirecting the login to an application server. The message server option is only valid for inbound calls. For example,
hs0016.WDF.SAP-AG-DE
.
- SAP R/3 Name--The System ID identifying the SAP System. For example,
D15
.
- Message Server Group--If your message servers belong to a group, enter the message server group. For example,
PUBLIC
.
- Parameters--The host identification parameter.
A route string that contains a substring for each SAP router and for the target server. The route string syntax is: /H/host/S/service/W/pass
that is, it comprises any number of substrings of the form /H/host/S/service/W/pass
. For example, a connection from hostA
to hostB
, port
3333
via the saprouter host hostR
with SAProuter password summer has the route string /H/hostR/S/3299/W/summer/H/hostB/S/3333
.
Table 3-1 lists the possible host identification keys and definitions extracted from Remote Function Call 4.0 documentation.
See Also:
SAP Remote Function Call documentation for more information about establishing Remote Function Call connections
|
Table 3-1 Identification Keys
- Click OK to accept your selections and continue to the Component Selector.
Creating an Application Link Enabling Subscribed Event
To create an Application Link Enabling subscribed event using iStudio:
- Start iStudio
- Open your project.
- Expand the Applications folder.
- Expand your application.
- Right-click Subscribed Events and select New.
Figure 3-7 Creating a Subscribed Event
Text description of the illustration newsubevent.gif
The Subscribe Wizard--Select an Event dialog displays.
Figure 3-8 Subscribe Wizard - Selecting an Event
Text description of the illustration selectevent.gif
- Select the Application and Message Type from the dropdown menus.
- Select an event and click Next.
The Define Application View dialog displays.
Figure 3-9 Subscribe Wizard - Define Application View
Text description of the illustration import.gif
- Click Import and select SAP.
The SAP Login dialog displays.
If this is the initial login for this machine, enter the correct information.
If this machine has been logged in to SAP before, enter the password on the SAP Login dialog and click OK.
The Component Selector dialog displays.
Figure 3-10 Component Selector
Text description of the illustration aleidoc.gif
- Expand the ALE tree until the correct component displays for selection.
- Select AdvancedSend or Send and click OK.
The Send
method populates the control record of the intermediate document from the parameters set up in the SAP R/3 configuration editor. The AdvancedSend
method allows more flexibility. When you use this method, you must pass the control data to the method.
The populated Define Applications View dialog displays.
Figure 3-11 Subscribed Wizard - Define Application View
Text description of the illustration subarfcefineapp.gif
- Click Next.
The Define Mappings dialog displays.
- Click New to define the mappings, then click Finish.
The created event displays in the right panel of iStudio.
Creating a Remote Function Call Implemented Procedure
To create a Remote Function Call implemented procedure:
- Start iStudio.
- Open your project.
- Expand the Applications folder.
- Expand your application.
- Right-click Implemented Procedures and select New.
Figure 3-12 Creating an Implemented Procedure
Text description of the illustration newimplementedprocedure.gif
The Implement Wizard--Select a Procedure dialog displays.
Figure 3-13 Implement Wizard - Selecting a Procedure
Text description of the illustration selectaprocedure.gif
- Select the Application and Message Type from the dropdown menus.
- Select a procedure and click Next.
The Define Application View dialog displays.
Figure 3-14 Implement Wizard - Define Application View
Text description of the illustration impleventimport.gif
- Click Import and select SAP.
The SAP Login dialog displays.
If this is the initial login for this machine, enter the correct information.
If this machine has been logged in to SAP before, enter the password on the SAP Login dialog and click OK.
The Component Selector dialog displays.
Figure 3-15 Component Selector with RFC - RFC Function Module sub-folders
Text description of the illustration rfccompsel.gif
- Expand the RFC - RFC Function Modules tree until the correct component displays for selection.
- Select a component and click OK.
The populated Define Application View dialog displays.
Figure 3-16 Implement Wizard - Define Application View
Text description of the illustration implrfcdefapp.gif
- Click Next.
The Define Mappings dialog displays.
- Click New to define mappings and click Finish.
The new populated procedure display in the right panel of iStudio.
Creating a Remote Function Call Subscribed Event
To create a Remote Function Call subscribed event:
- Start iStudio.
- Open your project.
- Expand the Applications folder.
- Expand your application.
- Right-click Subscribed Events and select New.
Figure 3-17 Creating a Subscribed Event
Text description of the illustration newsubevent.gif
The Subscribe Wizard--Select an Event dialog displays.
Figure 3-18 Subscribe Wizard - Selecting an Event
Text description of the illustration selectevent.gif
- Select the Application and Message Type from the dropdown menus.
- Select an event and click Next.
The Define Application View dialog displays.
Figure 3-19 Subscribe Wizard - Define Application View
Text description of the illustration import.gif
- Click Import and select SAP.
The SAP Login dialog displays.
If this is the initial login for this machine, enter the correct information.
If this machine has been logged in to SAP before, enter the password on the SAP Login dialog and click OK.
The Component Selector dialog displays.
Figure 3-20 Component Selector - RFC - RFC Function Modules
Text description of the illustration rfccompsel.gif
- Expand the RFC - RFC Function Modules tree until the correct component displays for selection.
- Select a component and click OK.
The populated Define Application View dialog displays.
Figure 3-21 Subscribe Wizard - Populated Define Application View
Text description of the illustration subrfcdefineapp.gif
- Click Next.
The Define Mappings dialog displays.
- Click New to define mappings and click Finish.
The new populated event displays in the right panel of iStudio.
Outbound From SAP
Outbound from R/3 is used when the SAP R/3 system is sending messages to your application. The Remote Function Call Program ID must be set. The Remote Function Call Program ID is used to register with the SAP R/3 system.
Creating an Outbound Application Link Enabling Invoked Procedure
- Start iStudio.
- Open your project.
- Expand the Applications folder.
- Expand your application.
- Right-click Invoked Procedures and select New.
Figure 3-22 Creating an Implemented Procedure
Text description of the illustration newinvokedproc.gif
The Invoke Wizard--Select a Procedure dialog displays.
Figure 3-23 Invoke Wizard - Selecting a Procedure
Text description of the illustration invselectaprocedure.gif
- Select the Application and Message type from the dropdown menus.
- Select a procedure, and click Next.
The Define Application View dialog displays.
Figure 3-24 Invoked Wizard - Define Application View
Text description of the illustration invistudioimport.gif
- Click Import and select SAP.
The SAP Login dialog displays.
If this is the initial login for this machine, enter the correct information.
If this machine has been logged in to SAP before, enter the password on the SAP Login dialog and click OK.
The Component Selector displays.
Figure 3-25 Component Selector - Application Link Enabling
Text description of the illustration aleadvancedsend.gif
- Expand the ALE tree until the correct component displays for selection.
- Select a component and click OK.
The populated Define Application View dialog displays.
Figure 3-26 Invoke Wizard - Populated Define Applications View
Text description of the illustration invaledefineapp.gif
- Click Next.
The Define Mappings dialog displays.
- Click New to define mappings and click Finish.
The new populated event displays in the right panel of iStudio.
Creating an Application Link Enabling Published Event
- Start iStudio.
- Open your project.
- Expand the Applications folder.
- Expand your application.
- Right-click Published Events and select New.
Figure 3-27 Creating a Published Event
Text description of the illustration newpubevent.gif
The Publish Wizard--Select an Procedure dialog displays.
Figure 3-28 Publish Wizard - Selecting an Event
Text description of the illustration pubselectaprocedure.gif
- Select the Application and Message Type from the dropdown menus.
- Select an event and click Next.
The Define Application View dialog displays.
Figure 3-29 Publish Wizard - Define Application View
Text description of the illustration pubaledefineapp.gif
- Click Import and select SAP.
The SAP Login dialog displays.
If this is the initial login for this machine, enter the correct information.
If this machine has been logged in to SAP before, enter the password on the SAP Login dialog and click OK.
The Component Selector displays.
Figure 3-30 Component Selector - Application Link Enabling AdvancedSend
Text description of the illustration aleadvancedsend.gif
- Expand the ALE tree until the correct component displays for selection.
- Select a component and click OK.
The populated Define Application View dialog displays.
Figure 3-31 Publish Wizard - Populated Define Application View
Text description of the illustration pubaledefineapp.gif
- Click Next.
The Define Mappings dialog displays.
- Click New to define mappings and click Finish.
The new populated event will display in the right panel in iStudio.
Creating a Remote Function Call Invoked Procedure
To create a Remote Function Call invoked procedure in iStudio:
- Start iStudio.
- Open your project.
- Expand the Applications folder.
- Expand your application.
- Right-click Invoked Procedures and select New.
Figure 3-32 Creating an Invoked Procedure
Text description of the illustration newinvokedproc.gif
The Invoke Wizard--Select a Procedure dialog displays.
Figure 3-33 Invoke Wizard - Selecting a Procedure
Text description of the illustration invselectaprocedure.gif
- Select the Application and Message Type from the dropdown menus.
- Select a procedure and click Next.
The Define Application View dialog displays.
Figure 3-34 Invoke Wizard - Define Application View
Text description of the illustration invistudioimport.gif
- Click Import and select SAP.
The SAP Login dialog displays.
If this is the initial login for this machine, enter the correct information.
If this machine has been logged in to SAP before, enter the password on the SAP Login dialog and click OK.
The Component Selector displays.
Figure 3-35 Component Selector - Remote Function Call
Text description of the illustration rfccompsel.gif
- Expand the RFC - RFC Function Modules tree until the correct component displays for selection.
- Select a component and click OK.
The populated Define Application View dialog displays.
Figure 3-36 Invoke Wizard - Define Application View
Text description of the illustration invrfcdefineapp.gif
- Click Next.
- Click New to define mappings and click Finish.
The new populated event displays in the right panel of iStudio.
Creating a Remote Function Call Published Event
To create a Remote Function Call published event in iStudio:
- Start iStudio
- Open your project.
- Expand the Applications folder.
- Expand your application.
- Right-click Published Events and select New.
Figure 3-37 Creating a Published Event
Text description of the illustration newpubevent.gif
The Publish Wizard--Select a Procedure dialog displays.
Figure 3-38 Publish Wizard - Selecting a Procedure
Text description of the illustration pubselectaprocedure.gif
- Select the Application and Message Type from the dropdown menus.
- Select an event and click Next.
The Define Application View dialog displays.
Figure 3-39 Publish Wizard - Define Application View
Text description of the illustration pubistudioimport.gif
- Click Import and select SAP.
The SAP Login dialog displays.
If this is the initial login for this machine, enter the correct information.
If this machine has been logged in to SAP before, enter the password on the SAP Login dialog and click OK.
The Component Selector displays.
Figure 3-40 Component Selector - Remote Function Call
Text description of the illustration rfccompsel.gif
- Expand the RFC - RFC Function Modules tree until the correct component displays for selection.
- Select a component and click OK.
The populated Define Application View dialog displays.
Figure 3-41 Publish Wizard - Define Application View
Text description of the illustration pubrfcappview.gif
- Click Next.
- Click New to define mappings and click Finish.
The new populated event displays in the right panel of iStudio.