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 a SAP ALE OTD

The topic describes how to use the SAP ALE OTD Wizard to create IDoc Object Type Definitions (OTDs). OTDs are used in the business logic in Java Collaboration Definitions and BPM Business Processes. The SAP IDoc wizard is used to create IDoc OTDs.

You can create IDoc OTDs in one of two ways:

To export an IDoc description file from an SAP system to be used by the IDoc wizard, see Exporting the IDOC File from SAP. Due to the significant SAP GUI changes that distinguish versions 4.6 and earlier and 4.7 and later, separate instructions are included in Saving the IDoc Description File (After 4.6).

SAP JCo and SAP IDoc Class Library Installation

Certain JAR files are required by the SAP ALE OTD Wizard to create IDoc OTDs.

The SAP Java Connector

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 to support inbound and outbound SAP server communication during runtime.

Since you 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 the SAP Java Connector 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 and sapidoc3.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 and sapidoc3.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 the SAP Java Connector on UNIX

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

SAP Java IDoc Class Library

The SAP Java IDoc Class Library consists of two parts, the SAP Java Base IDoc Class Library and the SAP Java Connector IDoc Class Library. The packages of the SAP Java IDoc Class Library include the software as well as documentation. The SAP Java Base IDoc Class Library provides an API which helps navigating, reading, filling, and modifying IDocs. This base package is middleware independent. Creating, sending, and receiving IDocs is middleware dependent.

To Download the SAP Java IDoc Class Library

Like the SAP Java Connector, download the required installation files from SAPNet.

  1. Navigate to the following directory 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 > SAP Java IDOC Class Library

    This page contains links to the SAP Java Connector IDoc Class Library and the SAP Java Base IDoc Class Library.

  2. Uncompress and extract the archives into the same directory as the SAP Java Connector installation path sapidocjco-install-path.
  3. Load sapidocjco-install-path/docs/idoc/jco/intro.html into your browser and follow the instructions under the link Installation.

Important Notes:

Creating IDoc OTDs

You create IDoc OTDs with the SAP IDoc wizard in the NetBeans IDE. You can choose to have the wizard connect to the SAP system and retrieve the IDoc message format automatically, or you can have the wizard use an IDoc definition file from a specified location. The IDoc definition file would be saved or downloaded from the SAP system as described in Exporting the IDOC File from SAP.

To Create IDoc OTDs Directly From SAP

  1. In the Projects window of the NetBeans IDE, right click a Project, then click New > Object Type Definition.

    The New Object Type Definition Wizard appears.

  2. Click SAP IDoc and click Next.

    The Select metadata page appears.

  3. To retrieve the IDocs message format directly from the connected SAP system, select the From SAP Directly, then click Next.

    Note - Refer to SAP JCo and SAP IDoc Class Library Installation for a list of required files that must be installed in order to connect to SAP directly.


  4. Click Next. The System Parameters page appears.
  5. Enter the information for the SAP system for the IDoc wizard to connect to:
    For This Option
    Enter
    System ID
    System ID of the SAP system.
    Application server
    Name of the SAP Application Server.
    System number
    System number of the SAP system.
    SAP Routing String
    Router string of hostnames/IP addresses of all SAP routers between your Application Server and the SAP gateway host (optional).
    Language
    Language used for SAP access.

    Available Languages include:

    • EN - English

    • DE - German

    • JA - Japanese

    • KO - Korean

    RFC Trace
    NO to disable RFC tracing (default); YES to enable RFC tracing, which creates trace files.
  6. Click Next.

    The Login Parameters page appears.

  7. Enter the information below 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 IDoc Metadata Parameters page appears.

  9. Enter the following information about the IDoc.
    For This Option
    Enter
    System Release
    The SAP System release for this IDoc. All IDocs up to this release number are displayed in the list of available IDocs.
    IDoc type
    IDoc type, for example, CREMAS03. You cannot use a wild card.
    IDoc type extension
    Extension for this IDoc type (optional).
    Record Type Version
    Select the version of the IDoc record type. The default value is 3.
    Message format
    Blank padded for ALE format or CR-LF for EDI format.

    For IDoc type, click the List IDocs button to display a list of available IDocs supported by SAP, as seen in the figure below.


    Figure 1 IDoc Type List

    image:IDoc Type List
  10. Select your needed IDoc type and click OK.
  11. Click Next.

    The Review Selection page appears.

  12. Review your selections and click Finish.

    The OTD Editor window appears, displaying the OTD.


    Figure 2 CREMAS IDOC OTD

    image:CREMAS IDOC OTD

    The figure above shows a CREMAS IDoc OTD in the OTD editor. The OTD has various methods which you can use in Java Collaborations for processing IDoc data. The CREMAS IDoc OTD also has marshal and unmarshal Web Service operations as seen in the Project tree. You can use these operations when using the OTD in BPM business processes.

    The figure below shows the unmarshal operation in the BPM Business Process editor. You can unmarshal byte or string data onto the IDoc OTDs bytes and contents nodes respectively. The bytes node takes in only UTF-8 encoded data. That is, if you want to perform an unmarshal operation using bytes as the input source, then you must ensure that the data is in UTF-8 before utilizing this node.

    In this example we are unmarshaling byte data which is not UTF-8 encoded; therefore, you must perform a bytes to text conversion in editor, and then unmarshal string data to the contents node.


    Figure 3 CREMAS unmarshal

    image:CREMAS unmarshal

    If required, you can also use the Relaunch option of the OTD to relaunch the IDoc OTD wizard and rebuild the IDoc OTD for the same IDoc Type built with a particular system release. On relaunch, the OTD is rebuilt again with the changed metadata. Any Java Collaborations and Business Processes using this IDoc OTD are also synchronized with the new changes. If your Java Collaborations or business Processes are using OTD nodes that are now absent in the relaunched OTD, you will be prompted to correct the business rules by validation errors.

