You are on page 1of 81

DAART

Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

DAART
Software Design Specification
Author:

Signature / Date:

Ravi Pasupuleti

Approval:

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Signature / Date:

Page: 1 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

Document history:
Versio
n
1.0
1.5
1.6
1.7

Date

Author

31-AugRavi
2010
Pasupuleti
21-Oct-2010 Ravi
Pasupuleti
1-Nov-2010 Ravi
Pasupuleti
18-Nov-2010 Ravi
Pasupuleti

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Comments
Initial Version
Updated – Contract Cube and SAP
Staging Cube
Updated – Archive Cube
Updated - Final

Page: 2 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

Table of Contents
1

INTRODUCTION....................................................................................................... 5

1

PURPOSE................................................................................................................. 5

2

DESIGN OVERVIEW.................................................................................................. 5

3

INPUT CUBE - APPLICATION / SYSTEM SOFTWARE DESIGN SPECIFICATION..............7
3.1 INPUT DATA......................................................................................................... 7
3.2 INPUT CUBE......................................................................................................... 8
3.3 DIMENSIONS........................................................................................................ 8
3.3.1
Therapeutic Area.....................................................................................8
3.3.2
Measures................................................................................................. 8
3.3.2.1 The following fields are the Hidden fields that are used in the Input Cube
Rules 13

3.3.3

System ID..............................................................................................17

3.3.3.1Process to build System IDs Dynamically.........................................17

3.4 DATA LOAD – INPUT CUBE....................................................................................20
4

CONTRACT CUBE - APPLICATION / SYSTEM SOFTWARE DESIGN SPECIFICATION....21
4.1 DIMENSIONS...................................................................................................... 21
4.1.1
TA.......................................................................................................... 21
4.1.2
Type....................................................................................................... 21
4.1.3
Compound............................................................................................. 22
4.1.4
Project................................................................................................... 22
4.1.5
TM1 ContractID......................................................................................22
4.1.6
Measure_Contract..................................................................................26
4.1.6.1 Measure Elements................................................................................... 26
4.1.6.2 Hidden Fields........................................................................................... 53

4.2 DATA LOAD........................................................................................................ 64
4.3 LOOKUP CUBES..................................................................................................66
4.3.1
Contract_Cube_PastData_Monthly.........................................................66
4.3.2
Contract_Cube_PastData_Yearly............................................................67
5

SAP STAGING CUBE...............................................................................................67
5.1 SAP STAGING DATA............................................................................................ 67
5.2 DIMENSIONS................................................................................................... 67
5.2.1
PONumber.............................................................................................68
5.2.2
PostDate................................................................................................ 68
5.3 DATA LOAD........................................................................................................ 68

6

GL ACCOUNT LOOKUP CUBE..................................................................................70

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 3 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

6.1 GL ACCOUNT DATA.............................................................................................70
6.2 DIMENSIONS...................................................................................................... 70
6.2.1
Ariba GL Account...................................................................................70
6.2.2
Invoice GL Account................................................................................70
6.3 DATA LOAD........................................................................................................ 70
7

ARCHIVE CUBE...................................................................................................... 70
7.1 ARCHIVE CUBE DATA...........................................................................................71
7.2 DIMENSIONS...................................................................................................... 71
7.2.1
TM1 ContractID Archive.........................................................................71
7.3 DATA LOAD........................................................................................................ 72

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 4 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

1 Introduction
1 Purpose
This document is a Software Design Specification for project DAART
(Development Accrual Automation and Reporting Tool). DAART will be used by
the Novartis Oncology and General Medicine Development Finance groups for
managing their Accrual Generation and Reporting process

2 Design Overview

The above diagram shows the detailed flow of data through the TM1 interface
of the DAART Application.
The following is the detailed explanation for each individual process:
INPUT CUBE:
DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 5 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

The user interface for the Input cube will be in an excel template
There will be 2 data sources for the INPUT CUBE – ARIBA and Manual Data
Entry
Ariba will ftp the data file in a .csv format to a shared server on a daily basis.
This data will be loaded in the TM1 Input Cube through a Turbo Integrator
Process.
An INPUT TEMPLATE is created where this Ariba data can be edited and also
new manual records can be entered to the Input cube. User will have the
option of selecting an action from a drop down box that can be performed on
each of the records - Hold/Process/Delete.
CONTRACT CUBE:
Data is loaded in the in the Contract Cube from the input cube once the user
clicks the submit button. This is achieved by using Active forms in the Excel
template which runs a Turbo integrator process to load the data as per the
user’s requirement.
User also has a provision to delete the Manual Records from the Contract cube
and Input Cube. This delete action is performed while loading the data to the
Contract Cube. A set of TI processes are run to achieve all the desired results.
The Contract Cube has two sources of data –
1) Data from the Input Cube based on the user submission.
2) Data from SAP –SAP sends the invoice data at a lower granularity
(Document ID, Year, Comp Code) than PO. This data will be fed to the
Contract cube through the Staging Cube
STAGING CUBE:
SAP will send Month to date invoice data in .csv format on a daily basis . This
data needs to be aggregated before it is loaded in the Contract Cube. The
Staging cube will maintain all the historical transactions at any given time and
will never be truncated.
The staging cube will hold this data and aggregate the cash pay outs at the PO
level.
ARCHIVE CUBE:

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 6 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

The archive Cube facilitates audit trail by storing every change / record
processed from Input Cube to Contract Cube.
Any new record that is processed from Input Cube to Contract Cube triggers
for immediate update of the Archive Cube with the changes. The entire
Contract with a new timestamp is archived.

GL ACCOUNT LOOKUP CUBE:
The source file has the mapping between Ariba GL Account and Invoice GL
Account. This mapping is maintained by the Application Power users/business
users.
The mapping between Ariba GL Account and Invoice GL Account is populated
in the GL Account Cube, and is used to assign the Invoice GL Accounts
automatically to the records in the Input Cube.

3 INPUT CUBE - Application / System Software Design
Specification
3.1 Input Data
Input File Location: __________________________________________
File name: AccrualsAriba.csv
The file containing the following data fields from Ariba is ‘FTPed’ to the shared
path.
1
2
3
4
5
6
7
8
9
10
11

PONumber
RequisitionNumber
CreateDate
SubmitDate
ApprovedDate
Status
Organization
TherapeuticArea
ContractStartDate
ContractEndDate
AmendmentStartD
ate

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 7 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

12
13
14
15
16
17
18
19
20
21
22
23

AmendmentEndDat
e
Requisitionamount
AmendmentAmoun
t
AmendmentNumbe
r
TAMedicalContact
ContractManager
Services
SupplierName
SupplierID
Costcenter
GLAccount
Project

3.2 Input Cube
Source – Ariba Source file and Manual input
User Interface – Excel Template

3.3 Dimensions
The following are the Dimensions for the Input Cube
1. Therapeutic Area
2. Measures
3. System ID
3.3.1 Therapeutic Area
This dimension has two elements: Oncology and Non Oncology

3.3.2

Measures

The following elements are a part of the Measures Dimension

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 8 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

S
No
1

Element Name
TM1 Contract ID

Typ
e
S

