F1201CreateParentChildAssetLinkL

F1201, Create Parent Child Asset Cache

Major Business Rule

Object Name: B1200050

Parent DLL: CAEC

Location: Client/Server

Language: C


1.1Purpose

This business function will take the Asset Number (NUMB) from input parameters and generate a cache that will contain the Asset, and all 

children/grandchildren of the Asset obtained thorough the Asset Hierarchy. The cache will be returned to the calling program. It will also determine if there are 

children for the given Asset Number.


1.2 Cached Data

1.3Setup Notes and Prerequisites

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

• If Mode is 'T', the business function will determine if the Asset 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.

1.4Special Logic

2.1Processing 

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

3) Build Unique Cache Name like this: "HHMMSS" + Last 2 Characters of Workstation Id. Return this 
name in Cache Name or Job Number (JOB)

4) Open F1201 Table
5) Call Internal Function Build Linked List (See Below)

6)End If

7)If Input Mode = 'D' then

8) Init Cache 

9) Call B1200100 to Terminate the Cache

10)End If

11)If Input Mode = 'T' then

12) Build Unique Cache Name like this: "HHMMSS" + Last 2 Characters of Workstation Id. Return 

this name in Cache Name or Job Number (JOB)

13) Open F1201 Table

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

15)End If

16)If F1201 Was Opened then

17) Close F1201

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

D1200050 - F1201 Create Parent Child Asset Cache

Parameter NameData ItemData TypeReq/OptI/O/Both
cModeEV01charREQINPUT

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

mnAssetNumberNUMBMATH_NUMERICREQINPUT

An 8-digit number that uniquely identifies an asset.

cErrorCodeERRCcharOPTOUTPUT

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).

cChildrenExistEV01charOPTOUTPUT

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

szCacheNameOrNumberJOBcharOPTBOTH

Job Number

mnLevelOfTreeMATH01MATH_NUMERICOPTINPUT

- - - Good Performance Low Value. 

Related Functions

B1200100 Cache, Process Asset Tree
B9800100 Get Audit Information

Related Tables

F1201 Asset Master File