CreditCheckProcessing

Credit Check Processing

Major Business Rule

Object Name: B4200420

Parent DLL: CDIST

Location: Client/Server

Language: C

Functional Description

Purpose

BF will perform Sales Order Credit Check Processing.
BF will retrieve the Hold Order Constants F42008 record by Hold Code and MCU, compare the customer's 

or parent's credit limit to the total exposure or a percent of the amount past due and write a record 

to the Hold Order File F4209 if the order should be placed on hold. BF returns a code to identify if 

the order has been placed on hold or not.


Setup Notes and Prerequisites

None. 


Special Logic

If Hold Code Constants F42008 is not found, return to calling application without setting any error 

condition.




Technical Specification


2.1Data Structure

Name Data Dictionary Item
szHoldCodeHCOD              
mnCustomerNumber       AN8

szCompany                     CO 

szBranchPlant        MCU 

mnOrderNumber           DOCO 

szOrderType                   DCTO

szOrderKeyCompanyKCOO

szOrderSuffix            DFXO

jdTransactionOrderDate TRDJ

jdRequestedDate            DRQJ

jdPromisedDate              PDDJ

cOrderOnHold                  EV01





2.2Related Tables 

Table Table Description
F42008Hold Code Constants.

F4209Held Order Details.




2.3Related Business Functions

Source NameFunction Name
B4001100.CWrite Hold Code (F4209).
B4001110.CGet Hold Code Information (F42008).

B0100023.CGet Customer Amounts and Dates from F0301

B02B0017.CA/R Aging - X0303

B0100008.CParent/Child Processing

B4200100.CGet Sold to Billing Instructions

B4200510.CAccumulate A/R Balance





2.4Processing  

• Fetch Customer Master by AN8 to get Credit Check Level A5ARTO, Credit Hold Exempt A5EXHD and 
Currency Code A5CRCA. Use business function B4200100 - Get Sold To Billing Instructions.

• Fetch Customer Master by AN8.  Use business function B0100023 - Get Customer Amounts and Dates.
• If credit checking against parent A5ARTO=P:
• Fetch the Parent Address Number. Use business function B0100008 - Parent/Child Processing. 
• Fetch Customer Master by AN8 for the Parent Address Number.  Use business function B0100023 - 
Get Customer Amounts and Dates.

• If record is found: Add Open Order Amount A5APRC to an accumulator.
• Set a parent/child flag to P, otherwise credit checking by customer.
• If customer is exempt from credit checking, A5EXHD='Y', return to calling application with Order is 
on Hold EV01 equal to '0'.

• Store Credit Limit A5ACL in a work field.
• Fetch Hold Code Constants by Hold Code HCOD and Branch/Plant MCU. Use business function 
• B4001110 - Get Hold Code Information.
• If record not found return to calling application with Order is on Hold (EV01) equal to '0'.
• If record found get: Responsible Person HCRPER, Aging Period HCAPB and Percent Past Due HCAPB.
• If aging period HCAPB is not blank:

BEGIN LOOP

• Get A/R headings and amounts.  Use business function B4200510 - Accumulate A/R Balance.
• If credit checking by Parent Address Number:
• Add the aging amounts to accumulators.
• Fetch the next Child Address. Use business function B0100008 Parent/Child Processing.
• If this is not the last Child Address Number:
• Fetch Customer Master by AN8.  Use business function B0100023 - Get Customer Amounts and 
Dates.

• If record is found get: Open Order Amount A5APRC and add to accumulator.
• Branch to the BEGIN LOOP.
• Calculate the total exposure = A/R Amount Due + Open Order Total APRC.
• If the total exposure is greater than the credit limit and the credit limit is not zero:
• Set Order is on Hold 0/1 EV01 to '1'.
• Write Held Order Row in F4209 using B4001100 Write Hold Code.
• Pass the following data items to B4300080: 
• MCU - Branch/Plant
• HCOD - Hold Code
• AN8 - Customer Number
• TRDJ - Transaction / Order Date
• DRQJ - Requested Date
• PDDJ - Promised Date
• SFXO - Order Suffix 
• DCTO - Order Type
• DOCO - Order Number
• KCOO - Order Key Company
• LNID - Order Line Number
• CTYP - Hold Code Type 
• RPER - Responsible Person (from HCRPER - F42008)
• If the total exposure is less than the credit limit:
• If aging period HCAPB is not blank:
• Accumulate the aging category amounts starting from the aging period HCAPB through aging 
category 7.

