Using SAPODA in Business Object Designer

This section describes how to use SAPODA in Business Object Designer to generate business object definitions. For information on launching Business Object Designer, see the Business Object Development Guide.

After you launch an ODA, you must launch Business Object Designer to configure and run it. There are six steps in Business Object Designer to generate a business object definition using an ODA. Business Object Designer provides a wizard that guides you through each of these steps.

After starting the ODA, do the following to start the wizard:

  1. Open Business Object Designer.
  2. From the File menu, select the New Using ODA... submenu.

    Business Object Designer displays the first window in the wizard, named Select Agent. Figure 34 illustrates this window.

To select, configure, and run the ODA, follow these steps:

  1. Select the ODA.
  2. "Configure initialization properties".
  3. "Expand nodes and select objects".
  4. "Confirm selection of objects".
  5. "Generate the definition" and, optionally, Provide additional information.
  6. "Save the definition".

Select the ODA

Figure 34 illustrates the first dialog box in Business Object Designer's six-step wizard. From this window, select the ODA to run.

Figure 34. Selecting the ODA


To select the ODA:

  1. Click the Find Agents button to display all registered or currently running ODAs in the Located agents field.
    Note:
    If Business Object Designer does not locate your desired ODA, enter the Agent's name directly into the Agent's name field. If it still does not locate the ODA, check the setup of the ODA.
  2. Select the desired ODA from the displayed list.

    Business Object Designer displays your selection in the Agent's name field.

Configure initialization properties

The first time Business Object Designer communicates with SAPODA, it prompts you to enter a set of initialization properties as shown in Figure 35. You can save these properties in a named profile so that you do not need to re-enter them each time you use SAPODA. For information on specifying an ODA profile, see the Business Object Development Guide.

Figure 35. Configuring Agent Properties


Configure the SAPODA properties described in Table 47.

Table 47. SAPODA Properties

Row # Property Name Property Type Description
1 UserName String SAP logon user name (not required when generating a definition only from an IDoc)
2 Password String SAP logon password (not required when generating a definition only from an IDoc)
3 Client String SAP logon client number (not required when generating a definition only from an IDoc)
4 Language String SAP logon language (not required when generating a definition only from an IDoc)
5 SystemNumber String SAP system number (not required when generating a definition only from an IDoc)
6 ASHostName String Host name of the SAP application server (not required when generating a definition only from an IDoc)
7 RFCTrace Single-card, multi-value RFC tracing for the SAP system
8 DefaultBOPrefix String Text that is prepended to the name of the business object to make it unique.

You can change this later, if required, when Business Object Designer prompts you for Business Object Specific Properties. For more information, see Provide additional information.

9 MaximumHits String Maximum number of objects returned during a node search. For more information, see "Expand nodes and select objects".

Default is: 100

10 TraceFileName String Name of the trace file. If the file does not exist, SAPODA creates it in the \ODA\SAP directory. If the file already exists, SAPODA appends to it.

SAPODA names the file according to the naming convention. For example, if the agent is named SAPODA, it generates a trace file named SAPODAtrace.txt.

Use this property to specify a different name for this file.

11 TraceLevel Integer Level of tracing enabled for SAPODA

For more information on tracing, see "Working with error and trace message files".

12 MessageFile String Name of the error and message file.

SAPODA names the file according to the naming convention. For example, if the agent is named SAPODA, it names the message file SAPODAAgent.txt.Important: The error and message file must be located in the \ODA\messages directory.

Use this property to verify or specify an existing file.

13 File destination Directory Directory where ODA-generated files are stored.

Default is the default directory on the Windows system. It is recommended that you change the default setting to the \connectors\SAP\utilities\generatedfiles directory.

Important:
Correct the name of the message file if the default value displayed in Business Object Designer represents a non-existent file. If the name is not correct when you move forward from this dialog box, Business Object Designer displays an error message in the window from which the ODA was launched. This message does not popup in Business Object Designer. Failing to specify a valid message file causes the ODA to run without messages.

Expand nodes and select objects

After you configure all properties for SAPODA, Business Object Designer displays a tree with the following the initial nodes:

The nodes whose names are preceded by a plus sign (+) are expandable. Click on them to display more nodes or leaves. SAPODA generates business object definitions only from leaves.

Figure 36 illustrates this dialog box as originally displayed and with some nodes expanded.

Figure 36. Tree of schema with expanded nodes


When a leaf's name is displayed in bold type, you can select the leaf as the basis for its business object to be generated. Use standard Windows procedures to select multiple leaves. In other words, depress the CTRL key while you use the mouse to select multiple leaves.

Important:
On a Windows system, if Business Object Designer cannot find required library files in the Path environment variable or the files are not on the system, it displays a CORBA Exception while attempting to get the tree nodes. For information about these files, see "Before running SAPODA".

SAPODA uses a polymorphic node type that allows you to associate a flat file with a node. Initially the node displays without any leaves. You can browse a file system and select files to add to that node. The node is called polymorphic because its nature changes from a leaf to a branch when you associate it to one or more files.

Figure 37 illustrates two ways of limiting the number of leaves that Business Object Designer returns:

After you have selected all desired leaves for object generation, click the Next button. For information on how to filter the objects returned, see the Business Object Development Guide.

Confirm selection of objects

After you identify all the objects to be associated with a generated business object definition, Business Object Designer displays the dialog box with only the selected leaves and their node paths. Figure 38 illustrates this dialog box.

Figure 38. Confirming selection of nodes and leaves


This window provides the following options:

Generate the definition

After you confirm the selected objects, the next dialog box informs you that Business Object Designer is generating the definitions.

