CacheProcessMRPMessages

Process Inbound Planning Message

Minor Business Rule

Object Name: B34A0990

Parent DLL: CMFG

Location: Client/Server

Language: C

1.Functional Description
1.1Purpose

This function will perform Load, Delete, Update, Get, and Clear functions on the MRP Messages cache 

used in the Numetrix Inbound Planning Messages UBE (R34A490).  On a Create process, an identifier for 

the cache (hCache handle) is passed back to the calling program for subsequent calls to this function.  



1.2Setup Notes and Prerequisites

The calling application is responsible for loading all appropriate key values to the data structure 

and identifying the number of keys to use in retrieval/update processes.  The application must also 

store the hCache pointers passed back from the "Create" process and pass these pointers back to the 

business function on the other process modes which require them (see technical specifications below).


1.3Special Logic

There is no special logic within this function.


2.Technical Specifications



I.    Perform setup functions 

A. Initialize cache to get handle.
B.Initialize return code to success.

C.If not successful, Set error "032E,"  "Error Processing Cache" and set return code to 
failure.


II.  Processing Based on Mode.

A.If Process Mode is "1" - GET:
1.Retrieve element from cache using keys to index.

B.If Process Mode is "2" - ADD:
1.Add element to cache.

C.If Process Mode is "3" - UPDATE:
1.Update cache element.  

D.If Process Mode is "4" - DELETE:
1.Delete cache element matching key  

E.If Process Mode is "5" - DELETE ALL:

1.Delete all cache elements

F.If Process Mode is "6" - GET NEXT:
1.Retrieve next element from cache using keys or keyless

G.If Process Mode is "7" - ADD/UPDATE:

1.If element exist, update, else add element to cache.

H.If Process Mode is "8" - END
1.Perform cleanup functions (Terminate cache).

I.If Process Mode is "9" - END
1.Close the cursor.

Data Structure

D34A0990B - Cache Process Inbound Numetrix Messages

Parameter NameData ItemData TypeReq/OptI/O/Both
cErrorConditionEV01charOPTNONE

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

mnUniqueKeyIDUKIDMATH_NUMERICOPTNONE

This field is a unique number used to identify a record in a file.

mnShortItemNumberITMMATH_NUMERICOPTNONE

An inventory item number. The system provides three separate item numbers plus an extensive cross-reference capability to other item 
numbers (see data item XRT) to accommodate substitute item numbers, replacements, bar codes, customer numbers, supplier numbers, and 
so forth. The item numbers are as follows:   o Item Number (short) - An eight-digit, computer-assigned item number     o 2nd Item Number - The 
25-digit, free-form, user defined alphanumeric item number     o 3rd Item Number - Another 25-digit, free-form, user defined alphanumeric item 
number

szDemandBranchMCUcharOPTNONE

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.

szSupplyBranchMMCUcharOPTNONE

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.

cMessageTypeMSGTcharOPTNONE

A code that distinguishes different messages generated in the Distribution Requirements Planning/Master Production Schedule/Material 
Requirements Planning system. Valid codes are:    A Warning messages (user controlled)    B Order and expedite    C Cancel    D Defer    E 
Expedite    F Frozen order (user controlled)    G Increase order quantity to (user controlled)    H Decrease rate quantity to    I Increase rate quantity to    
L Decrease order quantity to (user controlled)    M Manual reminder    N Create rate    O Order    P Firm order    S FPO adjustment suggestion    
T Past due order 

cMessageControlMSGAcharOPTNONE

A code to indicate which messages should be displayed. A Y code will display all messages, including those that have been cleared or 
processed, but not those already deleted. Any value other than Y will display current messages only.

cHoldCodeHCLDcharOPTNONE

A code that is used in Distribution Requirements Planning/Master Production Schedule/Material Requirements Planning and capacity 
message files to indicate how the message is created and whether or not the message is on hold. Valid codes are:     A System generated.     M 
Manually entered. Not deleted by the sytem when replanning.     Z A held message. Not deleted by the system when replanning.

szOrderKeyCompanyKCOOcharOPTNONE

A number that, along with order number and order type, uniquely identifies an order document (such as a purchase order, a contract, a 
sales order, and so on). If you use the Next Numbers by Company/Fiscal Year facility, the Automatic Next Numbers program (X0010) uses the 
order company to retrieve the correct next number for that company. If two or more order documents have the same order number and order 
type, the order company lets you locate the desired document. If you use the regular Next Numbers facility, the order company is not used to 
assign a next number. In this case, you probably would not use the order company to locate the document.

mnOrderNumberDOCOMATH_NUMERICOPTNONE

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.

szOrderTypeDCTOcharOPTNONE

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

mnLineNumberLNIDMATH_NUMERICOPTNONE

