GetMessageDetail

Get Message Detail

Major Business Rule

Object Name: B3400510

Parent DLL: CMFG

Location: Client/Server

Language: C

1.Functional Description
This function is to be used to get Message Details from F3411 for an item or group of  items, based 
on filters for an Item/Branch in F4102. The function will pass filtering fields to F4102, find the 

appropriate Items in the Branch that meet those filtering criteria, then get all the details of each 

record from F3411 for that specific Item/Branch combination. (see parameters below).


1.1Purpose
The purpose of this business function is to match filtering criteria with specificItems in a Branch, 
then search the Detail Message F3411 for messages for that Item/Branch, returning the message 

record(s) to the P3411 Find/Browse form. The message detail will be passed back to the P3411 Find/Browse grid 

rows, one item's messages per row.  Further filtering may be done in the F3411, but the normal 

OneWorld QBE tool will accomplish that additional filtering



1.2Setup Notes and Prerequisites

None

1.3Special Logic

This business function will first search F4102 to find the Items as filtered by Branch and other 

F4102 fields. The Branch/Plant may be input as either MCU (Data Item Business Unit = Demand Branch in 

F3411) or MMCU (Data Item Branch = Supply Branch in F3411).  The business function will have to recognize 

that either MCU or MMCU should be matched to MCU in the Item/Branch F4102. Once the Items are found, 

it will retrieve all data items in F3411 for the identified Item/Branch.


2.Technical Specifications
Clear Output Parameters
if Mode = 0Open Tables Mode


/* Open Tables */

Open files F4102, F3411

if open table not successful

set error messages

Mode = 2

else 

Mode = 1


/* Initialize Values */

Set Global Table Flag = 0

Short Item Number  = 0

Set F4102 Index ID to Key 5 for default to open table


/* Initialize Branch/Plant value, set up search parameters */

If incoming Demand Branch MCU > blank

set IPMCU = incoming MCU

set MMMCU = incoming MCU

set Global Branch Flag = 'D'

set up F3411 Key 5

else if incoming Supply Branch MMCU > blank

set IPMCU = incoming MMCU

set MMMMCU = incoming MMCU

set Global Branch Flag = 'S'

set up F3411 Key 6

else

set error messages -- branch plant required

Mode = 2


/* Evaluate Input Values */

Wk Value = -1

if Planning Code MPST != ' '

Wk Value = 1

else

Wk Value = 0

if Buyer BUYR != 0

Wk Value = Wk Value + 10

if Planner ANPL != 0

Wk Value = Wk Value + 100

if Master Planning Family PRP4  !=  blanks

Wk Value = Wk Value + 1000


if Wk Value > 0/* error checking */

/*All Fetches include Branch mcu */

/* Determine KeySelect */

(use Key 5)Case Wk Value = 1000 (prp4)

Number of Keys = 2

Which Select = 5

Case Wk Value == 1001 (prp4, mpst)

Number of Keys = 3

Which Select = 5

(use Key 6)

Case Wk Value == 100 (anpl)

Number of Keys = 2

Which Select = 6

Case Wk Value == 1100(anpl, prp4)

Number of Keys = 3

Which Select = 6

Case Wk Value == 1101 (anpl, prp4, mpst)

Number of Keys = 4

Which Select = 6

(use Key 7)

Case  Wk Value == 10 (buyr)

Number of Keys = 2

Which Select = 7

Case Wk Value == 1010 (buyr, prp4)

Number of Keys = 3

Which Select = 7

Case Wk Value == 1011 (buyr, prp4, mpst)

Number of Keys = 4

Which Select = 7

(use Select 1)

Case Wk Value == 1( mpst)

Number of Keys = 1

Which Select = 1

Case Wk Value == 11 (mpst, buyr)

Number of Keys = 2

Which Select = 1

Case Wk Value == 111 (mspt, buyr, anpl)

Number of Keys = 3

Which Select = 1

Case Wk Value == 1111 (mpst, buyr, anpl, prp4)

Number of Keys = 4

Which Select = 1

(use Select 2)

Case Wk Value == 110 (anpl, buyr)

Number of Keys = 2

Which Select = 2

Case Wk Value == 1110 (anpl, buyr, prp4)

Number of Keys = 3

Which Select = 2

(use Select 3)

Case Wk Value == 101 (mpst, anpl)

Number of Keys = 2

Which Select = 3

Default

Number of Keys = -1

F4102 Index ID = Null

if Which Select > 0 /* success */

if Which Select = 5

set F4102 Key 5

else if Which Select = 6

set F4102 Key 6

else if Which Select = 7

set F4102 Key 7

else

set up select structure


if Mode == 2

set errors and return

else /* get first record */

switch Which Select

case 5:

Copy Input values into fetch structure (TempBranch, Master Planning 

Family, Planning Code)

Fetch Record

case 6:

Copy Input values into fetch structure (TempBranch, Master Planning 

Family,Planning Code, Planner)

Fetch Record

case 7:

Copy Input values into fetch structure (TempBranch, Master Planning 

Family,Planning Code, Buyer)

