F03B11CreateR1RecordDraft

F03B11 Create R1 Record Draft

Major Business Rule

Object Name: B03B0156

Parent DLL: CFIN

Location: Client/Server

Language: C

Functional Description

Purpose


The F03B11CreateR1RecordDraft creates the R1 record in the F03B11 file.

Setup Notes and Prerequisites


This function is used in P03B602.


Special Logic




Technical Specification





Parameters:

Data Item Data Structure DescriptionI/OReqNotes
DOCmnDocumentVoucherInvoiceEIY

KCOszCompanyKeyIY

AN8mnAddressNumberIY

DGJjdDateForGLandVoucherJulianIY

DIVJjdDateInvoiceJIY

ICUTszBatchTypeIY

ICUmnBatchNumberIY

DICJjdDateBatchJulianIY

FYmnFiscalYear1IY

CTRYmnCenturyIY

PNmnPeriodNoGeneralLedgeIY

COszCompanyIY

GLCszGLClassIY

AIDszAccountIdIY

AGmnAmountGrossIY

BCRCszCurrencyCodeBaseIY

CRRMcCurrencyModeIY

DDJjdDateDueJulianIY

RMKszNameRemarkIY

ALPHszNameAlphaIY

PYIDmnPaymentIDIY

PIDszProgramIdIY

PA8mnAddressNumberParentIY

AN8JmnAddNoAlternatePayeeIY

MCUszCostCenterIY

VLDTjdDateValueIY

AR01szARreportingcode1nIY

AR02szARreportingcode2IY

AR03szARreportingcode3IY

AR04szARreportingcode4IY

AR05szARreportingcode5IY

AR06szARreportingcode6IY

AR07szARreportingcode7IY

AR08szARreportingcode8IY

AR09szARreportingcode9IY

AR10szARreportingcode10IY

BCRCszCurrencyCodeBase_2IY

PSTcPayStatusCodeIY

RYINcPaymentInstrumentAIY

ISTCcARPostToCashManagementIY

CRCDszTransactionCurrencyIY

EV02cR1OpenAmountFlagIY


Related Tables 


F03B11Customer Ledger File


Related Business Functions


B03B0008Default Invoice from Address Book

B9800100Get Audit Information


Processing 


Open Table F03B11

Fetch record with key company, document type, suffix, document number

If record exists set update mode to 'U'

If record does not exist set mode to 'A'

Copy all the data structure passed in values to the F03B11 fields

If mode is 'A' and the CR1OpenAmountFlag is 1 initialize the open amount field otherwise copy in the 

mnAmountGross into the F03B11 open amount field.

If mode is 'U' and the CR1OpenAmount Flag is 1 initialize the open amount field otherwise add the 

MnAmountGross to the F03B11 open amount field.

Call business function to get audit information.

If mode is 'A' add record to the F03B11 file.

If mode is 'U' update record in the F03B11 file.

If an error occurs inserting or updating set an error.

Close F03B11 file





Data Structure

D03B0156 - F03B11 Create R1 Record Draft

Parameter NameData ItemData TypeReq/OptI/O/Both
mnDocVoucherInvoiceEDOCMATH_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.

szCompanyKeyKCOcharNONENONE

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.

mnAddressNumberAN8MATH_NUMERICNONENONE

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

jdDateForGLandVoucherJULIADGJJDEDATENONENONE

A date that identifies the financial period to which the transaction will be posted. You define financial periods for a date pattern code that you 
assign to the company record. The system compares the date that you enter on the transaction to the fiscal date pattern assigned to the 
company to retrieve the appropriate fiscal period number, as well as to perform date validations.

jdDateInvoiceJDIVJJDEDATENONENONE

The date that either you or the system assigns to an invoice or voucher. This can be either the date of the supplier's invoice to you or the 
date of your invoice to the customer.

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.

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.

jdDateBatchJulianDICJJDEDATENONENONE

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

mnFiscalYear1FYMATH_NUMERICNONENONE

A number that identifies the fiscal year. Generally, you can either enter a number in this field or leave it blank to indicate the current fiscal 
year (as defined on the Company Setup form). Specify the year at the end of the first period rather than the year at the end of the fiscal period. 
For example, a fiscal year begins October 1, 1998 and ends September 30, 1999. The end of the first period is October 31, 1998. Specify the 
year 98 rather than 99.