Description
‘TM1 Contract ID’ is equal to ‘PO Number’ if exists else equal to
‘Requisition Number’ else equal to ‘System ID’. Since system id is
not generated until the data is manually input, we have to opt for a
Rule instead of defining the formula for the variable.
In order to implement the above logic the following RULE is written
in the Rules editor
['Oncology','TM1 Contract ID']=S:IF(DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'TA')@='Oncology',IF(DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Purchase Order Number')@<>'',
'PO'|DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Purchase Order Number'),
IF(DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Requisition Number')@<>'',
'RE'|SubSt(DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Requisition Number'),1,
IF(SCAN('-',DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Requisition Number'))=0,
Long(DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Requisition Number')),
SCAN('-',DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Requisition Number'))-1)),
'MA'| DIMNM('Systemid',DIMIX('Systemid',!
Systemid)))),continue);
['Nononcology','TM1 Contract ID']=S:IF(DB('INPUT CUBE',!
SystemID,!TherapeuticArea,'TA')@='nononcology',IF(DB('INPUT
CUBE',!SystemID,!TherapeuticArea,'Purchase Order Number')@<>'',
'PO'|DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Purchase Order Number'),
IF(DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Requisition Number')@<>'',
'RE'|SubSt(DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Requisition Number'),1,
IF(SCAN('-',DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Requisition Number'))=0,
Long(DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Requisition Number')),
SCAN('-',DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Requisition Number'))-1)),
'MA'| DIMNM('Systemid',DIMIX('Systemid',!
Systemid)))),continue);

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 9 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

S
No
2

3

Element Name
Compound

Purchase Order
Number

Typ
e
S

S

Description
3 digit code after applying a substring to Ariba Project field. The 3
characters from the 3rd digit onwards.
In order to implement the above logic the following rule is written in
the TI Process.
vCompound=SUBST(Project,3,3);
PO Number is directly taken from the Ariba feed. But if Purchase
order number does not exists for the record, then the PO number of
Core contract from the Contract cube will be copied
The following rule is applied to get the PO number.

4
5

S
S

6

Old PO #
Requisition
Number
Contract Type

7
8
10
11
12

Cost Center
Ariba GL Account
Vendor Name
Vendor Number
Therapeutic Area

S
S
S
S
S

13

Project

S

14
15

Type
Study

S
S

16

Function/Services

S

S

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

['Purchase Order Number']=S:IF(DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'PO Number_Ariba')@='' & DB('INPUT CUBE',!
SystemID,!TherapeuticArea,'PO Number_Copy')@<>'',
DB('INPUT CUBE',!SystemID,!TherapeuticArea,'PO
Number_Copy'),CONTINUE);
User Input (if required)
Ariba Feed
User Input (Picklist – Core, Amendment, Adjustment)
If Amendment Number is blank, it is Core else Amendment.
User can change the value using the Dropdown
Ariba Feed
Ariba Feed
Ariba Feed
Ariba Feed
Ariba Feed
User can also select the value from dropdown
The third digit from the Ariba Project field (after D-) to the ‘/’
In order to implement the above logic the following rule is written in
the TI Process.
vProject=SUBST(Project,3,Long(project)-(Long(Project)Long(SUBST(Project,1,SCAN('/',Project))))-3);
User Input (Picklist – CRO,IVRS,LAB,HEOR,Post-Poc)
Last digits after the ‘/’of the Project ID from Ariba
vStudy=SUBST(Project,SCAN('/',Project)+1,Long(project)Long(SUBST(Project,1,SCAN('/',Project))));
Ariba Feed

Page: 10 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

S
No
17

Element Name
Contract Start
Date

Typ
e
S

18

Contract End Date

S

19

Amendment Start
Date

S

20

Amendment End
Date

S

21

Amendment
Number
Contract Amount
Amendment
Amount
TA/Medical
Contact
Contract Manager
Ariba Status
WBS

S

22
23
24
25
26
27

N
N

Description
Format conversion to mm/dd/yyyy from YYYYMMDD
In order to implement the above logic the following rule is written in
the TI Process
If(ContractStartDate@<>'');
vContractStartDate=SUBST(ContractStartDate,5,2)|'/'|
SUBST(ContractStartDate,7,2)|'/'|SUBST(ContractStartDate,1,4);
endif;
Format conversion to mm/dd/yyyy from YYYYMMDD
In order to implement the above logic the following rule is written in
the TI Process
If(ContractEndDate@<>'');
vContractEndDate=SUBSt(ContractEndDate,5,2)|'/'|
SUBST(ContractEndDate,7,2)|'/'|SUBST(ContractEndDate,1,4);
endif;
Format conversion to mm/dd/yyyy from YYYYMMDD
In order to implement the above logic the following rule is written in
the TI Process
IF(AmendmentStartDate@<>'' );
vAmendmentStartDate=SUBST(AmendmentStartDate,5,2)|'/'|
SUBST(AmendmentStartDate,7,2)|'/'|
SUBST(AmendmentStartDate,1,4);
else;
vAmendmentStartDate='';
endif;
Format conversion to mm/dd/yyyy from YYYYMMDD
In order to implement the above logic the following rule is written in
the TI Process
IF(AmendmentEndDate@<>'');
vAmendmentEndDate=SUBST(AmendmentEndDate,5,2)|'/'|
SUBST(AmendmentEndDate,7,2)|'/'|
SUBST(AmendmentEndDate,1,4);
else;
vAmendmentEndDate='';
endif;
Ariba Feed
Ariba Feed (Requisition Amount)
Ariba Feed

S
S
S
S

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Ariba
Ariba
Ariba
Ariba

Feed
Feed
Feed
Feed - Project ID
Page: 11 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

S
No
28

Element Name
Initial Source

Typ
e
S

Description
Initial Source = Ariba if the record is loaded from Ariba else Manual.
To populate this field automatically, a variable Temp Source is used
in the TI process.
vSourcetemp='Ariba';
The following rule is written in the Rules Editor
['Source']=S:IF(DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Sourcetemp')@= 'Ariba','Ariba', IF(DB('INPUT
CUBE',!SystemID,!TherapeuticArea,'TM1 Contract
ID')@='','','Manual'));

29

Rejected

S

The Rejected field is set to a ‘YES’ if any of the fields required for a
record to be processed to Contract Cube is missing. The following
fields are mandatory to have values for a record in the input cube if
it has to be processed to Contract Cube - Contract Type, Cost
center, GL Account, Vendor name, Project, Study, Contract Start
Date, Contract End Date, Amendment Start Date and Amendment
End Date in case of Amendments, WBS, Source, Compound, Type or
Contract Cube Status is Inactive
Also Rejects for the following scenarios
If the PO number for the record in INPUT Cube and CONTRACT Cube
& to reject the row if both are not equal
If the Core Contract comes from Ariba without a PO NUmber and it
has a PO Number in Contract Cube
If the Core Contract comes from Ariba with a PO NUmber different
from what it has in Contract Cube
If the user tries to process 2 cores for the same PO
If an Amendment comes from Ariba and the PO Number on the core
contract in contract cube is different from the PO number on the
amendment
In order to implement the above logic the following RULE is written
in the rule editor
['Rejected']=S:IF(DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Cost Center')@=''
% DB('INPUT CUBE',!SystemID,!TherapeuticArea,'Ariba GL
Account')@=''
% DB('INPUT CUBE',!SystemID,!TherapeuticArea,'Contract
Type')@=''
% DB('INPUT CUBE',!SystemID,!TherapeuticArea,'Vendor
Name')@=''
% DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Project')@=''
% DB('INPUT CUBE',!SystemID,!TherapeuticArea,'Therapeutic

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 12 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

S
No

30

Element Name

Contract Cube
Status

Typ
e

S

Description
Area')@=''
% DB('INPUT CUBE',!SystemID,!TherapeuticArea,'Study')@=''
% DB('INPUT CUBE',!SystemID,!TherapeuticArea,'Type')@=''
% DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Compound')@=''
% DB('INPUT CUBE',!SystemID,!TherapeuticArea,'Contract
Start Date')@=''
% DB('INPUT CUBE',!SystemID,!TherapeuticArea,'Contract
End Date')@=''
% DB('INPUT CUBE',!SystemID,!TherapeuticArea,'WBS')@=''
% DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Source')@=''
%((DB('INPUT CUBE',!SystemID,!TherapeuticArea,'Contract
Type')@='Core')
& elcompn('TM1 ContractID',DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'TM1 Contract ID'))>0
& elcomp('TM1 ContractID',DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'TM1 Contract ID'),1) @<> DB('INPUT CUBE',!
SystemID,!TherapeuticArea,'SystemIDData'))
%((DB('INPUT CUBE',!SystemID,!TherapeuticArea,'Contract
Type')@='Core')%(DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Contract Type')@='Adjustment')) & DB('INPUT
CUBE',!SystemID,!TherapeuticArea,'PO
Number_ContractCube')@<>'' & DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'PO Number_ContractCube')@<> (DB('INPUT
CUBE',!SystemID,!TherapeuticArea,'Purchase Order Number'))
% ((DB('INPUT CUBE',!SystemID,!TherapeuticArea,'Contract
Type')@='Amendment') & (DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Purchase Order Number')@<>DB('INPUT CUBE',!
SystemID,!TherapeuticArea,'PO Number_ContractCube')) )
% DB('INPUT CUBE',!SystemID,!TherapeuticArea,'Contract
Cube Status')@='Inactive'
% DB('INPUT CUBE',!SystemID,!TherapeuticArea,'Contract
Cube Status')@='Suspended'
% (DB('INPUT CUBE',!SystemID,!TherapeuticArea,'Contract
Type')@='Amendment') & ( DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Amendment Start Date')@='' % DB('INPUT
CUBE',!SystemID,!TherapeuticArea,'Amendment End Date')@='' )
% ((DB('INPUT CUBE',!SystemID,!TherapeuticArea,'Contract
Type')@='Amendment') & elcompn('TM1 ContractID',DB('INPUT
CUBE',!SystemID,!TherapeuticArea,'TM1 Contract ID')) < 1),
'YES',CONTINUE);
The status of the Contract in the Contract Cube by using TM1
Contract ID as reference.
The below rule is written in the Rules Editor to get the status of the

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 13 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

S
No

Element Name

Typ
e

31

Action

S

32

Accrual GL
Account

S

Description
Contract from the Contract Cube
['Contract Cube Status']= S:DB('Test_Contract',DB('INPUT CUBE',!
SystemID,!TherapeuticArea,'Compound'),
DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Type'),DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Project'),
DB('INPUT CUBE',!SystemID,!TherapeuticArea,'Therapeutic
Area'),
DB('INPUT CUBE',!SystemID,!TherapeuticArea,'TM1 Contract
ID'),'Status');
User Input (Picklist - Process, Hold, Delete). Blank Values are treated
as HOLD
To Calculate the Invoice GL Account, a lookup Cube
GL_Account_Lookup_Cube is created. The process is explained in the
later pages
Ariba GL Account is Converted to the Invoice GL Account using the
rule
['Invoice GL Account']=S:DB('GL_Account_Lookup_Cube',DB('INPUT
CUBE',!SystemID,!TherapeuticArea,'Ariba GL Account'),'Invoice GL
Account');

33
34

Old PO#1
Carry Forward
Legacy
Comments

35

S
N

Legacy Feed
Legacy Feed

S

User Input

3.3.2.1 The following fields are the Hidden fields that are used in the Input
Cube Rules

S
N
o

Fields

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Description

Page: 14 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

1

2

3

ContractStartDateYYYY-MMDD

ContractEndDateYYYY-MM-DD

AmendmentStartDateYYYYMM-DD

ContractStartDateYYYY-MM-DD is an intermediate field
that is used to convert the Contract Start Date given in
the Input format to the TM1 Date format for calculation
purposes.
['ContractStartDateYYYY-MM-DD']=S:IF(DB('INPUT
CUBE',!SystemID,!TherapeuticArea,'Contract Start
Date')@<>'',
DATES(NUMBR(SUBST(DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Contract Start Date'),7,4)),
NUMBR(SUBST(DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Contract Start Date'),1,2)),
NUMBR(SUBST(DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Contract Start Date'),4,2))),
CONTINUE);
ContractEndDateYYYY-MM-DD is an intermediate field
that is used to convert the Contract End Date given in
the Input format to the TM1 Date format for calculation
purposes.
['ContractEndDateYYYY-MM-DD']=S:IF(DB('INPUT
CUBE',!SystemID,!TherapeuticArea,'Contract End
Date')@<>''
,DATES(NUMBR(SUBST(DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Contract End Date'),7,4)),
NUMBR(SUBST(DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Contract End Date'),1,2)),
NUMBR(SUBST(DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Contract End Date'),4,2))),
CONTINUE);
AmendmentStartDateYYYY-MM-DD is an intermediate
field that is used to convert the Aemendment Start
Date given in the Input format to the TM1 Date format
for calculation purposes.
['AmendmentStartDateYYYY-MM-DD']=S:IF(DB('INPUT
CUBE',!SystemID,!TherapeuticArea,'Amendment Start
Date')@<>'',
DATES(NUMBR(SUBST(DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Amendment Start Date'),7,4)),
NUMBR(SUBST(DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Amendment Start Date'),1,2)),
NUMBR(SUBST(DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Amendment Start Date'),4,2))),
CONTINUE);

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 15 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

4

5

AmendmentEndDateYYYYMM-DD

PO Number_ContractCube

AmendmentEndDateYYYY-MM-DD is an intermediate
field that is used to convert the Amendment End Date
given in the Input format to the TM1 Date format for
calculation purposes.
['AmendmentEndDateYYYY-MM-DD']=S:IF(DB('INPUT
CUBE',!SystemID,!TherapeuticArea,'Amendment End
Date')@<>'',
DATES(NUMBR(SUBST(DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Amendment End Date'),7,4)),
NUMBR(SUBST(DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Amendment End Date'),1,2)),
NUMBR(SUBST(DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Amendment End Date'),4,2))),
CONTINUE);
PO Number_ContractCube is the Intermediate field that
Copies the Core Contract's PO Number of Contract
Cube (Based on Requisition Number) to the all row's of
Input Cube's Contract
['PO Number_ContractCube']=S:IF (DB('CONTRACT
CUBE',DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Compound'),DB('INPUT CUBE',!
SystemID,!TherapeuticArea,'Type'),
DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Project'),DB('INPUT CUBE',!
SystemID,!TherapeuticArea,'Therapeutic Area'),
elcomp('TM1 ContractID',DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'TM1 Contract ID'),1),'Purchase Order
Number')@='',
DB('CONTRACT CUBE',DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Compound'),DB('INPUT CUBE',!
SystemID,!TherapeuticArea,'Type'),
DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Project'),DB('INPUT CUBE',!
SystemID,!TherapeuticArea,'Therapeutic Area'),
'AR'| subst(DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Requisition
Number'),1,if(scan('-',DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Requisition Number'))=0,
long(DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Requisition
Number')),scan('-',DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Requisition Number'))-1)) | '0','Purchase Order Number'),
DB('CONTRACT CUBE',DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Compound'),DB('INPUT CUBE',!

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 16 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

6

SystemID,!TherapeuticArea,'Type'),
DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Project'),DB('INPUT CUBE',!
SystemID,!TherapeuticArea,'Therapeutic
Area'),elcomp('TM1 ContractID',
DB('INPUT CUBE',!SystemID,!TherapeuticArea,'TM1
Contract ID'),1),'Purchase Order Number'));
Core PO Status flags the status as NO if PO number for
the core in contrat cube is null and PO exists in Input
cube, will assign the status as 'No'

Core PO Status

This field is used to delete the records with NO PO
number from Contract Cube when the user processes
the records with PO number.
['Core PO Status']=S:IF(DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Contract Type')@='Core' &
DB('CONTRACT CUBE',DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Compound'), DB('INPUT CUBE',!
SystemID,!TherapeuticArea,'Type'),
DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Project'), DB('INPUT CUBE',!
SystemID,!TherapeuticArea,'Therapeutic Area'), !
SystemID,'Contract Type')@='Core' &
DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Purchase Order Number')@<>'' &
DB('CONTRACT CUBE',DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Compound'), DB('INPUT CUBE',!
SystemID,!TherapeuticArea,'Type'),
DB('INPUT CUBE',!SystemID,!
TherapeuticArea,'Project'), DB('INPUT CUBE',!
SystemID,!TherapeuticArea,'Therapeutic Area'), !
SystemID,'Purchase Order Number')@='', 'No',
CONTINUE);
Code for the derived variables in Turbo Integrator Process:
The formula for each of the variables derived in the Turbo Integrator are
mentioned below
S No
1
2
3

Variable
vCompound
vProject
vStudy

Formula
vCompound=SUBST(Project,3,3);
vProject=SUBST(Project,3,Long(project)-(Long(Project)Long(SUBST(Project,1,SCAN('/',Project))))-3);
vStudy=SUBST(Project,SCAN('/',Project)+1,Long(project)Long(SUBST(Project,1,SCAN('/',Project))));

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 17 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

S No
4

Variable
vContractStartDate

5
vAmendmentStartD
ate
6
vAmendmentEndD
ate
7
vSystemID
8
vTA
9
10

vContractAmount
vContractEndDate

Formula
If(CreateDate@<>'');
vContractStartDate=SUBST(CreateDate,5,2)|'/'|
SUBST(CreateDate,7,2)|'/'|SUBST(CreateDate,1,4);
endif;
IF(AmendmentStartDate@<>'' );
vAmendmentStartDate=SUBST(AmendmentStartDate,5,2)|'/'|
SUBST(AmendmentStartDate,7,2)|'/'|SUBST(AmendmentStartDate,1,4);
else;
vAmendmentStartDate='';
endif;
IF(AmendmentEndDate@<>'');
vAmendmentEndDate=SUBST(AmendmentEndDate,5,2)|'/'|
SUBST(AmendmentEndDate,7,2)|'/'|SUBST(AmendmentEndDate,1,4);
endif;
vsystemid=subst(RequisitionNumber,1,if(scan('-',RequisitionNumber)=0
, long(RequisitionNumber),scan('-',RequisitionNumber)-1) )|'-'|
IF(AmendmentNumber@='','0',AmendmentNumber);
IF(TherapeuticArea@='ONC');
vTA='Oncology';
else;
vTA='NonOncology';
endif;
vContractAmount=Requisitionamount;
If(SubmitDate@<>'');
vContractEndDate=SUBSt(SubmitDate,5,2)|'/'|
SUBST(SubmitDate,7,2)|'/'|SUBST(SubmitDate,1,4);
endif;

11

vWBS

vWBS=Project;

12

SystemIDData

vSystemIDData=vSystemID;

3.3.3

System ID

This dimension is invisible to the user in the Input Cube Template. The
additional dimension is created to have a unique record id for each of the
records that exist in the Input cube (Ariba and Manual Data Entry)
1) It is a unique id for each of the records that exist in the DAART system.
It is important to have a unique record id because the records coming
from ARIBA may not have a PO and Manual records may not have both
PO and Requisition Id.
DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 18 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

2) System ids are generated dynamically so that they are updated into the
cube every time the user loads the data from the Ariba or Manually
Input records.

3.3.3.1

Process to build System IDs Dynamically

SystemID for Ariba records
For Ariba records, system ID is the concatenation of the ‘AR ’, Requisition
number (without version) and Amendment No# . This creates a unique ID for
each of the record in the input cube which is later moved to the contract cube
(System Id uniquely identifies Core Contract / Amendments).
To implement this functionality a new variable ‘vsystemid’ is created with the
following formula.
vsystemid='AR'|
subst(RequisitionNumber,1,if(scan('',RequisitionNumber)=0,long(RequisitionNu
mber),scan('-',RequisitionNumber)-1) )|'-'|
IF(AmendmentNumber@='','0',AmendmentNumber);

SystemID for Manually Entered Records
1. Add new SystemID
For Manual entry, the user has a provision to add a record by just clicking a
button on the Template. The user clicks on the ‘Add New Record’ button. The
TI process adds one system id to the SystemID dimension and the input cube
then automatically re-calculates the template so that the new system id is
available for the user to manually enter the record.
In order to implement this functionality, a subset ManualSysID_subset is
created on the dimension using below MDX query in the Expression Window of
the Subset Editor to filter for all the Manual records.
except({TM1SUBSETALL( [systemid] ) } ,
{TM1FILTERBYPATTERN( {TM1FILTERBYLEVEL( {TM1SUBSETALL( [systemid] ) }
, 0 )} , "AR*")})
A TI processes is run to create (later recreate) dimension by name
Manual_SysID to load the manually created SystemID’s. This dimension is
used to separate the system ids for Manual records from all the system ids
and to retrieve the last used manual SystemId , so that new SystemIDs can be
generated incrementally from here.
TI process – To_Create_SystemID_Dim is a parameterized dimension that is run
to run to update the SystemID with the new Record for Manual Entry. In order
to implement this functionality, the following script is written in the Metadata
tab of the Process.
DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 19 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

This initially executes the Process To_Create_Manual_SysID_Dim checks the
dimension size of the Manual SystemID and adds an element to it.
Prolog tab of To_Create_SystemID_Dim
ExecuteProcess('To_Create_ManualSysID_Dim');
vsystemid=DIMNM('ManualSysID',DIMSIZ('ManualSysID'));
index=stringtonumber(vSystemID);
dimensionelementinsert('ManualSysID','',numbertostring(index+1),'s');
dimensionelementinsert('Systemid','',numbertostring(index+1),'s');

2. Assigning System ID to respective TA Groups
The field TA in the Measure_Input Dimension is loaded with the values
Oncology and NonOncology for Oncology and NonOncology records
respectively so as to filter the Systemids in the corresponding views. To
implement this functionality, the following script is written in the epilog tab of
the TI Process
Epilog tab of To_Create_SystemID_Dim
CellPutS(pTA,'INPUT CUBE',numbertostring(index+1),pTA,'TA');
CellPutS(numbertostring(index+1),'INPUT
CUBE',numbertostring(index+1),pTA,'SystemIDData');

3. Creating subsets on System id
Oncology and NonOncology subsets are created on the SystemID dimension
using below MDX query to filter the records based on the Therapeutic Area in
the Expression window of subset editor to use in the cube views based on
TA’s. A sort is also applied so that the Ariba records are always on the top and
the manual records are at the bottom.
Filter Condition for Oncology Subset used in Oncology View
(Oncology_View_Subset)
{UNION(
DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 20 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

FILTER( {TM1FILTERBYLEVEL( {TM1SUBSETALL( [SystemId] )}, 0)}, ([INPUT
CUBE].([TherapeuticArea].currentmember.nextmember,[Measure_Input].
[TA])='Oncology') AND ([INPUT CUBE].
([TherapeuticArea].currentmember.nextmember,[Measure_Input].
[Source])='Ariba'))
,
FILTER( {TM1FILTERBYLEVEL( {TM1SUBSETALL( [SystemId] )}, 0)}, ([INPUT
CUBE].([TherapeuticArea].currentmember.nextmember,[Measure_Input].
[TA])='Oncology') AND ([INPUT CUBE].
([TherapeuticArea].currentmember.nextmember,[Measure_Input].
[Source])='Manual'))
)
}

Filter Condition for NonOncology Subset used in NonOncology view
(NonOncology_View_Subset)
{UNION(
FILTER( {TM1FILTERBYLEVEL( {TM1SUBSETALL( [SystemId] )}, 0)}, ([INPUT
CUBE].([TherapeuticArea].currentmember.nextmember,[Measure_Input].
[TA])='NonOncology') AND ([INPUT CUBE].
([TherapeuticArea].currentmember.nextmember,[Measure_Input].
[Source])='Ariba'))
,
FILTER( {TM1FILTERBYLEVEL( {TM1SUBSETALL( [SystemId] )}, 0)}, ([INPUT
CUBE].([TherapeuticArea].currentmember.nextmember,[Measure_Input].
[TA])='NonOncology') AND ([INPUT CUBE].
([TherapeuticArea].currentmember.nextmember,[Measure_Input].
[Source])='Manual'))
)
}

3.4 Data Load – Input Cube
The TI process ‘To_Load_INPUT_CUBE_from_Ariba’ loads the data into the input
cube from ‘AribaAccruals.csv’ as the source.
The SUBMIT button on the Input Template triggers the following
DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 21 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7








All the Ariba records except the ones with HOLD/Blank in Action button
move to the contract cube and are removed from the Input Cube
Any record Ariba/Manual, which has a value missing in atleast one of
the required fields in the Contract Cube is not processed and retained in
Input cube with Rejected status.
Any Amendment record that does not have a core contract in the
Contract Cube will also be retained in the Input Cube with Rejected
status of Yes.
The Ariba records with HOLD or Blank in the action status just remain in
the Input Cube until the status is selected as PROCESS
The Manual records with PROCESS action are copied to the Contract
Cube and retained in the Input Cube as well.
If there no Core in the Contract Cube and an amendment is inserted in
the Input Cube, the Rejected flag is updated to Yes and the record is not
copied to the Contract Cube
If there is an Incorrect PO to the Amendment (different to that of the
Core in the Contract Cube) then the status would be Rejected.
If there is a Core Contract with PO number in the Input Cube but No PO
associated in the Contract Cube, the new record is updated in the
Contract Cube deleting the existing Core Contract from the Contract
Cube

4 CONTRACT CUBE - Application / System Software
Design Specification
Source – Input Cube and SAP Staging Cube
Interface – TM1 Web

4.1 Dimensions
The following are the dimensions present in the Contract Cube
1.
2.
3.
4.
5.
6.

TA
Type
TM1 ContractID
Compound
Project
Measure_Contract

4.1.1 TA
TA dimension is a manually created dimension that has the set of
following static values.
DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 22 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

1. CVM
2. ED
3. HE&OR
4. IID
5. M&S
6. MP
7. NONE
8. NSO
9. RESP
10.SP&A
11.TS
12.ONCO
4.1.2 Type
Type dimension is a manually created dimension that has the set of
following static values.
1.
2.
3.
4.
5.

CRO
IVRS
LAB
HEOR
Post-Poc

4.1.3 Compound
Process : To_Create_Compound_Project_Dim
 Compound is a dynamically generated dimension that is created
by using the TI process.
 This Process uses the data values in the Input Cube from the
Compound Element in the Input_Measure dimension and converts
them into elements of the Compound Dimension.
4.1.4 Project
Process : To_Create_Compound_Project_Dim
 Project is a dynamically generated dimension that is created by
using the TI process.
 This Process uses the data values in the Input Cube from the
Project Element in the Input_Measure dimension and converts
them into elements of the Project Dimension.
4.1.5 TM1 ContractID

TM1 ContractID Dimension is a dynamically built dimension with the
values of SystemID as child and TM1 ContractID as parent.
The SystemID is the hidden dimension in Input Cube

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 23 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

TM1 ContractIDs are the values of the TM1 ContractID measure from the
Measure_Input of the Input Cube

Building the TM1 ContractID Hierarchy
Process: To_Create_TM1ContractID_ Dim
This process is a parameter driven process and is triggered by clicking the
SUBMIT button in the Input Template. Depending on the template that is
submitted, this process is triggered with the parameter value as Oncology
or NonOncology.

Dimension order is important as all further calculations are based on
the index of each of the elements of the TM1 ContractID Dimension.

Since the TM1 ContractID data values are converted to Consolidation
elements with SystemID as children, a looping procedure as
mentioned below is written to capture the data and build the
elements with hierarchy.

Records that have Delete as the Action will have the respective
system ids deleted from SystemID and TM1 ContractID dimensions.
The records would not exist in both the cubes.

a) Ariba Records that have Process as the Action will be deleted from
the INPUT CUBE once processed to the CONTRACT CUBE
b) Manual Records that have Process as the Action will be just
processed to the CONTRACT CUBE

The following code is written in the Prolog to build the TM1 Contract ID
Hierarchy.
Prolog tab of To_Create_TM1ContractID_ Dim
DimensionSortOrder ('TM1 ContractID', 'ByInput','', 'ByHierarchy','');
## Building the TM1 ContractID Dim with hierarchy getting the SystemID
from Elements and TM1 ContractID from Data values##
v_index = 1;
v_dimcount = DIMSIZ('SystemId');
while (v_index <= v_dimcount);
v_syselement = dimnm('SystemId',v_index);
v_TM1_Contract_Id = cellgets('INPUT CUBE', v_syselement , pTA, 'TM1
Contract ID');
DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 24 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

v_PO=cellgets('INPUT CUBE', v_syselement , pTA, 'Purchase Order
Number');
v_Rejected= cellgets('INPUT CUBE',v_syselement , pTA, 'Rejected');
v_Action= cellgets('INPUT CUBE',v_syselement , pTA, 'Action');
v_TA= cellgets('INPUT CUBE',v_syselement , pTA, 'TA');
v_source= cellgets('INPUT CUBE',v_syselement , pTA, 'Source');
v_TherapeuticArea= cellgets('INPUT CUBE',v_syselement , pTA,
'Therapeutic Area');
v_Type = cellgets('INPUT CUBE', v_syselement , pTA, 'Type');
v_Compound= cellgets('INPUT CUBE', v_syselement , pTA, 'Compound');
v_Project= cellgets('INPUT CUBE', v_syselement , pTA,'Project');
v_Contract_Type=cellgets('INPUT CUBE', v_syselement , pTA,'Contract
Type');
## Deletes the SystemID from the dimension if Action is DELETE ###
if (v_Action@='Delete' & v_TA@=pTA & v_source@='Manual');
if((DIMIX('TM1 Contract ID',v_syselement) > 0 & v_Rejected@<>'Yes') %
DIMIX('TM1 Contract ID',v_syselement) = 0 );
dimensionelementdelete('SystemId',v_syselement);
endif;
v_dimcount = DIMSIZ('SystemId');
v_index =v_index -1;
if (DIMIX('TM1 Contract ID',v_syselement) > 0 & v_Rejected@<>'Yes');
v_TM1_Contract_ID_Contract_Cube=cellgets('CONTRACT
CUBE',v_Compound,v_Type,v_Project,v_TherapeuticArea,v_syselement,'TM1
Contract ID');
##asciioutput('\\Phusehs9669\tm1\AccrualAutomation\inbound\hi.txt',v_Compound,v_Type,v_Projec
t,v_TherapeuticArea);
ExecuteProcess
('To_Load_Archive_Cube','p_contractid',v_TM1_Contract_ID_Contract_Cube,'
pTA',pTA,'v_Compound',v_Compound,'v_Type',v_Type,'v_Project',v_
Project,'v_TherapeuticArea',v_TherapeuticArea);
dimensionelementdelete('TM1 Contract ID',v_syselement);
endif;
endif;

## Processes the records that have the Action as PROCESS###
DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 25 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

if (v_Rejected @<> 'YES' & v_TA@=pTA & v_Action @= 'Process');
## The values captured below are used to move the core contract to a
new PO ##
##if the contract has been approved and now comes with a PO which was
null before ##
v_TM1_Contract_ID_Contract_Cube='Not Found';
if(dimix('TM1 ContractID',v_syselement)>0);
v_TM1_Contract_ID_Contract_Cube=cellgets('CONTRACT
CUBE',v_Compound,v_Type,v_Project,v_TherapeuticArea,v_syselement,'TM1
Contract ID');
v_TM1_PO_Contract_Cube=cellgets('CONTRACT
CUBE',v_Compound,v_Type,v_Project,v_TherapeuticArea,v_syselement,'Purc
hase Order Number');
v_records=elcompn('TM1 ContractID',v_TM1_Contract_ID_Contract_Cube);
endif;
dimensionelementinsert('TM1 ContractID','',v_syselement,'n');
dimensionelementinsert('TM1 ContractID','',v_TM1_Contract_Id,'c');
DimensionElementComponentAdd('TM1 ContractID',
v_TM1_Contract_Id,v_syselement,1);
## Code to move the contract to new PO if the contract has been
approved and now comes with a PO which was null before##
if(v_Contract_Type@='Core' & v_TM1_PO_Contract_Cube@='' &
v_PO@<>'');
index2=1;
while(index2<=v_records);
v_old_syselement=elcomp('TM1
ContractID',v_TM1_Contract_ID_Contract_Cube,index2);
DimensionElementComponentAdd('TM1 ContractID',
v_TM1_Contract_Id,v_old_syselement,1);
index2=index2+1;
end;
index2=1;
while(index2<=v_records);
v_old_syselement=elcomp('TM1
ContractID',v_TM1_Contract_ID_Contract_Cube,index2);
DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 26 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

CellputS(v_PO ,'CONTRACT CUBE', v_Compound , v_Type , v_Project,
v_TherapeuticArea ,v_old_syselement ,'Purchase Order Number');
DimensionElementComponentDelete('TM1 ContractID',
v_TM1_Contract_ID_Contract_Cube,v_old_syselement);
v_records=elcompn('TM1 ContractID',v_TM1_Contract_ID_Contract_Cube);
end;
if (dimix('TM1 ContractID',v_TM1_Contract_ID_Contract_Cube)>0);
dimensionelementdelete('TM1 Contract
ID',v_TM1_Contract_ID_Contract_Cube);
endif;
endif;
## END OF Code to move the contract to new PO if the contract has been
approved and now comes with a PO which was null before##
endif;
v_index=v_index+1;
end;
The TM1 ContractID is generated once this process is executed until this code.
The following code is written under Epilog to Trigger processes to create the
Compound and Project dimensions, Load the Contract cube and then Delete
the Processed Ariba records from Input Cube.
Epilog tab of To_Create_TM1ContractID_ Dim
## Run the Process to create the Compound and Project Dimension##
ExecuteProcess ('To_Create_Compound_Project_Dim');
## Loads the Contract Cube based on the parameter pTA ##
ExecuteProcess ('To_Load_CONTRACT_CUBE_from_INPUT_CUBE','pTA',pTA’);
## Deletes the Processed Ariba records from Input Cube##
ExecuteProcess ('To_Delete_Processed_Records_from_INPUT_CUBE');

Process: To_Load_CONTRACT_CUBE_from_INPUT_CUBE
This process is explained under the data loading process.
DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 27 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

Process: To_Delete_Processed_Records_from_INPUT_CUBE

The process deletes the processed ARIBA records from the Input Cube.

The process is run AFTER excuting the process
-To_Load_CONTRACT_CUBE_from_INPUT_CUBE so that the elements
could be deleted only after the data is loaded to the CONTRACT CUBE

4.1.6 Measure_Contract

4.1.6.1 Measure Elements
The following fields are taken as the measure elements for the Contract Cube.
The Rules and logic implemented are detailed in the table given below.
A few hidden fields are created to attain the logic and calculations. The
explanation and rules for these hidden elements are mentioned in the next
table.
S
N
o
1
2
3
4
5
6
7
8
9
1
0
1
1
1
2
1
3
1

Contract Cube Measures

Comments

Purchase Order Number
Old PO#
Requisition Number
Compound
Project
Study
WBS
Contract Type
Cost Center
Ariba GL Account

Loaded
Loaded
Loaded
Loaded
Loaded
Loaded
Loaded
Loaded
Loaded
Loaded

Vendor Name

Loaded from the Input Cube

Vendor Id

Loaded from the Input Cube

Contract Start Date

Loaded from the Input Cube

Contract End Date

Loaded from the Input Cube

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

from
from
from
from
from
from
from
from
from
from

the
the
the
the
the
the
the
the
the
the

Page: 28 / 81

Input
Input
Input
Input
Input
Input
Input
Input
Input
Input

Cube
Cube
Cube
Cube
Cube
Cube
Cube
Cube
Cube
Cube

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

4
1
5
1
6
1
7
1
8
1
9
2
0

Amendment Start Date

Loaded from the Input Cube

Amendment End Date

Loaded from the Input Cube

Amendment Number

Loaded from the Input Cube

Contract Amount

Loaded from the Input Cube

Amendment Amount

Loaded from the Input Cube

Cost/Month

Cost/Month is calculated by Total Contract Value/Contract
Months of the Record.
Total Contract value (defined later) is the sum of the
Contract Amount at the start of the Contract and Carry
Forward Amount from the previous contract if exists.
Contract months is the total duration of the contract defined
at the start of the contract
The following rule is applied
['Cost/Month']=N:IF(DB('CONTRACT CUBE',!Compound,!
Type,!Project,!TA,!TM1 ContractID,'Contract Type')@<>'',
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Total Contract value')/DB('CONTRACT CUBE',!
Compound,!Type,!Project,!TA,!TM1 ContractID,'Contract
Months'),CONTINUE);

2
1

Carry Forward Amount

Carry Forward Amount is defined as the remaining amount
that is carried to the next amendment.
If the Amendment starts in a future date, Carry Forward
Amount = 0
Remaining Amount is the Intermediate field that is used in
the Calculation of Carry Forward Amount. Remaining
Amount is the amount that is remaining at that time.
['Carry Forward Amount']=N:IF(
DAYNO(TODAY(1))<DAYNO(DB('CONTRACT CUBE',!
Compound,!Type,!Project,!TA,!TM1
ContractID,'AmendmentStartDateYYYY-MM-DD')),0,
IF(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@='Amendment' ,
DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,DIMNM('TM1 ContractID',(DIMIX('TM1 ContractID',!TM1
ContractID))-1),'Remaining Amount'),0)); C:0;

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 29 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

2
2

Total Contract value

Total Contract Value is the sum of the Contract Amount and
the Carry Forward Amount.
If Carry Forward Legacy exists then Contract Amount +
Carry Forward Legacy else Contract Amount + Carry
Forward Amount
The complexity here is to check
1) if the record is at leaf level and the contract type of
the record is Core/adjustment and next record is
amendment, apply the calculation
2) if the record is at leaf level and the contract type of
the record is amendment and next record is
amendment, apply the calculation
3) else ignore

2
3

Net Contract Amount

['Total Contract value']=N:IF(DB('CONTRACT CUBE',!
Compound,!Type,!Project,!TA,!TM1 ContractID,'Contract
Type')@<>'' & ISLEAF=1,
IF(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'CarryForward Legacy')<>0,
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Amendment Amount')+
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'CarryForward Legacy'),
IF(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@='Amendment' ,
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Carry Forward Amount')+
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Amendment Amount'),
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Amount')))
,CONTINUE); C:0;
Net Contract Amount is the total Contract Amount that is
actually being spent on the Contract considering the
amendments.
['Net Contract Amount']=N:IF(DB('CONTRACT CUBE',!
Compound,!Type,!Project,!TA,!TM1 ContractID,'Contract
Type')@<>'' ,
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Cost/Month') * DB('CONTRACT CUBE',!
Compound,!Type,!Project,!TA,!TM1 ContractID,'Actual
Months'), 0);

2
4

Type

Loaded from the Input Cube
DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 30 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

2
5
2
6
2
7
2
8
2
9
3
0
3
1

Functions/Services

Loaded from the Input Cube

TA/Medical Contact

Loaded from the Input Cube

Contract Manager

Loaded from the Input Cube

Therapeutic Area

Loaded from the Input Cube

Ariba Status

Loaded from the Input Cu

Source

Loaded from the Input Cube

Status

The Status displays the following values
 Active – If there below three fields are empty
 Inactive – if there is a date value in Inactivated
Month/Year
 Suspended – If there is a date value in Suspended
Month/Year
 Withdrawn – if there is a date value in Withdrawn
Month/Year

3
2
3
3
3
4

InactivatedMonth/Year

User input field in the format MM/YY

SuspendedMonth/year

User input field in the format MM/YY

Contract Months

Contract Months is the duration of the contract as per initial
entry into the system irrespective of the amendment start
and end dates.
Two intermediate fields are created
StartDate_ContractMonths and
EndDate_ContractMonths_Calc to convert the MM/DD/YYYY
format to TM1 date format YYYY-MM-DD. The conversion
follows the 15 day rule.
['Contract Months']=N:IF(DB('CONTRACT CUBE',!Compound,!
Type,!Project,!TA,!TM1
ContractID,'StartDate_ContractMonths')@<>'',
ROUND((DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1
ContractID,'EndDate_ContractMonths_Calc'))DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')))/30),
CONTINUE);

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 31 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

3
5

3
6

Elapsed Months

Actual Months

Elapsed Months is the total number of elapsed for each
record.
1) If Today’s date is greater than Contract Start Date and
Contract End Date then End Date – Start Date
2) If today’s date is less than End Date then Current
month – Start Date
3) If Today’s date is less than Start Date, then no
calculation.
['Elapsed Months']=N:
IF(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@<>'',
IF(DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')) <
DAYNO(TODAY(1)) &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'EndDate_ContractMonths')) >
DAYNO(TODAY(1)) ,
ROUND((DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1
ContractID,'EndDate_ElapsedMonths_Today'))
-DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')))/30),
IF(DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')) <
DAYNO(TODAY(1)) &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'EndDate_ContractMonths')) <
DAYNO(TODAY(1)),
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Actual Months'),CONTINUE)),
CONTINUE);
Actual Months is the actual number of months a contract is
actually Active based on amendments.
Actual Months can be calculated by subtracting the
intermediate field ContractMonths_CF from Contract Months
['Actual Months']=N:IF(DB('CONTRACT CUBE',!Compound,!
Type,!Project,!TA,!TM1 ContractID,'Contract Type')@<>'' &
ISLEAF=1,
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Months')-DB('CONTRACT CUBE',!
Compound,!Type,!Project,!TA,!TM1 ContractID,'Contract
Months_CF'), CONTINUE);

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 32 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

3
7

Cumulative Months

Cumulative Months is the actual number of months a
contract is Active till date based on amendments and
status.


The rule checks for the least value among Today,
Inactivated Date, Contract End date and subtracts
Contract Start date from it.
If Today is lesser than Contract Start Date then it is
ignored.
if Temp Status = NO, i.e., if contract doesn't have
negative amendment, calculate cumulative months.
Else for negative amendment, if Least Date Status =
YES then calculate cumulative months, else 0

EndDate_ElapsedMonths_Today is an intermediate field to
apply 15 day rule to the current day.
['Cumulative Months']=N:IF(DB('CONTRACT CUBE',!
Compound,!Type,!Project,!TA,!TM1 ContractID,'Contract
Type')@<>'' ,
IF(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Temp Status')@='No',
IF((DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Inactivated Date')@<>'' &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'Inactivated Date')) <
DAYNO(TODAY(1))) &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')) <
DAYNO(TODAY(1)) &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'EndDate_ContractMonths')) >
DAYNO(TODAY(1)),
ROUND((DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'Inactivated Date'))
-DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')))\30.42),
IF((DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Suspended Date')@<>'' &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'Suspended Date')) < DAYNO(TODAY(1)))
&
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')) <
DAYNO(TODAY(1)) &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'EndDate_ContractMonths')) >
DAYNO(TODAY(1)),
DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 33 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

ROUND((DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'Suspended Date'))
-DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')))\30.42),
IF(DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')) <
DAYNO(TODAY(1)) &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'EndDate_ContractMonths')) >
DAYNO(TODAY(1)),
ROUND((DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1
ContractID,'EndDate_ElapsedMonths_Today'))
-DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')))\30.42),
IF(DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')) <
DAYNO(TODAY(1)) &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'EndDate_ContractMonths')) <
DAYNO(TODAY(1)),
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Actual Months'),CONTINUE)))),
IF(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Least Date Status')@='Yes',
IF((DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Inactivated Date')@<>'' &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'Inactivated Date')) <
DAYNO(TODAY(1))) &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')) <
DAYNO(TODAY(1)) &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'EndDate_ContractMonths')) >
DAYNO(TODAY(1)),
ROUND((DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'Inactivated Date'))
-DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')))\30.42),
IF((DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Suspended Date')@<>'' &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'Suspended Date')) < DAYNO(TODAY(1)))
&
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')) <
DAYNO(TODAY(1)) &
DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 34 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

3
8

Past Commitment (before 2
years)

DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'EndDate_ContractMonths')) >
DAYNO(TODAY(1)),
ROUND((DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'Suspended Date'))
-DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')))\30.42),
IF(DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')) <
DAYNO(TODAY(1)) &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'EndDate_ContractMonths')) >
DAYNO(TODAY(1)),
ROUND((DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1
ContractID,'EndDate_ElapsedMonths_Today'))
-DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')))\30.42),
IF(DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')) <
DAYNO(TODAY(1)) &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'EndDate_ContractMonths')) <
DAYNO(TODAY(1)),
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Actual Months'),CONTINUE)))),0)),CONTINUE);
Past Commitment (before 2 years) value is the sum of all the
core/amendment contracts under a contractid prior to 2
years.
Cost/month * no of active months in the years


If start date < = today’s year -3 and end date <=
today’s year - 3 then active months is end date – start
date
If start date <= today’s year -3 and end date >
today’s year - 3 then active months is End of the
year – start date
If Cumulative Months = 0, then the value is 0

['Past Commitment (before 2 years)']=N:IF(DB('CONTRACT
CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Cumulative Months')=0, 0,
IF(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'Least End Date'))<=YEAR(TODAY(1))-3
&
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date')) >=
DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 35 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

3
9

Past Commitment Prev Year -1

YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'StartDate_ContractMonths')),
ROUND((DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'Least End Date'))DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')))\30.42),
IF(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'Least End Date'))>YEAR(TODAY(1))-3 &
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1
ContractID,'StartDate_ContractMonths'))<=YEAR(TODAY(1))3&
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date')) >
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'StartDate_ContractMonths')),
ROUND((DAYNO(DATES(YEAR(TODAY(1))-3, 12,31))DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')))/30.42),0))
*
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Cost/Month'));
Past Commitment Prev Year -1 value is the sum of all the
core/amendment contracts under a contractid prior to prev
year. Cost/month * no of active months in the year




If start date year < today’s year-2 and end date year
= today’s year – 2 then end date – beginning of the
year
If start date year = today’s year -2 and End date year
= today’s year - 2 then end date – start date
If start date year < today’s year - 2 and End date year
> today’s year -2 then 12 months
If start date year = today’s year – 2 and End date
year > today’s year -2 then End of the year – start
date
If Cumulative Months = 0, then the value is 0

['Past Commitment Prev Year-1']=N:IF(DB('CONTRACT
CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Cumulative Months')=0, 0,
IF(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1
ContractID,'StartDate_ContractMonths'))<YEAR(TODAY(1))-2
&
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date'))>YEAR(TODAY(1))-2 &
DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 36 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date')) >
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'StartDate_ContractMonths')),
12,IF(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1
ContractID,'StartDate_ContractMonths'))=YEAR(TODAY(1))-2
&
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date'))>YEAR(TODAY(1))-2 &
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date')) >
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'StartDate_ContractMonths')),
ROUND((DAYNO(DATES(YEAR(TODAY(1))-2,12,31))DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')))\30.42),
IF(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1
ContractID,'StartDate_ContractMonths'))=YEAR(TODAY(1))-2
&
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date'))=YEAR(TODAY(1))-2 &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'Least End Date')) >
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')),
ROUND((DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'Least End Date'))DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')))\30.42),
IF(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1
ContractID,'StartDate_ContractMonths'))<YEAR(TODAY(1))-2
&
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date'))=YEAR(TODAY(1))-2 &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'Least End Date')) >
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')),
ROUND((DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'Least End Date'))DAYNO(DATES(YEAR(TODAY(1))-2,01,01)))\30.42), 0)))) *
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Cost/Month'));

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 37 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

4
0

Past Commitment Prev Year

Past Commitment Prev Year value is the sum of all the
core/amendment contracts under a ContractId the prev year.
Cost/month * no of active months in the year




If start date year < today’s year-1 and end date year
= today’s year – 1 then end date – beginning of the
year
If start date year = today’s year -1 and End date year
= today’s year - 1 then end date – start date
If start date year < today’s year - 1 and End date year
> today’s year -1 then 12 months
If start date year = today’s year - 1and End date year
> today’s year -1 then End of the year – start date
If Cumulative Months = 0, then the value is 0

['Past Commitment Prev Year']=N:IF(DB('CONTRACT CUBE',!
Compound,!Type,!Project,!TA,!TM1 ContractID,'Cumulative
Months')=0, 0,
IF(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1
ContractID,'StartDate_ContractMonths'))<YEAR(TODAY(1))-1
&
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date'))>YEAR(TODAY(1))-1 &
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date')) >
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'StartDate_ContractMonths')),
12,IF(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1
ContractID,'StartDate_ContractMonths'))=YEAR(TODAY(1))-1
&
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date'))>YEAR(TODAY(1))-1 &
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date')) >
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'StartDate_ContractMonths')),
ROUND((DAYNO(DATES(YEAR(TODAY(1))-1,12,31))DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')))\30.42),
IF(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1
ContractID,'StartDate_ContractMonths'))=YEAR(TODAY(1))-1
&
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 38 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

TM1 ContractID,'Least End Date'))=YEAR(TODAY(1))-1 &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'Least End Date')) >
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')),
ROUND((DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'Least End Date'))DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')))\30.42),
IF(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1
ContractID,'StartDate_ContractMonths'))<YEAR(TODAY(1))-1
&
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date'))=YEAR(TODAY(1))-1 &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'Least End Date')) >
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')),
ROUND((DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'Least End Date'))DAYNO(DATES(YEAR(TODAY(1))-1,01,01)))\30.42), 0)))) *
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Cost/Month'));
4
1

Current Commitment

Current Commitment is the sum of all the core/amendment
contracts under a ContractId the year.
Cost/month * no of active months in the year




If start date year < today’s year and end date
today’s year then today – start date
If start date year = today’s year and End date
today’s year then end date – start date
If start date year < today’s year and End date
today’s year then 12 months
If start date year = today’s year and End date
today’s year then End of the year – start date
If Cumulative Months = 0, then the value is 0

year =
year =
year >
year >

['Current Commitment']=N:IF(DB('CONTRACT CUBE',!
Compound,!Type,!Project,!TA,!TM1 ContractID,'Cumulative
Months')=0 &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1
ContractID,'StartDate_ContractMonths'))<DAYNO(TODAY(1))
, 0,
DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 39 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

IF(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1
ContractID,'StartDate_ContractMonths'))<YEAR(TODAY(1)) &
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date'))>YEAR(TODAY(1)) &
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date')) >
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'StartDate_ContractMonths')),
12,IF(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1
ContractID,'StartDate_ContractMonths'))=YEAR(TODAY(1)) &
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date'))>YEAR(TODAY(1)) &
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date')) >
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'StartDate_ContractMonths')),
ROUND((DAYNO(DATES(YEAR(TODAY(1)),12,31))DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')))\30.42),
IF(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1
ContractID,'StartDate_ContractMonths'))=YEAR(TODAY(1)) &
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date'))=YEAR(TODAY(1)) &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'Least End Date')) >
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')),
ROUND((DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'Least End Date'))DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')))\30.42),
IF(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1
ContractID,'StartDate_ContractMonths'))<YEAR(TODAY(1)) &
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date'))=YEAR(TODAY(1)) &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'Least End Date')) >
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')),
ROUND((DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'Least End Date'))DAYNO(DATES(YEAR(TODAY(1)),01,01)))\30.42), 0)))) *
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Cost/Month'));
DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 40 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

4
2

Future Commitment Next year

Future Commitment next year is the calculation of all the
commitments for the contract next year.
Cost/month * no of active months in the years




If start date year < today’s year +1 and end date
year > today’s year + 1 then contract months is 12
If start date year = today’s year +1 and End date
year > today’s year +1 then end of the year – start
date
If start date year = today’s year +1 and End date
year = today’s year +1 then End date – start date
If start date year < today’s year +1 and End date
year = today’s year +1 then End date – beginning of
the year
If Cumulative Months = 0, then the value is 0

['Future Commitment Next year']=N:IF(DB('CONTRACT
CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Cumulative Months')=0 &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1
ContractID,'StartDate_ContractMonths'))<DAYNO(TODAY(1))
, 0,
IF(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1
ContractID,'StartDate_ContractMonths'))<YEAR(TODAY(1))
+1 &
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date'))>YEAR(TODAY(1))+1 &
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date')) >
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'StartDate_ContractMonths')),12,
IF(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1
ContractID,'StartDate_ContractMonths'))=YEAR(TODAY(1))
+1 &
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date'))>YEAR(TODAY(1))+1 &
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date')) >
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'StartDate_ContractMonths')),
ROUND((DAYNO(DATES(YEAR(TODAY(1))+1,12,31))DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')))\30.42),
DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 41 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

4
3

Future Commitment Next year +
1

IF(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1
ContractID,'StartDate_ContractMonths'))=YEAR(TODAY(1))
+1 &
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date'))=YEAR(TODAY(1))+1 &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'Least End Date')) >
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')),
ROUND((DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'Least End Date'))DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')))\30.42),
IF(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1
ContractID,'StartDate_ContractMonths'))<YEAR(TODAY(1))
+1 &
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date'))=YEAR(TODAY(1))+1 &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'Least End Date')) >
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')),
ROUND((DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'Least End Date'))DAYNO(DATES(YEAR(TODAY(1))+1,01,01)))\30.42), 0)))) *
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Cost/Month'));
Future Commitment next year + 1 is the calculation of all
the commitments for the contract next year + 1.
Cost/month * no of active months in the years




