Example: Business Function Source File
Assume that Business Function Design created this source file called Check for In Add Mode. It contains the minimum components required in a business function source file. The source code in the Main Processing section is entered manually, and varies from business function to business function. All other components are generated by Business Function Design.
#include <jde.h> #define b98sa001_c /***************************************************************************** * Source File: B98SA001.c * * Description: Check for In Add Mode Source File ****************************************************************************/ **************************************************************************/ #include <b98sa001.h> /************************************************************************** * Business Function: CheckForInAddMode * * Description: Check for In Add Mode * * Parameters: * LPBHVRCOM lpBhvrCom Business Function Communications * LPVOID lpVoid Void Parameter - DO NOT USE! * LPDSD98SA0011 lpDS Parameter Data Structure Pointer * *************************************************************************/ JDEBFRTN(ID) JDEBFWINAPI CheckForInAddMode (LPBHVRCOM lpBhvrCom, LPVOID lpVoid,⇒ LPDSD98SA0011 lpDS) { /************************************************************************ * Variable declarations ************************************************************************/ /************************************************************************ * Declare structures ************************************************************************/ /************************************************************************ * Declare pointers ************************************************************************/ /************************************************************************ * Check for NULL pointers ************************************************************************/ if ((lpBhvrCom == NULL) || (lpVoid == NULL) || (lpDS == NULL)) { jdeSetGBRError (lpBhvrCom, lpVoid, (ID) 0, _J("4363")); return CONTINUE_GBR; } /************************************************************************ * Set pointers ************************************************************************/ /************************************************************************ * Main Processing ************************************************************************/ if (lpBhvrCom->iBobMode == BOB_MODE_ADD) { lpDS->cEverestEventPoint01 = _J('1'); } else { lpDS->cEverestEventPoint01 = _J('0'); } return (BHVR_SUCCESS); } /* Internal function comment block */ /************************************************************************** * Function: Ixxxxxxx_a // Replace "xxxxxxx" with source file number * // and "a" with the function name * Notes: * * Returns: * * Parameters: **************************************************************************/
The lines that appear in the source file are described in this table:
Source File Line |
Where Input |
Description and Guidelines |
---|---|---|
#include <jde.h> |
Business Function Design |
Includes all base JD Edwards EnterpriseOne definitions. |
#define b98sa001_c |
Business Function Design |
Ensures that related header file definitions are correctly created for this source file. |
Source File |
OMW |
Verifies the information in the file comment section. Enter the programmer's name, SAR number, and description. |
#include <B98SA001.h> |
OMW |
Includes the header file for this application. |
Business Function |
Business Function Design |
Verifies the name and description in the business function comment block. |
JDEBFRTN(ID) JDEBFWINAPI CheckForInAddMode (LPBHVRCOM lpBhvrCom, LPVOID lpVoid, LPDS104438 lpDS) |
Business Function Design |
Includes the header of a business function declaration. |
Variable declarations |
IDE |
Declares variables that are local to the business function. |
Declare structures |
IDE |
Declares local data structures to communicate between business functions, internal functions, and the database. |
Declare pointers |
IDE |
Declares pointers. |
Check for NULL pointers |
Business Function Design |
Business Function Standard Verifies that all communication structures between an application and the business function are valid. |
jdeErrorSet (lpBhvrCom, lpVoid, (ID) 0, _J("4363"), LPVOID) NULL); return ER_ERROR; |
Business Function Design |
Sets the standard error to be returned to the calling application when any of the communication data structures are invalid. |
Set pointers |
IDE |
Declares and assigns appropriate values to pointers. |
Main Processing |
IDE |
Provides main functionality for a business function. |
Function Clean Up |
IDE |
Frees any dynamically allocated memory. |
Internal function comment block |
IDE |
Defines internal functions that are required to support the business function. They should follow the same C coding standards. A comment block is required for each internal function and should be formatted correctly. |
Use the MATH_NUMERIC data type exclusively to represent all numeric values in JD Edwards EnterpriseOne software. The values of all numeric fields on a form or batch process are communicated to business functions in the form of pointers to MATH_NUMERIC data structures. MATH_NUMERIC is used as a data dictionary (DD) data type.