A number that identifies multiple occurrences, such as line numbers on a purchase order or other document. Generally, the system assigns 
this number,but in some cases you can override it.

szOrderSuffixSFXOcharOPTNONE

In the A/R and A/P systems, a code that corresponds to the pay item. In the Sales Order and Procurement systems, this code identifies 
multiple transactions for an original order. For purchase orders, the code is always 000. For sales orders with multiple partial receipts against an 
order, the first receiver used to record receipt has a suffix of 000, the next has a suffix of 001, the next 002, and so on.

szDescriptionDSC1charOPTNONE

Brief information about an item; a remark or an explanation.

mnTransactionQuantityTRQTMATH_NUMERICOPTNONE

A value that represents the available quantity, which might consist of the on-hand balance minus commitments, reservations, and 
backorders. You enter this value in the Branch/Plant Constants program (P41001).

mnSupplierVENDMATH_NUMERICOPTNONE

The address book number of the preferred provider of this item.

jdRequestDateDRQJJDEDATEOPTNONE

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

jdStartDateSTRTJDEDATEOPTNONE

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.

jdRecStartDateRSTJJDEDATEOPTNONE

The recommended start date for an order.

jdRecCompleteDateRRQJJDEDATEOPTNONE

The completion date planned for this order.

nNumberOfKeysINT01integerOPTNONE

Number of Days in Future to Query for Responses Due. 

cProcessModeEV01charOPTNONE

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

cCacheCodeErrorEV01charOPTNONE

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

cSuppressErrorMessagesEV01charOPTNONE

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

szErrorMessageIDDTAIcharOPTNONE

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.

mnJobNumberJOBSMATH_NUMERICOPTNONE

The job number (work station ID) which executed the particular job.

cReturnCursorEV01charOPTNONE

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

idCursorGENLNGIDOPTNONE

General purpose ID variable.

szErrorMessageCacheDTAIcharOPTNONE

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.

cOverrideStockingTypeOSTTcharOPTNONE

mnWOStartTimePBTMMATH_NUMERICOPTNONE

A field that is used to enter the beginning time of the operation sequence for the work center operation on the routing.

szAPSRoutingInstanceIDSRDScharOPTNONE

A detailed narrative description to explain the pending work order or engineering change order. The field offers unlimited text. You can 
format it on the Record Types screen to divide a work order into sections.

szAPSLocationSRDScharOPTNONE

A detailed narrative description to explain the pending work order or engineering change order. The field offers unlimited text. You can 
format it on the Record Types screen to divide a work order into sections.

szAPSOperationIDSRDScharOPTNONE

A detailed narrative description to explain the pending work order or engineering change order. The field offers unlimited text. You can 
format it on the Record Types screen to divide a work order into sections.

szAPSResourceSRDScharOPTNONE

A detailed narrative description to explain the pending work order or engineering change order. The field offers unlimited text. You can 
format it on the Record Types screen to divide a work order into sections.

szTransactionUOMUOMcharOPTNONE

A user defined code (00/UM) that indicates the quantity in which to express an inventory item, for example, CS (case) or BX (box).

szTypeOfBillTBMcharOPTNONE

A user defined code (40/TB) that designates the type of bill of material. You can define different types of bills of material for different uses. 
For example:    M     Standard manufacturing bill    RWK   Rework bill    SPR   Spare parts bill  The system enters bill type M in the work order 
header when you create a work order, unless you specify another bill type. The system reads the bill type code on the work order header to 
know which bill of material to use to create the work order parts list. MRP uses the bill type code to identify the bill of material to use when it 
attaches MRP messages. Batch bills of material must be type M for shop floor management, product costing, and MRP processing.

szRelatedOrderNumberRORNcharOPTNONE

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.

szRelatedOrderTypeRCTOcharOPTNONE

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.

szRelatedOrderCoRKCOcharOPTNONE

The key company that is associated with the document number of the related order.

mnRelatedOrderLineRLLNMATH_NUMERICOPTNONE

A number of the detail line on the related order for which the current order was created. For example, on a purchase order created to fill 
open sales orders, this is the line number of the sales order on which the item you are ordering appears.

szParentOrderNumberPARScharOPTNONE

A number that identifies the parent work order. You can use this number to do the following:     o Enter default values for new work orders, 
such as Type, Priority, Status, and Manager     o Group work orders for project setup and reporting  

jdWOTimeFenceDateDATE01JDEDATEOPTNONE

Event point for JDE Date.

cWOorMessageFlagEV01charOPTNONE

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

nIndexToUseINT01integerOPTNONE

Number of Days in Future to Query for Responses Due. 

Related Functions

None

Related Tables

None
F3411ProcessInboundMessages

F3411ProcessInboundMessages

Process Inbound Planning Message

Minor Business Rule

