VerifyAndGetWorkOrderMaster

Verify and Get Work Order Master

Minor Business Rule

Object Name: B3100330

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose

Verify that the Work Order Master (F4801) record exists and return a pointer to the Work Order Master 

Record.  

   Return Pointer:  1=Return Pointer, 0=Do not return pointer.  

   Call Type: 1=Verify that record exists, 2=Verify that record does not exist.  

   Suppress Error Message: 1=Suppress runtime error message handling, 0=Allow runtime error 

message handling.  


1.2Setup Notes and Prerequisites

• If a pointer to the record is returned, this pointer must be cleared in the application using the 
BSFN FreePtrtoDataStructure.


1.3Special Logic

None.


2.Technical Specifications


2.4Processing 


1.0.  Initialize the DS F4801Pointer to NULL.


2.0.  Fetch the Work Order Master Record where DOCO = DS Order Number.


3.0.  If Fetch failed, return messages.

3.1.  If DS Call Type is equal to '1', return error messages.
3.1.1.  Assign DS Error Message ID = '0115' (Work Order Number Invalid).
3.1.2.  If DS Suppress Error Message is not equal to '1', SetGBRError where error message is 

'0115' ( Work Order Number Invalid) and DS Order Number is highlighted.


4.0.  If Fetch is successful, return pointer and messages.

4.1.  If DS Call Type is equal to '2', return error messages.
4.1.1.  Assign DS Error Message ID = '2463' (Record Already Exists).
4.1.2.  If DS Suppress Error Message is not equal to '1', SetGBRError where error message is 

'2463' (Record Already Exists) and DS Order Number is highlighted.


4.2If DS Call Type is not equal to '2', return the Work Order Master information.
4.2.1. Return the Order Type (DCTO), the Description (DL01), and the Business Unit (MCU) from 
the Work Order Master record retrieved.


4.3.  If  DS Call Type is not equal to '2' and DS Return Pointer is equal to '1', return pointer 

to the Work Order Master Record.

4.3.1.  Allocate memory for the Work Order Master Record.
4.3.2.  If Memory Allocation is successful, Assign DS F4801 Pointer = Address of Work Order 
Master Record.

4.3.3.  If Memory Allocation is not successful, return error messages.
4.3.3.1.  Assign DS Error Message ID = '4365' (No Memory).
4.3.3.2.  If DS Suppress Error Message is not equal to '1', SetGBRError where error 

message is '4365' and DS Business Unit is highlighted.


1.  If Call Type is equal to '1' and the fetch fails, return Error Message ID '0115' (Work Order 
Number    Invalid).

2.  If Call Type is equal to '2' and the fetch is successful, return Error Message ID '2463' (Record 

Already Exists).

3.  If Return Pointer is equal to '1', the fetch is successful, and the memory allocation is 

successful, return the pointer to the data structure.

4.  If the fetch is successful return the Order Type (DCTO), the Description (DL01), and the Business 

Unit (MCU).


Data Structure

D3100330 - Verify and Get Work Order Master

Parameter NameData ItemData TypeReq/OptI/O/Both
mnOrderNumberDOCOMATH_NUMERICNONENONE

A number that identifies an original document. This document can be a voucher, a sales order, an invoice, unapplied cash, a journal entry, 
and so on.

cReturnPointerEV01charNONENONE

An option that specifies the type of processing for an event.

cCallTypeEV01charNONENONE

An option that specifies the type of processing for an event.

cSuppressErrorMessagesEV01charNONENONE

An option that specifies the type of processing for an event.

idF4801PointerGENLNGIDNONENONE

General purpose ID variable.

szErrorMessageIDDTAIcharNONENONE

A code that identifies and defines a unit of information. It is an alphanumeric code up to 8 characters long that does not allow blanks or 
special characters such as %, &, or +. You create new data items using system codes 55-59. You cannot change the alias.

szOrderTypeDCTOcharNONENONE

A user defined code (00/DT) that identifies the type of document. This code also indicates the origin of the transaction. J.D. Edwards has 
reserved document type codes for vouchers, invoices, receipts, and time sheets, which create automatic offset entries during the post 
program. (These entries are not self-balancing when you originally enter them.) The following document types are defined by J.D. Edwards and 
should not be changed: P Accounts Payable documents   R Accounts Receivable documents   T Payroll documents   I Inventory documents  
O Purchase Order Processing documents   J General Accounting/Joint Interest Billing documents   S Sales Order Processing documents

szDescriptionDL01charNONENONE

A user defined name or remark.

szBusinessUnitMCUcharNONENONE

An alphanumeric code that identifies a separate entity within a business for which you want to track costs. For example, a business unit 
might be a warehouse location, job, project, work center, branch, or plant. You can assign a business unit to a document, entity, or person for 
purposes of responsibility reporting. For example, the system provides reports of open accounts payable and accounts receivable by 
business unit to track equipment by responsible department. Business unit security might prevent you from viewing information about business units 
for which you have no authority.

cReturnPointerForTagEV01charOPTNONE

An option that specifies the type of processing for an event.

idF4801TagPointerGENLNGIDOPTNONE

General purpose ID variable.

Related Functions

None

Related Tables

F4801 Work Order Master File
F4801T Work Order Master Tag File