Generating business objects

The WebSphere business integration system provides two utilities that enable you to define business objects and the metadata required to support the processing of those business objects in the SAP application:

Generating business objects: SAPODA

SAPODA generates individual business object definitions for the Hierarchical Dynamic Retrieve Module. If you use this utility to create hierarchical business object definitions, you must manually specify the relationships between the generated parent and child business object definitions.

Note:
Table definition anomalies may produce definitions that require manual changes to fully meet your needs.

Steps to creating a business object definition with SAPODA

To use SAPODA to generate a business object definition for this module:

  1. Launch SAPODA.
  2. Launch Business Object Designer, which is the utility that facilitates development of business object definitions, both manually and automatically (by providing access to ODAs).
  3. Follow a six-step process in Business Object Designer to configure and run the ODA.
  4. Use Business Object Designer to manually modify the generated definition:

For information on using SAPODA, see Appendix D, Generating business object definitions using SAPODA. For information on launching Business Object Designer and using it to manually modify a business object definition, see the Business Object Development Guide.

Creating relationships between tables

SAPODA generates a business object definition for every table you specify. When it completes generating, you can open all tables in Business Object Designer for editing.

To create a hierarchical business object definition from the individual business object definitions generated by SAPODA, do the following:

  1. Determine the table at the top of the hierarchy.

    Assume, for example, the top-level business object is SAP_Customer. This business object has a single key, Customer_KUNNR. SAPODA specifies the following application-specific information for this attribute:

    TN=KNA1:CN=KUNNR

  2. Locate and differentiate every child and grandchild business object.
  3. To the top-level business object and to each parent in the hierarchy below it, add an attribute that represents each child business object or array of child business objects:
  4. To each child business object definition that contains an attribute corresponding to the key of its parent, specify the foreign-key relationship in the attribute's application-specific information.

    For example, most business objects that are a direct child of SAP_Customer contain the Customer_KUNNR attribute. In the application-specific information for Customer_KUNNR, specify the following:

        TN=KNVI:CN=KUNNR:FK=..Customer_KUNNR
     
    

    For information on specifying foreign keys, see Table 46.

  5. Locate child business object definitions whose corresponding tables do not contain the key of the parent object. In these definitions, locate a non-key field in the parent that matches the child's primary key.

    For example, SAP_Customer_ADRC is a second-level business object with no key the same as its parent's. SAPODA generates this business object definition with the Address_number_ADDRNUMBER attribute, which is a non-key field in SAP_Customer.

    In the application-specific information for this attribute, specify the foreign-key relationship as:

        TN=ADRC:CN=ADDRNUMBER:FK=..Address_ADRNR
     
    
    Note:
    Because SAP changed the name of the ADDNR field used in tables (such as KNA1) created in SAP Version 3x to ADDRNUMBER in tables (such as ADRC) created in SAP Version 4x, recognizing the relationship between these two fields is more challenging.

Generating business objects: Advanced Outbound Wizard

The WebSphere business integration system enables users to define business objects and the metadata required to support the processing of those business objects in the SAP application. Advanced Outbound Wizard records and interprets your actions as you step through an SAP Display Transaction.

Important:
The wizard is intended to assist business object development. Due to table definition anomalies, the business object produced may require manual changes to fully meet your needs.

The wizard supports the definition of flat and hierarchical business objects that use the Retrieve verb.

Note:
Before you use the wizard, ensure that your existing entity in SAP includes all the information required for the business object. For example, for a sales order, ensure that the entity you use has the line items, schedule lines, and partners you require.

Steps to Creating a business object definition with advanced outbound wizard

