F31091ProcessMasterData

F31091 Process Master Data

Master Business Function

Object Name: X31091

Parent DLL: CMFGBASE

Location: Client/Server

Language: C

F31091ProcessMasterData
Purpose:

To perform all table I/O for the F31091.

• Open F31091 Table
• Retrieve Audit Information
• Add, Change or Delete F31091 record depending on Action Code
• 'b7'b7
Setup Notes:

'b7  This is a Master File Master Business Function.  It will process one record at a time.  No cache 

is used.


Special Logic:

'b7 If calling this function numerous times to add or change multiple records, set the return 

hrequest parameter to '1' and return the F31091 Table Hrequest ID with each subsequent call.  This will 

eliminate the need to open and close the F31091 table for each call.  NOTE: After all processing is 

completed, call this business function with Action Code  = '5' Close Table and Return Hrequest Flag = '0' to 

close the table.  If this is not completed, a memory leak will occur because of the open table.


Function Outline:

If the input F31091 Hrequest does not = NULL

Retrieve Pointer

Else

Open F31091 Table

End If


If the Table Pointer is not NULL

If input Action Code = 'A' or '1'

If Process Edits = 1 or 2

Validate Order Number

Validate Item Number - retrieve 2nd, 3rd Item Numbers and Primary UOM

If input UOM is blank

 Set to Primary UOM
End If

Validate UOM

End If 
If Process Edits = 1

Validate Branch/Plant, Shift, Cat Codes 1-3 against DD

End If 

Copy input F31091 parameters to F31091 data structure
Get Audit Information

Add record to F31091

Else if input Action Code = 'C' or '2'

If Process Edits = 1 or 2

Validate Order Number

Validate Item Number 

- retrieve 2nd, 3rd Item Numbers and Primary UOM

If input UOM is blank

 Set to Primary UOM
End If

Validate UOM

End If 

If Process Edits = 1

Validate Branch/Plant, Shift, Cat Codes 1-3 against DD

End If 

Copy input F31091 parameters to F31091 data structure
Get Audit Information

If input Orig Document Number is not blank

Set Index = 1

Set Number of Keys = 7

Delete Record using original values

Add Record to F31091 using new key values

Else

Update the F31091 record

End If

Else if input Action Code = 'D' or '3'

Delete record(s) from table using index 1,Number of Keys = user input
Else if input Action Code = 'I' or '4'

Copy input parameters to key structure using input key and index to determine which index 
and number of keys used

If Process Edits = 2

Fetch Next Keyed based on input Index and Number of Keys

Else If Process Edits = 3

Select Records based on input Index and Number of Keys

Fetch Record

Else If Process Edits = 4

Fetch Next record

Else

Fetch Record based on input Index and Number of Keys

If successful

Copy F31091 fields to output parameters

Else

Set error

End If

Else if input Action Code = 5

Close Table F31091
Else

Set input error - 0001 Action Invalid

End If

End If


If input Return Hrequest Flag = '1'

Store Hrequest in output F31091 Hrequest ID parameter

Else

Close F31091

End If

Data Structure

DX31091 - F31091 Master File MBF

Parameter NameData ItemData TypeReq/OptI/O/Both
cActionCodeACTNcharREQINPUT

A or 1 = Add Record
C or 2 = Change Record

D or 3 = Delete Record

I or 4 = Inquiry Only

5      = Close Table - used if cReturnHrequest = 1

^

cProcessEditsEV02charOPTNONE

If Action Code = Add, Update or Delete
0 - No Edits (Default)

1 - All Edits

2 - Partial Edits (No Data Dictionary)


If Action Code = Inquiry

1 - Fetched Keyed (Default)

2 - Fetch Matching Key

3 - Select and Fetch

4 - Fetch Next Record

NOTE: Action Code = 2 or 4 require a previous call to this function with Action Code = 1 or 3.  Also, 

the pointer must be input for Action Code = 2 or 4 because these action codes are used for sequential 

fetches.

^

cSuppressErrorMessagesEV03charOPTNONE

1 - Error Messages Suppressed
^

nNumberOfKeysINT01integerOPTNONE

Number of Keys to be used from the index.  Required only for Action Code = I or D
^

nIndexNumberINT02integerOPTNONE

Number of which Table Index to be used.  Required only for Action Code = I or D
^

cErrorCodeERRCcharOPTNONE

This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document 
Set Server program (XT4914).

szErrorMessageIDDTAIcharOPTNONE

Error Message Data Dictionary ID of the last error encountered.
^

szProgramIdPIDcharOPTNONE

Program ID of the calling program.
^

idF31091HrequestGENLNGIDOPTNONE

Pointer to the F31091 table.  If cReturnHrequest = 1, this pointer must be returned for all 
subsequent calls.  

^

cReturnHrequestEV04charOPTNONE

1 - return F31091 table pointer.  Used for multiple calls to the business function.  If calling this 
function in a while loop, set this parameter to one and return the F31091Hrequest for every call.

^

szTypeTransactionTYTNcharOPTNONE

Processing Option to be used for interoperability.
^

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

sz2ndItemNumberLITMcharOPTNONE

A number that identifies the item. The system provides three separate item numbers plus an extensive cross-reference capability to 
alternative item numbers. The three types of item numbers are: Item Number (short) An 8-digit, computer-assigned item number. 2nd Item Number A 
25-digit, user defined, alphanumeric item number. 3rd Item Number  Another 25-digit, user defined, alphanumeric item number. In addition to 
these three basic item numbers, the system provides an extensive cross-reference search capability. You can define numerous 
cross-references to alternative part numbers. For example, you can define substitute item numbers, replacements, bar codes, customer numbers, or 
supplier numbers.