• If the accumulated amount and the A/R Amount Due are both greater than zero:
• Multiply the accumulated amount by the Percent Limit HCPPL to determine the percent past 
due of the total.

• If the Percent Limit HCPPL is not zero and is less than or equal to the percent past due 
of the total:

•  Set Order is on Hold 0/1 EV01 to '1'.
• Write Held Order Row in F4209 using B4001100 Write Hold Code.
• Pass the following data items to B4300080: 
• MCU - Branch/Plant
• HCOD - Hold Code
• AN8 - Customer Number
• TRDJ - Transaction / Order Date
• DRQJ - Requested Date
• PDDJ - Promised Date
• SFXO - Order Suffix 
• DCTO - Order Type
• DOCO - Order Number
• KCOO - Order Key Company
• LNID - Order Line Number
• CTYP - Hold Code Type 
• RPER - Responsible Person (from HCRPER - F42008)
• ITM - Short Item Number
• LITM - Long Item Number
• AITM - Third Item Number


Data Structure

D4200420 - Credit Check Processing




Special Input Expected

HCODHold CodeHold Code.

AN8Customer NumberCustomer Number.

COCompanyCompany

MCUBranch/PlantBranch / Plant.

DOCOOrder NumberOrder Number.

DCTOOrder TypeOrder Type.

KCOOOrder Key CompanyOrder Key Company.

SFXOOrder SuffixOrder Suffix - Always 000.

TRDJTransaction/Order DateTransaction / Order Date.

DRQJRequested DateRequested Date.

PDDJPromised DatePromised Date.




Special Output Returned

EV01Order is on Hold 0/1A returned flag that identifies if the order has been put on hold. 1 if 

order is held or 0 if it passed the credit check.


^

Parameter NameData ItemData TypeReq/OptI/O/Both
szHoldCodeHCODcharNONENONE

A user defined code (42/HC) that identifies why an order was placed on hold (for example, credit, budget, or margin standards were 
exceeded).

mnCustomerNumberAN8MATH_NUMERICNONENONE

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

szCompanyCOcharNONENONE

A code that identifies a specific organization, fund, or other reporting entity. The company code must already exist in the Company 
Constants table (F0010) and must identify a reporting entity that has a complete balance sheet. At this level, you can have intercompany 
transactions. Note: You can use company 00000 for default values such as dates and automatic accounting instructions. You cannot use company 00000 
for transaction entries.

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.

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

szOrderKeyCompanyKCOOcharNONENONE

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.

jdTransactionOrderDateTRDJJDEDATENONENONE

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

jdRequestedDateDRQJJDEDATENONENONE

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

jdPromisedDatePDDJJDEDATENONENONE

The promised shipment date for either a sales order or purchase order. The Supply and Demand Programs use this date to calculate 
Available to Promise information. This value can be automatically calculated during sales order entry. This date represents the day that the item 
can be shipped from the warehouse.

cOrderOnHoldEV01charNONENONE

Special Output Returned
EV01   Order is on Hold 0/1


Significant Data Values

A returned flag that identifies if the order has been put on hold. 1 if order is held or 0 if it 

passed the credit check.



^

cExemptCreditHoldEXHDcharOPTNONE

Code indicating if the customer is exempt from credit checking in the Sales Order Processing cycle.  Valid codes are:    Y Sales order entry 
should not check the customer's credit.    N This customer is not exempt from credit checking. If credit checking is      activated through the 
Sales Order Entry processing options and the customer goes over the limit, the order will be put on hold. (You set up a credit limit for the 
customer in the address book).

mnAmountCreditLimitACLMATH_NUMERICOPTNONE

The total amount that you allow the customer to spend on purchases before the system sends a workflow message. This value is used 
throughout the credit management programs. The system maintains the credit limit at the customer (child) level, not the parent level. The system 
sends workflow messages for each customer who is over their credit limit. When you set up or change the credit limit, the system sends a 
workflow message to the credit manager that the change is pending approval. The change to the credit limit is not reflected in the customer 
record until it is approved by the credit manager.