If start date year < today’s year +2 and end date >
today’s year + 2 then contract months is 12
If start date year = today’s year +2 and End date
year > today’s year +2 then end of the year – start
date
If start date year = today’s year +2 and End date
year = today’s year +2 then End date – start date
If start date year < today’s year +2 and End date
year = today’s year +2 then End date – beginning of
the year
If Cumulative Months = 0, then the value is 0

['Future Commitment Next year + 1']=N:IF(DB('CONTRACT
DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 42 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Cumulative Months')=0 &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1
ContractID,'StartDate_ContractMonths'))<DAYNO(TODAY(1))
, 0,
IF(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1
ContractID,'StartDate_ContractMonths'))<YEAR(TODAY(1))
+2 &
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date'))>YEAR(TODAY(1))+2 &
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date')) >
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'StartDate_ContractMonths')),12,
IF(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1
ContractID,'StartDate_ContractMonths'))=YEAR(TODAY(1))
+2 &
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date'))>YEAR(TODAY(1))+2 &
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date')) >
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'StartDate_ContractMonths')),
ROUND((DAYNO(DATES(YEAR(TODAY(1))+2,12,31))DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')))\30.42),
IF(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1
ContractID,'StartDate_ContractMonths'))=YEAR(TODAY(1))
+2 &
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date'))=YEAR(TODAY(1))+2 &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'Least End Date')) >
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')),
ROUND((DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'Least End Date'))DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')))\30.42),
IF(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1
ContractID,'StartDate_ContractMonths'))<YEAR(TODAY(1))
+2 &
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 43 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

