F0150_Create_AB_Cache

F0150 Create Parent/Child Address Book Cache

Master Business Function

Object Name: B0100049

Parent DLL: CALLBSFN

Location: Client/Server

Language: C

Business Function Specification

Source NameB0100049DesignerC. Cox

Data Structure D010049ProgrammerT. Edwards

Function NameF0150 Create Parent Child Address Book CacheSystem Code01

Function Category

Function Use


Revisions Log 

DateModifications bySAR NumberDescription

03/09/98C. Cox 2050028Design

03/27/98T. Edwards2050028Program Completed


1.Functional Description


1.1Purpose

This business function will take the Address Book Number (AN8) from input parameters and generate a cache that will contain the Address Book , 

and all children/grandchildren of the Address Book Number obtained thorough the Address Book Number Hierarchy. The cache will be returned to the 

calling program. It will also determine if there are children for the given Address Book  Number.


1.2 Cached Data
The Address Book Number and Level of the Address Book Number within the hierarchy are stored in each node. The first item in the  cache is the 

Address Book Number passed into the function and the following items are children/grandchildren of that asset.


Address Book NumberLevel

Parent0

Child#11

Child#21

Grandchild#12

Grandchild#22


1.3Setup Notes and Prerequisites

• Address Book Number must be passed in.
• Structure type must be passed in.
• If Mode is 'C' the function will create the cache containing all children/grandchildren of the 
Address Book Number .

• If Mode is 'T', the business function will determine if the Address Book Number has children and set 
the Children Exist flag to 'Y' if children are found. A cache will not be created in this mode.

• If Mode is 'D' the function will destroy the cache it created with the 'C' Mode.
'b7'b7'b7'b7'b7'b7'b7'b7'b7'b7

1.4Special Logic


2.Technical Specifications


2.1Parameters:

Data Item Data Structure DescriptionI/ORequiredNotes

EV01ModeIYPass in 'C', 'D', or 'T'

OSTPStructure TypeIYUDC 01/TS

AN8Address Book NumberIY

ERRCError CodeON'1' If Errors Occurred, '0' Otherwise.

EV01Children ExistON'Y' if Children/Grandchildren Exist.

JOBCache Name or Job NumberI/ONWhen the Mode is 'C' or 'T', this function will 

generate a unique Address Book Tree Cache Name and return it in this 

parameter. It will create a cache with this unique name. In all other modes, 

this function will use this Cache Name to access the correct cache, so, you 

must pass the cache name you got when you called this function in 

Mode 'C'.

INT01Level Of TreeIN0 - Function will drive through all levels of the 

Address Book Tree. (Parent + Children + All Grandchildren in all levels) (This 

is the default) 1 - Function will retrieve up to 1 level of children. 

(Parent + Children)


2.2Related Tables 

Table Table Description

F0150 Address Organization Structure


2.3Related Business Functions

Source NameFunction Name

B0100050Cache, Process Address Book Tree


2.4Processing 

1)Initialize Input Error Code = '0'
2)If Input Mode = 'C' then

3) Build Unique Cache Name like this: "T"+"HMMSS" + Random 2 digit integer. Return this name in Cache Name or Job Number (JOB)
4) Open F0150 Table
5) Call Internal Function Build Linked List (See Below)

6)End If

7)If Input Mode = 'D' then

8) Init Cache 

9) Call B0100050 to Terminate the Cache

10)End If

11)If Input Mode = 'T' then

12) Build Unique Cache Name like this: "HHMMSS" + Random 2 digit integer. Return this name in Cache Name or Job Number (JOB)

13) Open F0150 Table

14) Call Internal Function Build Linked List (See Below)

15)End If

16)If F0150 Was Opened then

17) Close F0150

18)End If

19)

20)** Below is the internal function that builds the cache or checks existence of children.

21)Internal Function Build Linked List ( )

22)
























































 

Data Structure

D0100049 - F0150 Create Parent/Child Address Book Cache Data Structure

Parameter NameData ItemData TypeReq/OptI/O/Both
cModeEV01charREQINPUT

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

szOrganizationTypeStructurOSTPcharREQINPUT

A user defined code (01/TS) that identifies a type of organizational structure that has its own hierarchy in the Address Book system (for 
example, e-mail). When you create a parent/child relationship for the Accounts Receivable system, the structure type must be blank.

mnAddressNumberAN8MATH_NUMERICREQINPUT

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

cErrorCodeERRCcharOPTNONE

This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document 
Set Server program (XT4914).

cChildrenExistEV01charOPTNONE

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

szCacheNameOrNumberJOBcharOPTNONE

Job Number

nLevelOfTreeINT01integerOPTNONE

Number of Days in Future to Query for Responses Due. 

Related Functions

B0100050 Cache, Process Address Book Tree

Related Tables

F0150 Address Organization Structure Master