32 Defining Batch Error Messages

This chapter contains the following topics:

32.1 Understanding Batch Error Messaging

The Oracle's JD Edwards EnterpriseOne error message system provides a consistent interface to review batch application errors. You can set up batch applications to send messages to users when processing is complete. These messages include the success or failure of the batch job and notification when information is incorrectly entered into the system. To enhance the usability of the messages, the system uses a tree structure (or parent/child structure) to group related messages.

You can create two types of error messages for batch applications:

  • Non-text substituted

  • Text substituted

A non-text substituted error message provides a high-level indication that an error exists in the batch application. For example, Document number is invalid.

You can use text substitution messages to provide additional information regarding errors. For example, rather than the Document number is invalid error message, the message can instead state Document number 55.5555 is invalid.

You can also include a link to the associated interactive application in the message. This type of message is referred to as an active error message. The user can open the associated interactive application from the link that is attached to the message.

Error messages appear in the Oracle's JD Edwards EnterpriseOne Work Center (P012503) application after the batch job has completed. When you create custom batch error messages, determine what information Oracle's JD Edwards EnterpriseOne users require. For example, you might create a number of different messages that are generated when a journal entry report is run. You can create a message stating that the report completed successfully when the report data is in balance. Additionally, you can create multiple levels of messages that describe various errors if the report is out of balance. The first level might state that the report completed with errors while additional levels explain the specific details regarding the errors.

32.2 Setting Up Batch Error Messages

This section provides overviews of level break messages, level break message components, and work center APIs, provides sample source code, lists the prerequisites, and discusses how to:

  • Create data items for level break messages.

  • Create business function data structures.

  • Create level break message business functions.

  • Call the work center initialization API.

  • Call the processing work center APIs.

32.2.1 Understanding Level Break Messages

Level break messages act as containers to present error messages for each level break field that is defined in the batch application. Level break messages are informational; they are not error messages. Level break messages can be action messages that contain a shortcut to an application and require action on the part of the user. They can also be messages that require no action, but might include instructions for the user to review information.

Level break messages are text-substituted messages. You can define them at many different levels such as level one, level two, level three, and so on.

The level one level break message appears when you first launch JD Edwards EnterpriseOne Work Center. Additional levels appear beneath this level. This level of message provides high-level information. For example, Job completed with errors.

The level two level break message appears when you expand the level one message. Additional levels can appear beneath this level. This level of message provides more detail. For example, Batch 3230 has errors.

The level three level break message appears when you expand the level two message. Additional levels can appear beneath this level. This level of message provides additional detail. For example, Voucher 14787 contains errors.

32.2.1.1 How Level Break Messages Work

Level break messages group errors. They include these two distinct components:

  • The actual text of the message.

  • An indication whether the message is an action message.

All level break messages include the text component, but not all messages are defined as action messages.

The Work Center API creates and manages the Job Completed level break message. You create custom messages to meet the needs of your company. Level break messages organize messages that you set up to communicate information about the batch, document, and line in which the error occurred. You set these messages using the jdeSetGBRError or the jdeSetGBRErrorSubText functions.

Level break message Job R89004 ZJDE0001.c is a level-one message that the system generates automatically. Level break message Batch 3230 is in Error is a level-two message. AA 20050606 3031 and Intercompany Out of Balance are actual error messages.

The Work Center API must be called for every level break message.

These topics illustrate how messages might appear when an out-of-balance journal entry upload has completed.

32.2.1.2 First-Level Messages

First-level messages appear when users open their personal in-basket in Work Center. A plus symbol next to the message indicates that additional levels of messages exist. First-level messages might show the name of the batch job, explain that it completed with errors, and instruct the user to review the details about the errors.

32.2.1.3 Second-Level Messages

Users can view second-level messages when they expand the first-level message in JD Edwards EnterpriseOne Work Center. The second-level message might inform users that they need to review a specific batch number.

32.2.1.4 Third-Level Messages

Third-level messages appear when the user expands the second-level message in JD Edwards EnterpriseOne Work Center. The third-level message might inform the user that the batch job completed with errors because it was out of balance and then provide solutions to resolve the issue.