Figure 39 illustrates this dialog box.

Figure 39. Generating the Definition


Provide additional information

SAPODA prompts for additional information. The type of the top-level node (IDoc types, BOR, RFC, or Dynamic Definitions) determines:

This section describes:

Note:
No additional information is required for the Dynamic Transaction and Retrieval nodes.

IDoc Type: Providing additional information

SAPODA displays the BO Properties window to enable you to specify information required for business objects based on IDoc types. The properties displayed in this window differ depending on the source of the IDoc (an extracted file or a definition in the SAP system) and whether the definition is being defined for the ABAP Extension module. This section describes the following topics:

The BO Properties Window--Common Properties

Regardless of whether SAPODA is generating the business object definition from an IDoc file or an IDoc defined in the SAP system, the BO Properties window for an IDoc type allows you to specify or change:

The BO Properties Window--Property for IDoc Defined in the SAP System

In addition to the Prefix and module properties, the BO Properties window representing an IDoc defined in the SAP system also displays the Release property. You can use this property to identify an earlier version of the IDoc type.

Important:
If the earlier version of the IDoc type has fewer segments than the current version, SAPODA might create a definition with missing segments or SAPODA might display an error indicating that the generation of the business object definition was unsuccessful. This inconsistency is due to different versions of SAP requiring different API calls.

Figure 40 illustrates the two versions of the BO Properties window, one for an extracted IDoc Type definition file and one for an IDoc defined in the SAP system.

Figure 40. Providing additional information for an IDoc type business object


The BO Properties Window--Specifying a Function module for the ABAP Handler

If you select Extension as the module type, SAPODA prompts whether you want to enter function module names for any of the default verbs.

By default, when generating a definition for the ABAP Extension module, SAPODA specifies the following text for verb application-specific information at the business object level of the top-level business object:

:/CWLD/IDOC_HANDLER

If you already know the function module names to pass to the ABAP handler, select Yes at this prompt. SAPODA displays the window illustrated in Figure 41.

Figure 41. Specifying function modules for the ABAP handler


Figure Figure 41 illustrates a BO Properties window in which two function modules have been specified.

After you save the business object definition, the General tab in Business Object Designer displays the required application-specific information at the business object level of the topmost business object. Figure Figure 42 illustrates such a window with the two specified function modules.

Figure 42. Specifying the ABAP handler in Business Object Designer


For more information about the ABAP handler, see Business object data routing to ABAP handlers. For more information about application-specific information required by the ABAP Extension module, see Developing business objects using IDocs.

BOR or RFC: Providing additional information

There are two BO Properties windows for a BOR or RFC Type. The properties displayed in the first window allow you to specify or change:

After you click OK to move forward from the first BO Properties window, SAPODA gives you the opportunity to reduce the size of the generated definition. You are prompted whether you want to remove from the definition any attributes that represent optional parameters. This prompt displays only if there are optional parameters to remove. Reducing the size of the definition can enhance performance later when the connector processes instances of the business object.

Figure 43 illustrates the properties displayed for a BOR or RFC-type object and the prompt that displays after you click OK.

Figure 43. Providing sdditional iInformation for BOR or RFC business objects


If you click Yes in the prompt illustrated above, the second BO Properties window displays. You can specify removal of each optional parameter of a BAPI/RFC interface by changing its Value from Yes (include a corresponding attribute in the generated definition) to No (do not include an attribute).

If you click No in the prompt illustrated above, the final wizard displays. For more information, see Save the definition.

Figure 44 illustrates the second BO Properties window.

Figure 44. Specifying attributes for removal from the definition


Important:
A business object definition for a RFC-enabled function beginning with "Bapi" must have an attribute that represents a business object corresponding to a return structure or table. If a definition lacks such an attribute, an error occurs when its corresponding generated code is compiled. If you get this compile error, examine the BAPI to determine if SAP was using a different return structure. In this case, change the generated Java code to point to the proper parameter.

In addition to the specifications you provide in SAPODA, when you create a definition for the RFC Server module, you may want to modify application-specific information after you save the business object definition. For more information, see Developing business objects for the RFC Server module.

HDR: Providing additional information

There are two BO Properties window for an HDR table-based object. The property displayed in the first window allows you to specify or change the business object's prefix. If you are satisfied with the value you entered for the DefaultBOPrefix property in the Configure Agent window (Figure 35), you do not need to change the value here.

Figure 45 illustrates this window.

Figure 45. Providing additional information for an HDR business object


In addition, only 512 bytes of information from a table can be returned. When a table returns more than 512 bytes, you will be presented with the dialog found in Figure 46. Answering "No" returns attributes (column descriptions) from the beginning of the table until the 512 byte maximum is reached.

Figure 46. 512 byte warning

Answering "Yes" displays the second BO properties windows noted in Figure 47. The length in bytes for each attribute is provided in the window description. You can specific the inclusion or exclusion of an attribute for the business object by toggling its value between "Yes" and "No."

Figure 47. Size and type of BO properties for an HDR business object


For more information, see Developing business objects for the Hierarchical Dynamic Retrieve module.

Save the definition

After you provide all required information in the BO Properties dialog box and click OK, Business Object Designer displays the final dialog box in the wizard. Here, you can save the definition to the server or to a file, or you can open the definition for editing in Business Object Designer. For more information, and to make further modifications, see the Business Object Development Guide.

Note:
When this step completes, Business Object Designer ends a manually-started ODA. To generate another definition, you must restart the ODA.

Figure 48 illustrates this dialog box.

Figure 48. Saving business object definition


Copyright IBM Corp. 1997, 2003