mnAmountTotalExposureAMTUMATH_NUMERICOPTNONE

A quantity that represents the statistical or measurable information related to the code that is defined for the data type. For example, if the 
data type relates to bid submittal codes, this field could be for bid amounts. Or, if the data type relates to Human Resources Benefits 
Administration, this field could be for the cost of election coverage. If the data type relates to bonuses, this could be the bonus amount.

szCurrencyCodeToCRDCcharOPTNONE

A code that identifies the domestic (base) currency of the company on a transaction. 

cCreditCheckModeEV02charOPTNONE

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

mnAmtOpenOrderAPRCMATH_NUMERICOPTNONE

The total amount of open orders for a supplier or customer. The system uses the list price from the Item Location (F41021) table adjusted by 
the discount tables or any override price. You cannot override this amount.

mnAmtInvoicedPriorYrSPYEMATH_NUMERICOPTNONE

The gross amount invoiced for the previous year. The system updates this field only when you run the Statistics Annual Close program 
(R03B161). 

mnAmtInvoicedThisYrASTYMATH_NUMERICOPTNONE

The amount invoiced for the year. The system uses the gross amount of the invoice record (F03B11) regardless of whether taxes are 
included. The system updates this field when you run the Statistics History Update program (R03B16). The system determines the current fiscal 
year from the Date Fiscal Patterns - 52 Period Accounting table (F0008B).

mnAmtLastPaidALPMATH_NUMERICOPTNONE

The amount of the last payment applied to invoices based on the G/L date of the Receipt Detail record (F03B14). The system displays this 
information from either the A/R Statistical Summary table (F03B16S) or the A/R Statistical History table (F03B16), depending on the form. 
The system displays information from F03B16S on the Account Statistical Summary form and information from F03B16 on the Periodic Statistics 
form.

jdDateLastInvoiceDLIJJDEDATEOPTNONE

The G/L date of the last invoice generated for the customer.

jdDateFirstInvoiceDFIJJDEDATEOPTNONE

The G/L date of the first invoice generated.

jdDateLastPaidDLPJDEDATEOPTNONE

The date of the last premium payment.

szAgingHeading1DL01charOPTNONE

A user defined name or remark.

szAgingHeading2DL01charOPTNONE

A user defined name or remark.

szAgingHeading3DL01charOPTNONE

A user defined name or remark.

szAgingHeading4DL01charOPTNONE

A user defined name or remark.

szAgingHeading5DL01charOPTNONE

A user defined name or remark.

szAgingHeading6DL01charOPTNONE

A user defined name or remark.

szAgingHeading7DL01charOPTNONE

A user defined name or remark.

szAgingHeading8DL01charOPTNONE

A user defined name or remark.

szAgingHeading9DL01charOPTNONE

A user defined name or remark.

mnAmtFutureDueAGMATH_NUMERICOPTNONE

A value that specifies the total amount of the invoice or voucher pay item. The gross amount might include the tax amount, depending on 
the tax explanation code. The system does not decrease the gross amount when payments are applied. When you void a transaction, the 
system clears the gross amount field.

mnAmtAgingCategories1AG1MATH_NUMERICOPTNONE

The total open invoice amount that is in the first category as defined in either the Accounts Receivable constants or the processing options 
of Credit Analysis Refresh. If you age by days, the system determines the first aging category by using the days defined in the second and 
third aging categories. For example, if the second aging category is 0 and the third aging category is 30, the date on the invoice that you use 
to age (invoice date, due date, statement date, or G/L date) must be equal to but no more than 30 days after the aging date that you define.

mnAmtAgingCategories2AG2MATH_NUMERICOPTNONE

The total open invoice amount that is in the second category as defined in either the Accounts Receivable constants or the processing 
options of Credit Analysis Refresh. If you age by days, the system determines the second aging category by using the days defined in the third 
and fourth aging categories. For example, if the third aging category is 30 and the fourth aging category is 60, the date on the invoice that you 
use to age (invoice date, due date, statement date, or G/L date) must be between 30 and 60 days after the aging date that you define.

mnAmtAgingCategories3AG3MATH_NUMERICOPTNONE

