Adding Records to the Subsystem Table

Add a business function object in Oracle's JD Edwards EnterpriseOne Object Management Workbench.

  1. On the Business Function Design form, select the Design Tools tab and click Start Business Function Design Aid.

  2. Complete the function name and description and then attach the appropriate data structure.

  3. In Microsoft Visual C++, open the business function include (.h) file and add the name of the header file that you generated.

    For example, the header file statement is emphasize in this business function include (.h) file:

    /***************************************************************************
     Table Header Inclusions
    ****************************************************************************/
    
    /***************************************************************************/
    External Business Function Header Inclusions
    ****************************************************************************/
    #include <R98SSUBE.h>
    /***************************************************************************
     Global Definitions
    ****************************************************************************/
    
    /***************************************************************************
    * Structure Definitions
    ****************************************************************************/
    * TYPEDEF for Data Structure
    * Template Name:  Report Interconnect Data Structure
    * Template ID:   D983059
    * Generated:   Wed Oct 18 14:01:22 1995
    
  4. In Microsoft Visual C++, open the business function source (.c) file and add lines to declare the variable of this data structure type and populate the members of the data structure.

    For example, the variable declaration for the report interconnect data structure is emphasize in this business function source (.c) file:

    #include <jde.h>
    /****************************************************************************
    * Variable declarations
    *****************************************************************************/
    HUSER hUser=NULL;
    LPSTR szServer=NULL;
    DSRI380813 dsRI;
    /* Declare the variable of type REPORT INTERCONNECT DATA STRUCTURE */
    BOOL bRet= FALSE;
    JDEDB_RESULT rcode;
    /****************************************************************************
    Declare structures
    *****************************************************************************/
    
    /****************************************************************************
    Declare pointers
    *****************************************************************************/
    
    /****************************************************************************
    Check for NULL pointers
    *****************************************************************************/
    if ((lpBhvrCom == NULL) ||
      (lpVoid == NULL)  ||
      (lpDS == NULL))
    
  5. In the business function source (.c) file, call the API to add the record to the subsystem table.

    For example, the API call to add the record to the subsystem table is emphasize in this business function source (.c) file:

    *****************************************************************************
    Main Processing
    *****************************************************************************/
    memset(&dsRI, 0, sizeof(DSRI380813));
    /* Populate the members of the Report Interconnect Data Structure */
     strcpy(dsRI.ProgramId,lpDS->szString01);
    /* Call Subsystem API to add the record to the Subsystem Table */
    /* Note : As Environment Name is set to NULL, this API will use OCM to find the⇒
     default
    Environment of this UBE */
    bRet=ubeReport_AddSubsystemRecord( hUser,/* User Handle */
       "R98SSUBE", /* Name of the subsystem */
       "XJDEOOO1", /* Name of the Subsystem Version*/
       NULL, /* Name of the override env - not used */
       szServer,  /* Name of the server */
     &dsRI);   /* Subsystem Connect DS */
    /**************************************************************************/
    
  6. After you call the ubeReport_AddSubsystemRecord API to attach the record, build the business function.

  7. Call the business function from the event rules process of the program to be called. This program can be either an interactive or batch application.