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.