mnCenturyCTRYMATH_NUMERICNONENONE

The calendar century associated with the year. Enter is the first two digits of the year. For example, 19 indicates any year beginning with 19 
(1998, 1999), 20 indicates any year beginning with 20 (2000, 2001), and so on.

mnPeriodNoGeneralLedgePNMATH_NUMERICNONENONE

A number indicating the current accounting period.  This number, used in conjunction with the Company Constants table (F0010) and the 
General Constants table (F0009), allows the user to define up to 14 accounting periods. See General Ledger Date.  The current period number 
is used to determine posted before and posted after cut off warning messages.  It is also used as the default accounting period in the 
preparation of financial reports.

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.

szGlClassGLCcharNONENONE

A code that determines the trade account that the system uses as the offset when you post invoices or vouchers. The system concatenates 
the value that you enter to the AAI item RC (for Accounts Receivable) or PC (for Accounts Payable) to locate the trade account. For 
example, if you enter TRAD, the system searches for the AAI item RCTRAD (for receivables) or PCTRAD (for payables).  You can assign up to four 
alphanumeric characters to represent the G/L offset or you can assign the three-character currency code (if you enter transactions in a 
multicurrency environment). You must, however, set up the corresponding AAI item for the system to use; otherwise, the system ignores the G/L 
offset and uses the account that is set up for PC or RC for the company specified.  If you set up a default value in the G/L Offset field of the 
customer or supplier record, the system uses the value during transaction entry unless you override it.  Note: Do not use code 9999. It is reserved for 
the post program and indicates that offsets should not be created.

szAccountIdAIDcharNONENONE

A number that the system assigns to each general ledger account in the Account Master table (F0901) to uniquely identify it. 

mnAmountGrossAGMATH_NUMERICNONENONE

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.

szCurrencyCodeBaseBCRCcharNONENONE

A code that represents the currency of the company for a transaction. For a foreign currency transaction, this is the currency code of the 
domestic side of the transaction.

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.

jdDateDueJulianDDJJDEDATENONENONE

In Accounts Receivable, the date that the net payment is due. In Accounts Payable, the date that the payment is due to receive a discount 
or, if no discount is offered, the net due date. The system calculates the due date based on the payment term entered, or you can enter it 
manually. If you enter a negative voucher or invoice (debit or credit memo), the system might use the G/L date as the due date regardless of the 
payment term entered. A processing option in the master business function (P0400047 for vouchers and P03B0011 for invoices) controls how 
the system calculates the due date for debit and credit memos.

szNameRemarkRMKcharNONENONE

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

szNameAlphaALPHcharNONENONE

The text that names or describes an address. This 40-character alphabetic field appears on a number of forms and reports. You can enter 
dashes, commas, and other special characters, but the system cannot search on them when you use this field to search for a name.

mnPaymentIDPYIDMATH_NUMERICNONENONE

A number that the system assigns from Next Numbers to identify and track payment records.

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.

mnAddressNumberParentPA8MATH_NUMERICNONENONE

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 

mnAddNoAlternatePayeeAN8JMATH_NUMERICNONENONE

An alternate address to which accounts payable can send payments due.

szCostCenterMCUcharNONENONE

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.

jdDateValueVLDTJDEDATENONENONE

The date that the payment amount was debited or credited to the bank account. The value date is not the date the bank reconciled the 
payment. Automatic payments populate this field automatically. If you are making manual payments and have set a processing option to display 
the value date field, you can manually enter the value date here.

szARreportingCode1nAR01charNONENONE

One of ten user defined codes that the system populates when an invoice is generated. The system uses the corresponding value (AC01) 
from the Customer Master by Line of Business table (F03012) when an invoice is generated.

szARreportingCode2AR02charNONENONE

One of ten user defined codes that the system populates when an invoice is generated. The system uses the corresponding value (AC02) 
from the Customer Master by Line of Business table (F03012) when an invoice is generated.

szARreportingCode3AR03charNONENONE

One of ten user defined codes that the system populates when an invoice is generated. The system uses the corresponding value (AC03) 
from the Customer Master by Line of Business table (F03012) when an invoice is generated.

szARreportingCode4AR04charNONENONE

One of ten user defined codes that the system populates when an invoice is generated. The system uses the corresponding value (AC04) 
from the Customer Master by Line of Business table (F03012) when an invoice is generated.

