ProcessGLInformation

Process GL Information

Major Business Rule

Object Name: B4300750

Parent DLL: CDIST

Location: Client/Server

Language: C

Functional Description

Purpose

This function will obtain the receipt routing flags within the movement or disposition currently 
being performed.


Technical Specification





GetUDC ()
"43"->  SystemCode

"DA"->RecordTypeCode

MovementCode->UserDefinedCode

"3"-> FieldLength

int_Decsriprion<-szDecription001


Parse the UDC description.  If the first letter of the description is not 'Y', then there will be no 

GL entries.  If the first letter of the description is a 'Y', then the remainder of the description 

will be parsed to get the GLCategory.


The GL Category is  used to retrieve the account numbers using RetrieveDistributionAAI ().


After the account numbers have been retrieved, the amounts are calculated using the following 

algorithm:

Perform Fetch to F43121 in order to retrieve PRRC and FRRC
/* Calculate the domestic amount */

int_TempPrimaryCost = F43121.PRRC * PurchToPrimConv

int_DomesticAmount  = int_TempPrimaryCost * int_PrimaryUnits


/* Calculate the foreign amount */

int_TempPrimaryCost = F43121.FRRC * PurchToPrimConv

int_ForeignAmount  = int_TempPrimaryCost * int_PrimaryUnits


/* Calculate tax amounts */

IF (   TaxableFlag  is not equal to 'N'   AND

         TaxArea1 is not blank                   AND

         TaxExplCode1 is not blank   )

        Call TaxCalculator()  twice, once for domestic amount, once for foreign amount

ENDIF


IF F0911JobNumber is ZERO

IF BatchNumber is ZERO

 FSOpenBatch()

"O"-> BatchType

BatchStatus->PrevBatchStatus

' '->PostOutOfBalance

'1'->CancelBatchControl


Return BatchNumber, BatchDate, BatchType as output parameters

ENDIF


Retrieve the Document Type from P4312 Processing Options.

F0911FSBeginDoc()

int_P4312_DocumentType->DocumentType

BatchNumber->BatchNumber

'A'-> DocAction

'1'->EditInstructionFlag

'J'->  TypeDoc

OrderCompany->CompanyKey

BatchType->BatchType

GLDate->GLDate

BatchDate->BatchDate

int_GLCategory->Explanation


Return JobNumber as an output parameter

ENDIF


Call F0911EditLine ()  for each GL line that needs to be written.







^

Data Structure

D4300750A - Process GL Information

Parameter NameData ItemData TypeReq/OptI/O/Both
szMovementCodeMCDEcharNONENONE

A user defined code (43/MC) that indicates the movement of the quantity. You can move quantity from one operation to another, or you can 
disposition quantity out of the routing process.

mnQuantityDispositionedQTYMMATH_NUMERICNONENONE

The number of units that have been either moved or dispositioned.

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.

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

cBatchStatusISTcharNONENONE

A user defined code (98/IC) that indicates the posting status of a batch. Valid values are: Blank    Unposted batches that are pending 
approval or have a status of approved. A        Approved for posting. The batch has no errors, and is in balance, but has not yet been posted. D       
Posted. The batch posted successfully. E        Error. The batch is in error. You must correct the batch before it can post. P        Posting. The system 
is in the process of posting the batch to the general ledger. The batch is unavailable until the posting process is complete. If errors occur 
during the post, the batch status changes to E (error). U        In use. The batch is temporarily unavailable because someone is working with it, or 
the batch appears to be in use because a power failure occurred while the batch was open.

mnBatchNumberICUMATH_NUMERICNONENONE

A number that identifies a group of transactions that the system processes and balances as a unit. When you enter a batch, you can either 
assign a batch number or let the system assign it using the Next Numbers program.

jdBatchDateDICJJDEDATENONENONE

The date of the batch. If you leave this field blank, the system date is used.

szBranchPlantMCUcharNONENONE

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.

jdGLDateDGLJDEDATENONENONE

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.

szComputerIDCTIDcharNONENONE

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.

szBatchTypeICUTcharNONENONE

A code that specifies the system and type of transactions entered in a batch. The system assigns the value when you enter a transaction. 
Valid values are set up in user defined code table 98/IT. You cannot assign new values. All batch types are hard coded.

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.