Object Name: B34A0990

Parent DLL: CMFG

Location: Client/Server

Language: C

1.Functional Description
1.1Purpose

This Business Function will process the Planning Messages flat file.  This is a text file imported 

from Numetrix.  It will convert text strings from the flat file into database records and default 

additional fields not passed in.  Call B34A0990 - Cache Process Inbound Numetrix Messages to insert the 

records into memory using JDE cache for retrieval later.


1.2Setup Notes and Prerequisites

• This function is called from the Numetrix Inbound Planning Messages UBE (R34A490).
'b7'b7'b7

1.3Special Logic

None.


2.Technical Specifications

2.4Processing 

Main Processing:


1.0Open the text file located at lpDS-> szPathName.
2.0Open the table F4101 - Item Master.

3.0Open the table F4102 - Item Branch.

4.0Process each line in the text file.

4.1Parse the string and separate fields by lpDS->cFieldDelimiter and lpDS->cTextQualifier.
4.2Process each field and map to F3411 cache structure:

4.2.1The fields in the text file must appear in this order: ITM, MCU, MMCU, MSGT, KCOO, 
DOCO, order type code(not in F3411), DCTO, LNID, SFXO, DSC1, TRQT, VEND, RSTJ, RRQJ

4.2.21st text field (ITM - Item Number): Copy as a Math Numeric to D34A0990B struct. If not 

equal to Previous Item Number, Fetch Keyed from F4101 where IMITM = ITM from the text file and return 

UOM1, UOM2, UOM3, UOM4, UOM5, UOM6, UOM7, UOM8, UOM9.  Set error "0267" if fetch to item master 

failed.  Save the ITM value as the Previous Item Number.

4.2.32nd text field (MCU - demand branch):  Format string to right-justified with leading spaces 

if not already.  Copy string to D34A0990B struct. If not equal to Previous Demand Branch or ITM 

is not equal to Previous Item Number, Fetch Keyed from F4101 where IBITM = ITM and IBMCU = MCU. If 

fetch failed, set error "0264"

4.2.43rd text field (MMCU - supply branch): Format string to right-justified with leading spaces 

if not already.  Copy string to D34A0990B struct.  If this field is not blank and (not  equal to 

Previous Supply Branch or ITM is not equal to Previous Item Number), Fetch Keyed from F4101 where 

IBITM = ITM and IBMCU = MCU.  If fetch failed, set error "0264"

4.2.54th text field (MSGT - Message type):  Copy field as a char to D34A0990B struct.   Set 

error "073Y" if MSGT is not equal to 'C','D','E','G','L', 'M', or 'O'.

4.2.65th text field (KCOO - Order Company):  Left-pad string with zeros if not blank. String is 

5 chars. e.g. "00200".  Copy string to D34A0990B struct.

4.2.76th text field (DOCO - Order Number):  Copy as a Math Numeric to D34A0990B struct.

4.2.87th text field (order type code):  Save field as a char cOrderTypeCode

4.2.98th text field (DCTO - Order Type): 

4.2.9.1If MSGT from text file is equal to  'O' (This is a new order so use the processing 
option order types)

4.2.9.1.1If cOrderTypeCode == '1' , Copy lpDS->szWorkOrderType to D34A0990B struct.
4.2.9.1.2If cOrderTypeCode =='2', Copy lpDS->szTransferOrderType to D34A0990B struct.

4.2.9.1.3If cOrderTypeCode =='3', Copy lpDS->szPurchaseOrderType to D34A0990B struct.

4.2.9.1.4Skip this field in the text file and move on to LNID.

4.2.9.2If MSGT from text file is not equal to  'O' (This is a change to an existing order 
so the text file must have the order type)  Copy this string to D34A0990B struct.

4.2.109th text field (LNID - Line Number): Copy as a Math Numeric to D34A0990B struct.
4.2.1110th text field (SFXO - Suffix):  Copy string to D34A0990B struct.

4.2.1211th text field (DSC1 - Description): Copy string to D34A0990B struct.

4.2.1312th text field (TRQT - Trans Quantity):  Convert to Math Numeric

4.2.13.1If lpDs->szPlanningUOM is equal to '1' , it is already in primary so no UOM 
conversion.  Copy as a Math Numeric to D34A0990B struct.

4.2.13.2Else Switch lpDS->szPlanningUOM

4.2.13.2.1Case '2':  UOMToConvert == UOM2 from F4101
4.2.13.2.2Case '3':  UOMToConvert == UOM3 from F4101

4.2.13.2.3Case '4':  UOMToConvert == UOM4 from F4101

4.2.13.2.4Case '5':  UOMToConvert == UOM6 from F4101

4.2.13.2.5Case '6':  UOMToConvert == UOM8 from F4101

