CopyECORequestNotes

Copy ECO Request Notes

Minor Business Rule

Object Name: B4800080

Parent DLL: CMFG

Location: Client/Server

Language: C

Functional Description

Purpose


Copies ECO Notes from an ECO Request to the subsequently created ECO Work Order.  Presently, this 

only occurs when the "Create ECO" Row Exit is taken from P48020 ECO Entry//W48020B Work With ECO Work Order Entry.


Setup Notes and Prerequisites


WBDCTO - Order Type of "From Record" is always assumed to be "EG".  Order Type of "To Record" is always assumed 

                      to be "EN".


WBSFXO - Order Suffix is always assumed to be 


WBTYPR - Type Record is always assumed to be "A"


Special Logic


A header string is always inserted as the first line of the notes copied.

Presently, this header string is HARD CODED in the Variable Declarations

section, and reads as follows.


"*** Begin - Parent Request Notes ***"


Technical Specification


1.  Opens Table F4802 - Work Order Instructions File


2.  If open is successful JDB_SetSequencing sets sequencing for retrieving

     records so that the Line Numbers (LINS) are in ascending order     (JDEDB_SORT_ASC)  

 

3.  A SelectKeyed is performed to select the records.  Right now, the logic

    assumes that wbsfxo[4] is always blank.  Also this business function is 

    called from P48020 with  in the szOrderSuffixFrom field. 


4.  If the select returns success then there are records (Notes) to be copied to 

     the newly created ECO.  These are retrieved in a loop with JDB_Fetch


5.  A MEMCPY operation copies the retrieved database fields in the dsF4802 structure

     to the dsInsertF4802 structure which is used to update the database table.  Then

     input parameters are used to populate the key fields.  Specifically the following

     fields are populated with information relevant to the new ECO or the ECO the Notes

     are being copied to:


        - mnOrderNumber is copied to WBDOCO

        - szOrderType is copied to WBDCTO 

        - szOrderSuffixTo (alway ) is copied to WBSFXO        

        - cRecordTypeTo (always "A") is copied to WBTYPR

        - mnLineNumber (originally populated by mnStartCopyOnLine) 

          is copied to WBLINS and incremented by a IncrementMathNumeric

 

6.  A JDB_InsertTable command stores the copied notes in the F4802 Table.




Data Structure

D4800080 - Copy ECO Request Notes

Data Item Data Structure DescriptionI/ORequiredNotes
PARS  szOrderNumberFromIYOrder Number of Type "EG" ECO Request

DCTO  sSzOrderTypeFromIYOrder Type of ECO Request  (Always 

assumed to be "EG")

SFXO  szOrderSuffixFromIYOrder Sufix of ECO Request (Always assumed to 

be )

TYPR  cRecordTypeFromIYRecord Type of Notes to be copied (Always 

assumed to be "A")

DOCO  mnOrderNumberToIYOrder Number of newly created ECO

DCTO  sSzOrderTypeToIYOrder Type of newly created ECO  (Always 

assumed to be "EN")

SFXO szOrderSuffixToIYOrder Sufix of newly created ECO Request 

(Always assumed to be )

TYPR cRecordTypeFromIYRecord Type copied Notes will assume (Always 

assumed to be "A")

LINS mnStartCopyOnLineIYLine Number to be assigned to first line of copied 

Notes (Always assumed to be 2)

NUMR mnNumberofLinesCopiedONReturns the number of lines of Notes copied from 

the ECO Request to the newly created ECO.

EV01Suppress Error 0/1IYSuppress Error Messages  0/1 

DTAIszErrorMessageIDONError Message Number

PID szProgramIdINProgram ID of calling program




Parameter NameData ItemData TypeReq/OptI/O/Both
mnOrderNumberToDOCOMATH_NUMERICREQNONE

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.

szOrderTypeFromDCTOcharREQNONE

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

szOrderTypeToDCTOcharREQNONE

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

szOrderSuffixFromSFXOcharREQNONE

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.

szOrderSuffixToSFXOcharREQNONE

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.

cRecordTypeFromTYPRcharREQNONE

The detail specification record type. Record types are user defined. You can set them up on the Detail Specification Types form and use 
them to describe certain types of work order or engineering change order information.

mnStartCopyOnLineLINSMATH_NUMERICREQNONE

The Line Number associated with Work Order text information.

mnNumberofLinesCopiedNUMRMATH_NUMERICOPTNONE

The equipment number or work order number associated with a change of status.

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.

szProgramIdPIDcharOPTNONE

The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry 
interactive program is P4210, and the number of the Print Invoices batch process report is R42565. The program ID is a variable length value. 
It is assigned according to a structured syntax in the form TSSXXX, where: T The first character of the number is alphabetic and identifies the 
type, such as P for Program, R for Report, and so on. For example, the value P in the number P4210 indicates that the object is a 
program. SS The second and third characters of the number are numeric and identify the system code. For example, the value 42 in the number P4210 
indicates that this program belongs to system 42, which is the Sales Order Processing system. XXX The remaining characters of the numer are 
numeric and identify a unique program or report. For example, the value 10 in the number P4210 indicates that this is the Sales Order Entry 
program.

cSuppressErrorMessagesEV01charREQNONE

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

szOrderNumberFromPARScharREQNONE

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  

cRecordTypeToTYPRcharREQNONE

The detail specification record type. Record types are user defined. You can set them up on the Detail Specification Types form and use 
them to describe certain types of work order or engineering change order information.

Related Functions

None

Related Tables

F4802 Work Order Instructions File