32.2.1.5 Text Substituted Messages

Error messages must be informative to be beneficial. You can increase their effectiveness through text substitution. Text substitution enables you to define variable text in messages (such as dates, amounts, and so on) that the system replaces with data at runtime. You set up text substitution messages in the data dictionary, which helps to ensure consistency of jargon and terminology. For example, in the message Voucher Batch &1 Contains Errors, the system uses &1 as a parameter to the message. The system substitutes &1 at runtime with a batch number and stores the rest of the information from the message in the data dictionary glossary. The glossary describes the error message as it is defined in the data dictionary. When you open the message in data dictionary, you can review the item glossary.

32.2.1.6 Action Messages

After users review a an error message and determine the resolution, they typically need to access an application to resolve the error. You can set up specific level break messages, which are known as action messages, to provide direct access to the associated application directly from JD Edwards EnterpriseOne Work Center. Action messages call a JD Edwards EnterpriseOne application and pass the required variables to that application. You determine the appropriate application and the correct values that need to pass to that application when you create the message. The system highlights action messages in the detail area to differentiate them from non-action messages. For example, users can click the shortcut to automatically access the Voucher Revision form from within the error message. The application presents the appropriate form and displays the record in error.

32.2.1.7 Work Center APIs

When you call a Work Center API, the system assumes a child/parent order. In other words, when the API is called, the system assumes that any error that is in the runtime error message stack belongs to the level that is associated with that instance of the API call. This means that all of the errors in the error space at that time, whether they are set using business functions or event rules, are packaged or grouped together as children of the level that was passed to the Work Center API. These error messages are then cleared from the error space so that the system can create the next group of messages based on a new set of records.

The timing of the calls to the Work Center API is critical. The reporting program typically starts by editing the header-level record, which leads to a set of detail records. The detail records are the first to be read and processed. Thus, the calls to the work center API typically send level break numbers in descending level break order.

For example, the actual series of level break calls to the API might appear as 4, 4, 4, 3, 4, 4, 3, 2, 4, 4, 3, 2, 1. This series indicates that the call structure started four levels down. The first call at level 4 allows the Work Center API to find any messages that occurred at that time and creates child messages using the level 4 message as the parent. If no errors occurred, then no messages are created. This call sequence example illustrates that the API was called at level 3 after three calls to level 4. When the call to level 3 is made, the Work Center API remembers if any level 4 messages were written. In other words, if no errors occurred when any of the level 4 calls were made, then the Work Center API does not create the level 3 messages. If even one error existed at any of the level 4 calls, the Work Center API creates the level 3 and the level 2 messages.

You must call the Work Center API at every level. Because the work center error messages are created based on a parent/child structure, if a level call is skipped, then the API has no way to group the child messages and child levels that are already created.

For example, this level call structure is valid: 6, 6, 5, 4, 3, 4, 4, 3, 2, 1. Conversely, the call sequence 6, 6, 4, 3, 4, 4, 3, 2, 1 is invalid because after level 6 is called, there is no corresponding call to level 5.

The Work Center API must be called using level 1 when the reporting job is about to complete. Hence, level 1 is the parent to all errors and level break messages. The level 1 call issues the job completed message. The level 1 call to the Work Center API is essential because it ensures that no orphan JD Edwards EnterpriseOne Work Center records are created and it also cleans up all allocated storage used by the Oracle's JD Edwards EnterpriseOne Work Center system. The level 1 call to the API should occur only once, typically in the End Section event of the primary section of the report.

32.2.2 Understanding Level Break Message Components

Error messages and level break messages are considered glossary data items. Level break messages act as a container for error messages.

You create level break messages in a project in Oracle's JD Edwards EnterpriseOne Object Management Workbench (OMW) by creating:

  • Data dictionary items.

  • Text substituted data structures.

  • Business function data structures.

  • Business functions.

32.2.2.1 Data Dictionary Items

The data dictionary item defines the text portion of the level break message as it appears in the JD Edwards EnterpriseOne Work Center. Before you create a data dictionary item, you should review the existing level break messages to determine if one meets your business needs.