4.2.13.2.6Case '7':  UOMToConvert == UOM9 from F4101

4.2.13.2.7Case '8':  UOMToConvert == UWUM from F4101

4.2.13.2.8Case '9':  UOMToConvert == UVM1 from F4101

4.2.13.2.9Convert from planning UOM to primary UOM.  Call Object B4000520 - F41002 Get 

Item UOM Conversion.  Pass in: szBranchPlant = MCU from text file; szFromUnitOfMeasure = 

UOMToConvert; szToUnitOfMeasure  = UOM1 from F4101; mnQuantityToConvert  = TRQT from text file; 

mnShortItemNumber  = ITM from text file; Return: mnQuantityConvertedFromtoTo

4.2.13.2.10  Set error "0269" if any errors returned from UOM conversion function.

4.2.13.2.11 Copy mnQuantityConvertedFromtoTo to the D34A0990B struct.

4.2.1413th text field (VEND - Supplier):  Copy as a Math Numeric to the D34A0990B struct.
4.2.1514th text field (RSTJ - Rec start date):  Format date per lpDS->szDateFormat.  Look at UDC 

00/DF for the codes.  Copy as Jde Date to the D34A0990B struct.

4.2.1615th text field (RRQJ - Rec complete date): Format date per lpDS->szDateFormat.  Look at 

UDC 00/DF for the codes.  Copy as Jde Date to the D34A0990B struct.

4.3Default other F3411 cache values not in the text file:
4.3.1EV01 - Error Condition: This is a key to the cache record. Copy '0' to the D34A0990B struct 
if no errors, '1' if any errors occurred while processing this record.

4.3.2UKID - Unique Key ID:  This is the line number of the line in the text file. It will be a 

key to the cache record.  It will be used to identify in the report the line number of the record 

if any errors occurred so corrections can be made easier.  (This will also eventually be the key to 

the F3411 record by adding the value to the greatest UKID already in the table.).  Start with 1 

and increment a counter for every record.  Copy the counter to the D34A0990B struct.

4.3.3MSGA - Message Control:  Copy ' ' to the D34A0990B struct.

4.3.4HCLD - Hold Code:  Copy 'X' to the D34A0990B struct

4.3.5DRQJ - Request Date:  Copy RRQJ from text file to the D34A0990B struct.

4.3.6STRT - Start Date:  Copy RSTJ from text file to the D34A0990B struct.

4.3.7DTAI - Error Message ID:  If any errors occurred processing this record, copy the error 

message ID to this field.  This value will be printed to the error report.

4.4Insert this record to the cache.  Call Object B34A0990 - CacheProcessInboundNumetrixMessages.  
Pass in:  cProcessMode   = '2'; mnJobNumber = lpDS->mnJobNumber; cReturnCursorFlag = '0'; pass in 

all F3411 fields in D34A0990B struct.

5.0Set lpDS->ErrorCondition = '1' if any errors occurred processing any record.
6.0Close the text file.

7.0Close the F4101 - Item Master.

8.0Close the F4102 - Item Branch.


Data Structure

D34A0990A - F3411 Process Inbound Numetrix Messages

Parameter NameData ItemData TypeReq/OptI/O/Both
szPathNameNFLFcharOPTNONE

The name of the flat file. This includes the directory path where the flat file exists.

szDateFormatFRMTcharOPTNONE

The format of a date as it is stored in the database. For OneWorld, the following date formats are valid: YMD, MDY, DMY, EMD. If you leave 
this field blank, the system displays dates based on the settings of the operating system on the workstation. With NT, the Regional Settings 
in the Control Panel control the settings for the operating system of the workstation. For World Software, the following date formats are valid: 
DMY, MDY, YMD. EMD is not a valid date format.

cFieldDelimiterFFDLcharOPTNONE

cTextQualifierTC056charOPTNONE

Indicates that a double quotation mark is used to quailfy text in this user-defined file.

szWorkOrderTypeDCTOcharOPTNONE

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

szTransferOrderTypeDCTOcharOPTNONE

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

szPurchaseOrderTypeDCTOcharOPTNONE

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

cErrorConditionEV01charOPTNONE

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

cSuppressErrorMessageEV01charOPTNONE

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

mnJobNumberJOBSMATH_NUMERICOPTNONE

The job number (work station ID) which executed the particular job.

szErrorMessageIdDTAIcharOPTNONE

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.

szPlanningUOMUOMcharOPTNONE

A user defined code (00/UM) that indicates the quantity in which to express an inventory item, for example, CS (case) or BX (box).

mnRecordCountMATH01MATH_NUMERICOPTNONE

- - - Good Performance Low Value. 

jdWOTimeFenceDateDATE01JDEDATEOPTNONE

Event point for JDE Date.

Related Functions

None

Related Tables

None