sz3rdItemNumberAITMcharOPTNONE

The system provides three separate item numbers plus an extensive cross-reference capability to alternate item numbers. These item 
numbers are as follows: 1.  Item Number (short) - An 8-digit, computer-assigned 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.  In addition to 
these three basic item numbers, an extensive cross-reference search capability has been provided (see XRT). Numerous cross references to 
alternate part numbers can be user defined, such as substitute item numbers, replacements, bar codes, customer numbers, or supplier 
numbers.

szBranchPlantMMCUcharOPTNONE

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.

szLineCellNumberLINEcharOPTNONE

A number that defines a production line or cell. Detailed work center operations can be defined inside the line or cell.

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

szDocumentTypeDCTOcharOPTNONE

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

cShiftCodeSHFTcharOPTNONE

A user defined code (00/SH) that identifies daily work shifts. In payroll systems, you can use a shift code to add a percentage or amount to 
the hourly rate on a timecard. For payroll and time entry: If an employee always works a shift for which a shift rate differential is applicable, 
enter that shift code on the employee's master record. When you enter the shift on the employee's master record, you do not need to enter the 
code on the timecard when you enter time. If an employee occasionally works a different shift, you enter the shift code on each applicable 
timecard to override the default value.

jdScheduledStartDateSESDJDEDATEOPTNONE

The calendar date that an operation or rate is scheduled to begin.

mnPlannedQuantityPLQTMATH_NUMERICOPTNONE

The quantity of units planned for each period in the time series or plan.

szUnitOfMeasureUOMcharOPTNONE

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

mnOperationSequenceOPSQMATH_NUMERICOPTNONE

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.

szCategoriesWorkOrder001WR01charOPTNONE

A user defined code (00/W1) that indicates the current stage or phase of development for a work order. You can assign a work order to only 
one phase code at a time. Note: Certain forms contain a processing option that allows you to enter a default value for this field. If you enter a 
default value on a form for which you have set this processing option, the system displays the value in the appropriate fields on any work 
orders that you create. The system also displays the value on the Project Setup form. You can either accept or override the default value.

szCategoriesWorkOrder002WR02charOPTNONE

A user defined code (00/W2) that indicates the type or category of a work order. Note: A processing option for some forms lets you enter a 
default value for this field. The system enters the default value automatically in the appropriate fields on any work orders that you create on 
those forms and on the Project Setup form. You can either accept or override the default value.

szCategoriesWorkOrder003WR03charOPTNONE

A user defined code (00/W3) that indicates the type or category of the work order. Note: A processing option for some forms allows you to 
enter a default value for this field. The system enters the default value automatically in the appropriate fields on any work orders that you 
create on those forms and on the Project Setup form. You can either accept or override the default value.

szUserReservedCodeURCDcharOPTNONE

This is a 2 position code that is reserved for the user.  JDE does not currently use this field and will not utilize this field in the future.

jdUserReservedDateURDTJDEDATEOPTNONE

This is a 6 position code that is reserved for the user.  JDE does not currently use this field and will not utilize this field in the future.

mnUserReservedAmountURATMATH_NUMERICOPTNONE

This is a 15 position code that is reserved for the user.  JDE does not currently use this field and will not utilize this field in the future.

mnUserReservedNumberURABMATH_NUMERICOPTNONE

This is a 8 position code that is reserved for the user.  JDE does not currently use this field and will not utilize this field in the future.

szUserReservedReferenceURRFcharOPTNONE

A 15-position reference that is reserved for the user.  J.D. Edwards does not currently use this field and does not plan to use it in the future.

szUserIDUSERcharOPTNONE

The code that identifies a user profile.

szWorkStationIDJOBNcharOPTNONE

The code that identifies the work station ID that executed a particular job.

jdDateUpdatedUPMJJDEDATEOPTNONE

The date that specifies the last update to the file record.

mnTimeOfDayTDAYMATH_NUMERICOPTNONE

The computer clock in hours:minutes:seconds.

mnOrigDocoNumberDOCOMATH_NUMERICOPTNONE

Original Values are used to update an existing record's key values.  A delete of the original record 
and an add of the new record is performed instead of an update.  If changing a key value, all 7 of the 

original fields are required.

^

szOrigDocoTypeDCTOcharOPTNONE

Original Values are used to update an existing record's key values.  A delete of the original record 
and an add of the new record is performed instead of an update.  If changing a key value, all 7 of the 

original fields are required.

^

szOrigBranchPlantMMCUcharOPTNONE

Original Values are used to update an existing record's key values.  A delete of the original record 
and an add of the new record is performed instead of an update.  If changing a key value, all 7 of the 

original fields are required.

^

mnOrigShortItemITMMATH_NUMERICOPTNONE

Original Values are used to update an existing record's key values.  A delete of the original record 
and an add of the new record is performed instead of an update.  If changing a key value, all 7 of the 

original fields are required.

^

cOrigShiftCodeSHFTcharOPTNONE

Original Values are used to update an existing record's key values.  A delete of the original record 
and an add of the new record is performed instead of an update.  If changing a key value, all 7 of the 

original fields are required.

^

jdOrigSchedStartDateSESDJDEDATEOPTNONE

Original Values are used to update an existing record's key values.  A delete of the original record 
and an add of the new record is performed instead of an update.  If changing a key value, all 7 of the 

original fields are required.

^

mnOrigOperSeqOPSQMATH_NUMERICOPTNONE

Original Values are used to update an existing record's key values.  A delete of the original record 
and an add of the new record is performed instead of an update.  If changing a key value, all 7 of the 

original fields are required.

^

Related Functions

None

Related Tables

None