UpdateF4211InvoiceData

Update F4211 Invoice Data

Major Business Rule

Object Name: B4200460

Parent DLL: CDIST

Location: Client/Server

Language: C

Functional Description

Purpose


This function updates the Invoice Print-related fields (DOC, DCT, KCO, IVD, RESL, LTTR, NXTR and 
Audit Information) on the Sales Order Detail table (F4211).
It is also used in Sales Update to update these 
and some 

additional fields.


The Sales Ledger record (F42199) is also written using the business function "Write Sales History Or 

Ledger" (B4200260), depending on the "Ledger Y/N" (WRTH) parameter.




Setup Notes and Prerequisites

None.


Special Logic

None.



Technical Specification

2.2 Related Tables 
Table Table Description
  


2.3 Related Business Functions

Source NameFunction Name

B4200260Write Sales History Or Ledger

B9800100Get Audit Information



2.4 Processing 

1.If fields DOCO or LNID contain zeros, or fields DCTO, KCOO, LTTR, NXTR, PID or WRTH contain 
blanks, return a '1' in the error code field ERRC.


2.Read the F4211 table using DOCO, DCTO, KCOO and LNID as the unique key.  If the record cannot 

be found, return a '1' in the error code field ERRC.


3.Update fields DOC, DCT, KCO, LTTR, NXTR and PID to F4211 with the values passed to this 

function.


Update IVD if the value passed is not zero.


Update RESL if the value passed is '1'.


Update QTYT if the value passed is not zero. 10/26/95

Update DGL if the value passed is not zero.  10/26/95


Clear the foreign fields CRR,FUP,FEA,FUC, and FEC if the Clear Foreign Fields flag is '1'.10/26/95


Update SOQS if the value passed is not zero. 5/10/96

Update SOBK if the value passed is not zero. 5/10/96

Update SOCN if the value passed is not zero. 5/10/96


Update TCST if the value passed is not zero. 5/10/96


Update UNCS if the value passed is not zero. 5/10/96


Update ECST if the value passed is not zero. 5/10/96


Update FEC if the value passed is not zero. 5/10/96


Update AEXP if the value passed is not zero. 5/10/96


Update FEA if the value passed is not zero. 5/10/96


Update UORG if the value passed is not zero. 8/2/96


Update PQOR  if the value passed is not zero. 8/14/96

Update SQOR  if the value passed is not zero. 8/14/96

Update ITWT if the value passed is not zero. 8/14/96


Update ITVL if the value passed is not zero. 8/14/96


Update fields USER, JOBN, TDAY and UPMJ with the parameters returned from business function "Get 

Audit Information" (B9800100).


4.If "Ledger Y/N" (WRTH) is "Y", call business function "Write Sales History Or Ledger" 

(B4200260) with the following parameters:


Pointer to F4211=>Ptr to F4211

PID=>Calling Application

USER=>User

JOBN=>Workstation I.D.

'2'=>Mode

UPMJ=>Current Date

TDAY=>Current Time


5. If Transportation on then call N4900010 to update Transportaion tables.




^

Data Structure

D4200460 - Update F4211 Invoice Data


Special Input Expected

DOCOOrder Number
DCTOOrder Type

KCOOOrder Company

LNIDLine Number

DOCInvoice Number

DCTInvoice Type

KCOInvoice Company

LTTRLast Status

NXTRNext Status

IVDInvoice Date

RESLPrinted Code

PIDProgram I.D.

WRTHLedger Y/N

EV01Suppress Error Message0 = Do not suppress any error msgs.

1 = Suppress any error messages.

QTYTQuantity Shipped To Date

DGLGeneral Ledger Date

EV01Clear Foreign Fields1 = Clear foreign fields

0 = DON'T clear foreign fields
SOQSQuantityShippedUpdate if not zero

SOBKQuantityBackorderedUpdate if not zero

SOCNQuantityCancelledUpdate if not zero

UNCSUnitCostUpdate if not zero

TCSTAmount-ExtendedCostTransferUpdate if not zero