To use Advanced Outbound Wizard to generate a business object definition for this module:

  1. Go to IBM CrossWorlds Station (transaction /N/CWLD/HOME).
    Important:
    You must log on to the SAP system in English when using IBM CrossWorlds Station to generate business object definitions. The CrossWorlds Station log is available only in English.
  2. On the Development tab, click the Advanced Outbound Wizard Button.
  3. In the IBM CrossWorlds outbound wizard window, enter the following information:
  4. Click Record.
  5. In the initial display screen, select the information you want the transaction to process.
  6. Step through the transaction. When you reach the last screen, you will be asked whether to exit the display. Click the Yes button.

    The CW Hierarchical Outbound Wizard screen displays. The business object displays closed at the top of the screen.

  7. Click the plus button (+) to the left of the business object's name to view the business object's attributes. Scroll to the bottom of the displayed attributes and click the plus button (+) to the left of the names of its child business objects to view their attributes.

    The wizard displays each field's length to the right of its name. To the right of the field's length, the wizard displays cumulative field length. If the cumulative length exceeds 512 bytes, the wizard marks the field with a red X and turns the field's display from yellow to red. By default, the wizard stops adding attributes to a business object when the length exceeds 512 bytes. To include desired attributes that are removed by default, you can:

  8. Remove unnecessary attributes from the definition by double-clicking their row. The color of deleted rows turns blue.
  9. Verify that the business object definition includes all desired attributes. When you are satisfied with the definition, click the generate button.

    The Download Object Definition screen displays.

  10. On the Download Object Definition screen, specify the location and name of the business object definition file and click Save.

For information on the business object and attribute names created by the wizard, see Business object names.

How does the wizard create relationships between tables?

When generating the business object definition, Advanced Outbound Wizard creates a list of all tables involved in the SAP transaction. You can view the list of tables by pressing the Show Tables button at the top of the wizard's screen. Table 48 illustrates the tables used to generate SAP_Customer. Table.

Table 48. illustrates the tables used to generate SAP_Customer.

Name Table Description
TFDIR Function module
KNA1 General Data in Customer Master
T001 Company Codes
KNB1 Customer Master (Company Code)
KNVV Customer Master Sales Data
TOBJ_OFF Objects that were disabled
ADRC Addresses (central address admin.)
ADRCT Address texts (central address admin.)
ADRG Assignment of addresses to other address groups (cent.adr.)
ADRV Address where used list (central address administration)
T002 Language keys
TBE01 Business Transaction Events: Publish & Subscribe Interfaces
TBE31 Application components per Publish & Subscribe interface
TBE32 Partner function modules per Publish & Subscribe interface
TBE34 Customer function modules per Publish & Subscribe interface
T100 Messages
DOKIL Index for Documentation Table DOKH
KNVI Customer Master Tax Indicator
TVKWZ Org.Unit: Allowed Plants per Sales Organization
T001W Plants/branches
KNVL Customer Master Licenses
TSADVC Customizing international address versions
TMODU Cross Reference Field Name - MODIF1
TCONV_ADR Conversion of Old Address Fields to CAM Address Fields
TSAD7 Address groups (central address management)
T005T Country Names
T005U Taxes: Region Key: Texts
TZONT Customers: Regional Zone Texts
TSAD7T Description of address groups (central address admin.)
TOJTD Customizing Object Types
TOJTB Business object repository: Basic data

The wizard makes three passes through the tables to determine their hierarchy and the relationship among them. It uses the information to specify foreign-key relationships in the application-specific information of business object attributes. It names the attributes based on the field's description in SAP's data dictionary in the user's language.

In its three passes, the wizard does the following:

  1. Determines the table at the top of the hierarchy.

    Typically this is the first table the wizard locates that has only one key field.

  2. Determines child business objects that contain the key of the top-level business object, and differentiates child from grandchild relationships based on the number of key fields.

    Typically several tables contain the parent's key field as well as multiple other keys. Grandchild tables typically contain more keys than their parent. Tables with identical keys are siblings (peers) of the parent.

  3. Determines the relationship of tables that do not contain the key of the top-level business object.

    The wizard establishes the relationship by locating a non-key field in the parent that matches the child's primary key.

Table 48 illustrates the results of all three of these passes through the list of display-Customer tables:

Attention: Verify the definition that the wizard generates. Although the wizard performs most of the work in creating a business object definition, the generated definition cannot meet the precise needs of your implementation. There are anomalies in table relationships that may cause the wizard to make incorrect decisions. For example, if two tables have the same set of keys and a child table has the same keys plus one, the wizard assigns the child to the first table.

Copyright IBM Corp. 1997, 2004