Fetch Record

default:  /* select structure */

Fetch Record

if Fetch Fails

set Mode = 2

else

copy retrieved Short Item Number from the F4102 to the Output parameter

set Mode = 1

if Global Branch Flag == D

MMMCU = Demand Branch 

F3411 Fetch Structure Short Item Number = Short Item Number

Fetch Record from F3411

Else

MMMMCU = Supply Branch

F3411 Fetch Structure Short Item Number = Short Item Number

Fetch Record from F3411

if fetch fails

set Global Table = 0 /* get next item number from F4102 */

else 

Exit Flag = 1/* return to app */

Table Flag = 1/* set up fro next fetch on F3411 */

Load Output Parameters

End Mode 0


if Mode = 1

while wk exit flag = 0

if Global Table Flag = 0

/* Get Item Number */

Fetch item number from F4102 using incoming search parameters

if fetch fails

wk exit flag = 1 - all records read for incoming values

Mode = 2

else

MMITM = IBITM

if Branch Flag = D

MMMCU = Demand Branch 

F3411 Fetch Structure Short Item Number = Short Item 

Number

Fetch Record from F3411

Else

MMMMCU = Supply Branch

F3411 Fetch Structure Short Item Number = Short Item 

Number

Fetch Record from F3411

if Fetch Fails

Global Table flag = 0/* get next item number from 

F4102 */

else

Exit Flag = 1/* exit while loop */

Global Table Flag = 1/* set for next fetch on F3411 */

Load Output Parameters

End Global Table Flag = 0 

else/* subsequent calls to F3411 */

Fetch record from F3411 using item number, branch/plant

if fetch fails

set Global Table Flag = 0 - all records read for given item 

number

else

wk exit flag = 1 - record retrieved

Load Output Parameters

end while

End Mode 1


if Mode == 2 Close Program

Clear Output Parameters

Close Files

Memory Cleanup

End Mode 2

End Processing




^

Data Structure

D3400510 - Get Message Detail

Parameter NameData ItemData TypeReq/OptI/O/Both
mnShortItemNumberITMMATH_NUMERICNONENONE

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

szDemandBranchMCUcharNONENONE

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.

szSupplyBranchMMCUcharNONENONE

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.

cPlanningCodeMPSTcharNONENONE

A code that indicates how Master Production Schedule (MPS), Material Requirements Planning (MRP), or Distribution Requirements 
Planning (DRP) processes this item. Valid codes are:    0   Not Planned by MPS, MRP, or DRP    1   Planned by MPS or DRP    2   Planned by MRP    
3   Planned by MRP with additional independent forecast    4   Planned by MPS, Parent in Planning Bill    5   Planned by MPS, Component in 
Planning Bill  These codes are hard coded.

mnBuyerBUYRMATH_NUMERICNONENONE

The address number of the person responsible for setting up and maintaining the correct stocking levels for the item.

mnPlannerANPLMATH_NUMERICNONENONE

The address number of the material planner for this item.

szMasterPlanningFamilyPRP4charNONENONE

A user defined code (41/P4) that represents an item property type or classification, such as commodity type or planning family. The system 
uses this code to sort and process like items. This field is one of six classification categories available primarily for purchasing purposes.

cSuppressErrorMessagesEV01charNONENONE

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

cModeEV02charNONENONE

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

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.

cMessageTypeMSGTcharNONENONE

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 

szDescriptionDSC1charNONENONE

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

mnQuantityAvailableTRQTMATH_NUMERICNONENONE

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).

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.

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

jdDateRequestedDRQJJDEDATENONENONE

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

jdDateStartSTRTJDEDATENONENONE

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.

jdDateRecommendedStartRSTJJDEDATENONENONE

The recommended start date for an order.

jdDateRecommendedCompletRRQJJDEDATENONENONE

The completion date planned for this order.

cHoldCodeHCLDcharNONENONE

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.

mnVendorVENDMATH_NUMERICNONENONE

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

mnUniqueKeyUKIDMATH_NUMERICNONENONE

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

cClearedMSGAcharNONENONE

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.

szCompanyKCOOcharNONENONE

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.

mnLineNumberLNIDMATH_NUMERICNONENONE

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.

szOrderSuffixSFXOcharNONENONE

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.

cTableFlagEV03charNONENONE

A radio button that specifies the level at which trace/track result is to be displayed.  Select the Detail to display all transactions except IB, IX, 
and IZ types.  Or, select Derivative Lots Only to display only those transactions that may have created new derivative lot. 

cBranchFlagEV04charNONENONE

PeopleSoft event point processing flag 04.

nNumberOfKeysINT02integerNONENONE

Number of Days in the Past to Query for Quote Requests Received. 

nWhichSelectINT03integerNONENONE

Event point for Integer.

idF4102IndexIDGENLN3IDNONENONE

General purpose ID variable.

hRequestF3411GENLN3IDOPTNONE

General purpose ID variable.

hRequestF4102GENLN3IDOPTNONE

General purpose ID variable.

Related Functions

None

Related Tables

None