ECSTExtendedUnitCostUpdate if not zero

FECForeignExtendedCostUpdate if not zero

AEXPExtendedPriceUpdate if not zero

FEAForeingExtendedPricUpdate if not zero

UORGTransaction QuantityUpdate if not zero

PQORQuantity Ordered PrimaryUpdate if not zero

SQORSecondary QuantityUpdate if not zero

ITWTWeightUpdate if not zero

ITVLVolumeUpdate if not zero



Special Output Returned

ERRCErrorCode0 = No errors in processing


^

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.

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

szOrderCompanyKCOOcharNONENONE

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.

mnInvoiceNumberDOCMATH_NUMERICNONENONE

A number that identifies the original document, such as a voucher, invoice, or journal entry. On entry forms, you can assign the document 
number or let the system assign it using the Next Numbers program (P0002). Matching document numbers (DOCM) identify related documents 
in the Accounts Receivable and Accounts Payable systems. Examples of original and matching documents are: Accounts Payable     o 
Original document - voucher     o Matching document - payment  Accounts Receivable     o Original document - invoice     o Matching document - 
receipt  Note: In the Accounts Receivable system, the following transactions simultaneously generate original and matching documents: 
deductions, unapplied receipts, chargebacks, and drafts.

szInvoiceTypeDCTcharNONENONE

A user defined code (00/DT) that identifies the origin and purpose of the transaction.  PeopleSoft reserves several prefixes for document 
types, such as, vouchers, invoices, receipts, and timesheets. The reserved document type prefixes for codes are: P Accounts payable 
documents R Accounts receivable documents  T Time and Pay documents I Inventory documents  O Purchase order documents  S Sales order 
documents 

szInvoiceCompanyKCOcharNONENONE

A number that, with the document number, document type and G/L date, uniquely identifies an original document, such as invoice, voucher, 
or journal entry. If you use the Next Numbers by Company/Fiscal Year feature, the Automatic Next Numbers program (X0010) uses the 
document company to retrieve the correct next number for that company. If two or more original documents have the same document number and 
document type, you can use the document company to locate the desired document.

szLastStatusLTTRcharNONENONE

A code (system 40/type AT) specifying the last step in the processing cycle that this order line has successfully completed.

szNextStatusNXTRcharNONENONE

A user defined code (system 40/type AT) indicating the next step in the order flow of the line type.

jdInvoiceDateIVDJDEDATENONENONE

The date the invoice was printed. The system updates this date when you run the invoice print program in the Sales Order Management 
system.

cPrintedCodeRESLcharNONENONE

Indicates what should happen in the event the available quantity of an ordered item is less than the quantity ordered.  A B indicates that the 
quantity that cannot be shipped is to be backordered.  A C indicates that the quantity that cannot be shipped is to be cancelled.  In general, 
the program will automatically supply a B if the following are true:     o Our organization permits backorders.     o The customer permits 
backorders.     o The nature of the item is such that backorders are allowed.

szProgramIDPIDcharNONENONE

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.

cLedgerYNWRTHcharNONENONE

A code that tells the system to write a record to the history table (F42199  for Sales Order Management and F43199 for Purchase Order 
Management). Valid codes are:    Y Write a record for selected fields to the history table    N Do not write a record to the history table 

cSuppressErrorMessageEV01charNONENONE


Special Input Expected

EV01ab  ab Suppress Error Message



Significant Data Values

0 = Do not suppress any error msgs.

1 = Suppress any error messages.



^

cErrorCodeERRCcharNONENONE

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

mnQuantityShippedToDateQTYTMATH_NUMERICNONENONE

The number of units which have passed through the Sales Update process. In Workorder Processing, this field identifies the total quantity 
completed or consumed on a workorder to date basis.

jdGeneralLedgerDateDGLJDEDATENONENONE

