WriteInvoiceToCache

Write Invoice To Cache

Minor Business Rule

Object Name: B03B0122

Parent DLL: CFIN

Location: Client/Server

Language: C

Functional Description

Purpose

The purpose of the Write Invoice To Cache business function is to cache Invoices (F03B11 records).  

The full key to the invoice -DOC, DCT, KCO and SFX- must be passed to the function.  All other 

parameters, with the exception of CurrentInvoiceNumber, are optional.  CurrentInvoiceNumber is the number of 

the invoice being processed, and should be passed for each new invoice encountered.  You are expected 

to keep track of this total outside the business function.


Setup Notes and Prerequisites

None


Special Logic

None



Technical Specification


Parameters

Item DescriptionI/O   Req?  Notes
DOCInvoice NumberI   Y  Must be passed to function (makes up key)
DCTDocument TypeI   Y  Must be passed to function (makes up key)

KCODocument CompanyI   Y  Must be passed to function (makes up key)

SFXDocument Pay ItemI   Y  Must be passed to function (makes up key)

COCompanyI   N  Only necessary if you want this field written to 

cache

GLCGL GlassI   N  Only necessary if you want this field written to 

cache

AAPAmount OpenI   N  Only necessary if you want this field written to 

cache

ADSCDiscount AvailableI   N  Only necessary if you want this field written to 

cache

CRCDCurrency Code FromI   N  Only necessary if you want this field written to 

cache

CRRExchange RateI   N  Only necessary if you want this field written to 

cache

FAPForeign Amount OpenI   N  Only necessary if you want this field written to 

cache

CDSForeign Discount AvailableI   N  Only necessary if you want this field written to 

cache

MCUCost CenterI   N  Only necessary if you want this field written to 

cache

DDNJDiscount Due DateI   N  Only necessary if you want this field written to 

cache

INT01Current Invoice Number   Y Should keep runing total of invoices outside 

function

ADSA        mnAmountDiscountTaken     I     N      Only necessary if you want this field written to 

cache

CDSA        mnForeignDiscountTaken    I     N      Only necessary if you want this field written to 

cache

CRDC        szCurrencyCodeTo          I     N      Only necessary if you want this field written to 

cache


Related Tables

None


Related Functions

None

Processing


• Initialize Cache structure and Index to NULL.
• Set up KeyCache Index.
• Get handle to Cache.
• Determine the current invoice.
• Load Invoice Cache Key Index.
• Write current Invoice Cache Key Index to Cache.

^

Data Structure

D03B0122 - DS For Write Invoice To Cache

Purpose
This function data structure is used by Write Invoice To Cache function.

Parameters


Item DescriptionI/O   Req?  Notes
DOCInvoice NumberI   Y  Must be passed to function (makes up key)
DCTDocument TypeI   Y  Must be passed to function (makes up key)

KCODocument CompanyI   Y  Must be passed to function (makes up key)

SFXDocument Pay ItemI   Y  Must be passed to function (makes up key)

COCompanyI   N  Only necessary if you want this field written to 

cache

GLCGL GlassI   N  Only necessary if you want this field written to 

cache

AAPAmount OpenI   N  Only necessary if you want this field written to 

cache

ADSCDiscount AvailableI   N  Only necessary if you want this field written to 

cache

CRCDCurrency Code FromI   N  Only necessary if you want this field written to 

cache

CRRExchange RateI   N  Only necessary if you want this field written to 

cache

FAPForeign Amount OpenI   N  Only necessary if you want this field written to 

cache

CDSForeign Discount AvailableI   N  Only necessary if you want this field written to 

cache

MCUCost CenterI   N  Only necessary if you want this field written to 

cache

DDNJDiscount Due DateI   N  Only necessary if you want this field written to 

cache

INT01Current Invoice Number   Y Should keep runing total of invoices outside 

function

ADSA        mnAmountDiscountTaken     I     N      Only necessary if you want this field written to 

cache

CDSA        mnForeignDiscountTaken    I     N      Only necessary if you want this field written to 

cache

CRDC        szCurrencyCodeTo          I     N      Only necessary if you want this field written to 

cache

RMKszNameRemarkI     N  Only

necessary if you want this field written to cache


