VerifyAndGetRoutingInstructions

Verify And Get Routing Instructions

Minor Business Rule

Object Name: B3100450

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

1.Functional Description
This business function verifies that the Routing Instructions (F3112) record exists and 
returns a pointer to the Routing Instructions Record.  You can retrieve a record from F3112 using six 

different indexes.

   Index:  Pass in the number that identifies the index used to fetch the record.
      Keys:  Pass the number of key elements used to fetch the 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.


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

the BSFN FreePtrtoDataStructure.

.


1.1Purpose

This business function verifies that the Routing Instructions (F3112) record exists and returns a 

pointer to the Routing Instructions Record.


1.2Setup Notes and Prerequisites

• Set on "Suppress Error Messages" to suppress the runtime error message handling. Otherwise, if an 
error occurs the error message will be displayed on the message line.

• Set on "Return Pointer" to return a pointer the F3112 record.  If a pointer to the record is 
returned, this pointer must be cleared in the application using the BSFN FreePtrtoDataStructure.

• The user passes to the business function the number of the index they want to use and the number of 
key fields within that index that will be used.

'b7'b7'b7'b7'b7'b7'b7'b7List of Indexes:
1 = DOCO, OPSQ, OPSC, MCU (4 Keys)

  2 = MCU, STRT, OPSQ, DOCO (4 Keys)

  3 = MCU, DRQJ (2 Keys)

  4 = MMCU, MCU, OPSC, DOCO (4 Keys)

  5 = AN8, STRT, DOCO, OPSQ (4 Keys)

  6 = MMCU, KIT, DOCO, OPSQ (4 Keys)


1.3Special Logic

None.


2.Technical Specifications


2.4Processing 


1.0.  Initialize the DS F3112Pointer to NULL.


2.0.  Fetch the Shop Floor Control Routing Instructions Record using Index 1.


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 = '0002' (Record Invalid).
3.1.2.  If DS Suppress Error Message is not equal to '1', SetGBRError where error message is 

'0002' ( Record Invalid) and first field in index 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 first field in index is highlighted.


4.2If DS Call Type is not equal to '2', return the Work Order Master information.
4.2.1. Return the Work Center (MCU), the Related Number (RORN), and the Related Order Type 
(RCTO) from the Routing Instructions 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 Routing Instructions Record.

4.3.1.  Allocate memory for the Routing Instructions Record.
4.3.2.  If Memory Allocation is successful, Assign DS F3112 Pointer = Address of Routing 
Instructions 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 first field in index is highlighted.


Retrievals:

 1.  Shop Floor Control Routing Instructions Table (F3112) using index 1.

 2.  The Related Number (RORN), and the Related Order Type (RCTO).

Returns:

1.  If Call Type is equal to '1' and the fetch fails, return Error Message ID '0002' (Record 
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 Work Center (MCU), the Related Number (RORN), and the 

Related Order Type (RCTO).



Checklist:


Business Function SVR(The Business Function SVR document can be found on 

in the shared folder NTSERV2.xls)

______Business Function Name

______Source file Name

______Description of what the function does

______Which programs use the function

______Authors name


    Object Librarian Check:

______Verify Related Functions List against header file

______Verify Related Tables List against header file

______Verify Business Function Data Structure in the header file against Business Function   

   Parameter List

______"Check In" All the Business Function Parameter Lists


   All Business Functions must be run through Bounds Checker before checking them  in.

______Bounds Checker


Note:Make sure to highlight the line and click on either 'Parameters' or 'Notes' button to get 

Function ID



Data Structure

D3100450 - Verify And Get Routing Instructions

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.

mnOperationSequenceOPSQMATH_NUMERICNONENONE

A number used to indicate an order of succession. In routing instructions, a number that sequences the fabrication or assembly steps in the 
manufacture of an item. You can track costs and charge time by operation. In bills of material, a number that designates the routing step in the 
fabrication or assembly process that requires a specified component part. You define the operation sequence after you create the routing 
instructions for the item. The Shop Floor Management system uses this number in the backflush/preflush by operation process. In engineering 
change orders, a number that sequences the assembly steps for the engineering change. For repetitive manufacturing, a number that 
identifies the sequence in which an item is scheduled to be produced. Skip To fields allow you to enter an operation sequence that you want to begin 
the display of information. You can use decimals to add steps between existing steps. For example, use 12.5 to add a step between steps 
12 and 13.

szWorkCenterMCUcharNONENONE

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.

szTypeOperationCodeOPSCcharNONENONE

A user defined code (30/OT) that indicates the type of operation. Valid values include: A Alternate routing   TT Travel time   IT Idle time   T Text

jdStartDateSTRTJDEDATENONENONE

The start date for the order. You can enter this date manually, or have the system calculate it using a backscheduling routine. The routine 
starts with the required date and offsets the total leadtime to calculate the appropriate start date.

jdRequestedDateDRQJJDEDATENONENONE

The date that an item is scheduled to arrive or that an action is scheduled for completion.

szBranchMMCUcharNONENONE

A code that represents a high-level business unit. Use this code to refer to a branch or plant that might have departments or jobs, which 
represent lower-level business units, subordinate to it. For example:     o Branch/Plant (MMCU)     o Dept A (MCU)     o Dept B (MCU)     o Job 123 
(MCU) Business unit security is based on the higher-level business unit.

mnAddressNumberAN8MATH_NUMERICNONENONE

A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or 
location.

mnParentItemNumberKITMATH_NUMERICNONENONE

The system provides for three separate item numbers.    1.   Item Number (short) - An eight-digit, computer assigned, completely 
non-significant item number.    2.   2nd Item Number - The 25-digit, free form, user defined alphanumeric item number.    3.   3rd Item Number - Another 
25-digit, free form, user defined alphanumeric item number.

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.

szIndexDTAIcharNONENONE

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.

szKeysDTAIcharNONENONE

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.

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.

idF3112PointerGENLNGIDNONENONE

General purpose ID variable.

szRelatedNumberRORNcharNONENONE

A number that identifies a secondary purchase order, sales order, or work order that is associated with the original order. This number is for 
informational purposes only.

szRelatedOrderTypeRCTOcharNONENONE

A user defined code (system 00, type DT) that indicates the document type of the secondary or related order. For example, a purchase 
order might be document type OP and might have been created to fill a related work order with document type WO.

szWorkcenterBranchWMCUcharOPTNONE

This is the branch/plant to which the work center belongs and must exist in the business unit master (F0006) and branch plant constants file 
(F41001).

szActivityCodeACTBcharOPTNONE

The aggregation of actions performed within an organization that are useful for purposes of activity-based costing.

Related Functions

B4000460 Free Ptr To Data Structure

Related Tables

F3112 Work Order Routing