GetPurchaseHeaderColumns

Get Purchase Order Header

Major Business Rule

Object Name: B4300130

Parent DLL: CDIST

Location: Client/Server

Language: C

Functional Description

Purpose

This function retrieves information from the Purchase Order Header F4301 table.


Technical Specification




2.Technical Specifications


Processing 

Receive incoming parameters.


Open F4301 primary table or an index having following key fields : DOCO, DCTO, KCOO, SFXO


From F4301 table, select records with the key : DOCO, DCTO, KCOO, SFXO


If selection did complete successfuly

        Return all output parms

     Else

        Return Error Code Message

Endif


Data Structure

D4300130B - Get Purchase Header Columns

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

szOrderDocumentCompanyKCOOcharNONENONE

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.

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.

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.

cSuppressErrorMessageEV01charNONENONE

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

szHoldOrdersCodeHOLDcharNONENONE

A user defined code (42/HC) that identifies why an order is on hold.

szToBranchPlantMCUcharNONENONE

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.

mnSupplierAN8MATH_NUMERICNONENONE

A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or 
location.

szReasonCodeRCDcharNONENONE

A user defined code (42/RC) that explains the purpose for a transaction. For example, you can indicate the reason that you are returning 
items.

szContainerIDCNIDcharNONENONE

A code on the container or that you assign to the container in which the items on this purchase order or order line were shipped to you. You 
can assign container information to an order during receipts entry.

cCurrencyModeCRRMcharNONENONE

An option that specifies whether the system displays amounts in the domestic or foreign currency. On  The system displays amounts in the 
foreign currency of the transaction. Off  The system displays amounts in the domestic currency of the transaction.

szOrderCurrencyCRCDcharNONENONE

A code that identifies the currency of a transaction. 

mnExchangeRateCRRMATH_NUMERICNONENONE

A number (exchange rate) that a foreign currency amount is multiplied by to calculate a domestic currency amount.  The number in this field 
can have a maximum of seven decimal positions. If more are entered, the system adjusts to the nearest seven decimal positions. 

jdOrderDateTRDJJDEDATENONENONE

The date that an order was entered into the system. This date determines which effective level the system uses for inventory pricing.

szReference1VR01charNONENONE

An alphanumeric value used as a cross-reference or secondary reference number. Typically, this is the customer number, supplier 
number, or job number.

szReference2VR02charNONENONE

A field available to record reference numbers, such as the supplier's bid document number, quote document, sales order, work order, or 
job number.

szOrderedByORBYcharNONENONE

SALES ORDER SYSTEM:  An optional entry field, intended for the name of the customer placing the order.

jdRequestedDateDRQJJDEDATENONENONE

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

szTakenByTKBYcharNONENONE

SALES ORDER SYSTEM:  An optional entry field, intended for the name of the individual taking the customer's order. If you do not enter a 
user ID in this field, the system uses the ID of the person who is signed on.

mnChangeOrderCORDMATH_NUMERICNONENONE

The number of times this purchase order has been modified. You can locate a specific change order number to review the fields that were 
modified.

szUserIDUSERcharNONENONE

The code that identifies a user profile.

jdDateUpdatedUPMJJDEDATENONENONE

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

mnTimeOfDayTDAYMATH_NUMERICNONENONE

The computer clock in hours:minutes:seconds.

mnShipToNumberSHANMATH_NUMERICNONENONE

The address number of the location to which you want to ship this order. The address book provides default values for customer address, 
including street, city, state, zip code, and country.

szFreightHandlingCodeFRTHcharNONENONE

A user defined code (42/FR) designating the method by which supplier shipments are delivered. For example, the supplier could deliver to 
your dock, or you could pick up the shipment at the supplier's dock. You can also use these codes to indicate who has responsibility for 
freight charges. For example, you can have a code indicating that the customer legally takes possession of goods as soon as they leave the 
supplier warehouse and is responsible for transportation charges to the destination.

szNameRemarkRMKcharOPTNONE

A generic field that you use for a remark, description, name, or address.

Related Functions

None

Related Tables

F4301 Purchase Order Header
GetPurchaseOrderHeader

GetPurchaseOrderHeader

Get Purchase Order Header

Major Business Rule

Object Name: B4300130

Parent DLL: CDIST

Location: Client/Server

Language: C

Functional Description

Purpose

The purpose of this business function is to retrieve a complete row from the Purchase Order Header 

Table (F4301) and/or to build a data structure of the F4301 record.  The pointer to the data structure 

should be passed back to the calling application or business function.


Technical Specification


Edits:

Initialize the GENLNG pointer to NULL.


Initialize Error Code to '0'  (No error)


Retrievals:


If the CallType is '1' or '2' then


Fetch all columns from the F4301 (PO Header table)  using the key DOCO, DCTO, KCOO, SFXO and 
LNID.

If the fetch was not successful then ensure that the pointer is NULL


If fetch has been successful then

If  the ReturnFlag is set to '1' then
Allocate memory for the F4301 data structure 

If the CallType is '2' and the Fetch has passed then
Set the Error Code to '1'


If the fetch has failed then

If CallType is '1'
Set the Error Code to '1'



Returns:

GENLNG pointer to the F4301 Data structure.


Data Structure

D4300130 - Get Purchase Order Header

Parameter NameData ItemData TypeReq/OptI/O/Both
szDocumentCompanyKCOOcharNONENONE

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.

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

szDocumentTypeDCTOcharNONENONE

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

cCallTypeEV01charNONENONE

Special Input Expected
1-Fetch the record, if fetch fails then set on the error code. Allocation of memory determined by the 

Return flag.  

2-Fetch the record, if the fetch passes then set on the error code.  Allocation of Memory determined 

by the Return Flag.


^

cReturnF4301PtrFlagEV02charNONENONE

Special Input Expected
Note : This flag determines whether a pointer to the data structure is returned.  In the event that 

record existance is only being checked, the data structure may not be necessary.


^

cErrorCodeERRcharNONENONE

Special Input Expected
Note : The error code is set depending on the other parameters.  

0 or blank means no error. 

1 indicates and error condition.



^

idF4301RowPtrGENLNGIDNONENONE

General purpose ID variable.

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.

cSuppressErrorMessageEV01charNONENONE

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

Related Functions

None

Related Tables

F4301 Purchase Order Header