szARreportingCode5AR05charNONENONE

One of ten user defined codes that the system populates when an invoice is generated. The system uses the corresponding value (AC05) 
from the Customer Master by Line of Business table (F03012) when an invoice is generated.

szARReportingCode6AR06charNONENONE

One of ten user defined codes that the system populates when an invoice is generated. The system uses the corresponding value (AC06) 
from the Customer Master by Line of Business table (F03012) when an invoice is generated.

szARReportingCode7AR07charNONENONE

One of ten user defined codes that the system populates when an invoice is generated. The system uses the corresponding value (AC07) 
from the Customer Master by Line of Business table (F03012) when an invoice is generated.

szARReportingCode8AR08charNONENONE

One of ten user defined codes that the system populates when an invoice is generated. The system uses the corresponding value (AC08) 
from the Customer Master by Line of Business table (F03012) when an invoice is generated.

szARReportingCode9AR09charNONENONE

One of ten user defined codes that the system populates when an invoice is generated. The system uses the corresponding value (AC09) 
from the Customer Master by Line of Business table (F03012) when an invoice is generated.

szARReportingCode10AR10charNONENONE

One of ten user defined codes that the system populates when an invoice is generated. The system uses the corresponding value (AC10) 
from the Customer Master by Line of Business table (F03012) when an invoice is generated.

szCurrencyCodeBase_2BCRCcharNONENONE

A code that represents the currency of the company for a transaction. For a foreign currency transaction, this is the currency code of the 
domestic side of the transaction.

cPayStatusCodePSTcharNONENONE

A user defined code (00/PS) that indicates the current payment status for a voucher or an invoice. Examples of codes include: A Approved 
for payment but not yet paid   H Held pending approval   P Paid   Note: Some of the payment status codes are hard coded; the system assigns 
the code.

cPaymentInstrumentARYINcharNONENONE

The user defined code (00/PY) that specifies how payments are made by the customer. For example: C Check   D Draft   T Electronic funds 
transfer  

cARPostToCashManagementISTCcharNONENONE

A code that specifies whether the transaction is included in the the A/R Statistical History table (F03B16). Valid values are: Blank The 
transaction is not included in the A/R Statistical History table.   1 The transaction is included in the A/R Statistical History table.

szTransactionCurrencyCRCDcharNONENONE

A code that identifies the currency of a transaction. 

cR1OpenAmountFlagEV02charNONENONE

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

mnPaymentAmountForeignPFAPMATH_NUMERICOPTNONE

The foreign amount to be paid on an A/P Payment run.

mnCurrencyConverRateOvCRRMATH_NUMERICOPTNONE

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. 

mnTriangulationLeg1CRR1MATH_NUMERICOPTNONE

The exchange rate from the foreign currency of the invoice to the triangulation currency (leg 1). This rate applies when you use triangulation 
to calculate the exchange rate for a receipt.

mnTriangulationLeg2CRR2MATH_NUMERICOPTNONE

The exchange rate from the triangulation currency to the domestic currency (leg 2). This rate applies when you use triangulation to calculate 
the exchange rate for a receipt.

cCurrencyConversionMethodCRCMcharOPTNONE

A value that specifies which method to use when converting from one currency to another. Valid values are:  Y  Multiplier method. The 
system multiplies the foreign amount by the multiplier exchange rate to calculate the domestic amount. Z Divisor method. The system divides the 
foreign amount by the divisor exchange rate to calculate the domestic amount.

jdExchangeRateDateERDJJDEDATEOPTNONE

The date that the system uses to retrieve the exchange rate from the Currency Exchange Rates table (F0015). 

szReference1VR01charOPTNONE

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

szDraftNumberCKNUcharOPTNONE

For Auto Bank Statement, this code identifies the payment/receipt or reference number.  NOTE:   Bank Statement Detail section:  The 
payment/receipt number was originally stored in the DOCM field of F09617.  Due to size limitations of DOCM, it is now also stored in CKNU.  For 
display purposes, the data item used for payment/receipt number on this grid is CKNU. Account Ledger section:  This reference number was 
originally stored in the R1 field of F0911.  Due to size limitations, it is now also stored in CKNU. For display purposes, the data item used for 
Reference1 on this grid is CKNU. 

Related Functions

B0000027 CurrencyConvForAndDom
B9800100 Get Audit Information

Related Tables

F03B11 Customer Ledger