To Create IDOC OTDs From a Description File

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

    The New Object Type Definition dialog box appears.

  2. Click SAP IDoc and click Next.

    The Select metadata source page appears.


    Figure 4 IDoc Wizard—Metadata Selection

    image:IDoc Wizard—Metadata Selection
  3. To retrieve the IDocs from a description file, select the From Description File.
  4. Click Next.

    The Definition File Parameters page appears.


    Figure 5 IDoc Wizard—Definition File Parameters

    image:IDoc Wizard—Definition File Parameters
  5. Enter the following information about the IDoc definition file.
    For This Option
    Enter
    IDoc File Name
    The path and filename for the IDoc description file to be used.
    Released In
    SAP IDoc release for this IDoc, for example, 4.6C.
    Message format
    Blank padded for ALE format or CR-LF for EDI format.
  6. Click Next. The Review Selection page appears.
  7. Review your selections and click Finish.

    The OTD Editor window appears, displaying the OTD.

Exporting the IDOC File from SAP

The following sections describe how to create and export the IDOC file from SAP. The procedures provided may vary depending on version and/or platform of SAP. Refer to the current documentation for your version of SAP. The procedures described in this section create the IDOC file an SAP system version 4.6 and earlier:

To Download the IDoc Description File From SAP

  1. Log into the SAPGUI, and close the system messages.

    The SAP Easy Access window appears.

    If the SAP Easy Access window does not appear, click Exit.


    Figure 6 SAP Easy Access Window

    image:SAP Easy Access Window
  2. Double-click WE63.

    The Documentation IDoc Record Types window appears.


    Figure 7 Documentation IDoc Record Types Window

    image:Documentation IDoc Record Types Window
  3. In the Basic Types box, type or select the IDoc to be parsed.
  4. Select any other options needed, and click Execute.

    The Documentation IDoc Record Types window shows the parsed definition file.


    Figure 8 Documentation IDoc Record Types Window—Parsed Definition File

    image:Documentation IDoc Record Types
  5. On the System menu, click List, Save, and then Local File.

    The Save List in File dialog box appears.


    Figure 9 Save List in File Dialog box

    image:Save List in File
  6. If necessary, select Unconverted.
  7. Click Save.

    The Save As dialog box appears.

  8. Navigate to the folder where you want to save the description file and click Save.

    The Transfer List to a Local File dialog box displays.


    Figure 10 Transfer List to a Local File Dialog Box

    image:Transfer List to a Local File
  9. Enter the name and path of the local file to receive the IDoc description file.
  10. Click Transfer.

    Once you have downloaded the IDoc description file, create the IDoc OTD using the IDoc wizard as described in Creating IDoc OTDs. Use the From Description File option so that you can select the description file you downloaded.

Saving the IDoc Description File (After 4.6)

Follow the instructions below to download an IDoc description file from an SAP system version 4.7 and later.


Note - The images in the procedure below show the SAPGUI version 6.2 connecting to segment version 4.7.


To Save the IDoc Description File From SAP

  1. Log into the SAPGUI, and close the system messages window.

    The SAP Easy Access window appears. If the SAP Easy Access window does not display, click Exit.


    Figure 11 SAP Easy Access Window

    image:SAP Easy Access
  2. Double-click WE63.

    The Documentation window appears as shown below.


    Figure 12 Documentation Window

    image:Documentation
  3. Enter the basic type, enhancement, and segment type information.
  4. Select the IDoc record types to be included.
  5. Click Parser. The Documentation window displays the parsed data.

    Figure 13 Documentation Window—Parsed Definition File

    image:Documentation Parsed Definition File
  6. On the System menu, click List, Save, and then Local File.

    The Save List in File dialog box appears.


    Figure 14 Save List in File Dialog box

    image:Save List in File
  7. If necessary, select Unconverted.
  8. Click Save.

    The Save As dialog box appears.

  9. Navigate to the folder where you want to save the description file and click Save.

    Once you have saved the IDoc description file, create the IDoc OTD using the IDoc wizard. Use the From Description File option so that you can select the description file you saved.