szOrderSuffixSFX0charNONENONE

A number that identifies the pay item for a voucher or invoice. The system automatically assigns the pay item number. If a voucher or 
invoice has multiple pay items, the numbers are sequential.

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

mnReceiptLineNumberNLINMATH_NUMERICNONENONE

A number representing the number of lines on either a purchase or sales order. or The number of receivers recorded during the receipts 
process.  This field will be used in Voucher Matching.

mnF0911JobNumberJOBSMATH_NUMERICNONENONE

The job number (work station ID) which executed the particular job.

mnTrnToPrimCnvFactorCONVMATH_NUMERICNONENONE

The factor that the system uses to convert one unit of measure to another unit of measure.

mnPurchToPrimCnvFactorCONVMATH_NUMERICNONENONE

The factor that the system uses to convert one unit of measure to another unit of measure.

cTaxableFlagTXcharNONENONE

A code that indicates whether the item is subject to sales tax when you purchase it. The system calculates tax on the item only if the supplier 
is also taxable.

szTaxArea1TXA1charNONENONE

A code that identifies a tax or geographic area that has common tax rates and tax authorities. The system validates the code you enter 
against the Tax Areas table (F4008). The system uses the tax rate area in conjunction with the tax explanation code and tax rules to calculate tax 
and G/L distribution amounts when you create an invoice or voucher.

szTaxExplCode1EXR1charNONENONE

A hard-coded user defined code (00/EX) that controls the algorithm that the system uses to calculate tax and G/L distribution amounts. The 
system uses the tax explanation code in conjunction with the tax rate area and tax rules to determine how the tax is calculated. Each 
transaction pay item can be defined with a different tax explanation code.

cCurrencyProcessingCRYRcharNONENONE

A code that specifies whether to use multi-currency accounting, and the method of multi-currency accounting to use: Codes are:    N Do not 
use multi-currency accounting. Use if you enter transactions in only one currency for all companies. The multi-currency fields will not appear 
on forms. The system supplies a value of N if you do not enter a value.    Y Activate multi-currency accounting and use multipliers to convert 
currency. The system multiplies the foreign amount by the exchange rate to calculate the domestic amount.    Z Activate multi-currency 
accounting and use divisors to convert currency. The system divides the foreign amount by the exchange rate to calculate the domestic amount.

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

szP4312VersionVERScharOPTNONE

A user-defined set of specifications that control how applications and reports run. You use versions to group and save a set of user-defined 
processing option values and data selection and sequencing options. Interactive versions are associated with applications (usually as a 
menu selection). Batch versions are associated with batch jobs or reports. To run a batch process, you must choose a version.

cDispositionReversalFlagRVScharOPTNONE

A code that indicates whether the transaction is eligible for reversal or has already been reversed. Valid values are:    Blank Transaction is 
eligible to be reversed.    N       Transaction is not eligible to be reversed.    Y       Transaction has been reversed.    R       Transaction is a 
reversal audit record.

cDispositionPayableYNPAYABcharOPTOUTPUT

This field specifies whether a general ledger account should be paid. Valid values are:    Y The account should be paid.    N The account 
should not be paid.

cStepPaymentEligibleYNPMTEcharOPTINPUT

Indicates at which operation the goods are eligible for payment.  When quantity is moved to this operation, the system updates the open 
quantity (PRUOPN) and open amount (PRAOPN) in the Purchase Order Receiver table so they can be vouchered in the Voucher Match 
program. NOTE:  You can enter Y in this column only once for each route. In addition, the system uses this field to determine if the quantity is eligible 
for payment when the quantity is dispositioned out of the routing process.  Each quantity disposition has its own setup.

mnDispositionGLLineNumberLNIDMATH_NUMERICOPTBOTH

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.

mnTotalDispQuantityForGLQTYMATH_NUMERICOPTBOTH

The number of units associated with an asset.

Related Functions

B0000042 Batches
B0900049 Journal Entry
B4000350 Retrieve Distribution AAI
B4001090 Tax Calculator
X0005 Get User Defined Codes

Related Tables

F43121 Purchase Order Receiver File