TM1 ContractID,'Least End Date'))=YEAR(TODAY(1))+2 &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'Least End Date')) >
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')),
ROUND((DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'Least End Date'))DAYNO(DATES(YEAR(TODAY(1))+2,01,01)))\30.42),0)))) *
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Cost/Month'));

4
4

Future Commitments (beyond 2
years)

Future Commitments is the calculation of all the
commitments of the contract beyond 2 years.
Cost/month * no of active months in the years


If start date < today’s year +3 and end date >=
today’s year + 3 then active months is end date –
beginning of the year
If start date >= today’s year +3 then active months
is End date – start date
If Cumulative Months = 0, then the value is 0

['Future Commitment (beyond 2
years)']=N:IF(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'Cumulative Months')=0 &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1
ContractID,'StartDate_ContractMonths'))<DAYNO(TODAY(1)),
0,
IF(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1
ContractID,'StartDate_ContractMonths'))>=YEAR(TODAY(1))
+3 &
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date')) >=
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'StartDate_ContractMonths')),
ROUND((DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'Least End Date'))DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 44 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'StartDate_ContractMonths')))\30.42),
IF(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1
ContractID,'StartDate_ContractMonths'))<YEAR(TODAY(1))
+3 &
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date')) >= YEAR(TODAY(1))+3 &
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least End Date')) >
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'StartDate_ContractMonths')),
ROUND((DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'Least End Date'))DAYNO(DATES(YEAR(TODAY(1))+3,01,01)))\30.42), 0)) *
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Cost/Month'));
4
5

