JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Developing OTDs for Oracle Java CAPS Application Adapters     Java CAPS Documentation
search filter icon
search icon

Document Information

Developing OTDs for Application Adapters

Creating SAP BAPI OTDs

SAP BAPI Encoding

Date and Time Stamp Requirements

Installing SAP JCo for SAP BAPI

To Install SAP JCo on Windows 32

To Install SAP JCo on UNIX

Important Notes:

Creating BAPI and RFC OTDs

To Create BAPI OTDs

Relaunching BAPI and RFC OTDs

Creating a SAP ALE OTD

SAP JCo and SAP IDoc Class Library Installation

The SAP Java Connector

SAP Java IDoc Class Library

To Download the SAP Java IDoc Class Library

Important Notes:

Creating IDoc OTDs

To Create IDoc OTDs Directly From SAP

To Create IDOC OTDs From a Description File

Exporting the IDOC File from SAP

To Download the IDoc Description File From SAP

Saving the IDoc Description File (After 4.6)

To Save the IDoc Description File From SAP

Creating Siebel EAI OTDs

Configuring Your System Before Creating the OTD

Configuring NetBeans to Work with Siebel

Installing seebeyond.sif for Siebel 7.5.x

Installing SiebelMessage XSD Generation Process.xml for Siebel 7.7 and 7.8.x

Creating the OTD

To Create the OTD

To Relaunch the OTD

Creating COBOL Copybook OTDs

To Create COBOL Copybook OTDs

Parsing Copybook Entries

Relaunching OTDs

To Relaunch an Existing OTD

COBOL Copybook OTD Methods

OTD Method Guidelines

Encoding Behavior for Redefinitions

DBCS Items

Root-level Methods

enableUnmarshalValidation(boolean enable) Method

marshal() Method

marshal(String charset) Method

marshal(OtdOutputStream out) Method

marshal(OtdOutputStream out, String charset) Method

marshalToString() Method

reset() Method

resetHigh() Method

resetLow() Method

retrieveEncoding() Method

unmarshal(byte[] in) Method

unmarshal(OtdInputStream in) Method

unmarshal(OtdInputStream in, String charset) Method

unmarshal(byte[] in, String charset) Method

unmarshalFromString(String in) Method

useEncoding(String enc) Method

Non-Root Methods

BPEL Operations

Creating an Oracle Applications OTD

To Create an Oracle Applications OTD

Exposed Oracle Applications OTD Nodes

Staging Table Node

COUNT

Description

Parameters

Requirements

DELETE

Description

Parameters

Requirements

INITIALIZE

Description

Parameters

Requirements

MOVE

Description

Parameters

Requirements

REQUEST

Description

Parameters

Requirements

REQUEST_STATUS

Description

Parameters

Requirements

VALIDATE

Description

Parameters

Requirements

SWIFT Alliance Gateway Adapter OTD Features

Configuration Node

Constants Node

Primitives Node

Remote APIs Node

Service Node

Generating DTDs from PeopleTools 8.13

Generating and Publishing an XML Test Message

To generate a PeopleSoft XML message

Extracting and Viewing the XML Test Message

To view the XML message

Generating a DTD for the XML File

OTD Methods and Business Process Operations

sendMessage() method

Syntax

Description

Parameters

Return Value

Throws

sendMessage Operation

Description

Input and Output

processRequest Operation

Description

Input and Output

Creating SAP BAPI OTDs

The SAP BAPI wizard is used to create BAPI and RFC OTDs. BAPI and RFC OTDs can be used in Java Collaborations and BPM Business Processes, and NetBeans EJBs to communicate with SAP.

SAP BAPI Encoding

SAP BAPI/RFC OTDs are encoding independent of the SAP system. This means that OTDs created on a Unicode SAP instance can seamlessly interact with non-Unicode SAP instances, and vice versa. In addition, the marshal and unmarshal encoding methods on the IDOC_INBOUND_ASYNCHRONOUS OTD only apply to the data, and not to the SAP instance. The default for all processed byte data is UTF-8, regardless of connection type (Unicode or non-Unicode).

When attempting to unmarshal data flows using an encoding other than UTF-8, such as UTF-16, then you must also call the setUnmarshalEncoding method to specify this encoding. This enables the Adapter to properly unmarshal the byte array.

You also need to set the correct Character Set in the Environment parameters for an inbound Adapter when receiving data from SAP. This way, the Adapter knows whether it is receiving Unicode or non-Unicode data from the SAP instance. The setMarshalEncoding method is only for marshaling the OTD data into a byte array and is not related to the SAP system character set.

Like the outbound data flows mentioned above, attempting to marshal data flows using an encoding other than UTF-8, such as UTF-16, requires setting the setMarshalEncoding method to match this encoding. This enables the data received from SAP to be correctly converted to a byte array of the desired encoding.

Date and Time Stamp Requirements

Date and time stamp fields in the OTD are now typed as java.lang.String fields. This means that the OTD expects values assigned to date fields as YYYYMMDD, where February 14, 2006 becomes 20060214.

The data format time fields is HHMMSS, where 11:59:59 PM becomes 235959, or 12:00:00 AM becomes 000000.