A date that identifies the financial period to which the transaction is to be posted.  The company constants specify the date range for each 
financial period. You can have as many as 14 periods. Generally, period 14 is used for audit adjustments. The system validates this field for 
PBCO (posted before cutoff), PYEB (prior year ending balance), PACO (post after cutoff), and WACO (post way after cutoff) messages.

cClearForeignFieldsEV01charNONENONE

ab 
Special Input Expected

EV01ab  ab Clear Foreign Fields


Significant Data Values

1 = Clear foreign fields

0 = DON'T clear foreign fields


^

mnQtyShippedSOQSMATH_NUMERICNONENONE

The number of units committed for shipment in Sales Order Entry, using either the entered or the primary unit of measure defined for this 
item. In the Manufacturing system and Work Order Time Entry, this field can indicate completed or scrapped quantities. The quantity type is 
determined by the type code entered.

mnQtyBackOrderedSOBKMATH_NUMERICNONENONE

The number of units backordered in Sales Order Management or in Work Order Processing, using either the entered or the primary unit of 
measure defined for this item.

mnQtyCancelledSOCNMATH_NUMERICNONENONE

The number of units canceled in Sales Order or Work Order Processing, using either the entered or the primary unit of measure defined for 
this item. In manufacturing, this can also be the number of units scrapped to date.

mnUnitCostUNCSMATH_NUMERICNONENONE

The amount per unit, derived by dividing the total cost by the unit quantity.

mnExtCostTransferTCSTMATH_NUMERICNONENONE

This is the cost of transferring inventory from one branch to another.  The method of calculating this transfer cost is maintained in the Inter 
Branch Sales Markup Revisions (P3403).

mnExtUnitCostECSTMATH_NUMERICNONENONE

For accounts receivable and accounts payable, the invoice (gross) amount. For sales orders and purchase orders, the unit cost times the 
number of units.

mnExtUnitCostForeignFECMATH_NUMERICNONENONE

The product of the cost of an item, expressed in foreign currency according to the orders exchange rate, times the number of units.

mnExtendedPriceAEXPMATH_NUMERICNONENONE

The number of units multiplied by the unit price.

mnExtendedPriceForeignFEAMATH_NUMERICNONENONE

The product of the foreign price times the number of units.

mnQtyOrderedUORGMATH_NUMERICNONENONE

The quantity of units affected by this transaction.

mnQtyOrderedInPrimaryPQORMATH_NUMERICNONENONE

The quantity ordered by the customer expressed in the primary stocking unit of measure.

mnQtyOrderedSecondarySQORMATH_NUMERICNONENONE

If the secondary unit of measure option in Inventory Constants is selected,this field will display on data entry screens.

mnUnitWeightITWTMATH_NUMERICNONENONE

The weight of one unit of an item, expressed in the primary unit of measure.

mnUnitVolumeITVLMATH_NUMERICNONENONE

The cubic units occupied by one inventory item. The definition of the unit itself (cubic feet, yards, meters, and so on) is defined in the volume 
unit of measure.

cSalesOrderStatus02SO02charOPTNONE

A code that indicates if the committed inventory for this sales detail line has been relieved from the On Hand Quantity. A value of 1 reflects 
that the shipment confirmation program (P4205) or the Sales Update program (R42800) has relieved inventory and written a cardex record to 
the Item Ledger File (F4111). To activate on hand update at shipment comfirmation time, the order type of the sales order will need to be added 
to the User Defined Code Table (40/IU). If on hand is not updated with the Shipment Confirmation program (P4205), it will be updated by the 
Sales Update program (R42800).

mnGenericNumericFieldValueGENMATHMATH_NUMERICOPTNONE

Reserved by J.D. Edwards. Generic math numeric data item.

szGenericStringFieldValueGENSTRcharOPTNONE

Reserved by J.D. Edwards. Generic string data item.

cGenericCharacterValueGENCHARcharOPTNONE

Reserved by J.D. Edwards.

Related Functions

B4000460 Free Ptr To Data Structure
B4200260 Write Sales History Or Ledger
B9800100 Get Audit Information

Related Tables

F4211 Sales Order Detail File