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)
D1200050 - F1201 Create Parent Child Asset Cache
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
cMode | EV01 | char | REQ | INPUT |
An option that specifies the type of processing for an event. | ||||
mnAssetNumber | NUMB | MATH_NUMERIC | REQ | INPUT |
An 8-digit number that uniquely identifies an asset. | ||||
cErrorCode | ERRC | char | OPT | OUTPUT |
This error code indicates if any errors occurred during the creation of the Trip Document Detail (F4914) records by the Delivery Document
| ||||
cChildrenExist | EV01 | char | OPT | OUTPUT |
An option that specifies the type of processing for an event. | ||||
szCacheNameOrNumber | JOB | char | OPT | BOTH |
Job Number | ||||
mnLevelOfTree | MATH01 | MATH_NUMERIC | OPT | INPUT |
- - - Good Performance Low Value. |
B1200100 Cache, Process Asset Tree | ||||
B9800100 Get Audit Information |
F1201 Asset Master File |