Installing SAP JCo for SAP BAPI

The SAP Java Connector file, sapjco3.jar, is a middleware component that enables the development of SAP-compatible components and applications in Java. This component is required by the SAP BAPI OTD Wizard to create BAPI and RFC OTDs during design time, and to support inbound and outbound SAP server communication during runtime.

Since we are installing the SAP Java Connector as standalone component, certain installation files are required. Download the installation files from SAPNet. Once logged in, this link redirects you to SAP Service Marketplace. Click the following links to access the SAP Java Connector (SAP JCo) tools and services page:

SAP NetWeaver > SAP NetWeaver in Detail > Application Platform > Connectivity > Connectors > SAP Java Connector > Tools & Services

Refer to the download instructions that come with JCo for additional information.

To Install SAP JCo on Windows 32

  1. Create a temporary directory and extract the JCo ZIP file into this directory.
  2. Copy sapjco3.dll from your SAP JCo main directory to C:\WINNT\SYSTEM32.

    Make sure that the version that is already there is not a more recent version than the one that is delivered with the SAP JCo.

  3. Copy sapjco3.jar from your SAP JCo main directory to JavaCAPS\.netbeans\caps\modules\ext\sapjcolib.

    Where JavaCAPS is the Java CAPS home directory.

  4. Copy sapjco3.jar to JavaCAPS\appserver\lib.
  5. Download the following DLL files:
    • msvcp71.dll

    • msvcr71.dll

    These are available, free of charge, from various sources on the internet.

  6. Copy the DLL files to c:\WINNT\system32.
  7. Restart both the GlassFish domain and NetBeans.

To Install SAP JCo on UNIX

The instructions for the installation of SAP JCo on other operating systems are included in the corresponding download files.

  1. On UNIX operating systems, add the OS specific shared library files to the library path.
  2. Copy sapjco3.jar to the following location before deploying and running command line code generation.
     /compile/lib/ext
  3. Copy sapjco3.jar to the JavaCAPS_Home/.netbeans/caps/modules/ext/sapjcolib folder.
  4. Copy sapjco3.jar to the JavaCAPS_Home/appserver/lib folder.
  5. Restart both the GlassFish domain and NetBeans.

Important Notes:

Creating BAPI and RFC OTDs

You create BAPI and RFC OTDs with the SAP BAPI wizard in the NetBeans IDE.

To Create BAPI OTDs

  1. In the Projects window of the NetBeans IDE, right click the Project, point to New, and click Object Type Definition.

    The New Object Type Definition Wizard dialog box appears.

  2. Click SAP BAPI and click Next.

    The Select SAP Object page appears.

  3. To convert a BAPI object to OTD, select the BAPI option. To convert an RFC object to OTD, select the RFC option.
  4. Click Next.

    The System Parameters page appears.

  5. Enter the following information for the SAP system for the SAP Adapter to connect to.
    For this option
    Enter
    System ID
    System ID of the SAP system.
    Application server
    Host name of the SAP system.
    System number
    System number of the SAP system.
    SAP Routing String
    Router string of hostnames/IP addresses of all SAP routers between the Application Server and the SAP gateway host (optional).
    Language
    Language used for SAP access.
    RFC Trace
    NO to disable RFC tracing (default); YES to enable RFC tracing, which creates the trace files in: \netbeans\bin
  6. Click Next.

    The Login Parameters page appears.

  7. Enter the information to log into the SAP system:
    For this option
    Enter
    Client Number
    Client number of the SAP system.
    User name
    User name.
    Password
    Login password.
  8. Click Next.

    The Select BAPI/RFC page appears, showing the application components

    In the BAPI tree, you can navigate to a particular SAP application component and select a BAPI object.

  9. Expand the SAP application component folder, click a BAPI, and click Finish.

    The OTD Editor window appears, displaying the OTD.

    You can now build the Collaborations or Business Processes as described in Building and Deploying the prjBAPIOutbound Sample Project and Building and Deploying the prjIDocInbound Sample Project.

Relaunching BAPI and RFC OTDs

When an OTD is built for an SAP business object, such as Application Components g Controlling g CostCenter, the generated OTD has methods corresponding to all BAPIs in the Cost Center Business Object of SAP. The CostCenter OTD has nodes for each of the BAPIs in the CostCenter business object. The OTD also has WSDL operations such as GetListExecute and GetListReceive. These WSDL operations are used when the OTD is used in a Business Process. The execute methods are used for client mode operations. The receive methods are used for server mode operations.

If required, you can also use the Relaunch option of the OTD to relaunch the CostCenter OTD wizard, see the figure below, and rebuild the BAPI OTD for the same BAPI/RFC. Please note that selecting a BAPI/RFC other than the original one used to build the OTD will corrupt your OTD and its associated Collaborations and Business Processes. On Relaunch, the OTD is rebuilt again with the changed metadata, and any Java Collaborations and Business Processes using this BAPI OTD are synchronized with the new changes. If your Java Collaborations or Business Processes are using OTD nodes that are now absent in the relaunched BAPI/RFC OTD, you will be prompted to correct the business rules by validation errors.