When you create a custom level break message data item in the data dictionary, define it as a glossary data item. The alias that you enter for the data dictionary item is a unique identifier and cannot be changed once the data item is saved. It is recommended that the alias begins with LM. Level break messages are not error messages; they are defined as glossary group Y, PPAT Level Messages.

This description of the level break message data item appears in the JD Edwards EnterpriseOne Work Center. If this is a text-substituted message, enter the description using ampersands and sequential numbers to hold positions for substituted variables. For example, Batch &1 is out of balance by &2. The system replaces &1 with the actual batch number while the system replaces &2 with the amount that the batch is out of balance.

All message data items must include a cause and resolution. Begin by entering the text Cause: and then enter the cause of the message. Then, under the cause, enter the text Resolution: and then enter how the user should resolve the issue. For text-substituted messages, enter the data item description in the text area just above the cause.

32.2.2.2 Text Substituted Data Structures

The data structure for a text substituted error message must include the data items that are required for the text substitution. For example, a level break message describing a batch number that is out of balance by a specific amount uses a data structure that includes data items ICU (Batch Number) and AA (Amount).

The name of the data structure should include the same unique number that is used for the associated data dictionary glossary item. This number is to be appended to the prefix DELM. For example, a data structure created for level break message LM5509 is named DELM5509.

You must create a type definition (typedef) of the data structure to include in the associated business function. The typedef adds code to the C business function so that the business function can use the data structure.

32.2.2.3 Business Function Data Structures

You must have a business function for each level break message. Each business function requires an attached data structure. Do not confuse the business function data structure with the text substituted data structure that you created for the data dictionary item. The difference between the two is that the business function data structure moves data variables to the level break function. The data structure for the data dictionary items stores data that is mapped to the text substituted variables.

Include these items in the business function data structure:

  • All data items that are required for the level break text substitution message.

  • All data items that are required for the message to be active; that is, any variables that are required to load the form for the appropriate application.

  • Data item EV01.

    Change the variable name from cEverestEventPoint01 to cIncludeInterconnect. This parameter is a flag that determines if the message is active. This parameter should be included as a parameter in all level break messages, even if the original intent is not to call an application. You must enter a 1 in the data structure value to launch an application.

  • Data item GENLNG.

    Change the variable name from idGenericLong to idGenlong. Use this parameter to control all JD Edwards EnterpriseOne Work Center messaging. This data item is intended for use as a work field for the system.

For the system to return the correct batch number and the amount that is out of balance, the business function data structure must include these fields:

  • Document number

  • Document type

  • Document company

  • Batch number

  • Batch type

  • Document pay item

Two additional data items are required in this data structure:

  • J.D. EnterpriseOne Event Point (EV01).

    Required to determine if the message is an action message.

  • Generic Long (GENLNG).

    Required to control JD Edwards EnterpriseOne Work Center messaging.

The name of this data structure should include the same unique number that is used for the associated data dictionary glossary item. This number is to be appended to the prefix DLM. For example, you should name a business function data structure that was created for level break message LM5509 as DLM5509.

32.2.2.4 Business Functions

After you have created the business function data structure, you can create the business function. The business function processes the level break errors and performs all of the mappings for the active message.

The name of the business function should include the same unique number that is used for the associated data dictionary glossary item and the data structures. This number is to be appended to the prefix BLM. For example, you should name a business function that you create for level break message LM5509 as BLM5509.

You must attach the business function data structure to the business function prior to entering code. Then, when you create the business function, you can have the system create a skeleton for you. The last message that you receive reminds you to create a typedef of the business function data structure and paste it into the header file of the business function.

After you create the business function, you must build it and check it in to central objects.

32.2.3 Sample Source Code

You need to manually map fields from the business functions data structure to the dsTextData data structure; this is the data structure that is used for the text substitution in the level break message. You also need to manually map fields from the business function data structure to the dsFormData data structure; this is the data structure that is used for the active message.

This sample of the shell source code illustrates the information required in a level break message business function and its location in the .c file:

32.2.3.1 Variable Declarations

These lines declare the level break message variables:

/************************************************************
* Variable declarations
*************************************************************/
JCHAR szForm[11]; /* Name of form in application */
JCAHR szDDitem[11]; /* Data dictionary name of the level message */
JCHAR szDLLName[11];/* Name of the application DLL */
JCHAR szDs Tmpl[11]; /* Name of the text substitution data structure */

32.2.3.2 Declare Structures

Enter your own code for the appropriate text substitution data structure and application form. These examples are from an existing business function:

/************************************************************
* Declare structures
*************************************************************/
DSDELM0002 dsTextData;/* Instance of text substitution structure */
FORMDSW0411Z1D dsFormData;/* Instance of form interconnect structure */

32.2.3.3 Set Pointers

These lines ensure that the level break message functions:

/********************************************************************
* Set pointers
*********************************************************************/
if (lpDS->id⇒GenLong == (ID) 0)
{
 jdeSetGBRError (lpBhvrCom,lpVoid,(ID)0,_J("4363"));
  if(hUser)
  {
   JDB_FreeBhvr(hUser);
  }
  return ER_ERROR;
}
else
lpDSwork = (LPDS_B0100011A) jdeRetrieveDataPtr(hUser,lpDS->idGenLong);

32.2.3.4 Main Processing

Enter your own code for the appropriate text substitution data structure and glossary data item. These examples are from an existing business function:

jdeStrcpy((JCHAR*)szDsTmpl,)const JCHAR*)(_J("DELM0002)),DIM(szDsTmpl)-1);
jdeStrcpy(szDDitem,(const JCHAR *)(_J("LM0002")),DIM(szDDitem));
memset((void *)(&dsTextData),(int)(_J(�\0')),sizeof(dsTextData));

32.2.3.5 Assign Values from lpDS Data Structure to dsTextData Here

Enter your own code for the data items that are included in the business function data structure. When you assign values, map the business function data structure items to the text substitution data structure items. These examples are from an existing business function:

jdeStrncpy(dsTextData.szEdiuserid,(const JCHAR *)(lpDs->szEdiuserid),
 DIM (dsTextData.szEdiuserid));
jdeStrncpy(dsTextData.szEdibatchnumber,(const JCHAR *)
  (lpDS->szEdibatchnumber),
 DIM(dsTextData.szEdibatchnumber));
jdeStrncpy(dsTextData.szEditransactnumber,(const JCHAR *)
  (lpDS->szEditransactnumber),
 DIM(dsTextData.szEditransactnumber));

The first parameter is the location to where the value is being copied. The second value is the location from where the value is being copied. In this example, dsTextData.szEditransactnumber is located in the text substitution data structure and pDS->szEditransactnumber is located in the business function data structure.

Note:

Be conscientious of the commands that you use for these statements. The commands are based on the data type of the associated data items. The MathCopy command is for math numeric fields, assignments are for character fields, Strncpy is for strings, and Memcpy is for dates. If you use the Memcpy command for dates, the system assigns the characters directly.

The remaining lines in this section ensure that the level break message is functional:

if (lpDSwork->lpBlob->lpTSDSMPL != (LPDSTMPL)NULL)
{
 lpDSwork->
    lpBlob->lpTSTEXT=(PJSTR)AllocBuildStrFromDstmplName((LPDSTMPL)
        lpDSwork->lpBlob->lpTSDSMPL,(JCHAR*)szDsTmpl,
       (LPVOID)&dsTextData);
 jdeStrncpy (lpDSwork->lpBlob->szDDItem, (const JCHAR *)(szDDitem),
  DIM(lpDSwork->lpBlob->szDDItem));
}
if(lpDS->cIncludeInterconnect == _J('1'))

32.2.3.6 Form Interconnect Processing

Enter your own code for the appropriate application and form to be linked to the message. This example is from an existing business function:

jdeStrncpy(szDLLName,(const JCHAR *)(_J("P0411Z1")),DIM(szDLLName));
memset((void *)(&dsFormData),(int)(_J'\0)),sizeof(dsFormData));
memset((void *)(szForm),(int)(_J(�\0')),sizeof(szForm));
jdeStrncpy((JCHAR *)szForm,(const JCHAR *)(_J("W0411Z1D")),DIM(szForm) - 1);

32.2.3.7 Assign Values from LpDS Data Structure to dsFormData

Enter your own code for the appropriate application form. This example is from an existing business function and illustrates how to pass information from the business function data structure to the form data structure:

jdeStrncpy(dsFormData.EDUS,(const JCHAR *)(lpDS->szEdiuserid),
 DIM(dsFormData.EDUS));
jdeStrncpy(dsFormData.EDBT,(const JCHAR *)(lpDS->szEdibatchnumber),
 DIM(dsFormData.EDBT));
jdeStrncpy(dsFormData.EDTN,(const JCHAR *)(lpDS->szEditransactnumber),
 DIM(dsFormData.EDTN));
ParseNumericString(&dsFormData.EDLN,_J("1.0"));
dsFormData.EV01=_J(�1');

Note:

Be conscientious of the commands that you use for these statements. The commands are based on the data type of the associated data items. The MathCopy command is for math numeric fields, assignments are for character fields, Strncpy is for strings, and Memcpy is for dates. If you use the Memcpy command for dates, the system assigns the characters directly.

32.2.3.8 Get the Form Data Structure ID from the SVRDTL Table

These lines ensure that the level break message is functional:

If (JDESPECRESULT_PASSED==jdeSpecOpenLocalIndexed(&hTam,hUser,
         JDESPECTYPE_SVRDTL,SPECKEY2_SVRDTL))
 {
  jdeStrncpy((JCHAR *)lpDSwork->lpBlob->szForm,(const JCHAR *)(szForm),
      DIM (lpDSwork->lpBlob->szForm)-1);
  JdeStrncpy(Key.szForm,szForm,DIM(Key.szForm));
  ASVRDtlData.DataType=JDESPECDATA_RAWBLOB;
 JdeSpecFetchSingle(hTam,&ASVRDtlData,&Key,1);
  If(ASVRDtlData.pSpecData !=(void *)NULL)
  {
   lpASVRdtl=ASVRDtlData.pSpecData;
   JDBRS_GetSTMPLSpecs(hUser,(JCHAR*)lpASVRdtl->szFITemplateName,
        &lpDSwork->lpBlob->lpFIDSMPL);
   if(lpDSwork->lpBlob->lpFIDSMPL !=(LPDSTMPL)NULL)
   {
    lpDSwork->lpBlob->lpFITEXT=(PJSTR)AllocBuildStrFromDstmplName
                 (LPDSTMPL)
    lpDSwork->lpBlob->lpFIDSMPL,(JCHAR*)lpASVRdtl->szFITemplateName,
           (LPVOID)&dsFormData);
    jdeStrncpy(lpDSwork->lpBlob->szDLLName,(const JCHAR *)(szDLLName),
         DIM(lpDSwork->lpBlob->szDLLName));
   }
   jdeSpecFreeData(&ASVRDtlData);
  }
  jdeSpecClose(hTam);
 }

32.2.3.9 Function Clean Up

These lines ensure that the level break message is functional:

 if(hUser)
 {
 JDB_FreeBhvr(hUser);
 }
 return (ER_SUCCESS);}

32.2.4 Understanding Work Center APIs

In the batch application, use API calls in event rules to:

  • Initialize the Work Center.

  • Identify the level break points.

  • Terminate the batch message process.

32.2.4.1 Initializing the Work Center

In the batch application, initialize the JD Edwards EnterpriseOne Work Center API in event rules. You typically use the initialize section event of the primary section.

The cAllowUserIdToChange parameter on the initialize API works in combination with the szUserid parameter on the ProcessErrorsToPPAT API. The cAllowUserIdToChange parameter enables you to set up the batch application to send errors to the user who created the original records and not to the person who submits the job (such as the night operator). For example, if a single batch job contains 1,000 transactions that were created by 50 users, then only those users who created transactions with errors receive error messages. The night operator still receives a message, but it is a message such as Job completed normally or Job completed normally with errors. Other users whose transactions contained no errors do not receive error messages.

To set up this functionality, you need to enter a 1 in the cAllowUserIDToChange parameter when you initialize the batch error processing system. When you process the level 2 level break message and then call the ProcessErrorstoPPAT API, you can still specify who receives the messages by using the szUserid parameter. You can determine who should receive the message by reviewing the transaction record.

32.2.4.2 Identifying Level Break Points

After the JD Edwards EnterpriseOne Work Center system has been initialized, identify the various level break points within the report. Call the Processing Work Center API at each of these points to group the errors.

32.2.4.3 Terminating the Work Center Process

You must terminate the work center process before the batch job is finished but after all messages have been sent to the JD Edwards EnterpriseOne Work Center. When the batch program is about to terminate, call the JD Edwards EnterpriseOne Work Center error message business function, ProcessErrorsToPPAT, one last time. This call sends the process to level 1. Level 1 indicates the level of totaling is equal to 1 and that the process is complete. The system creates the job-completed message and frees any workspace that the Work Center API is using. This API is typically called on the End Section event of the primary section of the batch application.

Every report design that uses the Work Center API to process errors must call the API at the end of processing using a 1 in the level of totaling field. This call should also be done by jobs that are monitoring for critical errors and that need to terminate early.

When the system finishes processing the report, it creates messages, which can be reviewed in the JD Edwards EnterpriseOne Work Center. Batch errors are processed to the JDEM system. The system sends messages to the user running the report unless you specify that the messages should be sent to other users.

If the system encounters no errors, the API sends a message to the JD Edwards EnterpriseOne Work Center indicating that the job completed successfully.

32.2.5 Prerequisites

Before you begin setting up batch error messages, ensure that you:

  • Create a batch application object.

  • Complete the design of the report template with considerations for defining batch error messages.

32.2.6 Creating Data Items for Level Break Messages

Access Oracle's JD Edwards EnterpriseOne Object Management Workbench (OMW).

  1. Add a data item to the project in which you want to include the level break message.

  2. On the Data Dictionary Item Type form, click Yes to create a glossary data item.

  3. On the Glossary Items form, enter the alias of the level break message in the Alias field.

  4. Click the visual assist in the Glossary Group field and select glossary group Y.

  5. In the Product Code field, enter a product code in the 55–59 range, which is reserved for clients.

  6. In the Product Code Reporting field, enter a product code that represents the product that uses the level break message.

  7. In the Description field, enter a meaningful description.

    If this is a text-substituted message, enter the description using ampersands and sequential numbers to hold positions for substituted variables.

  8. Click the visual assist in the Error Level field and select 2.

  9. Select the Item Glossary tab and enter a cause and resolution in the text area.

  10. Save the glossary data item.

32.2.7 Creating Business Function Data Structures

Access the appropriate project in OMW.

  1. Add a data structure to the same project in which you added the other level break message components.

  2. Select the Design Tools tab and click Data Structure Design.

  3. On the Data Structure: Level break message form, enter the alias of the required data item on the Dictionary ItemsAlias field.

  4. Double-click the data item to include it in the data structure.

    You can also drag the data item to Structure Members.

  5. Enter EV01 in the Alias field and include it in the data structure.

  6. Change the structure member name of the cEverestEventPoint01 data item to cIncludeInterconnect.

  7. Enter GENLNG in the Alias field and include it in the data structure.

  8. Change the structure member name of the idGenericLong data item to idGenlong.

32.2.8 Creating Level Break Message Business Functions

Access the appropriate project in OMW.

  1. Add a business function to the same project in which you added the other level break message components.

  2. Select the Design Tools tab and click Start Business Function Design Aid.

  3. On the Business Function Design form, click the visual assist in the Parent DLL field and select the DLL that your company uses for creating custom business functions.

  4. In the detail area, enter a unique name in the Function Name field.

    This name cannot include any spaces and should be descriptive of the business function purpose.

  5. Enter a description in the Description field.

    This description can be the same as the name, however, you can use spaces in the description.

  6. Tab through the remaining fields.

    The system populates the F3 Code field with a 3 (Minor Business Rule).

  7. Modify the F3 Code if appropriate.

  8. Click the row header to highlight the row of data that you just entered, and select Parameters from the Row menu.

  9. Use the QBE (query by example) line to locate the associated data structure, click the data structure, and then click Select.

    This process attaches the business function data structure that was created for the level break message to the business function.

  10. On the Business Function Design form, verify that the name of the appropriate data structure appears in the Template Name field in the detail area.

  11. From the Form menu, select Create to begin the creation of the business function.

  12. Click Yes to answer the question Functions Not Found: Would you like skeletons created?

  13. Click Yes to answer the question Function Prototypes Not Found: Would you like them to be created? and click OK.

    The last message that appears reminds you to create a TYPEDEF for the data structure.

  14. On the Business Function Design form, click the row header to highlight the row and select Typedef from the Row menu.

    On the status bar, the message Your typedef is in the clipboard appears. This process creates the TYPEDEF for the data structure attached to the business function.

  15. From the Form menu, select Edit.

    The system launches Microsoft Visual C ++.

  16. From the Window menu, select to work with the .h file.

    You can also select the .h file using the tabs.

  17. Locate the DS Template Type Definitions section of the .h file and just below the heading, paste the TYPEDEF using CTRL V.

    This process copies the TYPEDEF for the data structure that is attached to the business function.

  18. Save the business function and minimize Microsoft Visual C ++.

  19. On the Business Function Design form, save the business function.

    If you are not using a test substituted error message, skip to step 22.

  20. Return to OMW and locate the level break message data structure for the text substitution, enter design, select the Design Tools tab, and click Create a type definition.

    On the status bar, the message Your typedef is in the clipboard appears.

  21. Return to Microsoft Visual C ++, locate the Structure Definitions section of the .h file and just below the heading, paste the TYPEDEF using CTRL V.

    This process copies the TYPEDEF for the text substitution data structure into the business function.

  22. Return to OMW and add the associated application to the project, enter design, select the Design Tools tab, click Start Form Design Aid, select the form to be launched, and select Application Properties from the File menu.

    If a link to an associated application is not required in the message, skip to step 25.

  23. On the Application Properties form, select the Operations tab, click Generate Form Data Structures, and in Notepad, highlight the entire form data structure for the appropriate form and copy the section.

  24. Return to Microsoft Visual C ++, locate the Structure Definitions section of the .h file and just below the heading, paste the TYPEDEF.

    This TYPEDEF resides above the TYPEDEF that was pasted from the level break message data structure for the text substitution.

  25. Locate the External Business Function Header Inclusions section of the .h file and enter a call to the business function to process the message to Work Center.

    Begin the call with #include (for example #include<B0100011.h >).

  26. From the Window menu, select the .c file.

    You can also select the .c file using the tabs.

  27. Enter the appropriate code in the .c file as described in the Sample Source Code section.

  28. When the business function is complete, save the business function, and click Build Business Function from the Design Tools tab.

32.2.9 Calling the Work Center Initialization API

Open a report in which you want to add batch error messaging in Oracle's JD Edwards EnterpriseOne Report Design Aid (RDA).

  1. Create a report scope event rule variable in Event Rules Design using the data dictionary item GENLNG.

  2. Access the appropriate event and select to call a business function.

    Generally, this business function is called in Event Rules Design from the primary section of the report using the Initialize Section event.

  3. Use the QBE line to select the JD Edwards EnterpriseOne Work Center initialization business function B0100025 with a description of F01131 Edit JDEM Error Message.

  4. Refer to the Windows Help file of APIs to identify the appropriate parameters to pass.

32.2.10 Calling the Processing Work Center APIs

Access RDA for a report in which you want to add batch error messaging.

  1. Define all appropriate level breaks for the report.

    You need to analyze the events that logically group all errors. This typically happens at events in which all editing has been completed for a group of records or immediately after all editing for an individual record has occurred.

  2. For each level break established, call the business function for the level break message at the appropriate level break.

    The business function for the level break message should relate to the type of error grouping that you want to capture at the particular level break. For example, SetLevel_SFVoucher groups errors that are related at the voucher level break. For reports, this business function is typically called in the Do Section event. If the interconnect is blank, then the business function is not calling an action message.

  3. Call the JD Edwards EnterpriseOne Work Center error message business function immediately after the call to the level break message.

    This name of this business function is B0100011 and the description is Process batch errors to JDEM system.

  4. Refer to the Windows Help file of APIs to identify the appropriate parameters to pass.