4
6

Total Commitment

Commitment validation

Total Commitment is the sum of all the past, current and
future commitments.
['Total Commitment']=N:DB('CONTRACT CUBE',!Compound,!
Type,!Project,!TA,!TM1 ContractID,'Past Commitment (before
2 years)')+
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Past Commitment Prev Year-1')+
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Past Commitment Prev Year')+
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Current Commitment')+
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Future Commitment Next year')+
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Future Commitment Next year + 1')+
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Future Commitments');
Commitment validation is Valid if Total Contract Value is
equal to the Total Contract value, else Not Valid
Value at Consolidated level
ContractAmount_Actual is the intermediate field that gives
the amount that is actually being spent on the Contract at
the Consolidated level
['Commitment validation']=S: IF(DB('CONTRACT CUBE',!
Compound,!Type,!Project,!TA,!TM1
ContractID,'TempStatus')@<>'',

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 45 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

4
7

4
8

Cumulative months validation

Current Period Cumulative WIP

IF(ISLEAF=0,
IF((DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Total Commitment')DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'ContractAmount_Actual'))=0,'Valid','NotValid'),'')
,
CONTINUE);
Validates if the Cumulative months is less than Actual
months
Valid if less else Not valid
Value at Consolidated Level
['Cumulative months validation']=S:IF(ISLEAF=1,
IF(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'TempStatus')@<>'',
IF(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Cumulative Months') >
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Actual Months'), 'Not Valid', 'Valid'),CONTINUE),
DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,ELCOMP('TM1 ContractID',!TM1
ContractID,ELCOMPN('TM1 ContractID',!TM1
ContractID)),'Cumulative months validation'));
Current Period Cumulative WIP is the product of Cumulative
Months and Cost/month
Value is rolled upto the Consolidated Level

4
9

Prior Period Cumulative WIP

['Current Period Cumulative WIP']=N:DB('CONTRACT CUBE',!
Compound,!Type,!Project,!TA,!TM1 ContractID,'Cumulative
Months')*
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Cost/Month');
Prior Period Cumulative WIP is the last month’s Current
Period Cumulative WIP
The process To_Load_ContractCubePastData_Monthly runs at
the end of every month and loads the cube
Contract_Cube_PastData_Monthly.
Prior Period Cumulative WIP = Past data Monthly cube
Current Period Cumulative WIP
['Prior Period Cumulative WIP']=
C:DB('Contract_Cube_PastData_Monthly',!Compound,!Type,!
Project, !TA,!TM1ContractID,'Current Period Cumulative
WIP');

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 46 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

5
0

5
1

Current Month WIP

Prior Year-Year End Accrual

Current Month WIP is the calculated by subtracting Prior
Period Cumulative WIP from Current period Cumulative WIP
['Current Month WIP']=C:DB('CONTRACT CUBE',!Compound,!
Type,!Project,!TA,!TM1 ContractID,'Current Period
Cumulative WIP')DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Prior Period Cumulative WIP');
Prior Year-Year End Accrual is the amount that was accrued
at the end of the previous year.
In order to capture and retain the value which was at the
end of the year, the lookup cube
Contract_Cube_PastData_Yearly is loaded on a yearly basis
through the process To_Load_ContractCubePastData_Yearly
Prior Year-Year End Accrual = LTD Accrual Current Period of
the Contract_Cube_PastData_Yearly
Rule:
['Prior Year-Year End Accrual']=
C:DB('Contract_Cube_PastData_Yearly',!Compound,!Type, !
Project,!TA,!TM1ContractID,'LTD Accrual Current Period');

5
2

Current Year Cash Paid

Current Year Cash Paid is the Cash paid in the Current Year.
This data is loaded directly from SAP Staging cube.
Data from the Lookup Cube
Contract_Cube_PastData_Monthly is used in case of
Inactivation as Cash Paid should not be considered for
Inactivated records
To get the inactivation date, the hidden field
Inactivated_DATE is used
The rule checks
 If the Inactivated Year = Today’s Year & Inactivated
Month < Today’s Month then Current Year Cash paid =
Lookup Cube’s Current year Cash Paid.
 If the Inactivated Year < Today’s Year, then Zero
 If ACTIVE, then Current Year Cash Paid from SAP
Staging Cube
['Current Year Cash Paid']= IF(DB('CONTRACT CUBE',!
Compound,!Type,!Project,!TA,!TM1 ContractID,'Status')@=
'Inactive' &
(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 47 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

5
3

Past Year (beyond 2 years) Cash
Paid

TM1 ContractID,'Inactivated_DATE'))=YEAR(TODAY(1)) &
MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1
ContractID,'Inactivated_DATE'))<MONTH(TODAY(1))),
DB('Contract_Cube_PastData_Monthly',!Compound,!Type,!
Project,!TA,!TM1ContractID,'Current Year Cash Paid'),
IF(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Status')@='Inactive' &
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Inactivated_DATE'))<YEAR(TODAY(1)),0,
DB('SAP STAGING CUBE',DIMNM('TM1 Contract ID',
DIMIX('TM1 Contract ID', !TM1 ContractID)),'Current Year
Cash Paid')));
Past Year(beyond 2 years) Cash Paid is the amount of Cash
Paid in the all the years Prior to 2 years. This data is loaded
directly from SAP Staging cube.
Data from the Lookup Cube
Contract_Cube_PastData_Monthly is used in case of
Inactivation as Cash Paid should not be considered for
Inactivated records
To get the inactivation date, the hidden field
Inactivated_DATE is used
The rule checks
 If the Inactivated Year = Today’s Year & Inactivated
Month < Today’s Month then value = Lookup Cube’s
Past Year (beyond 2 years) Cash Paid
 If the Inactivated Year < Today’s Year, then Lookup
Cube’s Prior Year Cash-1 Paid + Past Year (beyond 2
years) Cash Paid
 If ACTIVE, then Past Year (Beyond 2 years) Cash Paid
from SAP Staging Cube
['Past Year (beyond 2 years) Cash Paid']=IF(DB('CONTRACT
CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Status')@='Inactive' &
(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Inactivated_DATE'))=YEAR(TODAY(1)) &
MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1
ContractID,'Inactivated_DATE'))<MONTH(TODAY(1))),
DB('Contract_Cube_PastData_Monthly',!Compound,!Type,!
Project,!TA,!TM1ContractID,'Past Year (beyond 2 years) Cash
Paid'),
IF(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 48 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

5
4

Prior Year-1 Cash Paid

ContractID,'Status')@='Inactive' &
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Inactivated_DATE'))<YEAR(TODAY(1)),
DB('Contract_Cube_PastData_Monthly',!Compound,!Type,!
Project,!TA,!TM1ContractID,'Prior Year-1 Cash Paid')
+DB('Contract_Cube_PastData_Monthly',!Compound,!Type,!
Project,!TA,!TM1ContractID,'Past Year (beyond 2 years) Cash
Paid'),
DB('SAP STAGING CUBE',DIMNM('TM1 Contract ID',
DIMIX('TM1 Contract ID', !TM1 ContractID)),'Past Year
(beyond 2 years) Cash Paid')));
Prior Year-1 Cash Paid is the amount of Cash Paid in the
Previous Year -1. This data is loaded directly from SAP
Staging cube.
Data from the Lookup Cube
Contract_Cube_PastData_Monthly is used in case of
Inactivation as Cash Paid should not be considered for
Inactivated records
To get the inactivation date, the hidden field
Inactivated_DATE is used
The rule checks
 If the Inactivated Year = Today’s Year & Inactivated
Month < Today’s Month then value = Lookup Cube’s
Prior year-1 Cash Paid.
 If the Inactivated Year < Today’s Year, then Lookup
Cube’s Prior Year Cash Paid
 If ACTIVE, then Prior Year-1 Cash Paid from SAP
Staging Cube
['Prior Year-1 Cash Paid']=IF(DB('CONTRACT CUBE',!
Compound,!Type,!Project,!TA,!TM1
ContractID,'Status')@='Inactive' &
(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Inactivated_DATE'))=YEAR(TODAY(1)) &
MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1
ContractID,'Inactivated_DATE'))<MONTH(TODAY(1))),
DB('Contract_Cube_PastData_Monthly',!Compound,!Type,!
Project,!TA,!TM1ContractID,'Prior Year-1 Cash Paid'),
IF(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Status')@='Inactive' &
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Inactivated_DATE'))<YEAR(TODAY(1)),
DB('Contract_Cube_PastData_Monthly',!Compound,!Type,!
Project,!TA,!TM1ContractID,'Prior Year Cash Paid'),

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 49 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

DB('SAP STAGING CUBE',DIMNM('TM1 Contract ID',
DIMIX('TM1 Contract ID', !TM1 ContractID)),'Prior-1 Year
Cash Paid')));
5
5

Prior Year Cash Paid

Prior Year Cash Paid is the amount of Cash Paid in the
Previous Year.This data is loaded directly from SAP Staging
cube.
Data from the Lookup Cube
Contract_Cube_PastData_Monthly is used in case of
Inactivation as Cash Paid should not be considered for
Inactivated records
To get the inactivation date, the hidden field
Inactivated_DATE is used
The rule checks
 If the Inactivated Year = Today’s Year & Inactivated
Month < Today’s Month then Prior Year Cash paid =
Lookup Cube’s Prior year Cash Paid.
 If the Inactivated Year < Today’s Year, then Lookup
Cube’s Current Year Cash Paid
 If ACTIVE, then Prior Year Cash Paid from SAP Staging
Cube

5
6

Cash Paid Adjustment

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

['Prior Year Cash Paid']=IF(DB('CONTRACT CUBE',!
Compound,!Type,!Project,!TA,!TM1
ContractID,'Status')@='Inactive' &
(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Inactivated_DATE'))=YEAR(TODAY(1)) &
MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1
ContractID,'Inactivated_DATE'))<MONTH(TODAY(1))),
DB('Contract_Cube_PastData_Monthly',!Compound,!Type,!
Project,!TA,!TM1ContractID,'Prior Year Cash Paid'),
IF(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Status')@='Inactive' &
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Inactivated_DATE'))<YEAR(TODAY(1)),
DB('Contract_Cube_PastData_Monthly',!Compound,!Type,!
Project,!TA,!TM1ContractID,'Current Year Cash Paid'),
DB('SAP STAGING CUBE',DIMNM('TM1 Contract ID',
DIMIX('TM1 Contract ID', !TM1 ContractID)),'Prior Year Cash
Paid')));
User Input Numeric Field at the Core Contract Level
Value rolls upto the Contract Level
Page: 50 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

5
7

LTD Cash Paid End of Current
Period

LTD Cash Paid End of Current Period is the sum of all the
cash Paids until the end of this month.
The rule sums up Past Year (beyond 2 years) Cash Paid +
Prior Year -1 Cash Paid + Prior Year Cash Paid + Current Year
Cash Paid + Cash Paid Adjustment

5
8

LTD Cash Paid End of Prior Period

['LTD Cash Paid End of Current Period']=N:DB('CONTRACT
CUBE',!Compound,!Type,!Project,!TA,!TM1 ContractID,'Past
Year (beyond 2 years) Cash Paid')+
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Prior Year Cash Paid')+
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Prior Year-1 Cash Paid')+
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Current Year Cash Paid')+
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Cash Paid Adjustment');
LTD Cash Paid End of Prior Period is the total cash paid until
the previous month.
The calculates the subtraction of LTD Cash Paid End of
Current Period - Current Month Cash Paid

5
9

Current Month Cash Paid

['LTD Cash Paid End of Prior Period']=N:DB('CONTRACT
CUBE',!Compound,!Type,!Project,!TA,!TM1 ContractID,'LTD
Cash Paid End of Current Period')DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Current Month Cash Paid');
Current Month Cash Paid is directly pulled from the SAP
Staging Cube by comparing Today’s month with the SAP
month.
The rule checks
 If the Inactivated Year = Today’s Year & Inactivated
Month < Today’s Month then Current Month Cash paid
=0
 If the Inactivated Year < Today’s Year, then Current
Month Cash Paid = 0
 If ACTIVE, then Prior Year Cash Paid from SAP Staging
Cube
['Current Month Cash Paid']=IF(DB('CONTRACT CUBE',!
Compound,!Type,!Project,!TA,!TM1
ContractID,'Status')@='Inactive' &
((YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 51 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

6
0

6
1

LTD Accrual Current Period

LTD Accrual Prior Period

TA,!TM1 ContractID,'Inactivated_DATE'))=YEAR(TODAY(1)) &
MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1
ContractID,'Inactivated_DATE'))<MONTH(TODAY(1))) %
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Inactivated_DATE'))<YEAR(TODAY(1)) ), 0,
DB('SAP STAGING CUBE',DIMNM('TM1 Contract ID',
DIMIX('TM1 Contract ID', !TM1 ContractID)),'Current Month
Cash Paid'));
LTD Accrual Current Period is the difference between
'Current Period Cumulative WIP and Cash Paid End of
Current Period.
['LTD Accrual Current Period']=C:DB('CONTRACT CUBE',!
Compound,!Type,!Project,!TA,!TM1 ContractID,'Current
Period Cumulative WIP')DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'LTD Cash Paid End of Current Period');
LTD Accrual Prior Period is the Accrual Amount that was
accrued in the last month.
The process To_Load_ContractCubePastData_Monthly runs at
the end of every month and loads the cube
Contract_Cube_PastData_Monthly. LTC Accrual Prior period =
Past data Monthly cube LTD Accrual Current Period
Rule
['LTD Accrual Prior Period']=
C:DB('Contract_Cube_PastData_Monthly', !Compound,!Type,!
Project,!TA,!TM1ContractID,'LTD Accrual Current Period');

6
2

6
3

Current Month Accrual Variance

Accrual > $1MM or Accrual
<$(1)MM

Current Month Accrual Variance is the difference between
LTD Accrual Current Period and LTD Accrual Prior period
['Current Month Accrual Variance']=C:DB('CONTRACT
CUBE',!Compound,!Type,!Project,!TA,!TM1 ContractID,'LTD
Accrual Current Period')DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'LTD Accrual Prior Period')
Populates a value of YES if LTD Accrual Current Period is
greater than 1 MM $ else NO.
['Accrual > $1MM or Accrual <$(1)MM']=S:IF(ISLEAF=0,
IF(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'TempStatus')@<>'',
IF(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'LTD Accrual Current Period') > 1000000, 'Yes',
'No'), CONTINUE),'');

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 52 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

6
4

6
5

Balance To be Spent

Remaining Months On Contract

Balance to be Spent is the difference between
ContractAmount_Actual and LTD Cash Paid End of Current
Period
['Balance To be Spent']=N:0; C:DB('CONTRACT CUBE',!
Compound,!Type,!Project,!TA,!TM1
ContractID,'ContractAmount_Actual')DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'LTD Cash Paid End of Current Period');
Remaining Months On Contract is the difference between
Actual months and Cumulative Months
['Remaining Months On Contract']=C:DB('CONTRACT CUBE',!
Compound,!Type,!Project,!TA,!TM1 ContractID,'Actual
Months')DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Cumulative Months');

6
6

Accrual Months Past the End
Date

Accrual Months Past the End Date is the number of months
elapsed after the Contract has past the end date.
The rule checks if today is greater than contract end date
then month of today – contract end month
['Accrual Months Past the End Date']=N:
IF(
(((DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@='Core' % DB('CONTRACT
CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@='Adjustment' ) &
DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,DNEXT('TM1 ContractID',!TM1 ContractID),'Contract
Type')@='') %
(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@='Amendment' &
DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,DNEXT('TM1 ContractID',!TM1 ContractID),'Contract
Type')@='')) &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'EndDate_ContractMonths')) <
DAYNO(TODAY(1)),
ROUND((DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1
ContractID,'EndDate_ElapsedMonths_Today')) DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'EndDate_ContractMonths')))/30.42),0);

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 53 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

6
7

Life of Study Elapsed

Life of study elapsed is the percentage contract duration
completed.
The rule calculates the percentage by dividing the Elapsed
Months by Total Contract months in % format

6
8

6
9

7
0

7
1

Cumulative WIP/Contract Amount

LTD Cash/Contract Amount

Invoice GL_Account

Actual End Date

['Life of Study Elapsed']=N:0; C:(DB('CONTRACT CUBE',!
Compound,!Type,!Project,!TA,!TM1 ContractID,'Elapsed
Months')\
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Actual Months'));
Cumulative WIP/Contract amount is the percentage of
Cumulative WIP/Contract amount
['Cumulative WIP/Contract Amount']=N:0; C:(DB('CONTRACT
CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Current Period Cumulative WIP')\
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'ContractAmount_Actual'));
LTD Cash/Contract Amount is the percentage of LTD
Cash/Contract Amount
['LTD Cash/Contract Amount']=N:0; C:(DB('CONTRACT
CUBE',!Compound,!Type,!Project,!TA,!TM1 ContractID,'LTD
Cash Paid End of Current Period')\
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'ContractAmount_Actual'));
To Calculate the Invoice GL_Account, a lookup Cube
GL_Account_Lookup_Cube is used.
Ariba GL Account is Converted to the Invoice GL Account
using the rule
['Invoice GL_Account'] =
S:DB('GL_Account_Lookup_Cube',DB('CONTRACT CUBE',!
Compound,!Type,!Project,!TA,!TM1 ContractID,'Ariba GL
Account'),'Invoice GL Account');
Actual End Date of the Contract is defined at the Record
level based on the Start of the Next Amendment
EndDate_ContractMonths is the Intermediate field that is
used.
Rule to convert the format to User desired format
['Actual End Date']=S:IF(DB('CONTRACT CUBE',!Compound,!
Type,!Project,!TA,!TM1
ContractID,'EndDate_ContractMonths')@<>'',
SUBST(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'EndDate_ContractMonths'),6,2)|'/'|
SUBST(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 54 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

TM1 ContractID,'EndDate_ContractMonths'),9,2)|'/'|
SUBST(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'EndDate_ContractMonths'),1,4),'');
7
2
7
3
7
4
7
5

WithdrawnMonth/year

User input field in the format MM/YY

Old PO#1

Loaded from the Input Cube

CarryForward Legacy

Loaded from the Input Cube

Inactivated Date

Inactivated Date is a record level field that shows captures
the history of inactivation on that record.
The user input the data at the ContractID level in the
Inactivated Month/Year.
This data is copied to the last record under that contract
using the Intermediate field Inactivated_DATE
The process To_Copy_Inactivated_Suspended_Dates copies
the data from Inactivated_DATE to Inactivated_Date History
Inactivated Date copies the value in the Inactivated_Date
History using the following rule
['Inactivated Date'] = S:IF(DB('CONTRACT CUBE',!
Compound,!Type,!Project,!TA,!TM1
ContractID,'InactivatedMonth/Year')@<>'',
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Inactivated_DATE'),
IF(((DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Contract Type')@='Core' % DB('CONTRACT
CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@='Adjustment' ) &
DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,DNEXT('TM1 ContractID',!TM1 ContractID),'Contract
Type')@='') %
(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@='Amendment' &
DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,DNEXT('TM1 ContractID',!TM1 ContractID),'Contract
Type')@='') ,
DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'TM1 Contract ID'),'Inactivated_DATE'),
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Inactivated_DATE History')));

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 55 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

7
6

Suspended Date

Suspended Date is a record level field that shows captures
the history of suspension on that record.
The user input the data at the ContractID level in the
Suspended Month/Year.
This data is copied to the last record under that contract
using the Intermediate field Suspended_DATE
The process To_Copy_Inactivated_Suspended_Dates copies
the data from Suspended_DATE to Suspended_Date History
Suspended Date copies the value in the Suspended_Date
History using the following rule

7
7

Comments

['Suspended Date'] = S:IF(DB('CONTRACT CUBE',!
Compound,!Type,!Project,!TA,!TM1
ContractID,'SuspendedMonth/Year')@<>'',
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Suspended_DATE'),
IF(((DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Contract Type')@='Core' % DB('CONTRACT
CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@='Adjustment' ) &
DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,DNEXT('TM1 ContractID',!TM1 ContractID),'Contract
Type')@='') %
(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@='Amendment' &
DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,DNEXT('TM1 ContractID',!TM1 ContractID),'Contract
Type')@='') ,
DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'TM1 Contract ID'),'Suspended_DATE'),
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Suspended_DATE History')));
Loaded from the Input Cube. User can add further
comments

4.1.6.2 Hidden Fields
The following fields are the Hidden fields that are used in the above calculations
S
No

Fields

Description

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 56 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

1

EndDate_ContractMonths_Cal
c

EndDate_ContractMonths_Calc is used as intermediate field
for the calculation of Contract End Date for Core OR
Amendment End Date for an amendment. It applies the 15
day logic on end dates to use in End Date_Contract Months
If the date of the Contract End Date is less than 15, then the
previous month end date is displayed. The previous month
end date is displayed based on the month and year. For eg, if
the Contract End date is 12-Mar-2012, since it is a leap year,
the date for calculation would be 2012-02-29.
['EndDate_ContractMonths_Calc']=S:IF(DB('CONTRACT
CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@<>'' & ISLEAF=1,
IF(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@='Core' %
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@='Adjustment',
IF(DAY(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'ContractEndDateYYYY-MM-DD'))<=15,
DATES(IF(MONTH(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'ContractEndDateYYYY-MMDD'))=1,
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'ContractEndDateYYYY-MM-DD'))-1,
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'ContractEndDateYYYY-MM-DD'))),
IF(MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'ContractEndDateYYYY-MM-DD'))=1, 12,
MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'ContractEndDateYYYY-MM-DD'))-1),
IF(MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'ContractEndDateYYYY-MM-DD'))=1,31,
IF(MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'ContractEndDateYYYY-MM-DD'))-1=4 %
MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'ContractEndDateYYYY-MM-DD'))-1=6 %
MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'ContractEndDateYYYY-MM-DD'))-1=9 %
MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'ContractEndDateYYYY-MM-DD'))-1=11,
30,IF(MONTH(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'ContractEndDateYYYY-MM-DD'))1=2,
IF(MOD(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'ContractEndDateYYYY-MM-DD')),
4)=0,29,28), 31)))),

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 57 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

