4 Using Business Function Calls

This chapter contains the following topics:

4.1 Understanding Business Functions

A business function is an encapsulated set of business rules and logic that can be reused by multiple applications. Business functions provide a common way to access the JD Edwards EnterpriseOne database. A business function accomplishes a specific task. Master business functions provide the logic and database calls necessary to extend, edit, and commit the full transaction to the database. Third-party applications can use master business functions for full JD Edwards EnterpriseOne functionality, data validation, security, and data integrity.

You can use master business functions to update master files (such as Address Book Master and Item Master) or to update transaction files (such as sales orders and purchase orders). Generally, master file master business functions, which access tables, are simpler than transaction file master business functions, which are specific to a program. Transaction master business functions provide a common set of functions that contain all of the necessary default values and editing for a transaction file. Transaction master business functions contain logic that ensures the integrity of the transaction being inserted, updated, or deleted from the database.

For interoperability, you can use master file master business functions instead of table input and output. Using master business functions enables you to perform updates to related tables using the master business function instead of table event rules. In this case, the system does not use multiple records; instead, all edits and actions are performed with one call.

Business functions are core for interoperability with JD Edwards EnterpriseOne. If you build custom integrations to interoperate with JD Edwards EnterpriseOne, you must know which business functions to call and how to call those business functions. You can use existing business functions, modify existing business functions, or create custom business functions. If you are creating a custom business function, JD Edwards suggests that you find an existing business function that is similar to what you want to accomplish and use the existing business function as a model.

Note:

When an update or an Electronic Software Update (ESU) affects business functions, you might be required to modify the custom integration.

See "Understanding Business Functions" in the JD Edwards EnterpriseOne Tools Development Tools: APIs and Business Functions Guide.

4.2 Reviewing API and Business Function Documentation

You can use JD Edwards EnterpriseOne business functions and APIs in custom integrations. Business functions groupings are:

  • Master Business Functions

    A collection of business functions that provide the logic and database calls that are necessary to extend, edit, and commit the full transaction to the database. The design of master business functions enables them to be called asynchronously and to send coded error messages back to calling applications.

  • Major Business Functions

    Components that encapsulate reusable logic common to many applications, such as date editing routines and common multicurrency functions.

  • Minor Business Functions

    Components that perform complex logic for a specific instance or single application. Minor business functions are used in JD Edwards EnterpriseOne for processing that cannot be accomplished efficiently in event rules or for logic that might be required in multiple places within a single application.

4.3 Creating Business Function Documentation

Business function documentation explains what individual business functions do and how to use each business function. You can generate information for all business functions, groups of business functions, or individual business functions. The documentation for a business function includes information such as:

  • Purpose.

  • Parameters (the data structure).

  • Explanation of individual parameter that indicate the input/output required and an explanation of return values.

  • Related tables (which tables are accessed).

  • Related business functions (business functions that are called from within the functions itself).

  • Special handling instructions.

See "Understanding Business Function Documentation" in the JD Edwards EnterpriseOne Tools Development Tools: APIs and Business Functions Guide .

4.4 Finding Business Functions

If you can find a JD Edwards EnterpriseOne application that is similar to what you need to do, you can use that application as a model. The JD Edwards EnterpriseOne Cross Application Development Tools menu (GH902) provides several tools that you can use to determine what business functions a JD Edwards EnterpriseOne application uses and how the business function is used in the application. From the Cross Application Development Tools menu, you can access:

  • Object Management Workbench

  • Cross Reference Facility

  • Debug Application

4.4.1 Using the Object Management Workbench

You can use the Object Management Workbench (OMW) to search for the business function object and then review the C code.

See "Understanding Objects" in the JD Edwards EnterpriseOne Tools Object Management Workbench Guide.

See "JD Edwards EnterpriseOne OMW Projects" in the JD Edwards EnterpriseOne Tools Object Management Workbench Guide.

4.4.2 Using the Cross Reference Facility

You can use the Cross Reference Facility to identify each instance for which a business function is used. The Cross Reference program (P980011) is on the Cross Application Development Tools menu (GH902).

See "Understanding the Cross Reference Facility" in the JD Edwards EnterpriseOne Tools Development Tools: Data Access Tools Guide.

4.4.3 Using the Debug Application

Another option that you might consider for understanding a JD Edwards EnterpriseOne application is to run a JD Edwards EnterpriseOne debugger. You can run the Event Rules Debugger to obtain named event rule and table event rule information for a JD Edwards EnterpriseOne application. You can use Microsoft Visual C++ to debug business functions that are written in C. You can use these two tools together.

See "Understanding the Event Rules Debugger" in the JD Edwards EnterpriseOne Tools Development Tools: Event Rules Guide.

See "Understanding the Visual C++ Debugger" in the JD Edwards EnterpriseOne Tools Development Tools: APIs and Business Functions Guide.