Parameter NameData ItemData TypeReq/OptI/O/Both
mnInvoiceNumberDOCMATH_NUMERICNONENONE

Item  ab  Descriptionab I/O    Req?ab   Notes
DOCab Invoice  Numberab  Iab     Yab   Must be passed to function (makes up key)

^

szDocumentTypeDCTcharNONENONE

Item  ab  Descriptionab I/O    Req?ab   Notes
DCTab Document  Typeab  Iab     Yab   Must be passed to function (makes up key)

^

szDocumentCompanyKCOcharNONENONE

Item  ab  Descriptionab I/O    Req?ab   Notes
KCOab Document  Companyab  Iab     Yab   Must be passed to function (makes up key)

^

szDocumentPayItemSFXcharNONENONE

Item  ab  Descriptionab I/O    Req?ab   Notes
SFXab Document Pay  Itemab  Iab     Yab   Must be passed to function (makes up key)

^

szCompanyCOcharNONENONE

Item  ab  Descriptionab I/O    Req?ab   Notes
COab  Companyab  Iab     Nab   Only necessary if you want this field written to cache

^

szGlClassGLCcharNONENONE

Item  ab Description      I/O    Req?ab   Notes
GLCab       GL  Glassab      I      Nab  Only necessary if you want this field written to cache


^

mnAmountOpenAAPMATH_NUMERICNONENONE

Item  ab  Descriptionab I/O    Req?ab   Notes
AAPab Amount  Openab  Iab     Nab   Only necessary if you want this field written to cache

^

mnAmtDiscountAvailableADSCMATH_NUMERICNONENONE

Item       Description         I/O   Req?   Notes
ADSCab      Discount  Availableab   Iab   Nab   Only necessary if you want this field written to cache


^

szCurrencyCodeFromCRCDcharNONENONE

Item  ab  Descriptionab I/O    Req?ab   Notes
CRCDab Currency Code  Fromab  Iab     Nab   Only necessary if you want this field written to cache



^

mnExchangeRateCRRMATH_NUMERICNONENONE

Item  ab  Descriptionab I/O    Req?ab   Notes
CRRab Exchange  Rateab  Iab     Nab   Only necessary if you want this field written to cache

^

mnAmountForeignOpenFAPMATH_NUMERICNONENONE

Item  ab  Descriptionab I/O    Req?ab   Notes
FAPab Foreign Amount  Openab  Iab     Nab   Only necessary if you want this field written to cache

^

mnForeignDiscountAvailCDSMATH_NUMERICNONENONE

Item  ab  Descriptionab    I/O    Req?ab   Notes
CDSab Foreign Discount  Availableab   ab I       Nab        Only necessary if you want this field 
written to cache


^

szCostCenterMCUcharNONENONE

Item  ab  Descriptionab I/O    Req?ab   Notes
MCUab Cost  Centerab  Iab     Nab   Only necessary if you want this field written to cache

^

jdDateDiscountDueJulianDDNJJDEDATENONENONE

Item  ab  Descriptionab I/O    Req?ab   Notes
DDNJab Discount Due  Dateab  Iab     Nab   Only necessary if you want this field written to cache

^

nCurrentInvoiceNumberINT01integerNONENONE

Item  ab  Descriptionab I/O    Req?ab   Notes
INT01ab Current Invoice  Numberab I  ab     Yab  Should keep runing total of invoices outside function

^

mnAmountDiscountTakenADSAMATH_NUMERICNONENONE

Item  ab  Descriptionab I/O    Req?ab   Notes
ADSA        mnAmountDiscountTaken     I     N      Only necessary if you want this field written to 
cache



^

mnForeignDiscountTakenCDSAMATH_NUMERICNONENONE

Item  ab  Descriptionab I/O    Req?ab   Notes
CDSA        mnForeignDiscountTaken    I     N      Only necessary if you want this field written to 
cache


^

szCurrencyCodeToCRDCcharNONENONE

Item  ab  Descriptionab I/O    Req?ab   Notes
CRDC        szCurrencyCodeTo          I     N      Only necessary if you want this field written to 
cache


^

szNameRemarkRMKcharOPTNONE

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

Related Functions

None

Related Tables

None