DATES(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'ContractEndDateYYYY-MM-DD')),
MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'ContractEndDateYYYY-MM-DD')),
IF(MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'ContractEndDateYYYY-MM-DD'))=4 %
MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'ContractEndDateYYYY-MM-DD'))=6 %
MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'ContractEndDateYYYY-MM-DD'))=9 %
MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'ContractEndDateYYYY-MM-DD'))=11,
30,IF(MONTH(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'ContractEndDateYYYY-MMDD'))=2,
IF(MOD(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'ContractEndDateYYYY-MM-DD')),
4)=0,29,28), 31)))),
IF(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@='Amendment' &
DAY(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'AmendmentEndDateYYYY-MM-DD'))<=15,
DATES(IF(MONTH(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'AmendmentEndDateYYYY-MMDD'))=1,
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'AmendmentEndDateYYYY-MM-DD'))-1,
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'AmendmentEndDateYYYY-MM-DD'))),
IF(MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'AmendmentEndDateYYYY-MM-DD'))=1,
12,
MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'AmendmentEndDateYYYY-MM-DD'))-1),
IF(MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'AmendmentEndDateYYYY-MMDD'))=1,31,
IF(MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'AmendmentEndDateYYYY-MM-DD'))-1=4
% MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'AmendmentEndDateYYYY-MM-DD'))-1=6
% MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'AmendmentEndDateYYYY-MM-DD'))-1=9
% MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'AmendmentEndDateYYYY-MM-DD'))1=11,
30,IF(MONTH(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'AmendmentEndDateYYYY-MMDD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 58 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

2

StartDate_ContractMonths

DD'))-1=2,
IF(MOD(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'AmendmentEndDateYYYY-MMDD')), 4)=0,29,28), 31)))),
DATES(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'AmendmentEndDateYYYY-MMDD')),
MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'AmendmentEndDateYYYY-MM-DD')),
IF(MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'AmendmentEndDateYYYY-MM-DD'))=4 %
MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'AmendmentEndDateYYYY-MM-DD'))=6 %
MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'AmendmentEndDateYYYY-MM-DD'))=9 %
MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'AmendmentEndDateYYYY-MM-DD'))=11,
30,IF(MONTH(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'AmendmentEndDateYYYY-MMDD'))=2,
IF(MOD(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'AmendmentEndDateYYYY-MMDD')), 4)=0,29,28), 31))))),CONTINUE);
StartDate_ContractMonths is used as an intermediate field
which has the 15 day end date logic applied on the start of
the Contract for a Core or an Amendment.
The rule checks checks if the Contract is a core or
amendment and applies the 15 day logic to the Start Date of
the Contract
['StartDate_ContractMonths']=S:IF(DB('CONTRACT CUBE',!
Compound,!Type,!Project,!TA,!TM1 ContractID,'Contract
Type')@<>'' & ISLEAF=1,
IF(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@='Core' %
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@='Adjustment',
IF(DAY(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'ContractStartDateYYYY-MM-DD'))>15,
DATES(IF(MONTH(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'ContractStartDateYYYY-MMDD'))=12,
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'ContractStartDateYYYY-MM-DD'))+1,
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'ContractStartDateYYYY-MM-DD'))),

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 59 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

IF(MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'ContractStartDateYYYY-MM-DD'))=12,
1, MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'ContractStartDateYYYY-MM-DD'))+1), 1),
DATES(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'ContractStartDateYYYY-MMDD')),
MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'ContractStartDateYYYY-MM-DD')), 1)),
IF(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@='Amendment' &
DAY(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'AmendmentStartDateYYYY-MM-DD'))>15,
DATES(IF(MONTH(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'AmendmentStartDateYYYY-MMDD'))=12,
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'AmendmentStartDateYYYY-MM-DD'))+1,
YEAR(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'AmendmentStartDateYYYY-MM-DD'))),
IF(MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'AmendmentStartDateYYYY-MM-DD'))=12,
1, MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'AmendmentStartDateYYYY-MM-DD'))+1),
1),
DATES(YEAR(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'AmendmentStartDateYYYY-MMDD')),
MONTH(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'AmendmentStartDateYYYY-MM-DD')),
1))),CONTINUE);

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 60 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

3

EndDate_ContractMonths

End Date_Contract Months is the Intermediate field that
calculates the ACTUAL end of the Core/Amendment based on
the Amendment. This field is used in the calculations as the
Contract End Date displayed would be different from the
Actual Contract End if there an Amendment on it.
The rule checks if the Contract is Core/ Amendment and uses
the DNEXT to check if the next record is an Amendment , If
yes and the Contract End Date is greater than Amendment
Start Date then uses the EndDate_ContractMonths_Calc and
StartDate_ContractMonths to get the date of the actual
Contract End Date.
['EndDate_ContractMonths']=S:IF(DB('CONTRACT CUBE',!
Compound,!Type,!Project,!TA,!TM1 ContractID,'Contract
Type')@<>'' & ISLEAF=1,
IF((DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@='Core' %
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@='Adjustment') &
DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,DNEXT('TM1 ContractID',!TM1 ContractID),'Contract
Type')@='Amendment',
IF(DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'ContractEndDateYYYY-MM-DD')) >
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,DNEXT('TM1 ContractID',!TM1
ContractID),'AmendmentStartDateYYYY-MM-DD')) &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,DNEXT('TM1 ContractID',!TM1
ContractID),'AmendmentStartDateYYYY-MM-DD')) >
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'ContractStartDateYYYY-MM-DD')),
DATE(DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,DNEXT('TM1 ContractID',!TM1
ContractID),'StartDate_ContractMonths'))-1,1),
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'EndDate_ContractMonths_Calc')),
IF(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@='Amendment' &
DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,DNEXT('TM1 ContractID',!TM1 ContractID),'Contract
Type')@='Amendment',
IF(DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'AmendmentEndDateYYYY-MM-DD')) >
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,DNEXT('TM1 ContractID',!TM1

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 61 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

4

Inactivated_DATE

ContractID),'AmendmentStartDateYYYY-MM-DD')) &
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,DNEXT('TM1 ContractID',!TM1
ContractID),'AmendmentStartDateYYYY-MM-DD')) >
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'AmendmentStartDateYYYY-MM-DD')),
DATE(DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,DNEXT('TM1 ContractID',!TM1
ContractID),'StartDate_ContractMonths'))-1,1),
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'EndDate_ContractMonths_Calc')),
IF(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@='Core' &
DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,DNEXT('TM1 ContractID',!TM1 ContractID),'Contract
Type')@='',
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'EndDate_ContractMonths_Calc'),
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'EndDate_ContractMonths_Calc')))), '');
Inactivated_DATE is used as an intermediate field that has
the logic to convert "Inactivated Month/Year" to Date String
by adding last day of the month
The user enters the date in the format of the MM/YYYY and it
converts into Date with End of the Month as the Inactivated
Month.
['Inactivated_DATE']=S:IF(DB('CONTRACT CUBE',!Compound,!
Type,!Project,!TA,!TM1
ContractID,'InactivatedMonth/Year')@<>'',
DATES(NUMBR(SUBST(DB('CONTRACT CUBE',!Compound,!
Type,!Project,!TA,!TM1
ContractID,'InactivatedMonth/Year'),4,4)),
NUMBR(SUBST(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'InactivatedMonth/Year'),1,2)),
IF(NUMBR(SUBST(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'InactivatedMonth/Year'),1,2))=4
%
NUMBR(SUBST(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'InactivatedMonth/Year'),1,2))=6
%
NUMBR(SUBST(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'InactivatedMonth/Year'),1,2))=9
%
NUMBR(SUBST(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 62 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

5

Inactivated_DATE History

ContractID,'InactivatedMonth/Year'),1,2))=11,
30,IF(NUMBR(SUBST(DB('CONTRACT CUBE',!Compound,!
Type,!Project,!TA,!TM1
ContractID,'InactivatedMonth/Year'),1,2))=2,
IF(MOD(NUMBR(SUBST(DB('CONTRACT CUBE',!Compound,!
Type,!Project,!TA,!TM1
ContractID,'InactivatedMonth/Year'),4,4)), 4)=0,29,28), 31))),
IF(((DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@='Core' % DB('CONTRACT
CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@='Adjustment' ) &
DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,DNEXT('TM1 ContractID',!TM1 ContractID),'Contract
Type')@='') %
(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@='Amendment' &
DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,DNEXT('TM1 ContractID',!TM1 ContractID),'Contract
Type')@='') ,
DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'TM1 Contract ID'),'Inactivated_DATE'),''));
Inactivated_DATE History is an intermediate field that is used
to capture the history of inactivity.
The TI process To_Copy_Inactivated_Suspended_Dates copies
the data in the Inactivated_DATE if it exists.
This field is compared to Inactivated Date field to Archive the
Contract Cube. If there is Date in Inactivated_Date History
and No value mentioned in Inactivated Date field, it triggers
the Archive process .

