WriteF09218HeaderRecord

Write F09218 Header Record

Major Business Rule

Object Name: B0900052

Parent DLL: CFIN

Location: Client/Server

Language: C

Functional Description

Purpose

This function gathers data from the Online Consolidations program (P09218) and either creates a new 

Consolidation Header record or updates an existing one.  There is a Mode flag that is used to determine 

Add or Update Mode.  If calling this function in Add mode, the Next Number used for the Consolidation 

Header record will be passed back in the parameter.  If this function is in Generate mode, it will 

set the Generation Date field of the F09218 table to the current System Date.


Setup Notes and Prerequisites

If adding a new consolidation header record, pass an "A" in the Mode Flag along with the following: 

Index Name, Index Description, Company, Category Code 1-4, Category Code Values 1-4.


If updating an existing consolidation header record, pass a "U" in the Mode Flag along with the 

following: Index Name, Index Description, Company, Category Code 1-4, Category Code Values 1-4.


If generating a consolidation header record, pass a "G" in the Mode Flag along with the Index Name.



Technical Specification

If Mode flag is "A"

   Get Next Number for Consolidation

   Load Next Number into return value for BSFN data structure

   Open F09218 table

   Set Values passed in from P09218 application

   Insert Consolidation Header into F09218 table

   Close table

If Mode flag is "G"

   Open F09218 table

   Fetch Consolidation Header from F09218 table

   Set Generation Date to Current System Date

   Update Consolidation Header in F09218 table

   Close F09218 table

If Mode flag is "U"

   Open F09218 table

   Fetch Consolidation Header from F09218 table

   Set Values passed in from P09218 application

   Update Consolidation Header into F09218 table

   Close table

Data Structure

D0900052 - Write F09218 Header Record

Parameter NameData ItemData TypeReq/OptI/O/Both
szIndexNameIDXNcharOPTINPUT

Special Input Expected
Pass the Index Name of the Consolidation.

^

szIndexDescriptionDL10charOPTINPUT

Special Input Expected
Pass the Index Description for the Consolidation.

^

szCompanyCOcharOPTINPUT

Special Input Expected
Pass the Company of the Consolidation.  Pass an "*" for all companies.

^

szCategoryCode1CDAAcharOPTINPUT

Special Input Expected
Pass the Catergory Code from the first Category Code field.

^

szCategoryCodeValue1CDAVcharOPTINPUT

Special Input Expected
Pass the Catergory Code Value from the first Category Code Value field.


^

szCategoryCode2CDBBcharOPTINPUT

Special Input Expected
Pass the Catergory Code from the second Category Code field.


^

szCategoryCodeValue2CDBVcharOPTINPUT

Special Input Expected
Pass the Catergory Code Value from the second Category Code Value field.



^

szCategoryCode3CDCCcharOPTINPUT

Special Input Expected
Pass the Catergory Code from the third Category Code field.


^

szCategoryCodeValue3CDCVcharOPTINPUT

Special Input Expected
Pass the Catergory Code Value from the third Category Code Value field.



^

szCategoryCode4CDDDcharOPTINPUT

Special Input Expected
Pass the Catergory Code from the fourth Category Code field.


^

szCategoryCodeValue4CDDVcharOPTINPUT

Special Input Expected
Pass the Catergory Code Value from the fourth Category Code Value field.



^

jdGLDateDGJJDEDATEOPTINPUT

Please disregard this parameter it is not used.
^

mnNextNumberN001MATH_NUMERICOPTBOTH

Special Output Returned
When adding a new Consolidation, this value will be passed back, it is the Consolidation's unique 

Next Number.

^

cModeFlagEV01charOPTINPUT

Special Input Expected
Required parameter to set the processing mode.  Valid values are:


"A" - Adding a new Consolidation

"G" - Generating the detail, setting the Generation Date

"U" - Updating an existing Consolidation

^

szOrganizationTypeOTPScharOPTINPUT

A user-defined code (00/TS) that identifies the type of organization structure, such as financial or responsibility. Each type of organization 
structure can have a separate hierarchy.  

szParentBusinessUnitMCU1charOPTINPUT

The primary level in a business unit hierarchy. A parent in one hierarchy can be a child in a different hierarchy.

szMaskedBusinessUnitMCUMcharOPTINPUT

Use this field to select a search pattern within an existing business unit. Replace the wildcard characters with the search characters to create 
a specific search pattern. The characters you enter must be in the exact positions where they occur in the business unit number. For 
example, if you type 200 over the last three positions of the wildcard mask (*********200), the system searches for all business units ending in 200.  If 
you enter blanks (spaces) the system searches for a pattern with blanks in those positions. Press F22 to clear the field and refresh the 
wildcard mask.

Related Functions

None

Related Tables

F09218 Online Consolidations Set-up File