MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:bp
:TCMOD:tmm
:TFLNO:100
:LDAT:1/2/2018 11:26:31 AM
:PRTX:START
ret = read.parameters.people(dummy.err.mess)
|#testje
migrate tihra100
:PRTX:END
:STAT:V
:VARI:table	tbcsbp000
table	tbcsbp002
table	tbcsbp004
table	tbcstc006
table	ttihra000

domain	tcmcs.s200m	dummy.err.mess
domain	tcmcs.long	ret

long			day.number


long			var.bptmm100.type
long			var.bptmm100.seqn
domain	bcstr22		var.bptmm100.rgdt
domain	bcstr22		var.bptmm100.trdt		|#147118.n
domain	tisfc.prtm	var.bptmm100.hrea
domain	tccwtt		var.bptmm100.wtsc
domain	tcckow		var.bptmm100.chlt
domain	tisfc.prtm	var.bptmm100.hrma
domain	bcstr22		var.bptmm100.stdt
domain	bcstr22		var.bptmm100.endt
domain	tcprcg		var.bptmm100.perc
domain	tctxtn		var.bptmm100.txta
domain	tccwoc		var.bptmm100.emdp		|#GEN-0205.n

long			var.bptmm111.seqn		|#158562.n
domain	bcstr8		var.bptmm111.gtsk
domain	tcdsca		var.bptmm111.dsca
domain	bcstr8		var.bptmm111.cpcp
domain	tisfc.prtm	var.bptmm111.hrea(8)	|* array
domain	tcckow		var.bptmm111.chlt
domain	bcstr22		var.bptmm111.trdt		|#147118.n
domain	tctxtn		var.bptmm111.txta
domain	tctxtn		var.bptmm111.txtb
domain	tctxtn		var.bptmm111.txtc
domain	tctxtn		var.bptmm111.txtd
domain	tctxtn		var.bptmm111.txte
domain	tctxtn		var.bptmm111.txtf
domain	tctxtn		var.bptmm111.txtg

long			var.bptmm120.seqn		|#158562.n
domain	bcstr22		var.bptmm120.stdt
domain	bcstr22		var.bptmm120.endt
domain	bcstr22		var.bptmm120.rgdt
domain	bcstr22		var.bptmm120.trdt		|#147118.n
domain	tccwtt		var.bptmm120.wtsc
domain	tcckow		var.bptmm120.chlt

static	domain	tctano	s.tano
static	domain	tcbool	s.service.rates.present

long			var.bptmm130.seqn		|#158562.n
domain	bcstr22		var.bptmm130.stdt
domain	bcstr22		var.bptmm130.endt
domain	bcstr22		var.bptmm130.rgdt
domain	bcstr22		var.bptmm130.trdt		|#147118.n
domain	tccwtt		var.bptmm130.wtsc
domain	tcckow		var.bptmm130.chlt
domain	bcstr8		var.bptmm130.cpcp

long			var.bptmm150.seqn
domain	bcstr22		var.bptmm150.stdt
domain	bcstr8		var.bptmm150.gtsk
domain	tcdsca		var.bptmm150.dsca
domain	bcstr8		var.bptmm150.cpcp

long			var.bptmm170.seqn		|#158562.n
domain	bcstr22		var.bptmm170.stdt
domain	bcstr22		var.bptmm170.endt
domain	bcstr22		var.bptmm170.rgdt
domain	bcstr22		var.bptmm170.trdt		|#147118.n
domain	tccwtt		var.bptmm170.wtsc
domain	tcckow		var.bptmm170.chlt

#define	GENERAL_TASK	1
#define	PCS		3
#define	PRODUCTION	4
#define	SERVICE	6

#include	<bic_tt>
|#include "itssma0011"				|#MCR.o
:STBL:tihra100
:COMT:START
---  Changes in table design  ---
In %SV hours can be entered in two packages:
- in TI via the %SStihra1101m000 session
- in TP via the %SStphrs1100m000 session

In %SV the actual and the processed hours are stored in one table.

In %TV the hours are centrally registered and processed in the BaanPeople package. In this package the actual and the processed hours are stored in separate tables. If hours are processed, then the tables containing history data are filled. The tables containing actual data remain filled, until the data is explicitly removed via the %TSbptmm1206m000 session.
The hours with transaction type '6 - Production (PMG) Hours' (session %SStihra1101m000) are not supported in %TV. These records will not be migrated.

The architecture of the BaanPeople package is rather different compared to the hours registration modules of %SV. For the actual (not-processed) hours the following tables are valid:
%TTbptmm100
%TTbptmm110
%TTbptmm111
%TTbptmm120
%TTbptmm130
%TTbptmm140
%TTbptmm150
%TTbptmm160
%TTbptmm170

The first table stores time data. All other tables store both time and logistic data.


---  Source and Target Sessions  ---
Overview for all transaction types:
   %SStihra1101m000 - %TSbptmm1100m000
For transaction types '4 - Indirect Hours' and '5 - Absence Hours':
   %SStihra1101m000 - %TSbptmm1111m200
For transaction type '2 - Production Hours':
   %SStihra1101m000 - %TSbptmm1120m000
For transaction type '3 - Service Hours':
   %SStihra1101m000 - %TSbptmm1130m000
For transaction type '1 - Project Hours':
   %SStihra1101m000 - %TSbptmm1170m000


---  Migration Logic  ---
An important pre-condition is that the hours that are registered in the %SStphrs1100m000 session must be finalized. This can be done with help of the %SStphrs1230m000 session.
The reason for this is that cost lines are registered at the moment of entering the hours in the tpHRS-module. For Project related hours the cost lines are present in TP, for Service related hours the cost lines are present in TS, for General hours in TF, for Other hours no cost lines are present.
If all these hours are migrated to BaanPeople, then the hours must still be processed. Because of that the cost lines related to the hours registration must be skipped during conversion. However the link between hours lines and cost lines is not present in all cost lines, and for that reason it is not possible to skip these lines during migration. If all hours are finalized, then the hours lines will not be migrated to the actual hours tables in the target version. In this way the processing of hours lines is performed only once (in %SV).

Because of this pre-condition, the tables containing actual hours data is only coming from the %SStihra1101m000 session.
Below a rough mapping from %SV to %TV is described of the non-processed records that are available in session %SStihra1101m000:
- Transaction type is 'Project Hours'. The record is migrated to table %TTbptmm170 and to table %TTbptmm100.
- Transaction type is 'Production Hours'. The record is migrated to table %TTbptmm120 and to table %TTbptmm100.
- Transaction type is 'Service Hours'. The record is migrated to table %TTbptmm130 and to table %TTbptmm100.
- Transaction type is 'Absence Hours' or 'Indirect Hours'. The record is migrated to table %TTbptmm111, to table %TTbptmm150 and to table %TTbptmm100.
- Transaction type is 'Production (PMG) Hours'. The record is not migrated.

For hours linked to Service Orders that are registered in the %SStihra1101m000 session only those records are migrated that have rates defined for the task. These rates must be present in the %SStssma3120m000 session.

---  Migration Parameters  ---
%SFbcsbp000.dsbt
%SFtihra000.cltm


---  Migration Mapping Tables  ---
%STbcsbp002
%STbcsbp004
%STbcstc006


---  Technical Notes  ---
Not applicable.


---  Performance  ---
Not applicable.
:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:bp
:TCMOD:tmm
:TFLNO:111
:LDAT:1/2/2018 11:26:32 AM
:PRTX:START
ret = read.parameters.people(dummy.err.mess)
|#testje
migrate tihra100
:PRTX:END
:STAT:V
:VARI:table	tbcsbp000
table	tbcsbp002
table	tbcsbp004
table	tbcstc006
table	ttihra000

domain	tcmcs.s200m	dummy.err.mess
domain	tcmcs.long	ret

long			day.number


long			var.bptmm100.type
long			var.bptmm100.seqn
domain	bcstr22		var.bptmm100.rgdt
domain	bcstr22		var.bptmm100.trdt		|#147118.n
domain	tisfc.prtm	var.bptmm100.hrea
domain	tccwtt		var.bptmm100.wtsc
domain	tcckow		var.bptmm100.chlt
domain	tisfc.prtm	var.bptmm100.hrma
domain	bcstr22		var.bptmm100.stdt
domain	bcstr22		var.bptmm100.endt
domain	tcprcg		var.bptmm100.perc
domain	tctxtn		var.bptmm100.txta
domain	tccwoc		var.bptmm100.emdp		|#GEN-0205.n

long			var.bptmm111.seqn		|#158562.n
domain	bcstr8		var.bptmm111.gtsk
domain	tcdsca		var.bptmm111.dsca
domain	bcstr8		var.bptmm111.cpcp
domain	tisfc.prtm	var.bptmm111.hrea(8)	|* array
domain	tcckow		var.bptmm111.chlt
domain	bcstr22		var.bptmm111.trdt		|#147118.n
domain	tctxtn		var.bptmm111.txta
domain	tctxtn		var.bptmm111.txtb
domain	tctxtn		var.bptmm111.txtc
domain	tctxtn		var.bptmm111.txtd
domain	tctxtn		var.bptmm111.txte
domain	tctxtn		var.bptmm111.txtf
domain	tctxtn		var.bptmm111.txtg

long			var.bptmm120.seqn		|#158562.n
domain	bcstr22		var.bptmm120.stdt
domain	bcstr22		var.bptmm120.endt
domain	bcstr22		var.bptmm120.rgdt
domain	bcstr22		var.bptmm120.trdt		|#147118.n
domain	tccwtt		var.bptmm120.wtsc
domain	tcckow		var.bptmm120.chlt

static	domain	tctano	s.tano
static	domain	tcbool	s.service.rates.present

long			var.bptmm130.seqn		|#158562.n
domain	bcstr22		var.bptmm130.stdt
domain	bcstr22		var.bptmm130.endt
domain	bcstr22		var.bptmm130.rgdt
domain	bcstr22		var.bptmm130.trdt		|#147118.n
domain	tccwtt		var.bptmm130.wtsc
domain	tcckow		var.bptmm130.chlt
domain	bcstr8		var.bptmm130.cpcp

long			var.bptmm150.seqn
domain	bcstr22		var.bptmm150.stdt
domain	bcstr8		var.bptmm150.gtsk
domain	tcdsca		var.bptmm150.dsca
domain	bcstr8		var.bptmm150.cpcp

long			var.bptmm170.seqn		|#158562.n
domain	bcstr22		var.bptmm170.stdt
domain	bcstr22		var.bptmm170.endt
domain	bcstr22		var.bptmm170.rgdt
domain	bcstr22		var.bptmm170.trdt		|#147118.n
domain	tccwtt		var.bptmm170.wtsc
domain	tcckow		var.bptmm170.chlt

#define	GENERAL_TASK	1
#define	PCS		3
#define	PRODUCTION	4
#define	SERVICE	6

#include	<bic_tt>
|#include "itssma0011"				|#MCR.o
:STBL:tihra100
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:bp
:TCMOD:tmm
:TFLNO:120
:LDAT:1/2/2018 11:26:32 AM
:PRTX:START
ret = read.parameters.people(dummy.err.mess)
|#testje
migrate tihra100
:PRTX:END
:STAT:V
:VARI:table	tbcsbp000
table	tbcsbp002
table	tbcsbp004
table	tbcstc006
table	ttihra000

domain	tcmcs.s200m	dummy.err.mess
domain	tcmcs.long	ret

long			day.number


long			var.bptmm100.type
long			var.bptmm100.seqn
domain	bcstr22		var.bptmm100.rgdt
domain	bcstr22		var.bptmm100.trdt		|#147118.n
domain	tisfc.prtm	var.bptmm100.hrea
domain	tccwtt		var.bptmm100.wtsc
domain	tcckow		var.bptmm100.chlt
domain	tisfc.prtm	var.bptmm100.hrma
domain	bcstr22		var.bptmm100.stdt
domain	bcstr22		var.bptmm100.endt
domain	tcprcg		var.bptmm100.perc
domain	tctxtn		var.bptmm100.txta
domain	tccwoc		var.bptmm100.emdp		|#GEN-0205.n

long			var.bptmm111.seqn		|#158562.n
domain	bcstr8		var.bptmm111.gtsk
domain	tcdsca		var.bptmm111.dsca
domain	bcstr8		var.bptmm111.cpcp
domain	tisfc.prtm	var.bptmm111.hrea(8)	|* array
domain	tcckow		var.bptmm111.chlt
domain	bcstr22		var.bptmm111.trdt		|#147118.n
domain	tctxtn		var.bptmm111.txta
domain	tctxtn		var.bptmm111.txtb
domain	tctxtn		var.bptmm111.txtc
domain	tctxtn		var.bptmm111.txtd
domain	tctxtn		var.bptmm111.txte
domain	tctxtn		var.bptmm111.txtf
domain	tctxtn		var.bptmm111.txtg

long			var.bptmm120.seqn		|#158562.n
domain	bcstr22		var.bptmm120.stdt
domain	bcstr22		var.bptmm120.endt
domain	bcstr22		var.bptmm120.rgdt
domain	bcstr22		var.bptmm120.trdt		|#147118.n
domain	tccwtt		var.bptmm120.wtsc
domain	tcckow		var.bptmm120.chlt

static	domain	tctano	s.tano
static	domain	tcbool	s.service.rates.present

long			var.bptmm130.seqn		|#158562.n
domain	bcstr22		var.bptmm130.stdt
domain	bcstr22		var.bptmm130.endt
domain	bcstr22		var.bptmm130.rgdt
domain	bcstr22		var.bptmm130.trdt		|#147118.n
domain	tccwtt		var.bptmm130.wtsc
domain	tcckow		var.bptmm130.chlt
domain	bcstr8		var.bptmm130.cpcp

long			var.bptmm150.seqn
domain	bcstr22		var.bptmm150.stdt
domain	bcstr8		var.bptmm150.gtsk
domain	tcdsca		var.bptmm150.dsca
domain	bcstr8		var.bptmm150.cpcp

long			var.bptmm170.seqn		|#158562.n
domain	bcstr22		var.bptmm170.stdt
domain	bcstr22		var.bptmm170.endt
domain	bcstr22		var.bptmm170.rgdt
domain	bcstr22		var.bptmm170.trdt		|#147118.n
domain	tccwtt		var.bptmm170.wtsc
domain	tcckow		var.bptmm170.chlt

#define	GENERAL_TASK	1
#define	PCS		3
#define	PRODUCTION	4
#define	SERVICE	6

#include	<bic_tt>
|#include "itssma0011"				|#MCR.o
:STBL:tihra100
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:bp
:TCMOD:tmm
:TFLNO:130
:LDAT:1/2/2018 11:26:33 AM
:PRTX:START
ret = read.parameters.people(dummy.err.mess)
|#testje
migrate tihra100
:PRTX:END
:STAT:V
:VARI:table	tbcsbp000
table	tbcsbp002
table	tbcsbp004
table	tbcstc006
table	ttihra000

domain	tcmcs.s200m	dummy.err.mess
domain	tcmcs.long	ret

long			day.number


long			var.bptmm100.type
long			var.bptmm100.seqn
domain	bcstr22		var.bptmm100.rgdt
domain	bcstr22		var.bptmm100.trdt		|#147118.n
domain	tisfc.prtm	var.bptmm100.hrea
domain	tccwtt		var.bptmm100.wtsc
domain	tcckow		var.bptmm100.chlt
domain	tisfc.prtm	var.bptmm100.hrma
domain	bcstr22		var.bptmm100.stdt
domain	bcstr22		var.bptmm100.endt
domain	tcprcg		var.bptmm100.perc
domain	tctxtn		var.bptmm100.txta
domain	tccwoc		var.bptmm100.emdp		|#GEN-0205.n

long			var.bptmm111.seqn		|#158562.n
domain	bcstr8		var.bptmm111.gtsk
domain	tcdsca		var.bptmm111.dsca
domain	bcstr8		var.bptmm111.cpcp
domain	tisfc.prtm	var.bptmm111.hrea(8)	|* array
domain	tcckow		var.bptmm111.chlt
domain	bcstr22		var.bptmm111.trdt		|#147118.n
domain	tctxtn		var.bptmm111.txta
domain	tctxtn		var.bptmm111.txtb
domain	tctxtn		var.bptmm111.txtc
domain	tctxtn		var.bptmm111.txtd
domain	tctxtn		var.bptmm111.txte
domain	tctxtn		var.bptmm111.txtf
domain	tctxtn		var.bptmm111.txtg

long			var.bptmm120.seqn		|#158562.n
domain	bcstr22		var.bptmm120.stdt
domain	bcstr22		var.bptmm120.endt
domain	bcstr22		var.bptmm120.rgdt
domain	bcstr22		var.bptmm120.trdt		|#147118.n
domain	tccwtt		var.bptmm120.wtsc
domain	tcckow		var.bptmm120.chlt

static	domain	tctano	s.tano
static	domain	tcbool	s.service.rates.present

long			var.bptmm130.seqn		|#158562.n
domain	bcstr22		var.bptmm130.stdt
domain	bcstr22		var.bptmm130.endt
domain	bcstr22		var.bptmm130.rgdt
domain	bcstr22		var.bptmm130.trdt		|#147118.n
domain	tccwtt		var.bptmm130.wtsc
domain	tcckow		var.bptmm130.chlt
domain	bcstr8		var.bptmm130.cpcp

long			var.bptmm150.seqn
domain	bcstr22		var.bptmm150.stdt
domain	bcstr8		var.bptmm150.gtsk
domain	tcdsca		var.bptmm150.dsca
domain	bcstr8		var.bptmm150.cpcp

long			var.bptmm170.seqn		|#158562.n
domain	bcstr22		var.bptmm170.stdt
domain	bcstr22		var.bptmm170.endt
domain	bcstr22		var.bptmm170.rgdt
domain	bcstr22		var.bptmm170.trdt		|#147118.n
domain	tccwtt		var.bptmm170.wtsc
domain	tcckow		var.bptmm170.chlt

#define	GENERAL_TASK	1
#define	PCS		3
#define	PRODUCTION	4
#define	SERVICE	6

#include	<bic_tt>
|#include "itssma0011"				|#MCR.o
:STBL:tihra100
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:bp
:TCMOD:tmm
:TFLNO:150
:LDAT:1/2/2018 11:26:33 AM
:PRTX:START
ret = read.parameters.people(dummy.err.mess)
|#testje
migrate tihra100
:PRTX:END
:STAT:V
:VARI:table	tbcsbp000
table	tbcsbp002
table	tbcsbp004
table	tbcstc006
table	ttihra000

domain	tcmcs.s200m	dummy.err.mess
domain	tcmcs.long	ret

long			day.number


long			var.bptmm100.type
long			var.bptmm100.seqn
domain	bcstr22		var.bptmm100.rgdt
domain	bcstr22		var.bptmm100.trdt		|#147118.n
domain	tisfc.prtm	var.bptmm100.hrea
domain	tccwtt		var.bptmm100.wtsc
domain	tcckow		var.bptmm100.chlt
domain	tisfc.prtm	var.bptmm100.hrma
domain	bcstr22		var.bptmm100.stdt
domain	bcstr22		var.bptmm100.endt
domain	tcprcg		var.bptmm100.perc
domain	tctxtn		var.bptmm100.txta
domain	tccwoc		var.bptmm100.emdp		|#GEN-0205.n

long			var.bptmm111.seqn		|#158562.n
domain	bcstr8		var.bptmm111.gtsk
domain	tcdsca		var.bptmm111.dsca
domain	bcstr8		var.bptmm111.cpcp
domain	tisfc.prtm	var.bptmm111.hrea(8)	|* array
domain	tcckow		var.bptmm111.chlt
domain	bcstr22		var.bptmm111.trdt		|#147118.n
domain	tctxtn		var.bptmm111.txta
domain	tctxtn		var.bptmm111.txtb
domain	tctxtn		var.bptmm111.txtc
domain	tctxtn		var.bptmm111.txtd
domain	tctxtn		var.bptmm111.txte
domain	tctxtn		var.bptmm111.txtf
domain	tctxtn		var.bptmm111.txtg

long			var.bptmm120.seqn		|#158562.n
domain	bcstr22		var.bptmm120.stdt
domain	bcstr22		var.bptmm120.endt
domain	bcstr22		var.bptmm120.rgdt
domain	bcstr22		var.bptmm120.trdt		|#147118.n
domain	tccwtt		var.bptmm120.wtsc
domain	tcckow		var.bptmm120.chlt

static	domain	tctano	s.tano
static	domain	tcbool	s.service.rates.present

long			var.bptmm130.seqn		|#158562.n
domain	bcstr22		var.bptmm130.stdt
domain	bcstr22		var.bptmm130.endt
domain	bcstr22		var.bptmm130.rgdt
domain	bcstr22		var.bptmm130.trdt		|#147118.n
domain	tccwtt		var.bptmm130.wtsc
domain	tcckow		var.bptmm130.chlt
domain	bcstr8		var.bptmm130.cpcp

long			var.bptmm150.seqn
domain	bcstr22		var.bptmm150.stdt
domain	bcstr8		var.bptmm150.gtsk
domain	tcdsca		var.bptmm150.dsca
domain	bcstr8		var.bptmm150.cpcp

long			var.bptmm170.seqn		|#158562.n
domain	bcstr22		var.bptmm170.stdt
domain	bcstr22		var.bptmm170.endt
domain	bcstr22		var.bptmm170.rgdt
domain	bcstr22		var.bptmm170.trdt		|#147118.n
domain	tccwtt		var.bptmm170.wtsc
domain	tcckow		var.bptmm170.chlt

#define	GENERAL_TASK	1
#define	PCS		3
#define	PRODUCTION	4
#define	SERVICE	6

#include	<bic_tt>
|#include "itssma0011"				|#MCR.o
:STBL:tihra100
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:bp
:TCMOD:tmm
:TFLNO:170
:LDAT:1/2/2018 11:26:34 AM
:PRTX:START
ret = read.parameters.people(dummy.err.mess)
|#testje
migrate tihra100
:PRTX:END
:STAT:V
:VARI:table	tbcsbp000
table	tbcsbp002
table	tbcsbp004
table	tbcstc006
table	ttihra000

domain	tcmcs.s200m	dummy.err.mess
domain	tcmcs.long	ret

long			day.number


long			var.bptmm100.type
long			var.bptmm100.seqn
domain	bcstr22		var.bptmm100.rgdt
domain	bcstr22		var.bptmm100.trdt		|#147118.n
domain	tisfc.prtm	var.bptmm100.hrea
domain	tccwtt		var.bptmm100.wtsc
domain	tcckow		var.bptmm100.chlt
domain	tisfc.prtm	var.bptmm100.hrma
domain	bcstr22		var.bptmm100.stdt
domain	bcstr22		var.bptmm100.endt
domain	tcprcg		var.bptmm100.perc
domain	tctxtn		var.bptmm100.txta
domain	tccwoc		var.bptmm100.emdp		|#GEN-0205.n

long			var.bptmm111.seqn		|#158562.n
domain	bcstr8		var.bptmm111.gtsk
domain	tcdsca		var.bptmm111.dsca
domain	bcstr8		var.bptmm111.cpcp
domain	tisfc.prtm	var.bptmm111.hrea(8)	|* array
domain	tcckow		var.bptmm111.chlt
domain	bcstr22		var.bptmm111.trdt		|#147118.n
domain	tctxtn		var.bptmm111.txta
domain	tctxtn		var.bptmm111.txtb
domain	tctxtn		var.bptmm111.txtc
domain	tctxtn		var.bptmm111.txtd
domain	tctxtn		var.bptmm111.txte
domain	tctxtn		var.bptmm111.txtf
domain	tctxtn		var.bptmm111.txtg

long			var.bptmm120.seqn		|#158562.n
domain	bcstr22		var.bptmm120.stdt
domain	bcstr22		var.bptmm120.endt
domain	bcstr22		var.bptmm120.rgdt
domain	bcstr22		var.bptmm120.trdt		|#147118.n
domain	tccwtt		var.bptmm120.wtsc
domain	tcckow		var.bptmm120.chlt

static	domain	tctano	s.tano
static	domain	tcbool	s.service.rates.present

long			var.bptmm130.seqn		|#158562.n
domain	bcstr22		var.bptmm130.stdt
domain	bcstr22		var.bptmm130.endt
domain	bcstr22		var.bptmm130.rgdt
domain	bcstr22		var.bptmm130.trdt		|#147118.n
domain	tccwtt		var.bptmm130.wtsc
domain	tcckow		var.bptmm130.chlt
domain	bcstr8		var.bptmm130.cpcp

long			var.bptmm150.seqn
domain	bcstr22		var.bptmm150.stdt
domain	bcstr8		var.bptmm150.gtsk
domain	tcdsca		var.bptmm150.dsca
domain	bcstr8		var.bptmm150.cpcp

long			var.bptmm170.seqn		|#158562.n
domain	bcstr22		var.bptmm170.stdt
domain	bcstr22		var.bptmm170.endt
domain	bcstr22		var.bptmm170.rgdt
domain	bcstr22		var.bptmm170.trdt		|#147118.n
domain	tccwtt		var.bptmm170.wtsc
domain	tcckow		var.bptmm170.chlt

#define	GENERAL_TASK	1
#define	PCS		3
#define	PRODUCTION	4
#define	SERVICE	6

#include	<bic_tt>
|#include "itssma0011"				|#MCR.o
:STBL:tihra100
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:bp
:TCMOD:tmm
:TFLNO:200
:LDAT:1/2/2018 11:36:05 AM
:PRTX:START
hra.period.definition = false

var.bptmm2xx.ccur = get.home.currency.orig.comp()
var.bptmm2xx.prdt = utc(date.num(), time.num())

ret.long = read.parameters.people(dummy.err.mess)
get.period.table.code.for.ti(var.bptmm2xx.cpdt)

migrate	tihra100

ret.long = read.parameters.common(dummy.err.mess)
ret.long = read.parameters.project(dummy.err.mess)
get.period.table.code.for.tp(var.bptmm2xx.cpdt)
migrate tphrs100
:PRTX:END
:STAT:V
:VARI:table	tbcsbp000
table	tbcsbp002
table	tbcsbp004
table	tbcstc000
table	tbcstc006
table	tbcstc011
table	tbcstc029
table	tbcstp000
table	ttihra000
table	ttpppc001

	domain	tcmcs.s200m	dummy.err.mess
	domain	tcmcs.long	ret.long
	double			ret.double
	domain	bcstr50		ret.string

	domain	tcbool		hra.period.definition

	domain	bcstp.cpdt	var.bptmm2xx.cpdt
	domain	bcstr22		var.bptmm2xx.prdt
	domain	tcccur		var.bptmm2xx.ccur

	domain	bcstr6		var.bptmm200.emno
	domain	tcyrno		var.bptmm200.year
	domain	tcpern		var.bptmm200.peri
	domain	tcmcs.long	var.bptmm200.type
	domain	tcmcs.long	var.bptmm200.psqn
	domain	bcstr22		var.bptmm200.trdt
	domain	bcstr22		var.bptmm200.rgdt
	domain	bcstd.fent	var.bptmm200.cwoc
	domain	tccwtt		var.bptmm200.wtsc
	domain	tisfc.prtm	var.bptmm200.hrea
	domain	tcckow		var.bptmm200.chlt
	domain	tisfc.prtm	var.bptmm200.hrma
	domain	bcstr22		var.bptmm200.stdt
	domain	bcstr22		var.bptmm200.endt
	domain	tcprcg		var.bptmm200.perc
	|domain	tcamnt		var.bptmm200.prlc	|#MCR.so
	|domain	tcamnt		var.bptmm200.prmc
	|domain	tcamnt		var.bptmm200.proc	|#MCR.eo
	
		long		element			|#MCR.sn
	domain	tcamnt		var.bptmm200.prlc(3)	
	domain	tcamnt		var.bptmm200.prmc(3)
	domain	tcamnt		var.bptmm200.proc(3)	|#MCR.en

	domain	tclogn		var.bptmm200.logn
	domain	tctxtn		var.bptmm200.txta
	domain	tccwoc		var.bptmm200.emdp	|#GEN-0205.n

	domain	tcmcs.long	var.bptmm210.psqn
	domain	tcmcs.long	var.bptmm210.swct
	domain	tcdsca		var.bptmm210.dsca
	domain	bcstr8		var.bptmm210.cpcp
	domain	bcstr22		var.bptmm210.stdt
	domain	bcstr22		var.bptmm210.rdat
	domain	tcecrt		var.bptmm210.rate
	domain	tcratf		var.bptmm210.ratf
	domain	bcrtyp		var.bptmm210.rtyp

	domain	bcstr6		var.bptmm211.emno
	domain	tcyrno		var.bptmm211.year
	domain	tcpern		var.bptmm211.peri
	domain	tcmcs.long	var.bptmm211.type
	domain	tcmcs.long	var.bptmm211.psqn
	domain	bcstr9		var.bptmm211.cprj
	domain	bcstr8		var.bptmm211.cspa
	domain	bcstr8		var.bptmm211.cact
	domain	bcstr4		var.bptmm211.cstl
	domain	tcmcs.long	var.bptmm211.swct
	domain	bcstr8		var.bptmm211.ccun
	domain	bcstr8		var.bptmm211.gtsk
	domain	bcstr8		var.bptmm211.expn
	domain	tcdsca		var.bptmm211.dsca
	domain	bccost		var.bptmm211.cpcp
	domain	bcstd.fent	var.bptmm211.cwoc
	domain	tisfc.prtm	var.bptmm211.hrea(8)	|* array
	domain	tcckow		var.bptmm211.chlt
	domain	bcstr22		var.bptmm211.rgdt
	domain	bcstr22		var.bptmm211.trdt
	domain	tcamnt		var.bptmm211.amnt
	domain	bcstr22		var.bptmm211.rdat
	domain	tcecrt		var.bptmm211.rate
	domain	tcratf		var.bptmm211.ratf
	domain	bcrtyp		var.bptmm211.rtyp
	domain	tcamnt		var.bptmm211.prlc(24)	| array
	domain	tcyesno		var.bptmm211.potf
	domain	tclogn		var.bptmm211.logn
	domain	tctxtn		var.bptmm211.txta
	domain	tctxtn		var.bptmm211.txtb
	domain	tctxtn		var.bptmm211.txtc
	domain	tctxtn		var.bptmm211.txtd
	domain	tctxtn		var.bptmm211.txte
	domain	tctxtn		var.bptmm211.txtf
	domain	tctxtn		var.bptmm211.txtg

	domain	bcstr22		var.bptmm220.stdt
	domain	bcstr22		var.bptmm220.endt
	domain	bcstr22		var.bptmm220.rgdt
	domain	bcstr22		var.bptmm220.trdt		|#147118.n
	domain	tcckow		var.bptmm220.chlt
	domain	tcprcg		var.bptmm220.perc
	domain	tcmcs.long	var.bptmm220.psqn		|#158562.n

	domain	bcstr6		var.bptmm230.emno
	domain	tcyrno		var.bptmm230.year
	domain	tcpern		var.bptmm230.peri
	domain	tcmcs.long	var.bptmm230.psqn
	domain	bcstr22		var.bptmm230.stdt
	domain	bcstr22		var.bptmm230.endt
	domain	bcstr22		var.bptmm230.trdt
	domain	bcstr22		var.bptmm230.rgdt
	domain	tccwtt		var.bptmm230.wtsc
	domain	tisfc.prtm	var.bptmm230.hrea
	domain	tcckow		var.bptmm230.chlt
	domain	bcstr9		var.bptmm230.orno
	domain	bcstr8		var.bptmm230.stsk
	domain	bcstd.fent	var.bptmm230.cwoc
	domain	bcstr8		var.bptmm230.cpcp

	|domain	tcamnt		var.bptmm230.prlc	|#MCR.so
	|domain	tcamnt		var.bptmm230.proc	|#MCR.eo
	domain	tcamnt		var.bptmm230.prlc(3)	|#MCR.sn
	domain	tcamnt		var.bptmm230.proc(3)	|#MCR.en

	domain	tclogn		var.bptmm230.logn
	domain	tctxtn		var.bptmm230.txta

	domain	bcstr6		var.bptmm250.emno
	domain	tcyrno		var.bptmm250.year
	domain	tcpern		var.bptmm250.peri
	domain	tcmcs.long	var.bptmm250.psqn
	domain	bcstr22		var.bptmm250.stdt
	domain	bcstr8		var.bptmm250.gtsk
	domain	bcstr8		var.bptmm250.expn
	domain	tcdsca		var.bptmm250.dsca
	domain	bcstd.fent	var.bptmm250.cwoc
	domain	bcstr8		var.bptmm250.cpcp
	domain	tcamnt		var.bptmm250.amnt
	domain	bcstr22		var.bptmm250.rdat
	domain	tcecrt		var.bptmm250.rate
	domain	tcratf		var.bptmm250.ratf
	domain	bcrtyp		var.bptmm250.rtyp
	domain	tcyesno		var.bptmm250.potf

	domain	tcmcs.long	var.bptmm270.psqn		|#158562.n
	domain	bcstr22		var.bptmm270.stdt
	domain	bcstr22		var.bptmm270.endt
	domain	bcstr22		var.bptmm270.rgdt
	domain	bcstr22		var.bptmm270.trdt		|#147118.n
	domain	tcckow		var.bptmm270.chlt

#define	GENERAL_TASK	1
#define	PROJECT	2
#define	PCS		3
#define	PRODUCTION	4
#define	SERVICE_TI	5
#define	SERVICE_TP	6

#define	HOURS_RECORD	true
#define	EXPENSE_RECORD	false

#define TWELVE_HOURS	43200

#include "itppdm0007"	|* Read Task
#include "itppdm0011"	|* Read Indirect Cost
#include "itppdm0066"
|#include "itssma0011"   |MCR.o
:STBL:tihra100,tphrs100
:COMT:START
---  Changes in table design  ---
In %SV hours can be entered in two packages:
- in TI via the %SStihra1101m000 session
- in TP via the %SStphrs1100m000 session

In %SV the actual and the processed hours are stored in one table.

In %TV the hours are centrally registered and processed in the BaanPeople package. In this package the actual and the processed hours are stored in separate tables. If hours are processed, then the tables containing history data are filled. The tables containing actual data remain filled, until the data is explicitly removed via the %TSbptmm1206m000 session.
During migration of processed hours only the history tables are filled.

The hours with transaction type '6 - Production (PMG) Hours' (session %SStihra1101m000) are not supported in %TV. These records will not be migrated.

The architecture of the BaanPeople package is rather different compared to the hours registration modules of %SV. For the history hours the following tables are valid:
%TTbptmm200
%TTbptmm210
%TTbptmm211
%TTbptmm220
%TTbptmm230
%TTbptmm240
%TTbptmm250
%TTbptmm260
%TTbptmm270

The first table stores time data. All other tables store time-, logistic- and costing data.

---  Source and Target Sessions  ---
Hours with transaction type 'Project':
%SStihra1101m000 - %TSbptmm2570m000

Hours with transaction type 'Production':
%SStihra1101m000 - %TSbptmm2520m000

Hours with transaction type 'Service':
%SStihra1101m000 - %TSbptmm2530m000

Hours with transaction type 'Absence' or 'Indirect':
%SStihra1101m000 - %TSbptmm2511m200

Hours with allocation code 'Project':
%SStphrs1100m000 - %TSbptmm2511m000

Hours with allocation code 'Finance' or 'No':
%SStphrs1100m000 - %TSbptmm2511m200

Hours with allocation code 'SMA (Service)':
%SStphrs1100m000 - %TSbptmm2530m000

---  Migration Logic  ---
In %TV the hours record is split into two entities. All time related data is stored in %TTbptmm200. Time-, logistic- and costing data is stored in a logistic table. So one record in %SV always results in (at least) two records in %TV.

Processed records that are available in session %SStihra1101m000:
- Transaction type is 'Project Hours'. The record is migrated to table %TTbptmm270 and to table %TTbptmm200.
- Transaction type is 'Production Hours'. The record is migrated to table %TTbptmm220 and to table %TTbptmm200.
- Transaction type is 'Service Hours'. The record is migrated to table %TTbptmm230 and to table %TTbptmm200.
- Transaction type is 'Absence Hours'. The record is migrated to table %TTbptmm211, to table %TTbptmm250 and to table %TTbptmm200.
- Transaction type is 'Indirect Hours'. The record is migrated to table %TTbptmm211, to table %TTbptmm250 and to table %TTbptmm200.
- Transaction type is 'Production (PMG) Hours'. The record is not migrated.

Final or closed records that are available in session %SStphrs1100m000:
- Allocation code is 'Project'. The record is migrated to table %TTbptmm211, to table %TTbptmm210 and to table %TTbptmm200.
- Allocation code is 'Finance' or 'No'. The record is migrated to table %TTbptmm211, to table %TTbptmm250 and to table %TTbptmm200.
- Allocation code is 'SMA (Service)'. The record is migrated to table %TTbptmm230 and to table %TTbptmm200. Expense records are not migrated.

Note: one record that is stored in the %SStphrs1100m000 session can register hours data for several days. This results in multiple records in %TV. 
Example:
In %SStphrs1100m000 one final record is present with allocation code 'Project'. This record contains hours data for five working days. This results in the following records in %TV:
- One record in table %TTbptmm211 (time and logistic data)
- Five records in %TTbptmm210 (logistic data)
- Five records in %TTbptmm200 (time data)

---  Migration Parameters  ---
%SFbcsbp000.prtc
%SFbcsbp000.dsbt
%SFbcsbp000.cpcp


---  Migration Mapping Tables  ---
%STbcsbp002
%STbcsbp004
%STbcstc006
%STbcstc011
%STbcstc018


---  Technical Notes  ---
Not applicable.


---  Performance  ---
Not applicable.
:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:bp
:TCMOD:tmm
:TFLNO:210
:LDAT:1/2/2018 11:36:06 AM
:PRTX:START
hra.period.definition = false

var.bptmm2xx.ccur = get.home.currency.orig.comp()
var.bptmm2xx.prdt = utc(date.num(), time.num())

ret.long = read.parameters.people(dummy.err.mess)
get.period.table.code.for.ti(var.bptmm2xx.cpdt)

migrate	tihra100

ret.long = read.parameters.common(dummy.err.mess)
ret.long = read.parameters.project(dummy.err.mess)
get.period.table.code.for.tp(var.bptmm2xx.cpdt)
migrate tphrs100
:PRTX:END
:STAT:V
:VARI:table	tbcsbp000
table	tbcsbp002
table	tbcsbp004
table	tbcstc000
table	tbcstc006
table	tbcstc011
table	tbcstc029
table	tbcstp000
table	ttihra000
table	ttpppc001

	domain	tcmcs.s200m	dummy.err.mess
	domain	tcmcs.long	ret.long
	double			ret.double
	domain	bcstr50		ret.string

	domain	tcbool		hra.period.definition

	domain	bcstp.cpdt	var.bptmm2xx.cpdt
	domain	bcstr22		var.bptmm2xx.prdt
	domain	tcccur		var.bptmm2xx.ccur

	domain	bcstr6		var.bptmm200.emno
	domain	tcyrno		var.bptmm200.year
	domain	tcpern		var.bptmm200.peri
	domain	tcmcs.long	var.bptmm200.type
	domain	tcmcs.long	var.bptmm200.psqn
	domain	bcstr22		var.bptmm200.trdt
	domain	bcstr22		var.bptmm200.rgdt
	domain	bcstd.fent	var.bptmm200.cwoc
	domain	tccwtt		var.bptmm200.wtsc
	domain	tisfc.prtm	var.bptmm200.hrea
	domain	tcckow		var.bptmm200.chlt
	domain	tisfc.prtm	var.bptmm200.hrma
	domain	bcstr22		var.bptmm200.stdt
	domain	bcstr22		var.bptmm200.endt
	domain	tcprcg		var.bptmm200.perc
	|domain	tcamnt		var.bptmm200.prlc	|#MCR.so
	|domain	tcamnt		var.bptmm200.prmc
	|domain	tcamnt		var.bptmm200.proc	|#MCR.eo
	
		long		element			|#MCR.sn
	domain	tcamnt		var.bptmm200.prlc(3)	
	domain	tcamnt		var.bptmm200.prmc(3)
	domain	tcamnt		var.bptmm200.proc(3)	|#MCR.en

	domain	tclogn		var.bptmm200.logn
	domain	tctxtn		var.bptmm200.txta
	domain	tccwoc		var.bptmm200.emdp	|#GEN-0205.n

	domain	tcmcs.long	var.bptmm210.psqn
	domain	tcmcs.long	var.bptmm210.swct
	domain	tcdsca		var.bptmm210.dsca
	domain	bcstr8		var.bptmm210.cpcp
	domain	bcstr22		var.bptmm210.stdt
	domain	bcstr22		var.bptmm210.rdat
	domain	tcecrt		var.bptmm210.rate
	domain	tcratf		var.bptmm210.ratf
	domain	bcrtyp		var.bptmm210.rtyp

	domain	bcstr6		var.bptmm211.emno
	domain	tcyrno		var.bptmm211.year
	domain	tcpern		var.bptmm211.peri
	domain	tcmcs.long	var.bptmm211.type
	domain	tcmcs.long	var.bptmm211.psqn
	domain	bcstr9		var.bptmm211.cprj
	domain	bcstr8		var.bptmm211.cspa
	domain	bcstr8		var.bptmm211.cact
	domain	bcstr4		var.bptmm211.cstl
	domain	tcmcs.long	var.bptmm211.swct
	domain	bcstr8		var.bptmm211.ccun
	domain	bcstr8		var.bptmm211.gtsk
	domain	bcstr8		var.bptmm211.expn
	domain	tcdsca		var.bptmm211.dsca
	domain	bccost		var.bptmm211.cpcp
	domain	bcstd.fent	var.bptmm211.cwoc
	domain	tisfc.prtm	var.bptmm211.hrea(8)	|* array
	domain	tcckow		var.bptmm211.chlt
	domain	bcstr22		var.bptmm211.rgdt
	domain	bcstr22		var.bptmm211.trdt
	domain	tcamnt		var.bptmm211.amnt
	domain	bcstr22		var.bptmm211.rdat
	domain	tcecrt		var.bptmm211.rate
	domain	tcratf		var.bptmm211.ratf
	domain	bcrtyp		var.bptmm211.rtyp
	domain	tcamnt		var.bptmm211.prlc(24)	| array
	domain	tcyesno		var.bptmm211.potf
	domain	tclogn		var.bptmm211.logn
	domain	tctxtn		var.bptmm211.txta
	domain	tctxtn		var.bptmm211.txtb
	domain	tctxtn		var.bptmm211.txtc
	domain	tctxtn		var.bptmm211.txtd
	domain	tctxtn		var.bptmm211.txte
	domain	tctxtn		var.bptmm211.txtf
	domain	tctxtn		var.bptmm211.txtg

	domain	bcstr22		var.bptmm220.stdt
	domain	bcstr22		var.bptmm220.endt
	domain	bcstr22		var.bptmm220.rgdt
	domain	bcstr22		var.bptmm220.trdt		|#147118.n
	domain	tcckow		var.bptmm220.chlt
	domain	tcprcg		var.bptmm220.perc
	domain	tcmcs.long	var.bptmm220.psqn		|#158562.n

	domain	bcstr6		var.bptmm230.emno
	domain	tcyrno		var.bptmm230.year
	domain	tcpern		var.bptmm230.peri
	domain	tcmcs.long	var.bptmm230.psqn
	domain	bcstr22		var.bptmm230.stdt
	domain	bcstr22		var.bptmm230.endt
	domain	bcstr22		var.bptmm230.trdt
	domain	bcstr22		var.bptmm230.rgdt
	domain	tccwtt		var.bptmm230.wtsc
	domain	tisfc.prtm	var.bptmm230.hrea
	domain	tcckow		var.bptmm230.chlt
	domain	bcstr9		var.bptmm230.orno
	domain	bcstr8		var.bptmm230.stsk
	domain	bcstd.fent	var.bptmm230.cwoc
	domain	bcstr8		var.bptmm230.cpcp

	|domain	tcamnt		var.bptmm230.prlc	|#MCR.so
	|domain	tcamnt		var.bptmm230.proc	|#MCR.eo
	domain	tcamnt		var.bptmm230.prlc(3)	|#MCR.sn
	domain	tcamnt		var.bptmm230.proc(3)	|#MCR.en

	domain	tclogn		var.bptmm230.logn
	domain	tctxtn		var.bptmm230.txta

	domain	bcstr6		var.bptmm250.emno
	domain	tcyrno		var.bptmm250.year
	domain	tcpern		var.bptmm250.peri
	domain	tcmcs.long	var.bptmm250.psqn
	domain	bcstr22		var.bptmm250.stdt
	domain	bcstr8		var.bptmm250.gtsk
	domain	bcstr8		var.bptmm250.expn
	domain	tcdsca		var.bptmm250.dsca
	domain	bcstd.fent	var.bptmm250.cwoc
	domain	bcstr8		var.bptmm250.cpcp
	domain	tcamnt		var.bptmm250.amnt
	domain	bcstr22		var.bptmm250.rdat
	domain	tcecrt		var.bptmm250.rate
	domain	tcratf		var.bptmm250.ratf
	domain	bcrtyp		var.bptmm250.rtyp
	domain	tcyesno		var.bptmm250.potf

	domain	tcmcs.long	var.bptmm270.psqn		|#158562.n
	domain	bcstr22		var.bptmm270.stdt
	domain	bcstr22		var.bptmm270.endt
	domain	bcstr22		var.bptmm270.rgdt
	domain	bcstr22		var.bptmm270.trdt		|#147118.n
	domain	tcckow		var.bptmm270.chlt

#define	GENERAL_TASK	1
#define	PROJECT	2
#define	PCS		3
#define	PRODUCTION	4
#define	SERVICE_TI	5
#define	SERVICE_TP	6

#define	HOURS_RECORD	true
#define	EXPENSE_RECORD	false

#define TWELVE_HOURS	43200

#include "itppdm0007"	|* Read Task
#include "itppdm0011"	|* Read Indirect Cost
#include "itppdm0066"
|#include "itssma0011"   |MCR.o
:STBL:tihra100,tphrs100
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:bp
:TCMOD:tmm
:TFLNO:211
:LDAT:1/2/2018 11:36:07 AM
:PRTX:START
hra.period.definition = false

var.bptmm2xx.ccur = get.home.currency.orig.comp()
var.bptmm2xx.prdt = utc(date.num(), time.num())

ret.long = read.parameters.people(dummy.err.mess)
get.period.table.code.for.ti(var.bptmm2xx.cpdt)

migrate	tihra100

ret.long = read.parameters.common(dummy.err.mess)
ret.long = read.parameters.project(dummy.err.mess)
get.period.table.code.for.tp(var.bptmm2xx.cpdt)
migrate tphrs100
:PRTX:END
:STAT:V
:VARI:table	tbcsbp000
table	tbcsbp002
table	tbcsbp004
table	tbcstc000
table	tbcstc006
table	tbcstc011
table	tbcstc029
table	tbcstp000
table	ttihra000
table	ttpppc001

	domain	tcmcs.s200m	dummy.err.mess
	domain	tcmcs.long	ret.long
	double			ret.double
	domain	bcstr50		ret.string

	domain	tcbool		hra.period.definition

	domain	bcstp.cpdt	var.bptmm2xx.cpdt
	domain	bcstr22		var.bptmm2xx.prdt
	domain	tcccur		var.bptmm2xx.ccur

	domain	bcstr6		var.bptmm200.emno
	domain	tcyrno		var.bptmm200.year
	domain	tcpern		var.bptmm200.peri
	domain	tcmcs.long	var.bptmm200.type
	domain	tcmcs.long	var.bptmm200.psqn
	domain	bcstr22		var.bptmm200.trdt
	domain	bcstr22		var.bptmm200.rgdt
	domain	bcstd.fent	var.bptmm200.cwoc
	domain	tccwtt		var.bptmm200.wtsc
	domain	tisfc.prtm	var.bptmm200.hrea
	domain	tcckow		var.bptmm200.chlt
	domain	tisfc.prtm	var.bptmm200.hrma
	domain	bcstr22		var.bptmm200.stdt
	domain	bcstr22		var.bptmm200.endt
	domain	tcprcg		var.bptmm200.perc
	|domain	tcamnt		var.bptmm200.prlc	|#MCR.so
	|domain	tcamnt		var.bptmm200.prmc
	|domain	tcamnt		var.bptmm200.proc	|#MCR.eo
	
		long		element			|#MCR.sn
	domain	tcamnt		var.bptmm200.prlc(3)	
	domain	tcamnt		var.bptmm200.prmc(3)
	domain	tcamnt		var.bptmm200.proc(3)	|#MCR.en

	domain	tclogn		var.bptmm200.logn
	domain	tctxtn		var.bptmm200.txta
	domain	tccwoc		var.bptmm200.emdp	|#GEN-0205.n

	domain	tcmcs.long	var.bptmm210.psqn
	domain	tcmcs.long	var.bptmm210.swct
	domain	tcdsca		var.bptmm210.dsca
	domain	bcstr8		var.bptmm210.cpcp
	domain	bcstr22		var.bptmm210.stdt
	domain	bcstr22		var.bptmm210.rdat
	domain	tcecrt		var.bptmm210.rate
	domain	tcratf		var.bptmm210.ratf
	domain	bcrtyp		var.bptmm210.rtyp

	domain	bcstr6		var.bptmm211.emno
	domain	tcyrno		var.bptmm211.year
	domain	tcpern		var.bptmm211.peri
	domain	tcmcs.long	var.bptmm211.type
	domain	tcmcs.long	var.bptmm211.psqn
	domain	bcstr9		var.bptmm211.cprj
	domain	bcstr8		var.bptmm211.cspa
	domain	bcstr8		var.bptmm211.cact
	domain	bcstr4		var.bptmm211.cstl
	domain	tcmcs.long	var.bptmm211.swct
	domain	bcstr8		var.bptmm211.ccun
	domain	bcstr8		var.bptmm211.gtsk
	domain	bcstr8		var.bptmm211.expn
	domain	tcdsca		var.bptmm211.dsca
	domain	bccost		var.bptmm211.cpcp
	domain	bcstd.fent	var.bptmm211.cwoc
	domain	tisfc.prtm	var.bptmm211.hrea(8)	|* array
	domain	tcckow		var.bptmm211.chlt
	domain	bcstr22		var.bptmm211.rgdt
	domain	bcstr22		var.bptmm211.trdt
	domain	tcamnt		var.bptmm211.amnt
	domain	bcstr22		var.bptmm211.rdat
	domain	tcecrt		var.bptmm211.rate
	domain	tcratf		var.bptmm211.ratf
	domain	bcrtyp		var.bptmm211.rtyp
	domain	tcamnt		var.bptmm211.prlc(24)	| array
	domain	tcyesno		var.bptmm211.potf
	domain	tclogn		var.bptmm211.logn
	domain	tctxtn		var.bptmm211.txta
	domain	tctxtn		var.bptmm211.txtb
	domain	tctxtn		var.bptmm211.txtc
	domain	tctxtn		var.bptmm211.txtd
	domain	tctxtn		var.bptmm211.txte
	domain	tctxtn		var.bptmm211.txtf
	domain	tctxtn		var.bptmm211.txtg

	domain	bcstr22		var.bptmm220.stdt
	domain	bcstr22		var.bptmm220.endt
	domain	bcstr22		var.bptmm220.rgdt
	domain	bcstr22		var.bptmm220.trdt		|#147118.n
	domain	tcckow		var.bptmm220.chlt
	domain	tcprcg		var.bptmm220.perc
	domain	tcmcs.long	var.bptmm220.psqn		|#158562.n

	domain	bcstr6		var.bptmm230.emno
	domain	tcyrno		var.bptmm230.year
	domain	tcpern		var.bptmm230.peri
	domain	tcmcs.long	var.bptmm230.psqn
	domain	bcstr22		var.bptmm230.stdt
	domain	bcstr22		var.bptmm230.endt
	domain	bcstr22		var.bptmm230.trdt
	domain	bcstr22		var.bptmm230.rgdt
	domain	tccwtt		var.bptmm230.wtsc
	domain	tisfc.prtm	var.bptmm230.hrea
	domain	tcckow		var.bptmm230.chlt
	domain	bcstr9		var.bptmm230.orno
	domain	bcstr8		var.bptmm230.stsk
	domain	bcstd.fent	var.bptmm230.cwoc
	domain	bcstr8		var.bptmm230.cpcp

	|domain	tcamnt		var.bptmm230.prlc	|#MCR.so
	|domain	tcamnt		var.bptmm230.proc	|#MCR.eo
	domain	tcamnt		var.bptmm230.prlc(3)	|#MCR.sn
	domain	tcamnt		var.bptmm230.proc(3)	|#MCR.en

	domain	tclogn		var.bptmm230.logn
	domain	tctxtn		var.bptmm230.txta

	domain	bcstr6		var.bptmm250.emno
	domain	tcyrno		var.bptmm250.year
	domain	tcpern		var.bptmm250.peri
	domain	tcmcs.long	var.bptmm250.psqn
	domain	bcstr22		var.bptmm250.stdt
	domain	bcstr8		var.bptmm250.gtsk
	domain	bcstr8		var.bptmm250.expn
	domain	tcdsca		var.bptmm250.dsca
	domain	bcstd.fent	var.bptmm250.cwoc
	domain	bcstr8		var.bptmm250.cpcp
	domain	tcamnt		var.bptmm250.amnt
	domain	bcstr22		var.bptmm250.rdat
	domain	tcecrt		var.bptmm250.rate
	domain	tcratf		var.bptmm250.ratf
	domain	bcrtyp		var.bptmm250.rtyp
	domain	tcyesno		var.bptmm250.potf

	domain	tcmcs.long	var.bptmm270.psqn		|#158562.n
	domain	bcstr22		var.bptmm270.stdt
	domain	bcstr22		var.bptmm270.endt
	domain	bcstr22		var.bptmm270.rgdt
	domain	bcstr22		var.bptmm270.trdt		|#147118.n
	domain	tcckow		var.bptmm270.chlt

#define	GENERAL_TASK	1
#define	PROJECT	2
#define	PCS		3
#define	PRODUCTION	4
#define	SERVICE_TI	5
#define	SERVICE_TP	6

#define	HOURS_RECORD	true
#define	EXPENSE_RECORD	false

#define TWELVE_HOURS	43200

#include "itppdm0007"	|* Read Task
#include "itppdm0011"	|* Read Indirect Cost
#include "itppdm0066"
|#include "itssma0011"   |MCR.o
:STBL:tihra100,tphrs100
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:bp
:TCMOD:tmm
:TFLNO:220
:LDAT:1/2/2018 11:36:08 AM
:PRTX:START
hra.period.definition = false

var.bptmm2xx.ccur = get.home.currency.orig.comp()
var.bptmm2xx.prdt = utc(date.num(), time.num())

ret.long = read.parameters.people(dummy.err.mess)
get.period.table.code.for.ti(var.bptmm2xx.cpdt)

migrate	tihra100

ret.long = read.parameters.common(dummy.err.mess)
ret.long = read.parameters.project(dummy.err.mess)
get.period.table.code.for.tp(var.bptmm2xx.cpdt)
migrate tphrs100
:PRTX:END
:STAT:V
:VARI:table	tbcsbp000
table	tbcsbp002
table	tbcsbp004
table	tbcstc000
table	tbcstc006
table	tbcstc011
table	tbcstc029
table	tbcstp000
table	ttihra000
table	ttpppc001

	domain	tcmcs.s200m	dummy.err.mess
	domain	tcmcs.long	ret.long
	double			ret.double
	domain	bcstr50		ret.string

	domain	tcbool		hra.period.definition

	domain	bcstp.cpdt	var.bptmm2xx.cpdt
	domain	bcstr22		var.bptmm2xx.prdt
	domain	tcccur		var.bptmm2xx.ccur

	domain	bcstr6		var.bptmm200.emno
	domain	tcyrno		var.bptmm200.year
	domain	tcpern		var.bptmm200.peri
	domain	tcmcs.long	var.bptmm200.type
	domain	tcmcs.long	var.bptmm200.psqn
	domain	bcstr22		var.bptmm200.trdt
	domain	bcstr22		var.bptmm200.rgdt
	domain	bcstd.fent	var.bptmm200.cwoc
	domain	tccwtt		var.bptmm200.wtsc
	domain	tisfc.prtm	var.bptmm200.hrea
	domain	tcckow		var.bptmm200.chlt
	domain	tisfc.prtm	var.bptmm200.hrma
	domain	bcstr22		var.bptmm200.stdt
	domain	bcstr22		var.bptmm200.endt
	domain	tcprcg		var.bptmm200.perc
	|domain	tcamnt		var.bptmm200.prlc	|#MCR.so
	|domain	tcamnt		var.bptmm200.prmc
	|domain	tcamnt		var.bptmm200.proc	|#MCR.eo
	
		long		element			|#MCR.sn
	domain	tcamnt		var.bptmm200.prlc(3)	
	domain	tcamnt		var.bptmm200.prmc(3)
	domain	tcamnt		var.bptmm200.proc(3)	|#MCR.en

	domain	tclogn		var.bptmm200.logn
	domain	tctxtn		var.bptmm200.txta
	domain	tccwoc		var.bptmm200.emdp	|#GEN-0205.n

	domain	tcmcs.long	var.bptmm210.psqn
	domain	tcmcs.long	var.bptmm210.swct
	domain	tcdsca		var.bptmm210.dsca
	domain	bcstr8		var.bptmm210.cpcp
	domain	bcstr22		var.bptmm210.stdt
	domain	bcstr22		var.bptmm210.rdat
	domain	tcecrt		var.bptmm210.rate
	domain	tcratf		var.bptmm210.ratf
	domain	bcrtyp		var.bptmm210.rtyp

	domain	bcstr6		var.bptmm211.emno
	domain	tcyrno		var.bptmm211.year
	domain	tcpern		var.bptmm211.peri
	domain	tcmcs.long	var.bptmm211.type
	domain	tcmcs.long	var.bptmm211.psqn
	domain	bcstr9		var.bptmm211.cprj
	domain	bcstr8		var.bptmm211.cspa
	domain	bcstr8		var.bptmm211.cact
	domain	bcstr4		var.bptmm211.cstl
	domain	tcmcs.long	var.bptmm211.swct
	domain	bcstr8		var.bptmm211.ccun
	domain	bcstr8		var.bptmm211.gtsk
	domain	bcstr8		var.bptmm211.expn
	domain	tcdsca		var.bptmm211.dsca
	domain	bccost		var.bptmm211.cpcp
	domain	bcstd.fent	var.bptmm211.cwoc
	domain	tisfc.prtm	var.bptmm211.hrea(8)	|* array
	domain	tcckow		var.bptmm211.chlt
	domain	bcstr22		var.bptmm211.rgdt
	domain	bcstr22		var.bptmm211.trdt
	domain	tcamnt		var.bptmm211.amnt
	domain	bcstr22		var.bptmm211.rdat
	domain	tcecrt		var.bptmm211.rate
	domain	tcratf		var.bptmm211.ratf
	domain	bcrtyp		var.bptmm211.rtyp
	domain	tcamnt		var.bptmm211.prlc(24)	| array
	domain	tcyesno		var.bptmm211.potf
	domain	tclogn		var.bptmm211.logn
	domain	tctxtn		var.bptmm211.txta
	domain	tctxtn		var.bptmm211.txtb
	domain	tctxtn		var.bptmm211.txtc
	domain	tctxtn		var.bptmm211.txtd
	domain	tctxtn		var.bptmm211.txte
	domain	tctxtn		var.bptmm211.txtf
	domain	tctxtn		var.bptmm211.txtg

	domain	bcstr22		var.bptmm220.stdt
	domain	bcstr22		var.bptmm220.endt
	domain	bcstr22		var.bptmm220.rgdt
	domain	bcstr22		var.bptmm220.trdt		|#147118.n
	domain	tcckow		var.bptmm220.chlt
	domain	tcprcg		var.bptmm220.perc
	domain	tcmcs.long	var.bptmm220.psqn		|#158562.n

	domain	bcstr6		var.bptmm230.emno
	domain	tcyrno		var.bptmm230.year
	domain	tcpern		var.bptmm230.peri
	domain	tcmcs.long	var.bptmm230.psqn
	domain	bcstr22		var.bptmm230.stdt
	domain	bcstr22		var.bptmm230.endt
	domain	bcstr22		var.bptmm230.trdt
	domain	bcstr22		var.bptmm230.rgdt
	domain	tccwtt		var.bptmm230.wtsc
	domain	tisfc.prtm	var.bptmm230.hrea
	domain	tcckow		var.bptmm230.chlt
	domain	bcstr9		var.bptmm230.orno
	domain	bcstr8		var.bptmm230.stsk
	domain	bcstd.fent	var.bptmm230.cwoc
	domain	bcstr8		var.bptmm230.cpcp

	|domain	tcamnt		var.bptmm230.prlc	|#MCR.so
	|domain	tcamnt		var.bptmm230.proc	|#MCR.eo
	domain	tcamnt		var.bptmm230.prlc(3)	|#MCR.sn
	domain	tcamnt		var.bptmm230.proc(3)	|#MCR.en

	domain	tclogn		var.bptmm230.logn
	domain	tctxtn		var.bptmm230.txta

	domain	bcstr6		var.bptmm250.emno
	domain	tcyrno		var.bptmm250.year
	domain	tcpern		var.bptmm250.peri
	domain	tcmcs.long	var.bptmm250.psqn
	domain	bcstr22		var.bptmm250.stdt
	domain	bcstr8		var.bptmm250.gtsk
	domain	bcstr8		var.bptmm250.expn
	domain	tcdsca		var.bptmm250.dsca
	domain	bcstd.fent	var.bptmm250.cwoc
	domain	bcstr8		var.bptmm250.cpcp
	domain	tcamnt		var.bptmm250.amnt
	domain	bcstr22		var.bptmm250.rdat
	domain	tcecrt		var.bptmm250.rate
	domain	tcratf		var.bptmm250.ratf
	domain	bcrtyp		var.bptmm250.rtyp
	domain	tcyesno		var.bptmm250.potf

	domain	tcmcs.long	var.bptmm270.psqn		|#158562.n
	domain	bcstr22		var.bptmm270.stdt
	domain	bcstr22		var.bptmm270.endt
	domain	bcstr22		var.bptmm270.rgdt
	domain	bcstr22		var.bptmm270.trdt		|#147118.n
	domain	tcckow		var.bptmm270.chlt

#define	GENERAL_TASK	1
#define	PROJECT	2
#define	PCS		3
#define	PRODUCTION	4
#define	SERVICE_TI	5
#define	SERVICE_TP	6

#define	HOURS_RECORD	true
#define	EXPENSE_RECORD	false

#define TWELVE_HOURS	43200

#include "itppdm0007"	|* Read Task
#include "itppdm0011"	|* Read Indirect Cost
#include "itppdm0066"
|#include "itssma0011"   |MCR.o
:STBL:tihra100,tphrs100
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:bp
:TCMOD:tmm
:TFLNO:230
:LDAT:1/2/2018 11:36:08 AM
:PRTX:START
hra.period.definition = false

var.bptmm2xx.ccur = get.home.currency.orig.comp()
var.bptmm2xx.prdt = utc(date.num(), time.num())

ret.long = read.parameters.people(dummy.err.mess)
get.period.table.code.for.ti(var.bptmm2xx.cpdt)

migrate	tihra100

ret.long = read.parameters.common(dummy.err.mess)
ret.long = read.parameters.project(dummy.err.mess)
get.period.table.code.for.tp(var.bptmm2xx.cpdt)
migrate tphrs100
:PRTX:END
:STAT:V
:VARI:table	tbcsbp000
table	tbcsbp002
table	tbcsbp004
table	tbcstc000
table	tbcstc006
table	tbcstc011
table	tbcstc029
table	tbcstp000
table	ttihra000
table	ttpppc001

	domain	tcmcs.s200m	dummy.err.mess
	domain	tcmcs.long	ret.long
	double			ret.double
	domain	bcstr50		ret.string

	domain	tcbool		hra.period.definition

	domain	bcstp.cpdt	var.bptmm2xx.cpdt
	domain	bcstr22		var.bptmm2xx.prdt
	domain	tcccur		var.bptmm2xx.ccur

	domain	bcstr6		var.bptmm200.emno
	domain	tcyrno		var.bptmm200.year
	domain	tcpern		var.bptmm200.peri
	domain	tcmcs.long	var.bptmm200.type
	domain	tcmcs.long	var.bptmm200.psqn
	domain	bcstr22		var.bptmm200.trdt
	domain	bcstr22		var.bptmm200.rgdt
	domain	bcstd.fent	var.bptmm200.cwoc
	domain	tccwtt		var.bptmm200.wtsc
	domain	tisfc.prtm	var.bptmm200.hrea
	domain	tcckow		var.bptmm200.chlt
	domain	tisfc.prtm	var.bptmm200.hrma
	domain	bcstr22		var.bptmm200.stdt
	domain	bcstr22		var.bptmm200.endt
	domain	tcprcg		var.bptmm200.perc
	|domain	tcamnt		var.bptmm200.prlc	|#MCR.so
	|domain	tcamnt		var.bptmm200.prmc
	|domain	tcamnt		var.bptmm200.proc	|#MCR.eo
	
		long		element			|#MCR.sn
	domain	tcamnt		var.bptmm200.prlc(3)	
	domain	tcamnt		var.bptmm200.prmc(3)
	domain	tcamnt		var.bptmm200.proc(3)	|#MCR.en

	domain	tclogn		var.bptmm200.logn
	domain	tctxtn		var.bptmm200.txta
	domain	tccwoc		var.bptmm200.emdp	|#GEN-0205.n

	domain	tcmcs.long	var.bptmm210.psqn
	domain	tcmcs.long	var.bptmm210.swct
	domain	tcdsca		var.bptmm210.dsca
	domain	bcstr8		var.bptmm210.cpcp
	domain	bcstr22		var.bptmm210.stdt
	domain	bcstr22		var.bptmm210.rdat
	domain	tcecrt		var.bptmm210.rate
	domain	tcratf		var.bptmm210.ratf
	domain	bcrtyp		var.bptmm210.rtyp

	domain	bcstr6		var.bptmm211.emno
	domain	tcyrno		var.bptmm211.year
	domain	tcpern		var.bptmm211.peri
	domain	tcmcs.long	var.bptmm211.type
	domain	tcmcs.long	var.bptmm211.psqn
	domain	bcstr9		var.bptmm211.cprj
	domain	bcstr8		var.bptmm211.cspa
	domain	bcstr8		var.bptmm211.cact
	domain	bcstr4		var.bptmm211.cstl
	domain	tcmcs.long	var.bptmm211.swct
	domain	bcstr8		var.bptmm211.ccun
	domain	bcstr8		var.bptmm211.gtsk
	domain	bcstr8		var.bptmm211.expn
	domain	tcdsca		var.bptmm211.dsca
	domain	bccost		var.bptmm211.cpcp
	domain	bcstd.fent	var.bptmm211.cwoc
	domain	tisfc.prtm	var.bptmm211.hrea(8)	|* array
	domain	tcckow		var.bptmm211.chlt
	domain	bcstr22		var.bptmm211.rgdt
	domain	bcstr22		var.bptmm211.trdt
	domain	tcamnt		var.bptmm211.amnt
	domain	bcstr22		var.bptmm211.rdat
	domain	tcecrt		var.bptmm211.rate
	domain	tcratf		var.bptmm211.ratf
	domain	bcrtyp		var.bptmm211.rtyp
	domain	tcamnt		var.bptmm211.prlc(24)	| array
	domain	tcyesno		var.bptmm211.potf
	domain	tclogn		var.bptmm211.logn
	domain	tctxtn		var.bptmm211.txta
	domain	tctxtn		var.bptmm211.txtb
	domain	tctxtn		var.bptmm211.txtc
	domain	tctxtn		var.bptmm211.txtd
	domain	tctxtn		var.bptmm211.txte
	domain	tctxtn		var.bptmm211.txtf
	domain	tctxtn		var.bptmm211.txtg

	domain	bcstr22		var.bptmm220.stdt
	domain	bcstr22		var.bptmm220.endt
	domain	bcstr22		var.bptmm220.rgdt
	domain	bcstr22		var.bptmm220.trdt		|#147118.n
	domain	tcckow		var.bptmm220.chlt
	domain	tcprcg		var.bptmm220.perc
	domain	tcmcs.long	var.bptmm220.psqn		|#158562.n

	domain	bcstr6		var.bptmm230.emno
	domain	tcyrno		var.bptmm230.year
	domain	tcpern		var.bptmm230.peri
	domain	tcmcs.long	var.bptmm230.psqn
	domain	bcstr22		var.bptmm230.stdt
	domain	bcstr22		var.bptmm230.endt
	domain	bcstr22		var.bptmm230.trdt
	domain	bcstr22		var.bptmm230.rgdt
	domain	tccwtt		var.bptmm230.wtsc
	domain	tisfc.prtm	var.bptmm230.hrea
	domain	tcckow		var.bptmm230.chlt
	domain	bcstr9		var.bptmm230.orno
	domain	bcstr8		var.bptmm230.stsk
	domain	bcstd.fent	var.bptmm230.cwoc
	domain	bcstr8		var.bptmm230.cpcp

	|domain	tcamnt		var.bptmm230.prlc	|#MCR.so
	|domain	tcamnt		var.bptmm230.proc	|#MCR.eo
	domain	tcamnt		var.bptmm230.prlc(3)	|#MCR.sn
	domain	tcamnt		var.bptmm230.proc(3)	|#MCR.en

	domain	tclogn		var.bptmm230.logn
	domain	tctxtn		var.bptmm230.txta

	domain	bcstr6		var.bptmm250.emno
	domain	tcyrno		var.bptmm250.year
	domain	tcpern		var.bptmm250.peri
	domain	tcmcs.long	var.bptmm250.psqn
	domain	bcstr22		var.bptmm250.stdt
	domain	bcstr8		var.bptmm250.gtsk
	domain	bcstr8		var.bptmm250.expn
	domain	tcdsca		var.bptmm250.dsca
	domain	bcstd.fent	var.bptmm250.cwoc
	domain	bcstr8		var.bptmm250.cpcp
	domain	tcamnt		var.bptmm250.amnt
	domain	bcstr22		var.bptmm250.rdat
	domain	tcecrt		var.bptmm250.rate
	domain	tcratf		var.bptmm250.ratf
	domain	bcrtyp		var.bptmm250.rtyp
	domain	tcyesno		var.bptmm250.potf

	domain	tcmcs.long	var.bptmm270.psqn		|#158562.n
	domain	bcstr22		var.bptmm270.stdt
	domain	bcstr22		var.bptmm270.endt
	domain	bcstr22		var.bptmm270.rgdt
	domain	bcstr22		var.bptmm270.trdt		|#147118.n
	domain	tcckow		var.bptmm270.chlt

#define	GENERAL_TASK	1
#define	PROJECT	2
#define	PCS		3
#define	PRODUCTION	4
#define	SERVICE_TI	5
#define	SERVICE_TP	6

#define	HOURS_RECORD	true
#define	EXPENSE_RECORD	false

#define TWELVE_HOURS	43200

#include "itppdm0007"	|* Read Task
#include "itppdm0011"	|* Read Indirect Cost
#include "itppdm0066"
|#include "itssma0011"   |MCR.o
:STBL:tihra100,tphrs100
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:bp
:TCMOD:tmm
:TFLNO:250
:LDAT:1/2/2018 11:36:09 AM
:PRTX:START
hra.period.definition = false

var.bptmm2xx.ccur = get.home.currency.orig.comp()
var.bptmm2xx.prdt = utc(date.num(), time.num())

ret.long = read.parameters.people(dummy.err.mess)
get.period.table.code.for.ti(var.bptmm2xx.cpdt)

migrate	tihra100

ret.long = read.parameters.common(dummy.err.mess)
ret.long = read.parameters.project(dummy.err.mess)
get.period.table.code.for.tp(var.bptmm2xx.cpdt)
migrate tphrs100
:PRTX:END
:STAT:V
:VARI:table	tbcsbp000
table	tbcsbp002
table	tbcsbp004
table	tbcstc000
table	tbcstc006
table	tbcstc011
table	tbcstc029
table	tbcstp000
table	ttihra000
table	ttpppc001

	domain	tcmcs.s200m	dummy.err.mess
	domain	tcmcs.long	ret.long
	double			ret.double
	domain	bcstr50		ret.string

	domain	tcbool		hra.period.definition

	domain	bcstp.cpdt	var.bptmm2xx.cpdt
	domain	bcstr22		var.bptmm2xx.prdt
	domain	tcccur		var.bptmm2xx.ccur

	domain	bcstr6		var.bptmm200.emno
	domain	tcyrno		var.bptmm200.year
	domain	tcpern		var.bptmm200.peri
	domain	tcmcs.long	var.bptmm200.type
	domain	tcmcs.long	var.bptmm200.psqn
	domain	bcstr22		var.bptmm200.trdt
	domain	bcstr22		var.bptmm200.rgdt
	domain	bcstd.fent	var.bptmm200.cwoc
	domain	tccwtt		var.bptmm200.wtsc
	domain	tisfc.prtm	var.bptmm200.hrea
	domain	tcckow		var.bptmm200.chlt
	domain	tisfc.prtm	var.bptmm200.hrma
	domain	bcstr22		var.bptmm200.stdt
	domain	bcstr22		var.bptmm200.endt
	domain	tcprcg		var.bptmm200.perc
	|domain	tcamnt		var.bptmm200.prlc	|#MCR.so
	|domain	tcamnt		var.bptmm200.prmc
	|domain	tcamnt		var.bptmm200.proc	|#MCR.eo
	
		long		element			|#MCR.sn
	domain	tcamnt		var.bptmm200.prlc(3)	
	domain	tcamnt		var.bptmm200.prmc(3)
	domain	tcamnt		var.bptmm200.proc(3)	|#MCR.en

	domain	tclogn		var.bptmm200.logn
	domain	tctxtn		var.bptmm200.txta
	domain	tccwoc		var.bptmm200.emdp	|#GEN-0205.n

	domain	tcmcs.long	var.bptmm210.psqn
	domain	tcmcs.long	var.bptmm210.swct
	domain	tcdsca		var.bptmm210.dsca
	domain	bcstr8		var.bptmm210.cpcp
	domain	bcstr22		var.bptmm210.stdt
	domain	bcstr22		var.bptmm210.rdat
	domain	tcecrt		var.bptmm210.rate
	domain	tcratf		var.bptmm210.ratf
	domain	bcrtyp		var.bptmm210.rtyp

	domain	bcstr6		var.bptmm211.emno
	domain	tcyrno		var.bptmm211.year
	domain	tcpern		var.bptmm211.peri
	domain	tcmcs.long	var.bptmm211.type
	domain	tcmcs.long	var.bptmm211.psqn
	domain	bcstr9		var.bptmm211.cprj
	domain	bcstr8		var.bptmm211.cspa
	domain	bcstr8		var.bptmm211.cact
	domain	bcstr4		var.bptmm211.cstl
	domain	tcmcs.long	var.bptmm211.swct
	domain	bcstr8		var.bptmm211.ccun
	domain	bcstr8		var.bptmm211.gtsk
	domain	bcstr8		var.bptmm211.expn
	domain	tcdsca		var.bptmm211.dsca
	domain	bccost		var.bptmm211.cpcp
	domain	bcstd.fent	var.bptmm211.cwoc
	domain	tisfc.prtm	var.bptmm211.hrea(8)	|* array
	domain	tcckow		var.bptmm211.chlt
	domain	bcstr22		var.bptmm211.rgdt
	domain	bcstr22		var.bptmm211.trdt
	domain	tcamnt		var.bptmm211.amnt
	domain	bcstr22		var.bptmm211.rdat
	domain	tcecrt		var.bptmm211.rate
	domain	tcratf		var.bptmm211.ratf
	domain	bcrtyp		var.bptmm211.rtyp
	domain	tcamnt		var.bptmm211.prlc(24)	| array
	domain	tcyesno		var.bptmm211.potf
	domain	tclogn		var.bptmm211.logn
	domain	tctxtn		var.bptmm211.txta
	domain	tctxtn		var.bptmm211.txtb
	domain	tctxtn		var.bptmm211.txtc
	domain	tctxtn		var.bptmm211.txtd
	domain	tctxtn		var.bptmm211.txte
	domain	tctxtn		var.bptmm211.txtf
	domain	tctxtn		var.bptmm211.txtg

	domain	bcstr22		var.bptmm220.stdt
	domain	bcstr22		var.bptmm220.endt
	domain	bcstr22		var.bptmm220.rgdt
	domain	bcstr22		var.bptmm220.trdt		|#147118.n
	domain	tcckow		var.bptmm220.chlt
	domain	tcprcg		var.bptmm220.perc
	domain	tcmcs.long	var.bptmm220.psqn		|#158562.n

	domain	bcstr6		var.bptmm230.emno
	domain	tcyrno		var.bptmm230.year
	domain	tcpern		var.bptmm230.peri
	domain	tcmcs.long	var.bptmm230.psqn
	domain	bcstr22		var.bptmm230.stdt
	domain	bcstr22		var.bptmm230.endt
	domain	bcstr22		var.bptmm230.trdt
	domain	bcstr22		var.bptmm230.rgdt
	domain	tccwtt		var.bptmm230.wtsc
	domain	tisfc.prtm	var.bptmm230.hrea
	domain	tcckow		var.bptmm230.chlt
	domain	bcstr9		var.bptmm230.orno
	domain	bcstr8		var.bptmm230.stsk
	domain	bcstd.fent	var.bptmm230.cwoc
	domain	bcstr8		var.bptmm230.cpcp

	|domain	tcamnt		var.bptmm230.prlc	|#MCR.so
	|domain	tcamnt		var.bptmm230.proc	|#MCR.eo
	domain	tcamnt		var.bptmm230.prlc(3)	|#MCR.sn
	domain	tcamnt		var.bptmm230.proc(3)	|#MCR.en

	domain	tclogn		var.bptmm230.logn
	domain	tctxtn		var.bptmm230.txta

	domain	bcstr6		var.bptmm250.emno
	domain	tcyrno		var.bptmm250.year
	domain	tcpern		var.bptmm250.peri
	domain	tcmcs.long	var.bptmm250.psqn
	domain	bcstr22		var.bptmm250.stdt
	domain	bcstr8		var.bptmm250.gtsk
	domain	bcstr8		var.bptmm250.expn
	domain	tcdsca		var.bptmm250.dsca
	domain	bcstd.fent	var.bptmm250.cwoc
	domain	bcstr8		var.bptmm250.cpcp
	domain	tcamnt		var.bptmm250.amnt
	domain	bcstr22		var.bptmm250.rdat
	domain	tcecrt		var.bptmm250.rate
	domain	tcratf		var.bptmm250.ratf
	domain	bcrtyp		var.bptmm250.rtyp
	domain	tcyesno		var.bptmm250.potf

	domain	tcmcs.long	var.bptmm270.psqn		|#158562.n
	domain	bcstr22		var.bptmm270.stdt
	domain	bcstr22		var.bptmm270.endt
	domain	bcstr22		var.bptmm270.rgdt
	domain	bcstr22		var.bptmm270.trdt		|#147118.n
	domain	tcckow		var.bptmm270.chlt

#define	GENERAL_TASK	1
#define	PROJECT	2
#define	PCS		3
#define	PRODUCTION	4
#define	SERVICE_TI	5
#define	SERVICE_TP	6

#define	HOURS_RECORD	true
#define	EXPENSE_RECORD	false

#define TWELVE_HOURS	43200

#include "itppdm0007"	|* Read Task
#include "itppdm0011"	|* Read Indirect Cost
#include "itppdm0066"
|#include "itssma0011"   |MCR.o
:STBL:tihra100,tphrs100
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:bp
:TCMOD:tmm
:TFLNO:270
:LDAT:1/2/2018 11:36:09 AM
:PRTX:START
hra.period.definition = false

var.bptmm2xx.ccur = get.home.currency.orig.comp()
var.bptmm2xx.prdt = utc(date.num(), time.num())

ret.long = read.parameters.people(dummy.err.mess)
get.period.table.code.for.ti(var.bptmm2xx.cpdt)

migrate	tihra100

ret.long = read.parameters.common(dummy.err.mess)
ret.long = read.parameters.project(dummy.err.mess)
get.period.table.code.for.tp(var.bptmm2xx.cpdt)
migrate tphrs100
:PRTX:END
:STAT:V
:VARI:table	tbcsbp000
table	tbcsbp002
table	tbcsbp004
table	tbcstc000
table	tbcstc006
table	tbcstc011
table	tbcstc029
table	tbcstp000
table	ttihra000
table	ttpppc001

	domain	tcmcs.s200m	dummy.err.mess
	domain	tcmcs.long	ret.long
	double			ret.double
	domain	bcstr50		ret.string

	domain	tcbool		hra.period.definition

	domain	bcstp.cpdt	var.bptmm2xx.cpdt
	domain	bcstr22		var.bptmm2xx.prdt
	domain	tcccur		var.bptmm2xx.ccur

	domain	bcstr6		var.bptmm200.emno
	domain	tcyrno		var.bptmm200.year
	domain	tcpern		var.bptmm200.peri
	domain	tcmcs.long	var.bptmm200.type
	domain	tcmcs.long	var.bptmm200.psqn
	domain	bcstr22		var.bptmm200.trdt
	domain	bcstr22		var.bptmm200.rgdt
	domain	bcstd.fent	var.bptmm200.cwoc
	domain	tccwtt		var.bptmm200.wtsc
	domain	tisfc.prtm	var.bptmm200.hrea
	domain	tcckow		var.bptmm200.chlt
	domain	tisfc.prtm	var.bptmm200.hrma
	domain	bcstr22		var.bptmm200.stdt
	domain	bcstr22		var.bptmm200.endt
	domain	tcprcg		var.bptmm200.perc
	|domain	tcamnt		var.bptmm200.prlc	|#MCR.so
	|domain	tcamnt		var.bptmm200.prmc
	|domain	tcamnt		var.bptmm200.proc	|#MCR.eo
	
		long		element			|#MCR.sn
	domain	tcamnt		var.bptmm200.prlc(3)	
	domain	tcamnt		var.bptmm200.prmc(3)
	domain	tcamnt		var.bptmm200.proc(3)	|#MCR.en

	domain	tclogn		var.bptmm200.logn
	domain	tctxtn		var.bptmm200.txta
	domain	tccwoc		var.bptmm200.emdp	|#GEN-0205.n

	domain	tcmcs.long	var.bptmm210.psqn
	domain	tcmcs.long	var.bptmm210.swct
	domain	tcdsca		var.bptmm210.dsca
	domain	bcstr8		var.bptmm210.cpcp
	domain	bcstr22		var.bptmm210.stdt
	domain	bcstr22		var.bptmm210.rdat
	domain	tcecrt		var.bptmm210.rate
	domain	tcratf		var.bptmm210.ratf
	domain	bcrtyp		var.bptmm210.rtyp

	domain	bcstr6		var.bptmm211.emno
	domain	tcyrno		var.bptmm211.year
	domain	tcpern		var.bptmm211.peri
	domain	tcmcs.long	var.bptmm211.type
	domain	tcmcs.long	var.bptmm211.psqn
	domain	bcstr9		var.bptmm211.cprj
	domain	bcstr8		var.bptmm211.cspa
	domain	bcstr8		var.bptmm211.cact
	domain	bcstr4		var.bptmm211.cstl
	domain	tcmcs.long	var.bptmm211.swct
	domain	bcstr8		var.bptmm211.ccun
	domain	bcstr8		var.bptmm211.gtsk
	domain	bcstr8		var.bptmm211.expn
	domain	tcdsca		var.bptmm211.dsca
	domain	bccost		var.bptmm211.cpcp
	domain	bcstd.fent	var.bptmm211.cwoc
	domain	tisfc.prtm	var.bptmm211.hrea(8)	|* array
	domain	tcckow		var.bptmm211.chlt
	domain	bcstr22		var.bptmm211.rgdt
	domain	bcstr22		var.bptmm211.trdt
	domain	tcamnt		var.bptmm211.amnt
	domain	bcstr22		var.bptmm211.rdat
	domain	tcecrt		var.bptmm211.rate
	domain	tcratf		var.bptmm211.ratf
	domain	bcrtyp		var.bptmm211.rtyp
	domain	tcamnt		var.bptmm211.prlc(24)	| array
	domain	tcyesno		var.bptmm211.potf
	domain	tclogn		var.bptmm211.logn
	domain	tctxtn		var.bptmm211.txta
	domain	tctxtn		var.bptmm211.txtb
	domain	tctxtn		var.bptmm211.txtc
	domain	tctxtn		var.bptmm211.txtd
	domain	tctxtn		var.bptmm211.txte
	domain	tctxtn		var.bptmm211.txtf
	domain	tctxtn		var.bptmm211.txtg

	domain	bcstr22		var.bptmm220.stdt
	domain	bcstr22		var.bptmm220.endt
	domain	bcstr22		var.bptmm220.rgdt
	domain	bcstr22		var.bptmm220.trdt		|#147118.n
	domain	tcckow		var.bptmm220.chlt
	domain	tcprcg		var.bptmm220.perc
	domain	tcmcs.long	var.bptmm220.psqn		|#158562.n

	domain	bcstr6		var.bptmm230.emno
	domain	tcyrno		var.bptmm230.year
	domain	tcpern		var.bptmm230.peri
	domain	tcmcs.long	var.bptmm230.psqn
	domain	bcstr22		var.bptmm230.stdt
	domain	bcstr22		var.bptmm230.endt
	domain	bcstr22		var.bptmm230.trdt
	domain	bcstr22		var.bptmm230.rgdt
	domain	tccwtt		var.bptmm230.wtsc
	domain	tisfc.prtm	var.bptmm230.hrea
	domain	tcckow		var.bptmm230.chlt
	domain	bcstr9		var.bptmm230.orno
	domain	bcstr8		var.bptmm230.stsk
	domain	bcstd.fent	var.bptmm230.cwoc
	domain	bcstr8		var.bptmm230.cpcp

	|domain	tcamnt		var.bptmm230.prlc	|#MCR.so
	|domain	tcamnt		var.bptmm230.proc	|#MCR.eo
	domain	tcamnt		var.bptmm230.prlc(3)	|#MCR.sn
	domain	tcamnt		var.bptmm230.proc(3)	|#MCR.en

	domain	tclogn		var.bptmm230.logn
	domain	tctxtn		var.bptmm230.txta

	domain	bcstr6		var.bptmm250.emno
	domain	tcyrno		var.bptmm250.year
	domain	tcpern		var.bptmm250.peri
	domain	tcmcs.long	var.bptmm250.psqn
	domain	bcstr22		var.bptmm250.stdt
	domain	bcstr8		var.bptmm250.gtsk
	domain	bcstr8		var.bptmm250.expn
	domain	tcdsca		var.bptmm250.dsca
	domain	bcstd.fent	var.bptmm250.cwoc
	domain	bcstr8		var.bptmm250.cpcp
	domain	tcamnt		var.bptmm250.amnt
	domain	bcstr22		var.bptmm250.rdat
	domain	tcecrt		var.bptmm250.rate
	domain	tcratf		var.bptmm250.ratf
	domain	bcrtyp		var.bptmm250.rtyp
	domain	tcyesno		var.bptmm250.potf

	domain	tcmcs.long	var.bptmm270.psqn		|#158562.n
	domain	bcstr22		var.bptmm270.stdt
	domain	bcstr22		var.bptmm270.endt
	domain	bcstr22		var.bptmm270.rgdt
	domain	bcstr22		var.bptmm270.trdt		|#147118.n
	domain	tcckow		var.bptmm270.chlt

#define	GENERAL_TASK	1
#define	PROJECT	2
#define	PCS		3
#define	PRODUCTION	4
#define	SERVICE_TI	5
#define	SERVICE_TP	6

#define	HOURS_RECORD	true
#define	EXPENSE_RECORD	false

#define TWELVE_HOURS	43200

#include "itppdm0007"	|* Read Task
#include "itppdm0011"	|* Read Indirect Cost
#include "itppdm0066"
|#include "itssma0011"   |MCR.o
:STBL:tihra100,tphrs100
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acp
:TFLNO:100
:LDAT:12/10/2017 11:40:32 AM
:PRTX:START
ret.long = get.default.pur.type.for.tfacp(var.tfacp100.ptyp, error.message)
|* Get default purchase type
ret.long = get.exchange.rate.type("PUR", error.message)
var.tfacp100.rtyp = bcstc011.rtyp
|* Get Purchase rate type

migrate tfacp100
:PRTX:END
:STAT:V
:VARI:long			var.tfacp100.rade
long			ret.long
domain	tcmcs.s200m	error.message
domain	bcpsty		var.tfacp100.ptyp
domain	bcrtyp		var.tfacp100.rtyp
domain	tfacp.stin	var.tfacp100.stin
domain	tfgld.dimx	var.tfacp100.dim1
domain	tfgld.dimx	var.tfacp100.dim2
domain	tfgld.dimx	var.tfacp100.dim3
domain	tfgld.dimx	var.tfacp100.dim4
domain	tfgld.dimx	var.tfacp100.dim5

domain	tfgld.rate	var.tfacp100.rate(3)
domain	tcratf		var.tfacp100.ratf(3)
domain	tfgld.amnt	var.tfacp100.amth(3)
domain	tfacp.isup	var.tfacp100.isup			|#1360713.n
long			element
:STBL:tfacp100,bcstc011,tccom020,tfacp005
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---
%SStfacp1100m000 - %TStfacp1500m000


---  Migration Logic  ---



---  Migration Parameters  ---
Field %TFtfacp100.rtyp is filled with the exchange rate type "PUR", entered in %SSbcstc0111m000. 
Field %TFtfacp100.ptyp is filled with the default purchase type, entered in %SSbcstc0120m000. 


---  Migration Mapping Tables  ---
%STbcstc011
%STbcstc020


---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acp
:TFLNO:200
:LDAT:1/16/2018 2:59:56 PM
:PRTX:START
ret.long = get.default.pur.type.for.tfacp(var.tfacp200.ptyp, error.message)
|* Get default purchace type
ret.long = get.exchange.rate.type("PUR", error.message)
var.tfacp200.rtyp = bcstc011.rtyp
|* Get Purchase rate type
current.company = get.compnr()					|#SP2.n

migrate tfacp200
:PRTX:END
:STAT:V
:VARI:#include "itfgld0012" |* Get period and year from date

long			element
long			ret.long	
domain	tcmcs.s200m	error.message
domain  bcstr9		business.partner
|domain	tccuno		hold.factor.company	fixed			|#1431629.o
domain	tccfcc		hold.factor.company	fixed			|#1431629.n
domain	tccuno		conv.factor.company	fixed			|#1431629.n
domain	tcsuno		hold.business.partner
domain	tccban		factor.bank
domain	tccban		var.tfacp200.bank
domain  bcstr9		var.tfacp200.ptbp
long			var.tfacp200.appr
long			var.tfacp200.rade
long			var.tfacp200.blac	
string			var.tfacp200.ptyp(6)
string			var.tfacp200.rtyp(3)
domain	tfgld.amnt	var.tfacp200.link
domain	tcccty		var.tfacp200.vatc
domain	tccvat		var.tfacp200.cvat
domain	tcratp		var.tfacp200.rate(3)
domain	tcratf		var.tfacp200.ratf(3)
domain	tfgld.amnt	var.tfacp200.amth(3)
domain	tfgld.amnt	var.tfacp200.vath(3)
domain	tfgld.amnt	var.tfacp200.svah(3)
domain	tfgld.amnt	var.tfacp200.laph(3)
domain	tfgld.amnt	var.tfacp200.dc1h(3)
domain	tfgld.amnt	var.tfacp200.dc2h(3)
domain	tfgld.amnt	var.tfacp200.dc3h(3)
domain	tfgld.amnt	var.tfacp200.padh(3)
domain	tfgld.amnt	var.tfacp200.cdam(3)
domain	tfgld.amnt	var.tfacp200.tore(3)
domain	tfgld.amnt	var.tfacp200.baca(3)
domain	tfgld.amnt	var.tfacp200.balh(3)
domain	tfgld.amnt	var.tfacp200.bahc(3)
long			var.tfacp200.step
domain	tfgld.prod	var.tfacp200.vatp
domain	tfgld.year	var.tfacp200.vaty
domain	tfgld.dimx	var.dimension1		|#1056135.sn
domain	tfgld.dimx	var.dimension2		
domain	tfgld.dimx	var.dimension3		
domain	tfgld.dimx	var.dimension4	
domain	tfgld.dimx	var.dimension5		|#1056135.en
domain	tfgld.leac	var.tfacp200.leac			|#FP3.n
domain	tcncmp		current.company				|#SP2.

								|#FP7.sn
domain	tcncmp		var.tfacp200.pcom		
domain	tfgld.ttyp	var.tfacp200.payt
domain	tfgld.docn	var.tfacp200.payd
domain	tfgld.lino	var.tfacp200.payl
domain	tfgld.amnt	var.tfacp500.toba
domain	tcyesno 	var.tfacp500.flpd
								|#FP7.en
domain	tfacp.fisu	var.tfacp500.fisu			|#Migr. 10.6.n

								
domain 	tfacp.isup	var.tfacp200.isup			|#1360713.n
:STBL:tfacp200,bcstc011,tfacp005,tccom020,tfcmg112,tfgld018,tfgld102,tfgld106
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---
%SStfacp1110s000 - %TStfacp1110s000


---  Migration Logic  ---



---  Migration Parameters  ---
Field %TFtfacp200.rtyp is filled with the exchange rate type "PUR", entered in %SSbcstc0111m000. 
Field %TFtfacp200.ptyp is filled with the default purchase type, entered in %SSbcstc0120m000. 


---  Migration Mapping Tables  ---
%STbcstc011
%STbcstc020
%STbcstc030


---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acp
:TFLNO:240
:LDAT:12/10/2017 11:41:49 AM
:PRTX:START
ret.long = get.default.pur.type.for.tfacp(var.tfacp240.ptyp, error.message)
|* Get default purchace type
ret.long = get.exchange.rate.type("PUR", error.message)
ret.long = read.parameters.warehouse.management(error.message)
var.tfacp240.rtyp = bcstc011.rtyp
|* Get Purchase rate type
current.company = get.compnr()
								|#239888.sn
select 	 tfgld000.loco:logistic.company
from 	 tfgld000
where 	 tfgld000._index1 =  {:current.company}
selectdo
	 ret.long =  get.enterprise.unit(  
 	 	 	 current.company,  
 	 	 	 logistic.company,  
 	 	 	 error.message)  
	migrate tdpur045					|#239888.n
endselect
								|#239888.en


|migrate tdpur045						|#239888.o

|* The migration of tdpur045 to tfacp240 has strong resemblance with the migration of tdpur045 to
|* tdpur401. Please check if changes made here are also necessary in the object of tdpur401.
:PRTX:END
:STAT:V
:VARI:domain	tcncmp		logistic.company
domain	tcncmp		current.company
domain	tcmcs.s200m	error.message
long			ret.long
long 			no.of.receipt.lines	
long			element	
double  			prev.bqua 
domain 	tcorno		prev.orno
domain	tcpono		prev.pono
domain	tcsrnb		prev.srnb
domain 	tcorno		prev.040.orno
domain 	tcorno		prev.041.orno
domain	tcpono		prev.041.pono
domain	tckitm		item.type
domain	tcitem		prev.item	|* Hold Item
domain	tcittb		prev.item.category			|#242900.sn
domain	tccprj		prev.project				|#242900.en
 
|********************************************************************************
domain	tcpono		var.tfacp240.sqnb
domain	tcmcs.str9	var.tfacp240.orno
domain	bcitem		var.tfacp240.item
domain	tcmcs.str3	var.tfacp240.rtyp
domain	tcmcs.str6	var.tfacp240.ptyp
domain	tcmcs.str9	var.tfacp240.otbp
domain	tcmcs.str9	var.tfacp240.sfad
domain	tccuni		var.tfacp240.iuni
domain	tcmcs.str9	var.tfacp240.cadr
domain	tcqrd1		var.tfacp240.oqan 
domain	tfgld.amnt	var.tfacp240.oamt
domain	tcqrd1		var.tfacp240.rqty
domain	tcqrd1		var.tfacp240.tapq
domain	tcqrd1		var.tfacp240.trqu
domain	tcmcs.str6	var.tfacp240.byer
domain	tcyesno		var.tfacp240.bppr
|domain	tccprj		var.tfacp240.proj	|#SL200314.o
domain	bcstc.nprj	var.tfacp240.proj	|#SL200314.n
domain	tcyesno		var.tfacp240.toma
domain	tccitg		var.tfacp240.itgr
domain	tcmcs.str50	var.tfacp240.glco
domain	tcyesno		var.tfacp240.fire
long			var.tfacp240.mcfr
domain	tcratp		var.tfacp240.rate(3)
domain	tcratf		var.tfacp240.ratf(3)
domain	tfgld.amnt	var.tfacp240.amth(3)
domain	tcmcs.str40	var.tfacp245.borf
domain	tcmcs.str9	var.tfacp245.rcno
domain	tcpono		var.tfacp245.rseq			|#236822.n

domain	tcccty		var.tfacp240.vatc			|#SP2.n
domain	tccvat		var.tfacp240.cvat			|#210859
domain tfgld.amnt	var.tfacp249.gamt			|#migr fp5
domain tccrnd		var.inv.crnd				|#migr fp5

domain	tcpono		s.array.receipt.line(1) based		|#1019539.n

domain	tcbool		g.use.mapping.table  			|#fp10.sn
domain	tcqrd1		var.tfacp245.rqty
domain	tcqrd1		var.tfacp245.quan
domain	tcqrd1		var.tfacp245.trqn
domain	tfgld.amnt	var.tfacp245.oamt
domain	tcqrd1		g.quantity				
domain	tcqrd1		g.prev.bqua
domain	tcamnt		g.prev.amld
domain	tcamnt		g.prev.amod				|#fp10.en



|********************************************************************************
#pragma used dll "otdpurdll0022"	|* Calculate Multi-Level Discount
#pragma used dll "otccridll0011"
#include	"itccom0001"		|* round amounts
#include	"itccom0007"		|* Round quantity
#include	"itccom0015"		|* Read field data			|#149975.n
#include	"itcmcs0010"		|* Calculate and round amounts
:STBL:tccom020,tdpur041,tdpur045,tiitm001,tipcs020,bcstc011,bcstc020,bcstc018,tipcs021,tdpur040,tcmcs042,tdpur042,tcmcs002,bcswh008,bcswh000,bcstf014,bcswh010
:COMT:START
---  Changes in table design  ---
%TTtfacp240 and %TTtfacp245 are new in %TV compared to %SV. 


---  Source and Target Sessions  ---
%SStdpur4107s000 - %TStfacp2542m000
%SStfacp1132s000 - %TStfacp2543m000

---  Migration Logic  ---
The ACP-tables reside in a financial company. The PUR-tables reside in one or more logistic companies. To fill the ACP-tables all logistic companies linked to the financial company must be taken into account. Those records of %STtdpur045 where %SFtdpur045.fico equals the finance company are migrated. 
The next situations are possible:  
-  One entry in %STtdpur045 for the same order /  position. In %SV a record is added to %STtdpur045 the moment a order line is entered (receipt date is zero).   
   -  Number of receipt lines is zero (no receipts yet)  
   -  %SFtdpur045.srnb is zero  
   -  One record will be added to %TTtfacp240 (normal order line)  
-  Two entries in tdpur045 for the same order /  position. The first receipt in %SV results in a second entry in %STtdpur045 (with sequence number 1).  
   -  Number of receipt lines is one.  
   -  One record added to %TTtfacp240 (normal order line) 
   -  one record added to %TTtfacp245 (if %TFtdpur045.date is filled)  
-  More than two entries in tdpur045 for the same order /  position  
   (backorder(s) present)  
   -  One record added to %TTtfacp240 (original order line)  
   -  One record added to %TTtfacp240 for each back order. In %TV  each 
      back order results in a new order line.
   -  For each record of %STtdpur045 with %TFtdpur045.date filled,  
      (actual receipt date) a record is added to %TTtfacp245.  



---  Migration Parameters  ---
%TFtfacp240.rtyp is filled with the exchange rate type "PUR", entered in %SSbcstc0111m000. 
%TFtfacp240.ptyp is filled with the default purchase type, entered in %SSbcstc0120m000.
%TFtfacp240.poff is filled with the default purchase office, entered in %SSbcstc0118m000.
Order and receipt numbers are converted according to the settings in %SSbcstc0102m000.
Addresses are converted according to the settings in %SSbcstc0104m000.
Suppliers are converted according to the settings in %SSbcstc0108m000.
Projects are converted according the settings in %SSbcstc0116m000.



---  Migration Mapping Tables  ---
%STbcstc002
%STbcstc004
%STbcstc008
%STbcstc011
%STbcstc016
%STbcsts018
%STbcstc020
%SYbcstc030

---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acp
:TFLNO:245
:LDAT:12/10/2017 11:41:50 AM
:PRTX:START
ret.long = get.default.pur.type.for.tfacp(var.tfacp240.ptyp, error.message)
|* Get default purchace type
ret.long = get.exchange.rate.type("PUR", error.message)
ret.long = read.parameters.warehouse.management(error.message)
var.tfacp240.rtyp = bcstc011.rtyp
|* Get Purchase rate type
current.company = get.compnr()
								|#239888.sn
select 	 tfgld000.loco:logistic.company
from 	 tfgld000
where 	 tfgld000._index1 =  {:current.company}
selectdo
	 ret.long =  get.enterprise.unit(  
 	 	 	 current.company,  
 	 	 	 logistic.company,  
 	 	 	 error.message)  
	migrate tdpur045					|#239888.n
endselect
								|#239888.en


|migrate tdpur045						|#239888.o

|* The migration of tdpur045 to tfacp240 has strong resemblance with the migration of tdpur045 to
|* tdpur401. Please check if changes made here are also necessary in the object of tdpur401.
:PRTX:END
:STAT:V
:VARI:domain	tcncmp		logistic.company
domain	tcncmp		current.company
domain	tcmcs.s200m	error.message
long			ret.long
long 			no.of.receipt.lines	
long			element	
double  			prev.bqua 
domain 	tcorno		prev.orno
domain	tcpono		prev.pono
domain	tcsrnb		prev.srnb
domain 	tcorno		prev.040.orno
domain 	tcorno		prev.041.orno
domain	tcpono		prev.041.pono
domain	tckitm		item.type
domain	tcitem		prev.item	|* Hold Item
domain	tcittb		prev.item.category			|#242900.sn
domain	tccprj		prev.project				|#242900.en
 
|********************************************************************************
domain	tcpono		var.tfacp240.sqnb
domain	tcmcs.str9	var.tfacp240.orno
domain	bcitem		var.tfacp240.item
domain	tcmcs.str3	var.tfacp240.rtyp
domain	tcmcs.str6	var.tfacp240.ptyp
domain	tcmcs.str9	var.tfacp240.otbp
domain	tcmcs.str9	var.tfacp240.sfad
domain	tccuni		var.tfacp240.iuni
domain	tcmcs.str9	var.tfacp240.cadr
domain	tcqrd1		var.tfacp240.oqan 
domain	tfgld.amnt	var.tfacp240.oamt
domain	tcqrd1		var.tfacp240.rqty
domain	tcqrd1		var.tfacp240.tapq
domain	tcqrd1		var.tfacp240.trqu
domain	tcmcs.str6	var.tfacp240.byer
domain	tcyesno		var.tfacp240.bppr
|domain	tccprj		var.tfacp240.proj	|#SL200314.o
domain	bcstc.nprj	var.tfacp240.proj	|#SL200314.n
domain	tcyesno		var.tfacp240.toma
domain	tccitg		var.tfacp240.itgr
domain	tcmcs.str50	var.tfacp240.glco
domain	tcyesno		var.tfacp240.fire
long			var.tfacp240.mcfr
domain	tcratp		var.tfacp240.rate(3)
domain	tcratf		var.tfacp240.ratf(3)
domain	tfgld.amnt	var.tfacp240.amth(3)
domain	tcmcs.str40	var.tfacp245.borf
domain	tcmcs.str9	var.tfacp245.rcno
domain	tcpono		var.tfacp245.rseq			|#236822.n

domain	tcccty		var.tfacp240.vatc			|#SP2.n
domain	tccvat		var.tfacp240.cvat			|#210859
domain tfgld.amnt	var.tfacp249.gamt			|#migr fp5
domain tccrnd		var.inv.crnd				|#migr fp5

domain	tcpono		s.array.receipt.line(1) based		|#1019539.n

domain	tcbool		g.use.mapping.table  			|#fp10.sn
domain	tcqrd1		var.tfacp245.rqty
domain	tcqrd1		var.tfacp245.quan
domain	tcqrd1		var.tfacp245.trqn
domain	tfgld.amnt	var.tfacp245.oamt
domain	tcqrd1		g.quantity				
domain	tcqrd1		g.prev.bqua
domain	tcamnt		g.prev.amld
domain	tcamnt		g.prev.amod				|#fp10.en



|********************************************************************************
#pragma used dll "otdpurdll0022"	|* Calculate Multi-Level Discount
#pragma used dll "otccridll0011"
#include	"itccom0001"		|* round amounts
#include	"itccom0007"		|* Round quantity
#include	"itccom0015"		|* Read field data			|#149975.n
#include	"itcmcs0010"		|* Calculate and round amounts
:STBL:tccom020,tdpur041,tdpur045,tiitm001,tipcs020,bcstc011,bcstc020,bcstc018,tipcs021,tdpur040,tcmcs042,tdpur042,tcmcs002,bcswh008,bcswh000,bcstf014,bcswh010
:COMT:START
---  Changes in table design  ---
%TTtfacp240 and %TTtfacp245 are new in %TV compared to %SV. 


---  Source and Target Sessions  ---
%SStdpur4107s000 - %TStfacp2542m000
%SStfacp1132s000 - %TStfacp2543m000

---  Migration Logic  ---
The ACP-tables reside in a financial company. The PUR-tables reside in one or more logistic companies. To fill the ACP-tables all logistic companies linked to the financial company must be taken into account. Those records of %STtdpur045 where %SFtdpur045.fico equals the finance company are migrated. 
The next situations are possible:  
-  One entry in %STtdpur045 for the same order /  position. In %SV a record is added to %STtdpur045 the moment a order line is entered (receipt date is zero).   
   -  Number of receipt lines is zero (no receipts yet)  
   -  %SFtdpur045.srnb is zero  
   -  One record will be added to %TTtfacp240 (normal order line)  
-  Two entries in tdpur045 for the same order /  position. The first receipt in %SV results in a second entry in %STtdpur045 (with sequence number 1).  
   -  Number of receipt lines is one.  
   -  One record added to %TTtfacp240 (normal order line) 
   -  one record added to %TTtfacp245 (if %TFtdpur045.date is filled)  
-  More than two entries in tdpur045 for the same order /  position  
   (backorder(s) present)  
   -  One record added to %TTtfacp240 (original order line)  
   -  One record added to %TTtfacp240 for each back order. In %TV  each 
      back order results in a new order line.
   -  For each record of %STtdpur045 with %TFtdpur045.date filled,  
      (actual receipt date) a record is added to %TTtfacp245.  



---  Migration Parameters  ---
%TFtfacp240.rtyp is filled with the exchange rate type "PUR", entered in %SSbcstc0111m000. 
%TFtfacp240.ptyp is filled with the default purchase type, entered in %SSbcstc0120m000.
%TFtfacp240.poff is filled with the default purchase office, entered in %SSbcstc0118m000.
Order and receipt numbers are converted according to the settings in %SSbcstc0102m000.
Addresses are converted according to the settings in %SSbcstc0104m000.
Suppliers are converted according to the settings in %SSbcstc0108m000.
Projects are converted according the settings in %SSbcstc0116m000.



---  Migration Mapping Tables  ---
%STbcstc002
%STbcstc004
%STbcstc008
%STbcstc011
%STbcstc016
%STbcsts018
%STbcstc020
%SYbcstc030

---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acp
:TFLNO:249
:LDAT:12/10/2017 11:41:52 AM
:PRTX:START
ret.long = get.default.pur.type.for.tfacp(var.tfacp240.ptyp, error.message)
|* Get default purchace type
ret.long = get.exchange.rate.type("PUR", error.message)
ret.long = read.parameters.warehouse.management(error.message)
var.tfacp240.rtyp = bcstc011.rtyp
|* Get Purchase rate type
current.company = get.compnr()
								|#239888.sn
select 	 tfgld000.loco:logistic.company
from 	 tfgld000
where 	 tfgld000._index1 =  {:current.company}
selectdo
	 ret.long =  get.enterprise.unit(  
 	 	 	 current.company,  
 	 	 	 logistic.company,  
 	 	 	 error.message)  
	migrate tdpur045					|#239888.n
endselect
								|#239888.en


|migrate tdpur045						|#239888.o

|* The migration of tdpur045 to tfacp240 has strong resemblance with the migration of tdpur045 to
|* tdpur401. Please check if changes made here are also necessary in the object of tdpur401.
:PRTX:END
:STAT:V
:VARI:domain	tcncmp		logistic.company
domain	tcncmp		current.company
domain	tcmcs.s200m	error.message
long			ret.long
long 			no.of.receipt.lines	
long			element	
double  			prev.bqua 
domain 	tcorno		prev.orno
domain	tcpono		prev.pono
domain	tcsrnb		prev.srnb
domain 	tcorno		prev.040.orno
domain 	tcorno		prev.041.orno
domain	tcpono		prev.041.pono
domain	tckitm		item.type
domain	tcitem		prev.item	|* Hold Item
domain	tcittb		prev.item.category			|#242900.sn
domain	tccprj		prev.project				|#242900.en
 
|********************************************************************************
domain	tcpono		var.tfacp240.sqnb
domain	tcmcs.str9	var.tfacp240.orno
domain	bcitem		var.tfacp240.item
domain	tcmcs.str3	var.tfacp240.rtyp
domain	tcmcs.str6	var.tfacp240.ptyp
domain	tcmcs.str9	var.tfacp240.otbp
domain	tcmcs.str9	var.tfacp240.sfad
domain	tccuni		var.tfacp240.iuni
domain	tcmcs.str9	var.tfacp240.cadr
domain	tcqrd1		var.tfacp240.oqan 
domain	tfgld.amnt	var.tfacp240.oamt
domain	tcqrd1		var.tfacp240.rqty
domain	tcqrd1		var.tfacp240.tapq
domain	tcqrd1		var.tfacp240.trqu
domain	tcmcs.str6	var.tfacp240.byer
domain	tcyesno		var.tfacp240.bppr
|domain	tccprj		var.tfacp240.proj	|#SL200314.o
domain	bcstc.nprj	var.tfacp240.proj	|#SL200314.n
domain	tcyesno		var.tfacp240.toma
domain	tccitg		var.tfacp240.itgr
domain	tcmcs.str50	var.tfacp240.glco
domain	tcyesno		var.tfacp240.fire
long			var.tfacp240.mcfr
domain	tcratp		var.tfacp240.rate(3)
domain	tcratf		var.tfacp240.ratf(3)
domain	tfgld.amnt	var.tfacp240.amth(3)
domain	tcmcs.str40	var.tfacp245.borf
domain	tcmcs.str9	var.tfacp245.rcno
domain	tcpono		var.tfacp245.rseq			|#236822.n

domain	tcccty		var.tfacp240.vatc			|#SP2.n
domain	tccvat		var.tfacp240.cvat			|#210859
domain tfgld.amnt	var.tfacp249.gamt			|#migr fp5
domain tccrnd		var.inv.crnd				|#migr fp5

domain	tcpono		s.array.receipt.line(1) based		|#1019539.n

domain	tcbool		g.use.mapping.table  			|#fp10.sn
domain	tcqrd1		var.tfacp245.rqty
domain	tcqrd1		var.tfacp245.quan
domain	tcqrd1		var.tfacp245.trqn
domain	tfgld.amnt	var.tfacp245.oamt
domain	tcqrd1		g.quantity				
domain	tcqrd1		g.prev.bqua
domain	tcamnt		g.prev.amld
domain	tcamnt		g.prev.amod				|#fp10.en



|********************************************************************************
#pragma used dll "otdpurdll0022"	|* Calculate Multi-Level Discount
#pragma used dll "otccridll0011"
#include	"itccom0001"		|* round amounts
#include	"itccom0007"		|* Round quantity
#include	"itccom0015"		|* Read field data			|#149975.n
#include	"itcmcs0010"		|* Calculate and round amounts
:STBL:tccom020,tdpur041,tdpur045,tiitm001,tipcs020,bcstc011,bcstc020,bcstc018,tipcs021,tdpur040,tcmcs042,tdpur042,tcmcs002,bcswh008,bcswh000,bcstf014,bcswh010
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acp
:TFLNO:250
:LDAT:9/26/2017 8:59:36 PM
:PRTX:START
ret.long = get.exchange.rate.type("PUR", error.message)
var.tfacp250.rtyp = bcstc011.rtyp
ret.long = read.parameters.warehouse.management(error.message)
|* Get Purchase rate type
current.company = get.compnr()
hold.orno = 0
								|#239888.sn
select 	 tfgld000.loco:logistic.company
from 	 tfgld000
where 	 tfgld000._index1 =  {:current.company}
selectdo
								|#239888.en
	migrate tdpur046
endselect							|#239888.n
:PRTX:END
:STAT:V
:VARI:domain	tcmcs.str3	var.tfacp250.rtyp
domain	tcmcs.str9	var.tfacp250.orno
domain	tcmcs.str9	var.tfacp250.ifbp
string			var.tfacp250.ratd(22)
domain	tcqrd1		var.tfacp250.iqan
domain	tfgld.rate	var.tfacp250.rate(3)
domain	tcratf		var.tfacp250.ratf(3)
domain	tfgld.amnt	var.tfacp250.amth(3)
domain	tfgld.amnt	var.tfacp250.iamt
domain	tcmcs.str9	var.tfacp251.rcno
domain	tcpono		var.tfacp251.rseq			|#fp10.n
domain	tcccur		var.tfacp250.ccur			|#217083.sn
domain	tfgld.ttyp	var.tfacp250.tapr
domain	tfgld.docn	var.tfacp250.dapr			|#217083.en
domain	tcpono		var.tfacp250.sqnb			|#322471.n

domain	tcncmp		current.company
domain	tcmcs.s200m	error.message
long			ret.long
domain	tcncmp		logistic.company
domain	tcorno		hold.orno
domain	tccuni		inventory.unit				|#208878.n
domain	tcbool		g.use.mapping.table			|#fp10.sn
domain	tcqrd1		var.tfacp251.iqan
domain	tfgld.amnt	var.tfacp251.iamt
domain	tfgld.amnt	var.tfacp251.amth(3)
domain	tcqrd1		var.converted.iqan			|#fp10.en


#include	"itccom0007"
#include	"itccom0015"			|#149975.n
#include	"itcmcs0010"
:STBL:tcmcs002,tdpur040,tdpur046,tdpur045,tfacp200,bcstc011,tiitm001,tdpur041,tcmcs042,tdpur040,bcswh000,bcswh008,tfgld106,bcstf014,bcswh010
:COMT:START
---  Changes in table design  ---
%TTtfacp250 and %TTtfacp251 are new in %TV compared to %SV. 


---  Source and Target Sessions  ---
%SStfacp1132s000 - %TStfacp2552m000 / %TStfacp2551m000


---  Migration Logic  ---
The ACP-tables reside in a financial company. The PUR-tables reside in one or more logistic companies. To fill the ACP-tables all logistic companies linked to the financial company must be taken into account. Those records of %STtdpur046 where %SFtdpur046.icom equals the finance company are migrated. 
In %TV more than one receipt can be linked to an order line. In %SV only one receipt can be linked to an order line. So each record of %STtdpur046 is inserted in %TTtfacp251 and also in %TTtfacp250 (first receipt is at the same time the total receipt). 


---  Migration Parameters  ---
%TFtfacp200.rtyp is filled with the exchange rate type "PUR", entered in %SSbcstc0111m000. 
Order and receipt numbers are converted according to the settings in %SSbcstc0102m000. In case of a return order, %bcswh000.prsh is used to generate a receipt number.
Suppliers are converted according to the settings in %SSbcstc0108m000.


---  Migration Mapping Tables  ---
%STbcstc002
%STbcstc008
%STbcstc011
%STbcswh000
%STbcswh008

---  Technical Notes  ---
The main query contains a special statement, "tdpur046._index1 > "" ". Without this statement there is a drastically loss of performance.


---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acp
:TFLNO:251
:LDAT:9/26/2017 8:59:36 PM
:PRTX:START
ret.long = get.exchange.rate.type("PUR", error.message)
var.tfacp250.rtyp = bcstc011.rtyp
ret.long = read.parameters.warehouse.management(error.message)
|* Get Purchase rate type
current.company = get.compnr()
hold.orno = 0
								|#239888.sn
select 	 tfgld000.loco:logistic.company
from 	 tfgld000
where 	 tfgld000._index1 =  {:current.company}
selectdo
								|#239888.en
	migrate tdpur046
endselect							|#239888.n
:PRTX:END
:STAT:V
:VARI:domain	tcmcs.str3	var.tfacp250.rtyp
domain	tcmcs.str9	var.tfacp250.orno
domain	tcmcs.str9	var.tfacp250.ifbp
string			var.tfacp250.ratd(22)
domain	tcqrd1		var.tfacp250.iqan
domain	tfgld.rate	var.tfacp250.rate(3)
domain	tcratf		var.tfacp250.ratf(3)
domain	tfgld.amnt	var.tfacp250.amth(3)
domain	tfgld.amnt	var.tfacp250.iamt
domain	tcmcs.str9	var.tfacp251.rcno
domain	tcpono		var.tfacp251.rseq			|#fp10.n
domain	tcccur		var.tfacp250.ccur			|#217083.sn
domain	tfgld.ttyp	var.tfacp250.tapr
domain	tfgld.docn	var.tfacp250.dapr			|#217083.en
domain	tcpono		var.tfacp250.sqnb			|#322471.n

domain	tcncmp		current.company
domain	tcmcs.s200m	error.message
long			ret.long
domain	tcncmp		logistic.company
domain	tcorno		hold.orno
domain	tccuni		inventory.unit				|#208878.n
domain	tcbool		g.use.mapping.table			|#fp10.sn
domain	tcqrd1		var.tfacp251.iqan
domain	tfgld.amnt	var.tfacp251.iamt
domain	tfgld.amnt	var.tfacp251.amth(3)
domain	tcqrd1		var.converted.iqan			|#fp10.en


#include	"itccom0007"
#include	"itccom0015"			|#149975.n
#include	"itcmcs0010"
:STBL:tcmcs002,tdpur040,tdpur046,tdpur045,tfacp200,bcstc011,tiitm001,tdpur041,tcmcs042,tdpur040,bcswh000,bcswh008,tfgld106,bcstf014,bcswh010
:COMT:START
---  Changes in table design  ---
%TTtfacp250 and %TTtfacp251 are new in %TV compared to %SV. 


---  Source and Target Sessions  ---
%SStfacp1132s000 - %TStfacp2552m000 / %TStfacp2551m000


---  Migration Logic  ---
The ACP-tables reside in a financial company. The PUR-tables reside in one or more logistic companies. To fill the ACP-tables all logistic companies linked to the financial company must be taken into account. Those records of %STtdpur046 where %SFtdpur046.icom equals the finance company are migrated. 
In %TV more than one receipt can be linked to an order line. In %SV only one receipt can be linked to an order line. So each record of %STtdpur046 is inserted in %TTtfacp251 and also in %TTtfacp250 (first receipt is at the same time the total receipt). 


---  Migration Parameters  ---
%TFtfacp200.rtyp is filled with the exchange rate type "PUR", entered in %SSbcstc0111m000. 
Order and receipt numbers are converted according to the settings in %SSbcstc0102m000. In case of a return order, %bcswh000.prsh is used to generate a receipt number.
Suppliers are converted according to the settings in %SSbcstc0108m000.


---  Migration Mapping Tables  ---
%STbcstc002
%STbcstc008
%STbcstc011
%STbcswh000
%STbcswh008

---  Technical Notes  ---
The main query contains a special statement, "tdpur046._index1 > "" ". Without this statement there is a drastically loss of performance.


---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acp
:TFLNO:253
:LDAT:9/26/2017 8:59:37 PM
:PRTX:START
ret.long = get.exchange.rate.type("PUR", error.message)
var.tfacp250.rtyp = bcstc011.rtyp
ret.long = read.parameters.warehouse.management(error.message)
|* Get Purchase rate type
current.company = get.compnr()
hold.orno = 0
								|#239888.sn
select 	 tfgld000.loco:logistic.company
from 	 tfgld000
where 	 tfgld000._index1 =  {:current.company}
selectdo
								|#239888.en
	migrate tdpur046
endselect							|#239888.n
:PRTX:END
:STAT:V
:VARI:domain	tcmcs.str3	var.tfacp250.rtyp
domain	tcmcs.str9	var.tfacp250.orno
domain	tcmcs.str9	var.tfacp250.ifbp
string			var.tfacp250.ratd(22)
domain	tcqrd1		var.tfacp250.iqan
domain	tfgld.rate	var.tfacp250.rate(3)
domain	tcratf		var.tfacp250.ratf(3)
domain	tfgld.amnt	var.tfacp250.amth(3)
domain	tfgld.amnt	var.tfacp250.iamt
domain	tcmcs.str9	var.tfacp251.rcno
domain	tcpono		var.tfacp251.rseq			|#fp10.n
domain	tcccur		var.tfacp250.ccur			|#217083.sn
domain	tfgld.ttyp	var.tfacp250.tapr
domain	tfgld.docn	var.tfacp250.dapr			|#217083.en
domain	tcpono		var.tfacp250.sqnb			|#322471.n

domain	tcncmp		current.company
domain	tcmcs.s200m	error.message
long			ret.long
domain	tcncmp		logistic.company
domain	tcorno		hold.orno
domain	tccuni		inventory.unit				|#208878.n
domain	tcbool		g.use.mapping.table			|#fp10.sn
domain	tcqrd1		var.tfacp251.iqan
domain	tfgld.amnt	var.tfacp251.iamt
domain	tfgld.amnt	var.tfacp251.amth(3)
domain	tcqrd1		var.converted.iqan			|#fp10.en


#include	"itccom0007"
#include	"itccom0015"			|#149975.n
#include	"itcmcs0010"
:STBL:tcmcs002,tdpur040,tdpur046,tdpur045,tfacp200,bcstc011,tiitm001,tdpur041,tcmcs042,tdpur040,bcswh000,bcswh008,tfgld106,bcstf014,bcswh010
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acp
:TFLNO:500
:LDAT:1/16/2018 3:00:00 PM
:PRTX:START
ret.long = get.default.pur.type.for.tfacp(var.tfacp200.ptyp, error.message)
|* Get default purchace type
ret.long = get.exchange.rate.type("PUR", error.message)
var.tfacp200.rtyp = bcstc011.rtyp
|* Get Purchase rate type
current.company = get.compnr()					|#SP2.n

migrate tfacp200
:PRTX:END
:STAT:V
:VARI:#include "itfgld0012" |* Get period and year from date

long			element
long			ret.long	
domain	tcmcs.s200m	error.message
domain  bcstr9		business.partner
|domain	tccuno		hold.factor.company	fixed			|#1431629.o
domain	tccfcc		hold.factor.company	fixed			|#1431629.n
domain	tccuno		conv.factor.company	fixed			|#1431629.n
domain	tcsuno		hold.business.partner
domain	tccban		factor.bank
domain	tccban		var.tfacp200.bank
domain  bcstr9		var.tfacp200.ptbp
long			var.tfacp200.appr
long			var.tfacp200.rade
long			var.tfacp200.blac	
string			var.tfacp200.ptyp(6)
string			var.tfacp200.rtyp(3)
domain	tfgld.amnt	var.tfacp200.link
domain	tcccty		var.tfacp200.vatc
domain	tccvat		var.tfacp200.cvat
domain	tcratp		var.tfacp200.rate(3)
domain	tcratf		var.tfacp200.ratf(3)
domain	tfgld.amnt	var.tfacp200.amth(3)
domain	tfgld.amnt	var.tfacp200.vath(3)
domain	tfgld.amnt	var.tfacp200.svah(3)
domain	tfgld.amnt	var.tfacp200.laph(3)
domain	tfgld.amnt	var.tfacp200.dc1h(3)
domain	tfgld.amnt	var.tfacp200.dc2h(3)
domain	tfgld.amnt	var.tfacp200.dc3h(3)
domain	tfgld.amnt	var.tfacp200.padh(3)
domain	tfgld.amnt	var.tfacp200.cdam(3)
domain	tfgld.amnt	var.tfacp200.tore(3)
domain	tfgld.amnt	var.tfacp200.baca(3)
domain	tfgld.amnt	var.tfacp200.balh(3)
domain	tfgld.amnt	var.tfacp200.bahc(3)
long			var.tfacp200.step
domain	tfgld.prod	var.tfacp200.vatp
domain	tfgld.year	var.tfacp200.vaty
domain	tfgld.dimx	var.dimension1		|#1056135.sn
domain	tfgld.dimx	var.dimension2		
domain	tfgld.dimx	var.dimension3		
domain	tfgld.dimx	var.dimension4	
domain	tfgld.dimx	var.dimension5		|#1056135.en
domain	tfgld.leac	var.tfacp200.leac			|#FP3.n
domain	tcncmp		current.company				|#SP2.

								|#FP7.sn
domain	tcncmp		var.tfacp200.pcom		
domain	tfgld.ttyp	var.tfacp200.payt
domain	tfgld.docn	var.tfacp200.payd
domain	tfgld.lino	var.tfacp200.payl
domain	tfgld.amnt	var.tfacp500.toba
domain	tcyesno 	var.tfacp500.flpd
								|#FP7.en
domain	tfacp.fisu	var.tfacp500.fisu			|#Migr. 10.6.n

								
domain 	tfacp.isup	var.tfacp200.isup			|#1360713.n
:STBL:tfacp200,bcstc011,tfacp005,tccom020,tfcmg112,tfgld018,tfgld102,tfgld106
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acr
:TFLNO:000
:LDAT:12/10/2017 11:46:30 AM
:PRTX:START
migrate tfacr000
:PRTX:END
:STAT:V
:VARI:string var.tfacr000.indt(22)
string var.tfacr000.dsca(50)
:STBL:tdcms000,tfacr000
:COMT:START
---  Changes in table design  ---

Lots of fields are removed from %STtfacr000 and are available in the %TV else where. See details below for removed fields:
%SFtfacr000.idm1  - %TFcisli100.dim1
%SFtfacr000.idm2  - %TFcisli100.dim2
%SFtfacr000.idm3  - %TFcisli100.dim3
%SFtfacr000.idm4  - %TFcisli100.dim4
%SFtfacr000.idm5  - %TFcisli100.dim5
%SFtfacr000.ilac  - %TFcisli100.msla
%SFtfacr000.itrt  - %TFcisli100.mstt
%SFtfacr000.lpac,%SFtfacr000.lpd1 , %SFtfacr000.lpd2, %SFtfacr000.lpd3, %SFtfacr000.lpd4, %SFtfacr000.lpd5  are moved  to  %TTtfacr005. Now %SFtfacr000.lpac is filled in %TFtfacr005.leac for the 'kind of transaction' Late payment surcharge. Also dimensions are filled for the same account in %TTtfacr005.

%SFtfacr000.srno -This field is no longer maintained in %TTtfacr000 because in the %TV the parameters are now time dependant and so each record is identified uniquely by an effective date %TFtfacr000.indt and no longer by a sequence number.

%SFtfacr000.typ1,%SFtfacr000.typ2, %SFtfacr000.typ3,              %SFtfacr000.typ4, %SFtfacr000.typ5 are removed in %TTtfacr000.  These fields are used to get the dimension types. As %SFtfacr000.lpac and %SFtfacr000.ilac are removed from the %STtfacr000 it is not neccessary to maintain the dimension types there.


---  Source and Target Sessions  ---
Source session - %SStfacr0100m000
Target session - %TStfacr0500m000


---  Migration Logic  ---
%GTtcmcs0000

---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acr
:TFLNO:005
:LDAT:2/13/2017 1:46:33 PM
:PRTX:START
var.tran.counter = 1
get.default.sls.type.for.tfacr(var.tfacr005.styp,var.err.mess)
migrate tfacr005
:PRTX:END
:STAT:V
:VARI:#include "itfgld0038"						|#250988.n


long var.tran.counter
long var.tfacr005.tran
string var.tfacr005.leac(12)
string var.tfacr005.control.leac(12)
string var.tfacr005.styp(6)
string var.err.mess(50)


								|#250988.sn
domain	tfacr.ficu	i.ficu
	string		acct.type(12)
domain	tfgld.dopt	child.dim.opt(5)
domain	tfgld.dopt 	parent.dim.opt(5)
domain	tfgld.dimx	child.dim(5)
domain	tfgld.dimx	parent.dim(5)

domain	tfgld.dimx	var.tfacr005.dim(5)

domain	tfgld.leac	parent.leac
								|#250988.en
:STBL:bcstc020,tfacr005,tfgld008
:COMT:START
---  Changes in table design  ---
%STtfacr005 is divided into two tables in %TV. The tables are %TTtfacr005 and %TTtfacr015 . In %TV %TTtfacr015 is a new table.

Refer to the following document for more details:
CS Data Conversion form Baan IVc4 to SSA Baan ERP 6.1 - Finance (D3439A US)

Dimenstions in are not filled in %TTtfacr005 and %TTtfacr015.
The following document explains about the Business Unit Accounting.
GTtfacr0005

---  Source and Target Sessions  ---
TFACR005
Source Session : %SStfacr0110m000
Target Session : %TStfacr0110m000

TFACR015
     Source : %SStfacr0110m000
     Target : %TStfacr0110m000

---  Migration Logic  ---
To migrate %STtfacr005 to %TTtfacr005 and %TTtfacr015 , control account record's ledger account must not be empty in %TTtfacr005.
If ledger account is not filled for control account for a financial business partner group in %STtfacr005, all the records related to this financial business partner group are not migrated to the %TTtfacr005 and %TTtfacr015.

Assuming that control account record is filled in the source for a given Financial BP group, all the records in %STtfacr005 should be inserted in to %TTtfacr005 except for the control account record. Control account record should be inserted in %TTtfacr015.
The enum constants of tfacr.tran ( from 16 to 33 ) , which are added for new functionalities in %TV, are inserted in %TTtfacr005 with empty ledger accounts , empty dimensions and default dimenstion types.
Migration Parameters


---  Migration Parameters  ---
TFACR015
An intermediate session %SSbcstc0120m000 is to be used to enter the default sales type.

---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:




:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acr
:TFLNO:015
:LDAT:2/13/2017 1:46:33 PM
:PRTX:START
var.tran.counter = 1
get.default.sls.type.for.tfacr(var.tfacr005.styp,var.err.mess)
migrate tfacr005
:PRTX:END
:STAT:V
:VARI:#include "itfgld0038"						|#250988.n


long var.tran.counter
long var.tfacr005.tran
string var.tfacr005.leac(12)
string var.tfacr005.control.leac(12)
string var.tfacr005.styp(6)
string var.err.mess(50)


								|#250988.sn
domain	tfacr.ficu	i.ficu
	string		acct.type(12)
domain	tfgld.dopt	child.dim.opt(5)
domain	tfgld.dopt 	parent.dim.opt(5)
domain	tfgld.dimx	child.dim(5)
domain	tfgld.dimx	parent.dim(5)

domain	tfgld.dimx	var.tfacr005.dim(5)

domain	tfgld.leac	parent.leac
								|#250988.en
:STBL:bcstc020,tfacr005,tfgld008
:COMT:START
---  Changes in table design  ---
%STtfacr005 is divided into two tables in %TV. The tables are %TTtfacr005 and %TTtfacr015 . In %TV %TTtfacr015 is a new table.

Refer to the following document for more details:
CS Data Conversion form Baan IVc4 to SSA Baan ERP 6.1 - Finance (D3439A US)

Dimenstions in are not filled in %TTtfacr005 and %TTtfacr015.
The following document explains about the Business Unit Accounting.
GTtfacr0005

---  Source and Target Sessions  ---
TFACR005
Source Session : %SStfacr0110m000
Target Session : %TStfacr0110m000

TFACR015
     Source : %SStfacr0110m000
     Target : %TStfacr0110m000

---  Migration Logic  ---
To migrate %STtfacr005 to %TTtfacr005 and %TTtfacr015 , control account record's ledger account must not be empty in %TTtfacr005.
If ledger account is not filled for control account for a financial business partner group in %STtfacr005, all the records related to this financial business partner group are not migrated to the %TTtfacr005 and %TTtfacr015.

Assuming that control account record is filled in the source for a given Financial BP group, all the records in %STtfacr005 should be inserted in to %TTtfacr005 except for the control account record. Control account record should be inserted in %TTtfacr015.
The enum constants of tfacr.tran ( from 16 to 33 ) , which are added for new functionalities in %TV, are inserted in %TTtfacr005 with empty ledger accounts , empty dimensions and default dimenstion types.
Migration Parameters


---  Migration Parameters  ---
TFACR015
An intermediate session %SSbcstc0120m000 is to be used to enter the default sales type.

---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:




:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acr
:TFLNO:200
:LDAT:1/16/2018 2:59:13 PM
:PRTX:START
|#ms.so
|select bccnv114.*
|from  bccnv114
|where bccnv114._index1 = {"SLS"}
|as set with 1 rows
|selectdo
|endselect
					|#ms.eo	
if not get.default.sls.type.for.tfacr(var.tfacr200.styp,var.err.mess) then
endif

if not get.exchange.rate.type("SLS",var.err.mess)  then
	var.str.rtyp = bcstc011.rtyp 
else
	var.str.rtyp = ""	
endif

current.company = get.compnr() |#fp7

migrate tfacr200
:PRTX:END
:STAT:V
:VARI:#include "itfgld0012"		|* Get period and year from date
#include "itfgld0038"		|#FP3.n


string		var.str.temp.key(9)	
	string		var.str.bpid(9)	
	long		var.tfacr200.rade	
	long		var.tfacr200.step
	long		var.tfacr200.cain
	long 		var.tfacr200.lvat	
	domain tcmcs.s200m	var.err.mess
	domain	bccadr		var.tfacr200.adrs
	domain	bcpsty		var.tfacr200.styp
	domain	bcrtyp		var.str.rtyp
	domain	tfgld.year	vat.year
	domain	tfgld.prod	vat.prod
	domain tcbool		hello.test
extern	long		ext.lng.fp_comp
domain tcccty	new.country
domain tccvat    new.tax
								|#200-102115.so

								|#200-101927.sn
|domain tfgld.amnt 	var.tfacr200.amnt,var.tfacr200.amti,var.tfacr200.amth,var.tfacr200.vata,
|			var.tfacr200.vati,var.tfacr200.vath, var.tfacr200.svam,var.tfacr200.svah,
|			var.tfacr200.lapa,var.tfacr200.lapi,var.tfacr200.laph,var.tfacr200.dc1a,
|			var.tfacr200.dc1i,var.tfacr200.dc1h,var.tfacr200.dc2a,var.tfacr200.dc2i,
|			var.tfacr200.dc2h,var.tfacr200.dc3a,var.tfacr200.dc3i,var.tfacr200.dc3h,
|			var.tfacr200.pada,var.tfacr200.padi,var.tfacr200.padh,var.tfacr200.balc,
|			var.tfacr200.balh,var.tfacr200.bala,var.tfacr200.bahc,var.tfacr200.baco,
|			var.tfacr200.baca,var.tfacr200.basi,var.tfacr200.cdam,var.tfacr200.tore 

								|#200-101927.en
								|bin-MCR.eo


								|#200-102115.sn

							
domain tfgld.amnt 	var.tfacr200.amnt,var.tfacr200.amti,var.tfacr200.vata,var.tfacr200.vati,
			var.tfacr200.svam,var.tfacr200.lapa,var.tfacr200.lapi,var.tfacr200.dc1a,var.tfacr200.dc1i,
			var.tfacr200.dc2a,var.tfacr200.dc2i,var.tfacr200.dc3a,var.tfacr200.dc3i,var.tfacr200.pada,
			var.tfacr200.padi,var.tfacr200.balc,var.tfacr200.bala,var.tfacr200.baco,var.tfacr200.basi


double 			var.tfacr200.amth(3),var.tfacr200.vath(3), var.tfacr200.svah(3),var.tfacr200.laph(3),
			var.tfacr200.dc1h(3),var.tfacr200.dc2h(3),var.tfacr200.dc3h(3),var.tfacr200.padh(3),
			var.tfacr200.balh(3),var.tfacr200.bahc(3),var.tfacr200.baca(3),var.tfacr200.cdam(3),
			var.tfacr200.tore(3) 

									
								|#200-102115.en

string		var.tfacr200.leac(12)			|#FP3.sn
Long		var.tfacr200.pysh			|#FP3.en
domain tfgld.dimx	var.dimension1
domain tfgld.dimx	var.dimension2
domain tfgld.dimx	var.dimension3
domain tfgld.dimx	var.dimension4
domain tfgld.dimx	var.dimension5
								|#235153.sn
long			var.tfacr200.post
domain	tfgld.date	var.tfacr200.pdat
								|#235153.en
								
								|#FP7.sn
domain	tcncmp		current.company		
domain	tcncmp		var.tfacr200.rcom		
domain	tfgld.ttyp	var.tfacr200.rect
domain	tfgld.docn	var.tfacr200.recd
domain	tfgld.lino	var.tfacr200.recl
domain	tfgld.amnt	var.tfacr500.toba
domain	tcyesno		var.tfacr500.flpd
								|#FP7.en
domain	tfacr.ficu	var.tfacr500.ficu			|#Migr. 10.6.n
:STBL:tfacr200,bcstc004,bcstc008,bcstc011,bcstc020,tfgld102,tfgld106,tfgld018,tfcmg112
:COMT:START
---  Changes in table design  ---
For data model changes and new functionality refer to general topics: 
CS Data Conversion form Baan IVc4 to SSA Baan ERP 6.1 - Finance (D3439A US)
The removed fields from %STtfacr200 in %SV are:
tfacr200.cuno - This field is replaced by %TFtfacr200.itbp in %TV. This is filled by means of the mapping table %STbcstc008

tfacr200.pcun - This field is replaced by %TFtfacr200.pfbp which is the Pay-By BP. This is also filled by means of the mapping table %STbcstc008. 

tfacr200.spot -  This field was used to indicate if a fixed rate was used or not. In %TV this is replaced by the Rate Determiner field tfacr200.rade. 

If tfacr200.spot is "yes" then
tfacr200.rade = "Fixed Local"
otherwise
tfacr200.rade = "Document Date". This logic is used because in most of the cases the data comes from logistics and there is no provision to enter the rates manually in the Baan IV side. So it is better that after the invoices are posted to tfacr200, if the fixed rate is 'No' in tfacr200 in %SV, then it should be migrated as 'Document Date' in %TV. For invoices which are manually created in Finance also, it is better if the tfacr200.rade is set to 'Document Date' if the tfacr200.spot is 'No' in %SV.
tfacr200.schn will be filled by post conversion program.

---  Source and Target Sessions  ---

%SStfacr1110s000 -> %TStfacr1110s000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---

The following migration mapping tables are used:

bcstc004 - For mapping into %TFtfacr200.adrs (Postal Address)
bcstc008- For mapping into %TFtfacr200.itbp and %TFtfacr200.pfbp (Business Partner)
bcstc011- For mapping into %TFtfacr200.rtyp (Exchange Rate Type)
bcstc020- For mapping into %TFtfacr200.styp (Sales Types)



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acr
:TFLNO:201
:LDAT:2/13/2017 1:50:50 PM
:PRTX:START
migrate tfacr201
:PRTX:END
:STAT:V
:VARI:
:STBL:tfacr201,tfacr200
:COMT:START
---  Changes in table design  ---
Refer to the following document for more details:

CS Data Conversion form Baan IVc4 to SSA Baan ERP 6.1 - Finance (D3439A US)
tfacr200.schn will be filled by post conversion program.

---  Source and Target Sessions  ---
     %SStfacr1103s000 - %TStfacr1103m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:



:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acr
:TFLNO:301
:LDAT:2/13/2017 1:51:40 PM
:PRTX:START
migrate tfacr301
:PRTX:END
:STAT:V
:VARI:
:STBL:tfacr301
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---
     Source : SS%tfacr3100m000
     Target : TS%tfacr3508m000

---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:



:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acr
:TFLNO:312
:LDAT:2/13/2017 1:54:32 PM
:PRTX:START
migrate tfacr312
:PRTX:END
:STAT:V
:VARI:domain	tfacp.agan	var.tfacr312.agan
:STBL:tfacr312,tfacr000
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---
Source session - %SStfacr3112m000
Target session - %TStfacr3512m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:







:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acr
:TFLNO:500
:LDAT:1/16/2018 2:59:16 PM
:PRTX:START
|#ms.so
|select bccnv114.*
|from  bccnv114
|where bccnv114._index1 = {"SLS"}
|as set with 1 rows
|selectdo
|endselect
					|#ms.eo	
if not get.default.sls.type.for.tfacr(var.tfacr200.styp,var.err.mess) then
endif

if not get.exchange.rate.type("SLS",var.err.mess)  then
	var.str.rtyp = bcstc011.rtyp 
else
	var.str.rtyp = ""	
endif

current.company = get.compnr() |#fp7

migrate tfacr200
:PRTX:END
:STAT:V
:VARI:#include "itfgld0012"		|* Get period and year from date
#include "itfgld0038"		|#FP3.n


string		var.str.temp.key(9)	
	string		var.str.bpid(9)	
	long		var.tfacr200.rade	
	long		var.tfacr200.step
	long		var.tfacr200.cain
	long 		var.tfacr200.lvat	
	domain tcmcs.s200m	var.err.mess
	domain	bccadr		var.tfacr200.adrs
	domain	bcpsty		var.tfacr200.styp
	domain	bcrtyp		var.str.rtyp
	domain	tfgld.year	vat.year
	domain	tfgld.prod	vat.prod
	domain tcbool		hello.test
extern	long		ext.lng.fp_comp
domain tcccty	new.country
domain tccvat    new.tax
								|#200-102115.so

								|#200-101927.sn
|domain tfgld.amnt 	var.tfacr200.amnt,var.tfacr200.amti,var.tfacr200.amth,var.tfacr200.vata,
|			var.tfacr200.vati,var.tfacr200.vath, var.tfacr200.svam,var.tfacr200.svah,
|			var.tfacr200.lapa,var.tfacr200.lapi,var.tfacr200.laph,var.tfacr200.dc1a,
|			var.tfacr200.dc1i,var.tfacr200.dc1h,var.tfacr200.dc2a,var.tfacr200.dc2i,
|			var.tfacr200.dc2h,var.tfacr200.dc3a,var.tfacr200.dc3i,var.tfacr200.dc3h,
|			var.tfacr200.pada,var.tfacr200.padi,var.tfacr200.padh,var.tfacr200.balc,
|			var.tfacr200.balh,var.tfacr200.bala,var.tfacr200.bahc,var.tfacr200.baco,
|			var.tfacr200.baca,var.tfacr200.basi,var.tfacr200.cdam,var.tfacr200.tore 

								|#200-101927.en
								|bin-MCR.eo


								|#200-102115.sn

							
domain tfgld.amnt 	var.tfacr200.amnt,var.tfacr200.amti,var.tfacr200.vata,var.tfacr200.vati,
			var.tfacr200.svam,var.tfacr200.lapa,var.tfacr200.lapi,var.tfacr200.dc1a,var.tfacr200.dc1i,
			var.tfacr200.dc2a,var.tfacr200.dc2i,var.tfacr200.dc3a,var.tfacr200.dc3i,var.tfacr200.pada,
			var.tfacr200.padi,var.tfacr200.balc,var.tfacr200.bala,var.tfacr200.baco,var.tfacr200.basi


double 			var.tfacr200.amth(3),var.tfacr200.vath(3), var.tfacr200.svah(3),var.tfacr200.laph(3),
			var.tfacr200.dc1h(3),var.tfacr200.dc2h(3),var.tfacr200.dc3h(3),var.tfacr200.padh(3),
			var.tfacr200.balh(3),var.tfacr200.bahc(3),var.tfacr200.baca(3),var.tfacr200.cdam(3),
			var.tfacr200.tore(3) 

									
								|#200-102115.en

string		var.tfacr200.leac(12)			|#FP3.sn
Long		var.tfacr200.pysh			|#FP3.en
domain tfgld.dimx	var.dimension1
domain tfgld.dimx	var.dimension2
domain tfgld.dimx	var.dimension3
domain tfgld.dimx	var.dimension4
domain tfgld.dimx	var.dimension5
								|#235153.sn
long			var.tfacr200.post
domain	tfgld.date	var.tfacr200.pdat
								|#235153.en
								
								|#FP7.sn
domain	tcncmp		current.company		
domain	tcncmp		var.tfacr200.rcom		
domain	tfgld.ttyp	var.tfacr200.rect
domain	tfgld.docn	var.tfacr200.recd
domain	tfgld.lino	var.tfacr200.recl
domain	tfgld.amnt	var.tfacr500.toba
domain	tcyesno		var.tfacr500.flpd
								|#FP7.en
domain	tfacr.ficu	var.tfacr500.ficu			|#Migr. 10.6.n
:STBL:tfacr200,bcstc004,bcstc008,bcstc011,bcstc020,tfgld102,tfgld106,tfgld018,tfcmg112
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:cat
:TFLNO:000
:LDAT:2/4/2017 1:44:30 PM
:PRTX:START
migrate ctcat001
:PRTX:END
:STAT:V
:VARI:string		var.tfcat000.dsca(50)
string		var.tfcat000.indt(22)

|domain	tfgld.dimn	var.tfcat000.typa
:STBL:ctcat001
:COMT:START
---  Changes in table design  ---
This is a new table in %TV.

Two identical records must be created in the target environment. One record (empty date) is containing the actual set, and one record (date = current date / migration date) is containing the history of the parameter setting.

The important fields in %TTtfcat000 are filled up in the following manner:

%TFtfcat000.flea -> %SFctcat001.flea. 
%TFtfcat000.typa -> default value 5 is assigned 

For more details and field mapping for the table can be viewed in 
CS Data Conversion from BaanIVc4 to SSA ERP LN 6.1 - Controlling (D3506A US)

---  Source and Target Sessions  ---
%SSctcat0101m000 -> %TStfcat0100s000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:








:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:cat
:TFLNO:004
:LDAT:2/4/2017 1:45:00 PM
:PRTX:START
migrate ctcat050
:PRTX:END
:STAT:V
:VARI:long	var.tfcat004.cpor
:STBL:ctcat050
:COMT:START
---  Changes in table design  ---
Enum constants for the field %SFctcat050.cpor is changed in %TV. Corresponding %TV field is %TFtfcat004.cpor

For more details and field mapping for the table can be viewed in 
CS Data Conversion from BaanIVc4 to SSA ERP LN 6.1 - Controlling (D3506A US)


---  Source and Target Sessions  ---
%SSctcat0150m000 - %TStfcat0504m000


---  Migration Logic  ---


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:








:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:cat
:TFLNO:210
:LDAT:2/4/2017 1:45:24 PM
:PRTX:START
migrate ctcat220
:PRTX:END
:STAT:V
:VARI:
:STBL:ctcat220
:COMT:START
---  Changes in table design  ---

For more details and field mapping for the table can be viewed in 
CS Data Conversion from BaanIVc4 to SSA ERP LN 6.1 - Controlling (D3506A US)


---  Source and Target Sessions  ---
%SSctcat2520m000 - %TStfcat2510m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:








:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:cat
:TFLNO:211
:LDAT:2/4/2017 1:46:01 PM
:PRTX:START
migrate	ctcat221
:PRTX:END
:STAT:V
:VARI:
:STBL:ctcat221
:COMT:START
---  Changes in table design  ---
For more details and field mapping for the table can be viewed in 
CS Data Conversion from BaanIVc4 to SSA ERP LN 6.1 - Controlling (D3506A US)



---  Source and Target Sessions  ---
%SSctcat2521m000 - %TStfcat2511m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:








:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:cat
:TFLNO:220
:LDAT:2/4/2017 1:46:21 PM
:PRTX:START
migrate ctcat210
:PRTX:END
:STAT:V
:VARI:double	var.tfcat220.pqan
domain	tfgld.year	prev.year
double	var.tfcat220.pdpe
long	no.of.periods
:STBL:ctcat210
:COMT:START
---  Changes in table design  ---
For more details and field mapping for the table can be viewed in 
CS Data Conversion from BaanIVc4 to SSA ERP LN 6.1 - Controlling (D3506A US)



---  Source and Target Sessions  ---
%SSctcat2110m000 - %TStfcat2120m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:








:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:cat
:TFLNO:221
:LDAT:2/4/2017 1:46:28 PM
:PRTX:START
migrate ctcat215
:PRTX:END
:STAT:V
:VARI:|#203100.sn
#include "itfgld0038"

long	sern.count

domain tfgld.sern	var.tfcat221.sern
domain tcncmp		hold.ncmp
domain tfgld.dimn	hold.dtyp
domain tfgld.dimx	hold.dimx
string			hold.refu(3)

				|#203100.en
long var.tfcat221.kihr
long var.tfcat221.hoco
:STBL:ctcat215
:COMT:START
---  Changes in table design  ---
There are 8 new fields added in %TV. They are 
1. %TFtfcat221.cpcp 
2. %TFtfcat221.cprj 
3. %TFtfcat221.hoco 
4. %TFtfcat221.kihr 
5. %TFtfcat221.mtan 
6. %TFtfcat221.orfro 
7. %TFtfcat221.orto
8. %TFtfcat221.stan

%SFctcat215.ityp is removed in in the target version. Data from this %SF is filled in %TV in the fields %TFtfcat221.hoco and %TFtfcat221.kihr according to the enum mapping. 

For more details and field mapping for the table can be viewed in 
CS Data Conversion from BaanIVc4 to SSA ERP LN 6.1 - Controlling (D3506A US)



---  Source and Target Sessions  ---
%SSctcat2115m000 - %TStfcat2521m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:






:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:cat
:TFLNO:240
:LDAT:2/4/2017 1:46:40 PM
:PRTX:START
select	ctcat001.budg
from	ctcat001
as set with 1 rows
selectdo
endselect

migrate ctcat320
:PRTX:END
:STAT:V
:VARI:domain  tcyesno	 var.tfcat240.post
:STBL:ctcat001,ctcat320,ctcat330
:COMT:START
---  Changes in table design  ---

For more details and field mapping for the table can be viewed in 
CS Data Conversion from BaanIVc4 to SSA ERP LN 6.1 - Controlling (D3506A US)


---  Source and Target Sessions  ---

%SSctcat3520m000 & %SSctcat3530m000 - %TStfcat2540m000

---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:








:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:cat
:TFLNO:400
:LDAT:2/4/2017 1:46:53 PM
:PRTX:START
migrate ctcat400

migrate ctcat401

migrate ctcat500
:PRTX:END
:STAT:V
:VARI:domain ctcat.pdfa var.tfcat400.pdpe
domain tcyesno	 var.tfcat400.igld 
domain tcyesno	 var.tfcat400.icat 
domain tcyesno 	 var.tfcat400.ifbs
domain tffbs.disb	 var.tfcat400.disb
long var.tfcat400.valp, var.cini
domain tfcal.coca var.tfcat400.coca
domain tfgld.leac var.tfcat400.slea
domain tfgld.perc var.tfcat400.dvar
:STBL:ctcat015,ctcat400,ctcat401,ctcat500
:COMT:START
---  Changes in table design  ---
%TTtfcat400 is filled from 3 source tables %STctcat400, %STctcat401 and %TTctcat501. 

%SFctcat400.cin, %SFctcat401.cini and %SFctcat500.cini are removed. Based on the enum value of these fields, data is migrated to %TV to the 3 new fields %TFtfcat400.icat , %TFtfcat400.ifbs and %TFtfcat400.igld

For more details and field mapping for the table can be viewed in 
CS Data Conversion from BaanIVc4 to SSA ERP LN 6.1 - Controlling (D3506A US)



---  Source and Target Sessions  ---

%SSctcat4100m000, %SSctcat4101m000 & %SSctcat5100m000 --- 
%TStfcat4500m000

---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:






:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:cat
:TFLNO:412
:LDAT:2/4/2017 1:47:09 PM
:PRTX:START
migrate ctcat412
:PRTX:END
:STAT:V
:VARI:
:STBL:ctcat412
:COMT:START
---  Changes in table design  ---

For more details and field mapping for the table can be viewed in 
CS Data Conversion from BaanIVc4 to SSA ERP LN 6.1 - Controlling (D3506A US)


---  Source and Target Sessions  ---
%SSctcat4512m000 - %TStfcat4512m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:








:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:cmg
:TFLNO:000
:LDAT:12/10/2017 11:50:45 AM
:PRTX:START
get.var(pid,"ext.lng.comp",ext.lng.comp) 

select	bcgct000.user
from	bcgct000
as set with 1 rows
selectdo
endselect

select	tccom000.ccur 
from	tccom000 
where	tccom000.ncmp = :ext.lng.comp 
as set with 1 rows
selectdo 
	|var.str.ccur = left.align(tccom000.ccur,3) |*MCR .o
	var.str.ccur = 	get.home.currency.orig.comp() |*MCR.n
selectempty 
	var.str.ccur = empty.string(1;3) 
endselect 

migrate tfcmg000
:PRTX:END
:STAT:V
:VARI:long		ext.lng.comp	 	string		var.str.ccur(3)	
	string 		var.tfcmg000.indt(22)
	string 		var.tfcmg000.desc(50)
	string		var.tfcmg000.supa(16)

	domain 		tfgld.btno	var.tfcmg000.bpay,var.tfcmg000.bdir
:STBL:tccom000,tfcmg000,bcgct000
:COMT:START
---  Changes in table design  ---
%GTtcmcs0000. 
The removed fields are:
%SFtfcmg000.accu  - Available in ACR parameters table as %TFtfacr000.agan in %TV
%SFtfcmg000.acsu -  Available in ACP parameters table as %TFtfacp000.agan in %TV
%SFtfcmg000.nper - This field is removed in %TTtfcmg000 because this data is  not needed in %TV.  The periods are used to  display  the detailed cash forecasts.  In %TV, this is got as an input from the user (No. of periods) after specifying  a date range in the concerned print session %TStfcmg3412m000  
%SFtfcmg000.srno - This field is no longer maintained in %TTtfcmg000 because in the %TV the parameters are now time dependant and so each record is identified uniquely by an effective date %TFtfcmg000.indt and no longer by a sequence number.


---  Source and Target Sessions  ---
Source session - %SStfcmg0100m000
Target session - %TStfcmg0500m000


---  Migration Logic  ---


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:cmg
:TFLNO:001
:LDAT:9/26/2017 8:59:38 PM
:PRTX:START
i.table.name = "tfcmg001"
migrate tfcmg001
:PRTX:END
:STAT:V
:VARI:|table		tbccnv901
domain	bcstc.tabl i.table.name
|domain	bcstc.tabl var.table
domain	bcstc.keys var.key.tfcmg001
string var.err.mess(50)
|string var.tfcmg001.brch(3) |#206515.o
domain bcstf.bank var.tfcmg001.brch |#206515.n
long	var.tfcmg001.toac
:STBL:bcstf006,tfcmg001
:COMT:START
---  Changes in table design  ---
     
Few new fields are added in the %TTtfcmg001 for the new functionalities added in %TV.
The following fields are removed from the %STtfcmg001 and placed in %TTtfcmg011:
 tfcmg001.badr  
 tfcmg001.bnid  
 tfcmg001.btyp  
 tfcmg001.cbad 

     The following documents will explain about the table mapping in detail.

CS Data Conversion form Baan IVc4 to SSA Baan ERP 6.1 - Finance (D3439A US)


---  Source and Target Sessions  ---
    
     Source : %SStfcmg0110m000
     Target : %TStfcmg0510m000 


---  Migration Logic  ---


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:cmg
:TFLNO:101
:LDAT:2/13/2017 2:13:21 PM
:PRTX:START
|#ms.so					
|select bccnv114.*
|from  bcnv114
|where bccnv114.brtp IN ("PUR","SLS")
|selectdo
|	if bccnv114.brtp = "PUR" then 
|		var.str.pur.rtyp = bccnv114.rtyp 
|	else 
|		if bccnv114.brtp = "SLS" then 
|			var.str.sls.rtyp = bccnv114.rtyp 
|		endif 
|	endif
|endselect
						|#ms.eo
if not get.exchange.rate.type("PUR",var.str.err.mess)  then
		var.str.pur.rtyp = bcstc011.rtyp 

else
	if not get.exchange.rate.type("SLS",var.str.err.mess)  then
		var.str.sls.rtyp = bcstc011.rtyp 
	endif	
endif
							
migrate tfcmg101
:PRTX:END
:STAT:V
:VARI:long 	var.tfcmg101.adty
long	var.tfcmg101.blac

	string		var.str.rdat(22)	

	string		var.str.rtyp(3)	

	string		var.str.pur.rtyp(3)	

	string		var.str.sls.rtyp(3)	

	string		var.tfcmg101.bpid(9)	

domain  tcmcs.s200m	var.str.err.mess
domain tcccty new.country
domain tccvat new.tax
:STBL:tfcmg101,tfacp200,tfacr200,bcstc008,bcstc011
:COMT:START
---  Changes in table design  ---
Few new fields are added %TV. See DDC results for the data model changes. The removed fields are:
tfcmg101.suno - It is replaced by %TFtfcmg101.ptbp. This is done through intermediate bc table %STbcstc008

tfcmg101.oinv - The original invoice number
tfcmg101.otyp - original invoice transaction type

The above 2 fields were filled in %SV in case the payment advice was having a purchase or sales credit note. But in %TV, the tfcmg101.oinv and tfcmg101.ptyp are removed since it is not necessary to maintain the original invoice details in the payment advice for purchase/credit notes(redundant). The original invoice details can be anyway found in tfacr200 against the credit notes.
%TFtfcmg101.schn will be filled by post conversion program.

---  Source and Target Sessions  ---
%SStfcmg1501m000 -> %TStfcmg1501m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:



:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:cmg
:TFLNO:204
:LDAT:2/13/2017 2:16:37 PM
:PRTX:START
current.company = get.compnr()				|#210859.n
if not get.exchange.rate.type("SLS", err.mess) then  	   |  # ravi.sn  
	var.str.sls.rtyp = bcstc011.rtyp
else
	var.str.sls.rtyp = ""
endif
if not get.exchange.rate.type("PUR", err.mess) then
	var.str.pur.rtyp = bcstc011.rtyp				 
else
	var.str.pur.rtyp = ""
endif
if not get.exchange.rate.type("EU", err.mess) then
	var.str.eu.rtyp =  bcstc011.rtyp			
else
	var.str.eu.rtyp = ""
endif					|#ravi.en
|select	bccnv114.* 
|	from	bccnv114 
|	selectdo 
|		on case bccnv114.brtp 
|		case "PUR": 
|			var.str.pur.rtyp = bccnv114.rtyp 
|		break 
|		case "SLS": 
|			var.str.sls.rtyp = bccnv114.rtyp 
|		break 
|		case "EU ": 
|			var.str.eu.rtyp = bccnv114.rtyp 
|		break 
|		endcase 
|	endselect 

migrate tfcmg204
:PRTX:END
:STAT:V
:VARI:string		var.tfcmg204.bpid(9)	|*

	string		var.tfcmg204.pbpt(9)	|*

	string		var.str.rdat(22)	|*

	string		var.str.rtyp(3)	|*

	string		var.str.pur.rtyp(3)	|*

	string		var.str.sls.rtyp(3)	|*

	string		var.str.eu.rtyp(3)	|*
domain	tcmcs.s200m	err.mess
long 	var.tfcmg204.adty
domain tcccty new.country
domain tccvat new.tax
domain tcncmp current.company 	|#210859.n
:STBL:tfcmg204,tfacr200,tfacp200,bcstc011,bcstc008
:COMT:START
---  Changes in table design  ---
%SFtfcmg204.suno and %SFtfcmg204.cuno are removed in %TV. They are replaced by %TFtfcmg204.bpid field.
%TFtfcmg204.schn will be filled by post conversion program.
Refer to the following document for more details:

CS Data Conversion form Baan IVc4 to SSA Baan ERP 6.1 - Finance (D3439A US)


---  Source and Target Sessions  ---

%SStfcmg2100s000 - %TStfcmg2100s000

---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:



:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:cmg
:TFLNO:301
:LDAT:2/13/2017 2:17:39 PM
:PRTX:START
var.comp = get.compnr()
migrate tfcmg301
:PRTX:END
:STAT:V
:VARI:long		var.tfcmg301.forc
long		var.tfcmg301.ftyp
string		var.tfcmg301.bpid(9)	

	string		var.tfcmg301.orig(30)	

domain	tcmcs.s200m	err.mess	|#ravi.sn
domain	tcncmp		var.comp	|#ravi.en
:STBL:tfcmg301,bcstc008
:COMT:START
---  Changes in table design  ---
The following fields are removed from the %STtfcmg301.
%SFtfcmg301.cuno, %SFtfcmg301.suno --> now these fields are replaced with 
%TFtfcmg301.bpid

%SFtfcmg301.budg, %SFtfcmg301.cprj, %SFtfcmg301.leac, %SFtfcmg301.ninv,
%SFtfcmg301.orno, %SFtfcmg301.pono ---> Now these fields will be filled in %TTtfcmg301 with %TFtfcmg301.orig field. %TFtfcmg301.orig is filled as explained in the document %GTtfcmg0002 

%TFtfcmg301.ninv should be filled with %SFtppin020.nins according to the new functionality in %TV in case of Fore cast component of type Project Order. But in %SV the above field is not filled as in %SV because of the %SV functionality. When user runs the %TStfcmg3210m000 after migration, %TFtfcmg301.ninv field will be filled accordingly for Project Orders. Otherwise %TFtfcmg301.ninv will have the data according to %STtfcmg301.

%TFtfcmg301.schn will be filled by post conversion program.

Refer to the following document for more details:

CS Data Conversion form Baan IVc4 to SSA Baan ERP 6.1 - Finance (D3439A US)




---  Source and Target Sessions  ---
%SStfcmg3210m000 - %TStfcmg3210m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:



:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:fam
:TFLNO:000
:LDAT:2/16/2018 11:55:35 AM
:PRTX:START
num.to.date(date.num(), var.lng.tffam000.year, var.lng.monthno, var.lng.dayno) 
	 
var.lng.tffam000.prod = 0 

|  *** FOR FIELD rtya,rtyd,rtyj,rtyt,rtyr 
select bcstc011.rtyp 
from bcstc011 
as set with 1 rows 
selectdo 
	 var.tffam000.rtyp = left.align (bcstc011.rtyp,3) 
endselect 

|select tfgld005.ptyp, tfgld005.year, tfgld005.stdt, tfgld005.prno                 |#213701.so
|from   tfgld005 
|where  tfgld005._index1 = { 1, :var.lng.tffam000.year} and tfgld005.stdt <= date.num() 
|order by tfgld005._index1 desc 
|as set with 1 rows 
|selectdo 
|	var.lng.tffam000.prod = tfgld005.prno  
|endselect	 							|#213701.eo

select bcstf000.* 
from   bcstf000 
as set with 1 rows 
selectdo 
endselect 

migrate  tffas001
:PRTX:END
:STAT:V
:VARI:string		var.str.tffam000.dsca(50)	
string		var.tffam000.dctg(10)	 	
string		var.tffam000.rtyp(3)	 	
long		var.lng.tffam000.year	 	
long		var.lng.tffam000.prod	 	
long		var.lng.monthno	 	
long		var.lng.dayno
String		var.tffam000.indt(22)
:STBL:bcstc011,bcstf000,tffas001,tffas004,tfgld005,tffas203
:COMT:START
---  Changes in table design  ---
This is a new table in %TV which gets data from %STtffas001 in %SV.

Refer to the following document for more details:
CS Data Conversion form Baan IVc4 to SSA Baan ERP 6.1 - Finance (D3439A US)
Refer to the topic document %GTtcmcs0000

---  Source and Target Sessions  ---

Source Session : %SStffas0100m000
Target Session : %TStffam0500m000

---  Migration Logic  ---
%GTtcmcs0000

In the target, some of the fields(%TFtffam000.rtya, %TFtffam000.rtyd, %TFtffam000.rtyj, %TFtffam000.rtyt, %TFtffam000.rtyr, %TFtffam000.ttyp) should be filled from mapping tables in the conversion module. 

Refer to the following document for more details:
CS Data Conversion form Baan IVc4 to SSA Baan ERP 6.1 - Finance (D3439A US)


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:fam
:TFLNO:100
:LDAT:12/10/2017 11:57:19 AM
:PRTX:START
dummy.ret = read.parameters.finance(o.errmess)

select tffas001.fdpc 
from tffas001 
as set with 1 rows 
selectdo 
endselect
 
var.tffam100.date = utc(0,0,2)
ext.lng.comp = get.compnr()

select bcstc011.rtyp:var.str.tffam100.rtyp 
from   bcstc011 
as set with 1 rows 
selectdo 
endselect 

|*MCR .#
|select tccom000.ccur 
|from   tccom000 
|where  tccom000._index1 = {:ext.lng.comp} 
|as set with 1 rows 
|selectdo 
|	var.tffam100.curr = left.align(tccom000.ccur,3) 	
|endselect
var.tffam100.curr = get.home.currency.orig.comp() |*MCR

migrate tffas007
:PRTX:END
:STAT:V
:VARI:#include	"itfgld0012"		|* Get period and year from date
domain  tcmcs.s200m	o.errmess
string		var.str.fudt(22)	 	
	long		dummy.ret
	long		ext.lng.comp	 	
	long		var.lng.tffam100.ownc	 	
	long		var.lng.tffam100.rcmp	 	
	long		var.lng.tffam100.qty	 	
	string		var.tffam100.agrp(10)	 	
	string		var.tffam100.curr(3)	 	
	string		var.str.tffam100.rnbr(15)	 	
	string		var.str.tffam100.rtyp(3)	 	
	domain	tcyesno	var.tffam100.trfg	 	
	domain	tfgld.amnt	var.tffam100.salv	 	
	string		var.tffam100.date(22)	
	string		var.str.err.mess(50)
	string		var.tffam100.bpid(50)
	string		g.invn(20)		|#200-100959

	long		var.tffam100.stat 	|#200-98001.n
						|#200-100961.sn
	domain	tfgld.year	acc.year
	domain	tfgld.prod	acc.prod
						|#200-100961.en
	domain tcbool 	stat.filled
	string		var.tffam100.rext(15)	|#200-100985.n
:STBL:bcstc008,bcstc011,tccom000,tffas001,tffas002,tffas004,tffas005,tffas007,tffas008,tffas101,tffas020,bcstf000,tffas100,tffas103
:COMT:START
---  Changes in table design  ---
This is a new table in %TV which gets data from %STtffas007 in %SV.

Refer to the following document for more details:
CS Data Conversion form Baan IVc4 to SSA Baan ERP 6.1 - Finance (D3439A US)

---  Source and Target Sessions  ---

Source Session : %SStffas0106m000
Target Session : %TStffam1500m000

---  Migration Logic  ---
The target field %TFtffam100.rtyp should be filled from a mapping table in the conversion module. 

Refer to the following document for migration logic:
CS Data Conversion form Baan IVc4 to SSA Baan ERP 6.1 - Finance (D3439A US)


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:fam
:TFLNO:710
:LDAT:9/26/2017 8:59:39 PM
:PRTX:START
migrate tffas008
migrate tffas005
migrate tffas002
:PRTX:END
:STAT:V
:VARI:double		var.dbl.dbpt	 	double		var.dbl.tffam710.intr	 	double		var.dbl.tffam710.life	 	long		var.lng.tffam710.conv	 	long		var.lng.tffam710.dbpt	 	long		var.lng.tffam710.depl	 	long		var.lng.tffam710.type	 	long		var.lng.tffam710.rtty	 	string		var.str.tffam710.meth(20)	 	string		var.str.tffam710.desc(30)	 	domain	tfgld.amnt	var.tfgld.amnt.tffam710.fixa
:STBL:tffas008,tffas005,tffas002,tffas009,tffas101
:COMT:START
---  Changes in table design  ---
This is a new table in %TV and it is filled from the 
following source tables,
%STtffas002
%STtffas005
%STtffas008


---  Source and Target Sessions  ---
Source Session : %SStffas0101m000
Target Session : %TStffam7510m000


---  Migration Logic  ---
In %SV the depreciation related datas are maintained in three
places namely,
%SStffas0101m000
%SStffas0104m000
%SStffas0107m000
Whereas in %TV the depreciation related data is maintained in the
%TStffam7510m000. So all the records present in those three source
tables has to be migrated to the target table. As far as the record in %STtffas008 is concerned only those fixed asset data that are not present in %STtffas101 is migrated.

---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:fbs
:TFLNO:000
:LDAT:2/4/2017 1:47:28 PM
:PRTX:START
ext.lng.comp = get.compnr()

select tccom000.ccur:var.tffbs000.dcur
from tccom000
where tccom000.ncmp = :ext.lng.comp
as set with 1 rows
selectdo
endselect

migrate ctcat001
:PRTX:END
:STAT:V
:VARI:string		var.str.tffbs000.dsca(50)
String		var.tffbs000.indt(22)
String		var.tffbs000.dcur(3)
:STBL:tccom000,ctcat001
:COMT:START
---  Changes in table design  ---
This is a new table in %TV.
There is no source table in %SV to migrate this table.

Two identical records must be created in the target environment. One record (empty date) is containing the actual set, and one record (date = current date / migration date) is containing the history of the parameter setting.

For more details and field mapping for the table can be viewed in 
CS Data Conversion from BaanIVc4 to SSA ERP LN 6.1 - Controlling (D3506A US)

---  Source and Target Sessions  ---

%SSctcat0101m000 -  %TStffbs0500m000

---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:








:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:fbs
:TFLNO:003
:LDAT:2/4/2017 1:47:39 PM
:PRTX:START
migrate tffbs003
:PRTX:END
:STAT:V
:VARI:domain	tcyesno	var.tffbs003.sdbu
:STBL:tffbs003,ctcat110
:COMT:START
---  Changes in table design  ---

%STtffbs003 is migrated to target tables %TTtffbs003 and %TTtffbs005.

Fields %SFtffbs003.ccur, %SFtffbs003.cobu, %SFtffbs003.dbud, %SFtffbs003.defi, %SFtffbs003.disb, %SFtffbs003.lmda, %SFtffbs003.pbud, %SFtffbs003.ratf, %SFtffbs003.rats are migrated to target table %TTtffbs005.

And %SFtffbs003.disp doesn't exist in %TV. This field is used for only displaying purpose at source side. 

The following source fields are renamed in the %TV as below. 
%SFtffbs003.dim1 to %TFtffbs003.adt1, 
%SFtffbs003.dim2 to %TFtffbs003.adt2, 
%SFtffbs003.dim3 to %TFtffbs003.adt3, 
%SFtffbs003.dim4 to %TFtffbs003.dim4, 
%SFtffbs003.dim5 to %TFtffbs003.dim5, 
%SFtffbs003.qan1 to %TFtffbs003.aqu1, 
%SFtffbs003.qan2 to %TFtffbs003.aqu2, 
%SFtffbs003.prod to %TFtffbs003.nbpr.
And one new field %TFtffbs003.sdbu is added.

For more details and field mapping for the table can be viewed in 
CS Data Conversion from BaanIVc4 to SSA ERP LN 6.1 - Controlling (D3506A US)


---  Source and Target Sessions  ---

Source Session : %SStffbs0103m000
Target Session : %TStffbs0503m000

---  Migration Logic  ---


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:




:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:fbs
:TFLNO:004
:LDAT:2/4/2017 1:47:52 PM
:PRTX:START
previous.budget = ""
|get.year.range.from.tffbs101(var.first.year, var.last.year)	|#1150172.o

migrate tffbs003
:PRTX:END
:STAT:V
:VARI:domain   tfgld.year     var.main.budget.year
domain   tfgld.year	var.first.year
domain	 tfgld.year	var.last.year
domain	 tfgld.year	var.parent.budget.year
domain	 tfgld.year	var.comparison.budget.year
domain	 tfgld.year	var.derived.budget.year
domain	 tffbs.budg	previous.budget
domain	 tcyesno	var.tffbs005.defi
:STBL:tffbs101,tffbs003,tffbs004,ctcat016,ctcat110
:COMT:START
---  Changes in table design  ---
The following new fields are added in %TV for %TTtffbs004.
%TFtffbs004.brat,
%TFtffbs004.vari,
%TFtffbs004.year.

Regarding %TTtffbs005:
This is a new table in %TV which gets data from %STtffbs101 and   %STtffbs003 of    %SV.

%GTCS-Finance

---  Source and Target Sessions  ---
%SStffbs0104m000 - %TStffbs0504m000
%SStffbs1101m000 - %TStffbs0505m000

---  Migration Logic  ---
Source tables are %STtffbs101, %STtffbs004,  and %STtffbs003.

To migrate %STtffbs005, the records are selected from tables      %STtffbs003 and %STtffbs101, where  %SFtffbs101.budg refers to %SFtffbs003.budg.

To migrate %STtffbs004, the records are selected from tables %STtffbs101 and %STtffbs004.

In Baan IV the data in %STtffbs004 is maintained per budget and this budget code can be linked to any year. But in ERP Ln the data in %TTtffbs004 is maintained for year and budget code.

---  Migration Parameters  ---

---  Migration Mapping Tables  ---

---  Technical Notes  ---

---  Performance  ---
:COMT:END
:TEXT:



:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:fbs
:TFLNO:005
:LDAT:2/4/2017 1:47:52 PM
:PRTX:START
previous.budget = ""
|get.year.range.from.tffbs101(var.first.year, var.last.year)	|#1150172.o

migrate tffbs003
:PRTX:END
:STAT:V
:VARI:domain   tfgld.year     var.main.budget.year
domain   tfgld.year	var.first.year
domain	 tfgld.year	var.last.year
domain	 tfgld.year	var.parent.budget.year
domain	 tfgld.year	var.comparison.budget.year
domain	 tfgld.year	var.derived.budget.year
domain	 tffbs.budg	previous.budget
domain	 tcyesno	var.tffbs005.defi
:STBL:tffbs101,tffbs003,tffbs004,ctcat016,ctcat110
:COMT:START
---  Changes in table design  ---
The following new fields are added in %TV for %TTtffbs004.
%TFtffbs004.brat,
%TFtffbs004.vari,
%TFtffbs004.year.

Regarding %TTtffbs005:
This is a new table in %TV which gets data from %STtffbs101 and   %STtffbs003 of    %SV.

%GTCS-Finance

---  Source and Target Sessions  ---
%SStffbs0104m000 - %TStffbs0504m000
%SStffbs1101m000 - %TStffbs0505m000

---  Migration Logic  ---
Source tables are %STtffbs101, %STtffbs004,  and %STtffbs003.

To migrate %STtffbs005, the records are selected from tables      %STtffbs003 and %STtffbs101, where  %SFtffbs101.budg refers to %SFtffbs003.budg.

To migrate %STtffbs004, the records are selected from tables %STtffbs101 and %STtffbs004.

In Baan IV the data in %STtffbs004 is maintained per budget and this budget code can be linked to any year. But in ERP Ln the data in %TTtffbs004 is maintained for year and budget code.

---  Migration Parameters  ---

---  Migration Mapping Tables  ---

---  Technical Notes  ---

---  Performance  ---
:COMT:END
:TEXT:



:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:fbs
:TFLNO:010
:LDAT:2/4/2017 1:48:11 PM
:PRTX:START
migrate ctcat002
:PRTX:END
:STAT:V
:VARI:long var.tffbs010.adt1
long var.tffbs010.adt2
long var.tffbs010.adt3
long var.tffbs010.adt4
long var.tffbs010.adt5
:STBL:ctcat002
:COMT:START
---  Changes in table design  ---

For more details and field mapping for the table can be viewed in 
CS Data Conversion from BaanIVc4 to SSA ERP LN 6.1 - Controlling (D3506A US)


---  Source and Target Sessions  ---
%SSctcat0102m000 - %TStffbs0510m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:




:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:fbs
:TFLNO:011
:LDAT:2/4/2017 1:48:19 PM
:PRTX:START
migrate ctcat003
:PRTX:END
:STAT:V
:VARI:
:STBL:ctcat003
:COMT:START
---  Changes in table design  ---
For more details and field mapping for the table can be viewed in 
CS Data Conversion from BaanIVc4 to SSA ERP LN 6.1 - Controlling (D3506A US)



---  Source and Target Sessions  ---
%SSctcat0103m000 - %TStffbs0111m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:








:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:fbs
:TFLNO:012
:LDAT:2/4/2017 1:48:35 PM
:PRTX:START
migrate ctcat004
:PRTX:END
:STAT:V
:VARI:
:STBL:ctcat004
:COMT:START
---  Changes in table design  ---

For more details and field mapping for the table can be viewed in 
CS Data Conversion from BaanIVc4 to SSA ERP LN 6.1 - Controlling (D3506A US)


---  Source and Target Sessions  ---
%SSctcat0104m000 - %TStffbs0112m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:








:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:fbs
:TFLNO:020
:LDAT:2/4/2017 1:48:44 PM
:PRTX:START
migrate ctcat010
:PRTX:END
:STAT:V
:VARI:
:STBL:ctcat010
:COMT:START
---  Changes in table design  ---
For more details and field mapping for the table can be viewed in 
CS Data Conversion from BaanIVc4 to SSA ERP LN 6.1 - Controlling (D3506A US)



---  Source and Target Sessions  ---
%SSctcat0110m000 - %TStffbs0120m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:








:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:fbs
:TFLNO:021
:LDAT:2/4/2017 1:48:54 PM
:PRTX:START
migrate ctcat021
:PRTX:END
:STAT:V
:VARI:
:STBL:ctcat021
:COMT:START
---  Changes in table design  ---
For more details and field mapping for the table can be viewed in 
CS Data Conversion from BaanIVc4 to SSA ERP LN 6.1 - Controlling (D3506A US)



---  Source and Target Sessions  ---
%SSctcat0121m000 - %TStffbs0121m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:








:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:fbs
:TFLNO:030
:LDAT:2/4/2017 1:49:03 PM
:PRTX:START
migrate ctcat015
:PRTX:END
:STAT:V
:VARI:long var.tffbs030.rtyp	
long var.tffbs030.ptyp
long var.tffbs030.pdpa
string var.tffbs030.slea(12)
:STBL:ctcat015
:COMT:START
---  Changes in table design  ---
For more details and field mapping for the table can be viewed in 
CS Data Conversion from BaanIVc4 to SSA ERP LN 6.1 - Controlling (D3506A US)


---  Source and Target Sessions  ---
%SSctcat1115m000 - %TStffbs0530m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:








:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:fbs
:TFLNO:040
:LDAT:2/4/2017 1:49:13 PM
:PRTX:START
migrate ctcat014
:PRTX:END
:STAT:V
:VARI:
:STBL:ctcat014
:COMT:START
---  Changes in table design  ---
For more details and field mapping for the table can be viewed in 
CS Data Conversion from BaanIVc4 to SSA ERP LN 6.1 - Controlling (D3506A US)



---  Source and Target Sessions  ---
%SSctcat0114m000 - %TStffbs0140m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:








:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:fbs
:TFLNO:041
:LDAT:2/4/2017 1:49:23 PM
:PRTX:START
migrate ctcat012
:PRTX:END
:STAT:V
:VARI:long	var.tffbs041.ltyp
:STBL:ctcat012
:COMT:START
---  Changes in table design  ---
For more details and field mapping for the table can be viewed in 
CS Data Conversion from BaanIVc4 to SSA ERP LN 6.1 - Controlling (D3506A US)



---  Source and Target Sessions  ---
%SSctcat0112m000 - %TStffbs0141m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:








:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:fbs
:TFLNO:042
:LDAT:2/4/2017 1:49:36 PM
:PRTX:START
migrate	ctcat013
:PRTX:END
:STAT:V
:VARI:
:STBL:ctcat013
:COMT:START
---  Changes in table design  ---
For more details and field mapping for the table can be viewed in 
CS Data Conversion from BaanIVc4 to SSA ERP LN 6.1 - Controlling (D3506A US)



---  Source and Target Sessions  ---



---  Migration Logic  ---
%SSctcat0112m000 - %TStffbs0142m000


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:








:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:fbs
:TFLNO:100
:LDAT:2/4/2017 1:49:45 PM
:PRTX:START
var.dbl.sum.amnt = 0 
var.dbl.sum.qan1 = 0 
var.dbl.sum.qan2 = 0 
var.fill.tffbs100 = true
migrate  tffbs101
:PRTX:END
:STAT:V
:VARI:long	var.tffbs100.back
double		var.dbl.sum.amnt	

	double		var.dbl.sum.qan1	

	double		var.dbl.sum.qan2	
	
	domain		tfgld.amnt 	var.tffbs101.stam
	domain		tcbool		var.fill.tffbs100
:STBL:tffbs101
:COMT:START
---  Changes in table design  ---

For more details and field mapping for the table can be viewed in 
CS Data Conversion from BaanIVc4 to SSA ERP LN 6.1 - Controlling (D3506A US)


---  Source and Target Sessions  ---
%SSctcat1110m000 - %TStffbs1500m000

---  Migration Logic  ---




---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:




:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:fbs
:TFLNO:101
:LDAT:2/4/2017 1:49:45 PM
:PRTX:START
var.dbl.sum.amnt = 0 
var.dbl.sum.qan1 = 0 
var.dbl.sum.qan2 = 0 
var.fill.tffbs100 = true
migrate  tffbs101
:PRTX:END
:STAT:V
:VARI:long	var.tffbs100.back
double		var.dbl.sum.amnt	

	double		var.dbl.sum.qan1	

	double		var.dbl.sum.qan2	
	
	domain		tfgld.amnt 	var.tffbs101.stam
	domain		tcbool		var.fill.tffbs100
:STBL:tffbs101
:COMT:START

:COMT:END
:TEXT:




:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:fbs
:TFLNO:110
:LDAT:2/4/2017 1:50:24 PM
:PRTX:START
migrate ctcat110
:PRTX:END
:STAT:V
:VARI:double var.tffbs110.brat
:STBL:ctcat110
:COMT:START
---  Changes in table design  ---

For more details and field mapping for the table can be viewed in 
CS Data Conversion from BaanIVc4 to SSA ERP LN 6.1 - Controlling (D3506A US)


---  Source and Target Sessions  ---

%SSctcat1110m000 - %TStffbs1510m000

---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:








:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:fbs
:TFLNO:111
:LDAT:2/4/2017 1:50:32 PM
:PRTX:START
migrate ctcat120
:PRTX:END
:STAT:V
:VARI:
:STBL:ctcat120
:COMT:START
---  Changes in table design  ---
For more details and field mapping for the table can be viewed in 
CS Data Conversion from BaanIVc4 to SSA ERP LN 6.1 - Controlling (D3506A US)



---  Source and Target Sessions  ---

%SSctcat1120m000 - %TStffbs1111m000

---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:








:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:fbs
:TFLNO:120
:LDAT:2/4/2017 1:50:47 PM
:PRTX:START
migrate ctcat111
:PRTX:END
:STAT:V
:VARI:
:STBL:ctcat111
:COMT:START
---  Changes in table design  ---

For more details and field mapping for the table can be viewed in 
CS Data Conversion from BaanIVc4 to SSA ERP LN 6.1 - Controlling (D3506A US)


---  Source and Target Sessions  ---
%SSctcat2110m000 - %TStffbs11200m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:








:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:fbs
:TFLNO:121
:LDAT:2/4/2017 1:50:54 PM
:PRTX:START
migrate ctcat121
:PRTX:END
:STAT:V
:VARI:double	var.tffbs121.pdpe
:STBL:ctcat121,ctcat015
:COMT:START
---  Changes in table design  ---
For more details and field mapping for the table can be viewed in 
CS Data Conversion from BaanIVc4 to SSA ERP LN 6.1 - Controlling (D3506A US)



---  Source and Target Sessions  ---
%SSctcat2121m000 - %TStffbs1121m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:








:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:fbs
:TFLNO:130
:LDAT:2/4/2017 1:51:03 PM
:PRTX:START
migrate ctcat130
:PRTX:END
:STAT:V
:VARI:domain tcitem var.tffbs130.item
string var.cprj(9)
:STBL:ctcat130
:COMT:START
---  Changes in table design  ---

For more details and field mapping for the table can be viewed in 
CS Data Conversion from BaanIVc4 to SSA ERP LN 6.1 - Controlling (D3506A US)


---  Source and Target Sessions  ---
%SSctcat1130m000 - %TStffbs1530m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:








:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:fbs
:TFLNO:131
:LDAT:2/4/2017 1:51:11 PM
:PRTX:START
migrate ctcat131
:PRTX:END
:STAT:V
:VARI:domain  tccpcp	var.tffbs131.cpcp
long	var.tffbs131.orty 
long	var.tffbs131.vaco
domain	tcmcs.s200m	o.err.mess
:STBL:ctcat131,bcstc006
:COMT:START
---  Changes in table design  ---
For more details and field mapping for the table can be viewed in 
CS Data Conversion from BaanIVc4 to SSA ERP LN 6.1 - Controlling (D3506A US)



---  Source and Target Sessions  ---
%SSctcat1131m000 - %TStffbs1531m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:








:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:gld
:TFLNO:004
:LDAT:12/10/2017 12:04:01 PM
:PRTX:START
ret.long = read.parameters.finance(error.message)
ret.long = get.enterprise.unit(get.compnr(), get.compnr(), error.message)
|* Makes attributes of enterprise unit current. Needed for default accounting office.
migrate tfgld004
:PRTX:END
:STAT:V
:VARI:string	var.tfgld004.indt(22)
string	var.tfgld004.dsca(50)
string	error.message
long	ret.long
:STBL:tfgld004,bcstf000,bcstc018
:COMT:START
---  Changes in table design  ---
%GTtcmcs0000

Removed fields:
tfgld004.srno


---  Source and Target Sessions  ---
%SStfgld0103m000 - %TStfgld0503m000


---  Migration Logic  ---
In %TV the company parameters contains a ledger account for Exchange Gain/Loss. This account is mandatory. In %SV this ledger account does not exist. Before the migration starts a ledger account code (and description) must be entered in %SSbcstf0100m000.   
The default accounting department should be defined in %SSbcstc0118m000.

---  Migration Parameters  ---
%SFbcstf000.legl

---  Migration Mapping Tables  ---
%STbcstc018

---  Technical Notes  ---
Not applicable


---  Performance  ---
Not applicable

:COMT:END
:TEXT:


:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:gld
:TFLNO:008
:LDAT:6/17/2018 11:11:29 PM
:PRTX:START
select	tfgld004.clac, tfgld004.clcl 
from	tfgld004 
as set with 1 rows 
selectdo 
endselect

dummy.long = read.parameters.common(error.mess)
dummy.long = read.parameters.finance(error.mess)

								|#FP10.sn
var.validation.rule = "MIGRRULE"
var.rule.version = 1
dump 7 |* Cross validation rule
var.max.validation.line = 0
array.depth = 0

|*set.fmax(var.tfgld009.udim)
|* BaanIV assumes ZZZZZZ as max string value 
|* for dimensions independent of user locale
var.tfgld009.udim = get.string(57)  |* ZZZZZZZZZ
var.max.dimension = var.tfgld009.udim(1;6)

var.cvr.udim1 = ""	 					
var.cvr.udim2 = ""	 					
var.cvr.udim3 = ""	 					
var.cvr.udim4 = ""	 					
var.cvr.udim5 = ""
								|#FP10.en

read.dimensions.used(						|#210751.sn
	dimension1.used,
	dimension2.used,
	dimension3.used,
	dimension4.used,
	dimension5.used)					|#210751.en
 if dimension1.used =  tcyesno.yes then 	 	 | #  218049.sn  
	 var.tfgld008.dim1 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 1,
		 var.cvr.udim1)					|#FP10.n
 else 	 	 	  
	 var.tfgld008.dim1 =  tfgld.dopt.no  
 endif 	 	 	 	  
 if dimension2.used =  tcyesno.yes then  
	 var.tfgld008.dim2 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 2,
		 var.cvr.udim2)					|#FP10.n
 else 	 	 	  
	 var.tfgld008.dim2 =  tfgld.dopt.no  
 endif 	  
 if dimension3.used =  tcyesno.yes then  
	 var.tfgld008.dim3 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 3,
		 var.cvr.udim3)					|#FP10.n
 else 	 	 	  
	 var.tfgld008.dim3 =  tfgld.dopt.no  
 endif  
 if dimension4.used =  tcyesno.yes then  
	 var.tfgld008.dim4 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 4,
		 var.cvr.udim4)					|#FP10.n
 else 	 	 	  
	 var.tfgld008.dim4 =  tfgld.dopt.no  
 endif  
 if dimension5.used =  tcyesno.yes then  
	 var.tfgld008.dim5 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 5,
		 var.cvr.udim5)					|#FP10.n
 else 	 	 	  
	 var.tfgld008.dim5 =  tfgld.dopt.no  
 endif 	 	 	 	 	 	 | #  218049.en
	 
dump 4	|* Exchange Gain and Loss Account is added
								|#FP10.sn
|* new dimensions are always no
for  nof.elements = 6 to 12 
	dim.options( nof.elements) = tfgld.dopt.no
endfor
nof.elements = 0
dim.options(1)= var.tfgld008.dim1
dim.options(2)= var.tfgld008.dim2
dim.options(3)= var.tfgld008.dim3
dim.options(4)= var.tfgld008.dim4
dim.options(5)= var.tfgld008.dim5


convert.dimension.ranges.to.cvr.rule(
	bcstf000.legl,
	dim.options,
	array.depth,
	nof.elements,
	fdim.array,
	tdim.array)
	
dmp.vcr.rule.elements.from.arrays(
	bcstf000.legl,
	dim.options,
	var.cvr.udim1,
	var.cvr.udim2,
	var.cvr.udim3,
	var.cvr.udim4,
	var.cvr.udim5,
	array.depth,
	nof.elements,
	fdim.array,
	tdim.array)

								|#FP10.en
migrate tfgld008
migrate bcstf008
migrate tfgld009
:PRTX:END
:STAT:V
:VARI:long				var.tfgld008.alat
domain	tfgld.dbcr		var.tfgld008.dbcr
	long			var.tfgld008.ifas	
	long			var.tfgld008.iprj	
domain	tcicur			var.tfgld008.icur
domain 	tfgld.dopt		var.tfgld008.dim1
domain	tfgld.dopt		var.tfgld008.dim2
domain	tfgld.dopt		var.tfgld008.dim3
domain	tfgld.dopt		var.tfgld008.dim4
domain	tfgld.dopt		var.tfgld008.dim5
domain	tfgld.atyp		var.tfgld008.atyp
domain	tfgld.leac		var.tfgld008.cdca
domain	tfgld.leac		var.tfgld009.leac
domain	tfgld.dimn		var.tfgld009.dtyp
domain	tfgld.dimx		var.tfgld009.fdim
	long			dummy.long
domain	tcmcs.s200m		error.mess
domain	tcyesno			dimension1.used			|#210751.sn
domain	tcyesno			dimension2.used
domain	tcyesno			dimension3.used
domain	tcyesno			dimension4.used
domain	tcyesno			dimension5.used			|#210751.en
domain	tccuni			var.tfgld008.uni1
domain	tfgld.bloc		var.tfgld008.bloc
|* domain of dimension is changed from length 6 to 9, 
|* similar domain from BaanIV is used (tccvat).
domain	tccvat			var.max.dimension
domain	tccvat			var.tfgld009.udim

								|#FP10.sn
	#define DIM.LENGTH		9
	#define MAX.DIMENSIONS	12	
	#define	TRANSACTION.SIZE	50
	#define	ALLOC.BLOCK		10

domain	tccvat			var.validation.rule
domain	tfgld.lino		var.rule.version
domain	tfgld.lino		var.max.validation.line
domain	tfgld.leac		var.tfgld052.leac

	long			array.depth
	long			nof.elements
domain	tcmcs.s132		fdim.array(1)	based
domain	tcmcs.s132		tdim.array(1)	based
domain	tfgld.dopt		dim.options(MAX.DIMENSIONS)

domain	tccvat			var.cvr.udim1
domain	tccvat			var.cvr.udim2
domain	tccvat			var.cvr.udim3
domain	tccvat			var.cvr.udim4
domain	tccvat			var.cvr.udim5
domain	tccvat			var.from.dim(12)
domain	tccvat			var.to.dim(12)

								|#FP10.en
:STBL:tfgld004,tfgld008,bcstf000,bcstf007,bcstf008,tfacp005,tfacr005,tfgld009,bcstc000,ctcat110,ctcat400,ctcat500
:COMT:START
---  Changes in table design  ---
%GTtfgld0000


---  Source and Target Sessions  ---
%SStfgld0108s000 - %TStfgld0508m000
%SStfgld0109m000 - %TStfgld0109m000

---  Migration Logic  ---
%GTtfgld0000
- In %TV new dimensions are introduced (6-12). The initial values for these fields is "Optional".
As the %SV cannot have these new dimensions during the migration these are set to "Not Used".



---  Migration Parameters  ---
%TFbcstf000.legl, %TFbcstf000.legd


---  Migration Mapping Tables  ---
%TTbcstf007


---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:gld
:TFLNO:009
:LDAT:6/17/2018 11:11:29 PM
:PRTX:START
select	tfgld004.clac, tfgld004.clcl 
from	tfgld004 
as set with 1 rows 
selectdo 
endselect

dummy.long = read.parameters.common(error.mess)
dummy.long = read.parameters.finance(error.mess)

								|#FP10.sn
var.validation.rule = "MIGRRULE"
var.rule.version = 1
dump 7 |* Cross validation rule
var.max.validation.line = 0
array.depth = 0

|*set.fmax(var.tfgld009.udim)
|* BaanIV assumes ZZZZZZ as max string value 
|* for dimensions independent of user locale
var.tfgld009.udim = get.string(57)  |* ZZZZZZZZZ
var.max.dimension = var.tfgld009.udim(1;6)

var.cvr.udim1 = ""	 					
var.cvr.udim2 = ""	 					
var.cvr.udim3 = ""	 					
var.cvr.udim4 = ""	 					
var.cvr.udim5 = ""
								|#FP10.en

read.dimensions.used(						|#210751.sn
	dimension1.used,
	dimension2.used,
	dimension3.used,
	dimension4.used,
	dimension5.used)					|#210751.en
 if dimension1.used =  tcyesno.yes then 	 	 | #  218049.sn  
	 var.tfgld008.dim1 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 1,
		 var.cvr.udim1)					|#FP10.n
 else 	 	 	  
	 var.tfgld008.dim1 =  tfgld.dopt.no  
 endif 	 	 	 	  
 if dimension2.used =  tcyesno.yes then  
	 var.tfgld008.dim2 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 2,
		 var.cvr.udim2)					|#FP10.n
 else 	 	 	  
	 var.tfgld008.dim2 =  tfgld.dopt.no  
 endif 	  
 if dimension3.used =  tcyesno.yes then  
	 var.tfgld008.dim3 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 3,
		 var.cvr.udim3)					|#FP10.n
 else 	 	 	  
	 var.tfgld008.dim3 =  tfgld.dopt.no  
 endif  
 if dimension4.used =  tcyesno.yes then  
	 var.tfgld008.dim4 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 4,
		 var.cvr.udim4)					|#FP10.n
 else 	 	 	  
	 var.tfgld008.dim4 =  tfgld.dopt.no  
 endif  
 if dimension5.used =  tcyesno.yes then  
	 var.tfgld008.dim5 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 5,
		 var.cvr.udim5)					|#FP10.n
 else 	 	 	  
	 var.tfgld008.dim5 =  tfgld.dopt.no  
 endif 	 	 	 	 	 	 | #  218049.en
	 
dump 4	|* Exchange Gain and Loss Account is added
								|#FP10.sn
|* new dimensions are always no
for  nof.elements = 6 to 12 
	dim.options( nof.elements) = tfgld.dopt.no
endfor
nof.elements = 0
dim.options(1)= var.tfgld008.dim1
dim.options(2)= var.tfgld008.dim2
dim.options(3)= var.tfgld008.dim3
dim.options(4)= var.tfgld008.dim4
dim.options(5)= var.tfgld008.dim5


convert.dimension.ranges.to.cvr.rule(
	bcstf000.legl,
	dim.options,
	array.depth,
	nof.elements,
	fdim.array,
	tdim.array)
	
dmp.vcr.rule.elements.from.arrays(
	bcstf000.legl,
	dim.options,
	var.cvr.udim1,
	var.cvr.udim2,
	var.cvr.udim3,
	var.cvr.udim4,
	var.cvr.udim5,
	array.depth,
	nof.elements,
	fdim.array,
	tdim.array)

								|#FP10.en
migrate tfgld008
migrate bcstf008
migrate tfgld009
:PRTX:END
:STAT:V
:VARI:long				var.tfgld008.alat
domain	tfgld.dbcr		var.tfgld008.dbcr
	long			var.tfgld008.ifas	
	long			var.tfgld008.iprj	
domain	tcicur			var.tfgld008.icur
domain 	tfgld.dopt		var.tfgld008.dim1
domain	tfgld.dopt		var.tfgld008.dim2
domain	tfgld.dopt		var.tfgld008.dim3
domain	tfgld.dopt		var.tfgld008.dim4
domain	tfgld.dopt		var.tfgld008.dim5
domain	tfgld.atyp		var.tfgld008.atyp
domain	tfgld.leac		var.tfgld008.cdca
domain	tfgld.leac		var.tfgld009.leac
domain	tfgld.dimn		var.tfgld009.dtyp
domain	tfgld.dimx		var.tfgld009.fdim
	long			dummy.long
domain	tcmcs.s200m		error.mess
domain	tcyesno			dimension1.used			|#210751.sn
domain	tcyesno			dimension2.used
domain	tcyesno			dimension3.used
domain	tcyesno			dimension4.used
domain	tcyesno			dimension5.used			|#210751.en
domain	tccuni			var.tfgld008.uni1
domain	tfgld.bloc		var.tfgld008.bloc
|* domain of dimension is changed from length 6 to 9, 
|* similar domain from BaanIV is used (tccvat).
domain	tccvat			var.max.dimension
domain	tccvat			var.tfgld009.udim

								|#FP10.sn
	#define DIM.LENGTH		9
	#define MAX.DIMENSIONS	12	
	#define	TRANSACTION.SIZE	50
	#define	ALLOC.BLOCK		10

domain	tccvat			var.validation.rule
domain	tfgld.lino		var.rule.version
domain	tfgld.lino		var.max.validation.line
domain	tfgld.leac		var.tfgld052.leac

	long			array.depth
	long			nof.elements
domain	tcmcs.s132		fdim.array(1)	based
domain	tcmcs.s132		tdim.array(1)	based
domain	tfgld.dopt		dim.options(MAX.DIMENSIONS)

domain	tccvat			var.cvr.udim1
domain	tccvat			var.cvr.udim2
domain	tccvat			var.cvr.udim3
domain	tccvat			var.cvr.udim4
domain	tccvat			var.cvr.udim5
domain	tccvat			var.from.dim(12)
domain	tccvat			var.to.dim(12)

								|#FP10.en
:STBL:tfgld004,tfgld008,bcstf000,bcstf007,bcstf008,tfacp005,tfacr005,tfgld009,bcstc000,ctcat110,ctcat400,ctcat500
:COMT:START
---  Changes in table design  ---
%GTtfgld0000


---  Source and Target Sessions  ---
%SStfgld0108s000 - %TStfgld0508m000
%SStfgld0109m000 - %TStfgld0109m000

---  Migration Logic  ---
%GTtfgld0000
- In %TV new dimensions are introduced (6-12). The initial values for these fields is "Optional".
As the %SV cannot have these new dimensions during the migration these are set to "Not Used".



---  Migration Parameters  ---
%TFbcstf000.legl, %TFbcstf000.legd


---  Migration Mapping Tables  ---
%TTbcstf007


---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:gld
:TFLNO:018
:LDAT:2/13/2017 2:34:30 PM
:PRTX:START
ret.long = get.exchange.rate.type("PUR", error.message)
var.str.pur.rtyp = bcstc011.rtyp
|* Get Purchase rate type

ret.long = get.exchange.rate.type("SLS", error.message)
var.str.sls.rtyp = bcstc011.rtyp
|* Get Sales rate type

ret.long = get.exchange.rate.type("EU", error.message)
var.str.eu.rtyp = bcstc011.rtyp
|* Get Internal rate type

current.company = get.compnr()
migrate tfgld018
:PRTX:END
:STAT:V
:VARI:domain	tcmcs.str3		var.tfgld018.rtyp
domain	tfgld.rate		var.tfgld018.rate(3)
domain	tcratf			var.tfgld018.ratf(3)
domain	tcccty			var.tfgld018.ccty		|#SP2.n
domain	tcmcs.str3		var.str.sls.rtyp
domain	tcmcs.str3		var.str.pur.rtyp
domain	tcmcs.str3		var.str.eu.rtyp

domain	tcmcs.s200m		error.message
domain	tcncmp			current.company
long				ret.long
long				element
:STBL:tfgld018,tfgld011,tfgld106,bcstc011,tfgld102
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---
%SStfgld1504m000 - %TStfgld1504m000


---  Migration Logic  ---



---  Migration Parameters  ---
Field %TFtfgld018.rtyp is filled with the exchange rate type "PUR", "SLS" or "EU", entered in %SSbcstc0111m000.


---  Migration Mapping Tables  ---
%STbcstc011


---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:



:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:gld
:TFLNO:051
:LDAT:6/17/2018 11:11:30 PM
:PRTX:START
select	tfgld004.clac, tfgld004.clcl 
from	tfgld004 
as set with 1 rows 
selectdo 
endselect

dummy.long = read.parameters.common(error.mess)
dummy.long = read.parameters.finance(error.mess)

								|#FP10.sn
var.validation.rule = "MIGRRULE"
var.rule.version = 1
dump 7 |* Cross validation rule
var.max.validation.line = 0
array.depth = 0

|*set.fmax(var.tfgld009.udim)
|* BaanIV assumes ZZZZZZ as max string value 
|* for dimensions independent of user locale
var.tfgld009.udim = get.string(57)  |* ZZZZZZZZZ
var.max.dimension = var.tfgld009.udim(1;6)

var.cvr.udim1 = ""	 					
var.cvr.udim2 = ""	 					
var.cvr.udim3 = ""	 					
var.cvr.udim4 = ""	 					
var.cvr.udim5 = ""
								|#FP10.en

read.dimensions.used(						|#210751.sn
	dimension1.used,
	dimension2.used,
	dimension3.used,
	dimension4.used,
	dimension5.used)					|#210751.en
 if dimension1.used =  tcyesno.yes then 	 	 | #  218049.sn  
	 var.tfgld008.dim1 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 1,
		 var.cvr.udim1)					|#FP10.n
 else 	 	 	  
	 var.tfgld008.dim1 =  tfgld.dopt.no  
 endif 	 	 	 	  
 if dimension2.used =  tcyesno.yes then  
	 var.tfgld008.dim2 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 2,
		 var.cvr.udim2)					|#FP10.n
 else 	 	 	  
	 var.tfgld008.dim2 =  tfgld.dopt.no  
 endif 	  
 if dimension3.used =  tcyesno.yes then  
	 var.tfgld008.dim3 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 3,
		 var.cvr.udim3)					|#FP10.n
 else 	 	 	  
	 var.tfgld008.dim3 =  tfgld.dopt.no  
 endif  
 if dimension4.used =  tcyesno.yes then  
	 var.tfgld008.dim4 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 4,
		 var.cvr.udim4)					|#FP10.n
 else 	 	 	  
	 var.tfgld008.dim4 =  tfgld.dopt.no  
 endif  
 if dimension5.used =  tcyesno.yes then  
	 var.tfgld008.dim5 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 5,
		 var.cvr.udim5)					|#FP10.n
 else 	 	 	  
	 var.tfgld008.dim5 =  tfgld.dopt.no  
 endif 	 	 	 	 	 	 | #  218049.en
	 
dump 4	|* Exchange Gain and Loss Account is added
								|#FP10.sn
|* new dimensions are always no
for  nof.elements = 6 to 12 
	dim.options( nof.elements) = tfgld.dopt.no
endfor
nof.elements = 0
dim.options(1)= var.tfgld008.dim1
dim.options(2)= var.tfgld008.dim2
dim.options(3)= var.tfgld008.dim3
dim.options(4)= var.tfgld008.dim4
dim.options(5)= var.tfgld008.dim5


convert.dimension.ranges.to.cvr.rule(
	bcstf000.legl,
	dim.options,
	array.depth,
	nof.elements,
	fdim.array,
	tdim.array)
	
dmp.vcr.rule.elements.from.arrays(
	bcstf000.legl,
	dim.options,
	var.cvr.udim1,
	var.cvr.udim2,
	var.cvr.udim3,
	var.cvr.udim4,
	var.cvr.udim5,
	array.depth,
	nof.elements,
	fdim.array,
	tdim.array)

								|#FP10.en
migrate tfgld008
migrate bcstf008
migrate tfgld009
:PRTX:END
:STAT:V
:VARI:long				var.tfgld008.alat
domain	tfgld.dbcr		var.tfgld008.dbcr
	long			var.tfgld008.ifas	
	long			var.tfgld008.iprj	
domain	tcicur			var.tfgld008.icur
domain 	tfgld.dopt		var.tfgld008.dim1
domain	tfgld.dopt		var.tfgld008.dim2
domain	tfgld.dopt		var.tfgld008.dim3
domain	tfgld.dopt		var.tfgld008.dim4
domain	tfgld.dopt		var.tfgld008.dim5
domain	tfgld.atyp		var.tfgld008.atyp
domain	tfgld.leac		var.tfgld008.cdca
domain	tfgld.leac		var.tfgld009.leac
domain	tfgld.dimn		var.tfgld009.dtyp
domain	tfgld.dimx		var.tfgld009.fdim
	long			dummy.long
domain	tcmcs.s200m		error.mess
domain	tcyesno			dimension1.used			|#210751.sn
domain	tcyesno			dimension2.used
domain	tcyesno			dimension3.used
domain	tcyesno			dimension4.used
domain	tcyesno			dimension5.used			|#210751.en
domain	tccuni			var.tfgld008.uni1
domain	tfgld.bloc		var.tfgld008.bloc
|* domain of dimension is changed from length 6 to 9, 
|* similar domain from BaanIV is used (tccvat).
domain	tccvat			var.max.dimension
domain	tccvat			var.tfgld009.udim

								|#FP10.sn
	#define DIM.LENGTH		9
	#define MAX.DIMENSIONS	12	
	#define	TRANSACTION.SIZE	50
	#define	ALLOC.BLOCK		10

domain	tccvat			var.validation.rule
domain	tfgld.lino		var.rule.version
domain	tfgld.lino		var.max.validation.line
domain	tfgld.leac		var.tfgld052.leac

	long			array.depth
	long			nof.elements
domain	tcmcs.s132		fdim.array(1)	based
domain	tcmcs.s132		tdim.array(1)	based
domain	tfgld.dopt		dim.options(MAX.DIMENSIONS)

domain	tccvat			var.cvr.udim1
domain	tccvat			var.cvr.udim2
domain	tccvat			var.cvr.udim3
domain	tccvat			var.cvr.udim4
domain	tccvat			var.cvr.udim5
domain	tccvat			var.from.dim(12)
domain	tccvat			var.to.dim(12)

								|#FP10.en
:STBL:tfgld004,tfgld008,bcstf000,bcstf007,bcstf008,tfacp005,tfacr005,tfgld009,bcstc000,ctcat110,ctcat400,ctcat500
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:gld
:TFLNO:052
:LDAT:6/17/2018 11:11:30 PM
:PRTX:START
select	tfgld004.clac, tfgld004.clcl 
from	tfgld004 
as set with 1 rows 
selectdo 
endselect

dummy.long = read.parameters.common(error.mess)
dummy.long = read.parameters.finance(error.mess)

								|#FP10.sn
var.validation.rule = "MIGRRULE"
var.rule.version = 1
dump 7 |* Cross validation rule
var.max.validation.line = 0
array.depth = 0

|*set.fmax(var.tfgld009.udim)
|* BaanIV assumes ZZZZZZ as max string value 
|* for dimensions independent of user locale
var.tfgld009.udim = get.string(57)  |* ZZZZZZZZZ
var.max.dimension = var.tfgld009.udim(1;6)

var.cvr.udim1 = ""	 					
var.cvr.udim2 = ""	 					
var.cvr.udim3 = ""	 					
var.cvr.udim4 = ""	 					
var.cvr.udim5 = ""
								|#FP10.en

read.dimensions.used(						|#210751.sn
	dimension1.used,
	dimension2.used,
	dimension3.used,
	dimension4.used,
	dimension5.used)					|#210751.en
 if dimension1.used =  tcyesno.yes then 	 	 | #  218049.sn  
	 var.tfgld008.dim1 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 1,
		 var.cvr.udim1)					|#FP10.n
 else 	 	 	  
	 var.tfgld008.dim1 =  tfgld.dopt.no  
 endif 	 	 	 	  
 if dimension2.used =  tcyesno.yes then  
	 var.tfgld008.dim2 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 2,
		 var.cvr.udim2)					|#FP10.n
 else 	 	 	  
	 var.tfgld008.dim2 =  tfgld.dopt.no  
 endif 	  
 if dimension3.used =  tcyesno.yes then  
	 var.tfgld008.dim3 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 3,
		 var.cvr.udim3)					|#FP10.n
 else 	 	 	  
	 var.tfgld008.dim3 =  tfgld.dopt.no  
 endif  
 if dimension4.used =  tcyesno.yes then  
	 var.tfgld008.dim4 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 4,
		 var.cvr.udim4)					|#FP10.n
 else 	 	 	  
	 var.tfgld008.dim4 =  tfgld.dopt.no  
 endif  
 if dimension5.used =  tcyesno.yes then  
	 var.tfgld008.dim5 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 5,
		 var.cvr.udim5)					|#FP10.n
 else 	 	 	  
	 var.tfgld008.dim5 =  tfgld.dopt.no  
 endif 	 	 	 	 	 	 | #  218049.en
	 
dump 4	|* Exchange Gain and Loss Account is added
								|#FP10.sn
|* new dimensions are always no
for  nof.elements = 6 to 12 
	dim.options( nof.elements) = tfgld.dopt.no
endfor
nof.elements = 0
dim.options(1)= var.tfgld008.dim1
dim.options(2)= var.tfgld008.dim2
dim.options(3)= var.tfgld008.dim3
dim.options(4)= var.tfgld008.dim4
dim.options(5)= var.tfgld008.dim5


convert.dimension.ranges.to.cvr.rule(
	bcstf000.legl,
	dim.options,
	array.depth,
	nof.elements,
	fdim.array,
	tdim.array)
	
dmp.vcr.rule.elements.from.arrays(
	bcstf000.legl,
	dim.options,
	var.cvr.udim1,
	var.cvr.udim2,
	var.cvr.udim3,
	var.cvr.udim4,
	var.cvr.udim5,
	array.depth,
	nof.elements,
	fdim.array,
	tdim.array)

								|#FP10.en
migrate tfgld008
migrate bcstf008
migrate tfgld009
:PRTX:END
:STAT:V
:VARI:long				var.tfgld008.alat
domain	tfgld.dbcr		var.tfgld008.dbcr
	long			var.tfgld008.ifas	
	long			var.tfgld008.iprj	
domain	tcicur			var.tfgld008.icur
domain 	tfgld.dopt		var.tfgld008.dim1
domain	tfgld.dopt		var.tfgld008.dim2
domain	tfgld.dopt		var.tfgld008.dim3
domain	tfgld.dopt		var.tfgld008.dim4
domain	tfgld.dopt		var.tfgld008.dim5
domain	tfgld.atyp		var.tfgld008.atyp
domain	tfgld.leac		var.tfgld008.cdca
domain	tfgld.leac		var.tfgld009.leac
domain	tfgld.dimn		var.tfgld009.dtyp
domain	tfgld.dimx		var.tfgld009.fdim
	long			dummy.long
domain	tcmcs.s200m		error.mess
domain	tcyesno			dimension1.used			|#210751.sn
domain	tcyesno			dimension2.used
domain	tcyesno			dimension3.used
domain	tcyesno			dimension4.used
domain	tcyesno			dimension5.used			|#210751.en
domain	tccuni			var.tfgld008.uni1
domain	tfgld.bloc		var.tfgld008.bloc
|* domain of dimension is changed from length 6 to 9, 
|* similar domain from BaanIV is used (tccvat).
domain	tccvat			var.max.dimension
domain	tccvat			var.tfgld009.udim

								|#FP10.sn
	#define DIM.LENGTH		9
	#define MAX.DIMENSIONS	12	
	#define	TRANSACTION.SIZE	50
	#define	ALLOC.BLOCK		10

domain	tccvat			var.validation.rule
domain	tfgld.lino		var.rule.version
domain	tfgld.lino		var.max.validation.line
domain	tfgld.leac		var.tfgld052.leac

	long			array.depth
	long			nof.elements
domain	tcmcs.s132		fdim.array(1)	based
domain	tcmcs.s132		tdim.array(1)	based
domain	tfgld.dopt		dim.options(MAX.DIMENSIONS)

domain	tccvat			var.cvr.udim1
domain	tccvat			var.cvr.udim2
domain	tccvat			var.cvr.udim3
domain	tccvat			var.cvr.udim4
domain	tccvat			var.cvr.udim5
domain	tccvat			var.from.dim(12)
domain	tccvat			var.to.dim(12)

								|#FP10.en
:STBL:tfgld004,tfgld008,bcstf000,bcstf007,bcstf008,tfacp005,tfacr005,tfgld009,bcstc000,ctcat110,ctcat400,ctcat500
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:gld
:TFLNO:102
:LDAT:12/10/2017 12:08:41 PM
:PRTX:START
|* Get Sales rate type 
ret.long = get.exchange.rate.type("SLS", error.message)
var.str.sls.rtyp = bcstc011.rtyp

|* Get Purchase rate type
ret.long = get.exchange.rate.type("PUR", error.message)
var.str.pur.rtyp = bcstc011.rtyp

|* Get Internal rate type
ret.long = get.exchange.rate.type("EU", error.message)
var.str.eu.rtyp = bcstc011.rtyp

migrate tfgld102
:PRTX:END
:STAT:V
:VARI:domain	tcrats		var.tfgld102.rate(3)
domain	tcratf		var.tfgld102.fact(3)
domain	tfgld.amnt	var.tfgld102.amth(3)
domain	tfgld.amnt	var.tfgld102.vamh(3)
string			var.str.sls.rtyp(3)
string			var.str.pur.rtyp(3)
string			var.str.eu.rtyp(3)
string			var.str.rtyp(3)
string			var.str.bpid(9)
domain	tcmcs.s200m	error.message
long			var.tfgld102.tcsh
long			ret.long
domain	tcccty		var.tfgld102.ccty
domain	tccvat		var.tfgld102.cvat
long			element
long			var.tfgld102.vtyp
long			var.tfgld102.catg
|long			var.tfgld102.ifac(3)			|#jv.o
|domain	tcrats		var.tfgld102.irat(3)			|#jv.o
:STBL:tfgld102,bcstc008,bcstc011
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---
%SStfgld1401m000 - %TStfgld1401m000


---  Migration Logic  ---
In %SV a customer field and a supplier field is present. In %TV these field are combine in one field %TFtfgld102.bpid.


---  Migration Parameters  ---
Three predefined fields are filled with the Sales Rate Type, the Purchase rate Type and the Internal Rate Type. These fields are used to to fill the right value in %TFtfgld102.rtyp. 


---  Migration Mapping Tables  ---
%STbcstc018
%STbcstc011
%STbcstc030


---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:gld
:TFLNO:106
:LDAT:12/10/2017 12:09:57 PM
:PRTX:START
|* Get Sales rate type 
ret.long = get.exchange.rate.type("SLS", error.message)
var.str.sls.rtyp = bcstc011.rtyp

|* Get Purchase rate type
ret.long = get.exchange.rate.type("PUR", error.message)
var.str.pur.rtyp = bcstc011.rtyp

|* Get Internal rate type
ret.long = get.exchange.rate.type("EU", error.message)
var.str.eu.rtyp = bcstc011.rtyp

|* Variable filled to prevent function calls for a lot of records 
var.utc.0 = utc(0,0)

depth.of.mc.fields = get.mc.depth()

prev.tfgld106.ccty = ""			|#210859.n
prev.tfgld106.cvat = ""			|#210859.n
prev.tfgld106.ocmp = 0			|#210859.n


migrate tfgld106
:PRTX:END
:STAT:V
:VARI:string			var.str.bpid(9)
string			var.str.sls.rtyp(3)
string			var.str.pur.rtyp(3)
string			var.str.eu.rtyp(3)
string			var.str.rtyp(3)
string			var.utc.0(22)
long			depth.of.mc.fields
long			var.tfgld106.tcsh
long			ret.long
long			element
domain	tcmcs.s200m	error.message
domain	tcccty		var.tfgld106.ccty
domain	tccvat		var.tfgld106.cvat
domain	tfgld.rate	var.tfgld106.rate(3)
domain	tcratf		var.tfgld106.fact(3)
domain	tfgld.amnt	var.tfgld106.amth(3)
domain	tfgld.amnt	var.tfgld106.vamh(3)
long			var.tfgld106.vtyp
long			var.tfgld106.catg

|* PERF start
domain tcsuno		prev.tfgld106.suno
domain tccuno		prev.tfgld106.cuno
domain tcccty		prev.tfgld106.ccty
domain tccvat		prev.tfgld106.cvat
domain tcncmp		prev.tfgld106.ocmp
|* PERF end
:STBL:tfgld106,bcstc011,bcstc008
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---
Source session: %SStfgld1406m000
Target session: %TStfgld1406m000


---  Migration Logic  ---
In %SV a customer field and a supplier field is present. In %TV these fields are combined in %TFtfgld106.bpid. 


---  Migration Parameters  ---
Three predefined fields are filled with the Sales Rate Type, the Purchase rate Type and the Internal Rate Type. These fields are used to to fill the right value in %TFtfgld106.rtyp. 



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:gld
:TFLNO:110
:LDAT:9/26/2017 8:59:41 PM
:PRTX:START
migrate tfgld110
:PRTX:END
:STAT:V
:VARI:domain	tcmcs.str9	var.tfgld110.bpid
domain	tcmcs.str9	var.tfgld110.orno
domain	tcmcs.s200m	error.message
domain	tcccty		var.tfgld110.ccty
domain	tccvat		var.tfgld110.cvat
domain	tfgld.amnt	var.tfgld110.amth(3)
domain	tfgld.amnt	var.tfgld110.vamh(3)
long			ret.long
long			element
long			var.tfgld110.vtyp
long			var.tfgld110.catg
:STBL:tfgld110
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---
%SStfgld1520m000 - %TStfgld1520m000


---  Migration Logic  ---
In %SV a customer field and a supplier field is present. In %TV these field are combine in one field %TFtfgld110.bpid.


---  Migration Parameters  ---
%SFbcstc000.mmnu


---  Migration Mapping Tables  ---
%STbcstc008
%STbcstc030


---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:ti
:TCMOD:bom
:TFLNO:010
:LDAT:4/14/2017 8:41:15 AM
:PRTX:START
var.str.utc.date.num	= utc(date.num(),0) 
var.str.tibom010.indt	= utc(date.to.num (1970,01,10),12*60*60) 

				|#10.5.1.sn
select	tibom000.buom
from	tibom000
as set with 1 rows
selectdo 
endselect			|#10.5.1.en

migrate tibom010

prev.sitm = ""
fill.expiry.date(0)
migrate tipcs022		
	
prev.item =  ""
fill.expiry.date(0)
migrate tipcs110
:PRTX:END
:STAT:V
:VARI:string		var.str.utc.date.num(22)	
string		var.tibom010.sitm(47)	
string		var.str.tibom010.indt(22)
string		var.tibom010.exdt(22)
domain	tcyesno	var.tibom010.rdsp
domain	tccuni	var.tibom010.sizu		|#10.5.1.n
	
domain	tcitem	prev.sitm
domain	tcitem	prev.item
:STBL:tibom010,tipcs022,tipcs110,tiitm001,tibom020,tipcs030, tibom000
:COMT:START
--- Changes in table design ---
%TTtibom010 is filled from
%STtibom010, %STtipcs220 and %STtipcs110.

--- Source and Target Sessions ---
%SStibom1110m000 - %TStibom1110m000
%SStipcs1110m000 - %TStibom1110m000
%SStipcs2150m000 - %TStibom1110m000

--- Migration Logic ---

--- Migration Parameters ---

--- Migration Mapping Tables ---

--- Technical Notes ---

--- Performance ---

:COMT:END
:TEXT:


:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:ti
:TCMOD:cpr
:TFLNO:000
:LDAT:9/26/2017 8:59:42 PM
:PRTX:START
|* Read bcstc000 for default aggregated cost components, weigth unit of user.
return.value = read.parameters.common(error.message)


|* determine ERP LN equivalent of bcstc000.oprc and use this as default for a numer of fields. 
return.value =  get.cost.components(  
			bcorig.ticpr,  
 	 	 	bcstc000.oprc,  
 	 	 	"",                                                                                                                                                                                                                                                                                                                                        
 	 	 	error.message)  

var.oprc =  bcstc006.cost  


migrate ticpr000
:PRTX:END
:STAT:V
:VARI:string	var.ticpr000.indt(22)
string	var.ticpr000.dsca(50)	mb
domain	tcyesno		var.include.fixed.costs	|#CNT.n


domain	tccpcp		var.oprc
domain	tcmcs.s200m	error.message		|* Error message
	long		return.value		|* Return Value
:STBL:ticpr000,bcstc000,bcstc006
:COMT:START
---  Changes in table design  ---
%GTtcmcs0000


---  Source and Target Sessions  ---
%SSticpr0100m000 - %TSticpr0100m000


---  Migration Logic  ---
%GTtcmcs0001


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---



:COMT:END
:TEXT:


:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:ti
:TCMOD:cpr
:TFLNO:099
:LDAT:9/26/2017 8:59:43 PM
:PRTX:START
read.parameters.common(tmp.errmess)
var.max.nr.cpcp = 0	|* max size of Cost Comp. Structure. 
tmp.max.nr.cpcp.cpr206 = 0
tmp.max.nr.cpcp.cpr306 = 0

|* Read Standard Cost Price Calculation Code
|select  	  ticpr000.sccc  	|#CNT.o
select	ticpr000.sccc, ticpr000.cpty
  from	ticpr000  
as set with 1 rows
selectdo  
endselect  

|#CNT.sn
|* Read PCS parameter
select	tipcs000.cpty
  from	tipcs000  
as set with 1 rows
selectdo  
endselect  
|#CNT.en


var.item = ""
prev.item = ""
var.cpty = ticpr000.cpty		|#CNT.n
migrate  ticpr200
save.max.nr.cpcp()

var.item = ""
prev.item = ""
var.indt =  date.to.num(1970, 01, 02) 	|* day 2 (1970) . 
var.spit = tcyesno.no	|* no surcharges by item for customized items
var.cpty = tipcs000.cpty		|#CNT.n
migrate tipcs150
save.max.nr.cpcp()

var.item = ""
prev.item = ""  
var.spit = tcyesno.no	|* no surcharges by item for customized items
var.cpty = tipcs000.cpty		|#CNT.n
migrate tipcs350
save.max.nr.cpcp()

var.item = ""
prev.item = ""
var.cpty = ticpr000.cpty		|#CNT.n
migrate ticpr300
save.max.nr.cpcp()

prev.cprj = ""

dump.11.ticpr099()
:PRTX:END
:STAT:V
:VARI:|table	tbcstc000	|* bc common parameters
|table	tbcstc006	|* bc Cost Components
|table	tbcstc010	|* bc Aggr. Cost Comp. by Item Type / Group
|table	tbcsti007	|* bc Chart by Item Type / Group. 

|table	ttipcs002	|* Calculation Parts


	domain	tckitm	tmp.kitm	|* Kind of Item
	domain	tckitm	prev.kitm	|* Previous Kind of Item 	|#1391462.n
	domain	tccitg	tmp.citg		|* Item Group	
	domain	tccpcp	tmp.cpcp	|* Cost Component (Baan IV)
	domain	bccprj	tmp.cprj	|* Project Code (Gemini format)
	domain	tcmcs.s200m	tmp.errmess

	domain	tcitem	prev.item	|* Previous Item in Baan IV format
	domain	tccprj	prev.cprj	|* Prevous Project in Baan IV format

	domain	bccost	aggr.mat.cpcp
	domain	bccost	aggr.opr.cpcp
	domain	bccost	aggr.sur.cpcp

	|domain	tccopr	aggr.mat.amnt	|#MCR.so
	|domain	tccopr	aggr.opr.amnt
	|domain	tccopr	aggr.sur.amnt	|#MCR.eo


	domain	tccopr	aggr.mat.amnt(3)	|#MCR.sn
	domain	tccopr	aggr.opr.amnt(3)
	domain	tccopr	aggr.sur.amnt(3)	|#MCR.en

	domain	tccopr	aggr.mat.amnt.var	|#CNT.sn
	domain	tccopr	aggr.mat.amnt.fixed
	domain	tccopr	aggr.opr.amnt.var
	domain	tccopr	aggr.opr.amnt.fixed
	domain	tccopr	aggr.sur.amnt.var
	domain	tccopr	aggr.sur.amnt.fixed	|#CNT.en

	domain	tcqnu1	aggr.mat.nuni
	domain	tcqnu1	aggr.opr.nuni
	domain	tcqnu1	aggr.sur.nuni


	string		var.item(47)	
	string		tmp.item(47)
	domain	tccpcc	var.cpcc	|* Cost Price Calc. Code
	domain	bccost	var.cpcp	|* Cost Component

	|domain	tccopr	var.amnt		|#MCR.o
	domain tccopr    var.amnt(3)		|#MCR.sn
		long	element			
	domain	tccopr	var.ticpr200.amnt(3)
	domain	tccopr	var.ticpr300.amnt(3)
	domain	tccopr	var.tipcs350.amte(3)
	domain	tccopr	var.tipcs150.amnt(3)	|#MCR.en

	domain	tccopr	var.amnt.var		|#CNT.n
	domain	tccopr	var.amnt.fixed		|#CNT.n
	domain	tccopr	var.ticpr240.amnt	|#CNT.n 
	domain	tccopr	var.ticpr340.amnt	|#CNT.n 


	domain	tcqnu1	var.nuni
	long		var.indt
	long		var.agcp
	long		var.max.nr.cpcp	|* max size of Cost Component Structure
	domain	tcyesno	var.spit		|* surcharges by item
	domain	ticpty	var.cpty		|* full or marg. cost price 	|#CNT.n

	


	long		tmp.max.nr.cpcp.cpr306
	long		tmp.max.nr.cpcp.cpr206
:STBL:tipcs350,ticpr200,tipcs150,ticpr300,tipcs300,bcstc000,bcstc006,bcstc010,bcsti007,tipcs002,tipcs021,tipcs020,ticpr000,ticpr010,tipcs000
:COMT:START
---  Changes in table design  ---
This table is new in %TV. It has only one record and stores the maximum size of the Cost Component Structure. See also %GLticpr001. 

---  Source and Target Sessions  ---
See %GTticpr001. 


---  Migration Logic  ---
See %GTticpr001. 

---  Migration Parameters  ---

---  Migration Mapping Tables  ---
See %GTticpr001. 
 

---  Technical Notes  ---


---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:ti
:TCMOD:cpr
:TFLNO:110
:LDAT:2/4/2017 1:55:17 PM
:PRTX:START
hold.ccur		= get.home.currency.orig.comp()
var.ticpr110.item(1;47) 	= empty.string(1;47) 
var.ticpr110.cwar(1;6)  	= empty.string(1;6) 

migrate ticpr110
migrate ticpr130
:PRTX:END
:STAT:V
:VARI:table		tbcstc006	|* Cost Components

	string			var.ticpr110.cwar(6)	

	domain	bccnv.item	var.ticpr110.item	

	string			var.ticpr110.chcp(8)	

	string			var.ticpr110.ccur(3)

	double			var.ticpr110.cpch(3)	

	double			var.ticpr110.chpr
	
	domain	tcyesno		var.ticpr110.vaco

	string			var.ticpr110.citg(6)	
	domain	tcmcs.s200m	tmp.errmess

	long			element

	domain	tccmth		var.ticpr110.cmth
	string			hold.ccur(3)
:STBL:ticpr110,ticpr130
:COMT:START
---  Changes in table design  ---
The two %SV tables %STticpr110 and %STticpr130 are in %TV combined in one table: %TTticpr110. In this table the Item Group field is filled, or the Item Code field. Not both. 


---  Source and Target Sessions  ---
%SSticpr1110m000 - %TSticpr1110m000
%SSticpr1130m000 - %TSticpr1110m000

---  Migration Logic  ---



---  Migration Parameters  ---
 



---  Migration Mapping Tables  ---
The %SV Cost Component codes are mapped into %TV Cost Component codes via mapping table %SVbcstc006.


---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:







:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:ti
:TCMOD:cpr
:TFLNO:150
:LDAT:2/4/2017 1:55:26 PM
:PRTX:START
|select tccom000.ncmp,tccom000.ccur |#MCR.o
select 	tccom000.ncmp
from 	tccom000 
where 	tccom000._index1 = {:ext.lng.comp} 
as set with 1 rows 
selectdo 
	|var.ticpr150.ccur=tccom000.ccur |#MCR.o
endselect 

var.ticpr150.ccur = get.home.currency.orig.comp()	|#MCR.n


migrate ticpr150

select	ticpr000.sccc,ticpr000.sern
from	ticpr000 
order by ticpr000._index1 
as set with 1 rows 
selectdo 
	var.ticpr150.cpcc=ticpr000.sccc 
endselect 
migrate tipcs300
migrate tipcs130
:PRTX:END
:STAT:V
:VARI:|table		tbcstc006	|* Cost Components
	domain	tcmcs.s200m	err.mess
	long			ret.val
	long			element

	long			var.ticpr150.orty	
	long			var.ticpr150.seqn	
	domain tcccur		var.ticpr150.ccur
	domain	tccmoh		var.ticpr150.dsca	
	domain	tccpcc		var.ticpr150.cpcc	
	domain	tcyesno		var.ticpr150.vaco 
	domain	tcwgrt		var.ticpr150.rate(3)	
	domain	bccnv.cprj	var.ticpr150.cprj
:STBL:tipcs130,tipcs300,ticpr000,ticpr150,tccom000,bcstc006
:COMT:START
---  Changes in table design  ---
The three %SV tables %STticpr150, %STtipcs300 and %STticps130 are in %TV combined in one table: %TTticpr150. 

One record of these %SV tables contains 3 amounts: Labor Rate, Machine Rate and Overhead Rate. 
Each source record is split up in three separate Operation Rate records in %TV: one for the Labor Rate, one for the Machine Rate and one for the Overhead Rate. 
A new field %TFticcpr150.orty is introduced in %TV. Possible values of this field:
- Labor
- Machine
- Overhead on Man Hours
- Overhead on Machine Hours. 


---  Source and Target Sessions  ---
%SSticpr1150m000 - %TSticpr1150m000
%SStipcs3101m000 - %TSticpr1150m000
%SStipcs1130m000 - %TSticpr1150m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---
The %SV Cost Component code on the Operation Rates, is mapped into the %TV Cost Component code via mapping table %SVbcstc006. 


---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:







:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:ti
:TCMOD:cpr
:TFLNO:200
:LDAT:9/26/2017 8:59:43 PM
:PRTX:START
read.parameters.common(tmp.errmess)
var.max.nr.cpcp = 0	|* max size of Cost Comp. Structure. 
tmp.max.nr.cpcp.cpr206 = 0
tmp.max.nr.cpcp.cpr306 = 0

|* Read Standard Cost Price Calculation Code
|select  	  ticpr000.sccc  	|#CNT.o
select	ticpr000.sccc, ticpr000.cpty
  from	ticpr000  
as set with 1 rows
selectdo  
endselect  

|#CNT.sn
|* Read PCS parameter
select	tipcs000.cpty
  from	tipcs000  
as set with 1 rows
selectdo  
endselect  
|#CNT.en


var.item = ""
prev.item = ""
var.cpty = ticpr000.cpty		|#CNT.n
migrate  ticpr200
save.max.nr.cpcp()

var.item = ""
prev.item = ""
var.indt =  date.to.num(1970, 01, 02) 	|* day 2 (1970) . 
var.spit = tcyesno.no	|* no surcharges by item for customized items
var.cpty = tipcs000.cpty		|#CNT.n
migrate tipcs150
save.max.nr.cpcp()

var.item = ""
prev.item = ""  
var.spit = tcyesno.no	|* no surcharges by item for customized items
var.cpty = tipcs000.cpty		|#CNT.n
migrate tipcs350
save.max.nr.cpcp()

var.item = ""
prev.item = ""
var.cpty = ticpr000.cpty		|#CNT.n
migrate ticpr300
save.max.nr.cpcp()

prev.cprj = ""

dump.11.ticpr099()
:PRTX:END
:STAT:V
:VARI:|table	tbcstc000	|* bc common parameters
|table	tbcstc006	|* bc Cost Components
|table	tbcstc010	|* bc Aggr. Cost Comp. by Item Type / Group
|table	tbcsti007	|* bc Chart by Item Type / Group. 

|table	ttipcs002	|* Calculation Parts


	domain	tckitm	tmp.kitm	|* Kind of Item
	domain	tckitm	prev.kitm	|* Previous Kind of Item 	|#1391462.n
	domain	tccitg	tmp.citg		|* Item Group	
	domain	tccpcp	tmp.cpcp	|* Cost Component (Baan IV)
	domain	bccprj	tmp.cprj	|* Project Code (Gemini format)
	domain	tcmcs.s200m	tmp.errmess

	domain	tcitem	prev.item	|* Previous Item in Baan IV format
	domain	tccprj	prev.cprj	|* Prevous Project in Baan IV format

	domain	bccost	aggr.mat.cpcp
	domain	bccost	aggr.opr.cpcp
	domain	bccost	aggr.sur.cpcp

	|domain	tccopr	aggr.mat.amnt	|#MCR.so
	|domain	tccopr	aggr.opr.amnt
	|domain	tccopr	aggr.sur.amnt	|#MCR.eo


	domain	tccopr	aggr.mat.amnt(3)	|#MCR.sn
	domain	tccopr	aggr.opr.amnt(3)
	domain	tccopr	aggr.sur.amnt(3)	|#MCR.en

	domain	tccopr	aggr.mat.amnt.var	|#CNT.sn
	domain	tccopr	aggr.mat.amnt.fixed
	domain	tccopr	aggr.opr.amnt.var
	domain	tccopr	aggr.opr.amnt.fixed
	domain	tccopr	aggr.sur.amnt.var
	domain	tccopr	aggr.sur.amnt.fixed	|#CNT.en

	domain	tcqnu1	aggr.mat.nuni
	domain	tcqnu1	aggr.opr.nuni
	domain	tcqnu1	aggr.sur.nuni


	string		var.item(47)	
	string		tmp.item(47)
	domain	tccpcc	var.cpcc	|* Cost Price Calc. Code
	domain	bccost	var.cpcp	|* Cost Component

	|domain	tccopr	var.amnt		|#MCR.o
	domain tccopr    var.amnt(3)		|#MCR.sn
		long	element			
	domain	tccopr	var.ticpr200.amnt(3)
	domain	tccopr	var.ticpr300.amnt(3)
	domain	tccopr	var.tipcs350.amte(3)
	domain	tccopr	var.tipcs150.amnt(3)	|#MCR.en

	domain	tccopr	var.amnt.var		|#CNT.n
	domain	tccopr	var.amnt.fixed		|#CNT.n
	domain	tccopr	var.ticpr240.amnt	|#CNT.n 
	domain	tccopr	var.ticpr340.amnt	|#CNT.n 


	domain	tcqnu1	var.nuni
	long		var.indt
	long		var.agcp
	long		var.max.nr.cpcp	|* max size of Cost Component Structure
	domain	tcyesno	var.spit		|* surcharges by item
	domain	ticpty	var.cpty		|* full or marg. cost price 	|#CNT.n

	


	long		tmp.max.nr.cpcp.cpr306
	long		tmp.max.nr.cpcp.cpr206
:STBL:tipcs350,ticpr200,tipcs150,ticpr300,tipcs300,bcstc000,bcstc006,bcstc010,bcsti007,tipcs002,tipcs021,tipcs020,ticpr000,ticpr010,tipcs000
:COMT:START
---  Changes in table design  ---
See %GTticpr001. 

---  Source and Target Sessions  ---
See %GTticpr001. 


---  Migration Logic  ---
See %GTticpr001. 

---  Migration Parameters  ---

---  Migration Mapping Tables  ---
See %GTticpr001. 
 

---  Technical Notes  ---


---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:ti
:TCMOD:cpr
:TFLNO:201
:LDAT:9/26/2017 8:59:44 PM
:PRTX:START
read.parameters.common(tmp.errmess)
var.max.nr.cpcp = 0	|* max size of Cost Comp. Structure. 
tmp.max.nr.cpcp.cpr206 = 0
tmp.max.nr.cpcp.cpr306 = 0

|* Read Standard Cost Price Calculation Code
|select  	  ticpr000.sccc  	|#CNT.o
select	ticpr000.sccc, ticpr000.cpty
  from	ticpr000  
as set with 1 rows
selectdo  
endselect  

|#CNT.sn
|* Read PCS parameter
select	tipcs000.cpty
  from	tipcs000  
as set with 1 rows
selectdo  
endselect  
|#CNT.en


var.item = ""
prev.item = ""
var.cpty = ticpr000.cpty		|#CNT.n
migrate  ticpr200
save.max.nr.cpcp()

var.item = ""
prev.item = ""
var.indt =  date.to.num(1970, 01, 02) 	|* day 2 (1970) . 
var.spit = tcyesno.no	|* no surcharges by item for customized items
var.cpty = tipcs000.cpty		|#CNT.n
migrate tipcs150
save.max.nr.cpcp()

var.item = ""
prev.item = ""  
var.spit = tcyesno.no	|* no surcharges by item for customized items
var.cpty = tipcs000.cpty		|#CNT.n
migrate tipcs350
save.max.nr.cpcp()

var.item = ""
prev.item = ""
var.cpty = ticpr000.cpty		|#CNT.n
migrate ticpr300
save.max.nr.cpcp()

prev.cprj = ""

dump.11.ticpr099()
:PRTX:END
:STAT:V
:VARI:|table	tbcstc000	|* bc common parameters
|table	tbcstc006	|* bc Cost Components
|table	tbcstc010	|* bc Aggr. Cost Comp. by Item Type / Group
|table	tbcsti007	|* bc Chart by Item Type / Group. 

|table	ttipcs002	|* Calculation Parts


	domain	tckitm	tmp.kitm	|* Kind of Item
	domain	tckitm	prev.kitm	|* Previous Kind of Item 	|#1391462.n
	domain	tccitg	tmp.citg		|* Item Group	
	domain	tccpcp	tmp.cpcp	|* Cost Component (Baan IV)
	domain	bccprj	tmp.cprj	|* Project Code (Gemini format)
	domain	tcmcs.s200m	tmp.errmess

	domain	tcitem	prev.item	|* Previous Item in Baan IV format
	domain	tccprj	prev.cprj	|* Prevous Project in Baan IV format

	domain	bccost	aggr.mat.cpcp
	domain	bccost	aggr.opr.cpcp
	domain	bccost	aggr.sur.cpcp

	|domain	tccopr	aggr.mat.amnt	|#MCR.so
	|domain	tccopr	aggr.opr.amnt
	|domain	tccopr	aggr.sur.amnt	|#MCR.eo


	domain	tccopr	aggr.mat.amnt(3)	|#MCR.sn
	domain	tccopr	aggr.opr.amnt(3)
	domain	tccopr	aggr.sur.amnt(3)	|#MCR.en

	domain	tccopr	aggr.mat.amnt.var	|#CNT.sn
	domain	tccopr	aggr.mat.amnt.fixed
	domain	tccopr	aggr.opr.amnt.var
	domain	tccopr	aggr.opr.amnt.fixed
	domain	tccopr	aggr.sur.amnt.var
	domain	tccopr	aggr.sur.amnt.fixed	|#CNT.en

	domain	tcqnu1	aggr.mat.nuni
	domain	tcqnu1	aggr.opr.nuni
	domain	tcqnu1	aggr.sur.nuni


	string		var.item(47)	
	string		tmp.item(47)
	domain	tccpcc	var.cpcc	|* Cost Price Calc. Code
	domain	bccost	var.cpcp	|* Cost Component

	|domain	tccopr	var.amnt		|#MCR.o
	domain tccopr    var.amnt(3)		|#MCR.sn
		long	element			
	domain	tccopr	var.ticpr200.amnt(3)
	domain	tccopr	var.ticpr300.amnt(3)
	domain	tccopr	var.tipcs350.amte(3)
	domain	tccopr	var.tipcs150.amnt(3)	|#MCR.en

	domain	tccopr	var.amnt.var		|#CNT.n
	domain	tccopr	var.amnt.fixed		|#CNT.n
	domain	tccopr	var.ticpr240.amnt	|#CNT.n 
	domain	tccopr	var.ticpr340.amnt	|#CNT.n 


	domain	tcqnu1	var.nuni
	long		var.indt
	long		var.agcp
	long		var.max.nr.cpcp	|* max size of Cost Component Structure
	domain	tcyesno	var.spit		|* surcharges by item
	domain	ticpty	var.cpty		|* full or marg. cost price 	|#CNT.n

	


	long		tmp.max.nr.cpcp.cpr306
	long		tmp.max.nr.cpcp.cpr206
:STBL:tipcs350,ticpr200,tipcs150,ticpr300,tipcs300,bcstc000,bcstc006,bcstc010,bcsti007,tipcs002,tipcs021,tipcs020,ticpr000,ticpr010,tipcs000
:COMT:START
---  Changes in table design  ---
See %GTticpr0001. 

---  Source and Target Sessions  ---
See %GTticpr001. 


---  Migration Logic  ---
See %GTticpr0001. 

---  Migration Parameters  ---

---  Migration Mapping Tables  ---
See %GTticpr0001. 
 

---  Technical Notes  ---


---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:ti
:TCMOD:cpr
:TFLNO:205
:LDAT:9/26/2017 8:59:44 PM
:PRTX:START
read.parameters.common(tmp.errmess)
var.max.nr.cpcp = 0	|* max size of Cost Comp. Structure. 
tmp.max.nr.cpcp.cpr206 = 0
tmp.max.nr.cpcp.cpr306 = 0

|* Read Standard Cost Price Calculation Code
|select  	  ticpr000.sccc  	|#CNT.o
select	ticpr000.sccc, ticpr000.cpty
  from	ticpr000  
as set with 1 rows
selectdo  
endselect  

|#CNT.sn
|* Read PCS parameter
select	tipcs000.cpty
  from	tipcs000  
as set with 1 rows
selectdo  
endselect  
|#CNT.en


var.item = ""
prev.item = ""
var.cpty = ticpr000.cpty		|#CNT.n
migrate  ticpr200
save.max.nr.cpcp()

var.item = ""
prev.item = ""
var.indt =  date.to.num(1970, 01, 02) 	|* day 2 (1970) . 
var.spit = tcyesno.no	|* no surcharges by item for customized items
var.cpty = tipcs000.cpty		|#CNT.n
migrate tipcs150
save.max.nr.cpcp()

var.item = ""
prev.item = ""  
var.spit = tcyesno.no	|* no surcharges by item for customized items
var.cpty = tipcs000.cpty		|#CNT.n
migrate tipcs350
save.max.nr.cpcp()

var.item = ""
prev.item = ""
var.cpty = ticpr000.cpty		|#CNT.n
migrate ticpr300
save.max.nr.cpcp()

prev.cprj = ""

dump.11.ticpr099()
:PRTX:END
:STAT:V
:VARI:|table	tbcstc000	|* bc common parameters
|table	tbcstc006	|* bc Cost Components
|table	tbcstc010	|* bc Aggr. Cost Comp. by Item Type / Group
|table	tbcsti007	|* bc Chart by Item Type / Group. 

|table	ttipcs002	|* Calculation Parts


	domain	tckitm	tmp.kitm	|* Kind of Item
	domain	tckitm	prev.kitm	|* Previous Kind of Item 	|#1391462.n
	domain	tccitg	tmp.citg		|* Item Group	
	domain	tccpcp	tmp.cpcp	|* Cost Component (Baan IV)
	domain	bccprj	tmp.cprj	|* Project Code (Gemini format)
	domain	tcmcs.s200m	tmp.errmess

	domain	tcitem	prev.item	|* Previous Item in Baan IV format
	domain	tccprj	prev.cprj	|* Prevous Project in Baan IV format

	domain	bccost	aggr.mat.cpcp
	domain	bccost	aggr.opr.cpcp
	domain	bccost	aggr.sur.cpcp

	|domain	tccopr	aggr.mat.amnt	|#MCR.so
	|domain	tccopr	aggr.opr.amnt
	|domain	tccopr	aggr.sur.amnt	|#MCR.eo


	domain	tccopr	aggr.mat.amnt(3)	|#MCR.sn
	domain	tccopr	aggr.opr.amnt(3)
	domain	tccopr	aggr.sur.amnt(3)	|#MCR.en

	domain	tccopr	aggr.mat.amnt.var	|#CNT.sn
	domain	tccopr	aggr.mat.amnt.fixed
	domain	tccopr	aggr.opr.amnt.var
	domain	tccopr	aggr.opr.amnt.fixed
	domain	tccopr	aggr.sur.amnt.var
	domain	tccopr	aggr.sur.amnt.fixed	|#CNT.en

	domain	tcqnu1	aggr.mat.nuni
	domain	tcqnu1	aggr.opr.nuni
	domain	tcqnu1	aggr.sur.nuni


	string		var.item(47)	
	string		tmp.item(47)
	domain	tccpcc	var.cpcc	|* Cost Price Calc. Code
	domain	bccost	var.cpcp	|* Cost Component

	|domain	tccopr	var.amnt		|#MCR.o
	domain tccopr    var.amnt(3)		|#MCR.sn
		long	element			
	domain	tccopr	var.ticpr200.amnt(3)
	domain	tccopr	var.ticpr300.amnt(3)
	domain	tccopr	var.tipcs350.amte(3)
	domain	tccopr	var.tipcs150.amnt(3)	|#MCR.en

	domain	tccopr	var.amnt.var		|#CNT.n
	domain	tccopr	var.amnt.fixed		|#CNT.n
	domain	tccopr	var.ticpr240.amnt	|#CNT.n 
	domain	tccopr	var.ticpr340.amnt	|#CNT.n 


	domain	tcqnu1	var.nuni
	long		var.indt
	long		var.agcp
	long		var.max.nr.cpcp	|* max size of Cost Component Structure
	domain	tcyesno	var.spit		|* surcharges by item
	domain	ticpty	var.cpty		|* full or marg. cost price 	|#CNT.n

	


	long		tmp.max.nr.cpcp.cpr306
	long		tmp.max.nr.cpcp.cpr206
:STBL:tipcs350,ticpr200,tipcs150,ticpr300,tipcs300,bcstc000,bcstc006,bcstc010,bcsti007,tipcs002,tipcs021,tipcs020,ticpr000,ticpr010,tipcs000
:COMT:START
---  Changes in table design  ---
See %GTticpr0001


---  Source and Target Sessions  ---
See %GTticpr0001


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---
In %SV, there is only 1 amount field (per Calculation Code, Item, Cost Component). In %TC, there are 4 amounts:
ticpr205.afat	Added Amount - Fixed Part	
ticpr205.avat	Added Amount - Variable Part	
ticpr205.tfat	Total Amount - Fixed Part	
ticpr205.tvat	Total Amount - Variable Part	

The amount in %SV is assumed to be for Non-Added, Variable Costs. Therefor ony the %SFticpr205.tvat is filled.

See also %GTticpr0001. 

---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:ti
:TCMOD:cpr
:TFLNO:206
:LDAT:9/26/2017 8:59:44 PM
:PRTX:START
read.parameters.common(tmp.errmess)
var.max.nr.cpcp = 0	|* max size of Cost Comp. Structure. 
tmp.max.nr.cpcp.cpr206 = 0
tmp.max.nr.cpcp.cpr306 = 0

|* Read Standard Cost Price Calculation Code
|select  	  ticpr000.sccc  	|#CNT.o
select	ticpr000.sccc, ticpr000.cpty
  from	ticpr000  
as set with 1 rows
selectdo  
endselect  

|#CNT.sn
|* Read PCS parameter
select	tipcs000.cpty
  from	tipcs000  
as set with 1 rows
selectdo  
endselect  
|#CNT.en


var.item = ""
prev.item = ""
var.cpty = ticpr000.cpty		|#CNT.n
migrate  ticpr200
save.max.nr.cpcp()

var.item = ""
prev.item = ""
var.indt =  date.to.num(1970, 01, 02) 	|* day 2 (1970) . 
var.spit = tcyesno.no	|* no surcharges by item for customized items
var.cpty = tipcs000.cpty		|#CNT.n
migrate tipcs150
save.max.nr.cpcp()

var.item = ""
prev.item = ""  
var.spit = tcyesno.no	|* no surcharges by item for customized items
var.cpty = tipcs000.cpty		|#CNT.n
migrate tipcs350
save.max.nr.cpcp()

var.item = ""
prev.item = ""
var.cpty = ticpr000.cpty		|#CNT.n
migrate ticpr300
save.max.nr.cpcp()

prev.cprj = ""

dump.11.ticpr099()
:PRTX:END
:STAT:V
:VARI:|table	tbcstc000	|* bc common parameters
|table	tbcstc006	|* bc Cost Components
|table	tbcstc010	|* bc Aggr. Cost Comp. by Item Type / Group
|table	tbcsti007	|* bc Chart by Item Type / Group. 

|table	ttipcs002	|* Calculation Parts


	domain	tckitm	tmp.kitm	|* Kind of Item
	domain	tckitm	prev.kitm	|* Previous Kind of Item 	|#1391462.n
	domain	tccitg	tmp.citg		|* Item Group	
	domain	tccpcp	tmp.cpcp	|* Cost Component (Baan IV)
	domain	bccprj	tmp.cprj	|* Project Code (Gemini format)
	domain	tcmcs.s200m	tmp.errmess

	domain	tcitem	prev.item	|* Previous Item in Baan IV format
	domain	tccprj	prev.cprj	|* Prevous Project in Baan IV format

	domain	bccost	aggr.mat.cpcp
	domain	bccost	aggr.opr.cpcp
	domain	bccost	aggr.sur.cpcp

	|domain	tccopr	aggr.mat.amnt	|#MCR.so
	|domain	tccopr	aggr.opr.amnt
	|domain	tccopr	aggr.sur.amnt	|#MCR.eo


	domain	tccopr	aggr.mat.amnt(3)	|#MCR.sn
	domain	tccopr	aggr.opr.amnt(3)
	domain	tccopr	aggr.sur.amnt(3)	|#MCR.en

	domain	tccopr	aggr.mat.amnt.var	|#CNT.sn
	domain	tccopr	aggr.mat.amnt.fixed
	domain	tccopr	aggr.opr.amnt.var
	domain	tccopr	aggr.opr.amnt.fixed
	domain	tccopr	aggr.sur.amnt.var
	domain	tccopr	aggr.sur.amnt.fixed	|#CNT.en

	domain	tcqnu1	aggr.mat.nuni
	domain	tcqnu1	aggr.opr.nuni
	domain	tcqnu1	aggr.sur.nuni


	string		var.item(47)	
	string		tmp.item(47)
	domain	tccpcc	var.cpcc	|* Cost Price Calc. Code
	domain	bccost	var.cpcp	|* Cost Component

	|domain	tccopr	var.amnt		|#MCR.o
	domain tccopr    var.amnt(3)		|#MCR.sn
		long	element			
	domain	tccopr	var.ticpr200.amnt(3)
	domain	tccopr	var.ticpr300.amnt(3)
	domain	tccopr	var.tipcs350.amte(3)
	domain	tccopr	var.tipcs150.amnt(3)	|#MCR.en

	domain	tccopr	var.amnt.var		|#CNT.n
	domain	tccopr	var.amnt.fixed		|#CNT.n
	domain	tccopr	var.ticpr240.amnt	|#CNT.n 
	domain	tccopr	var.ticpr340.amnt	|#CNT.n 


	domain	tcqnu1	var.nuni
	long		var.indt
	long		var.agcp
	long		var.max.nr.cpcp	|* max size of Cost Component Structure
	domain	tcyesno	var.spit		|* surcharges by item
	domain	ticpty	var.cpty		|* full or marg. cost price 	|#CNT.n

	


	long		tmp.max.nr.cpcp.cpr306
	long		tmp.max.nr.cpcp.cpr206
:STBL:tipcs350,ticpr200,tipcs150,ticpr300,tipcs300,bcstc000,bcstc006,bcstc010,bcsti007,tipcs002,tipcs021,tipcs020,ticpr000,ticpr010,tipcs000
:COMT:START
---  Changes in table design  ---
See %GTticpr0001. 

---  Source and Target Sessions  ---
See %GTticpr001. 


---  Migration Logic  ---
See %GTticpr0001. 

---  Migration Parameters  ---

---  Migration Mapping Tables  ---
See %GTticpr0001. 
 

---  Technical Notes  ---


---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:ti
:TCMOD:cpr
:TFLNO:220
:LDAT:9/26/2017 8:59:47 PM
:PRTX:START
|select tccom000.ccur 				
|from 	tccom000 
|where 	tccom000._index1 ={:ext.lng.comp} 
|as set with 1 rows 
|selectdo 
|endselect
company.currency = get.home.currency.orig.comp()
|tccom000.ccur =  left.align(tccom000.ccur,3)
migrate ticpr220
:PRTX:END
:STAT:V
:VARI:double		var.ticpr220.chpr	
double		var.ticpr220.cpch(3)	
domain	bccost	var.ticpr220.chcp
domain	tcyesno	var.ticpr220.vaco
domain	tcccur	company.currency        	|* Company Currency. 
long		ext.lng.comp
long		element
string	 	tmp.errmess(200)
:STBL:tccom000,ticpr220,bcstc006
:COMT:START
---  Changes in table design  ---
Surcharges can contribute to either fixed operation costs or variable operation costs. Fixed operation costs are costs that are independent on the number of items produced. Variable operation costs are costs that depend on the number of items produced. 
%SV does not make the destinction between fixed and variable surcharge. In %TV, surcharges can be Fixed or Variable. 



---  Source and Target Sessions  ---
%SSticpr2520m000 - %TSticpr2520m000


---  Migration Logic  ---
All surcharges are 


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:ti
:TCMOD:cpr
:TFLNO:240
:LDAT:9/26/2017 8:59:45 PM
:PRTX:START
read.parameters.common(tmp.errmess)
var.max.nr.cpcp = 0	|* max size of Cost Comp. Structure. 
tmp.max.nr.cpcp.cpr206 = 0
tmp.max.nr.cpcp.cpr306 = 0

|* Read Standard Cost Price Calculation Code
|select  	  ticpr000.sccc  	|#CNT.o
select	ticpr000.sccc, ticpr000.cpty
  from	ticpr000  
as set with 1 rows
selectdo  
endselect  

|#CNT.sn
|* Read PCS parameter
select	tipcs000.cpty
  from	tipcs000  
as set with 1 rows
selectdo  
endselect  
|#CNT.en


var.item = ""
prev.item = ""
var.cpty = ticpr000.cpty		|#CNT.n
migrate  ticpr200
save.max.nr.cpcp()

var.item = ""
prev.item = ""
var.indt =  date.to.num(1970, 01, 02) 	|* day 2 (1970) . 
var.spit = tcyesno.no	|* no surcharges by item for customized items
var.cpty = tipcs000.cpty		|#CNT.n
migrate tipcs150
save.max.nr.cpcp()

var.item = ""
prev.item = ""  
var.spit = tcyesno.no	|* no surcharges by item for customized items
var.cpty = tipcs000.cpty		|#CNT.n
migrate tipcs350
save.max.nr.cpcp()

var.item = ""
prev.item = ""
var.cpty = ticpr000.cpty		|#CNT.n
migrate ticpr300
save.max.nr.cpcp()

prev.cprj = ""

dump.11.ticpr099()
:PRTX:END
:STAT:V
:VARI:|table	tbcstc000	|* bc common parameters
|table	tbcstc006	|* bc Cost Components
|table	tbcstc010	|* bc Aggr. Cost Comp. by Item Type / Group
|table	tbcsti007	|* bc Chart by Item Type / Group. 

|table	ttipcs002	|* Calculation Parts


	domain	tckitm	tmp.kitm	|* Kind of Item
	domain	tckitm	prev.kitm	|* Previous Kind of Item 	|#1391462.n
	domain	tccitg	tmp.citg		|* Item Group	
	domain	tccpcp	tmp.cpcp	|* Cost Component (Baan IV)
	domain	bccprj	tmp.cprj	|* Project Code (Gemini format)
	domain	tcmcs.s200m	tmp.errmess

	domain	tcitem	prev.item	|* Previous Item in Baan IV format
	domain	tccprj	prev.cprj	|* Prevous Project in Baan IV format

	domain	bccost	aggr.mat.cpcp
	domain	bccost	aggr.opr.cpcp
	domain	bccost	aggr.sur.cpcp

	|domain	tccopr	aggr.mat.amnt	|#MCR.so
	|domain	tccopr	aggr.opr.amnt
	|domain	tccopr	aggr.sur.amnt	|#MCR.eo


	domain	tccopr	aggr.mat.amnt(3)	|#MCR.sn
	domain	tccopr	aggr.opr.amnt(3)
	domain	tccopr	aggr.sur.amnt(3)	|#MCR.en

	domain	tccopr	aggr.mat.amnt.var	|#CNT.sn
	domain	tccopr	aggr.mat.amnt.fixed
	domain	tccopr	aggr.opr.amnt.var
	domain	tccopr	aggr.opr.amnt.fixed
	domain	tccopr	aggr.sur.amnt.var
	domain	tccopr	aggr.sur.amnt.fixed	|#CNT.en

	domain	tcqnu1	aggr.mat.nuni
	domain	tcqnu1	aggr.opr.nuni
	domain	tcqnu1	aggr.sur.nuni


	string		var.item(47)	
	string		tmp.item(47)
	domain	tccpcc	var.cpcc	|* Cost Price Calc. Code
	domain	bccost	var.cpcp	|* Cost Component

	|domain	tccopr	var.amnt		|#MCR.o
	domain tccopr    var.amnt(3)		|#MCR.sn
		long	element			
	domain	tccopr	var.ticpr200.amnt(3)
	domain	tccopr	var.ticpr300.amnt(3)
	domain	tccopr	var.tipcs350.amte(3)
	domain	tccopr	var.tipcs150.amnt(3)	|#MCR.en

	domain	tccopr	var.amnt.var		|#CNT.n
	domain	tccopr	var.amnt.fixed		|#CNT.n
	domain	tccopr	var.ticpr240.amnt	|#CNT.n 
	domain	tccopr	var.ticpr340.amnt	|#CNT.n 


	domain	tcqnu1	var.nuni
	long		var.indt
	long		var.agcp
	long		var.max.nr.cpcp	|* max size of Cost Component Structure
	domain	tcyesno	var.spit		|* surcharges by item
	domain	ticpty	var.cpty		|* full or marg. cost price 	|#CNT.n

	


	long		tmp.max.nr.cpcp.cpr306
	long		tmp.max.nr.cpcp.cpr206
:STBL:tipcs350,ticpr200,tipcs150,ticpr300,tipcs300,bcstc000,bcstc006,bcstc010,bcsti007,tipcs002,tipcs021,tipcs020,ticpr000,ticpr010,tipcs000
:COMT:START
---  Changes in table design  ---
See %GTticpr0001. 

---  Source and Target Sessions  ---
See %GTticpr001. 


---  Migration Logic  ---
See %GTticpr0001. 

---  Migration Parameters  ---

---  Migration Mapping Tables  ---
See %GTticpr0001. 
 

---  Technical Notes  ---


---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:ti
:TCMOD:cpr
:TFLNO:300
:LDAT:9/26/2017 8:59:45 PM
:PRTX:START
read.parameters.common(tmp.errmess)
var.max.nr.cpcp = 0	|* max size of Cost Comp. Structure. 
tmp.max.nr.cpcp.cpr206 = 0
tmp.max.nr.cpcp.cpr306 = 0

|* Read Standard Cost Price Calculation Code
|select  	  ticpr000.sccc  	|#CNT.o
select	ticpr000.sccc, ticpr000.cpty
  from	ticpr000  
as set with 1 rows
selectdo  
endselect  

|#CNT.sn
|* Read PCS parameter
select	tipcs000.cpty
  from	tipcs000  
as set with 1 rows
selectdo  
endselect  
|#CNT.en


var.item = ""
prev.item = ""
var.cpty = ticpr000.cpty		|#CNT.n
migrate  ticpr200
save.max.nr.cpcp()

var.item = ""
prev.item = ""
var.indt =  date.to.num(1970, 01, 02) 	|* day 2 (1970) . 
var.spit = tcyesno.no	|* no surcharges by item for customized items
var.cpty = tipcs000.cpty		|#CNT.n
migrate tipcs150
save.max.nr.cpcp()

var.item = ""
prev.item = ""  
var.spit = tcyesno.no	|* no surcharges by item for customized items
var.cpty = tipcs000.cpty		|#CNT.n
migrate tipcs350
save.max.nr.cpcp()

var.item = ""
prev.item = ""
var.cpty = ticpr000.cpty		|#CNT.n
migrate ticpr300
save.max.nr.cpcp()

prev.cprj = ""

dump.11.ticpr099()
:PRTX:END
:STAT:V
:VARI:|table	tbcstc000	|* bc common parameters
|table	tbcstc006	|* bc Cost Components
|table	tbcstc010	|* bc Aggr. Cost Comp. by Item Type / Group
|table	tbcsti007	|* bc Chart by Item Type / Group. 

|table	ttipcs002	|* Calculation Parts


	domain	tckitm	tmp.kitm	|* Kind of Item
	domain	tckitm	prev.kitm	|* Previous Kind of Item 	|#1391462.n
	domain	tccitg	tmp.citg		|* Item Group	
	domain	tccpcp	tmp.cpcp	|* Cost Component (Baan IV)
	domain	bccprj	tmp.cprj	|* Project Code (Gemini format)
	domain	tcmcs.s200m	tmp.errmess

	domain	tcitem	prev.item	|* Previous Item in Baan IV format
	domain	tccprj	prev.cprj	|* Prevous Project in Baan IV format

	domain	bccost	aggr.mat.cpcp
	domain	bccost	aggr.opr.cpcp
	domain	bccost	aggr.sur.cpcp

	|domain	tccopr	aggr.mat.amnt	|#MCR.so
	|domain	tccopr	aggr.opr.amnt
	|domain	tccopr	aggr.sur.amnt	|#MCR.eo


	domain	tccopr	aggr.mat.amnt(3)	|#MCR.sn
	domain	tccopr	aggr.opr.amnt(3)
	domain	tccopr	aggr.sur.amnt(3)	|#MCR.en

	domain	tccopr	aggr.mat.amnt.var	|#CNT.sn
	domain	tccopr	aggr.mat.amnt.fixed
	domain	tccopr	aggr.opr.amnt.var
	domain	tccopr	aggr.opr.amnt.fixed
	domain	tccopr	aggr.sur.amnt.var
	domain	tccopr	aggr.sur.amnt.fixed	|#CNT.en

	domain	tcqnu1	aggr.mat.nuni
	domain	tcqnu1	aggr.opr.nuni
	domain	tcqnu1	aggr.sur.nuni


	string		var.item(47)	
	string		tmp.item(47)
	domain	tccpcc	var.cpcc	|* Cost Price Calc. Code
	domain	bccost	var.cpcp	|* Cost Component

	|domain	tccopr	var.amnt		|#MCR.o
	domain tccopr    var.amnt(3)		|#MCR.sn
		long	element			
	domain	tccopr	var.ticpr200.amnt(3)
	domain	tccopr	var.ticpr300.amnt(3)
	domain	tccopr	var.tipcs350.amte(3)
	domain	tccopr	var.tipcs150.amnt(3)	|#MCR.en

	domain	tccopr	var.amnt.var		|#CNT.n
	domain	tccopr	var.amnt.fixed		|#CNT.n
	domain	tccopr	var.ticpr240.amnt	|#CNT.n 
	domain	tccopr	var.ticpr340.amnt	|#CNT.n 


	domain	tcqnu1	var.nuni
	long		var.indt
	long		var.agcp
	long		var.max.nr.cpcp	|* max size of Cost Component Structure
	domain	tcyesno	var.spit		|* surcharges by item
	domain	ticpty	var.cpty		|* full or marg. cost price 	|#CNT.n

	


	long		tmp.max.nr.cpcp.cpr306
	long		tmp.max.nr.cpcp.cpr206
:STBL:tipcs350,ticpr200,tipcs150,ticpr300,tipcs300,bcstc000,bcstc006,bcstc010,bcsti007,tipcs002,tipcs021,tipcs020,ticpr000,ticpr010,tipcs000
:COMT:START
---  Changes in table design  ---
See %GTticpr0001. 

---  Source and Target Sessions  ---
See %GTticpr001. 


---  Migration Logic  ---
See %GTticpr0001. 

---  Migration Parameters  ---

---  Migration Mapping Tables  ---
See %GTticpr0001. 
 

---  Technical Notes  ---


---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:ti
:TCMOD:cpr
:TFLNO:301
:LDAT:9/26/2017 8:59:45 PM
:PRTX:START
read.parameters.common(tmp.errmess)
var.max.nr.cpcp = 0	|* max size of Cost Comp. Structure. 
tmp.max.nr.cpcp.cpr206 = 0
tmp.max.nr.cpcp.cpr306 = 0

|* Read Standard Cost Price Calculation Code
|select  	  ticpr000.sccc  	|#CNT.o
select	ticpr000.sccc, ticpr000.cpty
  from	ticpr000  
as set with 1 rows
selectdo  
endselect  

|#CNT.sn
|* Read PCS parameter
select	tipcs000.cpty
  from	tipcs000  
as set with 1 rows
selectdo  
endselect  
|#CNT.en


var.item = ""
prev.item = ""
var.cpty = ticpr000.cpty		|#CNT.n
migrate  ticpr200
save.max.nr.cpcp()

var.item = ""
prev.item = ""
var.indt =  date.to.num(1970, 01, 02) 	|* day 2 (1970) . 
var.spit = tcyesno.no	|* no surcharges by item for customized items
var.cpty = tipcs000.cpty		|#CNT.n
migrate tipcs150
save.max.nr.cpcp()

var.item = ""
prev.item = ""  
var.spit = tcyesno.no	|* no surcharges by item for customized items
var.cpty = tipcs000.cpty		|#CNT.n
migrate tipcs350
save.max.nr.cpcp()

var.item = ""
prev.item = ""
var.cpty = ticpr000.cpty		|#CNT.n
migrate ticpr300
save.max.nr.cpcp()

prev.cprj = ""

dump.11.ticpr099()
:PRTX:END
:STAT:V
:VARI:|table	tbcstc000	|* bc common parameters
|table	tbcstc006	|* bc Cost Components
|table	tbcstc010	|* bc Aggr. Cost Comp. by Item Type / Group
|table	tbcsti007	|* bc Chart by Item Type / Group. 

|table	ttipcs002	|* Calculation Parts


	domain	tckitm	tmp.kitm	|* Kind of Item
	domain	tckitm	prev.kitm	|* Previous Kind of Item 	|#1391462.n
	domain	tccitg	tmp.citg		|* Item Group	
	domain	tccpcp	tmp.cpcp	|* Cost Component (Baan IV)
	domain	bccprj	tmp.cprj	|* Project Code (Gemini format)
	domain	tcmcs.s200m	tmp.errmess

	domain	tcitem	prev.item	|* Previous Item in Baan IV format
	domain	tccprj	prev.cprj	|* Prevous Project in Baan IV format

	domain	bccost	aggr.mat.cpcp
	domain	bccost	aggr.opr.cpcp
	domain	bccost	aggr.sur.cpcp

	|domain	tccopr	aggr.mat.amnt	|#MCR.so
	|domain	tccopr	aggr.opr.amnt
	|domain	tccopr	aggr.sur.amnt	|#MCR.eo


	domain	tccopr	aggr.mat.amnt(3)	|#MCR.sn
	domain	tccopr	aggr.opr.amnt(3)
	domain	tccopr	aggr.sur.amnt(3)	|#MCR.en

	domain	tccopr	aggr.mat.amnt.var	|#CNT.sn
	domain	tccopr	aggr.mat.amnt.fixed
	domain	tccopr	aggr.opr.amnt.var
	domain	tccopr	aggr.opr.amnt.fixed
	domain	tccopr	aggr.sur.amnt.var
	domain	tccopr	aggr.sur.amnt.fixed	|#CNT.en

	domain	tcqnu1	aggr.mat.nuni
	domain	tcqnu1	aggr.opr.nuni
	domain	tcqnu1	aggr.sur.nuni


	string		var.item(47)	
	string		tmp.item(47)
	domain	tccpcc	var.cpcc	|* Cost Price Calc. Code
	domain	bccost	var.cpcp	|* Cost Component

	|domain	tccopr	var.amnt		|#MCR.o
	domain tccopr    var.amnt(3)		|#MCR.sn
		long	element			
	domain	tccopr	var.ticpr200.amnt(3)
	domain	tccopr	var.ticpr300.amnt(3)
	domain	tccopr	var.tipcs350.amte(3)
	domain	tccopr	var.tipcs150.amnt(3)	|#MCR.en

	domain	tccopr	var.amnt.var		|#CNT.n
	domain	tccopr	var.amnt.fixed		|#CNT.n
	domain	tccopr	var.ticpr240.amnt	|#CNT.n 
	domain	tccopr	var.ticpr340.amnt	|#CNT.n 


	domain	tcqnu1	var.nuni
	long		var.indt
	long		var.agcp
	long		var.max.nr.cpcp	|* max size of Cost Component Structure
	domain	tcyesno	var.spit		|* surcharges by item
	domain	ticpty	var.cpty		|* full or marg. cost price 	|#CNT.n

	


	long		tmp.max.nr.cpcp.cpr306
	long		tmp.max.nr.cpcp.cpr206
:STBL:tipcs350,ticpr200,tipcs150,ticpr300,tipcs300,bcstc000,bcstc006,bcstc010,bcsti007,tipcs002,tipcs021,tipcs020,ticpr000,ticpr010,tipcs000
:COMT:START
---  Changes in table design  ---
See %GTticpr0001. 

---  Source and Target Sessions  ---
See %GTticpr001. 


---  Migration Logic  ---
See %GTticpr0001. 

---  Migration Parameters  ---

---  Migration Mapping Tables  ---
See %GTticpr0001. 
 

---  Technical Notes  ---


---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:ti
:TCMOD:cpr
:TFLNO:305
:LDAT:9/26/2017 8:59:46 PM
:PRTX:START
read.parameters.common(tmp.errmess)
var.max.nr.cpcp = 0	|* max size of Cost Comp. Structure. 
tmp.max.nr.cpcp.cpr206 = 0
tmp.max.nr.cpcp.cpr306 = 0

|* Read Standard Cost Price Calculation Code
|select  	  ticpr000.sccc  	|#CNT.o
select	ticpr000.sccc, ticpr000.cpty
  from	ticpr000  
as set with 1 rows
selectdo  
endselect  

|#CNT.sn
|* Read PCS parameter
select	tipcs000.cpty
  from	tipcs000  
as set with 1 rows
selectdo  
endselect  
|#CNT.en


var.item = ""
prev.item = ""
var.cpty = ticpr000.cpty		|#CNT.n
migrate  ticpr200
save.max.nr.cpcp()

var.item = ""
prev.item = ""
var.indt =  date.to.num(1970, 01, 02) 	|* day 2 (1970) . 
var.spit = tcyesno.no	|* no surcharges by item for customized items
var.cpty = tipcs000.cpty		|#CNT.n
migrate tipcs150
save.max.nr.cpcp()

var.item = ""
prev.item = ""  
var.spit = tcyesno.no	|* no surcharges by item for customized items
var.cpty = tipcs000.cpty		|#CNT.n
migrate tipcs350
save.max.nr.cpcp()

var.item = ""
prev.item = ""
var.cpty = ticpr000.cpty		|#CNT.n
migrate ticpr300
save.max.nr.cpcp()

prev.cprj = ""

dump.11.ticpr099()
:PRTX:END
:STAT:V
:VARI:|table	tbcstc000	|* bc common parameters
|table	tbcstc006	|* bc Cost Components
|table	tbcstc010	|* bc Aggr. Cost Comp. by Item Type / Group
|table	tbcsti007	|* bc Chart by Item Type / Group. 

|table	ttipcs002	|* Calculation Parts


	domain	tckitm	tmp.kitm	|* Kind of Item
	domain	tckitm	prev.kitm	|* Previous Kind of Item 	|#1391462.n
	domain	tccitg	tmp.citg		|* Item Group	
	domain	tccpcp	tmp.cpcp	|* Cost Component (Baan IV)
	domain	bccprj	tmp.cprj	|* Project Code (Gemini format)
	domain	tcmcs.s200m	tmp.errmess

	domain	tcitem	prev.item	|* Previous Item in Baan IV format
	domain	tccprj	prev.cprj	|* Prevous Project in Baan IV format

	domain	bccost	aggr.mat.cpcp
	domain	bccost	aggr.opr.cpcp
	domain	bccost	aggr.sur.cpcp

	|domain	tccopr	aggr.mat.amnt	|#MCR.so
	|domain	tccopr	aggr.opr.amnt
	|domain	tccopr	aggr.sur.amnt	|#MCR.eo


	domain	tccopr	aggr.mat.amnt(3)	|#MCR.sn
	domain	tccopr	aggr.opr.amnt(3)
	domain	tccopr	aggr.sur.amnt(3)	|#MCR.en

	domain	tccopr	aggr.mat.amnt.var	|#CNT.sn
	domain	tccopr	aggr.mat.amnt.fixed
	domain	tccopr	aggr.opr.amnt.var
	domain	tccopr	aggr.opr.amnt.fixed
	domain	tccopr	aggr.sur.amnt.var
	domain	tccopr	aggr.sur.amnt.fixed	|#CNT.en

	domain	tcqnu1	aggr.mat.nuni
	domain	tcqnu1	aggr.opr.nuni
	domain	tcqnu1	aggr.sur.nuni


	string		var.item(47)	
	string		tmp.item(47)
	domain	tccpcc	var.cpcc	|* Cost Price Calc. Code
	domain	bccost	var.cpcp	|* Cost Component

	|domain	tccopr	var.amnt		|#MCR.o
	domain tccopr    var.amnt(3)		|#MCR.sn
		long	element			
	domain	tccopr	var.ticpr200.amnt(3)
	domain	tccopr	var.ticpr300.amnt(3)
	domain	tccopr	var.tipcs350.amte(3)
	domain	tccopr	var.tipcs150.amnt(3)	|#MCR.en

	domain	tccopr	var.amnt.var		|#CNT.n
	domain	tccopr	var.amnt.fixed		|#CNT.n
	domain	tccopr	var.ticpr240.amnt	|#CNT.n 
	domain	tccopr	var.ticpr340.amnt	|#CNT.n 


	domain	tcqnu1	var.nuni
	long		var.indt
	long		var.agcp
	long		var.max.nr.cpcp	|* max size of Cost Component Structure
	domain	tcyesno	var.spit		|* surcharges by item
	domain	ticpty	var.cpty		|* full or marg. cost price 	|#CNT.n

	


	long		tmp.max.nr.cpcp.cpr306
	long		tmp.max.nr.cpcp.cpr206
:STBL:tipcs350,ticpr200,tipcs150,ticpr300,tipcs300,bcstc000,bcstc006,bcstc010,bcsti007,tipcs002,tipcs021,tipcs020,ticpr000,ticpr010,tipcs000
:COMT:START
---  Changes in table design  ---
See %GTticpr0001. 

---  Source and Target Sessions  ---
See %GTticpr001. 


---  Migration Logic  ---
See %GTticpr0001. 

---  Migration Parameters  ---

---  Migration Mapping Tables  ---
See %GTticpr0001. 
 

---  Technical Notes  ---


---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:ti
:TCMOD:cpr
:TFLNO:306
:LDAT:9/26/2017 8:59:46 PM
:PRTX:START
read.parameters.common(tmp.errmess)
var.max.nr.cpcp = 0	|* max size of Cost Comp. Structure. 
tmp.max.nr.cpcp.cpr206 = 0
tmp.max.nr.cpcp.cpr306 = 0

|* Read Standard Cost Price Calculation Code
|select  	  ticpr000.sccc  	|#CNT.o
select	ticpr000.sccc, ticpr000.cpty
  from	ticpr000  
as set with 1 rows
selectdo  
endselect  

|#CNT.sn
|* Read PCS parameter
select	tipcs000.cpty
  from	tipcs000  
as set with 1 rows
selectdo  
endselect  
|#CNT.en


var.item = ""
prev.item = ""
var.cpty = ticpr000.cpty		|#CNT.n
migrate  ticpr200
save.max.nr.cpcp()

var.item = ""
prev.item = ""
var.indt =  date.to.num(1970, 01, 02) 	|* day 2 (1970) . 
var.spit = tcyesno.no	|* no surcharges by item for customized items
var.cpty = tipcs000.cpty		|#CNT.n
migrate tipcs150
save.max.nr.cpcp()

var.item = ""
prev.item = ""  
var.spit = tcyesno.no	|* no surcharges by item for customized items
var.cpty = tipcs000.cpty		|#CNT.n
migrate tipcs350
save.max.nr.cpcp()

var.item = ""
prev.item = ""
var.cpty = ticpr000.cpty		|#CNT.n
migrate ticpr300
save.max.nr.cpcp()

prev.cprj = ""

dump.11.ticpr099()
:PRTX:END
:STAT:V
:VARI:|table	tbcstc000	|* bc common parameters
|table	tbcstc006	|* bc Cost Components
|table	tbcstc010	|* bc Aggr. Cost Comp. by Item Type / Group
|table	tbcsti007	|* bc Chart by Item Type / Group. 

|table	ttipcs002	|* Calculation Parts


	domain	tckitm	tmp.kitm	|* Kind of Item
	domain	tckitm	prev.kitm	|* Previous Kind of Item 	|#1391462.n
	domain	tccitg	tmp.citg		|* Item Group	
	domain	tccpcp	tmp.cpcp	|* Cost Component (Baan IV)
	domain	bccprj	tmp.cprj	|* Project Code (Gemini format)
	domain	tcmcs.s200m	tmp.errmess

	domain	tcitem	prev.item	|* Previous Item in Baan IV format
	domain	tccprj	prev.cprj	|* Prevous Project in Baan IV format

	domain	bccost	aggr.mat.cpcp
	domain	bccost	aggr.opr.cpcp
	domain	bccost	aggr.sur.cpcp

	|domain	tccopr	aggr.mat.amnt	|#MCR.so
	|domain	tccopr	aggr.opr.amnt
	|domain	tccopr	aggr.sur.amnt	|#MCR.eo


	domain	tccopr	aggr.mat.amnt(3)	|#MCR.sn
	domain	tccopr	aggr.opr.amnt(3)
	domain	tccopr	aggr.sur.amnt(3)	|#MCR.en

	domain	tccopr	aggr.mat.amnt.var	|#CNT.sn
	domain	tccopr	aggr.mat.amnt.fixed
	domain	tccopr	aggr.opr.amnt.var
	domain	tccopr	aggr.opr.amnt.fixed
	domain	tccopr	aggr.sur.amnt.var
	domain	tccopr	aggr.sur.amnt.fixed	|#CNT.en

	domain	tcqnu1	aggr.mat.nuni
	domain	tcqnu1	aggr.opr.nuni
	domain	tcqnu1	aggr.sur.nuni


	string		var.item(47)	
	string		tmp.item(47)
	domain	tccpcc	var.cpcc	|* Cost Price Calc. Code
	domain	bccost	var.cpcp	|* Cost Component

	|domain	tccopr	var.amnt		|#MCR.o
	domain tccopr    var.amnt(3)		|#MCR.sn
		long	element			
	domain	tccopr	var.ticpr200.amnt(3)
	domain	tccopr	var.ticpr300.amnt(3)
	domain	tccopr	var.tipcs350.amte(3)
	domain	tccopr	var.tipcs150.amnt(3)	|#MCR.en

	domain	tccopr	var.amnt.var		|#CNT.n
	domain	tccopr	var.amnt.fixed		|#CNT.n
	domain	tccopr	var.ticpr240.amnt	|#CNT.n 
	domain	tccopr	var.ticpr340.amnt	|#CNT.n 


	domain	tcqnu1	var.nuni
	long		var.indt
	long		var.agcp
	long		var.max.nr.cpcp	|* max size of Cost Component Structure
	domain	tcyesno	var.spit		|* surcharges by item
	domain	ticpty	var.cpty		|* full or marg. cost price 	|#CNT.n

	


	long		tmp.max.nr.cpcp.cpr306
	long		tmp.max.nr.cpcp.cpr206
:STBL:tipcs350,ticpr200,tipcs150,ticpr300,tipcs300,bcstc000,bcstc006,bcstc010,bcsti007,tipcs002,tipcs021,tipcs020,ticpr000,ticpr010,tipcs000
:COMT:START
---  Changes in table design  ---
See %GTticpr0001. 

---  Source and Target Sessions  ---
See %GTticpr001. 


---  Migration Logic  ---
See %GTticpr0001. 

---  Migration Parameters  ---

---  Migration Mapping Tables  ---
See %GTticpr0001. 
 

---  Technical Notes  ---


---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:ti
:TCMOD:cpr
:TFLNO:320
:LDAT:9/26/2017 8:59:48 PM
:PRTX:START
|select tccom000.ncmp,tccom000.ccur 
|from	tccom000 
|where	tccom000._index1 = {:ext.lng.comp} 
|as set with 1 rows 
|selectdo 
|	var.ticpr320.ccur = tccom000.ccur 
|endselect 

var.ticpr320.ccur = get.home.currency.orig.comp()
migrate ticpr320
:PRTX:END
:STAT:V
:VARI:double		var.ticpr320.cpch(3)	

	double		var.ticpr320.chpr	

	string		var.ticpr320.ccur(3)
	domain	tcyesno	var.ticpr320.vaco	

	long		ext.lng.comp
	long		element
	string		tmp.errmess(1)
:STBL:tccom000,ticpr320,bcstc006
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---
%SSticpr3520m000 - %tsticpr3520m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:ti
:TCMOD:cpr
:TFLNO:340
:LDAT:9/26/2017 8:59:47 PM
:PRTX:START
read.parameters.common(tmp.errmess)
var.max.nr.cpcp = 0	|* max size of Cost Comp. Structure. 
tmp.max.nr.cpcp.cpr206 = 0
tmp.max.nr.cpcp.cpr306 = 0

|* Read Standard Cost Price Calculation Code
|select  	  ticpr000.sccc  	|#CNT.o
select	ticpr000.sccc, ticpr000.cpty
  from	ticpr000  
as set with 1 rows
selectdo  
endselect  

|#CNT.sn
|* Read PCS parameter
select	tipcs000.cpty
  from	tipcs000  
as set with 1 rows
selectdo  
endselect  
|#CNT.en


var.item = ""
prev.item = ""
var.cpty = ticpr000.cpty		|#CNT.n
migrate  ticpr200
save.max.nr.cpcp()

var.item = ""
prev.item = ""
var.indt =  date.to.num(1970, 01, 02) 	|* day 2 (1970) . 
var.spit = tcyesno.no	|* no surcharges by item for customized items
var.cpty = tipcs000.cpty		|#CNT.n
migrate tipcs150
save.max.nr.cpcp()

var.item = ""
prev.item = ""  
var.spit = tcyesno.no	|* no surcharges by item for customized items
var.cpty = tipcs000.cpty		|#CNT.n
migrate tipcs350
save.max.nr.cpcp()

var.item = ""
prev.item = ""
var.cpty = ticpr000.cpty		|#CNT.n
migrate ticpr300
save.max.nr.cpcp()

prev.cprj = ""

dump.11.ticpr099()
:PRTX:END
:STAT:V
:VARI:|table	tbcstc000	|* bc common parameters
|table	tbcstc006	|* bc Cost Components
|table	tbcstc010	|* bc Aggr. Cost Comp. by Item Type / Group
|table	tbcsti007	|* bc Chart by Item Type / Group. 

|table	ttipcs002	|* Calculation Parts


	domain	tckitm	tmp.kitm	|* Kind of Item
	domain	tckitm	prev.kitm	|* Previous Kind of Item 	|#1391462.n
	domain	tccitg	tmp.citg		|* Item Group	
	domain	tccpcp	tmp.cpcp	|* Cost Component (Baan IV)
	domain	bccprj	tmp.cprj	|* Project Code (Gemini format)
	domain	tcmcs.s200m	tmp.errmess

	domain	tcitem	prev.item	|* Previous Item in Baan IV format
	domain	tccprj	prev.cprj	|* Prevous Project in Baan IV format

	domain	bccost	aggr.mat.cpcp
	domain	bccost	aggr.opr.cpcp
	domain	bccost	aggr.sur.cpcp

	|domain	tccopr	aggr.mat.amnt	|#MCR.so
	|domain	tccopr	aggr.opr.amnt
	|domain	tccopr	aggr.sur.amnt	|#MCR.eo


	domain	tccopr	aggr.mat.amnt(3)	|#MCR.sn
	domain	tccopr	aggr.opr.amnt(3)
	domain	tccopr	aggr.sur.amnt(3)	|#MCR.en

	domain	tccopr	aggr.mat.amnt.var	|#CNT.sn
	domain	tccopr	aggr.mat.amnt.fixed
	domain	tccopr	aggr.opr.amnt.var
	domain	tccopr	aggr.opr.amnt.fixed
	domain	tccopr	aggr.sur.amnt.var
	domain	tccopr	aggr.sur.amnt.fixed	|#CNT.en

	domain	tcqnu1	aggr.mat.nuni
	domain	tcqnu1	aggr.opr.nuni
	domain	tcqnu1	aggr.sur.nuni


	string		var.item(47)	
	string		tmp.item(47)
	domain	tccpcc	var.cpcc	|* Cost Price Calc. Code
	domain	bccost	var.cpcp	|* Cost Component

	|domain	tccopr	var.amnt		|#MCR.o
	domain tccopr    var.amnt(3)		|#MCR.sn
		long	element			
	domain	tccopr	var.ticpr200.amnt(3)
	domain	tccopr	var.ticpr300.amnt(3)
	domain	tccopr	var.tipcs350.amte(3)
	domain	tccopr	var.tipcs150.amnt(3)	|#MCR.en

	domain	tccopr	var.amnt.var		|#CNT.n
	domain	tccopr	var.amnt.fixed		|#CNT.n
	domain	tccopr	var.ticpr240.amnt	|#CNT.n 
	domain	tccopr	var.ticpr340.amnt	|#CNT.n 


	domain	tcqnu1	var.nuni
	long		var.indt
	long		var.agcp
	long		var.max.nr.cpcp	|* max size of Cost Component Structure
	domain	tcyesno	var.spit		|* surcharges by item
	domain	ticpty	var.cpty		|* full or marg. cost price 	|#CNT.n

	


	long		tmp.max.nr.cpcp.cpr306
	long		tmp.max.nr.cpcp.cpr206
:STBL:tipcs350,ticpr200,tipcs150,ticpr300,tipcs300,bcstc000,bcstc006,bcstc010,bcsti007,tipcs002,tipcs021,tipcs020,ticpr000,ticpr010,tipcs000
:COMT:START
---  Changes in table design  ---
See %GTticpr0001. 

---  Source and Target Sessions  ---
See %GTticpr001. 


---  Migration Logic  ---
See %GTticpr0001. 

---  Migration Parameters  ---

---  Migration Mapping Tables  ---
See %GTticpr0001. 
 

---  Technical Notes  ---


---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:ti
:TCMOD:pcs
:TFLNO:000
:LDAT:9/26/2017 8:59:48 PM
:PRTX:START
get.number.group(bcckon.project, error.message)

|* Read bc-manufacturing parameters for Project Series.
return.value = read.parameters.manufacturing(error.message)

migrate tipcs000
:PRTX:END
:STAT:V
:VARI:string	var.tipcs000.indt(22)
string	var.tipcs000.dsca(50)	mb
domain	tcmcs.long	return.value
domain	tcmcs.s200m	error.message
domain	tcyesno		var.include.fixed.costs
:STBL:tipcs000,bcstc002,bcsti000
:COMT:START
---  Changes in table design  ---
%GTtcmcs0000


---  Source and Target Sessions  ---
%SStipcs0100m000 - %TStipcs0100m000


---  Migration Logic  ---
%GTtcmcs0001

---  Migration Parameters  ---



---  Migration Mapping Tables  ---
Number groups are retrieved from %STbcstc002.


---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:ti
:TCMOD:pcs
:TFLNO:320
:LDAT:2/4/2017 1:58:40 PM
:PRTX:START
|* Read company currency
hold.ccur = get.home.currency.orig.comp()

migrate tipcs320
migrate tipcs140
:PRTX:END
:STAT:V
:VARI:domain	tcmcs.s200m	error.message
domain	tcmcs.long	return.value
domain	bccost		var.tipcs320.chcp
domain	bccprj		var.tipcs320.cprj
domain	tcccur		var.tipcs320.ccur
|domain	tccopr		var.tipcs320.cpch
domain	tccopr		var.tipcs320.cpch(3)
domain	tccopr		var.tipcs320.chpr
domain	tcyesno		var.tipcs320.vaco
|domain	tcmcs.long	var.tipcs320.cmth
domain	tccmtd		var.tipcs320.cmth
string			hold.ccur(3)
:STBL:tccom000,tipcs320,tipcs140,bcstc006,bcstc016
:COMT:START
---  Changes in table design  ---
Budget and Project data has been combined.
For this conversion object this means that source data is coming from two source tables: %STtipcs140 and %STtipcs320.
See %GTtipcs0000.

---  Source and Target Sessions  ---
%SStipcs1140m000, %SStipcs3120m000 - %TStipcs3120m000

---  Migration Logic  ---
NA

---  Migration Parameters  ---
NA

---  Migration Mapping Tables  ---
%STbcstc006
%STbcstc016

---  Technical Notes  ---
NA

---  Performance  ---
NA
:COMT:END
:TEXT:







:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:ti
:TCMOD:pcs
:TFLNO:350
:LDAT:2/4/2017 1:58:52 PM
:PRTX:START
|* Read company currency.
var.tipcs350.ccur = get.home.currency.orig.comp()
migrate tipcs150
migrate tipcs350
:PRTX:END
:STAT:V
:VARI:domain	tcccur	var.tipcs350.ccur	|* Currency
domain	bccprj	var.tipcs350.cprj		|* Project
domain  bccnv.item var.tipcs350.item	|* Item Code
domain	tcmcs.s200m	error.message	|* Error Message
domain	tcmcs.long	return.value	|* Return Value
:STBL:tccom000,tipcs350,tipcs150,bcstc006
:COMT:START
---  Changes in table design  ---
See %GTtipcs0000.

---  Source and Target Sessions  ---
%SStipcs1550m000, %SStipcs3550m000 - %TStipcs3550m000

---  Migration Logic  ---
Because PCS budget and project tables have been combined in the %TV, tables %STtipcs150 and %STtipcs350 are migrated to one table %TTtipcs350.

---  Migration Parameters  ---
NA

---  Migration Mapping Tables  ---
%STbcstc006
%STbcstc016

---  Technical Notes  ---
NA

---  Performance  ---
NA
:COMT:END
:TEXT:







:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:ti
:TCMOD:pcs
:TFLNO:360
:LDAT:2/4/2017 1:59:08 PM
:PRTX:START
|* Read company currency.
var.tipcs360.ccur = get.home.currency.orig.comp()
migrate tipcs160
migrate tipcs360
:PRTX:END
:STAT:V
:VARI:domain	tcccur	var.tipcs360.ccur	|* Currency
domain	bccprj	var.tipcs360.cprj		|* Project
domain	tcmcs.s200m	error.message	|* Error Message
domain	tcmcs.long	return.value	|* Return Value
:STBL:tccom000,tipcs360,tipcs160,bcstc006
:COMT:START
---  Changes in table design  ---
See %GTtipcs0000.

---  Source and Target Sessions  ---
%SStipcs1560m000, %SStipcs3560m000 - %TStipcs3560m000

---  Migration Logic  ---
Because PCS budget and project tables have been combined in the %TV, tables %STtipcs160 and %STtipcs360 are migrated to one table %TTtipcs360.

---  Migration Parameters  ---
NA

---  Migration Mapping Tables  ---
%STbcstc006
%STbcstc016

---  Technical Notes  ---
NA

---  Performance  ---
NA
:COMT:END
:TEXT:







:TEXT:END
:ISMS:False
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:wh
:TCMOD:ina
:TFLNO:112
:LDAT:2/21/2019 1:53:26 PM
:PRTX:START
read.parameters.common(o.mess)
read.parameter("tdinv000", o.mess)
read.parameter("tdilc000", o.mess)				|#214852.n

g.mc.depth = get.mc.depth()


hold.item = ""
hold.cwar = ""
hold.negative = 0.0
								|#800-142000.sn
check1.trdt = 0
check2.trdt = 0
check2.item = ""
check2.cwar = ""
								|#800-142000.en

itid = 0
var.whinr110.itid = ""
var.whinr110.itse = 0

|#array.len = 100			|#228714.o
array.len = 2000			|#228714.n

alloc.mem(arr.whina112.trdt, 22, array.len)
alloc.mem(arr.whina112.seqn, array.len)
alloc.mem(arr.whina112.qskt, array.len)

i = 0
table	tbcswh008

fill.pur.receipt.array()		|#234040.n

migrate tdinv700


set.mem(arr.whina112.trdt,"")
set.mem(arr.whina112.seqn,0)
set.mem(arr.whina112.qskt,0.0)

hold.cprj = ""
hold.item = ""
hold.cwar = ""							|#214852.n
								|#800-142000.sn
check1.trdt = 0
check2.trdt = 0
check2.item = ""
check2.cwar = ""
								|#800-142000.en
i = 0

var.whinr110.valm = 1						|#209255.n

								|#214852.sn
keep.cprj = ""
keep.item = ""

|#arr.len.tipcs700 = 100		|#228714.o
arr.len.tipcs700 = 2000		|#228714.n

alloc.mem(arr.tipcs700.cwar, len(keep.cwar), arr.len.tipcs700)
alloc.mem(arr.tipcs700.trdt, arr.len.tipcs700)
alloc.mem(arr.tipcs700.trtm, arr.len.tipcs700)
alloc.mem(arr.tipcs700.sern, arr.len.tipcs700)
alloc.mem(arr.tipcs700.proc, arr.len.tipcs700)

select	tipcs700.*
from	tipcs700
where	tipcs700.cprj >  ""                                                                                                     and 	 tipcs700.item >  ""
order by tipcs700._index1
selectdo
	if tipcs700.cprj <> keep.cprj or
	   tipcs700.item <> keep.item then
		keep.cprj = tipcs700.cprj
		keep.item = tipcs700.item
		fill.tipcs700.array(	keep.cprj,
					keep.item)
		repeat
			find.cwar = false
			for j = 1 to arr.len.tipcs700
				if not find.cwar then
					if isspace(arr.tipcs700.cwar(1,j)) then
						break
					else
						if arr.tipcs700.proc(j) = 0 then
							keep.cwar = arr.tipcs700.cwar(1,j)
							keep.trdt = arr.tipcs700.trdt(j)
							keep.trtm = arr.tipcs700.trtm(j)
							keep.sern = arr.tipcs700.sern(j)
							find.cwar = true
						else
							continue
						endif
					endif
				else
					if isspace(arr.tipcs700.cwar(1,j)) then
						break
					else
						if arr.tipcs700.cwar(1,j) <> keep.cwar then
							continue
						else
							keep.trdt = arr.tipcs700.trdt(j)
							keep.trtm = arr.tipcs700.trtm(j)
							keep.sern = arr.tipcs700.sern(j)
						endif
					endif
				endif

								|#214852.en
				migrate tipcs700
								|#214852.sn
				arr.tipcs700.proc(j) = 1
			endfor
		until not find.cwar
		handle.inventory.transfers.customized.items(	|#1133346.sn
							keep.cprj,
							keep.item,
							arr.len.tipcs700,
							arr.tipcs700.cwar)
								|#1133346.en
	endif
endselect

free.mem(arr.tipcs700.cwar)
free.mem(arr.tipcs700.trdt)
free.mem(arr.tipcs700.trtm)
free.mem(arr.tipcs700.sern)
free.mem(arr.tipcs700.proc)

								|#214852.en

								|#209255.sn
|* next functions are used to create receipt transactions for items that
|* do have inventory onhand, but don't have inventory transactions.
handle.inventory.without.tdinv700()
handle.inventory.without.tipcs700()
								|#209255.en

free.mem(arr.whina112.trdt)
free.mem(arr.whina112.seqn)
free.mem(arr.whina112.qskt)

free.mem.pur.receipt.array()	|#234040.n
:PRTX:END
:STAT:V
:VARI:#include "ibcswh0011"			|#CNT.n
#include "itccom0015"			|#234040.n
long	g.mc.depth

long			nr.lots				|#TELAIR_2.n
string			arr.lots(1,1)	based		|#TELAIR_2.n
domain	tdltc.clot	lot.serial			|#fp3

long			i
long			itid
long			prev.sern
long			array.len
long			hold.tdinv700.trdt
long			hold.tdinv700.trtm		|#TELAIR.sn
long			hold.tdinv700.sern
long			hold.tipcs700.trdt
long			hold.tipcs700.trtm
long			hold.tipcs700.sern		|#TELAIR.en

long			dummy.array.nr
long			receipt.counter

long			arr.len.tipcs700			|#214852.sn
domain	tccwar		arr.tipcs700.cwar(1)	based
long			arr.tipcs700.trdt(1)	based
long			arr.tipcs700.trtm(1)	based
long			arr.tipcs700.sern(1)	based
long			arr.tipcs700.proc(1)	based
long			j
long			k
domain	tcbool		find.cwar
long			found.trdt
long			found.trtm
long			found.sern
domain	tcqiv1		stock
domain	tcitem		keep.item
domain	tccprj		keep.cprj
domain	tccwar		keep.cwar	fixed
long			keep.trdt
long			keep.trtm
long			keep.sern			|#214852.en

long			hold.koor
long			hold.kost
string			hold.orno(9)
string			hold.trdt(22)
long			hold.seqn
domain	tcqiv1		hold.qstk
string			hold.bpid(9)
domain	tcqiv1		hold.qhnd			|#214224.n

							| #  800 -  142000.sn
long			check.seqn
long			check1.trdt
long			check2.trdt
domain	tccwar		check2.cwar
domain	tcitem		check2.item
							| #  800 -  142000.en
domain	tcqiv1		dummy.receipt.qty

domain	tcyesno		var.whinr110.prnt
domain	tccwar		var.whinr110.cwar		|#214852.n

long			orig.tipcs700.pono	 	|*2043803_4.n

string			arr.whina112.trdt(1,1)	based
long			arr.whina112.seqn(1)	based
double			arr.whina112.qskt(1)	based

long			var.whinr110.valm
long			var.whinr110.koor
long			var.whinr110.kost
string			var.whinr110.orno(9)
long			var.whinr110.pono
long			var.whinr110.srnb
long			var.whinr110.seqn
double			var.whinr110.qstk
string			var.whinr110.bpid(9)
string			var.whinr110.cprj(9)
string			var.whinr110.trdt(22)
string			var.whinr110.itid(9)
long			var.whinr110.itse
double			var.whinr110.qhnd
domain	tdltc.clot	var.whinr110.clot
domain	tdltc.clot	var.whinr110.serl
string			var.whinr110.shpm(9)			|#202924.n
long			var.whinr110.shpo			|#202924.n
string			var.whinr110.rcno(9)			|#227896.sn
long			var.whinr110.rcln			|#227896.en

double			var.whina112.qskt
double			var.whina112.qstk
domain	tdltc.clot	var.whina112.clot 		|*2043803_2.n
domain	tdltc.clot	var.whina112.serl		|*2043803_2.n

double			issued
double			onhand.inventory

domain	bccost		var.whina113.cpcp
double			var.whina113.amnt(3)
double			var.whina113.mauc(3)

double			var.whina114.qstk

string			var.whina114.trdt(22)
long			var.whina114.seqn
long			var.whina114.sern

domain	bccost		var.whina115.cpcp
double			var.whina115.amnt(3)

domain	tcitem		hold.item
domain	tccwar		hold.cwar
domain	tccprj		hold.cprj

domain	tckoor		curr.koor			|#205835.n
domain	tckost		curr.kost
double			curr.quan

double			to.be.received
double			remain.quan
double			hold.negative

double			var.whwmd255.coqu

domain	tcmcs.s200m	o.mess

domain	tcmcs.s200m	errmess				|#SL204550.sn
domain	tcpono		bom.line			|#SL204550.en
domain	tcqiv1		ilc.quantity			|#2043803.n
domain	tckost		ilc.transaction.type		|#2043803.n

							|#234040.sn
static	domain	tcmcs.str215	pur.receipt.arr(1)	based
static	domain	tcpono		receipt.line.arr(1)	based

static	domain	tcbool		lengths.set
static	long	array.length
static	long	search_def(1,4)

static	domain	tcmcs.byte	orno.length, orno.pos
static	domain	tcmcs.byte	pono.length, pono.pos
static	domain	tcmcs.byte	srnb.length, srnb.pos
static	domain	tcmcs.byte	reno.length, reno.pos

static	domain	tcmcs.long	alloc.elements
static	domain	tcmcs.byte	alloc.counter
							|#234040.en
:STBL:tcmcs003,tdinv700,tipcs700,tipcs021,bcstc008,tiitm001,bcswh004,ticpr300,bcstc000,tdinv001,tipcs350,tdilc102,tdinv100,tdilc000,tdinv000,tdsls045,tdrpl100,tdltc004,tdilc301,tdilc101,tdpur045,tipcs530
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---
Source session: not present
Target session: %TSwhina1512m000


---  Migration Logic  ---

A receipt transaction in %SV results in a record in %TTwhina112.

The value of the field %TFwhina112.qskt is determined as follows:

Example:

Item = A; On_hand = 50 pcs

3 receipt transactions of each 30 pcs =  90 pcs
2 issue transactions of each 20 pcs

Now 3 whina112 transactions are created, with 3 related whina114 transactions as follows:

1. Receipt 1: received qty = 30; to be consumed qty = 0;  fully consumed
    Issue 1: issued qty = 20
    Issue 2: issued qty = 10 
2. Receipt 2: received qty = 30; to be consumed qty = 20; partially consumed
    issue 2: issued qty = 10
3. Receipt 3: received qty = 30; to be consumed qty = 30; not consumed






---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:

:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:wh
:TCMOD:ina
:TFLNO:113
:LDAT:2/21/2019 1:53:27 PM
:PRTX:START
read.parameters.common(o.mess)
read.parameter("tdinv000", o.mess)
read.parameter("tdilc000", o.mess)				|#214852.n

g.mc.depth = get.mc.depth()


hold.item = ""
hold.cwar = ""
hold.negative = 0.0
								|#800-142000.sn
check1.trdt = 0
check2.trdt = 0
check2.item = ""
check2.cwar = ""
								|#800-142000.en

itid = 0
var.whinr110.itid = ""
var.whinr110.itse = 0

|#array.len = 100			|#228714.o
array.len = 2000			|#228714.n

alloc.mem(arr.whina112.trdt, 22, array.len)
alloc.mem(arr.whina112.seqn, array.len)
alloc.mem(arr.whina112.qskt, array.len)

i = 0
table	tbcswh008

fill.pur.receipt.array()		|#234040.n

migrate tdinv700


set.mem(arr.whina112.trdt,"")
set.mem(arr.whina112.seqn,0)
set.mem(arr.whina112.qskt,0.0)

hold.cprj = ""
hold.item = ""
hold.cwar = ""							|#214852.n
								|#800-142000.sn
check1.trdt = 0
check2.trdt = 0
check2.item = ""
check2.cwar = ""
								|#800-142000.en
i = 0

var.whinr110.valm = 1						|#209255.n

								|#214852.sn
keep.cprj = ""
keep.item = ""

|#arr.len.tipcs700 = 100		|#228714.o
arr.len.tipcs700 = 2000		|#228714.n

alloc.mem(arr.tipcs700.cwar, len(keep.cwar), arr.len.tipcs700)
alloc.mem(arr.tipcs700.trdt, arr.len.tipcs700)
alloc.mem(arr.tipcs700.trtm, arr.len.tipcs700)
alloc.mem(arr.tipcs700.sern, arr.len.tipcs700)
alloc.mem(arr.tipcs700.proc, arr.len.tipcs700)

select	tipcs700.*
from	tipcs700
where	tipcs700.cprj >  ""                                                                                                     and 	 tipcs700.item >  ""
order by tipcs700._index1
selectdo
	if tipcs700.cprj <> keep.cprj or
	   tipcs700.item <> keep.item then
		keep.cprj = tipcs700.cprj
		keep.item = tipcs700.item
		fill.tipcs700.array(	keep.cprj,
					keep.item)
		repeat
			find.cwar = false
			for j = 1 to arr.len.tipcs700
				if not find.cwar then
					if isspace(arr.tipcs700.cwar(1,j)) then
						break
					else
						if arr.tipcs700.proc(j) = 0 then
							keep.cwar = arr.tipcs700.cwar(1,j)
							keep.trdt = arr.tipcs700.trdt(j)
							keep.trtm = arr.tipcs700.trtm(j)
							keep.sern = arr.tipcs700.sern(j)
							find.cwar = true
						else
							continue
						endif
					endif
				else
					if isspace(arr.tipcs700.cwar(1,j)) then
						break
					else
						if arr.tipcs700.cwar(1,j) <> keep.cwar then
							continue
						else
							keep.trdt = arr.tipcs700.trdt(j)
							keep.trtm = arr.tipcs700.trtm(j)
							keep.sern = arr.tipcs700.sern(j)
						endif
					endif
				endif

								|#214852.en
				migrate tipcs700
								|#214852.sn
				arr.tipcs700.proc(j) = 1
			endfor
		until not find.cwar
		handle.inventory.transfers.customized.items(	|#1133346.sn
							keep.cprj,
							keep.item,
							arr.len.tipcs700,
							arr.tipcs700.cwar)
								|#1133346.en
	endif
endselect

free.mem(arr.tipcs700.cwar)
free.mem(arr.tipcs700.trdt)
free.mem(arr.tipcs700.trtm)
free.mem(arr.tipcs700.sern)
free.mem(arr.tipcs700.proc)

								|#214852.en

								|#209255.sn
|* next functions are used to create receipt transactions for items that
|* do have inventory onhand, but don't have inventory transactions.
handle.inventory.without.tdinv700()
handle.inventory.without.tipcs700()
								|#209255.en

free.mem(arr.whina112.trdt)
free.mem(arr.whina112.seqn)
free.mem(arr.whina112.qskt)

free.mem.pur.receipt.array()	|#234040.n
:PRTX:END
:STAT:V
:VARI:#include "ibcswh0011"			|#CNT.n
#include "itccom0015"			|#234040.n
long	g.mc.depth

long			nr.lots				|#TELAIR_2.n
string			arr.lots(1,1)	based		|#TELAIR_2.n
domain	tdltc.clot	lot.serial			|#fp3

long			i
long			itid
long			prev.sern
long			array.len
long			hold.tdinv700.trdt
long			hold.tdinv700.trtm		|#TELAIR.sn
long			hold.tdinv700.sern
long			hold.tipcs700.trdt
long			hold.tipcs700.trtm
long			hold.tipcs700.sern		|#TELAIR.en

long			dummy.array.nr
long			receipt.counter

long			arr.len.tipcs700			|#214852.sn
domain	tccwar		arr.tipcs700.cwar(1)	based
long			arr.tipcs700.trdt(1)	based
long			arr.tipcs700.trtm(1)	based
long			arr.tipcs700.sern(1)	based
long			arr.tipcs700.proc(1)	based
long			j
long			k
domain	tcbool		find.cwar
long			found.trdt
long			found.trtm
long			found.sern
domain	tcqiv1		stock
domain	tcitem		keep.item
domain	tccprj		keep.cprj
domain	tccwar		keep.cwar	fixed
long			keep.trdt
long			keep.trtm
long			keep.sern			|#214852.en

long			hold.koor
long			hold.kost
string			hold.orno(9)
string			hold.trdt(22)
long			hold.seqn
domain	tcqiv1		hold.qstk
string			hold.bpid(9)
domain	tcqiv1		hold.qhnd			|#214224.n

							| #  800 -  142000.sn
long			check.seqn
long			check1.trdt
long			check2.trdt
domain	tccwar		check2.cwar
domain	tcitem		check2.item
							| #  800 -  142000.en
domain	tcqiv1		dummy.receipt.qty

domain	tcyesno		var.whinr110.prnt
domain	tccwar		var.whinr110.cwar		|#214852.n

long			orig.tipcs700.pono	 	|*2043803_4.n

string			arr.whina112.trdt(1,1)	based
long			arr.whina112.seqn(1)	based
double			arr.whina112.qskt(1)	based

long			var.whinr110.valm
long			var.whinr110.koor
long			var.whinr110.kost
string			var.whinr110.orno(9)
long			var.whinr110.pono
long			var.whinr110.srnb
long			var.whinr110.seqn
double			var.whinr110.qstk
string			var.whinr110.bpid(9)
string			var.whinr110.cprj(9)
string			var.whinr110.trdt(22)
string			var.whinr110.itid(9)
long			var.whinr110.itse
double			var.whinr110.qhnd
domain	tdltc.clot	var.whinr110.clot
domain	tdltc.clot	var.whinr110.serl
string			var.whinr110.shpm(9)			|#202924.n
long			var.whinr110.shpo			|#202924.n
string			var.whinr110.rcno(9)			|#227896.sn
long			var.whinr110.rcln			|#227896.en

double			var.whina112.qskt
double			var.whina112.qstk
domain	tdltc.clot	var.whina112.clot 		|*2043803_2.n
domain	tdltc.clot	var.whina112.serl		|*2043803_2.n

double			issued
double			onhand.inventory

domain	bccost		var.whina113.cpcp
double			var.whina113.amnt(3)
double			var.whina113.mauc(3)

double			var.whina114.qstk

string			var.whina114.trdt(22)
long			var.whina114.seqn
long			var.whina114.sern

domain	bccost		var.whina115.cpcp
double			var.whina115.amnt(3)

domain	tcitem		hold.item
domain	tccwar		hold.cwar
domain	tccprj		hold.cprj

domain	tckoor		curr.koor			|#205835.n
domain	tckost		curr.kost
double			curr.quan

double			to.be.received
double			remain.quan
double			hold.negative

double			var.whwmd255.coqu

domain	tcmcs.s200m	o.mess

domain	tcmcs.s200m	errmess				|#SL204550.sn
domain	tcpono		bom.line			|#SL204550.en
domain	tcqiv1		ilc.quantity			|#2043803.n
domain	tckost		ilc.transaction.type		|#2043803.n

							|#234040.sn
static	domain	tcmcs.str215	pur.receipt.arr(1)	based
static	domain	tcpono		receipt.line.arr(1)	based

static	domain	tcbool		lengths.set
static	long	array.length
static	long	search_def(1,4)

static	domain	tcmcs.byte	orno.length, orno.pos
static	domain	tcmcs.byte	pono.length, pono.pos
static	domain	tcmcs.byte	srnb.length, srnb.pos
static	domain	tcmcs.byte	reno.length, reno.pos

static	domain	tcmcs.long	alloc.elements
static	domain	tcmcs.byte	alloc.counter
							|#234040.en
:STBL:tcmcs003,tdinv700,tipcs700,tipcs021,bcstc008,tiitm001,bcswh004,ticpr300,bcstc000,tdinv001,tipcs350,tdilc102,tdinv100,tdilc000,tdinv000,tdsls045,tdrpl100,tdltc004,tdilc301,tdilc101,tdpur045,tipcs530
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---
Source session: not present
Target session: %TSwhina1513m000


---  Migration Logic  ---

For each receipt transaction, the receipt amount and MAUC is registered by cost component. These cost components are the aggregated cost components by item type/item group extended with detailed cost components.
Detailed cost components are cost components that are specified for an item and which are not equal to one of the aggregated cost components.

For the receipt amount the standard cost price is taken.


---  Migration Parameters  ---



---  Migration Mapping Tables  ---

For each item type/item group combination 3 aggregated cost components have been defined in %STbcstc010.


---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:

:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:wh
:TCMOD:ina
:TFLNO:114
:LDAT:2/21/2019 1:53:28 PM
:PRTX:START
read.parameters.common(o.mess)
read.parameter("tdinv000", o.mess)
read.parameter("tdilc000", o.mess)				|#214852.n

g.mc.depth = get.mc.depth()


hold.item = ""
hold.cwar = ""
hold.negative = 0.0
								|#800-142000.sn
check1.trdt = 0
check2.trdt = 0
check2.item = ""
check2.cwar = ""
								|#800-142000.en

itid = 0
var.whinr110.itid = ""
var.whinr110.itse = 0

|#array.len = 100			|#228714.o
array.len = 2000			|#228714.n

alloc.mem(arr.whina112.trdt, 22, array.len)
alloc.mem(arr.whina112.seqn, array.len)
alloc.mem(arr.whina112.qskt, array.len)

i = 0
table	tbcswh008

fill.pur.receipt.array()		|#234040.n

migrate tdinv700


set.mem(arr.whina112.trdt,"")
set.mem(arr.whina112.seqn,0)
set.mem(arr.whina112.qskt,0.0)

hold.cprj = ""
hold.item = ""
hold.cwar = ""							|#214852.n
								|#800-142000.sn
check1.trdt = 0
check2.trdt = 0
check2.item = ""
check2.cwar = ""
								|#800-142000.en
i = 0

var.whinr110.valm = 1						|#209255.n

								|#214852.sn
keep.cprj = ""
keep.item = ""

|#arr.len.tipcs700 = 100		|#228714.o
arr.len.tipcs700 = 2000		|#228714.n

alloc.mem(arr.tipcs700.cwar, len(keep.cwar), arr.len.tipcs700)
alloc.mem(arr.tipcs700.trdt, arr.len.tipcs700)
alloc.mem(arr.tipcs700.trtm, arr.len.tipcs700)
alloc.mem(arr.tipcs700.sern, arr.len.tipcs700)
alloc.mem(arr.tipcs700.proc, arr.len.tipcs700)

select	tipcs700.*
from	tipcs700
where	tipcs700.cprj >  ""                                                                                                     and 	 tipcs700.item >  ""
order by tipcs700._index1
selectdo
	if tipcs700.cprj <> keep.cprj or
	   tipcs700.item <> keep.item then
		keep.cprj = tipcs700.cprj
		keep.item = tipcs700.item
		fill.tipcs700.array(	keep.cprj,
					keep.item)
		repeat
			find.cwar = false
			for j = 1 to arr.len.tipcs700
				if not find.cwar then
					if isspace(arr.tipcs700.cwar(1,j)) then
						break
					else
						if arr.tipcs700.proc(j) = 0 then
							keep.cwar = arr.tipcs700.cwar(1,j)
							keep.trdt = arr.tipcs700.trdt(j)
							keep.trtm = arr.tipcs700.trtm(j)
							keep.sern = arr.tipcs700.sern(j)
							find.cwar = true
						else
							continue
						endif
					endif
				else
					if isspace(arr.tipcs700.cwar(1,j)) then
						break
					else
						if arr.tipcs700.cwar(1,j) <> keep.cwar then
							continue
						else
							keep.trdt = arr.tipcs700.trdt(j)
							keep.trtm = arr.tipcs700.trtm(j)
							keep.sern = arr.tipcs700.sern(j)
						endif
					endif
				endif

								|#214852.en
				migrate tipcs700
								|#214852.sn
				arr.tipcs700.proc(j) = 1
			endfor
		until not find.cwar
		handle.inventory.transfers.customized.items(	|#1133346.sn
							keep.cprj,
							keep.item,
							arr.len.tipcs700,
							arr.tipcs700.cwar)
								|#1133346.en
	endif
endselect

free.mem(arr.tipcs700.cwar)
free.mem(arr.tipcs700.trdt)
free.mem(arr.tipcs700.trtm)
free.mem(arr.tipcs700.sern)
free.mem(arr.tipcs700.proc)

								|#214852.en

								|#209255.sn
|* next functions are used to create receipt transactions for items that
|* do have inventory onhand, but don't have inventory transactions.
handle.inventory.without.tdinv700()
handle.inventory.without.tipcs700()
								|#209255.en

free.mem(arr.whina112.trdt)
free.mem(arr.whina112.seqn)
free.mem(arr.whina112.qskt)

free.mem.pur.receipt.array()	|#234040.n
:PRTX:END
:STAT:V
:VARI:#include "ibcswh0011"			|#CNT.n
#include "itccom0015"			|#234040.n
long	g.mc.depth

long			nr.lots				|#TELAIR_2.n
string			arr.lots(1,1)	based		|#TELAIR_2.n
domain	tdltc.clot	lot.serial			|#fp3

long			i
long			itid
long			prev.sern
long			array.len
long			hold.tdinv700.trdt
long			hold.tdinv700.trtm		|#TELAIR.sn
long			hold.tdinv700.sern
long			hold.tipcs700.trdt
long			hold.tipcs700.trtm
long			hold.tipcs700.sern		|#TELAIR.en

long			dummy.array.nr
long			receipt.counter

long			arr.len.tipcs700			|#214852.sn
domain	tccwar		arr.tipcs700.cwar(1)	based
long			arr.tipcs700.trdt(1)	based
long			arr.tipcs700.trtm(1)	based
long			arr.tipcs700.sern(1)	based
long			arr.tipcs700.proc(1)	based
long			j
long			k
domain	tcbool		find.cwar
long			found.trdt
long			found.trtm
long			found.sern
domain	tcqiv1		stock
domain	tcitem		keep.item
domain	tccprj		keep.cprj
domain	tccwar		keep.cwar	fixed
long			keep.trdt
long			keep.trtm
long			keep.sern			|#214852.en

long			hold.koor
long			hold.kost
string			hold.orno(9)
string			hold.trdt(22)
long			hold.seqn
domain	tcqiv1		hold.qstk
string			hold.bpid(9)
domain	tcqiv1		hold.qhnd			|#214224.n

							| #  800 -  142000.sn
long			check.seqn
long			check1.trdt
long			check2.trdt
domain	tccwar		check2.cwar
domain	tcitem		check2.item
							| #  800 -  142000.en
domain	tcqiv1		dummy.receipt.qty

domain	tcyesno		var.whinr110.prnt
domain	tccwar		var.whinr110.cwar		|#214852.n

long			orig.tipcs700.pono	 	|*2043803_4.n

string			arr.whina112.trdt(1,1)	based
long			arr.whina112.seqn(1)	based
double			arr.whina112.qskt(1)	based

long			var.whinr110.valm
long			var.whinr110.koor
long			var.whinr110.kost
string			var.whinr110.orno(9)
long			var.whinr110.pono
long			var.whinr110.srnb
long			var.whinr110.seqn
double			var.whinr110.qstk
string			var.whinr110.bpid(9)
string			var.whinr110.cprj(9)
string			var.whinr110.trdt(22)
string			var.whinr110.itid(9)
long			var.whinr110.itse
double			var.whinr110.qhnd
domain	tdltc.clot	var.whinr110.clot
domain	tdltc.clot	var.whinr110.serl
string			var.whinr110.shpm(9)			|#202924.n
long			var.whinr110.shpo			|#202924.n
string			var.whinr110.rcno(9)			|#227896.sn
long			var.whinr110.rcln			|#227896.en

double			var.whina112.qskt
double			var.whina112.qstk
domain	tdltc.clot	var.whina112.clot 		|*2043803_2.n
domain	tdltc.clot	var.whina112.serl		|*2043803_2.n

double			issued
double			onhand.inventory

domain	bccost		var.whina113.cpcp
double			var.whina113.amnt(3)
double			var.whina113.mauc(3)

double			var.whina114.qstk

string			var.whina114.trdt(22)
long			var.whina114.seqn
long			var.whina114.sern

domain	bccost		var.whina115.cpcp
double			var.whina115.amnt(3)

domain	tcitem		hold.item
domain	tccwar		hold.cwar
domain	tccprj		hold.cprj

domain	tckoor		curr.koor			|#205835.n
domain	tckost		curr.kost
double			curr.quan

double			to.be.received
double			remain.quan
double			hold.negative

double			var.whwmd255.coqu

domain	tcmcs.s200m	o.mess

domain	tcmcs.s200m	errmess				|#SL204550.sn
domain	tcpono		bom.line			|#SL204550.en
domain	tcqiv1		ilc.quantity			|#2043803.n
domain	tckost		ilc.transaction.type		|#2043803.n

							|#234040.sn
static	domain	tcmcs.str215	pur.receipt.arr(1)	based
static	domain	tcpono		receipt.line.arr(1)	based

static	domain	tcbool		lengths.set
static	long	array.length
static	long	search_def(1,4)

static	domain	tcmcs.byte	orno.length, orno.pos
static	domain	tcmcs.byte	pono.length, pono.pos
static	domain	tcmcs.byte	srnb.length, srnb.pos
static	domain	tcmcs.byte	reno.length, reno.pos

static	domain	tcmcs.long	alloc.elements
static	domain	tcmcs.byte	alloc.counter
							|#234040.en
:STBL:tcmcs003,tdinv700,tipcs700,tipcs021,bcstc008,tiitm001,bcswh004,ticpr300,bcstc000,tdinv001,tipcs350,tdilc102,tdinv100,tdilc000,tdinv000,tdsls045,tdrpl100,tdltc004,tdilc301,tdilc101,tdpur045,tipcs530
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---
Source session: not present
Target session: %TSwhina1514m000


---  Migration Logic  ---

An issue transaction in %SV results in one or more records in %TTwhina114.

The value of the field %TFwhina114.qstk is determined as follows:

Example:

Item = A; On_hand = 50 pcs

3 receipt transactions of each 30 pcs =  90 pcs
2 issue transactions of each 20 pcs

Now 3 whina112 transactions are created, with 3 related whina114 transactions as follows:

1. Receipt 1: received qty = 30; to be consumed qty = 0;  fully consumed
    Issue 1: issued qty = 20
    Issue 2: issued qty = 10 
2. Receipt 2: received qty = 30; to be consumed qty = 20; partially consumed
    issue 2: issued qty = 10
3. Receipt 3: received qty = 30; to be consumed qty = 30; not consumed



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:

:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:wh
:TCMOD:ina
:TFLNO:115
:LDAT:2/21/2019 1:53:28 PM
:PRTX:START
read.parameters.common(o.mess)
read.parameter("tdinv000", o.mess)
read.parameter("tdilc000", o.mess)				|#214852.n

g.mc.depth = get.mc.depth()


hold.item = ""
hold.cwar = ""
hold.negative = 0.0
								|#800-142000.sn
check1.trdt = 0
check2.trdt = 0
check2.item = ""
check2.cwar = ""
								|#800-142000.en

itid = 0
var.whinr110.itid = ""
var.whinr110.itse = 0

|#array.len = 100			|#228714.o
array.len = 2000			|#228714.n

alloc.mem(arr.whina112.trdt, 22, array.len)
alloc.mem(arr.whina112.seqn, array.len)
alloc.mem(arr.whina112.qskt, array.len)

i = 0
table	tbcswh008

fill.pur.receipt.array()		|#234040.n

migrate tdinv700


set.mem(arr.whina112.trdt,"")
set.mem(arr.whina112.seqn,0)
set.mem(arr.whina112.qskt,0.0)

hold.cprj = ""
hold.item = ""
hold.cwar = ""							|#214852.n
								|#800-142000.sn
check1.trdt = 0
check2.trdt = 0
check2.item = ""
check2.cwar = ""
								|#800-142000.en
i = 0

var.whinr110.valm = 1						|#209255.n

								|#214852.sn
keep.cprj = ""
keep.item = ""

|#arr.len.tipcs700 = 100		|#228714.o
arr.len.tipcs700 = 2000		|#228714.n

alloc.mem(arr.tipcs700.cwar, len(keep.cwar), arr.len.tipcs700)
alloc.mem(arr.tipcs700.trdt, arr.len.tipcs700)
alloc.mem(arr.tipcs700.trtm, arr.len.tipcs700)
alloc.mem(arr.tipcs700.sern, arr.len.tipcs700)
alloc.mem(arr.tipcs700.proc, arr.len.tipcs700)

select	tipcs700.*
from	tipcs700
where	tipcs700.cprj >  ""                                                                                                     and 	 tipcs700.item >  ""
order by tipcs700._index1
selectdo
	if tipcs700.cprj <> keep.cprj or
	   tipcs700.item <> keep.item then
		keep.cprj = tipcs700.cprj
		keep.item = tipcs700.item
		fill.tipcs700.array(	keep.cprj,
					keep.item)
		repeat
			find.cwar = false
			for j = 1 to arr.len.tipcs700
				if not find.cwar then
					if isspace(arr.tipcs700.cwar(1,j)) then
						break
					else
						if arr.tipcs700.proc(j) = 0 then
							keep.cwar = arr.tipcs700.cwar(1,j)
							keep.trdt = arr.tipcs700.trdt(j)
							keep.trtm = arr.tipcs700.trtm(j)
							keep.sern = arr.tipcs700.sern(j)
							find.cwar = true
						else
							continue
						endif
					endif
				else
					if isspace(arr.tipcs700.cwar(1,j)) then
						break
					else
						if arr.tipcs700.cwar(1,j) <> keep.cwar then
							continue
						else
							keep.trdt = arr.tipcs700.trdt(j)
							keep.trtm = arr.tipcs700.trtm(j)
							keep.sern = arr.tipcs700.sern(j)
						endif
					endif
				endif

								|#214852.en
				migrate tipcs700
								|#214852.sn
				arr.tipcs700.proc(j) = 1
			endfor
		until not find.cwar
		handle.inventory.transfers.customized.items(	|#1133346.sn
							keep.cprj,
							keep.item,
							arr.len.tipcs700,
							arr.tipcs700.cwar)
								|#1133346.en
	endif
endselect

free.mem(arr.tipcs700.cwar)
free.mem(arr.tipcs700.trdt)
free.mem(arr.tipcs700.trtm)
free.mem(arr.tipcs700.sern)
free.mem(arr.tipcs700.proc)

								|#214852.en

								|#209255.sn
|* next functions are used to create receipt transactions for items that
|* do have inventory onhand, but don't have inventory transactions.
handle.inventory.without.tdinv700()
handle.inventory.without.tipcs700()
								|#209255.en

free.mem(arr.whina112.trdt)
free.mem(arr.whina112.seqn)
free.mem(arr.whina112.qskt)

free.mem.pur.receipt.array()	|#234040.n
:PRTX:END
:STAT:V
:VARI:#include "ibcswh0011"			|#CNT.n
#include "itccom0015"			|#234040.n
long	g.mc.depth

long			nr.lots				|#TELAIR_2.n
string			arr.lots(1,1)	based		|#TELAIR_2.n
domain	tdltc.clot	lot.serial			|#fp3

long			i
long			itid
long			prev.sern
long			array.len
long			hold.tdinv700.trdt
long			hold.tdinv700.trtm		|#TELAIR.sn
long			hold.tdinv700.sern
long			hold.tipcs700.trdt
long			hold.tipcs700.trtm
long			hold.tipcs700.sern		|#TELAIR.en

long			dummy.array.nr
long			receipt.counter

long			arr.len.tipcs700			|#214852.sn
domain	tccwar		arr.tipcs700.cwar(1)	based
long			arr.tipcs700.trdt(1)	based
long			arr.tipcs700.trtm(1)	based
long			arr.tipcs700.sern(1)	based
long			arr.tipcs700.proc(1)	based
long			j
long			k
domain	tcbool		find.cwar
long			found.trdt
long			found.trtm
long			found.sern
domain	tcqiv1		stock
domain	tcitem		keep.item
domain	tccprj		keep.cprj
domain	tccwar		keep.cwar	fixed
long			keep.trdt
long			keep.trtm
long			keep.sern			|#214852.en

long			hold.koor
long			hold.kost
string			hold.orno(9)
string			hold.trdt(22)
long			hold.seqn
domain	tcqiv1		hold.qstk
string			hold.bpid(9)
domain	tcqiv1		hold.qhnd			|#214224.n

							| #  800 -  142000.sn
long			check.seqn
long			check1.trdt
long			check2.trdt
domain	tccwar		check2.cwar
domain	tcitem		check2.item
							| #  800 -  142000.en
domain	tcqiv1		dummy.receipt.qty

domain	tcyesno		var.whinr110.prnt
domain	tccwar		var.whinr110.cwar		|#214852.n

long			orig.tipcs700.pono	 	|*2043803_4.n

string			arr.whina112.trdt(1,1)	based
long			arr.whina112.seqn(1)	based
double			arr.whina112.qskt(1)	based

long			var.whinr110.valm
long			var.whinr110.koor
long			var.whinr110.kost
string			var.whinr110.orno(9)
long			var.whinr110.pono
long			var.whinr110.srnb
long			var.whinr110.seqn
double			var.whinr110.qstk
string			var.whinr110.bpid(9)
string			var.whinr110.cprj(9)
string			var.whinr110.trdt(22)
string			var.whinr110.itid(9)
long			var.whinr110.itse
double			var.whinr110.qhnd
domain	tdltc.clot	var.whinr110.clot
domain	tdltc.clot	var.whinr110.serl
string			var.whinr110.shpm(9)			|#202924.n
long			var.whinr110.shpo			|#202924.n
string			var.whinr110.rcno(9)			|#227896.sn
long			var.whinr110.rcln			|#227896.en

double			var.whina112.qskt
double			var.whina112.qstk
domain	tdltc.clot	var.whina112.clot 		|*2043803_2.n
domain	tdltc.clot	var.whina112.serl		|*2043803_2.n

double			issued
double			onhand.inventory

domain	bccost		var.whina113.cpcp
double			var.whina113.amnt(3)
double			var.whina113.mauc(3)

double			var.whina114.qstk

string			var.whina114.trdt(22)
long			var.whina114.seqn
long			var.whina114.sern

domain	bccost		var.whina115.cpcp
double			var.whina115.amnt(3)

domain	tcitem		hold.item
domain	tccwar		hold.cwar
domain	tccprj		hold.cprj

domain	tckoor		curr.koor			|#205835.n
domain	tckost		curr.kost
double			curr.quan

double			to.be.received
double			remain.quan
double			hold.negative

double			var.whwmd255.coqu

domain	tcmcs.s200m	o.mess

domain	tcmcs.s200m	errmess				|#SL204550.sn
domain	tcpono		bom.line			|#SL204550.en
domain	tcqiv1		ilc.quantity			|#2043803.n
domain	tckost		ilc.transaction.type		|#2043803.n

							|#234040.sn
static	domain	tcmcs.str215	pur.receipt.arr(1)	based
static	domain	tcpono		receipt.line.arr(1)	based

static	domain	tcbool		lengths.set
static	long	array.length
static	long	search_def(1,4)

static	domain	tcmcs.byte	orno.length, orno.pos
static	domain	tcmcs.byte	pono.length, pono.pos
static	domain	tcmcs.byte	srnb.length, srnb.pos
static	domain	tcmcs.byte	reno.length, reno.pos

static	domain	tcmcs.long	alloc.elements
static	domain	tcmcs.byte	alloc.counter
							|#234040.en
:STBL:tcmcs003,tdinv700,tipcs700,tipcs021,bcstc008,tiitm001,bcswh004,ticpr300,bcstc000,tdinv001,tipcs350,tdilc102,tdinv100,tdilc000,tdinv000,tdsls045,tdrpl100,tdltc004,tdilc301,tdilc101,tdpur045,tipcs530
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---
Source session: not present
Target session: %TSwhina1515m000


---  Migration Logic  ---

For each issue transaction, the issue amount is registered by cost component. These cost components are the aggregated cost components by item type/item group extended with detailed cost components.
Detailed cost components are cost components that are specified for an item and which are not equal to one of the aggregated cost components.

For the issue amount the standard cost price is taken.


---  Migration Parameters  ---



---  Migration Mapping Tables  ---

For each item type/item group combination 3 aggregated cost components have been defined in %STbcstc010.


---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:

:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:wh
:TCMOD:ina
:TFLNO:120
:LDAT:2/21/2019 1:53:29 PM
:PRTX:START
read.parameters.common(o.mess)
read.parameter("tdinv000", o.mess)
read.parameter("tdilc000", o.mess)				|#214852.n

g.mc.depth = get.mc.depth()


hold.item = ""
hold.cwar = ""
hold.negative = 0.0
								|#800-142000.sn
check1.trdt = 0
check2.trdt = 0
check2.item = ""
check2.cwar = ""
								|#800-142000.en

itid = 0
var.whinr110.itid = ""
var.whinr110.itse = 0

|#array.len = 100			|#228714.o
array.len = 2000			|#228714.n

alloc.mem(arr.whina112.trdt, 22, array.len)
alloc.mem(arr.whina112.seqn, array.len)
alloc.mem(arr.whina112.qskt, array.len)

i = 0
table	tbcswh008

fill.pur.receipt.array()		|#234040.n

migrate tdinv700


set.mem(arr.whina112.trdt,"")
set.mem(arr.whina112.seqn,0)
set.mem(arr.whina112.qskt,0.0)

hold.cprj = ""
hold.item = ""
hold.cwar = ""							|#214852.n
								|#800-142000.sn
check1.trdt = 0
check2.trdt = 0
check2.item = ""
check2.cwar = ""
								|#800-142000.en
i = 0

var.whinr110.valm = 1						|#209255.n

								|#214852.sn
keep.cprj = ""
keep.item = ""

|#arr.len.tipcs700 = 100		|#228714.o
arr.len.tipcs700 = 2000		|#228714.n

alloc.mem(arr.tipcs700.cwar, len(keep.cwar), arr.len.tipcs700)
alloc.mem(arr.tipcs700.trdt, arr.len.tipcs700)
alloc.mem(arr.tipcs700.trtm, arr.len.tipcs700)
alloc.mem(arr.tipcs700.sern, arr.len.tipcs700)
alloc.mem(arr.tipcs700.proc, arr.len.tipcs700)

select	tipcs700.*
from	tipcs700
where	tipcs700.cprj >  ""                                                                                                     and 	 tipcs700.item >  ""
order by tipcs700._index1
selectdo
	if tipcs700.cprj <> keep.cprj or
	   tipcs700.item <> keep.item then
		keep.cprj = tipcs700.cprj
		keep.item = tipcs700.item
		fill.tipcs700.array(	keep.cprj,
					keep.item)
		repeat
			find.cwar = false
			for j = 1 to arr.len.tipcs700
				if not find.cwar then
					if isspace(arr.tipcs700.cwar(1,j)) then
						break
					else
						if arr.tipcs700.proc(j) = 0 then
							keep.cwar = arr.tipcs700.cwar(1,j)
							keep.trdt = arr.tipcs700.trdt(j)
							keep.trtm = arr.tipcs700.trtm(j)
							keep.sern = arr.tipcs700.sern(j)
							find.cwar = true
						else
							continue
						endif
					endif
				else
					if isspace(arr.tipcs700.cwar(1,j)) then
						break
					else
						if arr.tipcs700.cwar(1,j) <> keep.cwar then
							continue
						else
							keep.trdt = arr.tipcs700.trdt(j)
							keep.trtm = arr.tipcs700.trtm(j)
							keep.sern = arr.tipcs700.sern(j)
						endif
					endif
				endif

								|#214852.en
				migrate tipcs700
								|#214852.sn
				arr.tipcs700.proc(j) = 1
			endfor
		until not find.cwar
		handle.inventory.transfers.customized.items(	|#1133346.sn
							keep.cprj,
							keep.item,
							arr.len.tipcs700,
							arr.tipcs700.cwar)
								|#1133346.en
	endif
endselect

free.mem(arr.tipcs700.cwar)
free.mem(arr.tipcs700.trdt)
free.mem(arr.tipcs700.trtm)
free.mem(arr.tipcs700.sern)
free.mem(arr.tipcs700.proc)

								|#214852.en

								|#209255.sn
|* next functions are used to create receipt transactions for items that
|* do have inventory onhand, but don't have inventory transactions.
handle.inventory.without.tdinv700()
handle.inventory.without.tipcs700()
								|#209255.en

free.mem(arr.whina112.trdt)
free.mem(arr.whina112.seqn)
free.mem(arr.whina112.qskt)

free.mem.pur.receipt.array()	|#234040.n
:PRTX:END
:STAT:V
:VARI:#include "ibcswh0011"			|#CNT.n
#include "itccom0015"			|#234040.n
long	g.mc.depth

long			nr.lots				|#TELAIR_2.n
string			arr.lots(1,1)	based		|#TELAIR_2.n
domain	tdltc.clot	lot.serial			|#fp3

long			i
long			itid
long			prev.sern
long			array.len
long			hold.tdinv700.trdt
long			hold.tdinv700.trtm		|#TELAIR.sn
long			hold.tdinv700.sern
long			hold.tipcs700.trdt
long			hold.tipcs700.trtm
long			hold.tipcs700.sern		|#TELAIR.en

long			dummy.array.nr
long			receipt.counter

long			arr.len.tipcs700			|#214852.sn
domain	tccwar		arr.tipcs700.cwar(1)	based
long			arr.tipcs700.trdt(1)	based
long			arr.tipcs700.trtm(1)	based
long			arr.tipcs700.sern(1)	based
long			arr.tipcs700.proc(1)	based
long			j
long			k
domain	tcbool		find.cwar
long			found.trdt
long			found.trtm
long			found.sern
domain	tcqiv1		stock
domain	tcitem		keep.item
domain	tccprj		keep.cprj
domain	tccwar		keep.cwar	fixed
long			keep.trdt
long			keep.trtm
long			keep.sern			|#214852.en

long			hold.koor
long			hold.kost
string			hold.orno(9)
string			hold.trdt(22)
long			hold.seqn
domain	tcqiv1		hold.qstk
string			hold.bpid(9)
domain	tcqiv1		hold.qhnd			|#214224.n

							| #  800 -  142000.sn
long			check.seqn
long			check1.trdt
long			check2.trdt
domain	tccwar		check2.cwar
domain	tcitem		check2.item
							| #  800 -  142000.en
domain	tcqiv1		dummy.receipt.qty

domain	tcyesno		var.whinr110.prnt
domain	tccwar		var.whinr110.cwar		|#214852.n

long			orig.tipcs700.pono	 	|*2043803_4.n

string			arr.whina112.trdt(1,1)	based
long			arr.whina112.seqn(1)	based
double			arr.whina112.qskt(1)	based

long			var.whinr110.valm
long			var.whinr110.koor
long			var.whinr110.kost
string			var.whinr110.orno(9)
long			var.whinr110.pono
long			var.whinr110.srnb
long			var.whinr110.seqn
double			var.whinr110.qstk
string			var.whinr110.bpid(9)
string			var.whinr110.cprj(9)
string			var.whinr110.trdt(22)
string			var.whinr110.itid(9)
long			var.whinr110.itse
double			var.whinr110.qhnd
domain	tdltc.clot	var.whinr110.clot
domain	tdltc.clot	var.whinr110.serl
string			var.whinr110.shpm(9)			|#202924.n
long			var.whinr110.shpo			|#202924.n
string			var.whinr110.rcno(9)			|#227896.sn
long			var.whinr110.rcln			|#227896.en

double			var.whina112.qskt
double			var.whina112.qstk
domain	tdltc.clot	var.whina112.clot 		|*2043803_2.n
domain	tdltc.clot	var.whina112.serl		|*2043803_2.n

double			issued
double			onhand.inventory

domain	bccost		var.whina113.cpcp
double			var.whina113.amnt(3)
double			var.whina113.mauc(3)

double			var.whina114.qstk

string			var.whina114.trdt(22)
long			var.whina114.seqn
long			var.whina114.sern

domain	bccost		var.whina115.cpcp
double			var.whina115.amnt(3)

domain	tcitem		hold.item
domain	tccwar		hold.cwar
domain	tccprj		hold.cprj

domain	tckoor		curr.koor			|#205835.n
domain	tckost		curr.kost
double			curr.quan

double			to.be.received
double			remain.quan
double			hold.negative

double			var.whwmd255.coqu

domain	tcmcs.s200m	o.mess

domain	tcmcs.s200m	errmess				|#SL204550.sn
domain	tcpono		bom.line			|#SL204550.en
domain	tcqiv1		ilc.quantity			|#2043803.n
domain	tckost		ilc.transaction.type		|#2043803.n

							|#234040.sn
static	domain	tcmcs.str215	pur.receipt.arr(1)	based
static	domain	tcpono		receipt.line.arr(1)	based

static	domain	tcbool		lengths.set
static	long	array.length
static	long	search_def(1,4)

static	domain	tcmcs.byte	orno.length, orno.pos
static	domain	tcmcs.byte	pono.length, pono.pos
static	domain	tcmcs.byte	srnb.length, srnb.pos
static	domain	tcmcs.byte	reno.length, reno.pos

static	domain	tcmcs.long	alloc.elements
static	domain	tcmcs.byte	alloc.counter
							|#234040.en
:STBL:tcmcs003,tdinv700,tipcs700,tipcs021,bcstc008,tiitm001,bcswh004,ticpr300,bcstc000,tdinv001,tipcs350,tdilc102,tdinv100,tdilc000,tdinv000,tdsls045,tdrpl100,tdltc004,tdilc301,tdilc101,tdpur045,tipcs530
:COMT:START

:COMT:END
:TEXT:

:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:wh
:TCMOD:ina
:TFLNO:121
:LDAT:2/21/2019 1:53:29 PM
:PRTX:START
read.parameters.common(o.mess)
read.parameter("tdinv000", o.mess)
read.parameter("tdilc000", o.mess)				|#214852.n

g.mc.depth = get.mc.depth()


hold.item = ""
hold.cwar = ""
hold.negative = 0.0
								|#800-142000.sn
check1.trdt = 0
check2.trdt = 0
check2.item = ""
check2.cwar = ""
								|#800-142000.en

itid = 0
var.whinr110.itid = ""
var.whinr110.itse = 0

|#array.len = 100			|#228714.o
array.len = 2000			|#228714.n

alloc.mem(arr.whina112.trdt, 22, array.len)
alloc.mem(arr.whina112.seqn, array.len)
alloc.mem(arr.whina112.qskt, array.len)

i = 0
table	tbcswh008

fill.pur.receipt.array()		|#234040.n

migrate tdinv700


set.mem(arr.whina112.trdt,"")
set.mem(arr.whina112.seqn,0)
set.mem(arr.whina112.qskt,0.0)

hold.cprj = ""
hold.item = ""
hold.cwar = ""							|#214852.n
								|#800-142000.sn
check1.trdt = 0
check2.trdt = 0
check2.item = ""
check2.cwar = ""
								|#800-142000.en
i = 0

var.whinr110.valm = 1						|#209255.n

								|#214852.sn
keep.cprj = ""
keep.item = ""

|#arr.len.tipcs700 = 100		|#228714.o
arr.len.tipcs700 = 2000		|#228714.n

alloc.mem(arr.tipcs700.cwar, len(keep.cwar), arr.len.tipcs700)
alloc.mem(arr.tipcs700.trdt, arr.len.tipcs700)
alloc.mem(arr.tipcs700.trtm, arr.len.tipcs700)
alloc.mem(arr.tipcs700.sern, arr.len.tipcs700)
alloc.mem(arr.tipcs700.proc, arr.len.tipcs700)

select	tipcs700.*
from	tipcs700
where	tipcs700.cprj >  ""                                                                                                     and 	 tipcs700.item >  ""
order by tipcs700._index1
selectdo
	if tipcs700.cprj <> keep.cprj or
	   tipcs700.item <> keep.item then
		keep.cprj = tipcs700.cprj
		keep.item = tipcs700.item
		fill.tipcs700.array(	keep.cprj,
					keep.item)
		repeat
			find.cwar = false
			for j = 1 to arr.len.tipcs700
				if not find.cwar then
					if isspace(arr.tipcs700.cwar(1,j)) then
						break
					else
						if arr.tipcs700.proc(j) = 0 then
							keep.cwar = arr.tipcs700.cwar(1,j)
							keep.trdt = arr.tipcs700.trdt(j)
							keep.trtm = arr.tipcs700.trtm(j)
							keep.sern = arr.tipcs700.sern(j)
							find.cwar = true
						else
							continue
						endif
					endif
				else
					if isspace(arr.tipcs700.cwar(1,j)) then
						break
					else
						if arr.tipcs700.cwar(1,j) <> keep.cwar then
							continue
						else
							keep.trdt = arr.tipcs700.trdt(j)
							keep.trtm = arr.tipcs700.trtm(j)
							keep.sern = arr.tipcs700.sern(j)
						endif
					endif
				endif

								|#214852.en
				migrate tipcs700
								|#214852.sn
				arr.tipcs700.proc(j) = 1
			endfor
		until not find.cwar
		handle.inventory.transfers.customized.items(	|#1133346.sn
							keep.cprj,
							keep.item,
							arr.len.tipcs700,
							arr.tipcs700.cwar)
								|#1133346.en
	endif
endselect

free.mem(arr.tipcs700.cwar)
free.mem(arr.tipcs700.trdt)
free.mem(arr.tipcs700.trtm)
free.mem(arr.tipcs700.sern)
free.mem(arr.tipcs700.proc)

								|#214852.en

								|#209255.sn
|* next functions are used to create receipt transactions for items that
|* do have inventory onhand, but don't have inventory transactions.
handle.inventory.without.tdinv700()
handle.inventory.without.tipcs700()
								|#209255.en

free.mem(arr.whina112.trdt)
free.mem(arr.whina112.seqn)
free.mem(arr.whina112.qskt)

free.mem.pur.receipt.array()	|#234040.n
:PRTX:END
:STAT:V
:VARI:#include "ibcswh0011"			|#CNT.n
#include "itccom0015"			|#234040.n
long	g.mc.depth

long			nr.lots				|#TELAIR_2.n
string			arr.lots(1,1)	based		|#TELAIR_2.n
domain	tdltc.clot	lot.serial			|#fp3

long			i
long			itid
long			prev.sern
long			array.len
long			hold.tdinv700.trdt
long			hold.tdinv700.trtm		|#TELAIR.sn
long			hold.tdinv700.sern
long			hold.tipcs700.trdt
long			hold.tipcs700.trtm
long			hold.tipcs700.sern		|#TELAIR.en

long			dummy.array.nr
long			receipt.counter

long			arr.len.tipcs700			|#214852.sn
domain	tccwar		arr.tipcs700.cwar(1)	based
long			arr.tipcs700.trdt(1)	based
long			arr.tipcs700.trtm(1)	based
long			arr.tipcs700.sern(1)	based
long			arr.tipcs700.proc(1)	based
long			j
long			k
domain	tcbool		find.cwar
long			found.trdt
long			found.trtm
long			found.sern
domain	tcqiv1		stock
domain	tcitem		keep.item
domain	tccprj		keep.cprj
domain	tccwar		keep.cwar	fixed
long			keep.trdt
long			keep.trtm
long			keep.sern			|#214852.en

long			hold.koor
long			hold.kost
string			hold.orno(9)
string			hold.trdt(22)
long			hold.seqn
domain	tcqiv1		hold.qstk
string			hold.bpid(9)
domain	tcqiv1		hold.qhnd			|#214224.n

							| #  800 -  142000.sn
long			check.seqn
long			check1.trdt
long			check2.trdt
domain	tccwar		check2.cwar
domain	tcitem		check2.item
							| #  800 -  142000.en
domain	tcqiv1		dummy.receipt.qty

domain	tcyesno		var.whinr110.prnt
domain	tccwar		var.whinr110.cwar		|#214852.n

long			orig.tipcs700.pono	 	|*2043803_4.n

string			arr.whina112.trdt(1,1)	based
long			arr.whina112.seqn(1)	based
double			arr.whina112.qskt(1)	based

long			var.whinr110.valm
long			var.whinr110.koor
long			var.whinr110.kost
string			var.whinr110.orno(9)
long			var.whinr110.pono
long			var.whinr110.srnb
long			var.whinr110.seqn
double			var.whinr110.qstk
string			var.whinr110.bpid(9)
string			var.whinr110.cprj(9)
string			var.whinr110.trdt(22)
string			var.whinr110.itid(9)
long			var.whinr110.itse
double			var.whinr110.qhnd
domain	tdltc.clot	var.whinr110.clot
domain	tdltc.clot	var.whinr110.serl
string			var.whinr110.shpm(9)			|#202924.n
long			var.whinr110.shpo			|#202924.n
string			var.whinr110.rcno(9)			|#227896.sn
long			var.whinr110.rcln			|#227896.en

double			var.whina112.qskt
double			var.whina112.qstk
domain	tdltc.clot	var.whina112.clot 		|*2043803_2.n
domain	tdltc.clot	var.whina112.serl		|*2043803_2.n

double			issued
double			onhand.inventory

domain	bccost		var.whina113.cpcp
double			var.whina113.amnt(3)
double			var.whina113.mauc(3)

double			var.whina114.qstk

string			var.whina114.trdt(22)
long			var.whina114.seqn
long			var.whina114.sern

domain	bccost		var.whina115.cpcp
double			var.whina115.amnt(3)

domain	tcitem		hold.item
domain	tccwar		hold.cwar
domain	tccprj		hold.cprj

domain	tckoor		curr.koor			|#205835.n
domain	tckost		curr.kost
double			curr.quan

double			to.be.received
double			remain.quan
double			hold.negative

double			var.whwmd255.coqu

domain	tcmcs.s200m	o.mess

domain	tcmcs.s200m	errmess				|#SL204550.sn
domain	tcpono		bom.line			|#SL204550.en
domain	tcqiv1		ilc.quantity			|#2043803.n
domain	tckost		ilc.transaction.type		|#2043803.n

							|#234040.sn
static	domain	tcmcs.str215	pur.receipt.arr(1)	based
static	domain	tcpono		receipt.line.arr(1)	based

static	domain	tcbool		lengths.set
static	long	array.length
static	long	search_def(1,4)

static	domain	tcmcs.byte	orno.length, orno.pos
static	domain	tcmcs.byte	pono.length, pono.pos
static	domain	tcmcs.byte	srnb.length, srnb.pos
static	domain	tcmcs.byte	reno.length, reno.pos

static	domain	tcmcs.long	alloc.elements
static	domain	tcmcs.byte	alloc.counter
							|#234040.en
:STBL:tcmcs003,tdinv700,tipcs700,tipcs021,bcstc008,tiitm001,bcswh004,ticpr300,bcstc000,tdinv001,tipcs350,tdilc102,tdinv100,tdilc000,tdinv000,tdsls045,tdrpl100,tdltc004,tdilc301,tdilc101,tdpur045,tipcs530
:COMT:START

:COMT:END
:TEXT:

:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:wh
:TCMOD:inr
:TFLNO:110
:LDAT:2/21/2019 1:53:31 PM
:PRTX:START
read.parameters.common(o.mess)
read.parameter("tdinv000", o.mess)
read.parameter("tdilc000", o.mess)				|#214852.n

g.mc.depth = get.mc.depth()


hold.item = ""
hold.cwar = ""
hold.negative = 0.0
								|#800-142000.sn
check1.trdt = 0
check2.trdt = 0
check2.item = ""
check2.cwar = ""
								|#800-142000.en

itid = 0
var.whinr110.itid = ""
var.whinr110.itse = 0

|#array.len = 100			|#228714.o
array.len = 2000			|#228714.n

alloc.mem(arr.whina112.trdt, 22, array.len)
alloc.mem(arr.whina112.seqn, array.len)
alloc.mem(arr.whina112.qskt, array.len)

i = 0
table	tbcswh008

fill.pur.receipt.array()		|#234040.n

migrate tdinv700


set.mem(arr.whina112.trdt,"")
set.mem(arr.whina112.seqn,0)
set.mem(arr.whina112.qskt,0.0)

hold.cprj = ""
hold.item = ""
hold.cwar = ""							|#214852.n
								|#800-142000.sn
check1.trdt = 0
check2.trdt = 0
check2.item = ""
check2.cwar = ""
								|#800-142000.en
i = 0

var.whinr110.valm = 1						|#209255.n

								|#214852.sn
keep.cprj = ""
keep.item = ""

|#arr.len.tipcs700 = 100		|#228714.o
arr.len.tipcs700 = 2000		|#228714.n

alloc.mem(arr.tipcs700.cwar, len(keep.cwar), arr.len.tipcs700)
alloc.mem(arr.tipcs700.trdt, arr.len.tipcs700)
alloc.mem(arr.tipcs700.trtm, arr.len.tipcs700)
alloc.mem(arr.tipcs700.sern, arr.len.tipcs700)
alloc.mem(arr.tipcs700.proc, arr.len.tipcs700)

select	tipcs700.*
from	tipcs700
where	tipcs700.cprj >  ""                                                                                                     and 	 tipcs700.item >  ""
order by tipcs700._index1
selectdo
	if tipcs700.cprj <> keep.cprj or
	   tipcs700.item <> keep.item then
		keep.cprj = tipcs700.cprj
		keep.item = tipcs700.item
		fill.tipcs700.array(	keep.cprj,
					keep.item)
		repeat
			find.cwar = false
			for j = 1 to arr.len.tipcs700
				if not find.cwar then
					if isspace(arr.tipcs700.cwar(1,j)) then
						break
					else
						if arr.tipcs700.proc(j) = 0 then
							keep.cwar = arr.tipcs700.cwar(1,j)
							keep.trdt = arr.tipcs700.trdt(j)
							keep.trtm = arr.tipcs700.trtm(j)
							keep.sern = arr.tipcs700.sern(j)
							find.cwar = true
						else
							continue
						endif
					endif
				else
					if isspace(arr.tipcs700.cwar(1,j)) then
						break
					else
						if arr.tipcs700.cwar(1,j) <> keep.cwar then
							continue
						else
							keep.trdt = arr.tipcs700.trdt(j)
							keep.trtm = arr.tipcs700.trtm(j)
							keep.sern = arr.tipcs700.sern(j)
						endif
					endif
				endif

								|#214852.en
				migrate tipcs700
								|#214852.sn
				arr.tipcs700.proc(j) = 1
			endfor
		until not find.cwar
		handle.inventory.transfers.customized.items(	|#1133346.sn
							keep.cprj,
							keep.item,
							arr.len.tipcs700,
							arr.tipcs700.cwar)
								|#1133346.en
	endif
endselect

free.mem(arr.tipcs700.cwar)
free.mem(arr.tipcs700.trdt)
free.mem(arr.tipcs700.trtm)
free.mem(arr.tipcs700.sern)
free.mem(arr.tipcs700.proc)

								|#214852.en

								|#209255.sn
|* next functions are used to create receipt transactions for items that
|* do have inventory onhand, but don't have inventory transactions.
handle.inventory.without.tdinv700()
handle.inventory.without.tipcs700()
								|#209255.en

free.mem(arr.whina112.trdt)
free.mem(arr.whina112.seqn)
free.mem(arr.whina112.qskt)

free.mem.pur.receipt.array()	|#234040.n
:PRTX:END
:STAT:V
:VARI:#include "ibcswh0011"			|#CNT.n
#include "itccom0015"			|#234040.n
long	g.mc.depth

long			nr.lots				|#TELAIR_2.n
string			arr.lots(1,1)	based		|#TELAIR_2.n
domain	tdltc.clot	lot.serial			|#fp3

long			i
long			itid
long			prev.sern
long			array.len
long			hold.tdinv700.trdt
long			hold.tdinv700.trtm		|#TELAIR.sn
long			hold.tdinv700.sern
long			hold.tipcs700.trdt
long			hold.tipcs700.trtm
long			hold.tipcs700.sern		|#TELAIR.en

long			dummy.array.nr
long			receipt.counter

long			arr.len.tipcs700			|#214852.sn
domain	tccwar		arr.tipcs700.cwar(1)	based
long			arr.tipcs700.trdt(1)	based
long			arr.tipcs700.trtm(1)	based
long			arr.tipcs700.sern(1)	based
long			arr.tipcs700.proc(1)	based
long			j
long			k
domain	tcbool		find.cwar
long			found.trdt
long			found.trtm
long			found.sern
domain	tcqiv1		stock
domain	tcitem		keep.item
domain	tccprj		keep.cprj
domain	tccwar		keep.cwar	fixed
long			keep.trdt
long			keep.trtm
long			keep.sern			|#214852.en

long			hold.koor
long			hold.kost
string			hold.orno(9)
string			hold.trdt(22)
long			hold.seqn
domain	tcqiv1		hold.qstk
string			hold.bpid(9)
domain	tcqiv1		hold.qhnd			|#214224.n

							| #  800 -  142000.sn
long			check.seqn
long			check1.trdt
long			check2.trdt
domain	tccwar		check2.cwar
domain	tcitem		check2.item
							| #  800 -  142000.en
domain	tcqiv1		dummy.receipt.qty

domain	tcyesno		var.whinr110.prnt
domain	tccwar		var.whinr110.cwar		|#214852.n

long			orig.tipcs700.pono	 	|*2043803_4.n

string			arr.whina112.trdt(1,1)	based
long			arr.whina112.seqn(1)	based
double			arr.whina112.qskt(1)	based

long			var.whinr110.valm
long			var.whinr110.koor
long			var.whinr110.kost
string			var.whinr110.orno(9)
long			var.whinr110.pono
long			var.whinr110.srnb
long			var.whinr110.seqn
double			var.whinr110.qstk
string			var.whinr110.bpid(9)
string			var.whinr110.cprj(9)
string			var.whinr110.trdt(22)
string			var.whinr110.itid(9)
long			var.whinr110.itse
double			var.whinr110.qhnd
domain	tdltc.clot	var.whinr110.clot
domain	tdltc.clot	var.whinr110.serl
string			var.whinr110.shpm(9)			|#202924.n
long			var.whinr110.shpo			|#202924.n
string			var.whinr110.rcno(9)			|#227896.sn
long			var.whinr110.rcln			|#227896.en

double			var.whina112.qskt
double			var.whina112.qstk
domain	tdltc.clot	var.whina112.clot 		|*2043803_2.n
domain	tdltc.clot	var.whina112.serl		|*2043803_2.n

double			issued
double			onhand.inventory

domain	bccost		var.whina113.cpcp
double			var.whina113.amnt(3)
double			var.whina113.mauc(3)

double			var.whina114.qstk

string			var.whina114.trdt(22)
long			var.whina114.seqn
long			var.whina114.sern

domain	bccost		var.whina115.cpcp
double			var.whina115.amnt(3)

domain	tcitem		hold.item
domain	tccwar		hold.cwar
domain	tccprj		hold.cprj

domain	tckoor		curr.koor			|#205835.n
domain	tckost		curr.kost
double			curr.quan

double			to.be.received
double			remain.quan
double			hold.negative

double			var.whwmd255.coqu

domain	tcmcs.s200m	o.mess

domain	tcmcs.s200m	errmess				|#SL204550.sn
domain	tcpono		bom.line			|#SL204550.en
domain	tcqiv1		ilc.quantity			|#2043803.n
domain	tckost		ilc.transaction.type		|#2043803.n

							|#234040.sn
static	domain	tcmcs.str215	pur.receipt.arr(1)	based
static	domain	tcpono		receipt.line.arr(1)	based

static	domain	tcbool		lengths.set
static	long	array.length
static	long	search_def(1,4)

static	domain	tcmcs.byte	orno.length, orno.pos
static	domain	tcmcs.byte	pono.length, pono.pos
static	domain	tcmcs.byte	srnb.length, srnb.pos
static	domain	tcmcs.byte	reno.length, reno.pos

static	domain	tcmcs.long	alloc.elements
static	domain	tcmcs.byte	alloc.counter
							|#234040.en
:STBL:tcmcs003,tdinv700,tipcs700,tipcs021,bcstc008,tiitm001,bcswh004,ticpr300,bcstc000,tdinv001,tipcs350,tdilc102,tdinv100,tdilc000,tdinv000,tdsls045,tdrpl100,tdltc004,tdilc301,tdilc101,tdpur045,tipcs530
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---
Source session: %SStdinv7510m000
Source session: %SStipcs7510m000
Target session: %TSwhinr1510m000


---  Migration Logic  ---

Each source record results in a whinr110 record, and a related whina112 (receipt transaction) or whina114 (issue transaction) record.
Each newly created whina112 or whina114 record has a number of related whina113 (whina112) or whina115 (whina114) records. The number is equal to the number of cost components specified for the item.


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:

:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:wh
:TCMOD:ltc
:TFLNO:100
:LDAT:12/10/2017 12:13:49 PM
:PRTX:START
select 	 tdilc000.iilc, tdilc000.take
from 	 tdilc000 
as set with 1 rows
selectdo 
endselect

migrate tdltc001
:PRTX:END
:STAT:V
:VARI:#include	"ibcswh0011"		|#CNT.n

long			g.mc.depth	|#CNT.n
long			i		|#CNT.n

domain	bccnv.item	var.mwhltc100.item
	string		var.mwhltc100.orno(9)
domain	bcckon		kind.of.number

domain	tcmcs.s200m	errmess
domain	tccwar		hold.cwar
domain	tcdate		hold.trdt	|#1160966.n
|domain	tccprj		project.code	|#217168.o
domain	bcstc.nprj	project.code	|#217168.n
domain	tcdate		lot.date
domain	tcdate		inventory.date
domain	tcqiv1		location.allocated.quantity

domain	bccom.bpid	var.whltc100.bfbp
domain	tiedm.revi	var.whltc100.revi
string			var.whltc100.ldat(22)
string			var.whltc500.lsid(22)
domain	tcdate		last.inspection.date

domain	bccost		var.whltc101.cpcp
domain	tccopr		var.whltc101.pric(3)
domain	bccost		material.component
domain	bccost		operation.component
domain	bccost		surcharge.component
domain	bccost		detail.cost.component

domain	tccwar		var.whltc105.cwar
domain	tcqiv1		var.whltc105.qhnd
domain	tcqiv1		var.whltc105.qblk
domain	tcqiv1		var.whltc105.qall
domain	tcqiv1		var.whltc105.qord
domain	tcqiv1		var.whltc105.qlal
domain	tcdate		var.whltc105.trdt
domain	tcyesno		var.whltc105.ball
domain	tcyesno		var.whltc105.binb
domain	tcyesno		var.whltc105.bout
domain	tcyesno		var.whltc105.btri
domain	tcyesno		var.whltc105.btrr

string			var.whltc500.idat(22)	
long			var.whltc500.owns		|#1858553.n
domain	bccom.bpid	var.whltc500.bpid
domain	tcqiv1		var.whltc500.qhnd
domain	tcqiv1		var.whltc500.qblk
domain	tcqiv1		var.whltc500.qall
domain	tcqiv1		var.whltc500.qord
domain	tcqiv1		var.whltc500.qlal
domain	tcyesno		var.whltc500.ball
domain	tcyesno		var.whltc500.bout
domain	tcyesno		var.whltc500.btri
domain	tiedm.revi	var.whltc500.revi
domain	tccwar		var.whltc500.cwar		|#245164.sn			
domain	tdilc.loca	var.whltc500.loca		|#245164.en

	
domain	tcamnt		material.component.price(3)
domain	tcamnt		operation.component.price(3)
domain	tcamnt		surcharge.component.price(3)
long			result

domain	tcqst1		process.blocked
domain	tcqst1		manual.blocked
:STBL:bcstc000,bcstc006,bcstc008,bcstc010,bcsti007,bcsti008,tdltc001,tdilc101,tdltc004,tdilc001,tdilc009,tdilc104,tdilc111,tdltc003,tdilc000,tiedm100,tdilc401,tiitm001,tipcs021
:COMT:START
---  Changes in table design  ---

%GTtdltc0000
%GTticpr0000

---  Source and Target Sessions  ---

Source session: %SStdltc0101m000
Target session: %TSwhltc1511m000


---  Migration Logic  ---

All records from the table %STtdltc001 will be migrated to the table %TTwhltc100 if one of the following conditions is met:
- record in %STtdltc001 contains a normal item (%SFtdltc001.cprj is empty) and field %SFtiitm001.kltc in the table %STtiitm001 has a value Batch or
- record in %STtdltc001 contains a customized item (%SFtdltc001.cprj is not empty) and field %SFtipcs021.kltc in the table %STtipcs021 has a value Batch.

If the item is Lot Priced, a record will be created for each lot in table %TTwhltc111 having an empty enterprise unit.


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:wh
:TCMOD:ltc
:TFLNO:101
:LDAT:12/10/2017 12:13:49 PM
:PRTX:START
select 	 tdilc000.iilc, tdilc000.take
from 	 tdilc000 
as set with 1 rows
selectdo 
endselect

migrate tdltc001
:PRTX:END
:STAT:V
:VARI:#include	"ibcswh0011"		|#CNT.n

long			g.mc.depth	|#CNT.n
long			i		|#CNT.n

domain	bccnv.item	var.mwhltc100.item
	string		var.mwhltc100.orno(9)
domain	bcckon		kind.of.number

domain	tcmcs.s200m	errmess
domain	tccwar		hold.cwar
domain	tcdate		hold.trdt	|#1160966.n
|domain	tccprj		project.code	|#217168.o
domain	bcstc.nprj	project.code	|#217168.n
domain	tcdate		lot.date
domain	tcdate		inventory.date
domain	tcqiv1		location.allocated.quantity

domain	bccom.bpid	var.whltc100.bfbp
domain	tiedm.revi	var.whltc100.revi
string			var.whltc100.ldat(22)
string			var.whltc500.lsid(22)
domain	tcdate		last.inspection.date

domain	bccost		var.whltc101.cpcp
domain	tccopr		var.whltc101.pric(3)
domain	bccost		material.component
domain	bccost		operation.component
domain	bccost		surcharge.component
domain	bccost		detail.cost.component

domain	tccwar		var.whltc105.cwar
domain	tcqiv1		var.whltc105.qhnd
domain	tcqiv1		var.whltc105.qblk
domain	tcqiv1		var.whltc105.qall
domain	tcqiv1		var.whltc105.qord
domain	tcqiv1		var.whltc105.qlal
domain	tcdate		var.whltc105.trdt
domain	tcyesno		var.whltc105.ball
domain	tcyesno		var.whltc105.binb
domain	tcyesno		var.whltc105.bout
domain	tcyesno		var.whltc105.btri
domain	tcyesno		var.whltc105.btrr

string			var.whltc500.idat(22)	
long			var.whltc500.owns		|#1858553.n
domain	bccom.bpid	var.whltc500.bpid
domain	tcqiv1		var.whltc500.qhnd
domain	tcqiv1		var.whltc500.qblk
domain	tcqiv1		var.whltc500.qall
domain	tcqiv1		var.whltc500.qord
domain	tcqiv1		var.whltc500.qlal
domain	tcyesno		var.whltc500.ball
domain	tcyesno		var.whltc500.bout
domain	tcyesno		var.whltc500.btri
domain	tiedm.revi	var.whltc500.revi
domain	tccwar		var.whltc500.cwar		|#245164.sn			
domain	tdilc.loca	var.whltc500.loca		|#245164.en

	
domain	tcamnt		material.component.price(3)
domain	tcamnt		operation.component.price(3)
domain	tcamnt		surcharge.component.price(3)
long			result

domain	tcqst1		process.blocked
domain	tcqst1		manual.blocked
:STBL:bcstc000,bcstc006,bcstc008,bcstc010,bcsti007,bcsti008,tdltc001,tdilc101,tdltc004,tdilc001,tdilc009,tdilc104,tdilc111,tdltc003,tdilc000,tiedm100,tdilc401,tiitm001,tipcs021
:COMT:START
---  Changes in table design  ---

%GTtdltc0000
%GTticpr0000

---  Source and Target Sessions  ---

Source session: %SStdltc0101m000
Target session: %TSwhltc1511m000


---  Migration Logic  ---

All records from the table %STtdltc001 will be migrated to the table %TTwhltc100 if one of the following conditions is met:
- record in %STtdltc001 contains a normal item (%SFtdltc001.cprj is empty) and field %SFtiitm001.kltc in the table %STtiitm001 has a value Batch or
- record in %STtdltc001 contains a customized item (%SFtdltc001.cprj is not empty) and field %SFtipcs021.kltc in the table %STtipcs021 has a value Batch.

If the item is Lot Priced, a record will be created for each lot in table %TTwhltc111 having an empty enterprise unit.


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:wh
:TCMOD:ltc
:TFLNO:105
:LDAT:12/10/2017 12:13:50 PM
:PRTX:START
select 	 tdilc000.iilc, tdilc000.take
from 	 tdilc000 
as set with 1 rows
selectdo 
endselect

migrate tdltc001
:PRTX:END
:STAT:V
:VARI:#include	"ibcswh0011"		|#CNT.n

long			g.mc.depth	|#CNT.n
long			i		|#CNT.n

domain	bccnv.item	var.mwhltc100.item
	string		var.mwhltc100.orno(9)
domain	bcckon		kind.of.number

domain	tcmcs.s200m	errmess
domain	tccwar		hold.cwar
domain	tcdate		hold.trdt	|#1160966.n
|domain	tccprj		project.code	|#217168.o
domain	bcstc.nprj	project.code	|#217168.n
domain	tcdate		lot.date
domain	tcdate		inventory.date
domain	tcqiv1		location.allocated.quantity

domain	bccom.bpid	var.whltc100.bfbp
domain	tiedm.revi	var.whltc100.revi
string			var.whltc100.ldat(22)
string			var.whltc500.lsid(22)
domain	tcdate		last.inspection.date

domain	bccost		var.whltc101.cpcp
domain	tccopr		var.whltc101.pric(3)
domain	bccost		material.component
domain	bccost		operation.component
domain	bccost		surcharge.component
domain	bccost		detail.cost.component

domain	tccwar		var.whltc105.cwar
domain	tcqiv1		var.whltc105.qhnd
domain	tcqiv1		var.whltc105.qblk
domain	tcqiv1		var.whltc105.qall
domain	tcqiv1		var.whltc105.qord
domain	tcqiv1		var.whltc105.qlal
domain	tcdate		var.whltc105.trdt
domain	tcyesno		var.whltc105.ball
domain	tcyesno		var.whltc105.binb
domain	tcyesno		var.whltc105.bout
domain	tcyesno		var.whltc105.btri
domain	tcyesno		var.whltc105.btrr

string			var.whltc500.idat(22)	
long			var.whltc500.owns		|#1858553.n
domain	bccom.bpid	var.whltc500.bpid
domain	tcqiv1		var.whltc500.qhnd
domain	tcqiv1		var.whltc500.qblk
domain	tcqiv1		var.whltc500.qall
domain	tcqiv1		var.whltc500.qord
domain	tcqiv1		var.whltc500.qlal
domain	tcyesno		var.whltc500.ball
domain	tcyesno		var.whltc500.bout
domain	tcyesno		var.whltc500.btri
domain	tiedm.revi	var.whltc500.revi
domain	tccwar		var.whltc500.cwar		|#245164.sn			
domain	tdilc.loca	var.whltc500.loca		|#245164.en

	
domain	tcamnt		material.component.price(3)
domain	tcamnt		operation.component.price(3)
domain	tcamnt		surcharge.component.price(3)
long			result

domain	tcqst1		process.blocked
domain	tcqst1		manual.blocked
:STBL:bcstc000,bcstc006,bcstc008,bcstc010,bcsti007,bcsti008,tdltc001,tdilc101,tdltc004,tdilc001,tdilc009,tdilc104,tdilc111,tdltc003,tdilc000,tiedm100,tdilc401,tiitm001,tipcs021
:COMT:START
---  Changes in table design  ---

%GTtdltc0000
%GTticpr0000

---  Source and Target Sessions  ---

Source session: %SStdltc0101m000
Target session: %TSwhltc1511m000


---  Migration Logic  ---

All records from the table %STtdltc001 will be migrated to the table %TTwhltc100 if one of the following conditions is met:
- record in %STtdltc001 contains a normal item (%SFtdltc001.cprj is empty) and field %SFtiitm001.kltc in the table %STtiitm001 has a value Batch or
- record in %STtdltc001 contains a customized item (%SFtdltc001.cprj is not empty) and field %SFtipcs021.kltc in the table %STtipcs021 has a value Batch.

If the item is Lot Priced, a record will be created for each lot in table %TTwhltc111 having an empty enterprise unit.


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:wh
:TCMOD:ltc
:TFLNO:111
:LDAT:12/10/2017 12:13:51 PM
:PRTX:START
select 	 tdilc000.iilc, tdilc000.take
from 	 tdilc000 
as set with 1 rows
selectdo 
endselect

migrate tdltc001
:PRTX:END
:STAT:V
:VARI:#include	"ibcswh0011"		|#CNT.n

long			g.mc.depth	|#CNT.n
long			i		|#CNT.n

domain	bccnv.item	var.mwhltc100.item
	string		var.mwhltc100.orno(9)
domain	bcckon		kind.of.number

domain	tcmcs.s200m	errmess
domain	tccwar		hold.cwar
domain	tcdate		hold.trdt	|#1160966.n
|domain	tccprj		project.code	|#217168.o
domain	bcstc.nprj	project.code	|#217168.n
domain	tcdate		lot.date
domain	tcdate		inventory.date
domain	tcqiv1		location.allocated.quantity

domain	bccom.bpid	var.whltc100.bfbp
domain	tiedm.revi	var.whltc100.revi
string			var.whltc100.ldat(22)
string			var.whltc500.lsid(22)
domain	tcdate		last.inspection.date

domain	bccost		var.whltc101.cpcp
domain	tccopr		var.whltc101.pric(3)
domain	bccost		material.component
domain	bccost		operation.component
domain	bccost		surcharge.component
domain	bccost		detail.cost.component

domain	tccwar		var.whltc105.cwar
domain	tcqiv1		var.whltc105.qhnd
domain	tcqiv1		var.whltc105.qblk
domain	tcqiv1		var.whltc105.qall
domain	tcqiv1		var.whltc105.qord
domain	tcqiv1		var.whltc105.qlal
domain	tcdate		var.whltc105.trdt
domain	tcyesno		var.whltc105.ball
domain	tcyesno		var.whltc105.binb
domain	tcyesno		var.whltc105.bout
domain	tcyesno		var.whltc105.btri
domain	tcyesno		var.whltc105.btrr

string			var.whltc500.idat(22)	
long			var.whltc500.owns		|#1858553.n
domain	bccom.bpid	var.whltc500.bpid
domain	tcqiv1		var.whltc500.qhnd
domain	tcqiv1		var.whltc500.qblk
domain	tcqiv1		var.whltc500.qall
domain	tcqiv1		var.whltc500.qord
domain	tcqiv1		var.whltc500.qlal
domain	tcyesno		var.whltc500.ball
domain	tcyesno		var.whltc500.bout
domain	tcyesno		var.whltc500.btri
domain	tiedm.revi	var.whltc500.revi
domain	tccwar		var.whltc500.cwar		|#245164.sn			
domain	tdilc.loca	var.whltc500.loca		|#245164.en

	
domain	tcamnt		material.component.price(3)
domain	tcamnt		operation.component.price(3)
domain	tcamnt		surcharge.component.price(3)
long			result

domain	tcqst1		process.blocked
domain	tcqst1		manual.blocked
:STBL:bcstc000,bcstc006,bcstc008,bcstc010,bcsti007,bcsti008,tdltc001,tdilc101,tdltc004,tdilc001,tdilc009,tdilc104,tdilc111,tdltc003,tdilc000,tiedm100,tdilc401,tiitm001,tipcs021
:COMT:START
---  Changes in table design  ---

%GTtdltc0000
%GTticpr0000

---  Source and Target Sessions  ---

Source session: %SStdltc0101m000
Target session: %TSwhltc1511m000


---  Migration Logic  ---

All records from the table %STtdltc001 will be migrated to the table %TTwhltc100 if one of the following conditions is met:
- record in %STtdltc001 contains a normal item (%SFtdltc001.cprj is empty) and field %SFtiitm001.kltc in the table %STtiitm001 has a value Batch or
- record in %STtdltc001 contains a customized item (%SFtdltc001.cprj is not empty) and field %SFtipcs021.kltc in the table %STtipcs021 has a value Batch.

If the item is Lot Priced, a record will be created for each lot in table %TTwhltc111 having an empty enterprise unit.


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:wh
:TCMOD:ltc
:TFLNO:500
:LDAT:12/10/2017 12:13:52 PM
:PRTX:START
select 	 tdilc000.iilc, tdilc000.take
from 	 tdilc000 
as set with 1 rows
selectdo 
endselect

migrate tdltc001
:PRTX:END
:STAT:V
:VARI:#include	"ibcswh0011"		|#CNT.n

long			g.mc.depth	|#CNT.n
long			i		|#CNT.n

domain	bccnv.item	var.mwhltc100.item
	string		var.mwhltc100.orno(9)
domain	bcckon		kind.of.number

domain	tcmcs.s200m	errmess
domain	tccwar		hold.cwar
domain	tcdate		hold.trdt	|#1160966.n
|domain	tccprj		project.code	|#217168.o
domain	bcstc.nprj	project.code	|#217168.n
domain	tcdate		lot.date
domain	tcdate		inventory.date
domain	tcqiv1		location.allocated.quantity

domain	bccom.bpid	var.whltc100.bfbp
domain	tiedm.revi	var.whltc100.revi
string			var.whltc100.ldat(22)
string			var.whltc500.lsid(22)
domain	tcdate		last.inspection.date

domain	bccost		var.whltc101.cpcp
domain	tccopr		var.whltc101.pric(3)
domain	bccost		material.component
domain	bccost		operation.component
domain	bccost		surcharge.component
domain	bccost		detail.cost.component

domain	tccwar		var.whltc105.cwar
domain	tcqiv1		var.whltc105.qhnd
domain	tcqiv1		var.whltc105.qblk
domain	tcqiv1		var.whltc105.qall
domain	tcqiv1		var.whltc105.qord
domain	tcqiv1		var.whltc105.qlal
domain	tcdate		var.whltc105.trdt
domain	tcyesno		var.whltc105.ball
domain	tcyesno		var.whltc105.binb
domain	tcyesno		var.whltc105.bout
domain	tcyesno		var.whltc105.btri
domain	tcyesno		var.whltc105.btrr

string			var.whltc500.idat(22)	
long			var.whltc500.owns		|#1858553.n
domain	bccom.bpid	var.whltc500.bpid
domain	tcqiv1		var.whltc500.qhnd
domain	tcqiv1		var.whltc500.qblk
domain	tcqiv1		var.whltc500.qall
domain	tcqiv1		var.whltc500.qord
domain	tcqiv1		var.whltc500.qlal
domain	tcyesno		var.whltc500.ball
domain	tcyesno		var.whltc500.bout
domain	tcyesno		var.whltc500.btri
domain	tiedm.revi	var.whltc500.revi
domain	tccwar		var.whltc500.cwar		|#245164.sn			
domain	tdilc.loca	var.whltc500.loca		|#245164.en

	
domain	tcamnt		material.component.price(3)
domain	tcamnt		operation.component.price(3)
domain	tcamnt		surcharge.component.price(3)
long			result

domain	tcqst1		process.blocked
domain	tcqst1		manual.blocked
:STBL:bcstc000,bcstc006,bcstc008,bcstc010,bcsti007,bcsti008,tdltc001,tdilc101,tdltc004,tdilc001,tdilc009,tdilc104,tdilc111,tdltc003,tdilc000,tiedm100,tdilc401,tiitm001,tipcs021
:COMT:START
---  Changes in table design  ---

%GTtdltc0000
%GTticpr0000

---  Source and Target Sessions  ---

Source session: %SStdltc0101m000
Target session: %TSwhltc1511m000


---  Migration Logic  ---

All records from the table %STtdltc001 will be migrated to the table %TTwhltc100 if one of the following conditions is met:
- record in %STtdltc001 contains a normal item (%SFtdltc001.cprj is empty) and field %SFtiitm001.kltc in the table %STtiitm001 has a value Batch or
- record in %STtdltc001 contains a customized item (%SFtdltc001.cprj is not empty) and field %SFtipcs021.kltc in the table %STtipcs021 has a value Batch.

If the item is Lot Priced, a record will be created for each lot in table %TTwhltc111 having an empty enterprise unit.


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:wh
:TCMOD:ltc
:TFLNO:501
:LDAT:2/21/2019 1:53:31 PM
:PRTX:START
read.parameters.common(o.mess)
read.parameter("tdinv000", o.mess)
read.parameter("tdilc000", o.mess)				|#214852.n

g.mc.depth = get.mc.depth()


hold.item = ""
hold.cwar = ""
hold.negative = 0.0
								|#800-142000.sn
check1.trdt = 0
check2.trdt = 0
check2.item = ""
check2.cwar = ""
								|#800-142000.en

itid = 0
var.whinr110.itid = ""
var.whinr110.itse = 0

|#array.len = 100			|#228714.o
array.len = 2000			|#228714.n

alloc.mem(arr.whina112.trdt, 22, array.len)
alloc.mem(arr.whina112.seqn, array.len)
alloc.mem(arr.whina112.qskt, array.len)

i = 0
table	tbcswh008

fill.pur.receipt.array()		|#234040.n

migrate tdinv700


set.mem(arr.whina112.trdt,"")
set.mem(arr.whina112.seqn,0)
set.mem(arr.whina112.qskt,0.0)

hold.cprj = ""
hold.item = ""
hold.cwar = ""							|#214852.n
								|#800-142000.sn
check1.trdt = 0
check2.trdt = 0
check2.item = ""
check2.cwar = ""
								|#800-142000.en
i = 0

var.whinr110.valm = 1						|#209255.n

								|#214852.sn
keep.cprj = ""
keep.item = ""

|#arr.len.tipcs700 = 100		|#228714.o
arr.len.tipcs700 = 2000		|#228714.n

alloc.mem(arr.tipcs700.cwar, len(keep.cwar), arr.len.tipcs700)
alloc.mem(arr.tipcs700.trdt, arr.len.tipcs700)
alloc.mem(arr.tipcs700.trtm, arr.len.tipcs700)
alloc.mem(arr.tipcs700.sern, arr.len.tipcs700)
alloc.mem(arr.tipcs700.proc, arr.len.tipcs700)

select	tipcs700.*
from	tipcs700
where	tipcs700.cprj >  ""                                                                                                     and 	 tipcs700.item >  ""
order by tipcs700._index1
selectdo
	if tipcs700.cprj <> keep.cprj or
	   tipcs700.item <> keep.item then
		keep.cprj = tipcs700.cprj
		keep.item = tipcs700.item
		fill.tipcs700.array(	keep.cprj,
					keep.item)
		repeat
			find.cwar = false
			for j = 1 to arr.len.tipcs700
				if not find.cwar then
					if isspace(arr.tipcs700.cwar(1,j)) then
						break
					else
						if arr.tipcs700.proc(j) = 0 then
							keep.cwar = arr.tipcs700.cwar(1,j)
							keep.trdt = arr.tipcs700.trdt(j)
							keep.trtm = arr.tipcs700.trtm(j)
							keep.sern = arr.tipcs700.sern(j)
							find.cwar = true
						else
							continue
						endif
					endif
				else
					if isspace(arr.tipcs700.cwar(1,j)) then
						break
					else
						if arr.tipcs700.cwar(1,j) <> keep.cwar then
							continue
						else
							keep.trdt = arr.tipcs700.trdt(j)
							keep.trtm = arr.tipcs700.trtm(j)
							keep.sern = arr.tipcs700.sern(j)
						endif
					endif
				endif

								|#214852.en
				migrate tipcs700
								|#214852.sn
				arr.tipcs700.proc(j) = 1
			endfor
		until not find.cwar
		handle.inventory.transfers.customized.items(	|#1133346.sn
							keep.cprj,
							keep.item,
							arr.len.tipcs700,
							arr.tipcs700.cwar)
								|#1133346.en
	endif
endselect

free.mem(arr.tipcs700.cwar)
free.mem(arr.tipcs700.trdt)
free.mem(arr.tipcs700.trtm)
free.mem(arr.tipcs700.sern)
free.mem(arr.tipcs700.proc)

								|#214852.en

								|#209255.sn
|* next functions are used to create receipt transactions for items that
|* do have inventory onhand, but don't have inventory transactions.
handle.inventory.without.tdinv700()
handle.inventory.without.tipcs700()
								|#209255.en

free.mem(arr.whina112.trdt)
free.mem(arr.whina112.seqn)
free.mem(arr.whina112.qskt)

free.mem.pur.receipt.array()	|#234040.n
:PRTX:END
:STAT:V
:VARI:#include "ibcswh0011"			|#CNT.n
#include "itccom0015"			|#234040.n
long	g.mc.depth

long			nr.lots				|#TELAIR_2.n
string			arr.lots(1,1)	based		|#TELAIR_2.n
domain	tdltc.clot	lot.serial			|#fp3

long			i
long			itid
long			prev.sern
long			array.len
long			hold.tdinv700.trdt
long			hold.tdinv700.trtm		|#TELAIR.sn
long			hold.tdinv700.sern
long			hold.tipcs700.trdt
long			hold.tipcs700.trtm
long			hold.tipcs700.sern		|#TELAIR.en

long			dummy.array.nr
long			receipt.counter

long			arr.len.tipcs700			|#214852.sn
domain	tccwar		arr.tipcs700.cwar(1)	based
long			arr.tipcs700.trdt(1)	based
long			arr.tipcs700.trtm(1)	based
long			arr.tipcs700.sern(1)	based
long			arr.tipcs700.proc(1)	based
long			j
long			k
domain	tcbool		find.cwar
long			found.trdt
long			found.trtm
long			found.sern
domain	tcqiv1		stock
domain	tcitem		keep.item
domain	tccprj		keep.cprj
domain	tccwar		keep.cwar	fixed
long			keep.trdt
long			keep.trtm
long			keep.sern			|#214852.en

long			hold.koor
long			hold.kost
string			hold.orno(9)
string			hold.trdt(22)
long			hold.seqn
domain	tcqiv1		hold.qstk
string			hold.bpid(9)
domain	tcqiv1		hold.qhnd			|#214224.n

							| #  800 -  142000.sn
long			check.seqn
long			check1.trdt
long			check2.trdt
domain	tccwar		check2.cwar
domain	tcitem		check2.item
							| #  800 -  142000.en
domain	tcqiv1		dummy.receipt.qty

domain	tcyesno		var.whinr110.prnt
domain	tccwar		var.whinr110.cwar		|#214852.n

long			orig.tipcs700.pono	 	|*2043803_4.n

string			arr.whina112.trdt(1,1)	based
long			arr.whina112.seqn(1)	based
double			arr.whina112.qskt(1)	based

long			var.whinr110.valm
long			var.whinr110.koor
long			var.whinr110.kost
string			var.whinr110.orno(9)
long			var.whinr110.pono
long			var.whinr110.srnb
long			var.whinr110.seqn
double			var.whinr110.qstk
string			var.whinr110.bpid(9)
string			var.whinr110.cprj(9)
string			var.whinr110.trdt(22)
string			var.whinr110.itid(9)
long			var.whinr110.itse
double			var.whinr110.qhnd
domain	tdltc.clot	var.whinr110.clot
domain	tdltc.clot	var.whinr110.serl
string			var.whinr110.shpm(9)			|#202924.n
long			var.whinr110.shpo			|#202924.n
string			var.whinr110.rcno(9)			|#227896.sn
long			var.whinr110.rcln			|#227896.en

double			var.whina112.qskt
double			var.whina112.qstk
domain	tdltc.clot	var.whina112.clot 		|*2043803_2.n
domain	tdltc.clot	var.whina112.serl		|*2043803_2.n

double			issued
double			onhand.inventory

domain	bccost		var.whina113.cpcp
double			var.whina113.amnt(3)
double			var.whina113.mauc(3)

double			var.whina114.qstk

string			var.whina114.trdt(22)
long			var.whina114.seqn
long			var.whina114.sern

domain	bccost		var.whina115.cpcp
double			var.whina115.amnt(3)

domain	tcitem		hold.item
domain	tccwar		hold.cwar
domain	tccprj		hold.cprj

domain	tckoor		curr.koor			|#205835.n
domain	tckost		curr.kost
double			curr.quan

double			to.be.received
double			remain.quan
double			hold.negative

double			var.whwmd255.coqu

domain	tcmcs.s200m	o.mess

domain	tcmcs.s200m	errmess				|#SL204550.sn
domain	tcpono		bom.line			|#SL204550.en
domain	tcqiv1		ilc.quantity			|#2043803.n
domain	tckost		ilc.transaction.type		|#2043803.n

							|#234040.sn
static	domain	tcmcs.str215	pur.receipt.arr(1)	based
static	domain	tcpono		receipt.line.arr(1)	based

static	domain	tcbool		lengths.set
static	long	array.length
static	long	search_def(1,4)

static	domain	tcmcs.byte	orno.length, orno.pos
static	domain	tcmcs.byte	pono.length, pono.pos
static	domain	tcmcs.byte	srnb.length, srnb.pos
static	domain	tcmcs.byte	reno.length, reno.pos

static	domain	tcmcs.long	alloc.elements
static	domain	tcmcs.byte	alloc.counter
							|#234040.en
:STBL:tcmcs003,tdinv700,tipcs700,tipcs021,bcstc008,tiitm001,bcswh004,ticpr300,bcstc000,tdinv001,tipcs350,tdilc102,tdinv100,tdilc000,tdinv000,tdsls045,tdrpl100,tdltc004,tdilc301,tdilc101,tdpur045,tipcs530
:COMT:START

:COMT:END
:TEXT:

:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:wh
:TCMOD:ltc
:TFLNO:502
:LDAT:2/21/2019 1:53:31 PM
:PRTX:START
read.parameters.common(o.mess)
read.parameter("tdinv000", o.mess)
read.parameter("tdilc000", o.mess)				|#214852.n

g.mc.depth = get.mc.depth()


hold.item = ""
hold.cwar = ""
hold.negative = 0.0
								|#800-142000.sn
check1.trdt = 0
check2.trdt = 0
check2.item = ""
check2.cwar = ""
								|#800-142000.en

itid = 0
var.whinr110.itid = ""
var.whinr110.itse = 0

|#array.len = 100			|#228714.o
array.len = 2000			|#228714.n

alloc.mem(arr.whina112.trdt, 22, array.len)
alloc.mem(arr.whina112.seqn, array.len)
alloc.mem(arr.whina112.qskt, array.len)

i = 0
table	tbcswh008

fill.pur.receipt.array()		|#234040.n

migrate tdinv700


set.mem(arr.whina112.trdt,"")
set.mem(arr.whina112.seqn,0)
set.mem(arr.whina112.qskt,0.0)

hold.cprj = ""
hold.item = ""
hold.cwar = ""							|#214852.n
								|#800-142000.sn
check1.trdt = 0
check2.trdt = 0
check2.item = ""
check2.cwar = ""
								|#800-142000.en
i = 0

var.whinr110.valm = 1						|#209255.n

								|#214852.sn
keep.cprj = ""
keep.item = ""

|#arr.len.tipcs700 = 100		|#228714.o
arr.len.tipcs700 = 2000		|#228714.n

alloc.mem(arr.tipcs700.cwar, len(keep.cwar), arr.len.tipcs700)
alloc.mem(arr.tipcs700.trdt, arr.len.tipcs700)
alloc.mem(arr.tipcs700.trtm, arr.len.tipcs700)
alloc.mem(arr.tipcs700.sern, arr.len.tipcs700)
alloc.mem(arr.tipcs700.proc, arr.len.tipcs700)

select	tipcs700.*
from	tipcs700
where	tipcs700.cprj >  ""                                                                                                     and 	 tipcs700.item >  ""
order by tipcs700._index1
selectdo
	if tipcs700.cprj <> keep.cprj or
	   tipcs700.item <> keep.item then
		keep.cprj = tipcs700.cprj
		keep.item = tipcs700.item
		fill.tipcs700.array(	keep.cprj,
					keep.item)
		repeat
			find.cwar = false
			for j = 1 to arr.len.tipcs700
				if not find.cwar then
					if isspace(arr.tipcs700.cwar(1,j)) then
						break
					else
						if arr.tipcs700.proc(j) = 0 then
							keep.cwar = arr.tipcs700.cwar(1,j)
							keep.trdt = arr.tipcs700.trdt(j)
							keep.trtm = arr.tipcs700.trtm(j)
							keep.sern = arr.tipcs700.sern(j)
							find.cwar = true
						else
							continue
						endif
					endif
				else
					if isspace(arr.tipcs700.cwar(1,j)) then
						break
					else
						if arr.tipcs700.cwar(1,j) <> keep.cwar then
							continue
						else
							keep.trdt = arr.tipcs700.trdt(j)
							keep.trtm = arr.tipcs700.trtm(j)
							keep.sern = arr.tipcs700.sern(j)
						endif
					endif
				endif

								|#214852.en
				migrate tipcs700
								|#214852.sn
				arr.tipcs700.proc(j) = 1
			endfor
		until not find.cwar
		handle.inventory.transfers.customized.items(	|#1133346.sn
							keep.cprj,
							keep.item,
							arr.len.tipcs700,
							arr.tipcs700.cwar)
								|#1133346.en
	endif
endselect

free.mem(arr.tipcs700.cwar)
free.mem(arr.tipcs700.trdt)
free.mem(arr.tipcs700.trtm)
free.mem(arr.tipcs700.sern)
free.mem(arr.tipcs700.proc)

								|#214852.en

								|#209255.sn
|* next functions are used to create receipt transactions for items that
|* do have inventory onhand, but don't have inventory transactions.
handle.inventory.without.tdinv700()
handle.inventory.without.tipcs700()
								|#209255.en

free.mem(arr.whina112.trdt)
free.mem(arr.whina112.seqn)
free.mem(arr.whina112.qskt)

free.mem.pur.receipt.array()	|#234040.n
:PRTX:END
:STAT:V
:VARI:#include "ibcswh0011"			|#CNT.n
#include "itccom0015"			|#234040.n
long	g.mc.depth

long			nr.lots				|#TELAIR_2.n
string			arr.lots(1,1)	based		|#TELAIR_2.n
domain	tdltc.clot	lot.serial			|#fp3

long			i
long			itid
long			prev.sern
long			array.len
long			hold.tdinv700.trdt
long			hold.tdinv700.trtm		|#TELAIR.sn
long			hold.tdinv700.sern
long			hold.tipcs700.trdt
long			hold.tipcs700.trtm
long			hold.tipcs700.sern		|#TELAIR.en

long			dummy.array.nr
long			receipt.counter

long			arr.len.tipcs700			|#214852.sn
domain	tccwar		arr.tipcs700.cwar(1)	based
long			arr.tipcs700.trdt(1)	based
long			arr.tipcs700.trtm(1)	based
long			arr.tipcs700.sern(1)	based
long			arr.tipcs700.proc(1)	based
long			j
long			k
domain	tcbool		find.cwar
long			found.trdt
long			found.trtm
long			found.sern
domain	tcqiv1		stock
domain	tcitem		keep.item
domain	tccprj		keep.cprj
domain	tccwar		keep.cwar	fixed
long			keep.trdt
long			keep.trtm
long			keep.sern			|#214852.en

long			hold.koor
long			hold.kost
string			hold.orno(9)
string			hold.trdt(22)
long			hold.seqn
domain	tcqiv1		hold.qstk
string			hold.bpid(9)
domain	tcqiv1		hold.qhnd			|#214224.n

							| #  800 -  142000.sn
long			check.seqn
long			check1.trdt
long			check2.trdt
domain	tccwar		check2.cwar
domain	tcitem		check2.item
							| #  800 -  142000.en
domain	tcqiv1		dummy.receipt.qty

domain	tcyesno		var.whinr110.prnt
domain	tccwar		var.whinr110.cwar		|#214852.n

long			orig.tipcs700.pono	 	|*2043803_4.n

string			arr.whina112.trdt(1,1)	based
long			arr.whina112.seqn(1)	based
double			arr.whina112.qskt(1)	based

long			var.whinr110.valm
long			var.whinr110.koor
long			var.whinr110.kost
string			var.whinr110.orno(9)
long			var.whinr110.pono
long			var.whinr110.srnb
long			var.whinr110.seqn
double			var.whinr110.qstk
string			var.whinr110.bpid(9)
string			var.whinr110.cprj(9)
string			var.whinr110.trdt(22)
string			var.whinr110.itid(9)
long			var.whinr110.itse
double			var.whinr110.qhnd
domain	tdltc.clot	var.whinr110.clot
domain	tdltc.clot	var.whinr110.serl
string			var.whinr110.shpm(9)			|#202924.n
long			var.whinr110.shpo			|#202924.n
string			var.whinr110.rcno(9)			|#227896.sn
long			var.whinr110.rcln			|#227896.en

double			var.whina112.qskt
double			var.whina112.qstk
domain	tdltc.clot	var.whina112.clot 		|*2043803_2.n
domain	tdltc.clot	var.whina112.serl		|*2043803_2.n

double			issued
double			onhand.inventory

domain	bccost		var.whina113.cpcp
double			var.whina113.amnt(3)
double			var.whina113.mauc(3)

double			var.whina114.qstk

string			var.whina114.trdt(22)
long			var.whina114.seqn
long			var.whina114.sern

domain	bccost		var.whina115.cpcp
double			var.whina115.amnt(3)

domain	tcitem		hold.item
domain	tccwar		hold.cwar
domain	tccprj		hold.cprj

domain	tckoor		curr.koor			|#205835.n
domain	tckost		curr.kost
double			curr.quan

double			to.be.received
double			remain.quan
double			hold.negative

double			var.whwmd255.coqu

domain	tcmcs.s200m	o.mess

domain	tcmcs.s200m	errmess				|#SL204550.sn
domain	tcpono		bom.line			|#SL204550.en
domain	tcqiv1		ilc.quantity			|#2043803.n
domain	tckost		ilc.transaction.type		|#2043803.n

							|#234040.sn
static	domain	tcmcs.str215	pur.receipt.arr(1)	based
static	domain	tcpono		receipt.line.arr(1)	based

static	domain	tcbool		lengths.set
static	long	array.length
static	long	search_def(1,4)

static	domain	tcmcs.byte	orno.length, orno.pos
static	domain	tcmcs.byte	pono.length, pono.pos
static	domain	tcmcs.byte	srnb.length, srnb.pos
static	domain	tcmcs.byte	reno.length, reno.pos

static	domain	tcmcs.long	alloc.elements
static	domain	tcmcs.byte	alloc.counter
							|#234040.en
:STBL:tcmcs003,tdinv700,tipcs700,tipcs021,bcstc008,tiitm001,bcswh004,ticpr300,bcstc000,tdinv001,tipcs350,tdilc102,tdinv100,tdilc000,tdinv000,tdsls045,tdrpl100,tdltc004,tdilc301,tdilc101,tdpur045,tipcs530
:COMT:START

:COMT:END
:TEXT:

:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:wh
:TCMOD:wmd
:TFLNO:210
:LDAT:12/10/2017 12:17:18 PM
:PRTX:START
migrate tdinv001
:PRTX:END
:STAT:V
:VARI:#include "ibcswh0011"			|#CNT.n

domain	tccwar	var.whwmd210.cwar 				|#214852.n

long	var.whwmd210.nopr
long	var.whwmd210.ptyp
double	var.whwmd210.sftm
double	var.whwmd210.maxs			|#1356322.n
string	var.whwmd210.abcc(1)
string	var.whwmd210.item(47)
domain	bcstc.nprj	g.new.project.code
long	var.whwmd210.ialt
long	skip.record
double	var.whwmd210.oqmf
long	var.whwmd210.valm					|#146674.n

long	g.mc.depth
long	i
domain	tccopr	amount.per.cc(3)		|#CNT.n

domain	tidate		date.last.cost.price.change

|domain	tccwar		var.whwmd215.cwar		|#1011283.o
domain	tccwar		var.whwmd215.cwar	fixed	|#1011283.n
string			var.whwmd215.item(47)
domain	tcqiv1		var.whwmd215.qhnd
domain	tcqiv1		var.whwmd215.qchd
domain	tcqiv1		var.whwmd215.qblk
|domain	tcqiv1		var.whwmd215.qbpl		|#1425776.o
domain	tcqiv1		var.whwmd215.qord
domain	tcqiv1		var.whwmd215.qcor
domain	tcqiv1		var.whwmd215.qint
domain	tcqiv1		var.whwmd215.qall
domain	tcqiv1		var.whwmd215.qcal
domain	tcqiv1		var.whwmd215.qcom
domain	tcqiv1		var.whwmd215.qlal
domain	tcqiv1		var.whwmd215.qcpr
string			var.whwmd215.ltdt(22)
string			var.whwmd215.hstd(22)
string			var.whwmd215.lsid(22)
domain	tcqiv1		var.whwmd215.qcis
domain	tcqiv1		var.whwmd215.qhib

domain	bccost		var.whwmd217.cpcp
domain	tccopr		var.whwmd217.ftpa(3)
domain	tccopr		var.whwmd217.mauc(3)

domain	tcqiv1		var.whwmd260.qprb		|#fp8.sn
|domain	tcqiv1		var.whwmd260.qppl		|#1425776.o
domain	tcqiv1		var.whwmd260.qblk
|domain	tcqiv1		var.whwmd260.qbpl		|#fp8.en	|#1425776.o

domain	bccost		material.component
domain	bccost		operation.component
domain	bccost		surcharge.component
domain	bccost		detail.cost.component
domain tcamnt		material.component.ftpa(3)
domain tcamnt		operation.component.ftpa(3)
domain tcamnt		surcharge.component.ftpa(3)

long			result

domain	tcqiv1		blocked.quantity.decrease
domain	tcqiv1		move.to.allocated
domain	tcqiv1		move.to.onorder

domain	tcmcs.str19	cwar_item_array(1)	based	|#1011283.sn
domain	tcqiv1		qsts_array(1)	based
	long		cwar.item.array.index
domain	tcmcs.str25	cwar_cprj_item_array(1)	based
domain	tcqiv1		qsts_cprj_array(1)	based
	long		cwar.cprj.item.array.index	|#1011283.en

	long		no.warehouses			|#1399055.sn
domain	tccwar		warehouses(1)		based
domain	tcqiv1		qty.allocated(1)		based
domain	tcqiv1		qty.on.order(1)		based
domain	tcbool		warehouse.handled(1)	based	|#1399055.en
:STBL:tcmcs003,tdilc000,tdilc101,tdilc111,tdilc401,tdinv000,tdinv001,tdpur041,tdrpl100,tdsls041,ticpr300,ticst001,tiitm001,tipcs000,tipcs020,tipcs021,tipcs350,tipcs500,tipcs530,tisfc001,tppdm605,bcstc000
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---

Source session: %SStdinv0101m000
                %SStipcs2121m000
Target session: %TSwhwmd2510m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:wh
:TCMOD:wmd
:TFLNO:215
:LDAT:12/10/2017 12:17:18 PM
:PRTX:START
migrate tdinv001
:PRTX:END
:STAT:V
:VARI:#include "ibcswh0011"			|#CNT.n

domain	tccwar	var.whwmd210.cwar 				|#214852.n

long	var.whwmd210.nopr
long	var.whwmd210.ptyp
double	var.whwmd210.sftm
double	var.whwmd210.maxs			|#1356322.n
string	var.whwmd210.abcc(1)
string	var.whwmd210.item(47)
domain	bcstc.nprj	g.new.project.code
long	var.whwmd210.ialt
long	skip.record
double	var.whwmd210.oqmf
long	var.whwmd210.valm					|#146674.n

long	g.mc.depth
long	i
domain	tccopr	amount.per.cc(3)		|#CNT.n

domain	tidate		date.last.cost.price.change

|domain	tccwar		var.whwmd215.cwar		|#1011283.o
domain	tccwar		var.whwmd215.cwar	fixed	|#1011283.n
string			var.whwmd215.item(47)
domain	tcqiv1		var.whwmd215.qhnd
domain	tcqiv1		var.whwmd215.qchd
domain	tcqiv1		var.whwmd215.qblk
|domain	tcqiv1		var.whwmd215.qbpl		|#1425776.o
domain	tcqiv1		var.whwmd215.qord
domain	tcqiv1		var.whwmd215.qcor
domain	tcqiv1		var.whwmd215.qint
domain	tcqiv1		var.whwmd215.qall
domain	tcqiv1		var.whwmd215.qcal
domain	tcqiv1		var.whwmd215.qcom
domain	tcqiv1		var.whwmd215.qlal
domain	tcqiv1		var.whwmd215.qcpr
string			var.whwmd215.ltdt(22)
string			var.whwmd215.hstd(22)
string			var.whwmd215.lsid(22)
domain	tcqiv1		var.whwmd215.qcis
domain	tcqiv1		var.whwmd215.qhib

domain	bccost		var.whwmd217.cpcp
domain	tccopr		var.whwmd217.ftpa(3)
domain	tccopr		var.whwmd217.mauc(3)

domain	tcqiv1		var.whwmd260.qprb		|#fp8.sn
|domain	tcqiv1		var.whwmd260.qppl		|#1425776.o
domain	tcqiv1		var.whwmd260.qblk
|domain	tcqiv1		var.whwmd260.qbpl		|#fp8.en	|#1425776.o

domain	bccost		material.component
domain	bccost		operation.component
domain	bccost		surcharge.component
domain	bccost		detail.cost.component
domain tcamnt		material.component.ftpa(3)
domain tcamnt		operation.component.ftpa(3)
domain tcamnt		surcharge.component.ftpa(3)

long			result

domain	tcqiv1		blocked.quantity.decrease
domain	tcqiv1		move.to.allocated
domain	tcqiv1		move.to.onorder

domain	tcmcs.str19	cwar_item_array(1)	based	|#1011283.sn
domain	tcqiv1		qsts_array(1)	based
	long		cwar.item.array.index
domain	tcmcs.str25	cwar_cprj_item_array(1)	based
domain	tcqiv1		qsts_cprj_array(1)	based
	long		cwar.cprj.item.array.index	|#1011283.en

	long		no.warehouses			|#1399055.sn
domain	tccwar		warehouses(1)		based
domain	tcqiv1		qty.allocated(1)		based
domain	tcqiv1		qty.on.order(1)		based
domain	tcbool		warehouse.handled(1)	based	|#1399055.en
:STBL:tcmcs003,tdilc000,tdilc101,tdilc111,tdilc401,tdinv000,tdinv001,tdpur041,tdrpl100,tdsls041,ticpr300,ticst001,tiitm001,tipcs000,tipcs020,tipcs021,tipcs350,tipcs500,tipcs530,tisfc001,tppdm605,bcstc000
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---

Source session: %SStdinv0101m000
                %SStipcs2121m000
Target session: %TSwhwmd2510m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:wh
:TCMOD:wmd
:TFLNO:216
:LDAT:12/10/2017 12:17:18 PM
:PRTX:START
migrate tdinv001
:PRTX:END
:STAT:V
:VARI:#include "ibcswh0011"			|#CNT.n

domain	tccwar	var.whwmd210.cwar 				|#214852.n

long	var.whwmd210.nopr
long	var.whwmd210.ptyp
double	var.whwmd210.sftm
double	var.whwmd210.maxs			|#1356322.n
string	var.whwmd210.abcc(1)
string	var.whwmd210.item(47)
domain	bcstc.nprj	g.new.project.code
long	var.whwmd210.ialt
long	skip.record
double	var.whwmd210.oqmf
long	var.whwmd210.valm					|#146674.n

long	g.mc.depth
long	i
domain	tccopr	amount.per.cc(3)		|#CNT.n

domain	tidate		date.last.cost.price.change

|domain	tccwar		var.whwmd215.cwar		|#1011283.o
domain	tccwar		var.whwmd215.cwar	fixed	|#1011283.n
string			var.whwmd215.item(47)
domain	tcqiv1		var.whwmd215.qhnd
domain	tcqiv1		var.whwmd215.qchd
domain	tcqiv1		var.whwmd215.qblk
|domain	tcqiv1		var.whwmd215.qbpl		|#1425776.o
domain	tcqiv1		var.whwmd215.qord
domain	tcqiv1		var.whwmd215.qcor
domain	tcqiv1		var.whwmd215.qint
domain	tcqiv1		var.whwmd215.qall
domain	tcqiv1		var.whwmd215.qcal
domain	tcqiv1		var.whwmd215.qcom
domain	tcqiv1		var.whwmd215.qlal
domain	tcqiv1		var.whwmd215.qcpr
string			var.whwmd215.ltdt(22)
string			var.whwmd215.hstd(22)
string			var.whwmd215.lsid(22)
domain	tcqiv1		var.whwmd215.qcis
domain	tcqiv1		var.whwmd215.qhib

domain	bccost		var.whwmd217.cpcp
domain	tccopr		var.whwmd217.ftpa(3)
domain	tccopr		var.whwmd217.mauc(3)

domain	tcqiv1		var.whwmd260.qprb		|#fp8.sn
|domain	tcqiv1		var.whwmd260.qppl		|#1425776.o
domain	tcqiv1		var.whwmd260.qblk
|domain	tcqiv1		var.whwmd260.qbpl		|#fp8.en	|#1425776.o

domain	bccost		material.component
domain	bccost		operation.component
domain	bccost		surcharge.component
domain	bccost		detail.cost.component
domain tcamnt		material.component.ftpa(3)
domain tcamnt		operation.component.ftpa(3)
domain tcamnt		surcharge.component.ftpa(3)

long			result

domain	tcqiv1		blocked.quantity.decrease
domain	tcqiv1		move.to.allocated
domain	tcqiv1		move.to.onorder

domain	tcmcs.str19	cwar_item_array(1)	based	|#1011283.sn
domain	tcqiv1		qsts_array(1)	based
	long		cwar.item.array.index
domain	tcmcs.str25	cwar_cprj_item_array(1)	based
domain	tcqiv1		qsts_cprj_array(1)	based
	long		cwar.cprj.item.array.index	|#1011283.en

	long		no.warehouses			|#1399055.sn
domain	tccwar		warehouses(1)		based
domain	tcqiv1		qty.allocated(1)		based
domain	tcqiv1		qty.on.order(1)		based
domain	tcbool		warehouse.handled(1)	based	|#1399055.en
:STBL:tcmcs003,tdilc000,tdilc101,tdilc111,tdilc401,tdinv000,tdinv001,tdpur041,tdrpl100,tdsls041,ticpr300,ticst001,tiitm001,tipcs000,tipcs020,tipcs021,tipcs350,tipcs500,tipcs530,tisfc001,tppdm605,bcstc000
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---

Source session: %SStdinv0101m000
                %SStipcs2121m000
Target session: %TSwhwmd2510m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:wh
:TCMOD:wmd
:TFLNO:217
:LDAT:12/10/2017 12:17:19 PM
:PRTX:START
migrate tdinv001
:PRTX:END
:STAT:V
:VARI:#include "ibcswh0011"			|#CNT.n

domain	tccwar	var.whwmd210.cwar 				|#214852.n

long	var.whwmd210.nopr
long	var.whwmd210.ptyp
double	var.whwmd210.sftm
double	var.whwmd210.maxs			|#1356322.n
string	var.whwmd210.abcc(1)
string	var.whwmd210.item(47)
domain	bcstc.nprj	g.new.project.code
long	var.whwmd210.ialt
long	skip.record
double	var.whwmd210.oqmf
long	var.whwmd210.valm					|#146674.n

long	g.mc.depth
long	i
domain	tccopr	amount.per.cc(3)		|#CNT.n

domain	tidate		date.last.cost.price.change

|domain	tccwar		var.whwmd215.cwar		|#1011283.o
domain	tccwar		var.whwmd215.cwar	fixed	|#1011283.n
string			var.whwmd215.item(47)
domain	tcqiv1		var.whwmd215.qhnd
domain	tcqiv1		var.whwmd215.qchd
domain	tcqiv1		var.whwmd215.qblk
|domain	tcqiv1		var.whwmd215.qbpl		|#1425776.o
domain	tcqiv1		var.whwmd215.qord
domain	tcqiv1		var.whwmd215.qcor
domain	tcqiv1		var.whwmd215.qint
domain	tcqiv1		var.whwmd215.qall
domain	tcqiv1		var.whwmd215.qcal
domain	tcqiv1		var.whwmd215.qcom
domain	tcqiv1		var.whwmd215.qlal
domain	tcqiv1		var.whwmd215.qcpr
string			var.whwmd215.ltdt(22)
string			var.whwmd215.hstd(22)
string			var.whwmd215.lsid(22)
domain	tcqiv1		var.whwmd215.qcis
domain	tcqiv1		var.whwmd215.qhib

domain	bccost		var.whwmd217.cpcp
domain	tccopr		var.whwmd217.ftpa(3)
domain	tccopr		var.whwmd217.mauc(3)

domain	tcqiv1		var.whwmd260.qprb		|#fp8.sn
|domain	tcqiv1		var.whwmd260.qppl		|#1425776.o
domain	tcqiv1		var.whwmd260.qblk
|domain	tcqiv1		var.whwmd260.qbpl		|#fp8.en	|#1425776.o

domain	bccost		material.component
domain	bccost		operation.component
domain	bccost		surcharge.component
domain	bccost		detail.cost.component
domain tcamnt		material.component.ftpa(3)
domain tcamnt		operation.component.ftpa(3)
domain tcamnt		surcharge.component.ftpa(3)

long			result

domain	tcqiv1		blocked.quantity.decrease
domain	tcqiv1		move.to.allocated
domain	tcqiv1		move.to.onorder

domain	tcmcs.str19	cwar_item_array(1)	based	|#1011283.sn
domain	tcqiv1		qsts_array(1)	based
	long		cwar.item.array.index
domain	tcmcs.str25	cwar_cprj_item_array(1)	based
domain	tcqiv1		qsts_cprj_array(1)	based
	long		cwar.cprj.item.array.index	|#1011283.en

	long		no.warehouses			|#1399055.sn
domain	tccwar		warehouses(1)		based
domain	tcqiv1		qty.allocated(1)		based
domain	tcqiv1		qty.on.order(1)		based
domain	tcbool		warehouse.handled(1)	based	|#1399055.en
:STBL:tcmcs003,tdilc000,tdilc101,tdilc111,tdilc401,tdinv000,tdinv001,tdpur041,tdrpl100,tdsls041,ticpr300,ticst001,tiitm001,tipcs000,tipcs020,tipcs021,tipcs350,tipcs500,tipcs530,tisfc001,tppdm605,bcstc000
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---

Source session: %SStdinv0101m000
                %SStipcs2121m000
Target session: %TSwhwmd2510m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:wh
:TCMOD:wmd
:TFLNO:219
:LDAT:12/10/2017 12:17:19 PM
:PRTX:START
migrate tdinv001
:PRTX:END
:STAT:V
:VARI:#include "ibcswh0011"			|#CNT.n

domain	tccwar	var.whwmd210.cwar 				|#214852.n

long	var.whwmd210.nopr
long	var.whwmd210.ptyp
double	var.whwmd210.sftm
double	var.whwmd210.maxs			|#1356322.n
string	var.whwmd210.abcc(1)
string	var.whwmd210.item(47)
domain	bcstc.nprj	g.new.project.code
long	var.whwmd210.ialt
long	skip.record
double	var.whwmd210.oqmf
long	var.whwmd210.valm					|#146674.n

long	g.mc.depth
long	i
domain	tccopr	amount.per.cc(3)		|#CNT.n

domain	tidate		date.last.cost.price.change

|domain	tccwar		var.whwmd215.cwar		|#1011283.o
domain	tccwar		var.whwmd215.cwar	fixed	|#1011283.n
string			var.whwmd215.item(47)
domain	tcqiv1		var.whwmd215.qhnd
domain	tcqiv1		var.whwmd215.qchd
domain	tcqiv1		var.whwmd215.qblk
|domain	tcqiv1		var.whwmd215.qbpl		|#1425776.o
domain	tcqiv1		var.whwmd215.qord
domain	tcqiv1		var.whwmd215.qcor
domain	tcqiv1		var.whwmd215.qint
domain	tcqiv1		var.whwmd215.qall
domain	tcqiv1		var.whwmd215.qcal
domain	tcqiv1		var.whwmd215.qcom
domain	tcqiv1		var.whwmd215.qlal
domain	tcqiv1		var.whwmd215.qcpr
string			var.whwmd215.ltdt(22)
string			var.whwmd215.hstd(22)
string			var.whwmd215.lsid(22)
domain	tcqiv1		var.whwmd215.qcis
domain	tcqiv1		var.whwmd215.qhib

domain	bccost		var.whwmd217.cpcp
domain	tccopr		var.whwmd217.ftpa(3)
domain	tccopr		var.whwmd217.mauc(3)

domain	tcqiv1		var.whwmd260.qprb		|#fp8.sn
|domain	tcqiv1		var.whwmd260.qppl		|#1425776.o
domain	tcqiv1		var.whwmd260.qblk
|domain	tcqiv1		var.whwmd260.qbpl		|#fp8.en	|#1425776.o

domain	bccost		material.component
domain	bccost		operation.component
domain	bccost		surcharge.component
domain	bccost		detail.cost.component
domain tcamnt		material.component.ftpa(3)
domain tcamnt		operation.component.ftpa(3)
domain tcamnt		surcharge.component.ftpa(3)

long			result

domain	tcqiv1		blocked.quantity.decrease
domain	tcqiv1		move.to.allocated
domain	tcqiv1		move.to.onorder

domain	tcmcs.str19	cwar_item_array(1)	based	|#1011283.sn
domain	tcqiv1		qsts_array(1)	based
	long		cwar.item.array.index
domain	tcmcs.str25	cwar_cprj_item_array(1)	based
domain	tcqiv1		qsts_cprj_array(1)	based
	long		cwar.cprj.item.array.index	|#1011283.en

	long		no.warehouses			|#1399055.sn
domain	tccwar		warehouses(1)		based
domain	tcqiv1		qty.allocated(1)		based
domain	tcqiv1		qty.on.order(1)		based
domain	tcbool		warehouse.handled(1)	based	|#1399055.en
:STBL:tcmcs003,tdilc000,tdilc101,tdilc111,tdilc401,tdinv000,tdinv001,tdpur041,tdrpl100,tdsls041,ticpr300,ticst001,tiitm001,tipcs000,tipcs020,tipcs021,tipcs350,tipcs500,tipcs530,tisfc001,tppdm605,bcstc000
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---

Source session: %SStdinv0101m000
                %SStipcs2121m000
Target session: %TSwhwmd2510m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:wh
:TCMOD:wmd
:TFLNO:255
:LDAT:2/21/2019 1:53:31 PM
:PRTX:START
read.parameters.common(o.mess)
read.parameter("tdinv000", o.mess)
read.parameter("tdilc000", o.mess)				|#214852.n

g.mc.depth = get.mc.depth()


hold.item = ""
hold.cwar = ""
hold.negative = 0.0
								|#800-142000.sn
check1.trdt = 0
check2.trdt = 0
check2.item = ""
check2.cwar = ""
								|#800-142000.en

itid = 0
var.whinr110.itid = ""
var.whinr110.itse = 0

|#array.len = 100			|#228714.o
array.len = 2000			|#228714.n

alloc.mem(arr.whina112.trdt, 22, array.len)
alloc.mem(arr.whina112.seqn, array.len)
alloc.mem(arr.whina112.qskt, array.len)

i = 0
table	tbcswh008

fill.pur.receipt.array()		|#234040.n

migrate tdinv700


set.mem(arr.whina112.trdt,"")
set.mem(arr.whina112.seqn,0)
set.mem(arr.whina112.qskt,0.0)

hold.cprj = ""
hold.item = ""
hold.cwar = ""							|#214852.n
								|#800-142000.sn
check1.trdt = 0
check2.trdt = 0
check2.item = ""
check2.cwar = ""
								|#800-142000.en
i = 0

var.whinr110.valm = 1						|#209255.n

								|#214852.sn
keep.cprj = ""
keep.item = ""

|#arr.len.tipcs700 = 100		|#228714.o
arr.len.tipcs700 = 2000		|#228714.n

alloc.mem(arr.tipcs700.cwar, len(keep.cwar), arr.len.tipcs700)
alloc.mem(arr.tipcs700.trdt, arr.len.tipcs700)
alloc.mem(arr.tipcs700.trtm, arr.len.tipcs700)
alloc.mem(arr.tipcs700.sern, arr.len.tipcs700)
alloc.mem(arr.tipcs700.proc, arr.len.tipcs700)

select	tipcs700.*
from	tipcs700
where	tipcs700.cprj >  ""                                                                                                     and 	 tipcs700.item >  ""
order by tipcs700._index1
selectdo
	if tipcs700.cprj <> keep.cprj or
	   tipcs700.item <> keep.item then
		keep.cprj = tipcs700.cprj
		keep.item = tipcs700.item
		fill.tipcs700.array(	keep.cprj,
					keep.item)
		repeat
			find.cwar = false
			for j = 1 to arr.len.tipcs700
				if not find.cwar then
					if isspace(arr.tipcs700.cwar(1,j)) then
						break
					else
						if arr.tipcs700.proc(j) = 0 then
							keep.cwar = arr.tipcs700.cwar(1,j)
							keep.trdt = arr.tipcs700.trdt(j)
							keep.trtm = arr.tipcs700.trtm(j)
							keep.sern = arr.tipcs700.sern(j)
							find.cwar = true
						else
							continue
						endif
					endif
				else
					if isspace(arr.tipcs700.cwar(1,j)) then
						break
					else
						if arr.tipcs700.cwar(1,j) <> keep.cwar then
							continue
						else
							keep.trdt = arr.tipcs700.trdt(j)
							keep.trtm = arr.tipcs700.trtm(j)
							keep.sern = arr.tipcs700.sern(j)
						endif
					endif
				endif

								|#214852.en
				migrate tipcs700
								|#214852.sn
				arr.tipcs700.proc(j) = 1
			endfor
		until not find.cwar
		handle.inventory.transfers.customized.items(	|#1133346.sn
							keep.cprj,
							keep.item,
							arr.len.tipcs700,
							arr.tipcs700.cwar)
								|#1133346.en
	endif
endselect

free.mem(arr.tipcs700.cwar)
free.mem(arr.tipcs700.trdt)
free.mem(arr.tipcs700.trtm)
free.mem(arr.tipcs700.sern)
free.mem(arr.tipcs700.proc)

								|#214852.en

								|#209255.sn
|* next functions are used to create receipt transactions for items that
|* do have inventory onhand, but don't have inventory transactions.
handle.inventory.without.tdinv700()
handle.inventory.without.tipcs700()
								|#209255.en

free.mem(arr.whina112.trdt)
free.mem(arr.whina112.seqn)
free.mem(arr.whina112.qskt)

free.mem.pur.receipt.array()	|#234040.n
:PRTX:END
:STAT:V
:VARI:#include "ibcswh0011"			|#CNT.n
#include "itccom0015"			|#234040.n
long	g.mc.depth

long			nr.lots				|#TELAIR_2.n
string			arr.lots(1,1)	based		|#TELAIR_2.n
domain	tdltc.clot	lot.serial			|#fp3

long			i
long			itid
long			prev.sern
long			array.len
long			hold.tdinv700.trdt
long			hold.tdinv700.trtm		|#TELAIR.sn
long			hold.tdinv700.sern
long			hold.tipcs700.trdt
long			hold.tipcs700.trtm
long			hold.tipcs700.sern		|#TELAIR.en

long			dummy.array.nr
long			receipt.counter

long			arr.len.tipcs700			|#214852.sn
domain	tccwar		arr.tipcs700.cwar(1)	based
long			arr.tipcs700.trdt(1)	based
long			arr.tipcs700.trtm(1)	based
long			arr.tipcs700.sern(1)	based
long			arr.tipcs700.proc(1)	based
long			j
long			k
domain	tcbool		find.cwar
long			found.trdt
long			found.trtm
long			found.sern
domain	tcqiv1		stock
domain	tcitem		keep.item
domain	tccprj		keep.cprj
domain	tccwar		keep.cwar	fixed
long			keep.trdt
long			keep.trtm
long			keep.sern			|#214852.en

long			hold.koor
long			hold.kost
string			hold.orno(9)
string			hold.trdt(22)
long			hold.seqn
domain	tcqiv1		hold.qstk
string			hold.bpid(9)
domain	tcqiv1		hold.qhnd			|#214224.n

							| #  800 -  142000.sn
long			check.seqn
long			check1.trdt
long			check2.trdt
domain	tccwar		check2.cwar
domain	tcitem		check2.item
							| #  800 -  142000.en
domain	tcqiv1		dummy.receipt.qty

domain	tcyesno		var.whinr110.prnt
domain	tccwar		var.whinr110.cwar		|#214852.n

long			orig.tipcs700.pono	 	|*2043803_4.n

string			arr.whina112.trdt(1,1)	based
long			arr.whina112.seqn(1)	based
double			arr.whina112.qskt(1)	based

long			var.whinr110.valm
long			var.whinr110.koor
long			var.whinr110.kost
string			var.whinr110.orno(9)
long			var.whinr110.pono
long			var.whinr110.srnb
long			var.whinr110.seqn
double			var.whinr110.qstk
string			var.whinr110.bpid(9)
string			var.whinr110.cprj(9)
string			var.whinr110.trdt(22)
string			var.whinr110.itid(9)
long			var.whinr110.itse
double			var.whinr110.qhnd
domain	tdltc.clot	var.whinr110.clot
domain	tdltc.clot	var.whinr110.serl
string			var.whinr110.shpm(9)			|#202924.n
long			var.whinr110.shpo			|#202924.n
string			var.whinr110.rcno(9)			|#227896.sn
long			var.whinr110.rcln			|#227896.en

double			var.whina112.qskt
double			var.whina112.qstk
domain	tdltc.clot	var.whina112.clot 		|*2043803_2.n
domain	tdltc.clot	var.whina112.serl		|*2043803_2.n

double			issued
double			onhand.inventory

domain	bccost		var.whina113.cpcp
double			var.whina113.amnt(3)
double			var.whina113.mauc(3)

double			var.whina114.qstk

string			var.whina114.trdt(22)
long			var.whina114.seqn
long			var.whina114.sern

domain	bccost		var.whina115.cpcp
double			var.whina115.amnt(3)

domain	tcitem		hold.item
domain	tccwar		hold.cwar
domain	tccprj		hold.cprj

domain	tckoor		curr.koor			|#205835.n
domain	tckost		curr.kost
double			curr.quan

double			to.be.received
double			remain.quan
double			hold.negative

double			var.whwmd255.coqu

domain	tcmcs.s200m	o.mess

domain	tcmcs.s200m	errmess				|#SL204550.sn
domain	tcpono		bom.line			|#SL204550.en
domain	tcqiv1		ilc.quantity			|#2043803.n
domain	tckost		ilc.transaction.type		|#2043803.n

							|#234040.sn
static	domain	tcmcs.str215	pur.receipt.arr(1)	based
static	domain	tcpono		receipt.line.arr(1)	based

static	domain	tcbool		lengths.set
static	long	array.length
static	long	search_def(1,4)

static	domain	tcmcs.byte	orno.length, orno.pos
static	domain	tcmcs.byte	pono.length, pono.pos
static	domain	tcmcs.byte	srnb.length, srnb.pos
static	domain	tcmcs.byte	reno.length, reno.pos

static	domain	tcmcs.long	alloc.elements
static	domain	tcmcs.byte	alloc.counter
							|#234040.en
:STBL:tcmcs003,tdinv700,tipcs700,tipcs021,bcstc008,tiitm001,bcswh004,ticpr300,bcstc000,tdinv001,tipcs350,tdilc102,tdinv100,tdilc000,tdinv000,tdsls045,tdrpl100,tdltc004,tdilc301,tdilc101,tdpur045,tipcs530
:COMT:START

:COMT:END
:TEXT:

:TEXT:END
:ISMS:True
MO
:MPRF:61
:VERS:B4ct
:RELE:61
:CUST:f106
:TCPAC:wh
:TCMOD:wmd
:TFLNO:260
:LDAT:12/10/2017 12:17:21 PM
:PRTX:START
migrate tdinv001
:PRTX:END
:STAT:V
:VARI:#include "ibcswh0011"			|#CNT.n

domain	tccwar	var.whwmd210.cwar 				|#214852.n

long	var.whwmd210.nopr
long	var.whwmd210.ptyp
double	var.whwmd210.sftm
double	var.whwmd210.maxs			|#1356322.n
string	var.whwmd210.abcc(1)
string	var.whwmd210.item(47)
domain	bcstc.nprj	g.new.project.code
long	var.whwmd210.ialt
long	skip.record
double	var.whwmd210.oqmf
long	var.whwmd210.valm					|#146674.n

long	g.mc.depth
long	i
domain	tccopr	amount.per.cc(3)		|#CNT.n

domain	tidate		date.last.cost.price.change

|domain	tccwar		var.whwmd215.cwar		|#1011283.o
domain	tccwar		var.whwmd215.cwar	fixed	|#1011283.n
string			var.whwmd215.item(47)
domain	tcqiv1		var.whwmd215.qhnd
domain	tcqiv1		var.whwmd215.qchd
domain	tcqiv1		var.whwmd215.qblk
|domain	tcqiv1		var.whwmd215.qbpl		|#1425776.o
domain	tcqiv1		var.whwmd215.qord
domain	tcqiv1		var.whwmd215.qcor
domain	tcqiv1		var.whwmd215.qint
domain	tcqiv1		var.whwmd215.qall
domain	tcqiv1		var.whwmd215.qcal
domain	tcqiv1		var.whwmd215.qcom
domain	tcqiv1		var.whwmd215.qlal
domain	tcqiv1		var.whwmd215.qcpr
string			var.whwmd215.ltdt(22)
string			var.whwmd215.hstd(22)
string			var.whwmd215.lsid(22)
domain	tcqiv1		var.whwmd215.qcis
domain	tcqiv1		var.whwmd215.qhib

domain	bccost		var.whwmd217.cpcp
domain	tccopr		var.whwmd217.ftpa(3)
domain	tccopr		var.whwmd217.mauc(3)

domain	tcqiv1		var.whwmd260.qprb		|#fp8.sn
|domain	tcqiv1		var.whwmd260.qppl		|#1425776.o
domain	tcqiv1		var.whwmd260.qblk
|domain	tcqiv1		var.whwmd260.qbpl		|#fp8.en	|#1425776.o

domain	bccost		material.component
domain	bccost		operation.component
domain	bccost		surcharge.component
domain	bccost		detail.cost.component
domain tcamnt		material.component.ftpa(3)
domain tcamnt		operation.component.ftpa(3)
domain tcamnt		surcharge.component.ftpa(3)

long			result

domain	tcqiv1		blocked.quantity.decrease
domain	tcqiv1		move.to.allocated
domain	tcqiv1		move.to.onorder

domain	tcmcs.str19	cwar_item_array(1)	based	|#1011283.sn
domain	tcqiv1		qsts_array(1)	based
	long		cwar.item.array.index
domain	tcmcs.str25	cwar_cprj_item_array(1)	based
domain	tcqiv1		qsts_cprj_array(1)	based
	long		cwar.cprj.item.array.index	|#1011283.en

	long		no.warehouses			|#1399055.sn
domain	tccwar		warehouses(1)		based
domain	tcqiv1		qty.allocated(1)		based
domain	tcqiv1		qty.on.order(1)		based
domain	tcbool		warehouse.handled(1)	based	|#1399055.en
:STBL:tcmcs003,tdilc000,tdilc101,tdilc111,tdilc401,tdinv000,tdinv001,tdpur041,tdrpl100,tdsls041,ticpr300,ticst001,tiitm001,tipcs000,tipcs020,tipcs021,tipcs350,tipcs500,tipcs530,tisfc001,tppdm605,bcstc000
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---

Source session: %SStdinv0101m000
                %SStipcs2121m000
Target session: %TSwhwmd2510m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:bp
:TCMOD:mdm
:TFLNO:001
:LDAT:6/17/2018 11:16:53 PM
:PRTX:START
Select 	tppdm000.pprj		|#FP7.sn
from	tppdm000
selectdo
endselect 			|#FP7.en


migrate tccom001
migrate bcsts000
:PRTX:END
:STAT:V
:VARI:string	dummy.err.mess

domain	bcstr16	var.tccom001.seak
domain	bcstr6	var.tccom001.clrt		|#LN10.4.1.n
|domain	bcstr3	var.tccom001.clrt		|#LN10.4.1.o
domain	bcstr6	var.tccom001.cwoc

double var.tccom001.wgrt

string	var.bpmdm001.cadr(9)
long	var.bpmdm001.sexe
string	var.bpmdm001.cist(15)
string	var.tccom001.emno(9)	|#sp2.n
:STBL:tccom001,bcsbp003,bcsts002,bcsts000,bcstc018,bcsbp000,bcsti011,tppdm000
:COMT:START
---  Changes in table design  ---
In %SV the employee data is stored in one table %STtccom001. In %TV the employee data is stored in the package that owns the data. In total four tables store employee related data:
- %TTtccom001
- %TTbpmdm001
- %TTtppdm801
- %TTtsmdm140
Not all of these tables are necessarily filled for each record that is migrated from %SV.


---  Source and Target Sessions  ---
%SStccom0101m000 - %TStccom0101m000
%SStccom0101m000 - %TSbpmdm0101m000
%SStccom0101m000 - %TStppdm8101m000
%SStppdm8101m000 - %TStppdm8101m000
%SStccom0101m000 - %TStsmdm1140m000


---  Migration Logic  ---
The target tables %TTtccom001 and %TTbpmdm001 are always filled for each employee in source table %STtccom001. The target tables %TTtppdm801 and %TTtsmdm140 are conditionally filled.
Table %TTtppdm801 is filled if project-related data is entered in %SV for the employee. The project-related data in the employees table is:
- %SFtccom001.ctrg
- %SFtccom001.rats
- %SFtccom001.dpwk
- %SFtccom001.hrsd
So if one of the fields mentioned above is filled for an employee, then table %TTtppdm801 is filled for that employee in %TV.
Table %TTtsmdm140 is filled if the employee is used in one of the following tables in %SV:
- %STtssma113
- %STtssma305
- %STtssma306
- %STtssma307
- %STtssma310
- %STtssma406
- %STtssma301
- %STtssma310
- %STtssma404
- %STtssma410
- %STtssma501
- %STtssma510
If an employee is used in one of these tables, then that employee is registered in a mapping table (%STbcsts002). All employees of that mapping table will be migrated as service-employee in table %TTtsmdm140.
Next to this an employee is registered in session %SSbcsts0100m000. This employee results in this filling of table %TTtsmdm140 together with %TTtccom001 and %TTbpmdm001.


---  Migration Parameters  ---
%STbcsts000


---  Migration Mapping Tables  ---
%STbcsts002
%STbcsbp003
%STbcstc004
%STbcstc018


---  Technical Notes  ---
Not Applicable.


---  Performance  ---
Not Applicable.
:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:bp
:TCMOD:tmm
:TFLNO:100
:LDAT:1/2/2018 11:39:38 AM
:PRTX:START
ret = read.parameters.people(dummy.err.mess)
|#testje
migrate tihra100
:PRTX:END
:STAT:V
:VARI:table	tbcsbp000
table	tbcsbp002
table	tbcsbp004
table	tbcstc006
table	ttihra000

domain	tcmcs.s200m	dummy.err.mess
domain	tcmcs.long	ret

long			day.number


long			var.bptmm100.type
long			var.bptmm100.seqn
domain	bcstr22		var.bptmm100.rgdt
domain	bcstr22		var.bptmm100.trdt		|#147118.n
domain	tisfc.prtm	var.bptmm100.hrea
domain	tccwtt		var.bptmm100.wtsc
domain	tcckow		var.bptmm100.chlt
domain	tisfc.prtm	var.bptmm100.hrma
domain	bcstr22		var.bptmm100.stdt
domain	bcstr22		var.bptmm100.endt
domain	tcprcg		var.bptmm100.perc
domain	tctxtn		var.bptmm100.txta
domain	tccwoc		var.bptmm100.emdp		|#GEN0205.n

long			var.bptmm111.seqn		|#158562.n
domain	bcstr8		var.bptmm111.gtsk
domain	tcdsca		var.bptmm111.dsca
domain	bcstr8		var.bptmm111.cpcp
domain	tisfc.prtm	var.bptmm111.hrea(8)	|* array
domain	tcckow		var.bptmm111.chlt
domain	bcstr22		var.bptmm111.trdt		|#147118.n
domain	tctxtn		var.bptmm111.txta
domain	tctxtn		var.bptmm111.txtb
domain	tctxtn		var.bptmm111.txtc
domain	tctxtn		var.bptmm111.txtd
domain	tctxtn		var.bptmm111.txte
domain	tctxtn		var.bptmm111.txtf
domain	tctxtn		var.bptmm111.txtg

long			var.bptmm120.seqn		|#158562.n
domain	bcstr22		var.bptmm120.stdt
domain	bcstr22		var.bptmm120.endt
domain	bcstr22		var.bptmm120.rgdt
domain	bcstr22		var.bptmm120.trdt		|#147118.n
domain	tccwtt		var.bptmm120.wtsc
domain	tcckow		var.bptmm120.chlt

static	domain	tctano	s.tano
static	domain	tcbool	s.service.rates.present

long			var.bptmm130.seqn		|#158562.n
domain	bcstr22		var.bptmm130.stdt
domain	bcstr22		var.bptmm130.endt
domain	bcstr22		var.bptmm130.rgdt
domain	bcstr22		var.bptmm130.trdt		|#147118.n
domain	tccwtt		var.bptmm130.wtsc
domain	tcckow		var.bptmm130.chlt
domain	bcstr8		var.bptmm130.cpcp

long			var.bptmm150.seqn
domain	bcstr22		var.bptmm150.stdt
domain	bcstr8		var.bptmm150.gtsk
domain	tcdsca		var.bptmm150.dsca
domain	bcstr8		var.bptmm150.cpcp

long			var.bptmm170.seqn		|#158562.n
domain	bcstr22		var.bptmm170.stdt
domain	bcstr22		var.bptmm170.endt
domain	bcstr22		var.bptmm170.rgdt
domain	bcstr22		var.bptmm170.trdt		|#147118.n
domain	tccwtt		var.bptmm170.wtsc
domain	tcckow		var.bptmm170.chlt

#define	GENERAL_TASK	1
#define	PCS		3
#define	PRODUCTION	4
#define	SERVICE	6

#include	<bic_tt>
|#include "itssma0011"				|#MCR.o
:STBL:tihra100
:COMT:START
---  Changes in table design  ---
In %SV hours can be entered in two packages:
- in TI via the %SStihra1101m000 session
- in TP via the %SStphrs1100m000 session

In %SV the actual and the processed hours are stored in one table.

In %TV the hours are centrally registered and processed in the BaanPeople package. In this package the actual and the processed hours are stored in separate tables. If hours are processed, then the tables containing history data are filled. The tables containing actual data remain filled, until the data is explicitly removed via the %TSbptmm1206m000 session.
The hours with transaction type '6 - Production (PMG) Hours' (session %SStihra1101m000) are not supported in %TV. These records will not be migrated.

The architecture of the BaanPeople package is rather different compared to the hours registration modules of %SV. For the actual (not-processed) hours the following tables are valid:
%TTbptmm100
%TTbptmm110
%TTbptmm111
%TTbptmm120
%TTbptmm130
%TTbptmm140
%TTbptmm150
%TTbptmm160
%TTbptmm170

The first table stores time data. All other tables store both time and logistic data.


---  Source and Target Sessions  ---
Overview for all transaction types:
   %SStihra1101m000 - %TSbptmm1100m000
For transaction types '4 - Indirect Hours' and '5 - Absence Hours':
   %SStihra1101m000 - %TSbptmm1111m200
For transaction type '2 - Production Hours':
   %SStihra1101m000 - %TSbptmm1120m000
For transaction type '3 - Service Hours':
   %SStihra1101m000 - %TSbptmm1130m000
For transaction type '1 - Project Hours':
   %SStihra1101m000 - %TSbptmm1170m000


---  Migration Logic  ---
An important pre-condition is that the hours that are registered in the %SStphrs1100m000 session must be finalized. This can be done with help of the %SStphrs1230m000 session.
The reason for this is that cost lines are registered at the moment of entering the hours in the tpHRS-module. For Project related hours the cost lines are present in TP, for Service related hours the cost lines are present in TS, for General hours in TF, for Other hours no cost lines are present.
If all these hours are migrated to BaanPeople, then the hours must still be processed. Because of that the cost lines related to the hours registration must be skipped during conversion. However the link between hours lines and cost lines is not present in all cost lines, and for that reason it is not possible to skip these lines during migration. If all hours are finalized, then the hours lines will not be migrated to the actual hours tables in the target version. In this way the processing of hours lines is performed only once (in %SV).

Because of this pre-condition, the tables containing actual hours data is only coming from the %SStihra1101m000 session.
Below a rough mapping from %SV to %TV is described of the non-processed records that are available in session %SStihra1101m000:
- Transaction type is 'Project Hours'. The record is migrated to table %TTbptmm170 and to table %TTbptmm100.
- Transaction type is 'Production Hours'. The record is migrated to table %TTbptmm120 and to table %TTbptmm100.
- Transaction type is 'Service Hours'. The record is migrated to table %TTbptmm130 and to table %TTbptmm100.
- Transaction type is 'Absence Hours' or 'Indirect Hours'. The record is migrated to table %TTbptmm111, to table %TTbptmm150 and to table %TTbptmm100.
- Transaction type is 'Production (PMG) Hours'. The record is not migrated.

For hours linked to Service Orders that are registered in the %SStihra1101m000 session only those records are migrated that have rates defined for the task. These rates must be present in the %SStssma3120m000 session.

---  Migration Parameters  ---
%SFbcsbp000.dsbt
%SFtihra000.cltm


---  Migration Mapping Tables  ---
%STbcsbp002
%STbcsbp004
%STbcstc006


---  Technical Notes  ---
Not applicable.


---  Performance  ---
Not applicable.
:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:bp
:TCMOD:tmm
:TFLNO:111
:LDAT:1/2/2018 11:39:38 AM
:PRTX:START
ret = read.parameters.people(dummy.err.mess)
|#testje
migrate tihra100
:PRTX:END
:STAT:V
:VARI:table	tbcsbp000
table	tbcsbp002
table	tbcsbp004
table	tbcstc006
table	ttihra000

domain	tcmcs.s200m	dummy.err.mess
domain	tcmcs.long	ret

long			day.number


long			var.bptmm100.type
long			var.bptmm100.seqn
domain	bcstr22		var.bptmm100.rgdt
domain	bcstr22		var.bptmm100.trdt		|#147118.n
domain	tisfc.prtm	var.bptmm100.hrea
domain	tccwtt		var.bptmm100.wtsc
domain	tcckow		var.bptmm100.chlt
domain	tisfc.prtm	var.bptmm100.hrma
domain	bcstr22		var.bptmm100.stdt
domain	bcstr22		var.bptmm100.endt
domain	tcprcg		var.bptmm100.perc
domain	tctxtn		var.bptmm100.txta
domain	tccwoc		var.bptmm100.emdp		|#GEN0205.n

long			var.bptmm111.seqn		|#158562.n
domain	bcstr8		var.bptmm111.gtsk
domain	tcdsca		var.bptmm111.dsca
domain	bcstr8		var.bptmm111.cpcp
domain	tisfc.prtm	var.bptmm111.hrea(8)	|* array
domain	tcckow		var.bptmm111.chlt
domain	bcstr22		var.bptmm111.trdt		|#147118.n
domain	tctxtn		var.bptmm111.txta
domain	tctxtn		var.bptmm111.txtb
domain	tctxtn		var.bptmm111.txtc
domain	tctxtn		var.bptmm111.txtd
domain	tctxtn		var.bptmm111.txte
domain	tctxtn		var.bptmm111.txtf
domain	tctxtn		var.bptmm111.txtg

long			var.bptmm120.seqn		|#158562.n
domain	bcstr22		var.bptmm120.stdt
domain	bcstr22		var.bptmm120.endt
domain	bcstr22		var.bptmm120.rgdt
domain	bcstr22		var.bptmm120.trdt		|#147118.n
domain	tccwtt		var.bptmm120.wtsc
domain	tcckow		var.bptmm120.chlt

static	domain	tctano	s.tano
static	domain	tcbool	s.service.rates.present

long			var.bptmm130.seqn		|#158562.n
domain	bcstr22		var.bptmm130.stdt
domain	bcstr22		var.bptmm130.endt
domain	bcstr22		var.bptmm130.rgdt
domain	bcstr22		var.bptmm130.trdt		|#147118.n
domain	tccwtt		var.bptmm130.wtsc
domain	tcckow		var.bptmm130.chlt
domain	bcstr8		var.bptmm130.cpcp

long			var.bptmm150.seqn
domain	bcstr22		var.bptmm150.stdt
domain	bcstr8		var.bptmm150.gtsk
domain	tcdsca		var.bptmm150.dsca
domain	bcstr8		var.bptmm150.cpcp

long			var.bptmm170.seqn		|#158562.n
domain	bcstr22		var.bptmm170.stdt
domain	bcstr22		var.bptmm170.endt
domain	bcstr22		var.bptmm170.rgdt
domain	bcstr22		var.bptmm170.trdt		|#147118.n
domain	tccwtt		var.bptmm170.wtsc
domain	tcckow		var.bptmm170.chlt

#define	GENERAL_TASK	1
#define	PCS		3
#define	PRODUCTION	4
#define	SERVICE	6

#include	<bic_tt>
|#include "itssma0011"				|#MCR.o
:STBL:tihra100
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:bp
:TCMOD:tmm
:TFLNO:120
:LDAT:1/2/2018 11:39:39 AM
:PRTX:START
ret = read.parameters.people(dummy.err.mess)
|#testje
migrate tihra100
:PRTX:END
:STAT:V
:VARI:table	tbcsbp000
table	tbcsbp002
table	tbcsbp004
table	tbcstc006
table	ttihra000

domain	tcmcs.s200m	dummy.err.mess
domain	tcmcs.long	ret

long			day.number


long			var.bptmm100.type
long			var.bptmm100.seqn
domain	bcstr22		var.bptmm100.rgdt
domain	bcstr22		var.bptmm100.trdt		|#147118.n
domain	tisfc.prtm	var.bptmm100.hrea
domain	tccwtt		var.bptmm100.wtsc
domain	tcckow		var.bptmm100.chlt
domain	tisfc.prtm	var.bptmm100.hrma
domain	bcstr22		var.bptmm100.stdt
domain	bcstr22		var.bptmm100.endt
domain	tcprcg		var.bptmm100.perc
domain	tctxtn		var.bptmm100.txta
domain	tccwoc		var.bptmm100.emdp		|#GEN0205.n

long			var.bptmm111.seqn		|#158562.n
domain	bcstr8		var.bptmm111.gtsk
domain	tcdsca		var.bptmm111.dsca
domain	bcstr8		var.bptmm111.cpcp
domain	tisfc.prtm	var.bptmm111.hrea(8)	|* array
domain	tcckow		var.bptmm111.chlt
domain	bcstr22		var.bptmm111.trdt		|#147118.n
domain	tctxtn		var.bptmm111.txta
domain	tctxtn		var.bptmm111.txtb
domain	tctxtn		var.bptmm111.txtc
domain	tctxtn		var.bptmm111.txtd
domain	tctxtn		var.bptmm111.txte
domain	tctxtn		var.bptmm111.txtf
domain	tctxtn		var.bptmm111.txtg

long			var.bptmm120.seqn		|#158562.n
domain	bcstr22		var.bptmm120.stdt
domain	bcstr22		var.bptmm120.endt
domain	bcstr22		var.bptmm120.rgdt
domain	bcstr22		var.bptmm120.trdt		|#147118.n
domain	tccwtt		var.bptmm120.wtsc
domain	tcckow		var.bptmm120.chlt

static	domain	tctano	s.tano
static	domain	tcbool	s.service.rates.present

long			var.bptmm130.seqn		|#158562.n
domain	bcstr22		var.bptmm130.stdt
domain	bcstr22		var.bptmm130.endt
domain	bcstr22		var.bptmm130.rgdt
domain	bcstr22		var.bptmm130.trdt		|#147118.n
domain	tccwtt		var.bptmm130.wtsc
domain	tcckow		var.bptmm130.chlt
domain	bcstr8		var.bptmm130.cpcp

long			var.bptmm150.seqn
domain	bcstr22		var.bptmm150.stdt
domain	bcstr8		var.bptmm150.gtsk
domain	tcdsca		var.bptmm150.dsca
domain	bcstr8		var.bptmm150.cpcp

long			var.bptmm170.seqn		|#158562.n
domain	bcstr22		var.bptmm170.stdt
domain	bcstr22		var.bptmm170.endt
domain	bcstr22		var.bptmm170.rgdt
domain	bcstr22		var.bptmm170.trdt		|#147118.n
domain	tccwtt		var.bptmm170.wtsc
domain	tcckow		var.bptmm170.chlt

#define	GENERAL_TASK	1
#define	PCS		3
#define	PRODUCTION	4
#define	SERVICE	6

#include	<bic_tt>
|#include "itssma0011"				|#MCR.o
:STBL:tihra100
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:bp
:TCMOD:tmm
:TFLNO:130
:LDAT:1/2/2018 11:39:39 AM
:PRTX:START
ret = read.parameters.people(dummy.err.mess)
|#testje
migrate tihra100
:PRTX:END
:STAT:V
:VARI:table	tbcsbp000
table	tbcsbp002
table	tbcsbp004
table	tbcstc006
table	ttihra000

domain	tcmcs.s200m	dummy.err.mess
domain	tcmcs.long	ret

long			day.number


long			var.bptmm100.type
long			var.bptmm100.seqn
domain	bcstr22		var.bptmm100.rgdt
domain	bcstr22		var.bptmm100.trdt		|#147118.n
domain	tisfc.prtm	var.bptmm100.hrea
domain	tccwtt		var.bptmm100.wtsc
domain	tcckow		var.bptmm100.chlt
domain	tisfc.prtm	var.bptmm100.hrma
domain	bcstr22		var.bptmm100.stdt
domain	bcstr22		var.bptmm100.endt
domain	tcprcg		var.bptmm100.perc
domain	tctxtn		var.bptmm100.txta
domain	tccwoc		var.bptmm100.emdp		|#GEN0205.n

long			var.bptmm111.seqn		|#158562.n
domain	bcstr8		var.bptmm111.gtsk
domain	tcdsca		var.bptmm111.dsca
domain	bcstr8		var.bptmm111.cpcp
domain	tisfc.prtm	var.bptmm111.hrea(8)	|* array
domain	tcckow		var.bptmm111.chlt
domain	bcstr22		var.bptmm111.trdt		|#147118.n
domain	tctxtn		var.bptmm111.txta
domain	tctxtn		var.bptmm111.txtb
domain	tctxtn		var.bptmm111.txtc
domain	tctxtn		var.bptmm111.txtd
domain	tctxtn		var.bptmm111.txte
domain	tctxtn		var.bptmm111.txtf
domain	tctxtn		var.bptmm111.txtg

long			var.bptmm120.seqn		|#158562.n
domain	bcstr22		var.bptmm120.stdt
domain	bcstr22		var.bptmm120.endt
domain	bcstr22		var.bptmm120.rgdt
domain	bcstr22		var.bptmm120.trdt		|#147118.n
domain	tccwtt		var.bptmm120.wtsc
domain	tcckow		var.bptmm120.chlt

static	domain	tctano	s.tano
static	domain	tcbool	s.service.rates.present

long			var.bptmm130.seqn		|#158562.n
domain	bcstr22		var.bptmm130.stdt
domain	bcstr22		var.bptmm130.endt
domain	bcstr22		var.bptmm130.rgdt
domain	bcstr22		var.bptmm130.trdt		|#147118.n
domain	tccwtt		var.bptmm130.wtsc
domain	tcckow		var.bptmm130.chlt
domain	bcstr8		var.bptmm130.cpcp

long			var.bptmm150.seqn
domain	bcstr22		var.bptmm150.stdt
domain	bcstr8		var.bptmm150.gtsk
domain	tcdsca		var.bptmm150.dsca
domain	bcstr8		var.bptmm150.cpcp

long			var.bptmm170.seqn		|#158562.n
domain	bcstr22		var.bptmm170.stdt
domain	bcstr22		var.bptmm170.endt
domain	bcstr22		var.bptmm170.rgdt
domain	bcstr22		var.bptmm170.trdt		|#147118.n
domain	tccwtt		var.bptmm170.wtsc
domain	tcckow		var.bptmm170.chlt

#define	GENERAL_TASK	1
#define	PCS		3
#define	PRODUCTION	4
#define	SERVICE	6

#include	<bic_tt>
|#include "itssma0011"				|#MCR.o
:STBL:tihra100
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:bp
:TCMOD:tmm
:TFLNO:150
:LDAT:1/2/2018 11:39:40 AM
:PRTX:START
ret = read.parameters.people(dummy.err.mess)
|#testje
migrate tihra100
:PRTX:END
:STAT:V
:VARI:table	tbcsbp000
table	tbcsbp002
table	tbcsbp004
table	tbcstc006
table	ttihra000

domain	tcmcs.s200m	dummy.err.mess
domain	tcmcs.long	ret

long			day.number


long			var.bptmm100.type
long			var.bptmm100.seqn
domain	bcstr22		var.bptmm100.rgdt
domain	bcstr22		var.bptmm100.trdt		|#147118.n
domain	tisfc.prtm	var.bptmm100.hrea
domain	tccwtt		var.bptmm100.wtsc
domain	tcckow		var.bptmm100.chlt
domain	tisfc.prtm	var.bptmm100.hrma
domain	bcstr22		var.bptmm100.stdt
domain	bcstr22		var.bptmm100.endt
domain	tcprcg		var.bptmm100.perc
domain	tctxtn		var.bptmm100.txta
domain	tccwoc		var.bptmm100.emdp		|#GEN0205.n

long			var.bptmm111.seqn		|#158562.n
domain	bcstr8		var.bptmm111.gtsk
domain	tcdsca		var.bptmm111.dsca
domain	bcstr8		var.bptmm111.cpcp
domain	tisfc.prtm	var.bptmm111.hrea(8)	|* array
domain	tcckow		var.bptmm111.chlt
domain	bcstr22		var.bptmm111.trdt		|#147118.n
domain	tctxtn		var.bptmm111.txta
domain	tctxtn		var.bptmm111.txtb
domain	tctxtn		var.bptmm111.txtc
domain	tctxtn		var.bptmm111.txtd
domain	tctxtn		var.bptmm111.txte
domain	tctxtn		var.bptmm111.txtf
domain	tctxtn		var.bptmm111.txtg

long			var.bptmm120.seqn		|#158562.n
domain	bcstr22		var.bptmm120.stdt
domain	bcstr22		var.bptmm120.endt
domain	bcstr22		var.bptmm120.rgdt
domain	bcstr22		var.bptmm120.trdt		|#147118.n
domain	tccwtt		var.bptmm120.wtsc
domain	tcckow		var.bptmm120.chlt

static	domain	tctano	s.tano
static	domain	tcbool	s.service.rates.present

long			var.bptmm130.seqn		|#158562.n
domain	bcstr22		var.bptmm130.stdt
domain	bcstr22		var.bptmm130.endt
domain	bcstr22		var.bptmm130.rgdt
domain	bcstr22		var.bptmm130.trdt		|#147118.n
domain	tccwtt		var.bptmm130.wtsc
domain	tcckow		var.bptmm130.chlt
domain	bcstr8		var.bptmm130.cpcp

long			var.bptmm150.seqn
domain	bcstr22		var.bptmm150.stdt
domain	bcstr8		var.bptmm150.gtsk
domain	tcdsca		var.bptmm150.dsca
domain	bcstr8		var.bptmm150.cpcp

long			var.bptmm170.seqn		|#158562.n
domain	bcstr22		var.bptmm170.stdt
domain	bcstr22		var.bptmm170.endt
domain	bcstr22		var.bptmm170.rgdt
domain	bcstr22		var.bptmm170.trdt		|#147118.n
domain	tccwtt		var.bptmm170.wtsc
domain	tcckow		var.bptmm170.chlt

#define	GENERAL_TASK	1
#define	PCS		3
#define	PRODUCTION	4
#define	SERVICE	6

#include	<bic_tt>
|#include "itssma0011"				|#MCR.o
:STBL:tihra100
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:bp
:TCMOD:tmm
:TFLNO:170
:LDAT:1/2/2018 11:39:40 AM
:PRTX:START
ret = read.parameters.people(dummy.err.mess)
|#testje
migrate tihra100
:PRTX:END
:STAT:V
:VARI:table	tbcsbp000
table	tbcsbp002
table	tbcsbp004
table	tbcstc006
table	ttihra000

domain	tcmcs.s200m	dummy.err.mess
domain	tcmcs.long	ret

long			day.number


long			var.bptmm100.type
long			var.bptmm100.seqn
domain	bcstr22		var.bptmm100.rgdt
domain	bcstr22		var.bptmm100.trdt		|#147118.n
domain	tisfc.prtm	var.bptmm100.hrea
domain	tccwtt		var.bptmm100.wtsc
domain	tcckow		var.bptmm100.chlt
domain	tisfc.prtm	var.bptmm100.hrma
domain	bcstr22		var.bptmm100.stdt
domain	bcstr22		var.bptmm100.endt
domain	tcprcg		var.bptmm100.perc
domain	tctxtn		var.bptmm100.txta
domain	tccwoc		var.bptmm100.emdp		|#GEN0205.n

long			var.bptmm111.seqn		|#158562.n
domain	bcstr8		var.bptmm111.gtsk
domain	tcdsca		var.bptmm111.dsca
domain	bcstr8		var.bptmm111.cpcp
domain	tisfc.prtm	var.bptmm111.hrea(8)	|* array
domain	tcckow		var.bptmm111.chlt
domain	bcstr22		var.bptmm111.trdt		|#147118.n
domain	tctxtn		var.bptmm111.txta
domain	tctxtn		var.bptmm111.txtb
domain	tctxtn		var.bptmm111.txtc
domain	tctxtn		var.bptmm111.txtd
domain	tctxtn		var.bptmm111.txte
domain	tctxtn		var.bptmm111.txtf
domain	tctxtn		var.bptmm111.txtg

long			var.bptmm120.seqn		|#158562.n
domain	bcstr22		var.bptmm120.stdt
domain	bcstr22		var.bptmm120.endt
domain	bcstr22		var.bptmm120.rgdt
domain	bcstr22		var.bptmm120.trdt		|#147118.n
domain	tccwtt		var.bptmm120.wtsc
domain	tcckow		var.bptmm120.chlt

static	domain	tctano	s.tano
static	domain	tcbool	s.service.rates.present

long			var.bptmm130.seqn		|#158562.n
domain	bcstr22		var.bptmm130.stdt
domain	bcstr22		var.bptmm130.endt
domain	bcstr22		var.bptmm130.rgdt
domain	bcstr22		var.bptmm130.trdt		|#147118.n
domain	tccwtt		var.bptmm130.wtsc
domain	tcckow		var.bptmm130.chlt
domain	bcstr8		var.bptmm130.cpcp

long			var.bptmm150.seqn
domain	bcstr22		var.bptmm150.stdt
domain	bcstr8		var.bptmm150.gtsk
domain	tcdsca		var.bptmm150.dsca
domain	bcstr8		var.bptmm150.cpcp

long			var.bptmm170.seqn		|#158562.n
domain	bcstr22		var.bptmm170.stdt
domain	bcstr22		var.bptmm170.endt
domain	bcstr22		var.bptmm170.rgdt
domain	bcstr22		var.bptmm170.trdt		|#147118.n
domain	tccwtt		var.bptmm170.wtsc
domain	tcckow		var.bptmm170.chlt

#define	GENERAL_TASK	1
#define	PCS		3
#define	PRODUCTION	4
#define	SERVICE	6

#include	<bic_tt>
|#include "itssma0011"				|#MCR.o
:STBL:tihra100
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:bp
:TCMOD:tmm
:TFLNO:200
:LDAT:1/2/2018 11:52:00 AM
:PRTX:START
hra.period.definition = false

var.bptmm2xx.ccur = get.home.currency.orig.comp()
var.bptmm2xx.prdt = utc(date.num(), time.num())

ret.long = read.parameters.people(dummy.err.mess)
get.period.table.code.for.ti(var.bptmm2xx.cpdt)

migrate	tihra100

ret.long = read.parameters.common(dummy.err.mess)
ret.long = read.parameters.project(dummy.err.mess)
get.period.table.code.for.tp(var.bptmm2xx.cpdt)
migrate tphrs100
:PRTX:END
:STAT:V
:VARI:table	tbcsbp000
table	tbcsbp002
table	tbcsbp004
table	tbcstc000
table	tbcstc006
table	tbcstc011
table	tbcstc029
table	tbcstp000
table	ttihra000
table	ttpppc001

	domain	tcmcs.s200m	dummy.err.mess
	domain	tcmcs.long	ret.long
	double			ret.double
	domain	bcstr50		ret.string

	domain	tcbool		hra.period.definition

	domain	bcstp.cpdt	var.bptmm2xx.cpdt
	domain	bcstr22		var.bptmm2xx.prdt
	domain	tcccur		var.bptmm2xx.ccur

	domain	bcstr6		var.bptmm200.emno
	domain	tcyrno		var.bptmm200.year
	domain	tcpern		var.bptmm200.peri
	domain	tcmcs.long	var.bptmm200.type
	domain	tcmcs.long	var.bptmm200.psqn
	domain	bcstr22		var.bptmm200.trdt
	domain	bcstr22		var.bptmm200.rgdt
	domain	bcstd.fent	var.bptmm200.cwoc
	domain	tccwtt		var.bptmm200.wtsc
	domain	tisfc.prtm	var.bptmm200.hrea
	domain	tcckow		var.bptmm200.chlt
	domain	tisfc.prtm	var.bptmm200.hrma
	domain	bcstr22		var.bptmm200.stdt
	domain	bcstr22		var.bptmm200.endt
	domain	tcprcg		var.bptmm200.perc
	|domain	tcamnt		var.bptmm200.prlc	|#MCR.so
	|domain	tcamnt		var.bptmm200.prmc
	|domain	tcamnt		var.bptmm200.proc	|#MCR.eo
	
		long		element			|#MCR.sn
	domain	tcamnt		var.bptmm200.prlc(3)	
	domain	tcamnt		var.bptmm200.prmc(3)
	domain	tcamnt		var.bptmm200.proc(3)	|#MCR.en

	domain	tclogn		var.bptmm200.logn
	domain	tctxtn		var.bptmm200.txta
	domain	tccwoc		var.bptmm200.emdp	|#GEN-0205.n

	domain	tcmcs.long	var.bptmm210.psqn
	domain	tcmcs.long	var.bptmm210.swct
	domain	tcdsca		var.bptmm210.dsca
	domain	bcstr8		var.bptmm210.cpcp
	domain	bcstr22		var.bptmm210.stdt
	domain	bcstr22		var.bptmm210.rdat
	domain	tcecrt		var.bptmm210.rate
	domain	tcratf		var.bptmm210.ratf
	domain	bcrtyp		var.bptmm210.rtyp

	domain	bcstr6		var.bptmm211.emno
	domain	tcyrno		var.bptmm211.year
	domain	tcpern		var.bptmm211.peri
	domain	tcmcs.long	var.bptmm211.type
	domain	tcmcs.long	var.bptmm211.psqn
	domain	bcstr9		var.bptmm211.cprj
	domain	bcstr8		var.bptmm211.cspa
	domain	bcstr8		var.bptmm211.cact
	domain	bcstr4		var.bptmm211.cstl
	domain	tcmcs.long	var.bptmm211.swct
	domain	bcstr8		var.bptmm211.ccun
	domain	bcstr8		var.bptmm211.gtsk
	domain	bcstr8		var.bptmm211.expn
	domain	tcdsca		var.bptmm211.dsca
	domain	bccost		var.bptmm211.cpcp
	domain	bcstd.fent	var.bptmm211.cwoc
	domain	tisfc.prtm	var.bptmm211.hrea(8)	|* array
	domain	tcckow		var.bptmm211.chlt
	domain	bcstr22		var.bptmm211.rgdt
	domain	bcstr22		var.bptmm211.trdt
	domain	tcamnt		var.bptmm211.amnt
	domain	bcstr22		var.bptmm211.rdat
	domain	tcecrt		var.bptmm211.rate
	domain	tcratf		var.bptmm211.ratf
	domain	bcrtyp		var.bptmm211.rtyp
	domain	tcamnt		var.bptmm211.prlc(24)	| array
	domain	tcyesno		var.bptmm211.potf
	domain	tclogn		var.bptmm211.logn
	domain	tctxtn		var.bptmm211.txta
	domain	tctxtn		var.bptmm211.txtb
	domain	tctxtn		var.bptmm211.txtc
	domain	tctxtn		var.bptmm211.txtd
	domain	tctxtn		var.bptmm211.txte
	domain	tctxtn		var.bptmm211.txtf
	domain	tctxtn		var.bptmm211.txtg

	domain	bcstr22		var.bptmm220.stdt
	domain	bcstr22		var.bptmm220.endt
	domain	bcstr22		var.bptmm220.rgdt
	domain	bcstr22		var.bptmm220.trdt		|#147118.n
	domain	tcckow		var.bptmm220.chlt
	domain	tcprcg		var.bptmm220.perc
	domain	tcmcs.long	var.bptmm220.psqn		|#158562.n

	domain	bcstr6		var.bptmm230.emno
	domain	tcyrno		var.bptmm230.year
	domain	tcpern		var.bptmm230.peri
	domain	tcmcs.long	var.bptmm230.psqn
	domain	bcstr22		var.bptmm230.stdt
	domain	bcstr22		var.bptmm230.endt
	domain	bcstr22		var.bptmm230.trdt
	domain	bcstr22		var.bptmm230.rgdt
	domain	tccwtt		var.bptmm230.wtsc
	domain	tisfc.prtm	var.bptmm230.hrea
	domain	tcckow		var.bptmm230.chlt
	domain	bcstr9		var.bptmm230.orno
	domain	bcstr8		var.bptmm230.stsk
	domain	bcstd.fent	var.bptmm230.cwoc
	domain	bcstr8		var.bptmm230.cpcp

	|domain	tcamnt		var.bptmm230.prlc	|#MCR.so
	|domain	tcamnt		var.bptmm230.proc	|#MCR.eo
	domain	tcamnt		var.bptmm230.prlc(3)	|#MCR.sn
	domain	tcamnt		var.bptmm230.proc(3)	|#MCR.en

	domain	tclogn		var.bptmm230.logn
	domain	tctxtn		var.bptmm230.txta

	domain	bcstr6		var.bptmm250.emno
	domain	tcyrno		var.bptmm250.year
	domain	tcpern		var.bptmm250.peri
	domain	tcmcs.long	var.bptmm250.psqn
	domain	bcstr22		var.bptmm250.stdt
	domain	bcstr8		var.bptmm250.gtsk
	domain	bcstr8		var.bptmm250.expn
	domain	tcdsca		var.bptmm250.dsca
	domain	bcstd.fent	var.bptmm250.cwoc
	domain	bcstr8		var.bptmm250.cpcp
	domain	tcamnt		var.bptmm250.amnt
	domain	bcstr22		var.bptmm250.rdat
	domain	tcecrt		var.bptmm250.rate
	domain	tcratf		var.bptmm250.ratf
	domain	bcrtyp		var.bptmm250.rtyp
	domain	tcyesno		var.bptmm250.potf

	domain	tcmcs.long	var.bptmm270.psqn		|#158562.n
	domain	bcstr22		var.bptmm270.stdt
	domain	bcstr22		var.bptmm270.endt
	domain	bcstr22		var.bptmm270.rgdt
	domain	bcstr22		var.bptmm270.trdt		|#147118.n
	domain	tcckow		var.bptmm270.chlt

#define	GENERAL_TASK	1
#define	PROJECT	2
#define	PCS		3
#define	PRODUCTION	4
#define	SERVICE_TI	5
#define	SERVICE_TP	6

#define	HOURS_RECORD	true
#define	EXPENSE_RECORD	false

#define TWELVE_HOURS	43200

#include "itppdm0007"	|* Read Task
#include "itppdm0011"	|* Read Indirect Cost
#include "itppdm0066"
|#include "itssma0011"   |MCR.o
:STBL:tihra100,tphrs100
:COMT:START
---  Changes in table design  ---
In %SV hours can be entered in two packages:
- in TI via the %SStihra1101m000 session
- in TP via the %SStphrs1100m000 session

In %SV the actual and the processed hours are stored in one table.

In %TV the hours are centrally registered and processed in the BaanPeople package. In this package the actual and the processed hours are stored in separate tables. If hours are processed, then the tables containing history data are filled. The tables containing actual data remain filled, until the data is explicitly removed via the %TSbptmm1206m000 session.
During migration of processed hours only the history tables are filled.

The hours with transaction type '6 - Production (PMG) Hours' (session %SStihra1101m000) are not supported in %TV. These records will not be migrated.

The architecture of the BaanPeople package is rather different compared to the hours registration modules of %SV. For the history hours the following tables are valid:
%TTbptmm200
%TTbptmm210
%TTbptmm211
%TTbptmm220
%TTbptmm230
%TTbptmm240
%TTbptmm250
%TTbptmm260
%TTbptmm270

The first table stores time data. All other tables store time-, logistic- and costing data.

---  Source and Target Sessions  ---
Hours with transaction type 'Project':
%SStihra1101m000 - %TSbptmm2570m000

Hours with transaction type 'Production':
%SStihra1101m000 - %TSbptmm2520m000

Hours with transaction type 'Service':
%SStihra1101m000 - %TSbptmm2530m000

Hours with transaction type 'Absence' or 'Indirect':
%SStihra1101m000 - %TSbptmm2511m200

Hours with allocation code 'Project':
%SStphrs1100m000 - %TSbptmm2511m000

Hours with allocation code 'Finance' or 'No':
%SStphrs1100m000 - %TSbptmm2511m200

Hours with allocation code 'SMA (Service)':
%SStphrs1100m000 - %TSbptmm2530m000

---  Migration Logic  ---
In %TV the hours record is split into two entities. All time related data is stored in %TTbptmm200. Time-, logistic- and costing data is stored in a logistic table. So one record in %SV always results in (at least) two records in %TV.

Processed records that are available in session %SStihra1101m000:
- Transaction type is 'Project Hours'. The record is migrated to table %TTbptmm270 and to table %TTbptmm200.
- Transaction type is 'Production Hours'. The record is migrated to table %TTbptmm220 and to table %TTbptmm200.
- Transaction type is 'Service Hours'. The record is migrated to table %TTbptmm230 and to table %TTbptmm200.
- Transaction type is 'Absence Hours'. The record is migrated to table %TTbptmm211, to table %TTbptmm250 and to table %TTbptmm200.
- Transaction type is 'Indirect Hours'. The record is migrated to table %TTbptmm211, to table %TTbptmm250 and to table %TTbptmm200.
- Transaction type is 'Production (PMG) Hours'. The record is not migrated.

Final or closed records that are available in session %SStphrs1100m000:
- Allocation code is 'Project'. The record is migrated to table %TTbptmm211, to table %TTbptmm210 and to table %TTbptmm200.
- Allocation code is 'Finance' or 'No'. The record is migrated to table %TTbptmm211, to table %TTbptmm250 and to table %TTbptmm200.
- Allocation code is 'SMA (Service)'. The record is migrated to table %TTbptmm230 and to table %TTbptmm200. Expense records are not migrated.

Note: one record that is stored in the %SStphrs1100m000 session can register hours data for several days. This results in multiple records in %TV. 
Example:
In %SStphrs1100m000 one final record is present with allocation code 'Project'. This record contains hours data for five working days. This results in the following records in %TV:
- One record in table %TTbptmm211 (time and logistic data)
- Five records in %TTbptmm210 (logistic data)
- Five records in %TTbptmm200 (time data)

---  Migration Parameters  ---
%SFbcsbp000.prtc
%SFbcsbp000.dsbt
%SFbcsbp000.cpcp


---  Migration Mapping Tables  ---
%STbcsbp002
%STbcsbp004
%STbcstc006
%STbcstc011
%STbcstc018


---  Technical Notes  ---
Not applicable.


---  Performance  ---
Not applicable.
:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:bp
:TCMOD:tmm
:TFLNO:210
:LDAT:1/2/2018 11:52:01 AM
:PRTX:START
hra.period.definition = false

var.bptmm2xx.ccur = get.home.currency.orig.comp()
var.bptmm2xx.prdt = utc(date.num(), time.num())

ret.long = read.parameters.people(dummy.err.mess)
get.period.table.code.for.ti(var.bptmm2xx.cpdt)

migrate	tihra100

ret.long = read.parameters.common(dummy.err.mess)
ret.long = read.parameters.project(dummy.err.mess)
get.period.table.code.for.tp(var.bptmm2xx.cpdt)
migrate tphrs100
:PRTX:END
:STAT:V
:VARI:table	tbcsbp000
table	tbcsbp002
table	tbcsbp004
table	tbcstc000
table	tbcstc006
table	tbcstc011
table	tbcstc029
table	tbcstp000
table	ttihra000
table	ttpppc001

	domain	tcmcs.s200m	dummy.err.mess
	domain	tcmcs.long	ret.long
	double			ret.double
	domain	bcstr50		ret.string

	domain	tcbool		hra.period.definition

	domain	bcstp.cpdt	var.bptmm2xx.cpdt
	domain	bcstr22		var.bptmm2xx.prdt
	domain	tcccur		var.bptmm2xx.ccur

	domain	bcstr6		var.bptmm200.emno
	domain	tcyrno		var.bptmm200.year
	domain	tcpern		var.bptmm200.peri
	domain	tcmcs.long	var.bptmm200.type
	domain	tcmcs.long	var.bptmm200.psqn
	domain	bcstr22		var.bptmm200.trdt
	domain	bcstr22		var.bptmm200.rgdt
	domain	bcstd.fent	var.bptmm200.cwoc
	domain	tccwtt		var.bptmm200.wtsc
	domain	tisfc.prtm	var.bptmm200.hrea
	domain	tcckow		var.bptmm200.chlt
	domain	tisfc.prtm	var.bptmm200.hrma
	domain	bcstr22		var.bptmm200.stdt
	domain	bcstr22		var.bptmm200.endt
	domain	tcprcg		var.bptmm200.perc
	|domain	tcamnt		var.bptmm200.prlc	|#MCR.so
	|domain	tcamnt		var.bptmm200.prmc
	|domain	tcamnt		var.bptmm200.proc	|#MCR.eo
	
		long		element			|#MCR.sn
	domain	tcamnt		var.bptmm200.prlc(3)	
	domain	tcamnt		var.bptmm200.prmc(3)
	domain	tcamnt		var.bptmm200.proc(3)	|#MCR.en

	domain	tclogn		var.bptmm200.logn
	domain	tctxtn		var.bptmm200.txta
	domain	tccwoc		var.bptmm200.emdp	|#GEN-0205.n

	domain	tcmcs.long	var.bptmm210.psqn
	domain	tcmcs.long	var.bptmm210.swct
	domain	tcdsca		var.bptmm210.dsca
	domain	bcstr8		var.bptmm210.cpcp
	domain	bcstr22		var.bptmm210.stdt
	domain	bcstr22		var.bptmm210.rdat
	domain	tcecrt		var.bptmm210.rate
	domain	tcratf		var.bptmm210.ratf
	domain	bcrtyp		var.bptmm210.rtyp

	domain	bcstr6		var.bptmm211.emno
	domain	tcyrno		var.bptmm211.year
	domain	tcpern		var.bptmm211.peri
	domain	tcmcs.long	var.bptmm211.type
	domain	tcmcs.long	var.bptmm211.psqn
	domain	bcstr9		var.bptmm211.cprj
	domain	bcstr8		var.bptmm211.cspa
	domain	bcstr8		var.bptmm211.cact
	domain	bcstr4		var.bptmm211.cstl
	domain	tcmcs.long	var.bptmm211.swct
	domain	bcstr8		var.bptmm211.ccun
	domain	bcstr8		var.bptmm211.gtsk
	domain	bcstr8		var.bptmm211.expn
	domain	tcdsca		var.bptmm211.dsca
	domain	bccost		var.bptmm211.cpcp
	domain	bcstd.fent	var.bptmm211.cwoc
	domain	tisfc.prtm	var.bptmm211.hrea(8)	|* array
	domain	tcckow		var.bptmm211.chlt
	domain	bcstr22		var.bptmm211.rgdt
	domain	bcstr22		var.bptmm211.trdt
	domain	tcamnt		var.bptmm211.amnt
	domain	bcstr22		var.bptmm211.rdat
	domain	tcecrt		var.bptmm211.rate
	domain	tcratf		var.bptmm211.ratf
	domain	bcrtyp		var.bptmm211.rtyp
	domain	tcamnt		var.bptmm211.prlc(24)	| array
	domain	tcyesno		var.bptmm211.potf
	domain	tclogn		var.bptmm211.logn
	domain	tctxtn		var.bptmm211.txta
	domain	tctxtn		var.bptmm211.txtb
	domain	tctxtn		var.bptmm211.txtc
	domain	tctxtn		var.bptmm211.txtd
	domain	tctxtn		var.bptmm211.txte
	domain	tctxtn		var.bptmm211.txtf
	domain	tctxtn		var.bptmm211.txtg

	domain	bcstr22		var.bptmm220.stdt
	domain	bcstr22		var.bptmm220.endt
	domain	bcstr22		var.bptmm220.rgdt
	domain	bcstr22		var.bptmm220.trdt		|#147118.n
	domain	tcckow		var.bptmm220.chlt
	domain	tcprcg		var.bptmm220.perc
	domain	tcmcs.long	var.bptmm220.psqn		|#158562.n

	domain	bcstr6		var.bptmm230.emno
	domain	tcyrno		var.bptmm230.year
	domain	tcpern		var.bptmm230.peri
	domain	tcmcs.long	var.bptmm230.psqn
	domain	bcstr22		var.bptmm230.stdt
	domain	bcstr22		var.bptmm230.endt
	domain	bcstr22		var.bptmm230.trdt
	domain	bcstr22		var.bptmm230.rgdt
	domain	tccwtt		var.bptmm230.wtsc
	domain	tisfc.prtm	var.bptmm230.hrea
	domain	tcckow		var.bptmm230.chlt
	domain	bcstr9		var.bptmm230.orno
	domain	bcstr8		var.bptmm230.stsk
	domain	bcstd.fent	var.bptmm230.cwoc
	domain	bcstr8		var.bptmm230.cpcp

	|domain	tcamnt		var.bptmm230.prlc	|#MCR.so
	|domain	tcamnt		var.bptmm230.proc	|#MCR.eo
	domain	tcamnt		var.bptmm230.prlc(3)	|#MCR.sn
	domain	tcamnt		var.bptmm230.proc(3)	|#MCR.en

	domain	tclogn		var.bptmm230.logn
	domain	tctxtn		var.bptmm230.txta

	domain	bcstr6		var.bptmm250.emno
	domain	tcyrno		var.bptmm250.year
	domain	tcpern		var.bptmm250.peri
	domain	tcmcs.long	var.bptmm250.psqn
	domain	bcstr22		var.bptmm250.stdt
	domain	bcstr8		var.bptmm250.gtsk
	domain	bcstr8		var.bptmm250.expn
	domain	tcdsca		var.bptmm250.dsca
	domain	bcstd.fent	var.bptmm250.cwoc
	domain	bcstr8		var.bptmm250.cpcp
	domain	tcamnt		var.bptmm250.amnt
	domain	bcstr22		var.bptmm250.rdat
	domain	tcecrt		var.bptmm250.rate
	domain	tcratf		var.bptmm250.ratf
	domain	bcrtyp		var.bptmm250.rtyp
	domain	tcyesno		var.bptmm250.potf

	domain	tcmcs.long	var.bptmm270.psqn		|#158562.n
	domain	bcstr22		var.bptmm270.stdt
	domain	bcstr22		var.bptmm270.endt
	domain	bcstr22		var.bptmm270.rgdt
	domain	bcstr22		var.bptmm270.trdt		|#147118.n
	domain	tcckow		var.bptmm270.chlt

#define	GENERAL_TASK	1
#define	PROJECT	2
#define	PCS		3
#define	PRODUCTION	4
#define	SERVICE_TI	5
#define	SERVICE_TP	6

#define	HOURS_RECORD	true
#define	EXPENSE_RECORD	false

#define TWELVE_HOURS	43200

#include "itppdm0007"	|* Read Task
#include "itppdm0011"	|* Read Indirect Cost
#include "itppdm0066"
|#include "itssma0011"   |MCR.o
:STBL:tihra100,tphrs100
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:bp
:TCMOD:tmm
:TFLNO:211
:LDAT:1/2/2018 11:52:02 AM
:PRTX:START
hra.period.definition = false

var.bptmm2xx.ccur = get.home.currency.orig.comp()
var.bptmm2xx.prdt = utc(date.num(), time.num())

ret.long = read.parameters.people(dummy.err.mess)
get.period.table.code.for.ti(var.bptmm2xx.cpdt)

migrate	tihra100

ret.long = read.parameters.common(dummy.err.mess)
ret.long = read.parameters.project(dummy.err.mess)
get.period.table.code.for.tp(var.bptmm2xx.cpdt)
migrate tphrs100
:PRTX:END
:STAT:V
:VARI:table	tbcsbp000
table	tbcsbp002
table	tbcsbp004
table	tbcstc000
table	tbcstc006
table	tbcstc011
table	tbcstc029
table	tbcstp000
table	ttihra000
table	ttpppc001

	domain	tcmcs.s200m	dummy.err.mess
	domain	tcmcs.long	ret.long
	double			ret.double
	domain	bcstr50		ret.string

	domain	tcbool		hra.period.definition

	domain	bcstp.cpdt	var.bptmm2xx.cpdt
	domain	bcstr22		var.bptmm2xx.prdt
	domain	tcccur		var.bptmm2xx.ccur

	domain	bcstr6		var.bptmm200.emno
	domain	tcyrno		var.bptmm200.year
	domain	tcpern		var.bptmm200.peri
	domain	tcmcs.long	var.bptmm200.type
	domain	tcmcs.long	var.bptmm200.psqn
	domain	bcstr22		var.bptmm200.trdt
	domain	bcstr22		var.bptmm200.rgdt
	domain	bcstd.fent	var.bptmm200.cwoc
	domain	tccwtt		var.bptmm200.wtsc
	domain	tisfc.prtm	var.bptmm200.hrea
	domain	tcckow		var.bptmm200.chlt
	domain	tisfc.prtm	var.bptmm200.hrma
	domain	bcstr22		var.bptmm200.stdt
	domain	bcstr22		var.bptmm200.endt
	domain	tcprcg		var.bptmm200.perc
	|domain	tcamnt		var.bptmm200.prlc	|#MCR.so
	|domain	tcamnt		var.bptmm200.prmc
	|domain	tcamnt		var.bptmm200.proc	|#MCR.eo
	
		long		element			|#MCR.sn
	domain	tcamnt		var.bptmm200.prlc(3)	
	domain	tcamnt		var.bptmm200.prmc(3)
	domain	tcamnt		var.bptmm200.proc(3)	|#MCR.en

	domain	tclogn		var.bptmm200.logn
	domain	tctxtn		var.bptmm200.txta
	domain	tccwoc		var.bptmm200.emdp	|#GEN-0205.n

	domain	tcmcs.long	var.bptmm210.psqn
	domain	tcmcs.long	var.bptmm210.swct
	domain	tcdsca		var.bptmm210.dsca
	domain	bcstr8		var.bptmm210.cpcp
	domain	bcstr22		var.bptmm210.stdt
	domain	bcstr22		var.bptmm210.rdat
	domain	tcecrt		var.bptmm210.rate
	domain	tcratf		var.bptmm210.ratf
	domain	bcrtyp		var.bptmm210.rtyp

	domain	bcstr6		var.bptmm211.emno
	domain	tcyrno		var.bptmm211.year
	domain	tcpern		var.bptmm211.peri
	domain	tcmcs.long	var.bptmm211.type
	domain	tcmcs.long	var.bptmm211.psqn
	domain	bcstr9		var.bptmm211.cprj
	domain	bcstr8		var.bptmm211.cspa
	domain	bcstr8		var.bptmm211.cact
	domain	bcstr4		var.bptmm211.cstl
	domain	tcmcs.long	var.bptmm211.swct
	domain	bcstr8		var.bptmm211.ccun
	domain	bcstr8		var.bptmm211.gtsk
	domain	bcstr8		var.bptmm211.expn
	domain	tcdsca		var.bptmm211.dsca
	domain	bccost		var.bptmm211.cpcp
	domain	bcstd.fent	var.bptmm211.cwoc
	domain	tisfc.prtm	var.bptmm211.hrea(8)	|* array
	domain	tcckow		var.bptmm211.chlt
	domain	bcstr22		var.bptmm211.rgdt
	domain	bcstr22		var.bptmm211.trdt
	domain	tcamnt		var.bptmm211.amnt
	domain	bcstr22		var.bptmm211.rdat
	domain	tcecrt		var.bptmm211.rate
	domain	tcratf		var.bptmm211.ratf
	domain	bcrtyp		var.bptmm211.rtyp
	domain	tcamnt		var.bptmm211.prlc(24)	| array
	domain	tcyesno		var.bptmm211.potf
	domain	tclogn		var.bptmm211.logn
	domain	tctxtn		var.bptmm211.txta
	domain	tctxtn		var.bptmm211.txtb
	domain	tctxtn		var.bptmm211.txtc
	domain	tctxtn		var.bptmm211.txtd
	domain	tctxtn		var.bptmm211.txte
	domain	tctxtn		var.bptmm211.txtf
	domain	tctxtn		var.bptmm211.txtg

	domain	bcstr22		var.bptmm220.stdt
	domain	bcstr22		var.bptmm220.endt
	domain	bcstr22		var.bptmm220.rgdt
	domain	bcstr22		var.bptmm220.trdt		|#147118.n
	domain	tcckow		var.bptmm220.chlt
	domain	tcprcg		var.bptmm220.perc
	domain	tcmcs.long	var.bptmm220.psqn		|#158562.n

	domain	bcstr6		var.bptmm230.emno
	domain	tcyrno		var.bptmm230.year
	domain	tcpern		var.bptmm230.peri
	domain	tcmcs.long	var.bptmm230.psqn
	domain	bcstr22		var.bptmm230.stdt
	domain	bcstr22		var.bptmm230.endt
	domain	bcstr22		var.bptmm230.trdt
	domain	bcstr22		var.bptmm230.rgdt
	domain	tccwtt		var.bptmm230.wtsc
	domain	tisfc.prtm	var.bptmm230.hrea
	domain	tcckow		var.bptmm230.chlt
	domain	bcstr9		var.bptmm230.orno
	domain	bcstr8		var.bptmm230.stsk
	domain	bcstd.fent	var.bptmm230.cwoc
	domain	bcstr8		var.bptmm230.cpcp

	|domain	tcamnt		var.bptmm230.prlc	|#MCR.so
	|domain	tcamnt		var.bptmm230.proc	|#MCR.eo
	domain	tcamnt		var.bptmm230.prlc(3)	|#MCR.sn
	domain	tcamnt		var.bptmm230.proc(3)	|#MCR.en

	domain	tclogn		var.bptmm230.logn
	domain	tctxtn		var.bptmm230.txta

	domain	bcstr6		var.bptmm250.emno
	domain	tcyrno		var.bptmm250.year
	domain	tcpern		var.bptmm250.peri
	domain	tcmcs.long	var.bptmm250.psqn
	domain	bcstr22		var.bptmm250.stdt
	domain	bcstr8		var.bptmm250.gtsk
	domain	bcstr8		var.bptmm250.expn
	domain	tcdsca		var.bptmm250.dsca
	domain	bcstd.fent	var.bptmm250.cwoc
	domain	bcstr8		var.bptmm250.cpcp
	domain	tcamnt		var.bptmm250.amnt
	domain	bcstr22		var.bptmm250.rdat
	domain	tcecrt		var.bptmm250.rate
	domain	tcratf		var.bptmm250.ratf
	domain	bcrtyp		var.bptmm250.rtyp
	domain	tcyesno		var.bptmm250.potf

	domain	tcmcs.long	var.bptmm270.psqn		|#158562.n
	domain	bcstr22		var.bptmm270.stdt
	domain	bcstr22		var.bptmm270.endt
	domain	bcstr22		var.bptmm270.rgdt
	domain	bcstr22		var.bptmm270.trdt		|#147118.n
	domain	tcckow		var.bptmm270.chlt

#define	GENERAL_TASK	1
#define	PROJECT	2
#define	PCS		3
#define	PRODUCTION	4
#define	SERVICE_TI	5
#define	SERVICE_TP	6

#define	HOURS_RECORD	true
#define	EXPENSE_RECORD	false

#define TWELVE_HOURS	43200

#include "itppdm0007"	|* Read Task
#include "itppdm0011"	|* Read Indirect Cost
#include "itppdm0066"
|#include "itssma0011"   |MCR.o
:STBL:tihra100,tphrs100
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:bp
:TCMOD:tmm
:TFLNO:220
:LDAT:1/2/2018 11:52:03 AM
:PRTX:START
hra.period.definition = false

var.bptmm2xx.ccur = get.home.currency.orig.comp()
var.bptmm2xx.prdt = utc(date.num(), time.num())

ret.long = read.parameters.people(dummy.err.mess)
get.period.table.code.for.ti(var.bptmm2xx.cpdt)

migrate	tihra100

ret.long = read.parameters.common(dummy.err.mess)
ret.long = read.parameters.project(dummy.err.mess)
get.period.table.code.for.tp(var.bptmm2xx.cpdt)
migrate tphrs100
:PRTX:END
:STAT:V
:VARI:table	tbcsbp000
table	tbcsbp002
table	tbcsbp004
table	tbcstc000
table	tbcstc006
table	tbcstc011
table	tbcstc029
table	tbcstp000
table	ttihra000
table	ttpppc001

	domain	tcmcs.s200m	dummy.err.mess
	domain	tcmcs.long	ret.long
	double			ret.double
	domain	bcstr50		ret.string

	domain	tcbool		hra.period.definition

	domain	bcstp.cpdt	var.bptmm2xx.cpdt
	domain	bcstr22		var.bptmm2xx.prdt
	domain	tcccur		var.bptmm2xx.ccur

	domain	bcstr6		var.bptmm200.emno
	domain	tcyrno		var.bptmm200.year
	domain	tcpern		var.bptmm200.peri
	domain	tcmcs.long	var.bptmm200.type
	domain	tcmcs.long	var.bptmm200.psqn
	domain	bcstr22		var.bptmm200.trdt
	domain	bcstr22		var.bptmm200.rgdt
	domain	bcstd.fent	var.bptmm200.cwoc
	domain	tccwtt		var.bptmm200.wtsc
	domain	tisfc.prtm	var.bptmm200.hrea
	domain	tcckow		var.bptmm200.chlt
	domain	tisfc.prtm	var.bptmm200.hrma
	domain	bcstr22		var.bptmm200.stdt
	domain	bcstr22		var.bptmm200.endt
	domain	tcprcg		var.bptmm200.perc
	|domain	tcamnt		var.bptmm200.prlc	|#MCR.so
	|domain	tcamnt		var.bptmm200.prmc
	|domain	tcamnt		var.bptmm200.proc	|#MCR.eo
	
		long		element			|#MCR.sn
	domain	tcamnt		var.bptmm200.prlc(3)	
	domain	tcamnt		var.bptmm200.prmc(3)
	domain	tcamnt		var.bptmm200.proc(3)	|#MCR.en

	domain	tclogn		var.bptmm200.logn
	domain	tctxtn		var.bptmm200.txta
	domain	tccwoc		var.bptmm200.emdp	|#GEN-0205.n

	domain	tcmcs.long	var.bptmm210.psqn
	domain	tcmcs.long	var.bptmm210.swct
	domain	tcdsca		var.bptmm210.dsca
	domain	bcstr8		var.bptmm210.cpcp
	domain	bcstr22		var.bptmm210.stdt
	domain	bcstr22		var.bptmm210.rdat
	domain	tcecrt		var.bptmm210.rate
	domain	tcratf		var.bptmm210.ratf
	domain	bcrtyp		var.bptmm210.rtyp

	domain	bcstr6		var.bptmm211.emno
	domain	tcyrno		var.bptmm211.year
	domain	tcpern		var.bptmm211.peri
	domain	tcmcs.long	var.bptmm211.type
	domain	tcmcs.long	var.bptmm211.psqn
	domain	bcstr9		var.bptmm211.cprj
	domain	bcstr8		var.bptmm211.cspa
	domain	bcstr8		var.bptmm211.cact
	domain	bcstr4		var.bptmm211.cstl
	domain	tcmcs.long	var.bptmm211.swct
	domain	bcstr8		var.bptmm211.ccun
	domain	bcstr8		var.bptmm211.gtsk
	domain	bcstr8		var.bptmm211.expn
	domain	tcdsca		var.bptmm211.dsca
	domain	bccost		var.bptmm211.cpcp
	domain	bcstd.fent	var.bptmm211.cwoc
	domain	tisfc.prtm	var.bptmm211.hrea(8)	|* array
	domain	tcckow		var.bptmm211.chlt
	domain	bcstr22		var.bptmm211.rgdt
	domain	bcstr22		var.bptmm211.trdt
	domain	tcamnt		var.bptmm211.amnt
	domain	bcstr22		var.bptmm211.rdat
	domain	tcecrt		var.bptmm211.rate
	domain	tcratf		var.bptmm211.ratf
	domain	bcrtyp		var.bptmm211.rtyp
	domain	tcamnt		var.bptmm211.prlc(24)	| array
	domain	tcyesno		var.bptmm211.potf
	domain	tclogn		var.bptmm211.logn
	domain	tctxtn		var.bptmm211.txta
	domain	tctxtn		var.bptmm211.txtb
	domain	tctxtn		var.bptmm211.txtc
	domain	tctxtn		var.bptmm211.txtd
	domain	tctxtn		var.bptmm211.txte
	domain	tctxtn		var.bptmm211.txtf
	domain	tctxtn		var.bptmm211.txtg

	domain	bcstr22		var.bptmm220.stdt
	domain	bcstr22		var.bptmm220.endt
	domain	bcstr22		var.bptmm220.rgdt
	domain	bcstr22		var.bptmm220.trdt		|#147118.n
	domain	tcckow		var.bptmm220.chlt
	domain	tcprcg		var.bptmm220.perc
	domain	tcmcs.long	var.bptmm220.psqn		|#158562.n

	domain	bcstr6		var.bptmm230.emno
	domain	tcyrno		var.bptmm230.year
	domain	tcpern		var.bptmm230.peri
	domain	tcmcs.long	var.bptmm230.psqn
	domain	bcstr22		var.bptmm230.stdt
	domain	bcstr22		var.bptmm230.endt
	domain	bcstr22		var.bptmm230.trdt
	domain	bcstr22		var.bptmm230.rgdt
	domain	tccwtt		var.bptmm230.wtsc
	domain	tisfc.prtm	var.bptmm230.hrea
	domain	tcckow		var.bptmm230.chlt
	domain	bcstr9		var.bptmm230.orno
	domain	bcstr8		var.bptmm230.stsk
	domain	bcstd.fent	var.bptmm230.cwoc
	domain	bcstr8		var.bptmm230.cpcp

	|domain	tcamnt		var.bptmm230.prlc	|#MCR.so
	|domain	tcamnt		var.bptmm230.proc	|#MCR.eo
	domain	tcamnt		var.bptmm230.prlc(3)	|#MCR.sn
	domain	tcamnt		var.bptmm230.proc(3)	|#MCR.en

	domain	tclogn		var.bptmm230.logn
	domain	tctxtn		var.bptmm230.txta

	domain	bcstr6		var.bptmm250.emno
	domain	tcyrno		var.bptmm250.year
	domain	tcpern		var.bptmm250.peri
	domain	tcmcs.long	var.bptmm250.psqn
	domain	bcstr22		var.bptmm250.stdt
	domain	bcstr8		var.bptmm250.gtsk
	domain	bcstr8		var.bptmm250.expn
	domain	tcdsca		var.bptmm250.dsca
	domain	bcstd.fent	var.bptmm250.cwoc
	domain	bcstr8		var.bptmm250.cpcp
	domain	tcamnt		var.bptmm250.amnt
	domain	bcstr22		var.bptmm250.rdat
	domain	tcecrt		var.bptmm250.rate
	domain	tcratf		var.bptmm250.ratf
	domain	bcrtyp		var.bptmm250.rtyp
	domain	tcyesno		var.bptmm250.potf

	domain	tcmcs.long	var.bptmm270.psqn		|#158562.n
	domain	bcstr22		var.bptmm270.stdt
	domain	bcstr22		var.bptmm270.endt
	domain	bcstr22		var.bptmm270.rgdt
	domain	bcstr22		var.bptmm270.trdt		|#147118.n
	domain	tcckow		var.bptmm270.chlt

#define	GENERAL_TASK	1
#define	PROJECT	2
#define	PCS		3
#define	PRODUCTION	4
#define	SERVICE_TI	5
#define	SERVICE_TP	6

#define	HOURS_RECORD	true
#define	EXPENSE_RECORD	false

#define TWELVE_HOURS	43200

#include "itppdm0007"	|* Read Task
#include "itppdm0011"	|* Read Indirect Cost
#include "itppdm0066"
|#include "itssma0011"   |MCR.o
:STBL:tihra100,tphrs100
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:bp
:TCMOD:tmm
:TFLNO:230
:LDAT:1/2/2018 11:52:03 AM
:PRTX:START
hra.period.definition = false

var.bptmm2xx.ccur = get.home.currency.orig.comp()
var.bptmm2xx.prdt = utc(date.num(), time.num())

ret.long = read.parameters.people(dummy.err.mess)
get.period.table.code.for.ti(var.bptmm2xx.cpdt)

migrate	tihra100

ret.long = read.parameters.common(dummy.err.mess)
ret.long = read.parameters.project(dummy.err.mess)
get.period.table.code.for.tp(var.bptmm2xx.cpdt)
migrate tphrs100
:PRTX:END
:STAT:V
:VARI:table	tbcsbp000
table	tbcsbp002
table	tbcsbp004
table	tbcstc000
table	tbcstc006
table	tbcstc011
table	tbcstc029
table	tbcstp000
table	ttihra000
table	ttpppc001

	domain	tcmcs.s200m	dummy.err.mess
	domain	tcmcs.long	ret.long
	double			ret.double
	domain	bcstr50		ret.string

	domain	tcbool		hra.period.definition

	domain	bcstp.cpdt	var.bptmm2xx.cpdt
	domain	bcstr22		var.bptmm2xx.prdt
	domain	tcccur		var.bptmm2xx.ccur

	domain	bcstr6		var.bptmm200.emno
	domain	tcyrno		var.bptmm200.year
	domain	tcpern		var.bptmm200.peri
	domain	tcmcs.long	var.bptmm200.type
	domain	tcmcs.long	var.bptmm200.psqn
	domain	bcstr22		var.bptmm200.trdt
	domain	bcstr22		var.bptmm200.rgdt
	domain	bcstd.fent	var.bptmm200.cwoc
	domain	tccwtt		var.bptmm200.wtsc
	domain	tisfc.prtm	var.bptmm200.hrea
	domain	tcckow		var.bptmm200.chlt
	domain	tisfc.prtm	var.bptmm200.hrma
	domain	bcstr22		var.bptmm200.stdt
	domain	bcstr22		var.bptmm200.endt
	domain	tcprcg		var.bptmm200.perc
	|domain	tcamnt		var.bptmm200.prlc	|#MCR.so
	|domain	tcamnt		var.bptmm200.prmc
	|domain	tcamnt		var.bptmm200.proc	|#MCR.eo
	
		long		element			|#MCR.sn
	domain	tcamnt		var.bptmm200.prlc(3)	
	domain	tcamnt		var.bptmm200.prmc(3)
	domain	tcamnt		var.bptmm200.proc(3)	|#MCR.en

	domain	tclogn		var.bptmm200.logn
	domain	tctxtn		var.bptmm200.txta
	domain	tccwoc		var.bptmm200.emdp	|#GEN-0205.n

	domain	tcmcs.long	var.bptmm210.psqn
	domain	tcmcs.long	var.bptmm210.swct
	domain	tcdsca		var.bptmm210.dsca
	domain	bcstr8		var.bptmm210.cpcp
	domain	bcstr22		var.bptmm210.stdt
	domain	bcstr22		var.bptmm210.rdat
	domain	tcecrt		var.bptmm210.rate
	domain	tcratf		var.bptmm210.ratf
	domain	bcrtyp		var.bptmm210.rtyp

	domain	bcstr6		var.bptmm211.emno
	domain	tcyrno		var.bptmm211.year
	domain	tcpern		var.bptmm211.peri
	domain	tcmcs.long	var.bptmm211.type
	domain	tcmcs.long	var.bptmm211.psqn
	domain	bcstr9		var.bptmm211.cprj
	domain	bcstr8		var.bptmm211.cspa
	domain	bcstr8		var.bptmm211.cact
	domain	bcstr4		var.bptmm211.cstl
	domain	tcmcs.long	var.bptmm211.swct
	domain	bcstr8		var.bptmm211.ccun
	domain	bcstr8		var.bptmm211.gtsk
	domain	bcstr8		var.bptmm211.expn
	domain	tcdsca		var.bptmm211.dsca
	domain	bccost		var.bptmm211.cpcp
	domain	bcstd.fent	var.bptmm211.cwoc
	domain	tisfc.prtm	var.bptmm211.hrea(8)	|* array
	domain	tcckow		var.bptmm211.chlt
	domain	bcstr22		var.bptmm211.rgdt
	domain	bcstr22		var.bptmm211.trdt
	domain	tcamnt		var.bptmm211.amnt
	domain	bcstr22		var.bptmm211.rdat
	domain	tcecrt		var.bptmm211.rate
	domain	tcratf		var.bptmm211.ratf
	domain	bcrtyp		var.bptmm211.rtyp
	domain	tcamnt		var.bptmm211.prlc(24)	| array
	domain	tcyesno		var.bptmm211.potf
	domain	tclogn		var.bptmm211.logn
	domain	tctxtn		var.bptmm211.txta
	domain	tctxtn		var.bptmm211.txtb
	domain	tctxtn		var.bptmm211.txtc
	domain	tctxtn		var.bptmm211.txtd
	domain	tctxtn		var.bptmm211.txte
	domain	tctxtn		var.bptmm211.txtf
	domain	tctxtn		var.bptmm211.txtg

	domain	bcstr22		var.bptmm220.stdt
	domain	bcstr22		var.bptmm220.endt
	domain	bcstr22		var.bptmm220.rgdt
	domain	bcstr22		var.bptmm220.trdt		|#147118.n
	domain	tcckow		var.bptmm220.chlt
	domain	tcprcg		var.bptmm220.perc
	domain	tcmcs.long	var.bptmm220.psqn		|#158562.n

	domain	bcstr6		var.bptmm230.emno
	domain	tcyrno		var.bptmm230.year
	domain	tcpern		var.bptmm230.peri
	domain	tcmcs.long	var.bptmm230.psqn
	domain	bcstr22		var.bptmm230.stdt
	domain	bcstr22		var.bptmm230.endt
	domain	bcstr22		var.bptmm230.trdt
	domain	bcstr22		var.bptmm230.rgdt
	domain	tccwtt		var.bptmm230.wtsc
	domain	tisfc.prtm	var.bptmm230.hrea
	domain	tcckow		var.bptmm230.chlt
	domain	bcstr9		var.bptmm230.orno
	domain	bcstr8		var.bptmm230.stsk
	domain	bcstd.fent	var.bptmm230.cwoc
	domain	bcstr8		var.bptmm230.cpcp

	|domain	tcamnt		var.bptmm230.prlc	|#MCR.so
	|domain	tcamnt		var.bptmm230.proc	|#MCR.eo
	domain	tcamnt		var.bptmm230.prlc(3)	|#MCR.sn
	domain	tcamnt		var.bptmm230.proc(3)	|#MCR.en

	domain	tclogn		var.bptmm230.logn
	domain	tctxtn		var.bptmm230.txta

	domain	bcstr6		var.bptmm250.emno
	domain	tcyrno		var.bptmm250.year
	domain	tcpern		var.bptmm250.peri
	domain	tcmcs.long	var.bptmm250.psqn
	domain	bcstr22		var.bptmm250.stdt
	domain	bcstr8		var.bptmm250.gtsk
	domain	bcstr8		var.bptmm250.expn
	domain	tcdsca		var.bptmm250.dsca
	domain	bcstd.fent	var.bptmm250.cwoc
	domain	bcstr8		var.bptmm250.cpcp
	domain	tcamnt		var.bptmm250.amnt
	domain	bcstr22		var.bptmm250.rdat
	domain	tcecrt		var.bptmm250.rate
	domain	tcratf		var.bptmm250.ratf
	domain	bcrtyp		var.bptmm250.rtyp
	domain	tcyesno		var.bptmm250.potf

	domain	tcmcs.long	var.bptmm270.psqn		|#158562.n
	domain	bcstr22		var.bptmm270.stdt
	domain	bcstr22		var.bptmm270.endt
	domain	bcstr22		var.bptmm270.rgdt
	domain	bcstr22		var.bptmm270.trdt		|#147118.n
	domain	tcckow		var.bptmm270.chlt

#define	GENERAL_TASK	1
#define	PROJECT	2
#define	PCS		3
#define	PRODUCTION	4
#define	SERVICE_TI	5
#define	SERVICE_TP	6

#define	HOURS_RECORD	true
#define	EXPENSE_RECORD	false

#define TWELVE_HOURS	43200

#include "itppdm0007"	|* Read Task
#include "itppdm0011"	|* Read Indirect Cost
#include "itppdm0066"
|#include "itssma0011"   |MCR.o
:STBL:tihra100,tphrs100
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:bp
:TCMOD:tmm
:TFLNO:250
:LDAT:1/2/2018 11:52:04 AM
:PRTX:START
hra.period.definition = false

var.bptmm2xx.ccur = get.home.currency.orig.comp()
var.bptmm2xx.prdt = utc(date.num(), time.num())

ret.long = read.parameters.people(dummy.err.mess)
get.period.table.code.for.ti(var.bptmm2xx.cpdt)

migrate	tihra100

ret.long = read.parameters.common(dummy.err.mess)
ret.long = read.parameters.project(dummy.err.mess)
get.period.table.code.for.tp(var.bptmm2xx.cpdt)
migrate tphrs100
:PRTX:END
:STAT:V
:VARI:table	tbcsbp000
table	tbcsbp002
table	tbcsbp004
table	tbcstc000
table	tbcstc006
table	tbcstc011
table	tbcstc029
table	tbcstp000
table	ttihra000
table	ttpppc001

	domain	tcmcs.s200m	dummy.err.mess
	domain	tcmcs.long	ret.long
	double			ret.double
	domain	bcstr50		ret.string

	domain	tcbool		hra.period.definition

	domain	bcstp.cpdt	var.bptmm2xx.cpdt
	domain	bcstr22		var.bptmm2xx.prdt
	domain	tcccur		var.bptmm2xx.ccur

	domain	bcstr6		var.bptmm200.emno
	domain	tcyrno		var.bptmm200.year
	domain	tcpern		var.bptmm200.peri
	domain	tcmcs.long	var.bptmm200.type
	domain	tcmcs.long	var.bptmm200.psqn
	domain	bcstr22		var.bptmm200.trdt
	domain	bcstr22		var.bptmm200.rgdt
	domain	bcstd.fent	var.bptmm200.cwoc
	domain	tccwtt		var.bptmm200.wtsc
	domain	tisfc.prtm	var.bptmm200.hrea
	domain	tcckow		var.bptmm200.chlt
	domain	tisfc.prtm	var.bptmm200.hrma
	domain	bcstr22		var.bptmm200.stdt
	domain	bcstr22		var.bptmm200.endt
	domain	tcprcg		var.bptmm200.perc
	|domain	tcamnt		var.bptmm200.prlc	|#MCR.so
	|domain	tcamnt		var.bptmm200.prmc
	|domain	tcamnt		var.bptmm200.proc	|#MCR.eo
	
		long		element			|#MCR.sn
	domain	tcamnt		var.bptmm200.prlc(3)	
	domain	tcamnt		var.bptmm200.prmc(3)
	domain	tcamnt		var.bptmm200.proc(3)	|#MCR.en

	domain	tclogn		var.bptmm200.logn
	domain	tctxtn		var.bptmm200.txta
	domain	tccwoc		var.bptmm200.emdp	|#GEN-0205.n

	domain	tcmcs.long	var.bptmm210.psqn
	domain	tcmcs.long	var.bptmm210.swct
	domain	tcdsca		var.bptmm210.dsca
	domain	bcstr8		var.bptmm210.cpcp
	domain	bcstr22		var.bptmm210.stdt
	domain	bcstr22		var.bptmm210.rdat
	domain	tcecrt		var.bptmm210.rate
	domain	tcratf		var.bptmm210.ratf
	domain	bcrtyp		var.bptmm210.rtyp

	domain	bcstr6		var.bptmm211.emno
	domain	tcyrno		var.bptmm211.year
	domain	tcpern		var.bptmm211.peri
	domain	tcmcs.long	var.bptmm211.type
	domain	tcmcs.long	var.bptmm211.psqn
	domain	bcstr9		var.bptmm211.cprj
	domain	bcstr8		var.bptmm211.cspa
	domain	bcstr8		var.bptmm211.cact
	domain	bcstr4		var.bptmm211.cstl
	domain	tcmcs.long	var.bptmm211.swct
	domain	bcstr8		var.bptmm211.ccun
	domain	bcstr8		var.bptmm211.gtsk
	domain	bcstr8		var.bptmm211.expn
	domain	tcdsca		var.bptmm211.dsca
	domain	bccost		var.bptmm211.cpcp
	domain	bcstd.fent	var.bptmm211.cwoc
	domain	tisfc.prtm	var.bptmm211.hrea(8)	|* array
	domain	tcckow		var.bptmm211.chlt
	domain	bcstr22		var.bptmm211.rgdt
	domain	bcstr22		var.bptmm211.trdt
	domain	tcamnt		var.bptmm211.amnt
	domain	bcstr22		var.bptmm211.rdat
	domain	tcecrt		var.bptmm211.rate
	domain	tcratf		var.bptmm211.ratf
	domain	bcrtyp		var.bptmm211.rtyp
	domain	tcamnt		var.bptmm211.prlc(24)	| array
	domain	tcyesno		var.bptmm211.potf
	domain	tclogn		var.bptmm211.logn
	domain	tctxtn		var.bptmm211.txta
	domain	tctxtn		var.bptmm211.txtb
	domain	tctxtn		var.bptmm211.txtc
	domain	tctxtn		var.bptmm211.txtd
	domain	tctxtn		var.bptmm211.txte
	domain	tctxtn		var.bptmm211.txtf
	domain	tctxtn		var.bptmm211.txtg

	domain	bcstr22		var.bptmm220.stdt
	domain	bcstr22		var.bptmm220.endt
	domain	bcstr22		var.bptmm220.rgdt
	domain	bcstr22		var.bptmm220.trdt		|#147118.n
	domain	tcckow		var.bptmm220.chlt
	domain	tcprcg		var.bptmm220.perc
	domain	tcmcs.long	var.bptmm220.psqn		|#158562.n

	domain	bcstr6		var.bptmm230.emno
	domain	tcyrno		var.bptmm230.year
	domain	tcpern		var.bptmm230.peri
	domain	tcmcs.long	var.bptmm230.psqn
	domain	bcstr22		var.bptmm230.stdt
	domain	bcstr22		var.bptmm230.endt
	domain	bcstr22		var.bptmm230.trdt
	domain	bcstr22		var.bptmm230.rgdt
	domain	tccwtt		var.bptmm230.wtsc
	domain	tisfc.prtm	var.bptmm230.hrea
	domain	tcckow		var.bptmm230.chlt
	domain	bcstr9		var.bptmm230.orno
	domain	bcstr8		var.bptmm230.stsk
	domain	bcstd.fent	var.bptmm230.cwoc
	domain	bcstr8		var.bptmm230.cpcp

	|domain	tcamnt		var.bptmm230.prlc	|#MCR.so
	|domain	tcamnt		var.bptmm230.proc	|#MCR.eo
	domain	tcamnt		var.bptmm230.prlc(3)	|#MCR.sn
	domain	tcamnt		var.bptmm230.proc(3)	|#MCR.en

	domain	tclogn		var.bptmm230.logn
	domain	tctxtn		var.bptmm230.txta

	domain	bcstr6		var.bptmm250.emno
	domain	tcyrno		var.bptmm250.year
	domain	tcpern		var.bptmm250.peri
	domain	tcmcs.long	var.bptmm250.psqn
	domain	bcstr22		var.bptmm250.stdt
	domain	bcstr8		var.bptmm250.gtsk
	domain	bcstr8		var.bptmm250.expn
	domain	tcdsca		var.bptmm250.dsca
	domain	bcstd.fent	var.bptmm250.cwoc
	domain	bcstr8		var.bptmm250.cpcp
	domain	tcamnt		var.bptmm250.amnt
	domain	bcstr22		var.bptmm250.rdat
	domain	tcecrt		var.bptmm250.rate
	domain	tcratf		var.bptmm250.ratf
	domain	bcrtyp		var.bptmm250.rtyp
	domain	tcyesno		var.bptmm250.potf

	domain	tcmcs.long	var.bptmm270.psqn		|#158562.n
	domain	bcstr22		var.bptmm270.stdt
	domain	bcstr22		var.bptmm270.endt
	domain	bcstr22		var.bptmm270.rgdt
	domain	bcstr22		var.bptmm270.trdt		|#147118.n
	domain	tcckow		var.bptmm270.chlt

#define	GENERAL_TASK	1
#define	PROJECT	2
#define	PCS		3
#define	PRODUCTION	4
#define	SERVICE_TI	5
#define	SERVICE_TP	6

#define	HOURS_RECORD	true
#define	EXPENSE_RECORD	false

#define TWELVE_HOURS	43200

#include "itppdm0007"	|* Read Task
#include "itppdm0011"	|* Read Indirect Cost
#include "itppdm0066"
|#include "itssma0011"   |MCR.o
:STBL:tihra100,tphrs100
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:bp
:TCMOD:tmm
:TFLNO:270
:LDAT:1/2/2018 11:52:04 AM
:PRTX:START
hra.period.definition = false

var.bptmm2xx.ccur = get.home.currency.orig.comp()
var.bptmm2xx.prdt = utc(date.num(), time.num())

ret.long = read.parameters.people(dummy.err.mess)
get.period.table.code.for.ti(var.bptmm2xx.cpdt)

migrate	tihra100

ret.long = read.parameters.common(dummy.err.mess)
ret.long = read.parameters.project(dummy.err.mess)
get.period.table.code.for.tp(var.bptmm2xx.cpdt)
migrate tphrs100
:PRTX:END
:STAT:V
:VARI:table	tbcsbp000
table	tbcsbp002
table	tbcsbp004
table	tbcstc000
table	tbcstc006
table	tbcstc011
table	tbcstc029
table	tbcstp000
table	ttihra000
table	ttpppc001

	domain	tcmcs.s200m	dummy.err.mess
	domain	tcmcs.long	ret.long
	double			ret.double
	domain	bcstr50		ret.string

	domain	tcbool		hra.period.definition

	domain	bcstp.cpdt	var.bptmm2xx.cpdt
	domain	bcstr22		var.bptmm2xx.prdt
	domain	tcccur		var.bptmm2xx.ccur

	domain	bcstr6		var.bptmm200.emno
	domain	tcyrno		var.bptmm200.year
	domain	tcpern		var.bptmm200.peri
	domain	tcmcs.long	var.bptmm200.type
	domain	tcmcs.long	var.bptmm200.psqn
	domain	bcstr22		var.bptmm200.trdt
	domain	bcstr22		var.bptmm200.rgdt
	domain	bcstd.fent	var.bptmm200.cwoc
	domain	tccwtt		var.bptmm200.wtsc
	domain	tisfc.prtm	var.bptmm200.hrea
	domain	tcckow		var.bptmm200.chlt
	domain	tisfc.prtm	var.bptmm200.hrma
	domain	bcstr22		var.bptmm200.stdt
	domain	bcstr22		var.bptmm200.endt
	domain	tcprcg		var.bptmm200.perc
	|domain	tcamnt		var.bptmm200.prlc	|#MCR.so
	|domain	tcamnt		var.bptmm200.prmc
	|domain	tcamnt		var.bptmm200.proc	|#MCR.eo
	
		long		element			|#MCR.sn
	domain	tcamnt		var.bptmm200.prlc(3)	
	domain	tcamnt		var.bptmm200.prmc(3)
	domain	tcamnt		var.bptmm200.proc(3)	|#MCR.en

	domain	tclogn		var.bptmm200.logn
	domain	tctxtn		var.bptmm200.txta
	domain	tccwoc		var.bptmm200.emdp	|#GEN-0205.n

	domain	tcmcs.long	var.bptmm210.psqn
	domain	tcmcs.long	var.bptmm210.swct
	domain	tcdsca		var.bptmm210.dsca
	domain	bcstr8		var.bptmm210.cpcp
	domain	bcstr22		var.bptmm210.stdt
	domain	bcstr22		var.bptmm210.rdat
	domain	tcecrt		var.bptmm210.rate
	domain	tcratf		var.bptmm210.ratf
	domain	bcrtyp		var.bptmm210.rtyp

	domain	bcstr6		var.bptmm211.emno
	domain	tcyrno		var.bptmm211.year
	domain	tcpern		var.bptmm211.peri
	domain	tcmcs.long	var.bptmm211.type
	domain	tcmcs.long	var.bptmm211.psqn
	domain	bcstr9		var.bptmm211.cprj
	domain	bcstr8		var.bptmm211.cspa
	domain	bcstr8		var.bptmm211.cact
	domain	bcstr4		var.bptmm211.cstl
	domain	tcmcs.long	var.bptmm211.swct
	domain	bcstr8		var.bptmm211.ccun
	domain	bcstr8		var.bptmm211.gtsk
	domain	bcstr8		var.bptmm211.expn
	domain	tcdsca		var.bptmm211.dsca
	domain	bccost		var.bptmm211.cpcp
	domain	bcstd.fent	var.bptmm211.cwoc
	domain	tisfc.prtm	var.bptmm211.hrea(8)	|* array
	domain	tcckow		var.bptmm211.chlt
	domain	bcstr22		var.bptmm211.rgdt
	domain	bcstr22		var.bptmm211.trdt
	domain	tcamnt		var.bptmm211.amnt
	domain	bcstr22		var.bptmm211.rdat
	domain	tcecrt		var.bptmm211.rate
	domain	tcratf		var.bptmm211.ratf
	domain	bcrtyp		var.bptmm211.rtyp
	domain	tcamnt		var.bptmm211.prlc(24)	| array
	domain	tcyesno		var.bptmm211.potf
	domain	tclogn		var.bptmm211.logn
	domain	tctxtn		var.bptmm211.txta
	domain	tctxtn		var.bptmm211.txtb
	domain	tctxtn		var.bptmm211.txtc
	domain	tctxtn		var.bptmm211.txtd
	domain	tctxtn		var.bptmm211.txte
	domain	tctxtn		var.bptmm211.txtf
	domain	tctxtn		var.bptmm211.txtg

	domain	bcstr22		var.bptmm220.stdt
	domain	bcstr22		var.bptmm220.endt
	domain	bcstr22		var.bptmm220.rgdt
	domain	bcstr22		var.bptmm220.trdt		|#147118.n
	domain	tcckow		var.bptmm220.chlt
	domain	tcprcg		var.bptmm220.perc
	domain	tcmcs.long	var.bptmm220.psqn		|#158562.n

	domain	bcstr6		var.bptmm230.emno
	domain	tcyrno		var.bptmm230.year
	domain	tcpern		var.bptmm230.peri
	domain	tcmcs.long	var.bptmm230.psqn
	domain	bcstr22		var.bptmm230.stdt
	domain	bcstr22		var.bptmm230.endt
	domain	bcstr22		var.bptmm230.trdt
	domain	bcstr22		var.bptmm230.rgdt
	domain	tccwtt		var.bptmm230.wtsc
	domain	tisfc.prtm	var.bptmm230.hrea
	domain	tcckow		var.bptmm230.chlt
	domain	bcstr9		var.bptmm230.orno
	domain	bcstr8		var.bptmm230.stsk
	domain	bcstd.fent	var.bptmm230.cwoc
	domain	bcstr8		var.bptmm230.cpcp

	|domain	tcamnt		var.bptmm230.prlc	|#MCR.so
	|domain	tcamnt		var.bptmm230.proc	|#MCR.eo
	domain	tcamnt		var.bptmm230.prlc(3)	|#MCR.sn
	domain	tcamnt		var.bptmm230.proc(3)	|#MCR.en

	domain	tclogn		var.bptmm230.logn
	domain	tctxtn		var.bptmm230.txta

	domain	bcstr6		var.bptmm250.emno
	domain	tcyrno		var.bptmm250.year
	domain	tcpern		var.bptmm250.peri
	domain	tcmcs.long	var.bptmm250.psqn
	domain	bcstr22		var.bptmm250.stdt
	domain	bcstr8		var.bptmm250.gtsk
	domain	bcstr8		var.bptmm250.expn
	domain	tcdsca		var.bptmm250.dsca
	domain	bcstd.fent	var.bptmm250.cwoc
	domain	bcstr8		var.bptmm250.cpcp
	domain	tcamnt		var.bptmm250.amnt
	domain	bcstr22		var.bptmm250.rdat
	domain	tcecrt		var.bptmm250.rate
	domain	tcratf		var.bptmm250.ratf
	domain	bcrtyp		var.bptmm250.rtyp
	domain	tcyesno		var.bptmm250.potf

	domain	tcmcs.long	var.bptmm270.psqn		|#158562.n
	domain	bcstr22		var.bptmm270.stdt
	domain	bcstr22		var.bptmm270.endt
	domain	bcstr22		var.bptmm270.rgdt
	domain	bcstr22		var.bptmm270.trdt		|#147118.n
	domain	tcckow		var.bptmm270.chlt

#define	GENERAL_TASK	1
#define	PROJECT	2
#define	PCS		3
#define	PRODUCTION	4
#define	SERVICE_TI	5
#define	SERVICE_TP	6

#define	HOURS_RECORD	true
#define	EXPENSE_RECORD	false

#define TWELVE_HOURS	43200

#include "itppdm0007"	|* Read Task
#include "itppdm0011"	|* Read Indirect Cost
#include "itppdm0066"
|#include "itssma0011"   |MCR.o
:STBL:tihra100,tphrs100
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:dm
:TCMOD:chm
:TFLNO:040
:LDAT:2/4/2017 2:11:22 PM
:PRTX:START
select	bcsti000.micp, bcsti000.role
from	bcsti000
as set with 1 rows
selectdo
	if  bcsti000.micp = tcyesno.yes then
		get.company.currency()
		migrate	tiedm310
	endif
endselect
:PRTX:END
:STAT:V
:VARI:table	ttccom000
string	change.id(12)
string 	tmp.var(6)
long    	str.lenth
:STBL:tiedm303,tiedm310,bcsti000,tiedm302,tccom000
:COMT:START
---  Changes in table design  ---
This is a new table in %TV


---  Source and Target Sessions  ---
Source sessions - %SStiedm3102m000
                         %SStiedm3103m000
                         %SStiedm3110m000
Target sessions - %TSdmchm0540m000

---  Migration Logic  ---
Steps of a procedure of %SV are migrated to %TV as tasks.


---  Migration Parameters  ---



---  Migration Mapping Tables  ---
Source tables - %STtiedm302
                      %STtiedm303
                      %STtiedm310
                      %STbcsti000
                      %STtccom000
Target tables - %TTdmchm040

---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:





:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:dm
:TCMOD:chm
:TFLNO:050
:LDAT:2/4/2017 2:11:37 PM
:PRTX:START
select	bcsti000.micp, bcsti000.cpod
from	bcsti000
as set with 1 rows
selectdo
	if  bcsti000.micp = tcyesno.yes then
		migrate	tiedm310
	endif
endselect
:PRTX:END
:STAT:V
:VARI:string	change.id(12)
string	order.id(8)
string 	tmp.var(6)
long    	str.lenth
:STBL:tiedm310,bcsti000
:COMT:START
---  Changes in table design  ---
This is a new table in %TV


---  Source and Target Sessions  ---
Source sessions - %SStiedm3110m000
Target sessions - %TSdmchm0150m000
                         %TSdmchm0150m004
                         %TSdmchm0150m005

---  Migration Logic  ---
Change order of %TV gives the information about when the changes will get effective. A change order is created in %TV is created for each ECO of %SV which are in status either 'free' or 'in process' and linked to the change proposal that is created for corresponding ECO. planned effective date of %SV is assigned to the change order date of %TV


---  Migration Parameters  ---



---  Migration Mapping Tables  ---
Source tables - %STtiedm310
                      %STbcsti000
Target tables - %TTdmchm050


---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:





:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:fm
:TCMOD:fmd
:TFLNO:010
:LDAT:6/17/2018 11:18:16 PM
:PRTX:START
#pragma used dll "otiitmdll0003"
#pragma used dll "obcstcdll0004"

tcmcs0095.read.parm("tccom999")

g.conv.factor = 1.0

if tccom999.trtr = tcyesno.yes then
	if read.parameter("trtcd000", o.mess) then
		return
	endif

	if trtcd000.cutm <> trtcd000.cuhr  and
	   not isspace(trtcd000.cutm) and
	   not isspace(trtcd000.cuhr) then
		l.conv.cutm = tiitm.dll0003.read.conv.with.physical.quantity(
					trtcd000.cutm,
					tctccu.time)
		l.conv.cuhr = tiitm.dll0003.read.conv.with.physical.quantity(
					trtcd000.cuhr,
					tctccu.time)

		g.conv.factor = l.conv.cutm / l.conv.cuhr
	endif
endif

|var.tccom139.idnr = 0					|#City.so
|var.prev.country = ""
|var.prev.city.code = ""					|#City.eo
var.date = date.num()					|#FP3.n

migrate bcstc004
:PRTX:END
:STAT:V
:VARI:|string			var.tccom139.seak(16)	mb		|#City.o
|long			var.tccom139.idnr			|#City.o
domain	bcstc.desc	var.tccom130.dsca			|#City.n
long			var.tccom130.defa			|#209024.n
string			var.tccom130.lvdt(22)
string			var.tccom130.nama(35)
domain	tcmcs.st10	var.tccom130.hono
domain	tcmcs.st10	var.tccom130.pobn
domain	tcnamb		g.tccom130.pobn
|domain	tcccty		var.prev.country			|#City.o
|domain	bcstc.city	var.prev.city.code			|#City.o
domain	tccreg		var.fmfmd010.creg
domain	trtop.time	var.fmfmd010.lwtm
domain	trtop.time	var.fmfmd010.ldtm
domain	trtop.time	var.fmfmd010.uwtm
domain	trtop.time	var.fmfmd010.untm
domain	tcconv		l.conv.cutm
domain	tcconv		l.conv.cuhr
domain	tcconv		g.conv.factor
string			o.mess(1)
	long		var.date				|#FP3.n

#include	"itcmcs0095"
:STBL:bcstc004,trtcd000,tccom999,bcstc031
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---



---  Migration Logic  ---
tccom130 is filled from the intermediate table bcstc004. The table bcstc004 is filled with records when the 'Generate Addresses' (bcstc0104m000) is run as a preconversion session. Record is inserted in bcstc004 from the source table "tccom000" and the corresponding company number. The 'cste' value is also filled for that record from tccom000. When bcstc004 is dumped into tccom130, automatically we have the corresponding record in the target side with the 'tccom000.cste' from source into tccom130.cste.


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tc
:TCMOD:com
:TFLNO:001
:LDAT:6/17/2018 11:16:53 PM
:PRTX:START
Select 	tppdm000.pprj		|#FP7.sn
from	tppdm000
selectdo
endselect 			|#FP7.en


migrate tccom001
migrate bcsts000
:PRTX:END
:STAT:V
:VARI:string	dummy.err.mess

domain	bcstr16	var.tccom001.seak
domain	bcstr6	var.tccom001.clrt		|#LN10.4.1.n
|domain	bcstr3	var.tccom001.clrt		|#LN10.4.1.o
domain	bcstr6	var.tccom001.cwoc

double var.tccom001.wgrt

string	var.bpmdm001.cadr(9)
long	var.bpmdm001.sexe
string	var.bpmdm001.cist(15)
string	var.tccom001.emno(9)	|#sp2.n
:STBL:tccom001,bcsbp003,bcsts002,bcsts000,bcstc018,bcsbp000,bcsti011,tppdm000
:COMT:START
---  Changes in table design  ---
In %SV the employee data is stored in one table %STtccom001. In %TV the employee data is stored in the package that owns the data. In total four tables store employee related data:
- %TTtccom001
- %TTbpmdm001
- %TTtppdm801
- %TTtsmdm140
Not all of these tables are necessarily filled for each record that is migrated from %SV.


---  Source and Target Sessions  ---
%SStccom0101m000 - %TStccom0101m000
%SStccom0101m000 - %TSbpmdm0101m000
%SStccom0101m000 - %TStppdm8101m000
%SStppdm8101m000 - %TStppdm8101m000
%SStccom0101m000 - %TStsmdm1140m000


---  Migration Logic  ---
The target tables %TTtccom001 and %TTbpmdm001 are always filled for each employee in source table %STtccom001. The target tables %TTtppdm801 and %TTtsmdm140 are conditionally filled.
Table %TTtppdm801 is filled if project-related data is entered in %SV for the employee. The project-related data in the employees table is:
- %SFtccom001.ctrg
- %SFtccom001.rats
- %SFtccom001.dpwk
- %SFtccom001.hrsd
So if one of the fields mentioned above is filled for an employee, then table %TTtppdm801 is filled for that employee in %TV.
Table %TTtsmdm140 is filled if the employee is used in one of the following tables in %SV:
- %STtssma113
- %STtssma305
- %STtssma306
- %STtssma307
- %STtssma310
- %STtssma406
- %STtssma301
- %STtssma310
- %STtssma404
- %STtssma410
- %STtssma501
- %STtssma510
If an employee is used in one of these tables, then that employee is registered in a mapping table (%STbcsts002). All employees of that mapping table will be migrated as service-employee in table %TTtsmdm140.
Next to this an employee is registered in session %SSbcsts0100m000. This employee results in this filling of table %TTtsmdm140 together with %TTtccom001 and %TTbpmdm001.


---  Migration Parameters  ---
%STbcsts000


---  Migration Mapping Tables  ---
%STbcsts002
%STbcsbp003
%STbcstc004
%STbcstc018


---  Technical Notes  ---
Not Applicable.


---  Performance  ---
Not Applicable.
:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tc
:TCMOD:com
:TFLNO:100
:LDAT:12/10/2017 12:38:48 PM
:PRTX:START
hold.cmpnr = compnr
var.utc0 = utc(0, 0)
var.date = date.num()
bp.code.depth = 0

define.length.and.search.def()

select 	bcstc011.* 
from	bcstc011
where	bcstc011.brtp in ("SLS", "PUR") 
selectdo 
	 if (bcstc011.brtp = "SLS") then 
		var.tccom112.rtyp = bcstc011.rtyp 
	 else 
		var.tccom12x.rtyp = bcstc011.rtyp
	 endif 
endselect 

read.parameters.common(o.mess)

read.parameter("tdsls000", o.mess)
read.parameter("tdpst000", o.mess)
read.parameter("tdpur000", o.mess)
read.parameter("tccom000", o.mess)
read.parameter("tccom999", o.mess)

if tccom999.trtr = tcyesno.yes then
	var.tccom110.frin = tcyesno.yes
else
	var.tccom110.frin = tcyesno.no
endif

var.tccom100.ccur =  get.home.currency.orig.comp()  
|#800-141596.sn
|* Parent business partner should always be filled with the business
|* partner, which is defined in bcstc000 (Default Parent Business Partner).
|* Retrieve business partner from customer or supplier or factoring company.
create.default.parent.bp(hold.tccom100.prbp)
|* One-Time BP should not get a Parent BP filled.
|#800-141596.en


var.tccom100.bprl = 1	|* 1	No roles defined
			|* 2	Customer
			|* 3	Supplier
migrate   tcmcs025

var.tccom100.bprl = 2	|* 2	Customer
migrate   tccom010

var.tccom100.bprl = 3	|* 3	Supplier
migrate   tccom020

|* Can also be: Both (Customer & Supplier).
|* However, then the BP is already dumped as a 'Customer', which cannot be updated.
|* This can be corrected in Post migration session bcttc0201, with option Correct 'CP Role' checked.
:PRTX:END
:STAT:V
:VARI:#define	MEMORY_ALLOCATION_SIZE	10000

domain	tctfcd		g.dialcode.for.telephone
domain	tcfxcd		g.dialcode.for.fax

	string		var.phone.number(32)
	string		var.fax.number(32)
domain	tctfcd		var.country.for.phone.number
domain	tctfcd		var.country.for.fax.number

	string		hold.tccom100.bpid(9)	|* For cuno and suno 
domain  bccadr		hold.tccom010.cadr 
domain	bccadr		hold.tccom111.cadr 
domain	bccnv.ccnt 	hold.tccom110.ccnt 

domain		tcncmp hold.cmpnr 
domain		bccnv.fent  var.tccom110.cofc 
domain		bccnv.fent  var.tccom120.cofc
long		link.to.sub 

string		var.tccom100.bpid(9)	|* For cuno and suno 
string		temp.key.ccor(9) 
string		temp.key.cdel(9) 
string		var.tccom110.bppr(9)
string		var.utc0(23)
domain		tcmcs.s200m		o.mess
 
domain  bccadr		var.tccom010.cadr 
domain  bccadr		var.tccom020.cadr 
domain	bccadr		var.tccom100.cadr
domain	bccadr		var.tccom110.cadr 
domain	bccadr		var.tccom111.cadr 
domain	bccadr		var.tccom120.cadr

string	var.tccom112.rtyp(3)
string	var.tccom12x.rtyp(3)	|* used for tccom122.rtyp and tccom124.rtyp


domain	tcyesno	var.tccom100.sndr 
long	var.tccom100.prst
domain	tcyesno	var.tccom100.edyn
domain	tcyesno	var.tccom100.inrl
domain	tcccur	var.tccom100.ccur
domain	tcnama	var.tccom100.nama
domain	tcseak	var.tccom100.seak

domain tcyesno	var.tccom110.frin
  
domain	bccnv.ccnt	hold.ccnt
domain	bccnv.ccnt 	var.tccom110.ccnt 
domain	bccnv.ccnt 	var.tccom112.ccnt 
domain	bccnv.ccnt 	var.tccom120.ccnt 
domain	bccnv.ccnt 	var.tccom122.ccnt 

long	var.tccom110.scon
 
long	var.tccom112.itst
string	var.tccom112.cinm(3)
 
domain	bccom.bpid	var.tccom120.scus
domain	bcstc.bpid 	var.tccom100.bptx

long	var.tccom100.bpst
long	var.tccom111.bpst
long	var.tccom114.bpst 
long	var.tccom120.bpst
long	var.tccom121.bpst
long	var.tccom122.bpst
long	var.tccom124.bpst

domain	tcyesno	var.tccom112.cvyn
domain	tcyesno	var.tccom122.cvyn
string	var.tccom122.ptbp(9)

static	long		bp.code.depth
	long		sorted.bp.code.def(1, 4)
	long		bp.code.length
domain  bcstc.bpid	bp.code.list(1)	based

domain	tccuno		converted.cuno
|#800-141596.sn
domain	bcstc.bpid	var.tccom100.prbp
|#800-141596.en
domain	bcstc.bpid	hold.tccom100.prbp

domain	bcstc.bpid	var.tccom112.pfbp
domain	bcstc.bpid	var.tccom110.bpus

string var.mstm(3)
string var.docm(3)
domain tcmcs.s200m	var.err.mess

	long		var.tccom100.bprl
	long		var.date
:STBL:tccom010,tccom020,tirou001,bcstc011,bcstc008,bcstc000,bcstc004,bcstc005,bcstc018,tdsls000,tdpst000,tcmcs025,tccom000,tccom999,tdpur040,tdpur300,tfacp262,tfacp316,tccom013
:COMT:START
---  Changes in table design  ---

In the %SV there are separate tables for customers, suppliers and factoring companies.
In the %TV there is 1 business partner table (%TTtccom100) with 8 related tables containing role specific information. These roles are:

Customer Roles:
- sold-to       (%TTtccom110)
- ship-to       (%TTtccom111)
- invoice-to   (%TTtccom112)
- pay-by       (%TTtccom114)

Supplier Roles:
- buy-from     (%TTtccom120)
- ship-from     (%TTtccom121)
- invoice-from (%TTtccom122)
- pay-to        (%TTtccom124)



---  Source and Target Sessions  ---
Source session: %SStccom1101m000
Source session: %SStccom2101m000
Source session: %SStcmcs0125m000
Target session: %TStccom4500m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---
The business partner is retrieved based on the mapping table %STbcstc008.


---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tc
:TCMOD:com
:TFLNO:110
:LDAT:12/10/2017 12:38:49 PM
:PRTX:START
hold.cmpnr = compnr
var.utc0 = utc(0, 0)
var.date = date.num()
bp.code.depth = 0

define.length.and.search.def()

select 	bcstc011.* 
from	bcstc011
where	bcstc011.brtp in ("SLS", "PUR") 
selectdo 
	 if (bcstc011.brtp = "SLS") then 
		var.tccom112.rtyp = bcstc011.rtyp 
	 else 
		var.tccom12x.rtyp = bcstc011.rtyp
	 endif 
endselect 

read.parameters.common(o.mess)

read.parameter("tdsls000", o.mess)
read.parameter("tdpst000", o.mess)
read.parameter("tdpur000", o.mess)
read.parameter("tccom000", o.mess)
read.parameter("tccom999", o.mess)

if tccom999.trtr = tcyesno.yes then
	var.tccom110.frin = tcyesno.yes
else
	var.tccom110.frin = tcyesno.no
endif

var.tccom100.ccur =  get.home.currency.orig.comp()  
|#800-141596.sn
|* Parent business partner should always be filled with the business
|* partner, which is defined in bcstc000 (Default Parent Business Partner).
|* Retrieve business partner from customer or supplier or factoring company.
create.default.parent.bp(hold.tccom100.prbp)
|* One-Time BP should not get a Parent BP filled.
|#800-141596.en


var.tccom100.bprl = 1	|* 1	No roles defined
			|* 2	Customer
			|* 3	Supplier
migrate   tcmcs025

var.tccom100.bprl = 2	|* 2	Customer
migrate   tccom010

var.tccom100.bprl = 3	|* 3	Supplier
migrate   tccom020

|* Can also be: Both (Customer & Supplier).
|* However, then the BP is already dumped as a 'Customer', which cannot be updated.
|* This can be corrected in Post migration session bcttc0201, with option Correct 'CP Role' checked.
:PRTX:END
:STAT:V
:VARI:#define	MEMORY_ALLOCATION_SIZE	10000

domain	tctfcd		g.dialcode.for.telephone
domain	tcfxcd		g.dialcode.for.fax

	string		var.phone.number(32)
	string		var.fax.number(32)
domain	tctfcd		var.country.for.phone.number
domain	tctfcd		var.country.for.fax.number

	string		hold.tccom100.bpid(9)	|* For cuno and suno 
domain  bccadr		hold.tccom010.cadr 
domain	bccadr		hold.tccom111.cadr 
domain	bccnv.ccnt 	hold.tccom110.ccnt 

domain		tcncmp hold.cmpnr 
domain		bccnv.fent  var.tccom110.cofc 
domain		bccnv.fent  var.tccom120.cofc
long		link.to.sub 

string		var.tccom100.bpid(9)	|* For cuno and suno 
string		temp.key.ccor(9) 
string		temp.key.cdel(9) 
string		var.tccom110.bppr(9)
string		var.utc0(23)
domain		tcmcs.s200m		o.mess
 
domain  bccadr		var.tccom010.cadr 
domain  bccadr		var.tccom020.cadr 
domain	bccadr		var.tccom100.cadr
domain	bccadr		var.tccom110.cadr 
domain	bccadr		var.tccom111.cadr 
domain	bccadr		var.tccom120.cadr

string	var.tccom112.rtyp(3)
string	var.tccom12x.rtyp(3)	|* used for tccom122.rtyp and tccom124.rtyp


domain	tcyesno	var.tccom100.sndr 
long	var.tccom100.prst
domain	tcyesno	var.tccom100.edyn
domain	tcyesno	var.tccom100.inrl
domain	tcccur	var.tccom100.ccur
domain	tcnama	var.tccom100.nama
domain	tcseak	var.tccom100.seak

domain tcyesno	var.tccom110.frin
  
domain	bccnv.ccnt	hold.ccnt
domain	bccnv.ccnt 	var.tccom110.ccnt 
domain	bccnv.ccnt 	var.tccom112.ccnt 
domain	bccnv.ccnt 	var.tccom120.ccnt 
domain	bccnv.ccnt 	var.tccom122.ccnt 

long	var.tccom110.scon
 
long	var.tccom112.itst
string	var.tccom112.cinm(3)
 
domain	bccom.bpid	var.tccom120.scus
domain	bcstc.bpid 	var.tccom100.bptx

long	var.tccom100.bpst
long	var.tccom111.bpst
long	var.tccom114.bpst 
long	var.tccom120.bpst
long	var.tccom121.bpst
long	var.tccom122.bpst
long	var.tccom124.bpst

domain	tcyesno	var.tccom112.cvyn
domain	tcyesno	var.tccom122.cvyn
string	var.tccom122.ptbp(9)

static	long		bp.code.depth
	long		sorted.bp.code.def(1, 4)
	long		bp.code.length
domain  bcstc.bpid	bp.code.list(1)	based

domain	tccuno		converted.cuno
|#800-141596.sn
domain	bcstc.bpid	var.tccom100.prbp
|#800-141596.en
domain	bcstc.bpid	hold.tccom100.prbp

domain	bcstc.bpid	var.tccom112.pfbp
domain	bcstc.bpid	var.tccom110.bpus

string var.mstm(3)
string var.docm(3)
domain tcmcs.s200m	var.err.mess

	long		var.tccom100.bprl
	long		var.date
:STBL:tccom010,tccom020,tirou001,bcstc011,bcstc008,bcstc000,bcstc004,bcstc005,bcstc018,tdsls000,tdpst000,tcmcs025,tccom000,tccom999,tdpur040,tdpur300,tfacp262,tfacp316,tccom013
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tc
:TCMOD:com
:TFLNO:111
:LDAT:12/10/2017 12:38:49 PM
:PRTX:START
hold.cmpnr = compnr
var.utc0 = utc(0, 0)
var.date = date.num()
bp.code.depth = 0

define.length.and.search.def()

select 	bcstc011.* 
from	bcstc011
where	bcstc011.brtp in ("SLS", "PUR") 
selectdo 
	 if (bcstc011.brtp = "SLS") then 
		var.tccom112.rtyp = bcstc011.rtyp 
	 else 
		var.tccom12x.rtyp = bcstc011.rtyp
	 endif 
endselect 

read.parameters.common(o.mess)

read.parameter("tdsls000", o.mess)
read.parameter("tdpst000", o.mess)
read.parameter("tdpur000", o.mess)
read.parameter("tccom000", o.mess)
read.parameter("tccom999", o.mess)

if tccom999.trtr = tcyesno.yes then
	var.tccom110.frin = tcyesno.yes
else
	var.tccom110.frin = tcyesno.no
endif

var.tccom100.ccur =  get.home.currency.orig.comp()  
|#800-141596.sn
|* Parent business partner should always be filled with the business
|* partner, which is defined in bcstc000 (Default Parent Business Partner).
|* Retrieve business partner from customer or supplier or factoring company.
create.default.parent.bp(hold.tccom100.prbp)
|* One-Time BP should not get a Parent BP filled.
|#800-141596.en


var.tccom100.bprl = 1	|* 1	No roles defined
			|* 2	Customer
			|* 3	Supplier
migrate   tcmcs025

var.tccom100.bprl = 2	|* 2	Customer
migrate   tccom010

var.tccom100.bprl = 3	|* 3	Supplier
migrate   tccom020

|* Can also be: Both (Customer & Supplier).
|* However, then the BP is already dumped as a 'Customer', which cannot be updated.
|* This can be corrected in Post migration session bcttc0201, with option Correct 'CP Role' checked.
:PRTX:END
:STAT:V
:VARI:#define	MEMORY_ALLOCATION_SIZE	10000

domain	tctfcd		g.dialcode.for.telephone
domain	tcfxcd		g.dialcode.for.fax

	string		var.phone.number(32)
	string		var.fax.number(32)
domain	tctfcd		var.country.for.phone.number
domain	tctfcd		var.country.for.fax.number

	string		hold.tccom100.bpid(9)	|* For cuno and suno 
domain  bccadr		hold.tccom010.cadr 
domain	bccadr		hold.tccom111.cadr 
domain	bccnv.ccnt 	hold.tccom110.ccnt 

domain		tcncmp hold.cmpnr 
domain		bccnv.fent  var.tccom110.cofc 
domain		bccnv.fent  var.tccom120.cofc
long		link.to.sub 

string		var.tccom100.bpid(9)	|* For cuno and suno 
string		temp.key.ccor(9) 
string		temp.key.cdel(9) 
string		var.tccom110.bppr(9)
string		var.utc0(23)
domain		tcmcs.s200m		o.mess
 
domain  bccadr		var.tccom010.cadr 
domain  bccadr		var.tccom020.cadr 
domain	bccadr		var.tccom100.cadr
domain	bccadr		var.tccom110.cadr 
domain	bccadr		var.tccom111.cadr 
domain	bccadr		var.tccom120.cadr

string	var.tccom112.rtyp(3)
string	var.tccom12x.rtyp(3)	|* used for tccom122.rtyp and tccom124.rtyp


domain	tcyesno	var.tccom100.sndr 
long	var.tccom100.prst
domain	tcyesno	var.tccom100.edyn
domain	tcyesno	var.tccom100.inrl
domain	tcccur	var.tccom100.ccur
domain	tcnama	var.tccom100.nama
domain	tcseak	var.tccom100.seak

domain tcyesno	var.tccom110.frin
  
domain	bccnv.ccnt	hold.ccnt
domain	bccnv.ccnt 	var.tccom110.ccnt 
domain	bccnv.ccnt 	var.tccom112.ccnt 
domain	bccnv.ccnt 	var.tccom120.ccnt 
domain	bccnv.ccnt 	var.tccom122.ccnt 

long	var.tccom110.scon
 
long	var.tccom112.itst
string	var.tccom112.cinm(3)
 
domain	bccom.bpid	var.tccom120.scus
domain	bcstc.bpid 	var.tccom100.bptx

long	var.tccom100.bpst
long	var.tccom111.bpst
long	var.tccom114.bpst 
long	var.tccom120.bpst
long	var.tccom121.bpst
long	var.tccom122.bpst
long	var.tccom124.bpst

domain	tcyesno	var.tccom112.cvyn
domain	tcyesno	var.tccom122.cvyn
string	var.tccom122.ptbp(9)

static	long		bp.code.depth
	long		sorted.bp.code.def(1, 4)
	long		bp.code.length
domain  bcstc.bpid	bp.code.list(1)	based

domain	tccuno		converted.cuno
|#800-141596.sn
domain	bcstc.bpid	var.tccom100.prbp
|#800-141596.en
domain	bcstc.bpid	hold.tccom100.prbp

domain	bcstc.bpid	var.tccom112.pfbp
domain	bcstc.bpid	var.tccom110.bpus

string var.mstm(3)
string var.docm(3)
domain tcmcs.s200m	var.err.mess

	long		var.tccom100.bprl
	long		var.date
:STBL:tccom010,tccom020,tirou001,bcstc011,bcstc008,bcstc000,bcstc004,bcstc005,bcstc018,tdsls000,tdpst000,tcmcs025,tccom000,tccom999,tdpur040,tdpur300,tfacp262,tfacp316,tccom013
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tc
:TCMOD:com
:TFLNO:112
:LDAT:12/10/2017 12:38:50 PM
:PRTX:START
hold.cmpnr = compnr
var.utc0 = utc(0, 0)
var.date = date.num()
bp.code.depth = 0

define.length.and.search.def()

select 	bcstc011.* 
from	bcstc011
where	bcstc011.brtp in ("SLS", "PUR") 
selectdo 
	 if (bcstc011.brtp = "SLS") then 
		var.tccom112.rtyp = bcstc011.rtyp 
	 else 
		var.tccom12x.rtyp = bcstc011.rtyp
	 endif 
endselect 

read.parameters.common(o.mess)

read.parameter("tdsls000", o.mess)
read.parameter("tdpst000", o.mess)
read.parameter("tdpur000", o.mess)
read.parameter("tccom000", o.mess)
read.parameter("tccom999", o.mess)

if tccom999.trtr = tcyesno.yes then
	var.tccom110.frin = tcyesno.yes
else
	var.tccom110.frin = tcyesno.no
endif

var.tccom100.ccur =  get.home.currency.orig.comp()  
|#800-141596.sn
|* Parent business partner should always be filled with the business
|* partner, which is defined in bcstc000 (Default Parent Business Partner).
|* Retrieve business partner from customer or supplier or factoring company.
create.default.parent.bp(hold.tccom100.prbp)
|* One-Time BP should not get a Parent BP filled.
|#800-141596.en


var.tccom100.bprl = 1	|* 1	No roles defined
			|* 2	Customer
			|* 3	Supplier
migrate   tcmcs025

var.tccom100.bprl = 2	|* 2	Customer
migrate   tccom010

var.tccom100.bprl = 3	|* 3	Supplier
migrate   tccom020

|* Can also be: Both (Customer & Supplier).
|* However, then the BP is already dumped as a 'Customer', which cannot be updated.
|* This can be corrected in Post migration session bcttc0201, with option Correct 'CP Role' checked.
:PRTX:END
:STAT:V
:VARI:#define	MEMORY_ALLOCATION_SIZE	10000

domain	tctfcd		g.dialcode.for.telephone
domain	tcfxcd		g.dialcode.for.fax

	string		var.phone.number(32)
	string		var.fax.number(32)
domain	tctfcd		var.country.for.phone.number
domain	tctfcd		var.country.for.fax.number

	string		hold.tccom100.bpid(9)	|* For cuno and suno 
domain  bccadr		hold.tccom010.cadr 
domain	bccadr		hold.tccom111.cadr 
domain	bccnv.ccnt 	hold.tccom110.ccnt 

domain		tcncmp hold.cmpnr 
domain		bccnv.fent  var.tccom110.cofc 
domain		bccnv.fent  var.tccom120.cofc
long		link.to.sub 

string		var.tccom100.bpid(9)	|* For cuno and suno 
string		temp.key.ccor(9) 
string		temp.key.cdel(9) 
string		var.tccom110.bppr(9)
string		var.utc0(23)
domain		tcmcs.s200m		o.mess
 
domain  bccadr		var.tccom010.cadr 
domain  bccadr		var.tccom020.cadr 
domain	bccadr		var.tccom100.cadr
domain	bccadr		var.tccom110.cadr 
domain	bccadr		var.tccom111.cadr 
domain	bccadr		var.tccom120.cadr

string	var.tccom112.rtyp(3)
string	var.tccom12x.rtyp(3)	|* used for tccom122.rtyp and tccom124.rtyp


domain	tcyesno	var.tccom100.sndr 
long	var.tccom100.prst
domain	tcyesno	var.tccom100.edyn
domain	tcyesno	var.tccom100.inrl
domain	tcccur	var.tccom100.ccur
domain	tcnama	var.tccom100.nama
domain	tcseak	var.tccom100.seak

domain tcyesno	var.tccom110.frin
  
domain	bccnv.ccnt	hold.ccnt
domain	bccnv.ccnt 	var.tccom110.ccnt 
domain	bccnv.ccnt 	var.tccom112.ccnt 
domain	bccnv.ccnt 	var.tccom120.ccnt 
domain	bccnv.ccnt 	var.tccom122.ccnt 

long	var.tccom110.scon
 
long	var.tccom112.itst
string	var.tccom112.cinm(3)
 
domain	bccom.bpid	var.tccom120.scus
domain	bcstc.bpid 	var.tccom100.bptx

long	var.tccom100.bpst
long	var.tccom111.bpst
long	var.tccom114.bpst 
long	var.tccom120.bpst
long	var.tccom121.bpst
long	var.tccom122.bpst
long	var.tccom124.bpst

domain	tcyesno	var.tccom112.cvyn
domain	tcyesno	var.tccom122.cvyn
string	var.tccom122.ptbp(9)

static	long		bp.code.depth
	long		sorted.bp.code.def(1, 4)
	long		bp.code.length
domain  bcstc.bpid	bp.code.list(1)	based

domain	tccuno		converted.cuno
|#800-141596.sn
domain	bcstc.bpid	var.tccom100.prbp
|#800-141596.en
domain	bcstc.bpid	hold.tccom100.prbp

domain	bcstc.bpid	var.tccom112.pfbp
domain	bcstc.bpid	var.tccom110.bpus

string var.mstm(3)
string var.docm(3)
domain tcmcs.s200m	var.err.mess

	long		var.tccom100.bprl
	long		var.date
:STBL:tccom010,tccom020,tirou001,bcstc011,bcstc008,bcstc000,bcstc004,bcstc005,bcstc018,tdsls000,tdpst000,tcmcs025,tccom000,tccom999,tdpur040,tdpur300,tfacp262,tfacp316,tccom013
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tc
:TCMOD:com
:TFLNO:114
:LDAT:12/10/2017 12:38:51 PM
:PRTX:START
hold.cmpnr = compnr
var.utc0 = utc(0, 0)
var.date = date.num()
bp.code.depth = 0

define.length.and.search.def()

select 	bcstc011.* 
from	bcstc011
where	bcstc011.brtp in ("SLS", "PUR") 
selectdo 
	 if (bcstc011.brtp = "SLS") then 
		var.tccom112.rtyp = bcstc011.rtyp 
	 else 
		var.tccom12x.rtyp = bcstc011.rtyp
	 endif 
endselect 

read.parameters.common(o.mess)

read.parameter("tdsls000", o.mess)
read.parameter("tdpst000", o.mess)
read.parameter("tdpur000", o.mess)
read.parameter("tccom000", o.mess)
read.parameter("tccom999", o.mess)

if tccom999.trtr = tcyesno.yes then
	var.tccom110.frin = tcyesno.yes
else
	var.tccom110.frin = tcyesno.no
endif

var.tccom100.ccur =  get.home.currency.orig.comp()  
|#800-141596.sn
|* Parent business partner should always be filled with the business
|* partner, which is defined in bcstc000 (Default Parent Business Partner).
|* Retrieve business partner from customer or supplier or factoring company.
create.default.parent.bp(hold.tccom100.prbp)
|* One-Time BP should not get a Parent BP filled.
|#800-141596.en


var.tccom100.bprl = 1	|* 1	No roles defined
			|* 2	Customer
			|* 3	Supplier
migrate   tcmcs025

var.tccom100.bprl = 2	|* 2	Customer
migrate   tccom010

var.tccom100.bprl = 3	|* 3	Supplier
migrate   tccom020

|* Can also be: Both (Customer & Supplier).
|* However, then the BP is already dumped as a 'Customer', which cannot be updated.
|* This can be corrected in Post migration session bcttc0201, with option Correct 'CP Role' checked.
:PRTX:END
:STAT:V
:VARI:#define	MEMORY_ALLOCATION_SIZE	10000

domain	tctfcd		g.dialcode.for.telephone
domain	tcfxcd		g.dialcode.for.fax

	string		var.phone.number(32)
	string		var.fax.number(32)
domain	tctfcd		var.country.for.phone.number
domain	tctfcd		var.country.for.fax.number

	string		hold.tccom100.bpid(9)	|* For cuno and suno 
domain  bccadr		hold.tccom010.cadr 
domain	bccadr		hold.tccom111.cadr 
domain	bccnv.ccnt 	hold.tccom110.ccnt 

domain		tcncmp hold.cmpnr 
domain		bccnv.fent  var.tccom110.cofc 
domain		bccnv.fent  var.tccom120.cofc
long		link.to.sub 

string		var.tccom100.bpid(9)	|* For cuno and suno 
string		temp.key.ccor(9) 
string		temp.key.cdel(9) 
string		var.tccom110.bppr(9)
string		var.utc0(23)
domain		tcmcs.s200m		o.mess
 
domain  bccadr		var.tccom010.cadr 
domain  bccadr		var.tccom020.cadr 
domain	bccadr		var.tccom100.cadr
domain	bccadr		var.tccom110.cadr 
domain	bccadr		var.tccom111.cadr 
domain	bccadr		var.tccom120.cadr

string	var.tccom112.rtyp(3)
string	var.tccom12x.rtyp(3)	|* used for tccom122.rtyp and tccom124.rtyp


domain	tcyesno	var.tccom100.sndr 
long	var.tccom100.prst
domain	tcyesno	var.tccom100.edyn
domain	tcyesno	var.tccom100.inrl
domain	tcccur	var.tccom100.ccur
domain	tcnama	var.tccom100.nama
domain	tcseak	var.tccom100.seak

domain tcyesno	var.tccom110.frin
  
domain	bccnv.ccnt	hold.ccnt
domain	bccnv.ccnt 	var.tccom110.ccnt 
domain	bccnv.ccnt 	var.tccom112.ccnt 
domain	bccnv.ccnt 	var.tccom120.ccnt 
domain	bccnv.ccnt 	var.tccom122.ccnt 

long	var.tccom110.scon
 
long	var.tccom112.itst
string	var.tccom112.cinm(3)
 
domain	bccom.bpid	var.tccom120.scus
domain	bcstc.bpid 	var.tccom100.bptx

long	var.tccom100.bpst
long	var.tccom111.bpst
long	var.tccom114.bpst 
long	var.tccom120.bpst
long	var.tccom121.bpst
long	var.tccom122.bpst
long	var.tccom124.bpst

domain	tcyesno	var.tccom112.cvyn
domain	tcyesno	var.tccom122.cvyn
string	var.tccom122.ptbp(9)

static	long		bp.code.depth
	long		sorted.bp.code.def(1, 4)
	long		bp.code.length
domain  bcstc.bpid	bp.code.list(1)	based

domain	tccuno		converted.cuno
|#800-141596.sn
domain	bcstc.bpid	var.tccom100.prbp
|#800-141596.en
domain	bcstc.bpid	hold.tccom100.prbp

domain	bcstc.bpid	var.tccom112.pfbp
domain	bcstc.bpid	var.tccom110.bpus

string var.mstm(3)
string var.docm(3)
domain tcmcs.s200m	var.err.mess

	long		var.tccom100.bprl
	long		var.date
:STBL:tccom010,tccom020,tirou001,bcstc011,bcstc008,bcstc000,bcstc004,bcstc005,bcstc018,tdsls000,tdpst000,tcmcs025,tccom000,tccom999,tdpur040,tdpur300,tfacp262,tfacp316,tccom013
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tc
:TCMOD:com
:TFLNO:115
:LDAT:2/4/2017 2:14:16 PM
:PRTX:START
migrate tccom015
:PRTX:END
:STAT:V
:VARI:string	var.tccom115.pfbp(9)
string	o.mess(1)
domain	bcstf.bank	var.tccom115.brch
:STBL:tccom015,bcstc008,bcstf006
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---
%TStccom4515m000 -> %SStccom1105m000


---  Migration Logic  ---
In our standard migration solution, tfcmg011 is filled from intermediate table bcstf006(bcstf0106m000  is executed first as a preconversion session to insert the records into bcstf006 from Baan IV source tables) and bcstf006  has a field called 'cbad' (international bank ID) that takes the swift code from the corresponding Baan IV tables. There after during actual migration, records are dumped from bcstf006 into tfcmg011. So even when customer migrates the data from FBU vrc, he will still run the preconversion session to insert records in bcstf006 from  Baan IV FBU tables and the same logic will hold good. So there is really no need to write any additional logic for filling the tccom115.brch in the IBCA for FBU.  The SWIFT code will in any case map to tfcmg011 when we insert records in bcstf006 followed by dumping  into tfcmg011 from bcstf006 in the actual migration run..  


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:








:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tc
:TCMOD:com
:TFLNO:120
:LDAT:12/10/2017 12:38:52 PM
:PRTX:START
hold.cmpnr = compnr
var.utc0 = utc(0, 0)
var.date = date.num()
bp.code.depth = 0

define.length.and.search.def()

select 	bcstc011.* 
from	bcstc011
where	bcstc011.brtp in ("SLS", "PUR") 
selectdo 
	 if (bcstc011.brtp = "SLS") then 
		var.tccom112.rtyp = bcstc011.rtyp 
	 else 
		var.tccom12x.rtyp = bcstc011.rtyp
	 endif 
endselect 

read.parameters.common(o.mess)

read.parameter("tdsls000", o.mess)
read.parameter("tdpst000", o.mess)
read.parameter("tdpur000", o.mess)
read.parameter("tccom000", o.mess)
read.parameter("tccom999", o.mess)

if tccom999.trtr = tcyesno.yes then
	var.tccom110.frin = tcyesno.yes
else
	var.tccom110.frin = tcyesno.no
endif

var.tccom100.ccur =  get.home.currency.orig.comp()  
|#800-141596.sn
|* Parent business partner should always be filled with the business
|* partner, which is defined in bcstc000 (Default Parent Business Partner).
|* Retrieve business partner from customer or supplier or factoring company.
create.default.parent.bp(hold.tccom100.prbp)
|* One-Time BP should not get a Parent BP filled.
|#800-141596.en


var.tccom100.bprl = 1	|* 1	No roles defined
			|* 2	Customer
			|* 3	Supplier
migrate   tcmcs025

var.tccom100.bprl = 2	|* 2	Customer
migrate   tccom010

var.tccom100.bprl = 3	|* 3	Supplier
migrate   tccom020

|* Can also be: Both (Customer & Supplier).
|* However, then the BP is already dumped as a 'Customer', which cannot be updated.
|* This can be corrected in Post migration session bcttc0201, with option Correct 'CP Role' checked.
:PRTX:END
:STAT:V
:VARI:#define	MEMORY_ALLOCATION_SIZE	10000

domain	tctfcd		g.dialcode.for.telephone
domain	tcfxcd		g.dialcode.for.fax

	string		var.phone.number(32)
	string		var.fax.number(32)
domain	tctfcd		var.country.for.phone.number
domain	tctfcd		var.country.for.fax.number

	string		hold.tccom100.bpid(9)	|* For cuno and suno 
domain  bccadr		hold.tccom010.cadr 
domain	bccadr		hold.tccom111.cadr 
domain	bccnv.ccnt 	hold.tccom110.ccnt 

domain		tcncmp hold.cmpnr 
domain		bccnv.fent  var.tccom110.cofc 
domain		bccnv.fent  var.tccom120.cofc
long		link.to.sub 

string		var.tccom100.bpid(9)	|* For cuno and suno 
string		temp.key.ccor(9) 
string		temp.key.cdel(9) 
string		var.tccom110.bppr(9)
string		var.utc0(23)
domain		tcmcs.s200m		o.mess
 
domain  bccadr		var.tccom010.cadr 
domain  bccadr		var.tccom020.cadr 
domain	bccadr		var.tccom100.cadr
domain	bccadr		var.tccom110.cadr 
domain	bccadr		var.tccom111.cadr 
domain	bccadr		var.tccom120.cadr

string	var.tccom112.rtyp(3)
string	var.tccom12x.rtyp(3)	|* used for tccom122.rtyp and tccom124.rtyp


domain	tcyesno	var.tccom100.sndr 
long	var.tccom100.prst
domain	tcyesno	var.tccom100.edyn
domain	tcyesno	var.tccom100.inrl
domain	tcccur	var.tccom100.ccur
domain	tcnama	var.tccom100.nama
domain	tcseak	var.tccom100.seak

domain tcyesno	var.tccom110.frin
  
domain	bccnv.ccnt	hold.ccnt
domain	bccnv.ccnt 	var.tccom110.ccnt 
domain	bccnv.ccnt 	var.tccom112.ccnt 
domain	bccnv.ccnt 	var.tccom120.ccnt 
domain	bccnv.ccnt 	var.tccom122.ccnt 

long	var.tccom110.scon
 
long	var.tccom112.itst
string	var.tccom112.cinm(3)
 
domain	bccom.bpid	var.tccom120.scus
domain	bcstc.bpid 	var.tccom100.bptx

long	var.tccom100.bpst
long	var.tccom111.bpst
long	var.tccom114.bpst 
long	var.tccom120.bpst
long	var.tccom121.bpst
long	var.tccom122.bpst
long	var.tccom124.bpst

domain	tcyesno	var.tccom112.cvyn
domain	tcyesno	var.tccom122.cvyn
string	var.tccom122.ptbp(9)

static	long		bp.code.depth
	long		sorted.bp.code.def(1, 4)
	long		bp.code.length
domain  bcstc.bpid	bp.code.list(1)	based

domain	tccuno		converted.cuno
|#800-141596.sn
domain	bcstc.bpid	var.tccom100.prbp
|#800-141596.en
domain	bcstc.bpid	hold.tccom100.prbp

domain	bcstc.bpid	var.tccom112.pfbp
domain	bcstc.bpid	var.tccom110.bpus

string var.mstm(3)
string var.docm(3)
domain tcmcs.s200m	var.err.mess

	long		var.tccom100.bprl
	long		var.date
:STBL:tccom010,tccom020,tirou001,bcstc011,bcstc008,bcstc000,bcstc004,bcstc005,bcstc018,tdsls000,tdpst000,tcmcs025,tccom000,tccom999,tdpur040,tdpur300,tfacp262,tfacp316,tccom013
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tc
:TCMOD:com
:TFLNO:121
:LDAT:12/10/2017 12:38:52 PM
:PRTX:START
hold.cmpnr = compnr
var.utc0 = utc(0, 0)
var.date = date.num()
bp.code.depth = 0

define.length.and.search.def()

select 	bcstc011.* 
from	bcstc011
where	bcstc011.brtp in ("SLS", "PUR") 
selectdo 
	 if (bcstc011.brtp = "SLS") then 
		var.tccom112.rtyp = bcstc011.rtyp 
	 else 
		var.tccom12x.rtyp = bcstc011.rtyp
	 endif 
endselect 

read.parameters.common(o.mess)

read.parameter("tdsls000", o.mess)
read.parameter("tdpst000", o.mess)
read.parameter("tdpur000", o.mess)
read.parameter("tccom000", o.mess)
read.parameter("tccom999", o.mess)

if tccom999.trtr = tcyesno.yes then
	var.tccom110.frin = tcyesno.yes
else
	var.tccom110.frin = tcyesno.no
endif

var.tccom100.ccur =  get.home.currency.orig.comp()  
|#800-141596.sn
|* Parent business partner should always be filled with the business
|* partner, which is defined in bcstc000 (Default Parent Business Partner).
|* Retrieve business partner from customer or supplier or factoring company.
create.default.parent.bp(hold.tccom100.prbp)
|* One-Time BP should not get a Parent BP filled.
|#800-141596.en


var.tccom100.bprl = 1	|* 1	No roles defined
			|* 2	Customer
			|* 3	Supplier
migrate   tcmcs025

var.tccom100.bprl = 2	|* 2	Customer
migrate   tccom010

var.tccom100.bprl = 3	|* 3	Supplier
migrate   tccom020

|* Can also be: Both (Customer & Supplier).
|* However, then the BP is already dumped as a 'Customer', which cannot be updated.
|* This can be corrected in Post migration session bcttc0201, with option Correct 'CP Role' checked.
:PRTX:END
:STAT:V
:VARI:#define	MEMORY_ALLOCATION_SIZE	10000

domain	tctfcd		g.dialcode.for.telephone
domain	tcfxcd		g.dialcode.for.fax

	string		var.phone.number(32)
	string		var.fax.number(32)
domain	tctfcd		var.country.for.phone.number
domain	tctfcd		var.country.for.fax.number

	string		hold.tccom100.bpid(9)	|* For cuno and suno 
domain  bccadr		hold.tccom010.cadr 
domain	bccadr		hold.tccom111.cadr 
domain	bccnv.ccnt 	hold.tccom110.ccnt 

domain		tcncmp hold.cmpnr 
domain		bccnv.fent  var.tccom110.cofc 
domain		bccnv.fent  var.tccom120.cofc
long		link.to.sub 

string		var.tccom100.bpid(9)	|* For cuno and suno 
string		temp.key.ccor(9) 
string		temp.key.cdel(9) 
string		var.tccom110.bppr(9)
string		var.utc0(23)
domain		tcmcs.s200m		o.mess
 
domain  bccadr		var.tccom010.cadr 
domain  bccadr		var.tccom020.cadr 
domain	bccadr		var.tccom100.cadr
domain	bccadr		var.tccom110.cadr 
domain	bccadr		var.tccom111.cadr 
domain	bccadr		var.tccom120.cadr

string	var.tccom112.rtyp(3)
string	var.tccom12x.rtyp(3)	|* used for tccom122.rtyp and tccom124.rtyp


domain	tcyesno	var.tccom100.sndr 
long	var.tccom100.prst
domain	tcyesno	var.tccom100.edyn
domain	tcyesno	var.tccom100.inrl
domain	tcccur	var.tccom100.ccur
domain	tcnama	var.tccom100.nama
domain	tcseak	var.tccom100.seak

domain tcyesno	var.tccom110.frin
  
domain	bccnv.ccnt	hold.ccnt
domain	bccnv.ccnt 	var.tccom110.ccnt 
domain	bccnv.ccnt 	var.tccom112.ccnt 
domain	bccnv.ccnt 	var.tccom120.ccnt 
domain	bccnv.ccnt 	var.tccom122.ccnt 

long	var.tccom110.scon
 
long	var.tccom112.itst
string	var.tccom112.cinm(3)
 
domain	bccom.bpid	var.tccom120.scus
domain	bcstc.bpid 	var.tccom100.bptx

long	var.tccom100.bpst
long	var.tccom111.bpst
long	var.tccom114.bpst 
long	var.tccom120.bpst
long	var.tccom121.bpst
long	var.tccom122.bpst
long	var.tccom124.bpst

domain	tcyesno	var.tccom112.cvyn
domain	tcyesno	var.tccom122.cvyn
string	var.tccom122.ptbp(9)

static	long		bp.code.depth
	long		sorted.bp.code.def(1, 4)
	long		bp.code.length
domain  bcstc.bpid	bp.code.list(1)	based

domain	tccuno		converted.cuno
|#800-141596.sn
domain	bcstc.bpid	var.tccom100.prbp
|#800-141596.en
domain	bcstc.bpid	hold.tccom100.prbp

domain	bcstc.bpid	var.tccom112.pfbp
domain	bcstc.bpid	var.tccom110.bpus

string var.mstm(3)
string var.docm(3)
domain tcmcs.s200m	var.err.mess

	long		var.tccom100.bprl
	long		var.date
:STBL:tccom010,tccom020,tirou001,bcstc011,bcstc008,bcstc000,bcstc004,bcstc005,bcstc018,tdsls000,tdpst000,tcmcs025,tccom000,tccom999,tdpur040,tdpur300,tfacp262,tfacp316,tccom013
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tc
:TCMOD:com
:TFLNO:122
:LDAT:12/10/2017 12:38:53 PM
:PRTX:START
hold.cmpnr = compnr
var.utc0 = utc(0, 0)
var.date = date.num()
bp.code.depth = 0

define.length.and.search.def()

select 	bcstc011.* 
from	bcstc011
where	bcstc011.brtp in ("SLS", "PUR") 
selectdo 
	 if (bcstc011.brtp = "SLS") then 
		var.tccom112.rtyp = bcstc011.rtyp 
	 else 
		var.tccom12x.rtyp = bcstc011.rtyp
	 endif 
endselect 

read.parameters.common(o.mess)

read.parameter("tdsls000", o.mess)
read.parameter("tdpst000", o.mess)
read.parameter("tdpur000", o.mess)
read.parameter("tccom000", o.mess)
read.parameter("tccom999", o.mess)

if tccom999.trtr = tcyesno.yes then
	var.tccom110.frin = tcyesno.yes
else
	var.tccom110.frin = tcyesno.no
endif

var.tccom100.ccur =  get.home.currency.orig.comp()  
|#800-141596.sn
|* Parent business partner should always be filled with the business
|* partner, which is defined in bcstc000 (Default Parent Business Partner).
|* Retrieve business partner from customer or supplier or factoring company.
create.default.parent.bp(hold.tccom100.prbp)
|* One-Time BP should not get a Parent BP filled.
|#800-141596.en


var.tccom100.bprl = 1	|* 1	No roles defined
			|* 2	Customer
			|* 3	Supplier
migrate   tcmcs025

var.tccom100.bprl = 2	|* 2	Customer
migrate   tccom010

var.tccom100.bprl = 3	|* 3	Supplier
migrate   tccom020

|* Can also be: Both (Customer & Supplier).
|* However, then the BP is already dumped as a 'Customer', which cannot be updated.
|* This can be corrected in Post migration session bcttc0201, with option Correct 'CP Role' checked.
:PRTX:END
:STAT:V
:VARI:#define	MEMORY_ALLOCATION_SIZE	10000

domain	tctfcd		g.dialcode.for.telephone
domain	tcfxcd		g.dialcode.for.fax

	string		var.phone.number(32)
	string		var.fax.number(32)
domain	tctfcd		var.country.for.phone.number
domain	tctfcd		var.country.for.fax.number

	string		hold.tccom100.bpid(9)	|* For cuno and suno 
domain  bccadr		hold.tccom010.cadr 
domain	bccadr		hold.tccom111.cadr 
domain	bccnv.ccnt 	hold.tccom110.ccnt 

domain		tcncmp hold.cmpnr 
domain		bccnv.fent  var.tccom110.cofc 
domain		bccnv.fent  var.tccom120.cofc
long		link.to.sub 

string		var.tccom100.bpid(9)	|* For cuno and suno 
string		temp.key.ccor(9) 
string		temp.key.cdel(9) 
string		var.tccom110.bppr(9)
string		var.utc0(23)
domain		tcmcs.s200m		o.mess
 
domain  bccadr		var.tccom010.cadr 
domain  bccadr		var.tccom020.cadr 
domain	bccadr		var.tccom100.cadr
domain	bccadr		var.tccom110.cadr 
domain	bccadr		var.tccom111.cadr 
domain	bccadr		var.tccom120.cadr

string	var.tccom112.rtyp(3)
string	var.tccom12x.rtyp(3)	|* used for tccom122.rtyp and tccom124.rtyp


domain	tcyesno	var.tccom100.sndr 
long	var.tccom100.prst
domain	tcyesno	var.tccom100.edyn
domain	tcyesno	var.tccom100.inrl
domain	tcccur	var.tccom100.ccur
domain	tcnama	var.tccom100.nama
domain	tcseak	var.tccom100.seak

domain tcyesno	var.tccom110.frin
  
domain	bccnv.ccnt	hold.ccnt
domain	bccnv.ccnt 	var.tccom110.ccnt 
domain	bccnv.ccnt 	var.tccom112.ccnt 
domain	bccnv.ccnt 	var.tccom120.ccnt 
domain	bccnv.ccnt 	var.tccom122.ccnt 

long	var.tccom110.scon
 
long	var.tccom112.itst
string	var.tccom112.cinm(3)
 
domain	bccom.bpid	var.tccom120.scus
domain	bcstc.bpid 	var.tccom100.bptx

long	var.tccom100.bpst
long	var.tccom111.bpst
long	var.tccom114.bpst 
long	var.tccom120.bpst
long	var.tccom121.bpst
long	var.tccom122.bpst
long	var.tccom124.bpst

domain	tcyesno	var.tccom112.cvyn
domain	tcyesno	var.tccom122.cvyn
string	var.tccom122.ptbp(9)

static	long		bp.code.depth
	long		sorted.bp.code.def(1, 4)
	long		bp.code.length
domain  bcstc.bpid	bp.code.list(1)	based

domain	tccuno		converted.cuno
|#800-141596.sn
domain	bcstc.bpid	var.tccom100.prbp
|#800-141596.en
domain	bcstc.bpid	hold.tccom100.prbp

domain	bcstc.bpid	var.tccom112.pfbp
domain	bcstc.bpid	var.tccom110.bpus

string var.mstm(3)
string var.docm(3)
domain tcmcs.s200m	var.err.mess

	long		var.tccom100.bprl
	long		var.date
:STBL:tccom010,tccom020,tirou001,bcstc011,bcstc008,bcstc000,bcstc004,bcstc005,bcstc018,tdsls000,tdpst000,tcmcs025,tccom000,tccom999,tdpur040,tdpur300,tfacp262,tfacp316,tccom013
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tc
:TCMOD:com
:TFLNO:124
:LDAT:12/10/2017 12:38:54 PM
:PRTX:START
hold.cmpnr = compnr
var.utc0 = utc(0, 0)
var.date = date.num()
bp.code.depth = 0

define.length.and.search.def()

select 	bcstc011.* 
from	bcstc011
where	bcstc011.brtp in ("SLS", "PUR") 
selectdo 
	 if (bcstc011.brtp = "SLS") then 
		var.tccom112.rtyp = bcstc011.rtyp 
	 else 
		var.tccom12x.rtyp = bcstc011.rtyp
	 endif 
endselect 

read.parameters.common(o.mess)

read.parameter("tdsls000", o.mess)
read.parameter("tdpst000", o.mess)
read.parameter("tdpur000", o.mess)
read.parameter("tccom000", o.mess)
read.parameter("tccom999", o.mess)

if tccom999.trtr = tcyesno.yes then
	var.tccom110.frin = tcyesno.yes
else
	var.tccom110.frin = tcyesno.no
endif

var.tccom100.ccur =  get.home.currency.orig.comp()  
|#800-141596.sn
|* Parent business partner should always be filled with the business
|* partner, which is defined in bcstc000 (Default Parent Business Partner).
|* Retrieve business partner from customer or supplier or factoring company.
create.default.parent.bp(hold.tccom100.prbp)
|* One-Time BP should not get a Parent BP filled.
|#800-141596.en


var.tccom100.bprl = 1	|* 1	No roles defined
			|* 2	Customer
			|* 3	Supplier
migrate   tcmcs025

var.tccom100.bprl = 2	|* 2	Customer
migrate   tccom010

var.tccom100.bprl = 3	|* 3	Supplier
migrate   tccom020

|* Can also be: Both (Customer & Supplier).
|* However, then the BP is already dumped as a 'Customer', which cannot be updated.
|* This can be corrected in Post migration session bcttc0201, with option Correct 'CP Role' checked.
:PRTX:END
:STAT:V
:VARI:#define	MEMORY_ALLOCATION_SIZE	10000

domain	tctfcd		g.dialcode.for.telephone
domain	tcfxcd		g.dialcode.for.fax

	string		var.phone.number(32)
	string		var.fax.number(32)
domain	tctfcd		var.country.for.phone.number
domain	tctfcd		var.country.for.fax.number

	string		hold.tccom100.bpid(9)	|* For cuno and suno 
domain  bccadr		hold.tccom010.cadr 
domain	bccadr		hold.tccom111.cadr 
domain	bccnv.ccnt 	hold.tccom110.ccnt 

domain		tcncmp hold.cmpnr 
domain		bccnv.fent  var.tccom110.cofc 
domain		bccnv.fent  var.tccom120.cofc
long		link.to.sub 

string		var.tccom100.bpid(9)	|* For cuno and suno 
string		temp.key.ccor(9) 
string		temp.key.cdel(9) 
string		var.tccom110.bppr(9)
string		var.utc0(23)
domain		tcmcs.s200m		o.mess
 
domain  bccadr		var.tccom010.cadr 
domain  bccadr		var.tccom020.cadr 
domain	bccadr		var.tccom100.cadr
domain	bccadr		var.tccom110.cadr 
domain	bccadr		var.tccom111.cadr 
domain	bccadr		var.tccom120.cadr

string	var.tccom112.rtyp(3)
string	var.tccom12x.rtyp(3)	|* used for tccom122.rtyp and tccom124.rtyp


domain	tcyesno	var.tccom100.sndr 
long	var.tccom100.prst
domain	tcyesno	var.tccom100.edyn
domain	tcyesno	var.tccom100.inrl
domain	tcccur	var.tccom100.ccur
domain	tcnama	var.tccom100.nama
domain	tcseak	var.tccom100.seak

domain tcyesno	var.tccom110.frin
  
domain	bccnv.ccnt	hold.ccnt
domain	bccnv.ccnt 	var.tccom110.ccnt 
domain	bccnv.ccnt 	var.tccom112.ccnt 
domain	bccnv.ccnt 	var.tccom120.ccnt 
domain	bccnv.ccnt 	var.tccom122.ccnt 

long	var.tccom110.scon
 
long	var.tccom112.itst
string	var.tccom112.cinm(3)
 
domain	bccom.bpid	var.tccom120.scus
domain	bcstc.bpid 	var.tccom100.bptx

long	var.tccom100.bpst
long	var.tccom111.bpst
long	var.tccom114.bpst 
long	var.tccom120.bpst
long	var.tccom121.bpst
long	var.tccom122.bpst
long	var.tccom124.bpst

domain	tcyesno	var.tccom112.cvyn
domain	tcyesno	var.tccom122.cvyn
string	var.tccom122.ptbp(9)

static	long		bp.code.depth
	long		sorted.bp.code.def(1, 4)
	long		bp.code.length
domain  bcstc.bpid	bp.code.list(1)	based

domain	tccuno		converted.cuno
|#800-141596.sn
domain	bcstc.bpid	var.tccom100.prbp
|#800-141596.en
domain	bcstc.bpid	hold.tccom100.prbp

domain	bcstc.bpid	var.tccom112.pfbp
domain	bcstc.bpid	var.tccom110.bpus

string var.mstm(3)
string var.docm(3)
domain tcmcs.s200m	var.err.mess

	long		var.tccom100.bprl
	long		var.date
:STBL:tccom010,tccom020,tirou001,bcstc011,bcstc008,bcstc000,bcstc004,bcstc005,bcstc018,tdsls000,tdpst000,tcmcs025,tccom000,tccom999,tdpur040,tdpur300,tfacp262,tfacp316,tccom013
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tc
:TCMOD:com
:TFLNO:125
:LDAT:2/4/2017 2:16:28 PM
:PRTX:START
migrate tccom025

migrate tcmcs026
:PRTX:END
:STAT:V
:VARI:string	var.tccom125.ptbp(9)	

string	o.mess(1)

domain	bcstf.bank	var.tccom125.brch

domain  tccuno		tmp.cfcc
:STBL:tccom025,bcstc008,bcstf006,tcmcs026
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---
%TStccom4525m000 -> %SStccom2105m000


---  Migration Logic  ---
In our standard migration solution, tfcmg011 is filled from intermediate table bcstf006(bcstf0106m000  is executed first as a preconversion session to insert the records into bcstf006 from Baan IV source tables) and bcstf006  has a field called 'cbad' (international bank ID) that takes the swift code from the corresponding Baan IV tables. There after during actual migration, records are dumped from bcstf006 into tfcmg011. So even when customer migrates the data from FBU vrc, he will still run the preconversion session to insert records in bcstf006 from  Baan IV FBU tables and the same logic will hold good. So there is really no need to write any additional logic for filling the tccom125.brch in the IBCA for FBU.  The SWIFT code will in any case map to tfcmg011 when we insert records in bcstf006 followed by dumping  into tfcmg011 from bcstf006 in the actual migration run


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:








:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tc
:TCMOD:com
:TFLNO:130
:LDAT:6/17/2018 11:18:17 PM
:PRTX:START
#pragma used dll "otiitmdll0003"
#pragma used dll "obcstcdll0004"

tcmcs0095.read.parm("tccom999")

g.conv.factor = 1.0

if tccom999.trtr = tcyesno.yes then
	if read.parameter("trtcd000", o.mess) then
		return
	endif

	if trtcd000.cutm <> trtcd000.cuhr  and
	   not isspace(trtcd000.cutm) and
	   not isspace(trtcd000.cuhr) then
		l.conv.cutm = tiitm.dll0003.read.conv.with.physical.quantity(
					trtcd000.cutm,
					tctccu.time)
		l.conv.cuhr = tiitm.dll0003.read.conv.with.physical.quantity(
					trtcd000.cuhr,
					tctccu.time)

		g.conv.factor = l.conv.cutm / l.conv.cuhr
	endif
endif

|var.tccom139.idnr = 0					|#City.so
|var.prev.country = ""
|var.prev.city.code = ""					|#City.eo
var.date = date.num()					|#FP3.n

migrate bcstc004
:PRTX:END
:STAT:V
:VARI:|string			var.tccom139.seak(16)	mb		|#City.o
|long			var.tccom139.idnr			|#City.o
domain	bcstc.desc	var.tccom130.dsca			|#City.n
long			var.tccom130.defa			|#209024.n
string			var.tccom130.lvdt(22)
string			var.tccom130.nama(35)
domain	tcmcs.st10	var.tccom130.hono
domain	tcmcs.st10	var.tccom130.pobn
domain	tcnamb		g.tccom130.pobn
|domain	tcccty		var.prev.country			|#City.o
|domain	bcstc.city	var.prev.city.code			|#City.o
domain	tccreg		var.fmfmd010.creg
domain	trtop.time	var.fmfmd010.lwtm
domain	trtop.time	var.fmfmd010.ldtm
domain	trtop.time	var.fmfmd010.uwtm
domain	trtop.time	var.fmfmd010.untm
domain	tcconv		l.conv.cutm
domain	tcconv		l.conv.cuhr
domain	tcconv		g.conv.factor
string			o.mess(1)
	long		var.date				|#FP3.n

#include	"itcmcs0095"
:STBL:bcstc004,trtcd000,tccom999,bcstc031
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---



---  Migration Logic  ---
tccom130 is filled from the intermediate table bcstc004. The table bcstc004 is filled with records when the 'Generate Addresses' (bcstc0104m000) is run as a preconversion session. Record is inserted in bcstc004 from the source table "tccom000" and the corresponding company number. The 'cste' value is also filled for that record from tccom000. When bcstc004 is dumped into tccom130, automatically we have the corresponding record in the target side with the 'tccom000.cste' from source into tccom130.cste.


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tc
:TCMOD:mcs
:TFLNO:002
:LDAT:2/4/2017 2:17:19 PM
:PRTX:START
Migrate tcmcs002
:PRTX:END
:STAT:V
:VARI:domain tcccur	var.tcmcs002.ccur
:STBL:tcmcs002
:COMT:START
---  Changes in table design  ---
Not Applicable.


---  Source and Target Sessions  ---
%SStcmcs0102m000 - %TStcmcs0102m000


---  Migration Logic  ---
For FBU, only if tcmcs002.ccur # tcmcs002.icur and tcmcs002.icur <> "", then tcmcs002.ccur is filled from tcmcs002.icur (From FBU VRC) otherwise tcmcs002.ccur is filled from tcmcs002.ccur.



---  Migration Parameters  ---
Not Applicable.


---  Migration Mapping Tables  ---
Not Applicable.


---  Technical Notes  ---
Not Applicable.


---  Performance  ---
Not Applicable.


:COMT:END
:TEXT:



:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tc
:TCMOD:mcs
:TFLNO:010
:LDAT:2/4/2017 2:17:30 PM
:PRTX:START
read.tccom999.bnch()

on case tccom999.bnch
case tccom.bnch.proof11:  
	var.tcmcs010.bnch =  target(tccom.bnch.proof11)
	|* 11 - Check
	break
case tccom.bnch.proof97:
	var.tcmcs010.bnch =  target(tccom.bnch.proof97)
	|* 97 - Check
	break
case tccom.bnch.none:
	var.tcmcs010.bnch =  target(tccom.bnch.none)
	|* No Check
	break
default:
	var.tcmcs010.bnch =  target(tccom.bnch.none)
endcase

Migrate tcmcs010
:PRTX:END
:STAT:V
:VARI:table	ttccom999
table	ttracs020

domain	tcyesno	var.tcmcs010.meec
long		var.tcmcs010.bnch
string		var.tcmcs010.coaf(3)
long		var.tcmcs010.ppcd
string		var.tcmcs010.tzid(3)
string		dummy.err.mess(200)	mb
:STBL:bcstc014,tcmcs010,bcstc026
:COMT:START
---  Changes in table design  ---
Not Applicable.


---  Source and Target Sessions  ---
%SStcmcs0110m000 - %TStcmcs0510m000


---  Migration Logic  ---
Not Applicable.


---  Migration Parameters  ---
Not Applicable.


---  Migration Mapping Tables  ---
%STbcstc014
%STbcstc026

---  Technical Notes  ---
Not Applicable.


---  Performance  ---
Not Applicable.

:COMT:END
:TEXT:



:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acp
:TFLNO:005
:LDAT:2/4/2017 2:18:01 PM
:PRTX:START
ret.long = get.default.pur.type.for.tfacp(
		var.tfacp015.ptyp,
		error.message)  

hold.financial.bpg = "" 

migrate tfacp005
:PRTX:END
:STAT:V
:VARI:long			var.tfacp005.tran
domain	tcmcs.str6	var.tfacp015.ptyp
domain	tfgld.dimn	var.tfacp005.typ1
domain	tfgld.dimn	var.tfacp005.typ2
domain	tfgld.dimn	var.tfacp005.typ3
domain	tfgld.dimn	var.tfacp005.typ4
domain	tfgld.dimn	var.tfacp005.typ5
domain	tfacp.fisu	hold.financial.bpg
string	error.message
long	ret.long
:STBL:tfacp005,tfgld003,tfgld004
:COMT:START
--- Changes in table design ---
The table %STtfacp005 in the %SV environment has been split up in two tables in the %TV enviroment. These two tables are %TTtfacp005 and %TTtfacp015. In %TV the user has the ability to define per financial supplier group multiple control accounts. The entity, which is used to be able to create multiple control accounts per financial supplier group, is called Purchase Type.
 
--- Source and Target Sessions ---
%SStfacp0111s000 - %TStfacp0110m100

--- Migration Logic ---
The control accounts in %SV are inserted into the new table %TTtfacp015 in %TV. The entity Purchase Type is entered by the user in the session %SSbcstc0120m000.
For every new type of transaction in %TV compared to %SV, a default entry is added to %TTtfacp005.

--- Migration Mapping Tables ---
The default purchase type ,used to fill %TTtfacp015, is retrieved from mapping table %STbcstc020.

---  Technical Notes  ---

---  Performance  ---

:COMT:END
:TEXT:



:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acp
:TFLNO:015
:LDAT:2/4/2017 2:18:01 PM
:PRTX:START
ret.long = get.default.pur.type.for.tfacp(
		var.tfacp015.ptyp,
		error.message)  

hold.financial.bpg = "" 

migrate tfacp005
:PRTX:END
:STAT:V
:VARI:long			var.tfacp005.tran
domain	tcmcs.str6	var.tfacp015.ptyp
domain	tfgld.dimn	var.tfacp005.typ1
domain	tfgld.dimn	var.tfacp005.typ2
domain	tfgld.dimn	var.tfacp005.typ3
domain	tfgld.dimn	var.tfacp005.typ4
domain	tfgld.dimn	var.tfacp005.typ5
domain	tfacp.fisu	hold.financial.bpg
string	error.message
long	ret.long
:STBL:tfacp005,tfgld003,tfgld004
:COMT:START
--- Changes in table design ---
The table %STtfacp005 in the %SV environment has been split up in two tables in the %TV enviroment. These two tables are %TTtfacp005 and %TTtfacp015. In %TV the user has the ability to define per financial supplier group multiple control accounts. The entity, which is used to be able to create multiple control accounts per financial supplier group, is called Purchase Type.
 
--- Source and Target Sessions ---
%SStfacp0111s000 - %TStfacp0110m100

--- Migration Logic ---
The control accounts in %SV are inserted into the new table %TTtfacp015 in %TV. The entity Purchase Type is entered by the user in the session %SSbcstc0120m000.
For every new type of transaction in %TV compared to %SV, a default entry is added to %TTtfacp005.

--- Migration Mapping Tables ---
The default purchase type ,used to fill %TTtfacp015, is retrieved from mapping table %STbcstc020.

---  Technical Notes  ---

---  Performance  ---

:COMT:END
:TEXT:



:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acp
:TFLNO:100
:LDAT:12/10/2017 12:40:42 PM
:PRTX:START
ret.long = get.default.pur.type.for.tfacp(var.tfacp100.ptyp, error.message)
|* Get default purchase type
ret.long = get.exchange.rate.type("PUR", error.message)
var.tfacp100.rtyp = bcstc011.rtyp
|* Get Purchase rate type

migrate tfacp100
:PRTX:END
:STAT:V
:VARI:long			var.tfacp100.rade
long			ret.long
domain	tcmcs.s200m	error.message
domain	bcpsty		var.tfacp100.ptyp
domain	bcrtyp		var.tfacp100.rtyp
domain	tfacp.stin	var.tfacp100.stin
domain	tfgld.dimx	var.tfacp100.dim1
domain	tfgld.dimx	var.tfacp100.dim2
domain	tfgld.dimx	var.tfacp100.dim3
domain	tfgld.dimx	var.tfacp100.dim4
domain	tfgld.dimx	var.tfacp100.dim5

domain	tfgld.rate	var.tfacp100.rate(3)
domain	tcratf		var.tfacp100.ratf(3)
domain	tfgld.amnt	var.tfacp100.amth(3)
domain	tfacp.isup	var.tfacp100.isup			|#1360713.n
long			element
:STBL:tfacp100,bcstc011,tccom020,tfacp005
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---
%SStfacp1100m000 - %TStfacp1500m000


---  Migration Logic  ---



---  Migration Parameters  ---
Field %TFtfacp100.rtyp is filled with the exchange rate type "PUR", entered in %SSbcstc0111m000. 
Field %TFtfacp100.ptyp is filled with the default purchase type, entered in %SSbcstc0120m000. 


---  Migration Mapping Tables  ---
%STbcstc011
%STbcstc020


---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acp
:TFLNO:103
:LDAT:2/4/2017 2:18:34 PM
:PRTX:START
default.date = utc(0,0,2)
prev.suno = ""
prev.line = 0
migrate tfacp151
:PRTX:END
:STAT:V
:VARI:#include "itfgld0012"		|* Get period and year from date

string		var.str.bpid(9)	

	long	var.ninv
	long	var.bpay
	long	prev.line
	long	var.rcrr
	long	var.cbtn
	long	var.cdoc,var.tfacp103.radt
	
	string	prev.suno(6)	fixed
	string	var.ttyp(3)	fixed	
	string	var.crdt(20),var.tfacp103.dued(20)
	string	var.cyer(20)
	string	var.ctyp(3)	fixed
	string	default.date(20)

	domain tcmcs.s200m	var.err.mess
	domain	tfgld.year  var.nyer,var.tyer,var.ryer
	domain	tfgld.prod  var.fprd,var.rprd,var.tprd
:STBL:tfacp151,bcstc008
:COMT:START
---  Changes in table design  ---
In BaanIVc4 standard standing orders, recurring journal entries and payment schedules can be administered. For registering rent or lease payments in advance (characteristic: no invoice, but contract) as standing orders, no open items were generated. Also handling of this feature using the functionality of recurring journal entries or by payment schedules was not convenient. Therefore functionality was provided in BaanIVc4 FBU extension, table tfacp151, where in several due dates and the corresponding payment amount could be administered. For those, open items are also generated. 
In SSA ERP LN 6.1, this functionality is exclusively available in the table tfacp103.


---  Source and Target Sessions  ---
%SStfacp1551m000 -> %TStfacp1513m000


---  Migration Logic  ---
Only recurring invoices with status = posted for the first serial number of each line per supplier can be migrated. The customer is therefore advised to post all the recurring transactions before migration.


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:




:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acp
:TFLNO:200
:LDAT:1/16/2018 2:42:11 PM
:PRTX:START
ret.long = get.default.pur.type.for.tfacp(var.tfacp200.ptyp, error.message)
|* Get default purchace type
ret.long = get.exchange.rate.type("PUR", error.message)
var.tfacp200.rtyp = bcstc011.rtyp
|* Get Purchase rate type
current.company = get.compnr()					|#SP2.n

migrate tfacp200
:PRTX:END
:STAT:V
:VARI:#include "itfgld0012" |* Get period and year from date

long			element
long			ret.long	
domain	tcmcs.s200m	error.message
domain  bcstr9		business.partner
|domain	tccuno		hold.factor.company	fixed			|#1431629.o
domain	tccfcc		hold.factor.company	fixed			|#1431629.n
domain	tccuno		conv.factor.company	fixed			|#1431629.n
domain	tcsuno		hold.business.partner
domain	tccban		factor.bank
domain	tccban		var.tfacp200.bank
domain  bcstr9		var.tfacp200.ptbp
long			var.tfacp200.appr
long			var.tfacp200.rade
long			var.tfacp200.blac	
string			var.tfacp200.ptyp(6)
string			var.tfacp200.rtyp(3)
domain	tfgld.amnt	var.tfacp200.link
domain	tcccty		var.tfacp200.vatc
domain	tccvat		var.tfacp200.cvat
domain	tcratp		var.tfacp200.rate(3)
domain	tcratf		var.tfacp200.ratf(3)
domain	tfgld.amnt	var.tfacp200.amth(3)
domain	tfgld.amnt	var.tfacp200.vath(3)
domain	tfgld.amnt	var.tfacp200.svah(3)
domain	tfgld.amnt	var.tfacp200.laph(3)
domain	tfgld.amnt	var.tfacp200.dc1h(3)
domain	tfgld.amnt	var.tfacp200.dc2h(3)
domain	tfgld.amnt	var.tfacp200.dc3h(3)
domain	tfgld.amnt	var.tfacp200.padh(3)
domain	tfgld.amnt	var.tfacp200.cdam(3)
domain	tfgld.amnt	var.tfacp200.tore(3)
domain	tfgld.amnt	var.tfacp200.baca(3)
domain	tfgld.amnt	var.tfacp200.balh(3)
domain	tfgld.amnt	var.tfacp200.bahc(3)
long			var.tfacp200.step
domain	tfgld.prod	var.tfacp200.vatp
domain	tfgld.year	var.tfacp200.vaty
domain	tfgld.dimx	var.dimension1		|#1056135.sn
domain	tfgld.dimx	var.dimension2		
domain	tfgld.dimx	var.dimension3		
domain	tfgld.dimx	var.dimension4	
domain	tfgld.dimx	var.dimension5		|#1056135.en
domain	tfgld.leac	var.tfacp200.leac			|#FP3.n
domain	tcncmp		current.company				|#SP2.

								|#FP7.sn
domain	tcncmp		var.tfacp200.pcom		
domain	tfgld.ttyp	var.tfacp200.payt
domain	tfgld.docn	var.tfacp200.payd
domain	tfgld.lino	var.tfacp200.payl
domain	tfgld.amnt	var.tfacp500.toba
domain	tcyesno		var.tfacp500.flpd
								|#FP7.en
domain	tfacp.fisu	var.tfacp500.fisu			|#Migr. 10.6.n

								
domain 	tfacp.isup	var.tfacp200.isup			|#1360713.n
:STBL:tfacp200,bcstc011,tfacp005,tccom020,tfcmg112,tfgld018,tfgld102,tfgld106
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---
%SStfacp1110s000 - %TStfacp1110s000


---  Migration Logic  ---



---  Migration Parameters  ---
Field %TFtfacp200.rtyp is filled with the exchange rate type "PUR", entered in %SSbcstc0111m000. 
Field %TFtfacp200.ptyp is filled with the default purchase type, entered in %SSbcstc0120m000. 


---  Migration Mapping Tables  ---
%STbcstc011
%STbcstc020
%STbcstc030


---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acp
:TFLNO:240
:LDAT:12/10/2017 12:42:05 PM
:PRTX:START
ret.long = get.default.pur.type.for.tfacp(var.tfacp240.ptyp, error.message)
|* Get default purchace type
ret.long = get.exchange.rate.type("PUR", error.message)
ret.long = read.parameters.warehouse.management(error.message)
var.tfacp240.rtyp = bcstc011.rtyp
|* Get Purchase rate type
current.company = get.compnr()
								|#239888.sn
select 	 tfgld000.loco:logistic.company
from 	 tfgld000
where 	 tfgld000._index1 =  {:current.company}
selectdo
	 ret.long =  get.enterprise.unit(  
 	 	 	 current.company,  
 	 	 	 logistic.company,  
 	 	 	 error.message)  
	migrate tdpur045					|#239888.n
endselect
								|#239888.en


|migrate tdpur045						|#239888.o

|* The migration of tdpur045 to tfacp240 has strong resemblance with the migration of tdpur045 to
|* tdpur401. Please check if changes made here are also necessary in the object of tdpur401.
:PRTX:END
:STAT:V
:VARI:domain	tcncmp		logistic.company
domain	tcncmp		current.company
domain	tcmcs.s200m	error.message
long			ret.long
long 			no.of.receipt.lines	
long			element	
double  			prev.bqua 
domain 	tcorno		prev.orno
domain	tcpono		prev.pono
domain	tcsrnb		prev.srnb
domain 	tcorno		prev.040.orno
domain 	tcorno		prev.041.orno
domain	tcpono		prev.041.pono
domain	tckitm		item.type
domain	tcitem		prev.item	|* Hold Item
domain	tcittb		prev.item.category			|#242900.sn
domain	tccprj		prev.project				|#242900.en
 
|********************************************************************************
domain	tcpono		var.tfacp240.sqnb
domain	tcmcs.str9	var.tfacp240.orno
domain	bcitem		var.tfacp240.item
domain	tcmcs.str3	var.tfacp240.rtyp
domain	tcmcs.str6	var.tfacp240.ptyp
domain	tcmcs.str9	var.tfacp240.otbp
domain	tcmcs.str9	var.tfacp240.sfad
domain	tccuni		var.tfacp240.iuni
domain	tcmcs.str9	var.tfacp240.cadr
domain	tcqrd1		var.tfacp240.oqan 
domain	tfgld.amnt	var.tfacp240.oamt
domain	tcqrd1		var.tfacp240.rqty
domain	tcqrd1		var.tfacp240.tapq
domain	tcqrd1		var.tfacp240.trqu
domain	tcmcs.str6	var.tfacp240.byer
domain	tcyesno		var.tfacp240.bppr
|domain	tccprj		var.tfacp240.proj	|#SL200314.o
domain	bcstc.nprj	var.tfacp240.proj	|#SL200314.n
domain	tcyesno		var.tfacp240.toma
domain	tccitg		var.tfacp240.itgr
domain	tcmcs.str50	var.tfacp240.glco
domain	tcyesno		var.tfacp240.fire
long			var.tfacp240.mcfr
domain	tcratp		var.tfacp240.rate(3)
domain	tcratf		var.tfacp240.ratf(3)
domain	tfgld.amnt	var.tfacp240.amth(3)
domain	tcmcs.str40	var.tfacp245.borf
domain	tcmcs.str9	var.tfacp245.rcno
domain	tcpono		var.tfacp245.rseq			|#236822.n

domain	tcccty		var.tfacp240.vatc			|#SP2.n
domain	tccvat		var.tfacp240.cvat			|#210859
domain tfgld.amnt	var.tfacp249.gamt			|#migr fp5
domain tccrnd		var.inv.crnd				|#migr fp5

domain	tcpono		s.array.receipt.line(1) based		|#1019539.n

domain	tcbool		g.use.mapping.table  			|#fp10.sn
domain	tcqrd1		var.tfacp245.rqty
domain	tcqrd1		var.tfacp245.quan
domain	tcqrd1		var.tfacp245.trqn
domain	tfgld.amnt	var.tfacp245.oamt
domain	tcqrd1		g.quantity				
domain	tcqrd1		g.prev.bqua
domain	tcamnt		g.prev.amld
domain	tcamnt		g.prev.amod				|#fp10.en



|********************************************************************************
#pragma used dll "otdpurdll0022"	|* Calculate Multi-Level Discount
#pragma used dll "otccridll0011"
#include	"itccom0001"		|* round amounts
#include	"itccom0007"		|* Round quantity
#include	"itccom0015"		|* Read field data			|#149975.n
#include	"itcmcs0010"		|* Calculate and round amounts
:STBL:tccom020,tdpur041,tdpur045,tiitm001,tipcs020,bcstc011,bcstc020,bcstc018,tipcs021,tdpur040,tcmcs042,tdpur042,tcmcs002,bcswh008,bcswh000,bcstf014,bcswh010
:COMT:START
---  Changes in table design  ---
%TTtfacp240 and %TTtfacp245 are new in %TV compared to %SV. 


---  Source and Target Sessions  ---
%SStdpur4107s000 - %TStfacp2542m000
%SStfacp1132s000 - %TStfacp2543m000

---  Migration Logic  ---
The ACP-tables reside in a financial company. The PUR-tables reside in one or more logistic companies. To fill the ACP-tables all logistic companies linked to the financial company must be taken into account. Those records of %STtdpur045 where %SFtdpur045.fico equals the finance company are migrated. 
The next situations are possible:  
-  One entry in %STtdpur045 for the same order /  position. In %SV a record is added to %STtdpur045 the moment a order line is entered (receipt date is zero).   
   -  Number of receipt lines is zero (no receipts yet)  
   -  %SFtdpur045.srnb is zero  
   -  One record will be added to %TTtfacp240 (normal order line)  
-  Two entries in tdpur045 for the same order /  position. The first receipt in %SV results in a second entry in %STtdpur045 (with sequence number 1).  
   -  Number of receipt lines is one.  
   -  One record added to %TTtfacp240 (normal order line) 
   -  one record added to %TTtfacp245 (if %TFtdpur045.date is filled)  
-  More than two entries in tdpur045 for the same order /  position  
   (backorder(s) present)  
   -  One record added to %TTtfacp240 (original order line)  
   -  One record added to %TTtfacp240 for each back order. In %TV  each 
      back order results in a new order line.
   -  For each record of %STtdpur045 with %TFtdpur045.date filled,  
      (actual receipt date) a record is added to %TTtfacp245.  



---  Migration Parameters  ---
%TFtfacp240.rtyp is filled with the exchange rate type "PUR", entered in %SSbcstc0111m000. 
%TFtfacp240.ptyp is filled with the default purchase type, entered in %SSbcstc0120m000.
%TFtfacp240.poff is filled with the default purchase office, entered in %SSbcstc0118m000.
Order and receipt numbers are converted according to the settings in %SSbcstc0102m000.
Addresses are converted according to the settings in %SSbcstc0104m000.
Suppliers are converted according to the settings in %SSbcstc0108m000.
Projects are converted according the settings in %SSbcstc0116m000.



---  Migration Mapping Tables  ---
%STbcstc002
%STbcstc004
%STbcstc008
%STbcstc011
%STbcstc016
%STbcsts018
%STbcstc020
%SYbcstc030

---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acp
:TFLNO:245
:LDAT:12/10/2017 12:42:06 PM
:PRTX:START
ret.long = get.default.pur.type.for.tfacp(var.tfacp240.ptyp, error.message)
|* Get default purchace type
ret.long = get.exchange.rate.type("PUR", error.message)
ret.long = read.parameters.warehouse.management(error.message)
var.tfacp240.rtyp = bcstc011.rtyp
|* Get Purchase rate type
current.company = get.compnr()
								|#239888.sn
select 	 tfgld000.loco:logistic.company
from 	 tfgld000
where 	 tfgld000._index1 =  {:current.company}
selectdo
	 ret.long =  get.enterprise.unit(  
 	 	 	 current.company,  
 	 	 	 logistic.company,  
 	 	 	 error.message)  
	migrate tdpur045					|#239888.n
endselect
								|#239888.en


|migrate tdpur045						|#239888.o

|* The migration of tdpur045 to tfacp240 has strong resemblance with the migration of tdpur045 to
|* tdpur401. Please check if changes made here are also necessary in the object of tdpur401.
:PRTX:END
:STAT:V
:VARI:domain	tcncmp		logistic.company
domain	tcncmp		current.company
domain	tcmcs.s200m	error.message
long			ret.long
long 			no.of.receipt.lines	
long			element	
double  			prev.bqua 
domain 	tcorno		prev.orno
domain	tcpono		prev.pono
domain	tcsrnb		prev.srnb
domain 	tcorno		prev.040.orno
domain 	tcorno		prev.041.orno
domain	tcpono		prev.041.pono
domain	tckitm		item.type
domain	tcitem		prev.item	|* Hold Item
domain	tcittb		prev.item.category			|#242900.sn
domain	tccprj		prev.project				|#242900.en
 
|********************************************************************************
domain	tcpono		var.tfacp240.sqnb
domain	tcmcs.str9	var.tfacp240.orno
domain	bcitem		var.tfacp240.item
domain	tcmcs.str3	var.tfacp240.rtyp
domain	tcmcs.str6	var.tfacp240.ptyp
domain	tcmcs.str9	var.tfacp240.otbp
domain	tcmcs.str9	var.tfacp240.sfad
domain	tccuni		var.tfacp240.iuni
domain	tcmcs.str9	var.tfacp240.cadr
domain	tcqrd1		var.tfacp240.oqan 
domain	tfgld.amnt	var.tfacp240.oamt
domain	tcqrd1		var.tfacp240.rqty
domain	tcqrd1		var.tfacp240.tapq
domain	tcqrd1		var.tfacp240.trqu
domain	tcmcs.str6	var.tfacp240.byer
domain	tcyesno		var.tfacp240.bppr
|domain	tccprj		var.tfacp240.proj	|#SL200314.o
domain	bcstc.nprj	var.tfacp240.proj	|#SL200314.n
domain	tcyesno		var.tfacp240.toma
domain	tccitg		var.tfacp240.itgr
domain	tcmcs.str50	var.tfacp240.glco
domain	tcyesno		var.tfacp240.fire
long			var.tfacp240.mcfr
domain	tcratp		var.tfacp240.rate(3)
domain	tcratf		var.tfacp240.ratf(3)
domain	tfgld.amnt	var.tfacp240.amth(3)
domain	tcmcs.str40	var.tfacp245.borf
domain	tcmcs.str9	var.tfacp245.rcno
domain	tcpono		var.tfacp245.rseq			|#236822.n

domain	tcccty		var.tfacp240.vatc			|#SP2.n
domain	tccvat		var.tfacp240.cvat			|#210859
domain tfgld.amnt	var.tfacp249.gamt			|#migr fp5
domain tccrnd		var.inv.crnd				|#migr fp5

domain	tcpono		s.array.receipt.line(1) based		|#1019539.n

domain	tcbool		g.use.mapping.table  			|#fp10.sn
domain	tcqrd1		var.tfacp245.rqty
domain	tcqrd1		var.tfacp245.quan
domain	tcqrd1		var.tfacp245.trqn
domain	tfgld.amnt	var.tfacp245.oamt
domain	tcqrd1		g.quantity				
domain	tcqrd1		g.prev.bqua
domain	tcamnt		g.prev.amld
domain	tcamnt		g.prev.amod				|#fp10.en



|********************************************************************************
#pragma used dll "otdpurdll0022"	|* Calculate Multi-Level Discount
#pragma used dll "otccridll0011"
#include	"itccom0001"		|* round amounts
#include	"itccom0007"		|* Round quantity
#include	"itccom0015"		|* Read field data			|#149975.n
#include	"itcmcs0010"		|* Calculate and round amounts
:STBL:tccom020,tdpur041,tdpur045,tiitm001,tipcs020,bcstc011,bcstc020,bcstc018,tipcs021,tdpur040,tcmcs042,tdpur042,tcmcs002,bcswh008,bcswh000,bcstf014,bcswh010
:COMT:START
---  Changes in table design  ---
%TTtfacp240 and %TTtfacp245 are new in %TV compared to %SV. 


---  Source and Target Sessions  ---
%SStdpur4107s000 - %TStfacp2542m000
%SStfacp1132s000 - %TStfacp2543m000

---  Migration Logic  ---
The ACP-tables reside in a financial company. The PUR-tables reside in one or more logistic companies. To fill the ACP-tables all logistic companies linked to the financial company must be taken into account. Those records of %STtdpur045 where %SFtdpur045.fico equals the finance company are migrated. 
The next situations are possible:  
-  One entry in %STtdpur045 for the same order /  position. In %SV a record is added to %STtdpur045 the moment a order line is entered (receipt date is zero).   
   -  Number of receipt lines is zero (no receipts yet)  
   -  %SFtdpur045.srnb is zero  
   -  One record will be added to %TTtfacp240 (normal order line)  
-  Two entries in tdpur045 for the same order /  position. The first receipt in %SV results in a second entry in %STtdpur045 (with sequence number 1).  
   -  Number of receipt lines is one.  
   -  One record added to %TTtfacp240 (normal order line) 
   -  one record added to %TTtfacp245 (if %TFtdpur045.date is filled)  
-  More than two entries in tdpur045 for the same order /  position  
   (backorder(s) present)  
   -  One record added to %TTtfacp240 (original order line)  
   -  One record added to %TTtfacp240 for each back order. In %TV  each 
      back order results in a new order line.
   -  For each record of %STtdpur045 with %TFtdpur045.date filled,  
      (actual receipt date) a record is added to %TTtfacp245.  



---  Migration Parameters  ---
%TFtfacp240.rtyp is filled with the exchange rate type "PUR", entered in %SSbcstc0111m000. 
%TFtfacp240.ptyp is filled with the default purchase type, entered in %SSbcstc0120m000.
%TFtfacp240.poff is filled with the default purchase office, entered in %SSbcstc0118m000.
Order and receipt numbers are converted according to the settings in %SSbcstc0102m000.
Addresses are converted according to the settings in %SSbcstc0104m000.
Suppliers are converted according to the settings in %SSbcstc0108m000.
Projects are converted according the settings in %SSbcstc0116m000.



---  Migration Mapping Tables  ---
%STbcstc002
%STbcstc004
%STbcstc008
%STbcstc011
%STbcstc016
%STbcsts018
%STbcstc020
%SYbcstc030

---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acp
:TFLNO:249
:LDAT:12/10/2017 12:42:08 PM
:PRTX:START
ret.long = get.default.pur.type.for.tfacp(var.tfacp240.ptyp, error.message)
|* Get default purchace type
ret.long = get.exchange.rate.type("PUR", error.message)
ret.long = read.parameters.warehouse.management(error.message)
var.tfacp240.rtyp = bcstc011.rtyp
|* Get Purchase rate type
current.company = get.compnr()
								|#239888.sn
select 	 tfgld000.loco:logistic.company
from 	 tfgld000
where 	 tfgld000._index1 =  {:current.company}
selectdo
	 ret.long =  get.enterprise.unit(  
 	 	 	 current.company,  
 	 	 	 logistic.company,  
 	 	 	 error.message)  
	migrate tdpur045					|#239888.n
endselect
								|#239888.en


|migrate tdpur045						|#239888.o

|* The migration of tdpur045 to tfacp240 has strong resemblance with the migration of tdpur045 to
|* tdpur401. Please check if changes made here are also necessary in the object of tdpur401.
:PRTX:END
:STAT:V
:VARI:domain	tcncmp		logistic.company
domain	tcncmp		current.company
domain	tcmcs.s200m	error.message
long			ret.long
long 			no.of.receipt.lines	
long			element	
double  			prev.bqua 
domain 	tcorno		prev.orno
domain	tcpono		prev.pono
domain	tcsrnb		prev.srnb
domain 	tcorno		prev.040.orno
domain 	tcorno		prev.041.orno
domain	tcpono		prev.041.pono
domain	tckitm		item.type
domain	tcitem		prev.item	|* Hold Item
domain	tcittb		prev.item.category			|#242900.sn
domain	tccprj		prev.project				|#242900.en
 
|********************************************************************************
domain	tcpono		var.tfacp240.sqnb
domain	tcmcs.str9	var.tfacp240.orno
domain	bcitem		var.tfacp240.item
domain	tcmcs.str3	var.tfacp240.rtyp
domain	tcmcs.str6	var.tfacp240.ptyp
domain	tcmcs.str9	var.tfacp240.otbp
domain	tcmcs.str9	var.tfacp240.sfad
domain	tccuni		var.tfacp240.iuni
domain	tcmcs.str9	var.tfacp240.cadr
domain	tcqrd1		var.tfacp240.oqan 
domain	tfgld.amnt	var.tfacp240.oamt
domain	tcqrd1		var.tfacp240.rqty
domain	tcqrd1		var.tfacp240.tapq
domain	tcqrd1		var.tfacp240.trqu
domain	tcmcs.str6	var.tfacp240.byer
domain	tcyesno		var.tfacp240.bppr
|domain	tccprj		var.tfacp240.proj	|#SL200314.o
domain	bcstc.nprj	var.tfacp240.proj	|#SL200314.n
domain	tcyesno		var.tfacp240.toma
domain	tccitg		var.tfacp240.itgr
domain	tcmcs.str50	var.tfacp240.glco
domain	tcyesno		var.tfacp240.fire
long			var.tfacp240.mcfr
domain	tcratp		var.tfacp240.rate(3)
domain	tcratf		var.tfacp240.ratf(3)
domain	tfgld.amnt	var.tfacp240.amth(3)
domain	tcmcs.str40	var.tfacp245.borf
domain	tcmcs.str9	var.tfacp245.rcno
domain	tcpono		var.tfacp245.rseq			|#236822.n

domain	tcccty		var.tfacp240.vatc			|#SP2.n
domain	tccvat		var.tfacp240.cvat			|#210859
domain tfgld.amnt	var.tfacp249.gamt			|#migr fp5
domain tccrnd		var.inv.crnd				|#migr fp5

domain	tcpono		s.array.receipt.line(1) based		|#1019539.n

domain	tcbool		g.use.mapping.table  			|#fp10.sn
domain	tcqrd1		var.tfacp245.rqty
domain	tcqrd1		var.tfacp245.quan
domain	tcqrd1		var.tfacp245.trqn
domain	tfgld.amnt	var.tfacp245.oamt
domain	tcqrd1		g.quantity				
domain	tcqrd1		g.prev.bqua
domain	tcamnt		g.prev.amld
domain	tcamnt		g.prev.amod				|#fp10.en



|********************************************************************************
#pragma used dll "otdpurdll0022"	|* Calculate Multi-Level Discount
#pragma used dll "otccridll0011"
#include	"itccom0001"		|* round amounts
#include	"itccom0007"		|* Round quantity
#include	"itccom0015"		|* Read field data			|#149975.n
#include	"itcmcs0010"		|* Calculate and round amounts
:STBL:tccom020,tdpur041,tdpur045,tiitm001,tipcs020,bcstc011,bcstc020,bcstc018,tipcs021,tdpur040,tcmcs042,tdpur042,tcmcs002,bcswh008,bcswh000,bcstf014,bcswh010
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acp
:TFLNO:250
:LDAT:9/26/2017 9:18:47 PM
:PRTX:START
ret.long = get.exchange.rate.type("PUR", error.message)
var.tfacp250.rtyp = bcstc011.rtyp
ret.long = read.parameters.warehouse.management(error.message)
|* Get Purchase rate type
current.company = get.compnr()
hold.orno = 0
								|#239888.sn
select 	 tfgld000.loco:logistic.company
from 	 tfgld000
where 	 tfgld000._index1 =  {:current.company}
selectdo
								|#239888.en
	migrate tdpur046
endselect							|#239888.n
:PRTX:END
:STAT:V
:VARI:domain	tcmcs.str3	var.tfacp250.rtyp
domain	tcmcs.str9	var.tfacp250.orno
domain	tcmcs.str9	var.tfacp250.ifbp
string			var.tfacp250.ratd(22)
domain	tcqrd1		var.tfacp250.iqan
domain	tfgld.rate	var.tfacp250.rate(3)
domain	tcratf		var.tfacp250.ratf(3)
domain	tfgld.amnt	var.tfacp250.amth(3)
domain	tfgld.amnt	var.tfacp250.iamt
domain	tcmcs.str9	var.tfacp251.rcno
domain	tcpono		var.tfacp251.rseq			|#fp10.n
domain	tcccur		var.tfacp250.ccur			|#217083.sn
domain	tfgld.ttyp	var.tfacp250.tapr
domain	tfgld.docn	var.tfacp250.dapr			|#217083.en
domain	tcpono		var.tfacp250.sqnb			|#322471.n

domain	tcncmp		current.company
domain	tcmcs.s200m	error.message
long			ret.long
domain	tcncmp		logistic.company
domain	tcorno		hold.orno
domain	tccuni		inventory.unit				|#208878.n
domain	tcbool		g.use.mapping.table			|#fp10.sn
domain	tcqrd1		var.tfacp251.iqan
domain	tfgld.amnt	var.tfacp251.iamt
domain	tfgld.amnt	var.tfacp251.amth(3)
domain	tcqrd1		var.converted.iqan			|#fp10.en


#include	"itccom0007"
#include	"itccom0015"			|#149975.n
#include	"itcmcs0010"
:STBL:tcmcs002,tdpur040,tdpur046,tdpur045,tfacp200,bcstc011,tiitm001,tdpur041,tcmcs042,tdpur040,bcswh000,bcswh008,tfgld106,bcstf014,bcswh010
:COMT:START
---  Changes in table design  ---
%TTtfacp250 and %TTtfacp251 are new in %TV compared to %SV. 


---  Source and Target Sessions  ---
%SStfacp1132s000 - %TStfacp2552m000 / %TStfacp2551m000


---  Migration Logic  ---
The ACP-tables reside in a financial company. The PUR-tables reside in one or more logistic companies. To fill the ACP-tables all logistic companies linked to the financial company must be taken into account. Those records of %STtdpur046 where %SFtdpur046.icom equals the finance company are migrated. 
In %TV more than one receipt can be linked to an order line. In %SV only one receipt can be linked to an order line. So each record of %STtdpur046 is inserted in %TTtfacp251 and also in %TTtfacp250 (first receipt is at the same time the total receipt). 


---  Migration Parameters  ---
%TFtfacp200.rtyp is filled with the exchange rate type "PUR", entered in %SSbcstc0111m000. 
Order and receipt numbers are converted according to the settings in %SSbcstc0102m000. In case of a return order, %bcswh000.prsh is used to generate a receipt number.
Suppliers are converted according to the settings in %SSbcstc0108m000.


---  Migration Mapping Tables  ---
%STbcstc002
%STbcstc008
%STbcstc011
%STbcswh000
%STbcswh008

---  Technical Notes  ---
The main query contains a special statement, "tdpur046._index1 > "" ". Without this statement there is a drastically loss of performance.


---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acp
:TFLNO:251
:LDAT:9/26/2017 9:18:47 PM
:PRTX:START
ret.long = get.exchange.rate.type("PUR", error.message)
var.tfacp250.rtyp = bcstc011.rtyp
ret.long = read.parameters.warehouse.management(error.message)
|* Get Purchase rate type
current.company = get.compnr()
hold.orno = 0
								|#239888.sn
select 	 tfgld000.loco:logistic.company
from 	 tfgld000
where 	 tfgld000._index1 =  {:current.company}
selectdo
								|#239888.en
	migrate tdpur046
endselect							|#239888.n
:PRTX:END
:STAT:V
:VARI:domain	tcmcs.str3	var.tfacp250.rtyp
domain	tcmcs.str9	var.tfacp250.orno
domain	tcmcs.str9	var.tfacp250.ifbp
string			var.tfacp250.ratd(22)
domain	tcqrd1		var.tfacp250.iqan
domain	tfgld.rate	var.tfacp250.rate(3)
domain	tcratf		var.tfacp250.ratf(3)
domain	tfgld.amnt	var.tfacp250.amth(3)
domain	tfgld.amnt	var.tfacp250.iamt
domain	tcmcs.str9	var.tfacp251.rcno
domain	tcpono		var.tfacp251.rseq			|#fp10.n
domain	tcccur		var.tfacp250.ccur			|#217083.sn
domain	tfgld.ttyp	var.tfacp250.tapr
domain	tfgld.docn	var.tfacp250.dapr			|#217083.en
domain	tcpono		var.tfacp250.sqnb			|#322471.n

domain	tcncmp		current.company
domain	tcmcs.s200m	error.message
long			ret.long
domain	tcncmp		logistic.company
domain	tcorno		hold.orno
domain	tccuni		inventory.unit				|#208878.n
domain	tcbool		g.use.mapping.table			|#fp10.sn
domain	tcqrd1		var.tfacp251.iqan
domain	tfgld.amnt	var.tfacp251.iamt
domain	tfgld.amnt	var.tfacp251.amth(3)
domain	tcqrd1		var.converted.iqan			|#fp10.en


#include	"itccom0007"
#include	"itccom0015"			|#149975.n
#include	"itcmcs0010"
:STBL:tcmcs002,tdpur040,tdpur046,tdpur045,tfacp200,bcstc011,tiitm001,tdpur041,tcmcs042,tdpur040,bcswh000,bcswh008,tfgld106,bcstf014,bcswh010
:COMT:START
---  Changes in table design  ---
%TTtfacp250 and %TTtfacp251 are new in %TV compared to %SV. 


---  Source and Target Sessions  ---
%SStfacp1132s000 - %TStfacp2552m000 / %TStfacp2551m000


---  Migration Logic  ---
The ACP-tables reside in a financial company. The PUR-tables reside in one or more logistic companies. To fill the ACP-tables all logistic companies linked to the financial company must be taken into account. Those records of %STtdpur046 where %SFtdpur046.icom equals the finance company are migrated. 
In %TV more than one receipt can be linked to an order line. In %SV only one receipt can be linked to an order line. So each record of %STtdpur046 is inserted in %TTtfacp251 and also in %TTtfacp250 (first receipt is at the same time the total receipt). 


---  Migration Parameters  ---
%TFtfacp200.rtyp is filled with the exchange rate type "PUR", entered in %SSbcstc0111m000. 
Order and receipt numbers are converted according to the settings in %SSbcstc0102m000. In case of a return order, %bcswh000.prsh is used to generate a receipt number.
Suppliers are converted according to the settings in %SSbcstc0108m000.


---  Migration Mapping Tables  ---
%STbcstc002
%STbcstc008
%STbcstc011
%STbcswh000
%STbcswh008

---  Technical Notes  ---
The main query contains a special statement, "tdpur046._index1 > "" ". Without this statement there is a drastically loss of performance.


---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acp
:TFLNO:253
:LDAT:9/26/2017 9:18:48 PM
:PRTX:START
ret.long = get.exchange.rate.type("PUR", error.message)
var.tfacp250.rtyp = bcstc011.rtyp
ret.long = read.parameters.warehouse.management(error.message)
|* Get Purchase rate type
current.company = get.compnr()
hold.orno = 0
								|#239888.sn
select 	 tfgld000.loco:logistic.company
from 	 tfgld000
where 	 tfgld000._index1 =  {:current.company}
selectdo
								|#239888.en
	migrate tdpur046
endselect							|#239888.n
:PRTX:END
:STAT:V
:VARI:domain	tcmcs.str3	var.tfacp250.rtyp
domain	tcmcs.str9	var.tfacp250.orno
domain	tcmcs.str9	var.tfacp250.ifbp
string			var.tfacp250.ratd(22)
domain	tcqrd1		var.tfacp250.iqan
domain	tfgld.rate	var.tfacp250.rate(3)
domain	tcratf		var.tfacp250.ratf(3)
domain	tfgld.amnt	var.tfacp250.amth(3)
domain	tfgld.amnt	var.tfacp250.iamt
domain	tcmcs.str9	var.tfacp251.rcno
domain	tcpono		var.tfacp251.rseq			|#fp10.n
domain	tcccur		var.tfacp250.ccur			|#217083.sn
domain	tfgld.ttyp	var.tfacp250.tapr
domain	tfgld.docn	var.tfacp250.dapr			|#217083.en
domain	tcpono		var.tfacp250.sqnb			|#322471.n

domain	tcncmp		current.company
domain	tcmcs.s200m	error.message
long			ret.long
domain	tcncmp		logistic.company
domain	tcorno		hold.orno
domain	tccuni		inventory.unit				|#208878.n
domain	tcbool		g.use.mapping.table			|#fp10.sn
domain	tcqrd1		var.tfacp251.iqan
domain	tfgld.amnt	var.tfacp251.iamt
domain	tfgld.amnt	var.tfacp251.amth(3)
domain	tcqrd1		var.converted.iqan			|#fp10.en


#include	"itccom0007"
#include	"itccom0015"			|#149975.n
#include	"itcmcs0010"
:STBL:tcmcs002,tdpur040,tdpur046,tdpur045,tfacp200,bcstc011,tiitm001,tdpur041,tcmcs042,tdpur040,bcswh000,bcswh008,tfgld106,bcstf014,bcswh010
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acp
:TFLNO:311
:LDAT:2/4/2017 2:19:38 PM
:PRTX:START
migrate tfacp311
:PRTX:END
:STAT:V
:VARI:long		var.tfacp311.stms	 	
long		var.tfacp311.stmf
long		var.tfacp311.frqt
:STBL:tfacp311
:COMT:START
---  Changes in table design  ---
No changes in table design from source (FBU) and target.The enum constants have changed for %SFtfacp311.stmf and %SFtfacp311.stms from %SV to %TV



---  Source and Target Sessions  ---
%SStfacp3111m000 -->%TStfacp3522m000


---  Migration Logic  ---
Direct Mapping.


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:







:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acp
:TFLNO:312
:LDAT:2/4/2017 2:19:48 PM
:PRTX:START
migrate tfacp312
:PRTX:END
:STAT:V
:VARI:long var.tfacp312.styp
:STBL:tfacp312
:COMT:START
---  Changes in table design  ---
No changes in table design except that tfacp312.styp has three enum constants in source but two in target.  
tfacp312.styp = 3 (source) -->tfacp312.styp =  2 (target)


---  Source and Target Sessions  ---
%SStfacp3112m000--> %TStfacp3512m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:








:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acp
:TFLNO:313
:LDAT:2/4/2017 2:19:58 PM
:PRTX:START
migrate tfacp313
:PRTX:END
:STAT:V
:VARI:
:STBL:tfacp313
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---
%SStfacp3113m000--> %TStfacp3513m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:








:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acp
:TFLNO:314
:LDAT:2/4/2017 2:20:08 PM
:PRTX:START
migrate tfacp314
:PRTX:END
:STAT:V
:VARI:
:STBL:tfacp314
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---
 Source :  %SStfacp3114s000
 Target :  %TStfacp3114m000



---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:








:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acp
:TFLNO:315
:LDAT:2/4/2017 2:20:45 PM
:PRTX:START
migrate tfacp315
:PRTX:END
:STAT:V
:VARI:
:STBL:tfacp315
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---
 Source :  %SStfacp3115s000
 Target :   %TStfacp3115s000



---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:








:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acp
:TFLNO:460
:LDAT:2/4/2017 2:21:20 PM
:PRTX:START
migrate tfacp260
:PRTX:END
:STAT:V
:VARI:long		var.tfacp460.frst
long		var.tfacp460.secd
:STBL:tfacp260
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---
 %SStfacp2160m000 -> %TStfacp4160m000 


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:








:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acp
:TFLNO:461
:LDAT:2/4/2017 2:21:32 PM
:PRTX:START
migrate tfacp261
:PRTX:END
:STAT:V
:VARI:
:STBL:tfacp261
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---
%SStfacp2161m000 -> %TStfacp4161m000 


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:








:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acp
:TFLNO:500
:LDAT:1/16/2018 2:42:15 PM
:PRTX:START
ret.long = get.default.pur.type.for.tfacp(var.tfacp200.ptyp, error.message)
|* Get default purchace type
ret.long = get.exchange.rate.type("PUR", error.message)
var.tfacp200.rtyp = bcstc011.rtyp
|* Get Purchase rate type
current.company = get.compnr()					|#SP2.n

migrate tfacp200
:PRTX:END
:STAT:V
:VARI:#include "itfgld0012" |* Get period and year from date

long			element
long			ret.long	
domain	tcmcs.s200m	error.message
domain  bcstr9		business.partner
|domain	tccuno		hold.factor.company	fixed			|#1431629.o
domain	tccfcc		hold.factor.company	fixed			|#1431629.n
domain	tccuno		conv.factor.company	fixed			|#1431629.n
domain	tcsuno		hold.business.partner
domain	tccban		factor.bank
domain	tccban		var.tfacp200.bank
domain  bcstr9		var.tfacp200.ptbp
long			var.tfacp200.appr
long			var.tfacp200.rade
long			var.tfacp200.blac	
string			var.tfacp200.ptyp(6)
string			var.tfacp200.rtyp(3)
domain	tfgld.amnt	var.tfacp200.link
domain	tcccty		var.tfacp200.vatc
domain	tccvat		var.tfacp200.cvat
domain	tcratp		var.tfacp200.rate(3)
domain	tcratf		var.tfacp200.ratf(3)
domain	tfgld.amnt	var.tfacp200.amth(3)
domain	tfgld.amnt	var.tfacp200.vath(3)
domain	tfgld.amnt	var.tfacp200.svah(3)
domain	tfgld.amnt	var.tfacp200.laph(3)
domain	tfgld.amnt	var.tfacp200.dc1h(3)
domain	tfgld.amnt	var.tfacp200.dc2h(3)
domain	tfgld.amnt	var.tfacp200.dc3h(3)
domain	tfgld.amnt	var.tfacp200.padh(3)
domain	tfgld.amnt	var.tfacp200.cdam(3)
domain	tfgld.amnt	var.tfacp200.tore(3)
domain	tfgld.amnt	var.tfacp200.baca(3)
domain	tfgld.amnt	var.tfacp200.balh(3)
domain	tfgld.amnt	var.tfacp200.bahc(3)
long			var.tfacp200.step
domain	tfgld.prod	var.tfacp200.vatp
domain	tfgld.year	var.tfacp200.vaty
domain	tfgld.dimx	var.dimension1		|#1056135.sn
domain	tfgld.dimx	var.dimension2		
domain	tfgld.dimx	var.dimension3		
domain	tfgld.dimx	var.dimension4	
domain	tfgld.dimx	var.dimension5		|#1056135.en
domain	tfgld.leac	var.tfacp200.leac			|#FP3.n
domain	tcncmp		current.company				|#SP2.

								|#FP7.sn
domain	tcncmp		var.tfacp200.pcom		
domain	tfgld.ttyp	var.tfacp200.payt
domain	tfgld.docn	var.tfacp200.payd
domain	tfgld.lino	var.tfacp200.payl
domain	tfgld.amnt	var.tfacp500.toba
domain	tcyesno		var.tfacp500.flpd
								|#FP7.en
domain	tfacp.fisu	var.tfacp500.fisu			|#Migr. 10.6.n

								
domain 	tfacp.isup	var.tfacp200.isup			|#1360713.n
:STBL:tfacp200,bcstc011,tfacp005,tccom020,tfcmg112,tfgld018,tfgld102,tfgld106
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acr
:TFLNO:000
:LDAT:12/10/2017 12:44:53 PM
:PRTX:START
migrate tfacr000
:PRTX:END
:STAT:V
:VARI:string var.tfacr000.indt(22)
string var.tfacr000.dsca(50)
:STBL:tdcms000,tfacr000
:COMT:START
---  Changes in table design  ---

Lots of fields are removed from %STtfacr000 and are available in the %TV else where. See details below for removed fields:
%SFtfacr000.idm1  - %TFcisli100.dim1
%SFtfacr000.idm2  - %TFcisli100.dim2
%SFtfacr000.idm3  - %TFcisli100.dim3
%SFtfacr000.idm4  - %TFcisli100.dim4
%SFtfacr000.idm5  - %TFcisli100.dim5
%SFtfacr000.ilac  - %TFcisli100.msla
%SFtfacr000.itrt  - %TFcisli100.mstt
%SFtfacr000.lpac,%SFtfacr000.lpd1 , %SFtfacr000.lpd2, %SFtfacr000.lpd3, %SFtfacr000.lpd4, %SFtfacr000.lpd5  are moved  to  %TTtfacr005. Now %SFtfacr000.lpac is filled in %TFtfacr005.leac for the 'kind of transaction' Late payment surcharge. Also dimensions are filled for the same account in %TTtfacr005.

%SFtfacr000.srno -This field is no longer maintained in %TTtfacr000 because in the %TV the parameters are now time dependant and so each record is identified uniquely by an effective date %TFtfacr000.indt and no longer by a sequence number.

%SFtfacr000.typ1,%SFtfacr000.typ2, %SFtfacr000.typ3,              %SFtfacr000.typ4, %SFtfacr000.typ5 are removed in %TTtfacr000.  These fields are used to get the dimension types. As %SFtfacr000.lpac and %SFtfacr000.ilac are removed from the %STtfacr000 it is not neccessary to maintain the dimension types there.


---  Source and Target Sessions  ---
Source session - %SStfacr0100m000
Target session - %TStfacr0500m000


---  Migration Logic  ---
%GTtcmcs0000

---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acr
:TFLNO:005
:LDAT:2/13/2017 3:40:28 PM
:PRTX:START
var.tran.counter = 1
get.default.sls.type.for.tfacr(var.tfacr005.styp,var.err.mess)
migrate tfacr005
:PRTX:END
:STAT:V
:VARI:#include "itfgld0038"						|#250988.n


long var.tran.counter
long var.tfacr005.tran
string var.tfacr005.leac(12)
string var.tfacr005.control.leac(12)
string var.tfacr005.styp(6)
string var.err.mess(50)


								|#250988.sn
domain	tfacr.ficu	i.ficu
	string		acct.type(12)
domain	tfgld.dopt	child.dim.opt(5)
domain	tfgld.dopt 	parent.dim.opt(5)
domain	tfgld.dimx	child.dim(5)
domain	tfgld.dimx	parent.dim(5)

domain	tfgld.dimx	var.tfacr005.dim(5)

domain	tfgld.leac	parent.leac
								|#250988.en
:STBL:bcstc020,tfacr005,tfgld008
:COMT:START
---  Changes in table design  ---
%STtfacr005 is divided into two tables in %TV. The tables are %TTtfacr005 and %TTtfacr015 . In %TV %TTtfacr015 is a new table.

Refer to the following document for more details:
CS Data Conversion form Baan IVc4 to SSA Baan ERP 6.1 - Finance (D3439A US)

Dimenstions in are not filled in %TTtfacr005 and %TTtfacr015.
The following document explains about the Business Unit Accounting.
GTtfacr0005

---  Source and Target Sessions  ---
TFACR005
Source Session : %SStfacr0110m000
Target Session : %TStfacr0110m000

TFACR015
     Source : %SStfacr0110m000
     Target : %TStfacr0110m000

---  Migration Logic  ---
To migrate %STtfacr005 to %TTtfacr005 and %TTtfacr015 , control account record's ledger account must not be empty in %TTtfacr005.
If ledger account is not filled for control account for a financial business partner group in %STtfacr005, all the records related to this financial business partner group are not migrated to the %TTtfacr005 and %TTtfacr015.

Assuming that control account record is filled in the source for a given Financial BP group, all the records in %STtfacr005 should be inserted in to %TTtfacr005 except for the control account record. Control account record should be inserted in %TTtfacr015.
The enum constants of tfacr.tran ( from 16 to 33 ) , which are added for new functionalities in %TV, are inserted in %TTtfacr005 with empty ledger accounts , empty dimensions and default dimenstion types.
Migration Parameters


---  Migration Parameters  ---
TFACR015
An intermediate session %SSbcstc0120m000 is to be used to enter the default sales type.

---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:




:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acr
:TFLNO:015
:LDAT:2/13/2017 3:40:28 PM
:PRTX:START
var.tran.counter = 1
get.default.sls.type.for.tfacr(var.tfacr005.styp,var.err.mess)
migrate tfacr005
:PRTX:END
:STAT:V
:VARI:#include "itfgld0038"						|#250988.n


long var.tran.counter
long var.tfacr005.tran
string var.tfacr005.leac(12)
string var.tfacr005.control.leac(12)
string var.tfacr005.styp(6)
string var.err.mess(50)


								|#250988.sn
domain	tfacr.ficu	i.ficu
	string		acct.type(12)
domain	tfgld.dopt	child.dim.opt(5)
domain	tfgld.dopt 	parent.dim.opt(5)
domain	tfgld.dimx	child.dim(5)
domain	tfgld.dimx	parent.dim(5)

domain	tfgld.dimx	var.tfacr005.dim(5)

domain	tfgld.leac	parent.leac
								|#250988.en
:STBL:bcstc020,tfacr005,tfgld008
:COMT:START
---  Changes in table design  ---
%STtfacr005 is divided into two tables in %TV. The tables are %TTtfacr005 and %TTtfacr015 . In %TV %TTtfacr015 is a new table.

Refer to the following document for more details:
CS Data Conversion form Baan IVc4 to SSA Baan ERP 6.1 - Finance (D3439A US)

Dimenstions in are not filled in %TTtfacr005 and %TTtfacr015.
The following document explains about the Business Unit Accounting.
GTtfacr0005

---  Source and Target Sessions  ---
TFACR005
Source Session : %SStfacr0110m000
Target Session : %TStfacr0110m000

TFACR015
     Source : %SStfacr0110m000
     Target : %TStfacr0110m000

---  Migration Logic  ---
To migrate %STtfacr005 to %TTtfacr005 and %TTtfacr015 , control account record's ledger account must not be empty in %TTtfacr005.
If ledger account is not filled for control account for a financial business partner group in %STtfacr005, all the records related to this financial business partner group are not migrated to the %TTtfacr005 and %TTtfacr015.

Assuming that control account record is filled in the source for a given Financial BP group, all the records in %STtfacr005 should be inserted in to %TTtfacr005 except for the control account record. Control account record should be inserted in %TTtfacr015.
The enum constants of tfacr.tran ( from 16 to 33 ) , which are added for new functionalities in %TV, are inserted in %TTtfacr005 with empty ledger accounts , empty dimensions and default dimenstion types.
Migration Parameters


---  Migration Parameters  ---
TFACR015
An intermediate session %SSbcstc0120m000 is to be used to enter the default sales type.

---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:




:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acr
:TFLNO:103
:LDAT:2/4/2017 2:22:14 PM
:PRTX:START
default.date = utc(0,0,2)
prev.suno = ""
prev.line = 0
migrate tfacr151
:PRTX:END
:STAT:V
:VARI:#include "itfgld0012"		|* Get period and year from date
string		var.str.bpid(9)
string		default.date(20)
	string	var.tfacr103.dued(20)

	long	var.ninv
	long	var.bpay
	long	prev.line
	long	var.rcrr
	long	var.cbtn
	long	var.cdoc,var.tfacr103.radt

	
	string	prev.suno(6)	fixed
	string	var.ttyp(3)	fixed	
	string	var.crdt(20)
	string	var.cyer(20)
	string	var.ctyp(3)	fixed

	domain tcmcs.s200m	var.err.mess
	domain	tfgld.year  var.nyer,var.tyer,var.ryer
	domain	tfgld.prod  var.fprd,var.rprd,var.tprd
:STBL:tfacr151,bcstc008
:COMT:START
---  Changes in table design  ---
The functionality of recurring sales invoice instructions was not available in BaanIVc4 standard but was introduced in the FBU extension, table tfacr151. In SSA ERP LN 6.1, this functionality is exclusively available in the table tfacr103.


---  Source and Target Sessions  ---
%SStfacr1551m000 -> %TStfacr1513m000


---  Migration Logic  ---
Only recurring invoices with status = posted for the first serial number of each line per customer can be migrated. The customer is therefore advised to post all the recurring transactions before migration.



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:




:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acr
:TFLNO:200
:LDAT:1/16/2018 2:43:30 PM
:PRTX:START
|#ms.so
|select bccnv114.*
|from  bccnv114
|where bccnv114._index1 = {"SLS"}
|as set with 1 rows
|selectdo
|endselect
					|#ms.eo	
if not get.default.sls.type.for.tfacr(var.tfacr200.styp,var.err.mess) then
endif

if not get.exchange.rate.type("SLS",var.err.mess)  then
	var.str.rtyp = bcstc011.rtyp 
else
	var.str.rtyp = ""	
endif

current.company = get.compnr() |#fp7

migrate tfacr200
:PRTX:END
:STAT:V
:VARI:#include "itfgld0012"		|* Get period and year from date
#include "itfgld0038"		|#FP3.n


string		var.str.temp.key(9)	
	string		var.str.bpid(9)	
	long		var.tfacr200.rade	
	long		var.tfacr200.step
	long		var.tfacr200.cain
	long 		var.tfacr200.lvat	
	domain tcmcs.s200m	var.err.mess
	domain	bccadr		var.tfacr200.adrs
	domain	bcpsty		var.tfacr200.styp
	domain	bcrtyp		var.str.rtyp
	domain	tfgld.year	vat.year
	domain	tfgld.prod	vat.prod
	domain tcbool		hello.test
extern	long		ext.lng.fp_comp
domain tcccty	new.country
domain tccvat    new.tax
								|#200-102115.so

								|#200-101927.sn
|domain tfgld.amnt 	var.tfacr200.amnt,var.tfacr200.amti,var.tfacr200.amth,var.tfacr200.vata,
|			var.tfacr200.vati,var.tfacr200.vath, var.tfacr200.svam,var.tfacr200.svah,
|			var.tfacr200.lapa,var.tfacr200.lapi,var.tfacr200.laph,var.tfacr200.dc1a,
|			var.tfacr200.dc1i,var.tfacr200.dc1h,var.tfacr200.dc2a,var.tfacr200.dc2i,
|			var.tfacr200.dc2h,var.tfacr200.dc3a,var.tfacr200.dc3i,var.tfacr200.dc3h,
|			var.tfacr200.pada,var.tfacr200.padi,var.tfacr200.padh,var.tfacr200.balc,
|			var.tfacr200.balh,var.tfacr200.bala,var.tfacr200.bahc,var.tfacr200.baco,
|			var.tfacr200.baca,var.tfacr200.basi,var.tfacr200.cdam,var.tfacr200.tore 

								|#200-101927.en
								|bin-MCR.eo


								|#200-102115.sn

							
domain tfgld.amnt 	var.tfacr200.amnt,var.tfacr200.amti,var.tfacr200.vata,var.tfacr200.vati,
			var.tfacr200.svam,var.tfacr200.lapa,var.tfacr200.lapi,var.tfacr200.dc1a,var.tfacr200.dc1i,
			var.tfacr200.dc2a,var.tfacr200.dc2i,var.tfacr200.dc3a,var.tfacr200.dc3i,var.tfacr200.pada,
			var.tfacr200.padi,var.tfacr200.balc,var.tfacr200.bala,var.tfacr200.baco,var.tfacr200.basi


double 			var.tfacr200.amth(3),var.tfacr200.vath(3), var.tfacr200.svah(3),var.tfacr200.laph(3),
			var.tfacr200.dc1h(3),var.tfacr200.dc2h(3),var.tfacr200.dc3h(3),var.tfacr200.padh(3),
			var.tfacr200.balh(3),var.tfacr200.bahc(3),var.tfacr200.baca(3),var.tfacr200.cdam(3),
			var.tfacr200.tore(3) 

									
								|#200-102115.en

string		var.tfacr200.leac(12)			|#FP3.sn
Long		var.tfacr200.pysh			|#FP3.en
domain tfgld.dimx	var.dimension1
domain tfgld.dimx	var.dimension2
domain tfgld.dimx	var.dimension3
domain tfgld.dimx	var.dimension4
domain tfgld.dimx	var.dimension5
								|#235153.sn
long			var.tfacr200.post
domain	tfgld.date	var.tfacr200.pdat
								|#235153.en
								
								|#FP7.sn
domain	tcncmp		current.company		
domain	tcncmp		var.tfacr200.rcom		
domain	tfgld.ttyp	var.tfacr200.rect
domain	tfgld.docn	var.tfacr200.recd
domain	tfgld.lino	var.tfacr200.recl
domain	tfgld.amnt	var.tfacr500.toba
domain	tcyesno		var.tfacr500.flpd
								|#FP7.en
domain	tfacr.ficu	var.tfacr500.ficu			|#Migr. 10.6.n
:STBL:tfacr200,bcstc004,bcstc008,bcstc011,bcstc020,tfgld102,tfgld106,tfgld018,tfcmg112
:COMT:START
---  Changes in table design  ---
For data model changes and new functionality refer to general topics: 
CS Data Conversion form Baan IVc4 to SSA Baan ERP 6.1 - Finance (D3439A US)
The removed fields from %STtfacr200 in %SV are:
tfacr200.cuno - This field is replaced by %TFtfacr200.itbp in %TV. This is filled by means of the mapping table %STbcstc008

tfacr200.pcun - This field is replaced by %TFtfacr200.pfbp which is the Pay-By BP. This is also filled by means of the mapping table %STbcstc008. 

tfacr200.spot -  This field was used to indicate if a fixed rate was used or not. In %TV this is replaced by the Rate Determiner field tfacr200.rade. 

If tfacr200.spot is "yes" then
tfacr200.rade = "Fixed Local"
otherwise
tfacr200.rade = "Document Date". This logic is used because in most of the cases the data comes from logistics and there is no provision to enter the rates manually in the Baan IV side. So it is better that after the invoices are posted to tfacr200, if the fixed rate is 'No' in tfacr200 in %SV, then it should be migrated as 'Document Date' in %TV. For invoices which are manually created in Finance also, it is better if the tfacr200.rade is set to 'Document Date' if the tfacr200.spot is 'No' in %SV.
tfacr200.schn will be filled by post conversion program.

---  Source and Target Sessions  ---

%SStfacr1110s000 -> %TStfacr1110s000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---

The following migration mapping tables are used:

bcstc004 - For mapping into %TFtfacr200.adrs (Postal Address)
bcstc008- For mapping into %TFtfacr200.itbp and %TFtfacr200.pfbp (Business Partner)
bcstc011- For mapping into %TFtfacr200.rtyp (Exchange Rate Type)
bcstc020- For mapping into %TFtfacr200.styp (Sales Types)



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acr
:TFLNO:201
:LDAT:2/13/2017 3:45:32 PM
:PRTX:START
migrate tfacr201
:PRTX:END
:STAT:V
:VARI:
:STBL:tfacr201,tfacr200
:COMT:START
---  Changes in table design  ---
Refer to the following document for more details:

CS Data Conversion form Baan IVc4 to SSA Baan ERP 6.1 - Finance (D3439A US)
tfacr200.schn will be filled by post conversion program.

---  Source and Target Sessions  ---
     %SStfacr1103s000 - %TStfacr1103m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:



:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acr
:TFLNO:301
:LDAT:2/13/2017 3:45:59 PM
:PRTX:START
migrate tfacr301
:PRTX:END
:STAT:V
:VARI:
:STBL:tfacr301
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---
     Source : SS%tfacr3100m000
     Target : TS%tfacr3508m000

---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:



:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acr
:TFLNO:312
:LDAT:2/13/2017 3:47:52 PM
:PRTX:START
migrate tfacr312
:PRTX:END
:STAT:V
:VARI:domain	tfacp.agan	var.tfacr312.agan
:STBL:tfacr312,tfacr000
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---
Source session - %SStfacr3112m000
Target session - %TStfacr3512m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:







:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:acr
:TFLNO:500
:LDAT:1/16/2018 2:43:34 PM
:PRTX:START
|#ms.so
|select bccnv114.*
|from  bccnv114
|where bccnv114._index1 = {"SLS"}
|as set with 1 rows
|selectdo
|endselect
					|#ms.eo	
if not get.default.sls.type.for.tfacr(var.tfacr200.styp,var.err.mess) then
endif

if not get.exchange.rate.type("SLS",var.err.mess)  then
	var.str.rtyp = bcstc011.rtyp 
else
	var.str.rtyp = ""	
endif

current.company = get.compnr() |#fp7

migrate tfacr200
:PRTX:END
:STAT:V
:VARI:#include "itfgld0012"		|* Get period and year from date
#include "itfgld0038"		|#FP3.n


string		var.str.temp.key(9)	
	string		var.str.bpid(9)	
	long		var.tfacr200.rade	
	long		var.tfacr200.step
	long		var.tfacr200.cain
	long 		var.tfacr200.lvat	
	domain tcmcs.s200m	var.err.mess
	domain	bccadr		var.tfacr200.adrs
	domain	bcpsty		var.tfacr200.styp
	domain	bcrtyp		var.str.rtyp
	domain	tfgld.year	vat.year
	domain	tfgld.prod	vat.prod
	domain tcbool		hello.test
extern	long		ext.lng.fp_comp
domain tcccty	new.country
domain tccvat    new.tax
								|#200-102115.so

								|#200-101927.sn
|domain tfgld.amnt 	var.tfacr200.amnt,var.tfacr200.amti,var.tfacr200.amth,var.tfacr200.vata,
|			var.tfacr200.vati,var.tfacr200.vath, var.tfacr200.svam,var.tfacr200.svah,
|			var.tfacr200.lapa,var.tfacr200.lapi,var.tfacr200.laph,var.tfacr200.dc1a,
|			var.tfacr200.dc1i,var.tfacr200.dc1h,var.tfacr200.dc2a,var.tfacr200.dc2i,
|			var.tfacr200.dc2h,var.tfacr200.dc3a,var.tfacr200.dc3i,var.tfacr200.dc3h,
|			var.tfacr200.pada,var.tfacr200.padi,var.tfacr200.padh,var.tfacr200.balc,
|			var.tfacr200.balh,var.tfacr200.bala,var.tfacr200.bahc,var.tfacr200.baco,
|			var.tfacr200.baca,var.tfacr200.basi,var.tfacr200.cdam,var.tfacr200.tore 

								|#200-101927.en
								|bin-MCR.eo


								|#200-102115.sn

							
domain tfgld.amnt 	var.tfacr200.amnt,var.tfacr200.amti,var.tfacr200.vata,var.tfacr200.vati,
			var.tfacr200.svam,var.tfacr200.lapa,var.tfacr200.lapi,var.tfacr200.dc1a,var.tfacr200.dc1i,
			var.tfacr200.dc2a,var.tfacr200.dc2i,var.tfacr200.dc3a,var.tfacr200.dc3i,var.tfacr200.pada,
			var.tfacr200.padi,var.tfacr200.balc,var.tfacr200.bala,var.tfacr200.baco,var.tfacr200.basi


double 			var.tfacr200.amth(3),var.tfacr200.vath(3), var.tfacr200.svah(3),var.tfacr200.laph(3),
			var.tfacr200.dc1h(3),var.tfacr200.dc2h(3),var.tfacr200.dc3h(3),var.tfacr200.padh(3),
			var.tfacr200.balh(3),var.tfacr200.bahc(3),var.tfacr200.baca(3),var.tfacr200.cdam(3),
			var.tfacr200.tore(3) 

									
								|#200-102115.en

string		var.tfacr200.leac(12)			|#FP3.sn
Long		var.tfacr200.pysh			|#FP3.en
domain tfgld.dimx	var.dimension1
domain tfgld.dimx	var.dimension2
domain tfgld.dimx	var.dimension3
domain tfgld.dimx	var.dimension4
domain tfgld.dimx	var.dimension5
								|#235153.sn
long			var.tfacr200.post
domain	tfgld.date	var.tfacr200.pdat
								|#235153.en
								
								|#FP7.sn
domain	tcncmp		current.company		
domain	tcncmp		var.tfacr200.rcom		
domain	tfgld.ttyp	var.tfacr200.rect
domain	tfgld.docn	var.tfacr200.recd
domain	tfgld.lino	var.tfacr200.recl
domain	tfgld.amnt	var.tfacr500.toba
domain	tcyesno		var.tfacr500.flpd
								|#FP7.en
domain	tfacr.ficu	var.tfacr500.ficu			|#Migr. 10.6.n
:STBL:tfacr200,bcstc004,bcstc008,bcstc011,bcstc020,tfgld102,tfgld106,tfgld018,tfcmg112
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:cmg
:TFLNO:000
:LDAT:12/10/2017 12:50:16 PM
:PRTX:START
get.var(pid,"ext.lng.comp",ext.lng.comp) 

select	bcgct000.user
from	bcgct000
as set with 1 rows
selectdo
endselect

select	tccom000.ccur 
from	tccom000 
where	tccom000.ncmp = :ext.lng.comp 
as set with 1 rows
selectdo 
	|var.str.ccur = left.align(tccom000.ccur,3) |*MCR .o
	var.str.ccur = 	get.home.currency.orig.comp() |*MCR.n
selectempty 
	var.str.ccur = empty.string(1;3) 
endselect 

migrate tfcmg000
:PRTX:END
:STAT:V
:VARI:long		ext.lng.comp	 	string		var.str.ccur(3)	
	string 		var.tfcmg000.indt(22)
	string 		var.tfcmg000.desc(50)
	string		var.tfcmg000.supa(16)

	domain 		tfgld.btno	var.tfcmg000.bpay,var.tfcmg000.bdir
:STBL:tccom000,tfcmg000,bcgct000
:COMT:START
---  Changes in table design  ---
%GTtcmcs0000. 
The removed fields are:
%SFtfcmg000.accu  - Available in ACR parameters table as %TFtfacr000.agan in %TV
%SFtfcmg000.acsu -  Available in ACP parameters table as %TFtfacp000.agan in %TV
%SFtfcmg000.nper - This field is removed in %TTtfcmg000 because this data is  not needed in %TV.  The periods are used to  display  the detailed cash forecasts.  In %TV, this is got as an input from the user (No. of periods) after specifying  a date range in the concerned print session %TStfcmg3412m000  
%SFtfcmg000.srno - This field is no longer maintained in %TTtfcmg000 because in the %TV the parameters are now time dependant and so each record is identified uniquely by an effective date %TFtfcmg000.indt and no longer by a sequence number.


---  Source and Target Sessions  ---
Source session - %SStfcmg0100m000
Target session - %TStfcmg0500m000


---  Migration Logic  ---


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:cmg
:TFLNO:001
:LDAT:9/26/2017 9:18:49 PM
:PRTX:START
i.table.name = "tfcmg001"
migrate tfcmg001
:PRTX:END
:STAT:V
:VARI:|table		tbccnv901
domain	bcstc.tabl i.table.name
|domain	bcstc.tabl var.table
domain	bcstc.keys var.key.tfcmg001
string var.err.mess(50)
|string var.tfcmg001.brch(3) |#206515.o
domain bcstf.bank var.tfcmg001.brch |#206515.n
long	var.tfcmg001.toac
:STBL:bcstf006,tfcmg001
:COMT:START
---  Changes in table design  ---
     
Few new fields are added in the %TTtfcmg001 for the new functionalities added in %TV.
The following fields are removed from the %STtfcmg001 and placed in %TTtfcmg011:
 tfcmg001.badr  
 tfcmg001.bnid  
 tfcmg001.btyp  
 tfcmg001.cbad 

     The following documents will explain about the table mapping in detail.

CS Data Conversion form Baan IVc4 to SSA Baan ERP 6.1 - Finance (D3439A US)


---  Source and Target Sessions  ---
    
     Source : %SStfcmg0110m000
     Target : %TStfcmg0510m000 


---  Migration Logic  ---


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:cmg
:TFLNO:002
:LDAT:2/4/2017 2:22:55 PM
:PRTX:START
migrate tfcmg002
:PRTX:END
:STAT:V
:VARI:long		var.tfcmg002.vldc	
	domain	tcyesno	var.tfcmg002.serv
:STBL:tfcmg002,tfcmg116
:COMT:START
---  Changes in table design  ---
Four new fields are added in the %TTtfcmg002 .


---  Source and Target Sessions  ---
Source Session : %SStfcmg0130m000
Target Session : %TStfcmg0130m000

For FBU
Source Session : %SStfcmg1118m000

---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:



:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:cmg
:TFLNO:003
:LDAT:2/4/2017 2:23:04 PM
:PRTX:START
migrate tfcmg003
:PRTX:END
:STAT:V
:VARI:long		var.tfcmg003.poda
string		var.tfcmg003.sess(20)
long	var.tfcmg003.hash	|#fp11.n

long	var.tfcmg003.copt
long	var.tfcmg003.cact
long	var.tfcmg003.dnum
long	var.tfcmg003.typp
long	var.tfcmg003.odv1
long	var.tfcmg003.bodd
long	var.tfcmg003.uiba
long	var.tfcmg003.rgrp
long	var.tfcmg003.rgr2
long	var.tfcmg003.pfby			|#FP9
	
long	var.tfcmg003.proc,var.tfcmg003.auto	|#FBU.n
:STBL:tfcmg003,tfcmg007
:COMT:START
---  Changes in table design  ---
     
     A lot of functional changes are incorporated in %TV. 25 new fields are added in %TTtfcmg003. To know details of the fields and table mapping, following documents can be referred.
CS Data Conversion form Baan IVc4 to SSA Baan ERP 6.1 - Finance (D3439A US)

Also see the DD Results for new fields added.

The %SFtfcmg003.pacu is removed in %TV because in %TV , we no longer maintain suppliers and customers separately but as business partners. In the business partner table, user can link roles such as invoice-from, pay-to etc. So if for a payment method, the %SFtfcmg003.pacu is filled with some value that indicates whether the document is sent to next higher parent or highest parent, then the user can get a similar information from the field %TFtccom122.ptbp in %TV. From the value filled in there, user can know whether it is the same BP or the parent BP or the highest parent BP that is linked to the pay-to role.

For FBU
%TFtfcmg003.proc corresponds to the FBU field %SFtfcmg003.ddmt. 


---  Source and Target Sessions  ---
    
     Source : %SStfcmg0140m000
     Target : %TStfcmg0540m000 

---  Migration Logic  ---
In %TV there is no report group 17 or any equivalent report. When report group 17 is migrated from the %SV it is migrated as 15, US checks layout. Report group 17 will be added in %TV later. 


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:



:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:cmg
:TFLNO:101
:LDAT:2/4/2017 2:23:29 PM
:PRTX:START
|#ms.so					
|select bccnv114.*
|from  bcnv114
|where bccnv114.brtp IN ("PUR","SLS")
|selectdo
|	if bccnv114.brtp = "PUR" then 
|		var.str.pur.rtyp = bccnv114.rtyp 
|	else 
|		if bccnv114.brtp = "SLS" then 
|			var.str.sls.rtyp = bccnv114.rtyp 
|		endif 
|	endif
|endselect
						|#ms.eo
if not get.exchange.rate.type("PUR",var.str.err.mess)  then
		var.str.pur.rtyp = bcstc011.rtyp 

else
	if not get.exchange.rate.type("SLS",var.str.err.mess)  then
		var.str.sls.rtyp = bcstc011.rtyp 
	endif	
endif
							
migrate tfcmg101
:PRTX:END
:STAT:V
:VARI:long 	var.tfcmg101.adty
long	var.tfcmg101.blac

	string		var.str.rdat(22)	

	string		var.str.rtyp(3)	

	string		var.str.pur.rtyp(3)	

	string		var.str.sls.rtyp(3)	

	string		var.tfcmg101.bpid(9)	

domain  tcmcs.s200m	var.str.err.mess
domain tcccty new.country
domain tccvat new.tax
:STBL:tfcmg101,tfacp200,tfacr200,bcstc008,bcstc011,tfcmg295
:COMT:START
---  Changes in table design  ---
Some new fields are added. See DDC results for the data model changes. The removed fields are:
tfcmg101.suno - It is replaced by %TFtfcmg101.ptbp. This is done through intermediate bc table %STbcstc008

tfcmg101.oinv - The original invoice number
tfcmg101.otyp - original invoice transaction type

The above 2 fields were filled in %SV in case the payment advice was having a purchase or sales credit note. But in %TV, the tfcmg101.oinv and tfcmg101.ptyp are removed since it is not necessary to maintain the original invoice details in the payment advice for purchase/credit notes(redundant). The original invoice details can be anyway found in tfacr200 against the credit notes.

For FBU
%TFtfcmg101.adty is filled from the FBU table field %SFtfcmg295.adty

tfcmg101.schn will be filled in post conversion.



---  Source and Target Sessions  ---
%SStfcmg1501m000 -> %TStfcmg1501m000



---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:



:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:cmg
:TFLNO:103
:LDAT:2/4/2017 2:23:40 PM
:PRTX:START
migrate tfcmg103
:PRTX:END
:STAT:V
:VARI:long	var.tfcmg103.blac
long	var.tfcmg103.comp
long	var.tfcmg103.paid
long	var.tfcmg103.post
long	var.tfcmg103.rlet

domain	tcmcs.s200m	err.mess
domain	bcstc.bpid	var.tfcmg103.ptbp
:STBL:tfcmg103,bcstc008
:COMT:START
---  Changes in table design  ---
%SFtfcmg103.suno is removed in %TV. Now it is replaced by %TFtfcmg103.ptbp in %TV

Refer to the following document for more details:

CS Data Conversion form Baan IVc4 to SSA Baan ERP 6.1 - Finance (D3439A US)


---  Source and Target Sessions  ---
%SStfcmg1245m000  - %TStfcmg1503m000 


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:





:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:cmg
:TFLNO:104
:LDAT:1/17/2018 2:07:54 PM
:PRTX:START
if not get.exchange.rate.type("PUR", err.mess) then
	var.str.pur.rtyp = bcstc011.rtyp 
else
	var.str.pur.rtyp = ""
endif
current.company = get.compnr()					|#Migr. 10.6.n

migrate tfcmg104
:PRTX:END
:STAT:V
:VARI:string		var.str.rdat(22)	

|	string		var.str.ratt(3)	
	string 		var.str.pur.rtyp(3)
|	string		var.str.bpid(9)	
	string		var.tfcmg104.bpid(9)	


	long		var.tfcmg104.rade
	long		var.tfcmg104.adty
	domain tcmcs.s200m err.mess
domain tcccty new.country
domain tccvat new.tax
domain	tcncmp		current.company				|#Migr. 10.6.sn
domain	tfacp.fisu	var.tfcmg104.fisu			|#Migr. 10.6.en
:STBL:tfcmg104,tfcmg105,bcstc008,bcstc011,tfcmg297
:COMT:START
---  Changes in table design  ---
%SFtfcmg104.suno is no more in %TTtfcmg104. Now it is replaced with %TFtfcmg104.ifbp

For FBU
%TFtfcmg104.adty is filled from the FBU table field %SFtfcmg297.adty


---  Source and Target Sessions  ---
%SStfcmg1110m000 - %TStfcmg1510m000


---  Migration Logic  ---


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:cmg
:TFLNO:111
:LDAT:12/10/2017 12:52:56 PM
:PRTX:START
utc.default = utc(0,0)
if not get.exchange.rate.type("SLS", err.mess) then 	   |  # ravi.sn  
	var.str.sls.rtyp = bcstc011.rtyp
else
	var.str.sls.rtyp = ""
endif
if not get.exchange.rate.type("PUR", err.mess) then
	var.str.pur.rtyp = bcstc011.rtyp				 
else
	var.str.pur.rtyp = ""
endif						  |  # ravi.en
migrate tfcmg111
:PRTX:END
:STAT:V
:VARI:long var.tfcmg111.blac
long var.tfcmg111.adty
string		var.str.rdin(22)	|*

	string		var.str.rrdt(22)	|*

	string		var.str.rtin(3)	|*

	string		var.str.rrty(3)	|*

	string		var.str.pur.rtyp(3)	|*

	string		var.str.sls.rtyp(3)	|*

|	string		var.str.eu.rtyp(3)	|*

	string		utc.default(22)	|*

	string		var.tfcmg111.bpid(9)	|*
domain	tcmcs.s200m	err.mess
long var.tfcmg111.ratf
domain tcccty new.country
domain tccvat new.tax
:STBL:tfcmg111,tfacr200,tfacp200,tfcmg110,bcstc008,bcstc011,tfcmg296
:COMT:START
---  Changes in table design  ---
%SFtfcmg111.cuno, %SFtfcmg111.pcun and %SFtfcmg111.suno no more exists in %TTtfcmg111. Now %SFtfcmg111.cuno  and                  %SFtfcmg111.suno  are replaced by %TFtfcmg111.bpid.
%SFtfcmg111.pcun is replaced by %TFtfcmg111.prbp

Refer to the following document for more details:

CS Data Conversion form Baan IVc4 to SSA Baan ERP 6.1 - Finance (D3439A US)

For FBU
%TFtfcmg111.adty is filled from the FBU table field %SFtfcmg296.adty

tfcmg111.schn will be filled in post conversion.


---  Source and Target Sessions  ---
%SStfcmg2116s000, %SStfcmg2117s000 - %TStfcmg2116s000, %TStfcmg2117s000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:cmg
:TFLNO:130
:LDAT:2/4/2017 2:24:21 PM
:PRTX:START
var.date = utc(0,0,2)
var.tfcmg130.sequ = 0
select	tccom000.ccur
from	tccom000
as set with 1 rows
selectdo
endselect
migrate tfcmg001
:PRTX:END
:STAT:V
:VARI:long var.tfcmg130.sequ
long	var.coal	

string	bank.array(1,1)		based			|FBU

string	var.date(10)
|long var.oadt,order.count,counter1		|#148935.o
long var.tfcmg130.oadt,order.count,counter1	|#148935.n


domain	tcbool	bank.dumped			|FBU
:STBL:tfcmg101,tfcmg117,tccom000,tfcmg001
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---
Target Session
%TStfcmg1530m000 
Source Session
%SStfcmg1120m000
%SStfcmg0110m000
%SStfcmg1117m000

---  Migration Logic  ---
For FBU
For the electronic data interchange between a company and its bank the rules of the 'Deutsche Bundesbank' - central bank in Germany have to be considered. There is a paper specifying the format of the bank file taking several trade laws into consideration. Table tfcmg117 is used to enter some required information to the bank file.
Business case: If you have a purchasing company buying oranges in Spain they will pay their invoices on a regular base on sending a disk to their bank. As the bank file will look similar every time it is good to have also defaults for the additional information. As a consequence tfcmg117 has to be migrated to tfcmg130.

tfcmg117 is maintained during the payment run if tfcmg003.sess is tfgld1262s000. For each combination of tfcmg103.bank, tfcmg103.paym the table tfcmg117 is maintained for each customer paid by the payment batch, using the tfcmg103.bank, tfcmg103.paym. As typically the tfcmg101 values are prepared respectively they can be used to create the defaults in tfcmg130.

---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:







:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:cmg
:TFLNO:204
:LDAT:2/4/2017 2:24:34 PM
:PRTX:START
if not get.exchange.rate.type("SLS", err.mess) then  	   |  # ravi.sn  
	var.str.sls.rtyp = bcstc011.rtyp
else
	var.str.sls.rtyp = ""
endif
if not get.exchange.rate.type("PUR", err.mess) then
	var.str.pur.rtyp = bcstc011.rtyp				 
else
	var.str.pur.rtyp = ""
endif
if not get.exchange.rate.type("EU", err.mess) then
	var.str.eu.rtyp =  bcstc011.rtyp			
else
	var.str.eu.rtyp = ""
endif					|#ravi.en
|select	bccnv114.* 
|	from	bccnv114 
|	selectdo 
|		on case bccnv114.brtp 
|		case "PUR": 
|			var.str.pur.rtyp = bccnv114.rtyp 
|		break 
|		case "SLS": 
|			var.str.sls.rtyp = bccnv114.rtyp 
|		break 
|		case "EU ": 
|			var.str.eu.rtyp = bccnv114.rtyp 
|		break 
|		endcase 
|	endselect 

migrate tfcmg204
:PRTX:END
:STAT:V
:VARI:string		var.tfcmg204.bpid(9)	|*

	string		var.tfcmg204.pbpt(9)	|*

	string		var.str.rdat(22)	|*

	string		var.str.rtyp(3)	|*

	string		var.str.pur.rtyp(3)	|*

	string		var.str.sls.rtyp(3)	|*

	string		var.str.eu.rtyp(3)	|*
domain	tcmcs.s200m	err.mess
long 	var.tfcmg204.adty
domain tcccty new.country
domain tccvat new.tax
:STBL:tfcmg204,tfacr200,tfacp200,bcstc011,bcstc008,tfcmg294
:COMT:START
---  Changes in table design  ---
%SFtfcmg204.suno and %SFtfcmg204.cuno are removed in %TV. They are replaced by %TFtfcmg204.bpid field.
Refer to the following document for more details:

CS Data Conversion form Baan IVc4 to SSA Baan ERP 6.1 - Finance (D3439A US)
For FBU
%TFtfcmg204.adty is filled from the FBU table field %SFtfcmg294.adty
tfcmg204.schn will be filled in post conversion.


---  Source and Target Sessions  ---

%SStfcmg2100s000 - %TStfcmg2100s000

---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:



:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:cmg
:TFLNO:301
:LDAT:2/13/2017 4:03:41 PM
:PRTX:START
var.comp = get.compnr()
migrate tfcmg301
:PRTX:END
:STAT:V
:VARI:long		var.tfcmg301.forc
long		var.tfcmg301.ftyp
string		var.tfcmg301.bpid(9)	

	string		var.tfcmg301.orig(30)	

domain	tcmcs.s200m	err.mess	|#ravi.sn
domain	tcncmp		var.comp	|#ravi.en
:STBL:tfcmg301,bcstc008
:COMT:START
---  Changes in table design  ---
The following fields are removed from the %STtfcmg301.
%SFtfcmg301.cuno, %SFtfcmg301.suno --> now these fields are replaced with 
%TFtfcmg301.bpid

%SFtfcmg301.budg, %SFtfcmg301.cprj, %SFtfcmg301.leac, %SFtfcmg301.ninv,
%SFtfcmg301.orno, %SFtfcmg301.pono ---> Now these fields will be filled in %TTtfcmg301 with %TFtfcmg301.orig field. %TFtfcmg301.orig is filled as explained in the document %GTtfcmg0002 

%TFtfcmg301.ninv should be filled with %SFtppin020.nins according to the new functionality in %TV in case of Fore cast component of type Project Order. But in %SV the above field is not filled as in %SV because of the %SV functionality. When user runs the %TStfcmg3210m000 after migration, %TFtfcmg301.ninv field will be filled accordingly for Project Orders. Otherwise %TFtfcmg301.ninv will have the data according to %STtfcmg301.

%TFtfcmg301.schn will be filled by post conversion program.

Refer to the following document for more details:

CS Data Conversion form Baan IVc4 to SSA Baan ERP 6.1 - Finance (D3439A US)




---  Source and Target Sessions  ---
%SStfcmg3210m000 - %TStfcmg3210m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:



:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:fam
:TFLNO:000
:LDAT:2/16/2018 11:56:56 AM
:PRTX:START
num.to.date(date.num(), var.lng.tffam000.year, var.lng.monthno, var.lng.dayno) 
	 
var.lng.tffam000.prod = 0 

|  *** FOR FIELD rtya,rtyd,rtyj,rtyt,rtyr 
select bcstc011.rtyp 
from bcstc011 
as set with 1 rows 
selectdo 
	 var.tffam000.rtyp = left.align (bcstc011.rtyp,3) 
endselect 

|select tfgld005.ptyp, tfgld005.year, tfgld005.stdt, tfgld005.prno                 |#213701.so
|from   tfgld005 
|where  tfgld005._index1 = { 1, :var.lng.tffam000.year} and tfgld005.stdt <= date.num() 
|order by tfgld005._index1 desc 
|as set with 1 rows 
|selectdo 
|	var.lng.tffam000.prod = tfgld005.prno  
|endselect	 							|#213701.eo

select bcstf000.* 
from   bcstf000 
as set with 1 rows 
selectdo 
endselect 

migrate  tffas001
:PRTX:END
:STAT:V
:VARI:string		var.str.tffam000.dsca(50)	
string		var.tffam000.dctg(10)	 	
string		var.tffam000.rtyp(3)	 	
long		var.lng.tffam000.year	 	
long		var.lng.tffam000.prod	 	
long		var.lng.monthno	 	
long		var.lng.dayno
String		var.tffam000.indt(22)
:STBL:bcstc011,bcstf000,tffas001,tffas004,tfgld005,tffas203
:COMT:START
---  Changes in table design  ---
This is a new table in %TV which gets data from %STtffas001 in %SV.

Refer to the following document for more details:
CS Data Conversion form Baan IVc4 to SSA Baan ERP 6.1 - Finance (D3439A US)
Refer to the topic document %GTtcmcs0000

---  Source and Target Sessions  ---

Source Session : %SStffas0100m000
Target Session : %TStffam0500m000

---  Migration Logic  ---
%GTtcmcs0000

In the target, some of the fields(%TFtffam000.rtya, %TFtffam000.rtyd, %TFtffam000.rtyj, %TFtffam000.rtyt, %TFtffam000.rtyr, %TFtffam000.ttyp) should be filled from mapping tables in the conversion module. 

Refer to the following document for more details:
CS Data Conversion form Baan IVc4 to SSA Baan ERP 6.1 - Finance (D3439A US)


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:fam
:TFLNO:100
:LDAT:12/10/2017 12:58:03 PM
:PRTX:START
dummy.ret = read.parameters.finance(o.errmess)

select tffas001.fdpc 
from tffas001 
as set with 1 rows 
selectdo 
endselect
 
var.tffam100.date = utc(0,0,2)
ext.lng.comp = get.compnr()

select bcstc011.rtyp:var.str.tffam100.rtyp 
from   bcstc011 
as set with 1 rows 
selectdo 
endselect 

|*MCR .#
|select tccom000.ccur 
|from   tccom000 
|where  tccom000._index1 = {:ext.lng.comp} 
|as set with 1 rows 
|selectdo 
|	var.tffam100.curr = left.align(tccom000.ccur,3) 	
|endselect
var.tffam100.curr = get.home.currency.orig.comp() |*MCR

migrate tffas007
:PRTX:END
:STAT:V
:VARI:#include	"itfgld0012"		|* Get period and year from date
domain  tcmcs.s200m	o.errmess
string		var.str.fudt(22)	 	
	long		dummy.ret
	long		ext.lng.comp	 	
	long		var.lng.tffam100.ownc	 	
	long		var.lng.tffam100.rcmp	 	
	long		var.lng.tffam100.qty	 	
	string		var.tffam100.agrp(10)	 	
	string		var.tffam100.curr(3)	 	
	string		var.str.tffam100.rnbr(15)	 	
	string		var.str.tffam100.rtyp(3)	 	
	domain	tcyesno	var.tffam100.trfg	 	
	domain	tfgld.amnt	var.tffam100.salv	 	
	string		var.tffam100.date(22)	
	string		var.str.err.mess(50)
	string		var.tffam100.bpid(50)
	string		g.invn(20)		|#200-100959

	long		var.tffam100.stat 	|#200-98001.n
						|#200-100961.sn
	domain	tfgld.year	acc.year
	domain	tfgld.prod	acc.prod
						|#200-100961.en
	domain tcbool 	stat.filled
	string		var.tffam100.rext(15)	|#200-100985.n
:STBL:bcstc008,bcstc011,tccom000,tffas001,tffas002,tffas004,tffas005,tffas007,tffas008,tffas101,tffas020,bcstf000,tffas100,tffas103
:COMT:START
---  Changes in table design  ---
This is a new table in %TV which gets data from %STtffas007 in %SV.

Refer to the following document for more details:
CS Data Conversion form Baan IVc4 to SSA Baan ERP 6.1 - Finance (D3439A US)

---  Source and Target Sessions  ---

Source Session : %SStffas0106m000
Target Session : %TStffam1500m000

---  Migration Logic  ---
The target field %TFtffam100.rtyp should be filled from a mapping table in the conversion module. 

Refer to the following document for migration logic:
CS Data Conversion form Baan IVc4 to SSA Baan ERP 6.1 - Finance (D3439A US)


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:fam
:TFLNO:710
:LDAT:9/26/2017 9:18:50 PM
:PRTX:START
migrate tffas008
migrate tffas005
migrate tffas002
:PRTX:END
:STAT:V
:VARI:double		var.dbl.dbpt	 	double		var.dbl.tffam710.intr	 	double		var.dbl.tffam710.life	 	long		var.lng.tffam710.conv	 	long		var.lng.tffam710.dbpt	 	long		var.lng.tffam710.depl	 	long		var.lng.tffam710.type	 	long		var.lng.tffam710.rtty	 	string		var.str.tffam710.meth(20)	 	string		var.str.tffam710.desc(30)	 	domain	tfgld.amnt	var.tfgld.amnt.tffam710.fixa
:STBL:tffas008,tffas005,tffas002,tffas009,tffas101
:COMT:START
---  Changes in table design  ---
This is a new table in %TV and it is filled from the 
following source tables,
%STtffas002
%STtffas005
%STtffas008


---  Source and Target Sessions  ---
Source Session : %SStffas0101m000
Target Session : %TStffam7510m000


---  Migration Logic  ---
In %SV the depreciation related datas are maintained in three
places namely,
%SStffas0101m000
%SStffas0104m000
%SStffas0107m000
Whereas in %TV the depreciation related data is maintained in the
%TStffam7510m000. So all the records present in those three source
tables has to be migrated to the target table. As far as the record in %STtffas008 is concerned only those fixed asset data that are not present in %STtffas101 is migrated.

---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:fst
:TFLNO:100
:LDAT:2/4/2017 2:24:58 PM
:PRTX:START
var.report.currency =  get.home.currency.orig.comp()  
|if get.exchange.rate.type("EU", errmess, true) then  		|#1356402.o
if get.exchange.rate.type("EU", errmess, true) = 0 then		|#1356402.n
	 var.rate.type =  bcstc011.rtyp  
else  
 	 var.rate.type =  ""        
endif  

migrate tffst100
migrate tffst400
:PRTX:END
:STAT:V
:VARI:domain	tffst.stmt	var.statement
domain	tcccur		var.report.currency
domain	bcrtyp		var.rate.type
domain	tcyesno		var.only.used.for.external.reporting
domain	tcmcs.s200m	errmess
domain	tfgld.user	var.user.last.modified
domain	tfgld.date	var.date.last.modifed
domain	tfgld.time	var.time.last.modifed
	long		var.time.last.modifed.seconds
	long		var.time.created.seconds
domain	tffst.stds	var.description
:STBL:tffst400,tffst100,tffst110,bcstc011,bcstf000,bcstf011
:COMT:START
---  Changes in table design  ---
For the 'New FST' two tables are merged into one existing table. 
The $SV table is %STtffst100 (tffst100) and %STtffst400 (tffst400). The %TV table is %TTtffst100 (tffst100)
See also General Topic: %GTtffst0000

---  Source and Target Sessions  ---
%SStffst1100m000 - %TStffst1500m000
%SStffst4100m000 - %TStffst1500m000

---  Migration Logic  ---
Not applicable.


---  Migration Parameters  ---
Exchange Rate type retrieved from %bcstc011


---  Migration Mapping Tables  ---
%TTtffst100 are retrieved from %STbcstf011.


---  Technical Notes  ---
Not applicable.


---  Performance  ---
Not applicable.

:COMT:END
:TEXT:



:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:gld
:TFLNO:004
:LDAT:12/10/2017 1:05:47 PM
:PRTX:START
ret.long = read.parameters.finance(error.message)
ret.long = get.enterprise.unit(get.compnr(), get.compnr(), error.message)
|* Makes attributes of enterprise unit current. Needed for default accounting office.
migrate tfgld004
:PRTX:END
:STAT:V
:VARI:string	var.tfgld004.indt(22)
string	var.tfgld004.dsca(50)
string	error.message
long	ret.long
:STBL:tfgld004,bcstf000,bcstc018
:COMT:START
---  Changes in table design  ---
%GTtcmcs0000

Removed fields:
tfgld004.srno


---  Source and Target Sessions  ---
%SStfgld0103m000 - %TStfgld0503m000


---  Migration Logic  ---
In %TV the company parameters contains a ledger account for Exchange Gain/Loss. This account is mandatory. In %SV this ledger account does not exist. Before the migration starts a ledger account code (and description) must be entered in %SSbcstf0100m000.   
The default accounting department should be defined in %SSbcstc0118m000.

---  Migration Parameters  ---
%SFbcstf000.legl

---  Migration Mapping Tables  ---
%STbcstc018

---  Technical Notes  ---
Not applicable


---  Performance  ---
Not applicable

:COMT:END
:TEXT:


:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:gld
:TFLNO:008
:LDAT:6/17/2018 11:19:38 PM
:PRTX:START
select	tfgld004.clac, tfgld004.clcl 
from	tfgld004 
as set with 1 rows 
selectdo 
endselect

dummy.long = read.parameters.common(error.mess)
dummy.long = read.parameters.finance(error.mess)


|dump 4	|* Exchange Gain and Loss Account is added		|#FP10.o



								|#FP10.sn
var.validation.rule = "MIGRRULE"
var.rule.version = 1
dump 7 |* Cross validation rule
var.max.validation.line = 0
array.depth = 0

|*set.fmax(var.tfgld009.udim)
|* BaanIV assumes ZZZZZZ as max string value 
|* for dimensions independent of user locale
var.tfgld009.udim = get.string(57)  |* ZZZZZZZZZ
var.max.dimension = var.tfgld009.udim(1;6)


var.cvr.udim1 = ""	 					
var.cvr.udim2 = ""	 					
var.cvr.udim3 = ""	 					
var.cvr.udim4 = ""	 					
var.cvr.udim5 = ""

read.dimensions.used(						
	dimension1.used,
	dimension2.used,
	dimension3.used,
	dimension4.used,
	dimension5.used)					
 if dimension1.used =  tcyesno.yes then 	 	
	 var.tfgld008.dim1 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 1,
		 var.cvr.udim1)				
 else 	 	 	  
	 var.tfgld008.dim1 =  tfgld.dopt.no  
 endif 	 	 	 	  
 if dimension2.used =  tcyesno.yes then  
	 var.tfgld008.dim2 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 2,
		 var.cvr.udim2)			
 else 	 	 	  
	 var.tfgld008.dim2 =  tfgld.dopt.no  
 endif 	  
 if dimension3.used =  tcyesno.yes then  
	 var.tfgld008.dim3 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 3,
		 var.cvr.udim3)				
 else 	 	 	  
	 var.tfgld008.dim3 =  tfgld.dopt.no  
 endif  
 if dimension4.used =  tcyesno.yes then  
	 var.tfgld008.dim4 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 4,
 		 var.cvr.udim4)				
else 	 	 	  
	 var.tfgld008.dim4 =  tfgld.dopt.no  
 endif  
 if dimension5.used =  tcyesno.yes then  
	 var.tfgld008.dim5 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 5,
		 var.cvr.udim5)				
 else 	 	 	  
	 var.tfgld008.dim5 =  tfgld.dopt.no  
 endif 	 	 	 	 	 	

dump 4	|* Exchange Gain and Loss Account is added bcstf000.legl
	
|* new dimensions are always no
for  nof.elements = 6 to 12 
	dim.options( nof.elements) = tfgld.dopt.no
endfor
nof.elements = 0
dim.options(1)= var.tfgld008.dim1
dim.options(2)= var.tfgld008.dim2
dim.options(3)= var.tfgld008.dim3
dim.options(4)= var.tfgld008.dim4
dim.options(5)= var.tfgld008.dim5


convert.dimension.ranges.to.cvr.rule(
	bcstf000.legl,
	dim.options,
	array.depth,
	nof.elements,
	fdim.array,
	tdim.array)
	
dmp.vcr.rule.elements.from.arrays(
	bcstf000.legl,
	dim.options,
	var.cvr.udim1,
	var.cvr.udim2,
	var.cvr.udim3,
	var.cvr.udim4,
	var.cvr.udim5,
	array.depth,
	nof.elements,
	fdim.array,
	tdim.array)


								|#FP10.en


migrate tfgld008
migrate bcstf008
migrate tfgld009
:PRTX:END
:STAT:V
:VARI:long				var.tfgld008.alat
domain	tfgld.dbcr		var.tfgld008.dbcr
	long			var.tfgld008.ifas	
	long			var.tfgld008.iprj	
domain	tcicur			var.tfgld008.icur
domain 	tfgld.dopt		var.tfgld008.dim1
domain	tfgld.dopt		var.tfgld008.dim2
domain	tfgld.dopt		var.tfgld008.dim3
domain	tfgld.dopt		var.tfgld008.dim4
domain	tfgld.dopt		var.tfgld008.dim5
domain	tfgld.atyp		var.tfgld008.atyp
domain	tfgld.leac		var.tfgld008.cdca
domain	tfgld.leac		var.tfgld009.leac
domain	tfgld.dimn		var.tfgld009.dtyp
domain	tfgld.dimx		var.tfgld009.fdim

	long			dummy.long
domain	tcmcs.s200m		error.mess
domain	tfgld.seri		var.tfgld008.dmsq		|#148329.n
domain	tcyesno			dimension1.used			|#210751.sn
domain	tcyesno			dimension2.used
domain	tcyesno			dimension3.used
domain	tcyesno			dimension4.used
domain	tcyesno			dimension5.used			|#210751.en
domain	tccuni			var.tfgld008.uni1
domain	tfgld.bloc		var.tfgld008.bloc
|* domain of dimension is changed from length 6 to 9, 
|* similar domain from BaanIV is used (tccvat).
domain	tccvat			var.max.dimension
domain	tccvat			var.tfgld009.udim

								|#FP10.sn
	#define DIM.LENGTH		9
	#define MAX.DIMENSIONS	12	
	#define	TRANSACTION.SIZE	50
	#define	ALLOC.BLOCK		10

domain	tccvat			var.validation.rule
domain	tfgld.lino		var.rule.version
domain	tfgld.lino		var.max.validation.line
domain	tfgld.leac		var.tfgld052.leac

	long			array.depth
	long			nof.elements
domain	tcmcs.s132		fdim.array(1)	based
domain	tcmcs.s132		tdim.array(1)	based
domain	tfgld.dopt		dim.options(MAX.DIMENSIONS)

domain	tccvat			var.cvr.udim1
domain	tccvat			var.cvr.udim2
domain	tccvat			var.cvr.udim3
domain	tccvat			var.cvr.udim4
domain	tccvat			var.cvr.udim5
domain	tccvat			var.from.dim(12)
domain	tccvat			var.to.dim(12)

								|#FP10.en
:STBL:tfgld004,tfgld008,bcstf000,bcstf007,bcstf008,tfacp005,tfacr005,tfgld009,tfgld198,bcstc000
:COMT:START
---  Changes in table design  ---
%GTtfgld0000


---  Source and Target Sessions  ---
%SStfgld0108s000 - %TStfgld0508m000
%SStfgld0109m000 - %TStfgld0109m000

---  Migration Logic  ---
%GTtfgld0000


---  Migration Parameters  ---
%TFbcstf000.legl, %TFbcstf000.legd


---  Migration Mapping Tables  ---
%TTbcstf007


---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:gld
:TFLNO:009
:LDAT:6/17/2018 11:19:38 PM
:PRTX:START
select	tfgld004.clac, tfgld004.clcl 
from	tfgld004 
as set with 1 rows 
selectdo 
endselect

dummy.long = read.parameters.common(error.mess)
dummy.long = read.parameters.finance(error.mess)


|dump 4	|* Exchange Gain and Loss Account is added		|#FP10.o



								|#FP10.sn
var.validation.rule = "MIGRRULE"
var.rule.version = 1
dump 7 |* Cross validation rule
var.max.validation.line = 0
array.depth = 0

|*set.fmax(var.tfgld009.udim)
|* BaanIV assumes ZZZZZZ as max string value 
|* for dimensions independent of user locale
var.tfgld009.udim = get.string(57)  |* ZZZZZZZZZ
var.max.dimension = var.tfgld009.udim(1;6)


var.cvr.udim1 = ""	 					
var.cvr.udim2 = ""	 					
var.cvr.udim3 = ""	 					
var.cvr.udim4 = ""	 					
var.cvr.udim5 = ""

read.dimensions.used(						
	dimension1.used,
	dimension2.used,
	dimension3.used,
	dimension4.used,
	dimension5.used)					
 if dimension1.used =  tcyesno.yes then 	 	
	 var.tfgld008.dim1 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 1,
		 var.cvr.udim1)				
 else 	 	 	  
	 var.tfgld008.dim1 =  tfgld.dopt.no  
 endif 	 	 	 	  
 if dimension2.used =  tcyesno.yes then  
	 var.tfgld008.dim2 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 2,
		 var.cvr.udim2)			
 else 	 	 	  
	 var.tfgld008.dim2 =  tfgld.dopt.no  
 endif 	  
 if dimension3.used =  tcyesno.yes then  
	 var.tfgld008.dim3 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 3,
		 var.cvr.udim3)				
 else 	 	 	  
	 var.tfgld008.dim3 =  tfgld.dopt.no  
 endif  
 if dimension4.used =  tcyesno.yes then  
	 var.tfgld008.dim4 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 4,
 		 var.cvr.udim4)				
else 	 	 	  
	 var.tfgld008.dim4 =  tfgld.dopt.no  
 endif  
 if dimension5.used =  tcyesno.yes then  
	 var.tfgld008.dim5 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 5,
		 var.cvr.udim5)				
 else 	 	 	  
	 var.tfgld008.dim5 =  tfgld.dopt.no  
 endif 	 	 	 	 	 	

dump 4	|* Exchange Gain and Loss Account is added bcstf000.legl
	
|* new dimensions are always no
for  nof.elements = 6 to 12 
	dim.options( nof.elements) = tfgld.dopt.no
endfor
nof.elements = 0
dim.options(1)= var.tfgld008.dim1
dim.options(2)= var.tfgld008.dim2
dim.options(3)= var.tfgld008.dim3
dim.options(4)= var.tfgld008.dim4
dim.options(5)= var.tfgld008.dim5


convert.dimension.ranges.to.cvr.rule(
	bcstf000.legl,
	dim.options,
	array.depth,
	nof.elements,
	fdim.array,
	tdim.array)
	
dmp.vcr.rule.elements.from.arrays(
	bcstf000.legl,
	dim.options,
	var.cvr.udim1,
	var.cvr.udim2,
	var.cvr.udim3,
	var.cvr.udim4,
	var.cvr.udim5,
	array.depth,
	nof.elements,
	fdim.array,
	tdim.array)


								|#FP10.en


migrate tfgld008
migrate bcstf008
migrate tfgld009
:PRTX:END
:STAT:V
:VARI:long				var.tfgld008.alat
domain	tfgld.dbcr		var.tfgld008.dbcr
	long			var.tfgld008.ifas	
	long			var.tfgld008.iprj	
domain	tcicur			var.tfgld008.icur
domain 	tfgld.dopt		var.tfgld008.dim1
domain	tfgld.dopt		var.tfgld008.dim2
domain	tfgld.dopt		var.tfgld008.dim3
domain	tfgld.dopt		var.tfgld008.dim4
domain	tfgld.dopt		var.tfgld008.dim5
domain	tfgld.atyp		var.tfgld008.atyp
domain	tfgld.leac		var.tfgld008.cdca
domain	tfgld.leac		var.tfgld009.leac
domain	tfgld.dimn		var.tfgld009.dtyp
domain	tfgld.dimx		var.tfgld009.fdim

	long			dummy.long
domain	tcmcs.s200m		error.mess
domain	tfgld.seri		var.tfgld008.dmsq		|#148329.n
domain	tcyesno			dimension1.used			|#210751.sn
domain	tcyesno			dimension2.used
domain	tcyesno			dimension3.used
domain	tcyesno			dimension4.used
domain	tcyesno			dimension5.used			|#210751.en
domain	tccuni			var.tfgld008.uni1
domain	tfgld.bloc		var.tfgld008.bloc
|* domain of dimension is changed from length 6 to 9, 
|* similar domain from BaanIV is used (tccvat).
domain	tccvat			var.max.dimension
domain	tccvat			var.tfgld009.udim

								|#FP10.sn
	#define DIM.LENGTH		9
	#define MAX.DIMENSIONS	12	
	#define	TRANSACTION.SIZE	50
	#define	ALLOC.BLOCK		10

domain	tccvat			var.validation.rule
domain	tfgld.lino		var.rule.version
domain	tfgld.lino		var.max.validation.line
domain	tfgld.leac		var.tfgld052.leac

	long			array.depth
	long			nof.elements
domain	tcmcs.s132		fdim.array(1)	based
domain	tcmcs.s132		tdim.array(1)	based
domain	tfgld.dopt		dim.options(MAX.DIMENSIONS)

domain	tccvat			var.cvr.udim1
domain	tccvat			var.cvr.udim2
domain	tccvat			var.cvr.udim3
domain	tccvat			var.cvr.udim4
domain	tccvat			var.cvr.udim5
domain	tccvat			var.from.dim(12)
domain	tccvat			var.to.dim(12)

								|#FP10.en
:STBL:tfgld004,tfgld008,bcstf000,bcstf007,bcstf008,tfacp005,tfacr005,tfgld009,tfgld198,bcstc000
:COMT:START
---  Changes in table design  ---
%GTtfgld0000


---  Source and Target Sessions  ---
%SStfgld0108s000 - %TStfgld0508m000
%SStfgld0109m000 - %TStfgld0109m000

---  Migration Logic  ---
%GTtfgld0000


---  Migration Parameters  ---
%TFbcstf000.legl, %TFbcstf000.legd


---  Migration Mapping Tables  ---
%TTbcstf007


---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:gld
:TFLNO:018
:LDAT:2/14/2017 7:49:37 AM
:PRTX:START
ret.long = get.exchange.rate.type("PUR", error.message)
var.str.pur.rtyp = bcstc011.rtyp
|* Get Purchase rate type

ret.long = get.exchange.rate.type("SLS", error.message)
var.str.sls.rtyp = bcstc011.rtyp
|* Get Sales rate type

ret.long = get.exchange.rate.type("EU", error.message)
var.str.eu.rtyp = bcstc011.rtyp
|* Get Internal rate type

current.company = get.compnr()
migrate tfgld018
:PRTX:END
:STAT:V
:VARI:domain	tcmcs.str3		var.tfgld018.rtyp
domain	tfgld.rate		var.tfgld018.rate(3)
domain	tcratf			var.tfgld018.ratf(3)
domain	tcccty			var.tfgld018.ccty		|#SP2.n
domain	tcmcs.str3		var.str.sls.rtyp
domain	tcmcs.str3		var.str.pur.rtyp
domain	tcmcs.str3		var.str.eu.rtyp

domain	tcmcs.s200m		error.message
domain	tcncmp			current.company
long				ret.long
long				element
:STBL:tfgld018,tfgld011,tfgld106,bcstc011,tfgld102
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---
%SStfgld1504m000 - %TStfgld1504m000


---  Migration Logic  ---



---  Migration Parameters  ---
Field %TFtfgld018.rtyp is filled with the exchange rate type "PUR", "SLS" or "EU", entered in %SSbcstc0111m000.


---  Migration Mapping Tables  ---
%STbcstc011


---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:



:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:gld
:TFLNO:051
:LDAT:6/17/2018 11:19:38 PM
:PRTX:START
select	tfgld004.clac, tfgld004.clcl 
from	tfgld004 
as set with 1 rows 
selectdo 
endselect

dummy.long = read.parameters.common(error.mess)
dummy.long = read.parameters.finance(error.mess)


|dump 4	|* Exchange Gain and Loss Account is added		|#FP10.o



								|#FP10.sn
var.validation.rule = "MIGRRULE"
var.rule.version = 1
dump 7 |* Cross validation rule
var.max.validation.line = 0
array.depth = 0

|*set.fmax(var.tfgld009.udim)
|* BaanIV assumes ZZZZZZ as max string value 
|* for dimensions independent of user locale
var.tfgld009.udim = get.string(57)  |* ZZZZZZZZZ
var.max.dimension = var.tfgld009.udim(1;6)


var.cvr.udim1 = ""	 					
var.cvr.udim2 = ""	 					
var.cvr.udim3 = ""	 					
var.cvr.udim4 = ""	 					
var.cvr.udim5 = ""

read.dimensions.used(						
	dimension1.used,
	dimension2.used,
	dimension3.used,
	dimension4.used,
	dimension5.used)					
 if dimension1.used =  tcyesno.yes then 	 	
	 var.tfgld008.dim1 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 1,
		 var.cvr.udim1)				
 else 	 	 	  
	 var.tfgld008.dim1 =  tfgld.dopt.no  
 endif 	 	 	 	  
 if dimension2.used =  tcyesno.yes then  
	 var.tfgld008.dim2 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 2,
		 var.cvr.udim2)			
 else 	 	 	  
	 var.tfgld008.dim2 =  tfgld.dopt.no  
 endif 	  
 if dimension3.used =  tcyesno.yes then  
	 var.tfgld008.dim3 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 3,
		 var.cvr.udim3)				
 else 	 	 	  
	 var.tfgld008.dim3 =  tfgld.dopt.no  
 endif  
 if dimension4.used =  tcyesno.yes then  
	 var.tfgld008.dim4 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 4,
 		 var.cvr.udim4)				
else 	 	 	  
	 var.tfgld008.dim4 =  tfgld.dopt.no  
 endif  
 if dimension5.used =  tcyesno.yes then  
	 var.tfgld008.dim5 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 5,
		 var.cvr.udim5)				
 else 	 	 	  
	 var.tfgld008.dim5 =  tfgld.dopt.no  
 endif 	 	 	 	 	 	

dump 4	|* Exchange Gain and Loss Account is added bcstf000.legl
	
|* new dimensions are always no
for  nof.elements = 6 to 12 
	dim.options( nof.elements) = tfgld.dopt.no
endfor
nof.elements = 0
dim.options(1)= var.tfgld008.dim1
dim.options(2)= var.tfgld008.dim2
dim.options(3)= var.tfgld008.dim3
dim.options(4)= var.tfgld008.dim4
dim.options(5)= var.tfgld008.dim5


convert.dimension.ranges.to.cvr.rule(
	bcstf000.legl,
	dim.options,
	array.depth,
	nof.elements,
	fdim.array,
	tdim.array)
	
dmp.vcr.rule.elements.from.arrays(
	bcstf000.legl,
	dim.options,
	var.cvr.udim1,
	var.cvr.udim2,
	var.cvr.udim3,
	var.cvr.udim4,
	var.cvr.udim5,
	array.depth,
	nof.elements,
	fdim.array,
	tdim.array)


								|#FP10.en


migrate tfgld008
migrate bcstf008
migrate tfgld009
:PRTX:END
:STAT:V
:VARI:long				var.tfgld008.alat
domain	tfgld.dbcr		var.tfgld008.dbcr
	long			var.tfgld008.ifas	
	long			var.tfgld008.iprj	
domain	tcicur			var.tfgld008.icur
domain 	tfgld.dopt		var.tfgld008.dim1
domain	tfgld.dopt		var.tfgld008.dim2
domain	tfgld.dopt		var.tfgld008.dim3
domain	tfgld.dopt		var.tfgld008.dim4
domain	tfgld.dopt		var.tfgld008.dim5
domain	tfgld.atyp		var.tfgld008.atyp
domain	tfgld.leac		var.tfgld008.cdca
domain	tfgld.leac		var.tfgld009.leac
domain	tfgld.dimn		var.tfgld009.dtyp
domain	tfgld.dimx		var.tfgld009.fdim

	long			dummy.long
domain	tcmcs.s200m		error.mess
domain	tfgld.seri		var.tfgld008.dmsq		|#148329.n
domain	tcyesno			dimension1.used			|#210751.sn
domain	tcyesno			dimension2.used
domain	tcyesno			dimension3.used
domain	tcyesno			dimension4.used
domain	tcyesno			dimension5.used			|#210751.en
domain	tccuni			var.tfgld008.uni1
domain	tfgld.bloc		var.tfgld008.bloc
|* domain of dimension is changed from length 6 to 9, 
|* similar domain from BaanIV is used (tccvat).
domain	tccvat			var.max.dimension
domain	tccvat			var.tfgld009.udim

								|#FP10.sn
	#define DIM.LENGTH		9
	#define MAX.DIMENSIONS	12	
	#define	TRANSACTION.SIZE	50
	#define	ALLOC.BLOCK		10

domain	tccvat			var.validation.rule
domain	tfgld.lino		var.rule.version
domain	tfgld.lino		var.max.validation.line
domain	tfgld.leac		var.tfgld052.leac

	long			array.depth
	long			nof.elements
domain	tcmcs.s132		fdim.array(1)	based
domain	tcmcs.s132		tdim.array(1)	based
domain	tfgld.dopt		dim.options(MAX.DIMENSIONS)

domain	tccvat			var.cvr.udim1
domain	tccvat			var.cvr.udim2
domain	tccvat			var.cvr.udim3
domain	tccvat			var.cvr.udim4
domain	tccvat			var.cvr.udim5
domain	tccvat			var.from.dim(12)
domain	tccvat			var.to.dim(12)

								|#FP10.en
:STBL:tfgld004,tfgld008,bcstf000,bcstf007,bcstf008,tfacp005,tfacr005,tfgld009,tfgld198,bcstc000
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:gld
:TFLNO:052
:LDAT:6/17/2018 11:19:39 PM
:PRTX:START
select	tfgld004.clac, tfgld004.clcl 
from	tfgld004 
as set with 1 rows 
selectdo 
endselect

dummy.long = read.parameters.common(error.mess)
dummy.long = read.parameters.finance(error.mess)


|dump 4	|* Exchange Gain and Loss Account is added		|#FP10.o



								|#FP10.sn
var.validation.rule = "MIGRRULE"
var.rule.version = 1
dump 7 |* Cross validation rule
var.max.validation.line = 0
array.depth = 0

|*set.fmax(var.tfgld009.udim)
|* BaanIV assumes ZZZZZZ as max string value 
|* for dimensions independent of user locale
var.tfgld009.udim = get.string(57)  |* ZZZZZZZZZ
var.max.dimension = var.tfgld009.udim(1;6)


var.cvr.udim1 = ""	 					
var.cvr.udim2 = ""	 					
var.cvr.udim3 = ""	 					
var.cvr.udim4 = ""	 					
var.cvr.udim5 = ""

read.dimensions.used(						
	dimension1.used,
	dimension2.used,
	dimension3.used,
	dimension4.used,
	dimension5.used)					
 if dimension1.used =  tcyesno.yes then 	 	
	 var.tfgld008.dim1 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 1,
		 var.cvr.udim1)				
 else 	 	 	  
	 var.tfgld008.dim1 =  tfgld.dopt.no  
 endif 	 	 	 	  
 if dimension2.used =  tcyesno.yes then  
	 var.tfgld008.dim2 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 2,
		 var.cvr.udim2)			
 else 	 	 	  
	 var.tfgld008.dim2 =  tfgld.dopt.no  
 endif 	  
 if dimension3.used =  tcyesno.yes then  
	 var.tfgld008.dim3 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 3,
		 var.cvr.udim3)				
 else 	 	 	  
	 var.tfgld008.dim3 =  tfgld.dopt.no  
 endif  
 if dimension4.used =  tcyesno.yes then  
	 var.tfgld008.dim4 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 4,
 		 var.cvr.udim4)				
else 	 	 	  
	 var.tfgld008.dim4 =  tfgld.dopt.no  
 endif  
 if dimension5.used =  tcyesno.yes then  
	 var.tfgld008.dim5 =  tfgld.dopt.optional  
	 add.dimension.range.by.ledger.account(  
		 bcstf000.legl,  
		 5,
		 var.cvr.udim5)				
 else 	 	 	  
	 var.tfgld008.dim5 =  tfgld.dopt.no  
 endif 	 	 	 	 	 	

dump 4	|* Exchange Gain and Loss Account is added bcstf000.legl
	
|* new dimensions are always no
for  nof.elements = 6 to 12 
	dim.options( nof.elements) = tfgld.dopt.no
endfor
nof.elements = 0
dim.options(1)= var.tfgld008.dim1
dim.options(2)= var.tfgld008.dim2
dim.options(3)= var.tfgld008.dim3
dim.options(4)= var.tfgld008.dim4
dim.options(5)= var.tfgld008.dim5


convert.dimension.ranges.to.cvr.rule(
	bcstf000.legl,
	dim.options,
	array.depth,
	nof.elements,
	fdim.array,
	tdim.array)
	
dmp.vcr.rule.elements.from.arrays(
	bcstf000.legl,
	dim.options,
	var.cvr.udim1,
	var.cvr.udim2,
	var.cvr.udim3,
	var.cvr.udim4,
	var.cvr.udim5,
	array.depth,
	nof.elements,
	fdim.array,
	tdim.array)


								|#FP10.en


migrate tfgld008
migrate bcstf008
migrate tfgld009
:PRTX:END
:STAT:V
:VARI:long				var.tfgld008.alat
domain	tfgld.dbcr		var.tfgld008.dbcr
	long			var.tfgld008.ifas	
	long			var.tfgld008.iprj	
domain	tcicur			var.tfgld008.icur
domain 	tfgld.dopt		var.tfgld008.dim1
domain	tfgld.dopt		var.tfgld008.dim2
domain	tfgld.dopt		var.tfgld008.dim3
domain	tfgld.dopt		var.tfgld008.dim4
domain	tfgld.dopt		var.tfgld008.dim5
domain	tfgld.atyp		var.tfgld008.atyp
domain	tfgld.leac		var.tfgld008.cdca
domain	tfgld.leac		var.tfgld009.leac
domain	tfgld.dimn		var.tfgld009.dtyp
domain	tfgld.dimx		var.tfgld009.fdim

	long			dummy.long
domain	tcmcs.s200m		error.mess
domain	tfgld.seri		var.tfgld008.dmsq		|#148329.n
domain	tcyesno			dimension1.used			|#210751.sn
domain	tcyesno			dimension2.used
domain	tcyesno			dimension3.used
domain	tcyesno			dimension4.used
domain	tcyesno			dimension5.used			|#210751.en
domain	tccuni			var.tfgld008.uni1
domain	tfgld.bloc		var.tfgld008.bloc
|* domain of dimension is changed from length 6 to 9, 
|* similar domain from BaanIV is used (tccvat).
domain	tccvat			var.max.dimension
domain	tccvat			var.tfgld009.udim

								|#FP10.sn
	#define DIM.LENGTH		9
	#define MAX.DIMENSIONS	12	
	#define	TRANSACTION.SIZE	50
	#define	ALLOC.BLOCK		10

domain	tccvat			var.validation.rule
domain	tfgld.lino		var.rule.version
domain	tfgld.lino		var.max.validation.line
domain	tfgld.leac		var.tfgld052.leac

	long			array.depth
	long			nof.elements
domain	tcmcs.s132		fdim.array(1)	based
domain	tcmcs.s132		tdim.array(1)	based
domain	tfgld.dopt		dim.options(MAX.DIMENSIONS)

domain	tccvat			var.cvr.udim1
domain	tccvat			var.cvr.udim2
domain	tccvat			var.cvr.udim3
domain	tccvat			var.cvr.udim4
domain	tccvat			var.cvr.udim5
domain	tccvat			var.from.dim(12)
domain	tccvat			var.to.dim(12)

								|#FP10.en
:STBL:tfgld004,tfgld008,bcstf000,bcstf007,bcstf008,tfacp005,tfacr005,tfgld009,tfgld198,bcstc000
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:gld
:TFLNO:102
:LDAT:12/10/2017 1:10:44 PM
:PRTX:START
|* Get Sales rate type 
ret.long = get.exchange.rate.type("SLS", error.message)
var.str.sls.rtyp = bcstc011.rtyp

|* Get Purchase rate type
ret.long = get.exchange.rate.type("PUR", error.message)
var.str.pur.rtyp = bcstc011.rtyp

|* Get Internal rate type
ret.long = get.exchange.rate.type("EU", error.message)
var.str.eu.rtyp = bcstc011.rtyp


migrate tfgld102
:PRTX:END
:STAT:V
:VARI:domain	tcrats		var.tfgld102.rate(3)
domain	tcrats		var.tfgld102.irat(3)
domain	tcratf		var.tfgld102.fact(3)
domain	tcratf		var.tfgld102.ifac(3)
domain	tfgld.amnt	var.tfgld102.amth(3)
domain	tfgld.amnt	var.tfgld102.vamh(3)
string			var.str.sls.rtyp(3)
string			var.str.pur.rtyp(3)
string			var.str.eu.rtyp(3)
string			var.str.rtyp(3)
string			var.str.bpid(9)
domain	tcmcs.s200m	error.message
long			var.tfgld102.tcsh
long			ret.long
domain	tcccty		var.tfgld102.ccty
|domain	tccvat		var.tfgld102.cvat			|#SP2.o
long			element
long			var.tfgld102.adty	|#FBU.n
long			var.tfgld102.vtyp
long			var.tfgld102.catg
:STBL:tfgld102,bcstc008,bcstc011,tfcmg294,tfcmg295,tfcmg101
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:gld
:TFLNO:106
:LDAT:12/10/2017 1:12:19 PM
:PRTX:START
|* Get Sales rate type 
ret.long = get.exchange.rate.type("SLS", error.message)
var.str.sls.rtyp = bcstc011.rtyp

|* Get Purchase rate type
ret.long = get.exchange.rate.type("PUR", error.message)
var.str.pur.rtyp = bcstc011.rtyp

|* Get Internal rate type
ret.long = get.exchange.rate.type("EU", error.message)
var.str.eu.rtyp = bcstc011.rtyp

migrate tfgld106
:PRTX:END
:STAT:V
:VARI:string			var.str.bpid(9)
string			var.str.sls.rtyp(3)
string			var.str.pur.rtyp(3)
string			var.str.eu.rtyp(3)
string			var.str.rtyp(3)
long			var.tfgld106.tcsh
long			ret.long
long			element
domain	tcmcs.s200m	error.message
domain	tcccty		var.tfgld106.ccty
|domain	tccvat		var.tfgld106.cvat			|#SP2.o
domain	tfgld.rate	var.tfgld106.rate(3)
domain	tcratf		var.tfgld106.fact(3)
domain	tfgld.amnt	var.tfgld106.amth(3)
domain	tfgld.amnt	var.tfgld106.vamh(3)
long			var.tfgld106.adty
long			var.tfgld106.vtyp
long			var.tfgld106.catg
:STBL:tfgld106,bcstc011,bcstc008,tfcmg294,tfcmg295,tfcmg101
:COMT:START

:COMT:END
:TEXT:


:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:gld
:TFLNO:110
:LDAT:9/26/2017 9:18:52 PM
:PRTX:START
migrate tfgld110
:PRTX:END
:STAT:V
:VARI:domain	tcmcs.str9	var.tfgld110.bpid
domain	tcmcs.str9	var.tfgld110.orno
domain	tcmcs.s200m	error.message
domain	tcccty		var.tfgld110.ccty
domain	tccvat		var.tfgld110.cvat
domain	tfgld.amnt	var.tfgld110.amth(3)
domain	tfgld.amnt	var.tfgld110.vamh(3)
long			ret.long
long			element
long			var.tfgld110.vtyp
long			var.tfgld110.catg
:STBL:tfgld110
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---
%SStfgld1520m000 - %TStfgld1520m000


---  Migration Logic  ---
In %SV a customer field and a supplier field is present. In %TV these field are combine in one field %TFtfgld110.bpid.


---  Migration Parameters  ---
%SFbcstc000.mmnu


---  Migration Mapping Tables  ---
%STbcstc008
%STbcstc030


---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:gld
:TFLNO:116
:LDAT:2/4/2017 2:27:35 PM
:PRTX:START
company = get.compnr()
migrate tfgld199
:PRTX:END
:STAT:V
:VARI:domain	tcccty		var.tfgld116.ccty
domain	tccvat		var.tfgld116.cvat
domain	tfgld.catg	var.tfgld116.catg
domain	tcmcs.st19m	var.tfgld116.rmah
domain	tcncmp		company
:STBL:tfgld199,tfgld102,tfgld106,tfgld018,tfgld011
:COMT:START
---  Changes in table design  ---
%STtfgld199 is replaced by %TTtfgld116 in %TV.


---  Source and Target Sessions  ---
%SStfgld1599m000 - %TStfgld1516m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:







:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:gld
:TFLNO:117
:LDAT:2/4/2017 2:28:02 PM
:PRTX:START
migrate tfgld198
:PRTX:END
:STAT:V
:VARI:domain	tfgld.desc	var.tfgld117.desc
:STBL:tfgld198
:COMT:START
---  Changes in table design  ---
%STtfgld198 in %SV is replaced by %TTtfgld117 in %TV.


---  Source and Target Sessions  ---
%SStfgld1598s000 - %TStfgld1517m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:







:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:gld
:TFLNO:130
:LDAT:2/4/2017 2:28:27 PM
:PRTX:START
migrate tfust100
:PRTX:END
:STAT:V
:VARI:long var.tfgld130.rtyp
:STBL:tfust100
:COMT:START
---  Changes in table design  ---
%STtfust100 is migrated to %TTtfgld130. This is related to migration of the reconciliation type by ledger accounts.


---  Source and Target Sessions  ---
Source Session:%SStfust1100m000 

---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:






:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:gld
:TFLNO:131
:LDAT:2/4/2017 2:28:39 PM
:PRTX:START
migrate tfust106
:PRTX:END
:STAT:V
:VARI:long var.tfgld131.rtyp,var.tfgld131.vtyp
:STBL:tfust106
:COMT:START
---  Changes in table design  ---
%STtfust106 is migrated to %TTtfgld131


---  Source and Target Sessions  ---
Source Session:%SStfust1206m000,%SStfust1406m000,%SStfust1506m000 


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:






:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tf
:TCMOD:gld
:TFLNO:132
:LDAT:2/4/2017 2:28:57 PM
:PRTX:START
migrate tfust107
:PRTX:END
:STAT:V
:VARI:long var.tfgld132.rtyp,var.tfgld132.vtyp
:STBL:tfust107
:COMT:START
---  Changes in table design  ---
%STtfust107 is migrated to %TTtfgld132


---  Source and Target Sessions  ---
Source Session:%SStfust1407m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:






:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tp
:TCMOD:pdm
:TFLNO:801
:LDAT:6/17/2018 11:16:54 PM
:PRTX:START
Select 	tppdm000.pprj		|#FP7.sn
from	tppdm000
selectdo
endselect 			|#FP7.en


migrate tccom001
migrate bcsts000
:PRTX:END
:STAT:V
:VARI:string	dummy.err.mess

domain	bcstr16	var.tccom001.seak
domain	bcstr6	var.tccom001.clrt		|#LN10.4.1.n
|domain	bcstr3	var.tccom001.clrt		|#LN10.4.1.o
domain	bcstr6	var.tccom001.cwoc

double var.tccom001.wgrt

string	var.bpmdm001.cadr(9)
long	var.bpmdm001.sexe
string	var.bpmdm001.cist(15)
string	var.tccom001.emno(9)	|#sp2.n
:STBL:tccom001,bcsbp003,bcsts002,bcsts000,bcstc018,bcsbp000,bcsti011,tppdm000
:COMT:START
---  Changes in table design  ---
In %SV the employee data is stored in one table %STtccom001. In %TV the employee data is stored in the package that owns the data. In total four tables store employee related data:
- %TTtccom001
- %TTbpmdm001
- %TTtppdm801
- %TTtsmdm140
Not all of these tables are necessarily filled for each record that is migrated from %SV.


---  Source and Target Sessions  ---
%SStccom0101m000 - %TStccom0101m000
%SStccom0101m000 - %TSbpmdm0101m000
%SStccom0101m000 - %TStppdm8101m000
%SStppdm8101m000 - %TStppdm8101m000
%SStccom0101m000 - %TStsmdm1140m000


---  Migration Logic  ---
The target tables %TTtccom001 and %TTbpmdm001 are always filled for each employee in source table %STtccom001. The target tables %TTtppdm801 and %TTtsmdm140 are conditionally filled.
Table %TTtppdm801 is filled if project-related data is entered in %SV for the employee. The project-related data in the employees table is:
- %SFtccom001.ctrg
- %SFtccom001.rats
- %SFtccom001.dpwk
- %SFtccom001.hrsd
So if one of the fields mentioned above is filled for an employee, then table %TTtppdm801 is filled for that employee in %TV.
Table %TTtsmdm140 is filled if the employee is used in one of the following tables in %SV:
- %STtssma113
- %STtssma305
- %STtssma306
- %STtssma307
- %STtssma310
- %STtssma406
- %STtssma301
- %STtssma310
- %STtssma404
- %STtssma410
- %STtssma501
- %STtssma510
If an employee is used in one of these tables, then that employee is registered in a mapping table (%STbcsts002). All employees of that mapping table will be migrated as service-employee in table %TTtsmdm140.
Next to this an employee is registered in session %SSbcsts0100m000. This employee results in this filling of table %TTtsmdm140 together with %TTtccom001 and %TTbpmdm001.


---  Migration Parameters  ---
%STbcsts000


---  Migration Mapping Tables  ---
%STbcsts002
%STbcsbp003
%STbcstc004
%STbcstc018


---  Technical Notes  ---
Not Applicable.


---  Performance  ---
Not Applicable.
:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tp
:TCMOD:ppc
:TFLNO:291
:LDAT:2/4/2017 2:31:12 PM
:PRTX:START
comp.ccur = get.home.currency.orig.comp()

read.parameters.project(o.err.mess)		

get.project.period.table.codes(		
	var.tpppc291.cpth,
	var.tpppc291.cptc,
	var.tpppc291.cptf,
	o.err.mess)

migrate tpppc291
:PRTX:END
:STAT:V
:VARI:string		var.tpppc291.cprj(9)
	domain	tcmcs.s200m	o.err.mess
	domain	tcyesno		var.tpppc291.blbl
	domain	bcstr6		var.tpppc291.cpth
	domain	bcstr6		var.tpppc291.cptc
	domain	bcstr6		var.tpppc291.cptf
	domain	tcccur		comp.ccur
	domain	tcamnt		var.tpppc291.cohd(3)

		long		var.tpppc291.teti
	domain	tppdm.aajc	var.tpppc291.pris
	domain	tppdm.aalc	var.tpppc291.amos
|	domain	tcccur		var.tpppc291.curc
	domain	tcccur		var.tpppc291.curs

|		double		var.tpppc291.rtcc(3)	|*FP9
|		long		var.tpppc291.rtfc(3)	|*FP9
		double		var.tpppc291.rtcs(3)
		long		var.tpppc291.rtfs(3)

|		string		var.tpppc291.rdat(23)
		string		var.tpppc291.rdas(23)
		long		posting.type.history.long
		long		dummy.long
:STBL:tpppc291,bcstc000,bcstc006,bcstc008,bcstc018,bcstp000,tppdm600
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---
%SStpppc2191m000 - %TStpppc2591m000


---  Migration Logic  ---
1. %STbcstc016 is used to read the Project code.

2. %STbcstc006 is used to read the Cost Components.This entity is filled using a preconversion session.Cost Components in %SV are maintained in two different tables whereas these are maintained in a single table in %TV.

3. %STbcstc018 is used in the logic as the Financial company information is 
    read via the Enterprise Units in %TV.

---  Migration Parameters  ---

---  Migration Mapping Tables  ---
1. %STbcstp000 - To read the exchange rate types
2. %STbcstc006 - To read the New Cost Component codes
3. %STbcstc016 - To read the New Project Code
4. %STbcstc018 - To read the Enterprise Unit

---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:



:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tp
:TCMOD:ptc
:TFLNO:250
:LDAT:2/4/2017 2:31:52 PM
:PRTX:START
comp.ccur = get.home.currency.orig.comp()

select 	 bcsbp000.* 
from 	 bcsbp000 
as set with 1 rows 
selectdo
endselect 	 

var.lng.start 	 =  ((bcsbp000.swkh +  (bcsbp000.swkm /  60)) *  60 *  60)  
var.lng.finish 	 =  ((bcsbp000.ewkh +  (bcsbp000.ewkm /  60)) *  60 *  60)  
var.dbl.duration =  (var.lng.finish -  var.lng.start) /  (60 *  60) 	  

select	tppss000.cudy
from	tppss000 
where	tppss000.sera = 1
as set with 1 rows
selectdo
endselect

migrate tpptc250
:PRTX:END
:STAT:V
:VARI:#include "itppss0030"

#include "itppss0032"
#include "itppdm0010"   | read standard or project subcontracting

		string		var.tpptc250.rsta(22)
		string		var.tpptc250.rfin(22)
		string		var.tpptc250.btdt(22)

	extern	long		ext.lng.comp
	extern	long		ext.lng.curr.comp
		long		var.lng.start
		long		var.lng.finish
		long		var.lng.stdp
		long		var.lng.fidp

		double		var.dbl.duration

	domain	tppdm.date	var.tppdm.date.o.stdt
	domain	tppdm.dprt	var.tppdm.dprt.o.stdp
	domain	tppdm.date	var.tppdm.dprt.o.dprt
	domain	tppdm.dprt	var.tppdm.dprt.o.fidtp
	domain	tppss.cltp	var.tppss.cltp.l.cltp
	domain	tppdm.ctrg	var.tppdm.ctrg.l.ctrg
	domain	tcemno		var.tcemno.l.emno
	domain	tppdm.cequ	var.tppdm.cequ.l.cequ
	domain	tppdm.pltm	var.tppdm.pltm.l.duration
	domain	tppdm.s080	var.tppdm.s080.l.mess
	domain	tcmcs.s200m	var.o.errmess
	domain	tcccur		comp.ccur
	domain tppdm.reft	reft.csub
|		long		reft.csub.long

	domain	tccuni		var.tpptc250.cuni
	domain	tccuni		var.tpptc250.cuti
	domain tppdm.desc 	desc.csub
	domain tppdm.dsbc 	csub.dsbc      | method of price determination
		long		csub.dsbc.long
	domain	tppdm.aalc	var.tpptc250.amos
	domain	tppdm.abjc	var.tpptc250.pris
	domain	tcccur		var.tpptc250.sacu
	domain	tppdm.qajc	var.tpptc250.quan
	domain	tppdm.qahc	var.tpptc250.qutm
		double		var.tpptc250.rtcs(3)
		long		var.tpptc250.rtfs(3)
|		domain 	 tppdm.desc 	 tppdm.dll0010.reft
:STBL:tpptc050,tpptc250,tppss200,tppss010,tppdm600,bcsbp000,bcstc006
:COMT:START
---  Changes in table design  ---



---  Source and Target Sessions  ---
%SStpptc2113m000 - %TStpptc2513m000


---  Migration Logic  ---
1. All the projects from %SV are maintained in %STbcstc016 as a preconversion activity. For each record being migrated of table %STtpptc160, the method get.tp.project(...) is used to fetch the correct code and is assigned to the field %TFtpptc250.cprj. For details refer to the general topic 
%GTtipcs0000

2. %TFtpptc250.cocu and %TFtpptc250.sacu are filled with 
%SFtccom000.ccur as %SFtccom000.ccur is taken as the currency in %SV until specified otherwise. The tccom000 table should be maintained/migrated prior to the migration of this table.

3. All the cost components from %STticpr010 and %STtppdm100 are maintained into %STbcstc006 with a unique code. For each record, using the method get.cost.components(...) the correct code is fetched and assigned to the field %TFtpptc250.ccco. For details refer to the general topic 
%GTticpr0000

4. Fields %TFtpptc250.rtcc, %TFtpptc250.rtfc, %TFtpptc250.rtcs, and 
%TFtpptc250.rtfs are filled with 1 because %SV to %TV migration is done in single currency system.

---  Migration Parameters  ---
1. Projects should be maintained in table %STbcstc016.
2. Cost Components must be already maintained in the table %STbcstc006.
3. A companies start time and end time are maintained in the table 
%STbcsbp000 as fields %SFbcsbp000.swkh, %SFbcsbp000.swkm, 
%SFbcsbp000.ewkh,%SFbcsbp000.ewkm.

---  Migration Mapping Tables  ---
%STbcstc016 - %SSbcstc0116m000.
%STbcstc006 - %SSbcstc0106m000
%STbcsbp000 - %SSbcsbp0100m000

---  Technical Notes  ---



---  Performance  ---
:COMT:END
:TEXT:



:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:tp
:TCMOD:ptc
:TFLNO:300
:LDAT:2/4/2017 2:32:09 PM
:PRTX:START
read.parameters.project(o.err.mess)				|#1122787.n
migrate tpptc300
:PRTX:END
:STAT:V
:VARI:domain	tppdm.yeno	var.tpptc300.iexc
domain	tcmcs.s200m	o.err.mess				|#1122787.n
:STBL:tpptc300,tppdm600,bcstp000
:COMT:START
---  Changes in table design  ---

---  Source and Target Sessions  ---
%SStpptc3100m000 - %TStpptc3500m000

---  Migration Logic  ---
1. All the projects from %SV are maintained in %STbcstc016 as a 
    preconversion activity. For each record being migrated of table % 
    STtpptc300, the method get.tp.project() is used to fetch the correct code 
    and is assigned to the field %TFtpptc300.cprj. For details refer to the 
    general topic %GTtipcs0000

2. %TFtpptc300.lcdt is filled with %SFtpptc300.lcdt and %SFtpptc300.lctm

---  Migration Parameters  ---
1. Projects should be maintained in table %STbcstc016.
2. migration parameter %SFbcstp000.rtyp is used

---  Migration Mapping Tables  ---
%STbcstc016 - %SSbcstc0116m000.

---  Technical Notes  ---


---  Performance  ---

:COMT:END
:TEXT:



:TEXT:END
:ISMS:False
MO
:MPRF:62
:VERS:B4cf
:RELE:61
:CUST:f106
:TCPAC:ts
:TCMOD:mdm
:TFLNO:140
:LDAT:6/17/2018 11:16:54 PM
:PRTX:START
Select 	tppdm000.pprj		|#FP7.sn
from	tppdm000
selectdo
endselect 			|#FP7.en


migrate tccom001
migrate bcsts000
:PRTX:END
:STAT:V
:VARI:string	dummy.err.mess

domain	bcstr16	var.tccom001.seak
domain	bcstr6	var.tccom001.clrt		|#LN10.4.1.n
|domain	bcstr3	var.tccom001.clrt		|#LN10.4.1.o
domain	bcstr6	var.tccom001.cwoc

double var.tccom001.wgrt

string	var.bpmdm001.cadr(9)
long	var.bpmdm001.sexe
string	var.bpmdm001.cist(15)
string	var.tccom001.emno(9)	|#sp2.n
:STBL:tccom001,bcsbp003,bcsts002,bcsts000,bcstc018,bcsbp000,bcsti011,tppdm000
:COMT:START
---  Changes in table design  ---
In %SV the employee data is stored in one table %STtccom001. In %TV the employee data is stored in the package that owns the data. In total four tables store employee related data:
- %TTtccom001
- %TTbpmdm001
- %TTtppdm801
- %TTtsmdm140
Not all of these tables are necessarily filled for each record that is migrated from %SV.


---  Source and Target Sessions  ---
%SStccom0101m000 - %TStccom0101m000
%SStccom0101m000 - %TSbpmdm0101m000
%SStccom0101m000 - %TStppdm8101m000
%SStppdm8101m000 - %TStppdm8101m000
%SStccom0101m000 - %TStsmdm1140m000


---  Migration Logic  ---
The target tables %TTtccom001 and %TTbpmdm001 are always filled for each employee in source table %STtccom001. The target tables %TTtppdm801 and %TTtsmdm140 are conditionally filled.
Table %TTtppdm801 is filled if project-related data is entered in %SV for the employee. The project-related data in the employees table is:
- %SFtccom001.ctrg
- %SFtccom001.rats
- %SFtccom001.dpwk
- %SFtccom001.hrsd
So if one of the fields mentioned above is filled for an employee, then table %TTtppdm801 is filled for that employee in %TV.
Table %TTtsmdm140 is filled if the employee is used in one of the following tables in %SV:
- %STtssma113
- %STtssma305
- %STtssma306
- %STtssma307
- %STtssma310
- %STtssma406
- %STtssma301
- %STtssma310
- %STtssma404
- %STtssma410
- %STtssma501
- %STtssma510
If an employee is used in one of these tables, then that employee is registered in a mapping table (%STbcsts002). All employees of that mapping table will be migrated as service-employee in table %TTtsmdm140.
Next to this an employee is registered in session %SSbcsts0100m000. This employee results in this filling of table %TTtsmdm140 together with %TTtccom001 and %TTbpmdm001.


---  Migration Parameters  ---
%STbcsts000


---  Migration Mapping Tables  ---
%STbcsts002
%STbcsbp003
%STbcstc004
%STbcstc018


---  Technical Notes  ---
Not Applicable.


---  Performance  ---
Not Applicable.
:COMT:END
:TEXT:


:TEXT:END
:ISMS:True