6

Suspended_DATE

Suspended_DATE is used as an intermediate field that has
the logic to convert "Suspended Month/Year" to Date String
by adding last day of the month
The user enters the date in the format of the MM/YYYY and it
converts into Date with End of the Month as the Suspended
Month.
['Suspended_DATE']=S:IF(DB('CONTRACT CUBE',!Compound,!
Type,!Project,!TA,!TM1 ContractID,'Suspended
Month/Year')@<>'',
DATES(NUMBR(SUBST(DB('CONTRACT CUBE',!Compound,!
Type,!Project,!TA,!TM1 ContractID,'Suspended
Month/Year'),4,4)),
NUMBR(SUBST(DB('CONTRACT CUBE',!Compound,!Type,!

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 63 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

7

Suspended_DATE History

Project,!TA,!TM1 ContractID,'Suspended Month/Year'),1,2)),
IF(NUMBR(SUBST(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'Suspended Month/Year'),1,2))=4
%
NUMBR(SUBST(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'Suspended Month/Year'),1,2))=6
%
NUMBR(SUBST(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'Suspended Month/Year'),1,2))=9
%
NUMBR(SUBST(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'Suspended
Month/Year'),1,2))=11,
30,IF(NUMBR(SUBST(DB('CONTRACT CUBE',!Compound,!
Type,!Project,!TA,!TM1 ContractID,'Suspended
Month/Year'),1,2))=2,
IF(MOD(NUMBR(SUBST(DB('CONTRACT CUBE',!Compound,!
Type,!Project,!TA,!TM1 ContractID,'Suspended
Month/Year'),4,4)), 4)=0,29,28), 31))),
IF(((DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@='Core' % DB('CONTRACT
CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@='Adjustment' ) &
DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,DNEXT('TM1 ContractID',!TM1 ContractID),'Contract
Type')@='') %
(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@='Amendment' &
DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,DNEXT('TM1 ContractID',!TM1 ContractID),'Contract
Type')@='') ,
DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'TM1 Contract ID'),'Suspended_DATE'),''));
Suspended_DATE History is an intermediate field that is used
to capture the history of Suspension.
The TI process To_Copy_Inactivated_Suspended_Dates copies
the data in the Suspended_DATE if it exists.
This field is compared to Suspended Date field to Archive the
Contract Cube. If there is Date in Suspended_Date History
and No value mentioned in Suspended Date field, it triggers
the Archive process .

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 64 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

6

Contract Months_CF

Contract Months_CF is an intermediate field used for the
calculation of Carry Forward Amount, gives the value of the
number of months remaining in the initial contract at the
start of the amendment.
This field uses the intermediate fields
EndDate_ContractMonths and StartDate_ContractMonths to
find out the actual duration of the contract and subtracts
from Contract Months.

8

['Contract Months_CF']=N:IF(DB('CONTRACT CUBE',!
Compound,!Type,!Project,!TA,!TM1
ContractID,'StartDate_ContractMonths')@<>'',
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Months')ROUND((DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'EndDate_ContractMonths'))DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'StartDate_ContractMonths')))/30),
CONTINUE);
This is to lock the Status field at the leaf level as the user
makes a Contract Inactive at the Contract ID level

Status

['Status']=S:IF(ISLEAF=1,'',CONTINUE);
9

ContractAmount _Actual

ContractAmount _Actual is the total Contract Amount that is
actually being spent on the Contract considering the
amendments.
It is the sum of the Contract Amount and all the Amendment
Amounts
['ContractAmount_Actual']=N:IF(DB('CONTRACT CUBE',!
Compound,!Type,!Project,!TA,!TM1 ContractID,'Contract
Type')@='Core' % DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'Contract Type')@='Adjustment',
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Amount'),
IF(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@='Amendment',
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Amendment Amount'),0));

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 65 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

10

EndDate_ElapsedMonths_Tod
ay

EndDate_ElapsedMonths_Today is an intermediate field used
for the calculation for Cumulative Months, Elapsed Months,
Accrual Months Past Accrual Date
The field calculates Today’s end months based on the 15 day
logic.

11

Least Date

['EndDate_ElapsedMonths_Today']=S:IF(DB('CONTRACT
CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'StartDate_ContractMonths')@<>'',
DATES(YEAR(TODAY(1)), MONTH(TODAY(1)),
IF(MONTH(TODAY(1))=4 % MONTH(TODAY(1))=6 %
MONTH(TODAY(1))=9 %
MONTH(TODAY(1))=11,30,IF(MONTH(TODAY(1))=2,IF((YEAR(T
ODAY(1))/4)=0,29,28), 31))),CONTINUE);
Least Date is an intermediate field to get the Least Start Date
of all the Contract/Amendment’s start dates. It compares the
Start date of the record with the previous record’s start date
and gives the least value.
The logic of Least Date, Least Date Status and Temp Status is
used to calculate the cumulative months in case of
reannualization.
['Least Date']=S:IF(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'Contract Type')@<>'',
IF((DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@='Amendment' &
DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,DNEXT('TM1 ContractID',!TM1 ContractID),'Contract
Type')@=''&
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'StartDate_ContractMonths')) >
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,DIMNM('TM1 ContractID',(DIMIX('TM1 ContractID',!TM1
ContractID))-1),'StartDate_ContractMonths'))),
DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,DIMNM('TM1 ContractID',(DIMIX('TM1 ContractID',!TM1
ContractID))-1),'StartDate_ContractMonths'),
IF(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@='Amendment'&
DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,DNEXT('TM1 ContractID',!TM1 ContractID),'Contract
Type')@<>''&
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'StartDate_ContractMonths')) >
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,DIMNM('TM1 ContractID',(DIMIX('TM1 ContractID',!TM1

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 66 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

12

Least Date Status

ContractID))-1),'StartDate_ContractMonths')),
DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,DIMNM('TM1 ContractID',(DIMIX('TM1 ContractID',!TM1
ContractID))-1),'StartDate_ContractMonths'),
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'StartDate_ContractMonths'))), DB('CONTRACT
CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'StartDate_ContractMonths'));
Least Date Status is the intermediate field that gives the
value of Yes or No - if Least date less than start date then
status wil be 'NO' else 'YES'
The logic of Least Date, Least Date Status and Temp Status is
used to calculate the cumulative months in case of
reannualization.

13

Temp Status

['Least Date Status']=S:IF(DB('CONTRACT CUBE',!Compound,!
Type,!Project,!TA,!TM1 ContractID,'Contract Type')@<>'',
IF(DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,!TM1 ContractID,'Least Date')) < DAYNO(DB('CONTRACT
CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'StartDate_ContractMonths')),
'No',
IF(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Contract Type')@='Core' &
(DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Least Date')) <= DAYNO(DB('CONTRACT
CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'StartDate_ContractMonths'))),
'No', 'Yes')),'');
Temp Status is the intermediate field to get the last
amendment's value of Least Date Status to leaf and
consolidated levels of Temp Status to identify the contract
with negative dates
The logic of Least Date, Least Date Status and Temp Status is
used to calculate the cumulative months in case of
reannualization.
['TempStatus']=S:IF(ISLEAF=0,
DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,ELCOMP('TM1 ContractID',!TM1 ContractID,ELCOMPN('TM1
ContractID',!TM1 ContractID)),'Least Date Status'),
DB('CONTRACT CUBE',!Compound,!Type,!Project,!
TA,DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'TM1 Contract ID'),'Temp Status'));

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 67 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

14

Least End Date

Least End Date is the intermediate field that is used to get
the least date among EndDate_ContractMonths, Inactivated
Date and Suspended Date
It is used in the calculation for cumulative months.
['Least End Date'] = S:IF(DB('CONTRACT CUBE',!Compound,!
Type,!Project,!TA,!TM1 ContractID,'Contract Type')@<>'',
IF(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Inactivated Date')@<>'' & DB('CONTRACT CUBE',!
Compound,!Type,!Project,!TA,!TM1 ContractID,'Suspended
Date')@<>'',
DATE(MIN(MIN(DAYNO(DB('CONTRACT CUBE',!Compound,!
Type,!Project,!TA,!TM1 ContractID,'Inactivated Date')),
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'Suspended Date'))),
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'EndDate_ContractMonths'))),1),
IF(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Inactivated Date')@<>'',
DATE(MIN(DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'Inactivated Date')),
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'EndDate_ContractMonths'))),1),
IF(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'Suspended Date')@<>'',
DATE(MIN(DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!
Project,!TA,!TM1 ContractID,'Suspended Date')),
DAYNO(DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!
TM1 ContractID,'EndDate_ContractMonths'))),1),
DB('CONTRACT CUBE',!Compound,!Type,!Project,!TA,!TM1
ContractID,'EndDate_ContractMonths')))), '');

4.2 Data Load
The data flow from the Input Cube to the Contract Cube starts once the user
clicks on the Submit button on the respective template.

The Submit button triggers the TI process
To_Create_TM1ContractID_Dim.
The process is a parameterized process wherein when the user clicks
the submit button, the value in the C11 cell ie Oncology or NonOncology
is used as a parameter.

The following three processes are executed in order

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 68 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

ExecuteProcess ('To_Create_Compound_Project_Dim');
ExecuteProcess
('To_Load_CONTRACT_CUBE_from_INPUT_CUBE','pTA',pTA);
ExecuteProcess ('To_Delete_Processed_Records_from_INPUT_CUBE');

To_Load_CONTRACT_CUBE_from_INPUT_CUBE
The dimension count of the Input Cube and Contract Cube is different
and the data values of the Input Cube are the elements of the
Dimensions in the Contract Cube. So, data is loaded into the Contract
Cube by using the WHILE Loop with the help of indexes.
Only the records which are not Rejected and with Action as Process are
loaded into the Contract Cube.
The following code is defined under the Prolog of the TI Process
Prolog tab of To_Load_CONTRACT_CUBE_from_INPUT_CUBE
v_index = 2;
v_dimcount = DIMSIZ('SystemId');
while (v_index <= v_dimcount);
v_syselement = dimnm('SystemId',v_index);
v_Rejected= cellgets('INPUT CUBE',v_syselement , pTA, 'Rejected');
v_TherapeuticArea= cellgets('INPUT CUBE',v_syselement , pTA,
'Therapeutic Area');
v_TA= cellgets('INPUT CUBE',v_syselement , pTA, 'TA');
v_Action= cellgets('INPUT CUBE',v_syselement , pTA, 'Action');
If (v_Rejected @<> 'YES' & v_TA@=pTA & v_Action@='Process');
v_Type = cellgets('INPUT CUBE', v_syselement , pTA, 'Type');
v_Compound1= cellgets('INPUT CUBE', v_syselement , pTA,
'Compound');
v_Project1= cellgets('INPUT CUBE', v_syselement , pTA,'Project');
v_index2 = 1;
while (v_index2 <=dimsiz('Measure_Input'));
v_measure_contract = dimnm('Measure_Input',v_index2);
if (DTYPE('Measure_Input',v_measure_contract)@='N');
v_valuen= cellgetn('INPUT CUBE',v_syselement , pTA,
v_measure_contract);
elseif (DTYPE('Measure_Input',v_measure_contract)@='S');
v_values= cellgets('INPUT CUBE',v_syselement , pTA,
v_measure_contract);
DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 69 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

endif;
if (DTYPE('Measure_Input',v_measure_contract)@='N');
CellputN(v_valuen ,'CONTRACT CUBE', v_Compound1 , v_Type ,
v_Project1, v_TherapeuticArea ,v_syselement ,v_measure_contract);
elseif (DTYPE('Measure_Input',v_measure_contract)@='S');
CellputS(v_values ,'CONTRACT CUBE', v_Compound1 , v_Type ,
v_Project1, v_TherapeuticArea ,v_syselement ,v_measure_contract);
endif;
v_index2=v_index2+1;
end;
Endif;
v_index=v_index+1;
end;

4.3 LookUp Cubes
Two lookup cubes are created for calculations to retain the data for next
month/year calculations
Contract_Cube_PastData_Monthly
Contract_Cube_PastData_Yearly are created
4.3.1 Contract_Cube_PastData_Monthly

The TI Process To_Load_ContractCubePastData_Monthly loads data to
Contract_Cube_PastData_Monthly with the source as the Contract Cube.
It is the snapshot of the Contract Cube at the end of each month.

The TM1 Contract ID Dimension is required only at the consolidated
level. A new dimension TM1 ContractID_L1 is created at the level 1 of
TM1 ContractID Dimension for this purpose.

This process is run once in a month to hold the values the previous
month.

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 70 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

4.3.2 Contract_Cube_PastData_Yearly

The TI Process To_Load_ContractCubePastData_Yearly loads data to
Contract_Cube_PastData_Yearly with the source as the Contract Cube. It
is the snapshot of the Contract Cube at the end of each Year.

The TM1 Contract ID Dimension is required only at the consolidated
level. A new dimension TM1 ContractID_L1 is created at the level 1 of
TM1 ContractID Dimension for this purpose.

This process is run once in a Year to hold the values the previous Year

5 SAP Staging Cube
5.1 SAP Staging Data
Source - DAART_SAP.dat
Path : ___________________________
DAART_SAP file contains the daily cash paid data with respect to the PO
number. So the staging cube accumulates the values and divides the SAP Cash
paid data on a Monthly and yearly basis, so that the data can be directly fed to
the Contract Cube at the TM1 ContractID level.
The file containing the following data fields from SAP is FTPed to the Shared
path
1. BELNR
2. GJAHR
3. KSTAR
4. OBJID
5. BUDAT
6. EBELN
7. EBELN
8. WTGBTR
The TI process To_Load_SAP_Staging_Cube_from_SAP loads the data from SAP
to the Staging Cube.