The total open invoice amount that is in the third category as defined in either the Accounts Receivable constants or the processing options 
of Credit Analysis Refresh. If you age by days, the system determines the third aging category by using the days defined in the fourth and 
fifth aging categories. For example, if the fourth aging category is 60 and the fifth aging category is 90, the date on the invoice that you use to 
age (invoice date, due date, statement date, or G/L date) must be between 60 and 90 days after the aging date that you define.

mnAmtAgingCategories4AG4MATH_NUMERICOPTNONE

The total open invoice amount that is in the fourth category as defined in either the Accounts Receivable constants or the processing 
options of Credit Analysis Refresh. If you age by days, the system determines the fourth aging category by using the days defined in the fifth and 
sixth aging categories. For example, if the fifth aging category is 90 and the sixth aging category is 120, the date on the invoice that you use to 
age (invoice date, due date, statement date, or G/L date) must be between 90 and 120 days after the aging date that you define.

mnAmtAgingCategories5AG5MATH_NUMERICOPTNONE

The total open invoice amount that is in the fifth category as defined in either the Accounts Receivable constants or the processing options 
of Credit Analysis Refresh. If you age by days, the system determines the fifth aging category by using the days defined in the sixth and 
seventh aging categories. For example, if the sixth aging category is 120 and the seventh aging category is 150, the date on the invoice that you 
use to age (invoice date, due date, statement date, or G/L date) must be between 120 and 150 days after the aging date that you define.

mnAmtAgingCategories6AG6MATH_NUMERICOPTNONE

The total open invoice amount that is in the sixth category as defined in either the Accounts Receivable constants or the processing options 
of Credit Analysis Refresh. If you age by days, the system determines the sixth aging category by using the days defined in the seventh 
and eighth aging categories. For example, if the seventh aging category is 150 and the eighth aging category is 180, the date on the invoice that 
you use to age (invoice date, due date, statement date, or G/L date) must be between 150 and 180 days after the aging date that you 
define.

mnAmtAgingCategories7AG7MATH_NUMERICOPTNONE

The total open invoice amount that is in the seventh category as defined in either the Accounts Receivable constants or the processing 
options of Credit Analysis Refresh. If you age by days, the system determines the seventh aging category by using the days defined in the 
eighth aging category. For example, if the eighth aging category is 180, the date on the invoice that you use to age (invoice date, due date, 
statement date, or G/L date) must be more than 180 days after the aging date that you define.

mnAmtAgingCategories8AG8MATH_NUMERICOPTNONE

The amount retained on your books for the number of days indicated by the category number. The system automatically computes aging 
each time you inquire on an account or print a report.

mnAmtDueADMATH_NUMERICOPTNONE

The balance or amount due on an open invoice or voucher.  In the Address Book Master file (F0101), this is a memo amount field used to 
determine if a particular order exceeds a credit limit.  See the documentation for the Order Processing system. 

mnNumberOfOpenDraftsNODMATH_NUMERICOPTNONE

The number of draft records (R1) in the Customer Ledger table (F03B11) that have a pay status not equal to P. 

mnOutstandingDraftAmountODAMMATH_NUMERICOPTNONE

The total value of the open draft amounts.  Outstanding drafts are considered all drafts in Italy and only drafts not yet due in France.

mnParentAddressNumberPA8MATH_NUMERICOPTNONE

The address book number of the parent company. The system uses this number to associate a particular address with a parent company 
or location. Any value that you enter in this field updates the Address Organizational Structure Master table (F0150) for the blank structure 
type. This address number must exist in the Address Book Master table (F0101) for validation purposes. Examples of address book records 
that would have a parent number include:   o  Subsidiaries with parent companies     o  Branches with a home office     o  Job sites with a general 
contractor 

mnShipToAddressNumberSHANMATH_NUMERICOPTNONE

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.

Related Functions

B0100008 A/B Server - Parent/Child Server
B0100023 Get Customer Amounts & Dates from F0301 or F03B01
B4000460 Free Ptr To Data Structure
B4001100 Write Hold Code
B4001110 Get Hold Code Information
B4200100 Get Sold To Billing Instructions
B4200510 Accumulate A/R Balance

Related Tables

F42008 Order Hold Constants
F4209 Held Orders