5.2 DIMENSIONS
DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 71 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

The following are the dimensions for the SAP Staging Cube
1. PONumber
2. PostDate
5.2.1 PONumber
PONumber is a dynamically created dimension by using the EBELN of the SAP
data. Variable PONumber is created to get the value of the PONumber in the
same format as that of the Contract Cube.
The formula for PONumber is defined in Variable of the process as
PONumber='PO' | subst(EBELN,3,long(EBELN)-2);
5.2.2 PostDate
PostDate contains the following elements at the Consolidation level



Current Year Cash Paid
Past Year (beyond 2 years) Cash Paid
Prior-1 Year Cash Paid
Prior Year Cash Paid

5.3 Data Load
Process: To_Load_SAP_Staging_Cube_from_SAP
The following variables are created and Code is applied to dynamically split
the dates and assign to the respective Date fields.
Based on the Dates given in the BUDAT field of the DAART_SAP file, Dates are
split using the formulae given below for the variables
S
No
1
2
3
4

Variable

Formula

Post_Year
PostMonth
PostDate
Amount

Post_Year=subst(BUDAT,1,4);
PostMonth=subst(BUDAT,1,6);
PostDate=BUDAT;
Amount=if(scan('-',wtgbtr)>0, -1*stringtonumber
(subst(wtgbtr,1,long(wtgbtr)1)),stringtonumber(wtgbtr));

The option accumulate values should be selected under MAPS tab so that
the values are added as the file is loaded daily
DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 72 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

The following code is written under the Prolog of the TI process to dynamically
assign the dates to Previous years and Current year respectively. This
approach automatically assigns the Previous years to each of the respective
Cash paid years and consolidates the values at Month and Year basis.
Prolog tab of To_Load_SAP_Staging_Cube_from_SAP
##To delete all the existing dates under Consolidations to define the Current
and Past years based on Dates##
if (DIMIX('PostTime', 'Current Year Cash Paid')>0);
dimensionelementdelete('PostTime','Current Year Cash Paid');
elseif(DIMIX('PostTime', 'Prior Year Cash Paid')>0);
dimensionelementdelete('PostTime','Prior Year Cash Paid');
elseif(DIMIX('PostTime' ,'Prior-1 Year Cash Paid')>0);
dimensionelementdelete('PostTime','Prior-1 Year Cash Paid');
elseif(DIMIX('PostTime', 'Past Year (beyond 2 years) Cash Paid')>0);
dimensionelementdelete('PostTime','Past Year (beyond 2 years) Cash Paid');
endif;
##Assisgn the dates to the Past years and Current years respectively##
v_current_year=numbertostring(year(today(1)));
v_prior_year=numbertostring(year(today(1))-1);
v_prior_1_year=numbertostring(year(today(1))-2);
dimensionelementinsert('PostTime','','Current Year Cash Paid','n');
dimensionelementinsert('PostTime','','Prior Year Cash Paid','n');
dimensionelementinsert('PostTime','','Prior-1 Year Cash Paid','n');
dimensionelementinsert('PostTime','','Past Year (beyond 2 years) Cash
Paid','n');
DimensionElementComponentAdd('PostTime','Current Year Cash
Paid',v_current_year,-1);
DimensionElementComponentAdd('PostTime','Prior Year Cash
Paid',v_prior_year,-1);
DimensionElementComponentAdd('PostTime','Prior-1 Year Cash
Paid',v_prior_1_year,-1);
##For all the dates before past2 years##
i=3;
while (i<=22);
v_past_years=numbertostring(year(today(1))-i);
DimensionElementComponentAdd('PostTime','Past Year (beyond 2 years) Cash
Paid',v_past_years,-1);
i=i+1;
end;

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 73 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

Once the SAP data is loaded, this cube can be used to get the Cash paid
values in the Contract Cube at the TM1 Contract ID level.

6 GL Account Lookup Cube
6.1 GL Account Data
File – GL Lookup.csv
Path - _______________________________
The source file has the Ariba GL accounts mapped to the Invoice GL Accounts.
This mapping is maintained by the Application Power users/business users.

6.2 Dimensions

Ariba GL Account
Measures

6.2.1 Ariba GL Account
The elements of the Ariba GL Account are Ariba GL Account numbers that are
in the source file.
6.2.2 Invoice GL Account
The following elements are taken measures in the Invoice GL Account
dimension
Ariba GL Account
Invoice GL Account

6.3 Data Load

The TI process To_Load_GLAccount_lookup_Cube is run manually
everytime the source file is modified
The cube is recreated every time the process runs

7 Archive Cube
DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 74 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

The archive Cube facilitates audit trail by storing every change / record
processed from Input Cube to Contract Cube.
Any new record that is processed from Input Cube to Contract Cube triggers
for immediate update of the Archive Cube with the changes. The entire
Contract with a new timestamp is archived.

7.1 Archive Cube Data
Source: Contract Cube
The Archive cube maintains the history of the contract cube. It has the same
cube structure as that of the Contract Cube and contains the data with a
timestamp concatenated to the TM1 Contract ID. The Archive is updated
everytime there is any change in the data of the Contract Cube whether it is
by adding new records or updating the records or even changing the status of
existing records.

7.2 Dimensions
The following are the dimensions present in the Archive Cube
1.
2.
3.
4.
5.
6.

TA
Type
TM1 ContractID Archive
Compound
Project
Measure_Contract

All the dimensions of the Archive Cube are same as that of the Contract Cube
except the TM1 ContractID Archive dimension.
7.2.1 TM1 ContractID Archive


TM1 ContractID Archive dimension is a dynamically built dimension with
the TimeStamp concatenated to the elements of the TM1 ContractID
dimension.
The timestamp is in the format YYYYMMDDHHMMSS
The consolidation level of the TM1 ContractID is taken at the leaf level
to copy the calculated values as they are to the Archive Cube

The Process To_Load_Archive_Cube is a parameterized process based on 2
parameters
DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 75 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

-

pTA : Defines the Therapeutic Area based on the Template
p_ContractID : triggers which of the TM1 ContractIDs need to
be taken a backup of
v_Type: Defines the Type as parameter
v_Compound: Defines the Compound as parameter
v_Project: Defines Project as parameter
v_TherapeuticArea: Defines TherapeuticArea as parameter

The following code is written in the Prolog Tab of the the TI process
To_Load_Archive_Cube to create the TM1 ContractID Archive dimension
Prolog Tab of To_Load_Archive_Cube
v_records_in_contract=elcompn('TM1 ContractID',p_ContractId);
v_counter=1;
v_now=timst(now,'\Y\m\d\h\i\s');
v_parent=v_now | '-' | p_ContractId;
dimensionelementinsert('TM1 Contract ID Archive','',v_parent | '-P','c');
dimensionelementinsert('TM1 Contract ID Archive','',v_parent ,'n');
DimensionElementComponentAdd ('TM1 Contract ID Archive',v_parent | 'P',v_parent,1);
while (v_counter <= v_records_in_contract);
v_child=v_now | '-' | elcomp('TM1 ContractID',p_ContractId,v_counter);
dimensionelementinsert('TM1 Contract ID Archive','',v_child,'n');
DimensionElementComponentAdd ('TM1 Contract ID Archive',v_parent | 'P',v_child,0);
v_counter=v_counter+1;
end;

7.3 Data Load
Process: To_Load_Archive_Cube

The Epilog Tab of the process To_Load_Archive_Cube loads the data
from the Contract Cube to the Archive Cube.

The Process is triggered every time data is loaded from the Input Cube
to the Contract Cube. Hence, the process
To_Create_TM1_ContractID_Dim triggers the
To_Load_Archive_Cube process

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 76 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

The process is executed just before the deletion of the elements from
the Input Cube so as to have an archive of all the records.

Any status changes in the Contract Cube also triggers the process
(defined later)

The following code is written in the Epilog process of To_Load_Archive_Cube
to load the data from the Contract Cube to the Archive Cube.
Epilog tab of To_Load_Archive_Cube
v_records_in_contract=elcompn('TM1 ContractID',p_ContractId);
v_counter=1;
v_now=timst(now,'\Y\m\d\h\i\s');
v_parent=v_now | '-' | p_ContractId;
while (v_counter <= v_records_in_contract);
v_child_element=elcomp('TM1 ContractID',p_ContractId,v_counter);
v_child=v_now | '-' | v_child_element;
v_index=1;
while(v_index<=dimsiz('Measure_Contract'));
v_measure=dimnm('Measure_Contract',v_index);
if (DTYPE('Measure_Contract',v_measure)@='N');
v_num_value=cellgetn('CONTRACT
CUBE',v_Compound,v_Type,v_Project,v_TherapeuticArea,p_ContractId,v_measu
re);
elseif (DTYPE('Measure_Contract',v_measure)@='S');
v_string_value=cellgets('CONTRACT
CUBE',v_Compound,v_Type,v_Project,v_TherapeuticArea,p_ContractId,v_measu
re);
endif;
if (DTYPE('Measure_Contract',v_measure)@='N');
cellputn(v_num_value,'ARCHIVE
CUBE',v_Compound,v_Type,v_Project,v_TherapeuticArea,v_parent,v_measure);
elseif (DTYPE('Measure_Contract',v_measure)@='S');
cellputs(v_string_value,'ARCHIVE
CUBE',v_Compound,v_Type,v_Project,v_TherapeuticArea,v_parent,v_measure);
endif;
DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 77 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

v_index=v_index+1;
end;
v_index=1;
while (v_index<=dimsiz('Measure_Contract'));
v_measure=dimnm('Measure_Contract',v_index);
if (DTYPE('Measure_Contract',v_measure)@='N');
v_num_value=cellgetn('CONTRACT
CUBE',v_Compound,v_Type,v_Project,v_TherapeuticArea,v_child_element,v_me
asure);
elseif (DTYPE('Measure_Contract',v_measure)@='S');
v_string_value=cellgets('CONTRACT
CUBE',v_Compound,v_Type,v_Project,v_TherapeuticArea,v_child_element,v_me
asure);
endif;
if (DTYPE('Measure_Contract',v_measure)@='N');
cellputn(v_num_value,'ARCHIVE
CUBE',v_Compound,v_Type,v_Project,v_TherapeuticArea,v_child,v_measure);
elseif (DTYPE('Measure_Contract',v_measure)@='S');
cellputs(v_string_value,'ARCHIVE
CUBE',v_Compound,v_Type,v_Project,v_TherapeuticArea,v_child,v_measure);
endif;
v_index=v_index+1;
end;
v_counter=v_counter+1;
end;

Process: To_Copy_Inactive_Suspended_Dates
The To_Copy_Inactive_Suspended_Dates process triggers the Archiving process if there
is a date is that is copied to the Inactived_Date_History and Suspended_Date_History.
 The process runs every night to copy the data from Inactivated_DATE and
Suspended_DATE to Inactived_Date_History and Suspended_Date_History
respectively in the Contract Cube.
DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 78 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

 To increase the performance of the process, another dimension
TM1ContractID_Inac_Susp is created which contains only the records that are
Inactivated or Suspended. This is dimension is created using the process
To_Create_TM1ContractID_Inac_Susp_Dim.
A variable ID is created in this process which is defined as
IF(Measure_Contract@='Status' & Value@='Inactive' %
Value@='Suspended');
ID=vTM1ContractID;
endif;
 The process To_Copy_Inactive_Suspended_Dates uses the while loop logic to
check the values in all the Inactivated/Suspended ContractIDs and copies the
values from Inactivated_Date_History and Suspended_Date_History.
 If the values in History are not same as the values in Inactivated/Suspended
Date, it triggers the Archive Process To_Load_Archive_Cube with the
parameters.
The following code is written in the Prolog tab of the process
To_Copy_Inactive_Suspended_Dates
Prolog tab of To_Copy_Inactive_Suspended_Dates
v_index_ContractID = 1;
##Creates an Intermediate Dimension with only the Inactive and Suspended
Records##
ExecuteProcess ('To_Create_TM1ContractID_Inac_Susp_Dim');
#while (v_index_ContractID <= 1);
while (v_index_ContractID <= DIMSIZ ('TM1 ContractID'));
if ( DTYPE('TM1 ContractID',DIMNM('TM1 ContractID',
v_index_ContractID))@='C');
v_ContractId=dimnm('TM1 ContractID',v_index_ContractID );
v_index_compound = 1;
while (v_index_compound <= DIMSIZ ('Compound'));
v_Compound=dimnm('Compound',v_index_compound );
v_index_Type = 1;
while (v_index_Type <= DIMSIZ ('Type'));
v_Type=dimnm('Type',v_index_Type );
v_index_project = 1;
while (v_index_project <= DIMSIZ ('Project'));
v_Project=dimnm('Project',v_index_project );
DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 79 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

v_index_TA = 1;
while ( v_index_TA<= DIMSIZ ('TA'));
v_TherapeuticArea=dimnm('TA',v_index_TA );
v_last_record=elcomp('TM1 ContractID',v_ContractId,elcompn('TM1
ContractID',v_ContractId));
v_Status=cellgets('CONTRACT
CUBE',v_Compound,v_Type,v_Project,v_TherapeuticArea,v_ContractId,'Status');
v_archive='No';
if (v_Status@='Inactive' % v_Status@='Suspended');
v_archive='Yes';
endif;
v_string_value=cellgets('CONTRACT
CUBE',v_Compound,v_Type,v_Project,v_TherapeuticArea,v_last_record,'Inactiva
ted Date');
v_string_value_hist=cellgets('CONTRACT
CUBE',v_Compound,v_Type,v_Project,v_TherapeuticArea,v_last_record,'Inactiva
ted_DATE History');
cellputs(v_string_value,'CONTRACT
CUBE',v_Compound,v_Type,v_Project,v_TherapeuticArea,v_last_record,'Inactiva
ted_DATE History');
v_string_value_sus=cellgets('CONTRACT
CUBE',v_Compound,v_Type,v_Project,v_TherapeuticArea,v_last_record,'Suspen
ded Date');
v_string_value_hist_sus=cellgets('CONTRACT
CUBE',v_Compound,v_Type,v_Project,v_TherapeuticArea,v_last_record,'Suspen
ded_DATE History');
cellputs(v_string_value_sus,'CONTRACT
CUBE',v_Compound,v_Type,v_Project,v_TherapeuticArea,v_last_record,'Suspen
ded_DATE History');
v_TA=cellgets('CONTRACT
CUBE',v_Compound,v_Type,v_Project,v_TherapeuticArea,v_last_record,'TA');
if (v_archive@='Yes' & (v_string_value@<>v_string_value_hist %
v_string_value_sus@<>v_string_value_hist_sus));
ExecuteProcess
('To_Load_Archive_Cube','p_contractid',v_ContractId,'pTA',v_TA,'v_Compound',v
_Compound,'v_Type',v_Type,'v_Project',v_Project,'v_Therape
uticArea',v_TherapeuticArea);
endif;
v_index_TA=v_index_TA+1;
DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 80 / 81

281990254.doc

DAART
Software Design
Specification
Doc. ID.: DD-SYD-013-2.0
Version: 1.7

end;
v_index_project =v_index_project +1;
end;
v_index_Type=v_index_Type+1;
end;
v_index_compound=v_index_compound+1;
end;
endif;
v_index_ContractID = v_index_ContractID + 1;
end;

Research Paper help
https://www.homeworkping.com/

DD-SYD-013-2.0
Last printed 9/10/2010 4:36 PM

Page: 81 / 81

281990254.doc