MO
:MPRF:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:bp
:TCMOD:tmm
:TFLNO:100
:LDAT:6/5/2019 9:57:13 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:bp
:TCMOD:tmm
:TFLNO:111
:LDAT:6/5/2019 9:57:13 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:bp
:TCMOD:tmm
:TFLNO:120
:LDAT:6/5/2019 9:57:13 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:bp
:TCMOD:tmm
:TFLNO:130
:LDAT:6/5/2019 9:57:13 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:bp
:TCMOD:tmm
:TFLNO:150
:LDAT:6/5/2019 9:57:13 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:bp
:TCMOD:tmm
:TFLNO:170
:LDAT:6/5/2019 9:57:13 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:bp
:TCMOD:tmm
:TFLNO:200
:LDAT:6/5/2019 9:58:33 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:bp
:TCMOD:tmm
:TFLNO:210
:LDAT:6/5/2019 9:58:33 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:bp
:TCMOD:tmm
:TFLNO:211
:LDAT:6/5/2019 9:58:33 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:bp
:TCMOD:tmm
:TFLNO:220
:LDAT:6/5/2019 9:58:33 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:bp
:TCMOD:tmm
:TFLNO:230
:LDAT:6/5/2019 9:58:33 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:bp
:TCMOD:tmm
:TFLNO:250
:LDAT:6/5/2019 9:58:33 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:bp
:TCMOD:tmm
:TFLNO:270
:LDAT:6/5/2019 9:58:33 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:acp
:TFLNO:100
:LDAT:6/5/2019 10:40:00 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:acp
:TFLNO:200
:LDAT:6/5/2019 10:44:43 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:acp
:TFLNO:240
:LDAT:6/5/2019 10:45:56 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:acp
:TFLNO:245
:LDAT:6/5/2019 10:45:56 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:acp
:TFLNO:249
:LDAT:6/5/2019 10:45:56 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:acp
:TFLNO:250
:LDAT:6/5/2019 10:47:04 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:acp
:TFLNO:251
:LDAT:6/5/2019 10:47:04 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:acp
:TFLNO:253
:LDAT:6/5/2019 10:47:04 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:acp
:TFLNO:500
:LDAT:6/5/2019 10:44:43 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:acr
:TFLNO:000
:LDAT:6/5/2019 11:00:18 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:acr
:TFLNO:005
:LDAT:6/5/2019 11:00:45 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:acr
:TFLNO:015
:LDAT:6/5/2019 11:00:45 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:acr
:TFLNO:200
:LDAT:6/6/2019 2:29:26 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:acr
:TFLNO:201
:LDAT:6/5/2019 11:03:10 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:acr
:TFLNO:301
:LDAT:6/5/2019 11:03:41 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:acr
:TFLNO:312
:LDAT:6/5/2019 11:04:27 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:acr
:TFLNO:500
:LDAT:6/6/2019 2:29:31 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:cat
:TFLNO:000
:LDAT:6/5/2019 11:05:18 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:cat
:TFLNO:004
:LDAT:6/5/2019 11:05:42 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:cat
:TFLNO:210
:LDAT:6/5/2019 11:07:46 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:cat
:TFLNO:211
:LDAT:6/5/2019 11:08:07 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:cat
:TFLNO:220
:LDAT:6/5/2019 11:08:25 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:cat
:TFLNO:221
:LDAT:6/5/2019 11:08:40 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:cat
:TFLNO:240
:LDAT:6/5/2019 11:09:00 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:cat
:TFLNO:400
:LDAT:6/5/2019 11:15:10 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:cat
:TFLNO:412
:LDAT:6/5/2019 11:15:29 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:cmg
:TFLNO:000
:LDAT:6/6/2019 2:31:58 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:cmg
:TFLNO:001
:LDAT:6/5/2019 11:22:24 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:cmg
:TFLNO:101
:LDAT:6/6/2019 2:33:26 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:cmg
:TFLNO:204
:LDAT:6/7/2019 8:43:06 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:cmg
:TFLNO:301
:LDAT:6/5/2019 11:25:59 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:fam
:TFLNO:000
:LDAT:6/5/2019 11:39:39 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:fam
:TFLNO:100
:LDAT:6/5/2019 11:40:11 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:fam
:TFLNO:710
:LDAT:6/5/2019 11:41:19 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:fbs
:TFLNO:000
:LDAT:6/5/2019 11:42:03 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:fbs
:TFLNO:003
:LDAT:6/5/2019 11:42:20 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:fbs
:TFLNO:004
:LDAT:6/5/2019 11:42:44 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:fbs
:TFLNO:005
:LDAT:6/5/2019 11:42:44 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:fbs
:TFLNO:010
:LDAT:6/5/2019 11:44:17 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:fbs
:TFLNO:011
:LDAT:6/5/2019 11:44:31 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:fbs
:TFLNO:012
:LDAT:6/5/2019 11:45:32 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:fbs
:TFLNO:020
:LDAT:6/5/2019 11:47:38 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:fbs
:TFLNO:021
:LDAT:6/5/2019 11:48:04 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:fbs
:TFLNO:030
:LDAT:6/5/2019 11:48:23 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:fbs
:TFLNO:040
:LDAT:6/5/2019 11:50:00 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:fbs
:TFLNO:041
:LDAT:6/5/2019 11:50:20 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:fbs
:TFLNO:042
:LDAT:6/5/2019 11:51:01 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:fbs
:TFLNO:100
:LDAT:6/5/2019 11:59:32 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:fbs
:TFLNO:101
:LDAT:6/5/2019 11:59:32 AM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:fbs
:TFLNO:110
:LDAT:6/5/2019 12:00:07 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:fbs
:TFLNO:111
:LDAT:6/5/2019 12:00:34 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:fbs
:TFLNO:120
:LDAT:6/5/2019 12:00:50 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:fbs
:TFLNO:121
:LDAT:6/5/2019 12:01:04 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:fbs
:TFLNO:130
:LDAT:6/5/2019 12:01:19 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:fbs
:TFLNO:131
:LDAT:6/5/2019 12:01:32 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:gld
:TFLNO:004
:LDAT:6/5/2019 12:09:21 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:gld
:TFLNO:008
:LDAT:6/5/2019 12:26:12 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:gld
:TFLNO:009
:LDAT:6/5/2019 12:26:12 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:gld
:TFLNO:018
:LDAT:6/5/2019 12:36:48 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:gld
:TFLNO:051
:LDAT:6/5/2019 12:26:12 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:gld
:TFLNO:052
:LDAT:6/5/2019 12:26:12 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:gld
:TFLNO:102
:LDAT:6/6/2019 2:37:29 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:gld
:TFLNO:106
:LDAT:6/6/2019 2:42:01 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:tf
:TCMOD:gld
:TFLNO:110
:LDAT:6/5/2019 12:44:18 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:ti
:TCMOD:bom
:TFLNO:010
:LDAT:6/5/2019 12:47:48 PM
: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:ti
:TCMOD:cpr
:TFLNO:000
:LDAT:6/5/2019 12:48:57 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:ti
:TCMOD:cpr
:TFLNO:099
:LDAT:6/5/2019 12:49:22 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:ti
:TCMOD:cpr
:TFLNO:110
:LDAT:6/5/2019 12:51:08 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:ti
:TCMOD:cpr
:TFLNO:150
:LDAT:6/5/2019 12:51:39 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:ti
:TCMOD:cpr
:TFLNO:200
:LDAT:6/5/2019 12:49:22 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:ti
:TCMOD:cpr
:TFLNO:201
:LDAT:6/5/2019 12:49:22 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:ti
:TCMOD:cpr
:TFLNO:205
:LDAT:6/5/2019 12:49:22 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:ti
:TCMOD:cpr
:TFLNO:206
:LDAT:6/5/2019 12:49:22 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:ti
:TCMOD:cpr
:TFLNO:220
:LDAT:6/5/2019 12:52:08 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:ti
:TCMOD:cpr
:TFLNO:240
:LDAT:6/5/2019 12:49:22 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:ti
:TCMOD:cpr
:TFLNO:300
:LDAT:6/5/2019 12:49:22 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:ti
:TCMOD:cpr
:TFLNO:301
:LDAT:6/5/2019 12:49:22 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:ti
:TCMOD:cpr
:TFLNO:305
:LDAT:6/5/2019 12:49:22 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:ti
:TCMOD:cpr
:TFLNO:306
:LDAT:6/5/2019 12:49:22 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:ti
:TCMOD:cpr
:TFLNO:320
:LDAT:6/5/2019 12:52:55 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:ti
:TCMOD:cpr
:TFLNO:340
:LDAT:6/5/2019 12:49:22 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:ti
:TCMOD:pcs
:TFLNO:000
:LDAT:6/5/2019 12:53:42 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:ti
:TCMOD:pcs
:TFLNO:320
:LDAT:6/5/2019 12:53:59 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:ti
:TCMOD:pcs
:TFLNO:350
:LDAT:6/5/2019 12:54:17 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:ti
:TCMOD:pcs
:TFLNO:360
:LDAT:6/5/2019 12:54:40 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:wh
:TCMOD:ina
:TFLNO:112
:LDAT:6/6/2019 2:44:42 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


domain	tccwar		var.whinr110.cwar		|#214852.n

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

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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:wh
:TCMOD:ina
:TFLNO:113
:LDAT:6/6/2019 2:44:44 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


domain	tccwar		var.whinr110.cwar		|#214852.n

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

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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:wh
:TCMOD:ina
:TFLNO:114
:LDAT:6/6/2019 2:44:45 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


domain	tccwar		var.whinr110.cwar		|#214852.n

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

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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:wh
:TCMOD:ina
:TFLNO:115
:LDAT:6/6/2019 2:44:46 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


domain	tccwar		var.whinr110.cwar		|#214852.n

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

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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:wh
:TCMOD:ina
:TFLNO:120
:LDAT:6/6/2019 2:44:47 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


domain	tccwar		var.whinr110.cwar		|#214852.n

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

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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:wh
:TCMOD:ina
:TFLNO:121
:LDAT:6/6/2019 2:44:48 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


domain	tccwar		var.whinr110.cwar		|#214852.n

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

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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:wh
:TCMOD:inr
:TFLNO:110
:LDAT:6/6/2019 2:44:51 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


domain	tccwar		var.whinr110.cwar		|#214852.n

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

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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:wh
:TCMOD:ltc
:TFLNO:100
:LDAT:6/26/2019 3:19: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:wh
:TCMOD:ltc
:TFLNO:101
:LDAT:6/26/2019 3:19: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:wh
:TCMOD:ltc
:TFLNO:105
:LDAT:6/26/2019 3:19: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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:wh
:TCMOD:ltc
:TFLNO:111
:LDAT:6/26/2019 3:19:53 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:wh
:TCMOD:ltc
:TFLNO:500
:LDAT:6/26/2019 3:19:54 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:wh
:TCMOD:ltc
:TFLNO:501
:LDAT:6/6/2019 2:44:52 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


domain	tccwar		var.whinr110.cwar		|#214852.n

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

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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:wh
:TCMOD:ltc
:TFLNO:502
:LDAT:6/6/2019 2:44:53 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


domain	tccwar		var.whinr110.cwar		|#214852.n

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

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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:wh
:TCMOD:wmd
:TFLNO:210
:LDAT:6/6/2019 2:51:26 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:wh
:TCMOD:wmd
:TFLNO:215
:LDAT:6/6/2019 2:51:27 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:wh
:TCMOD:wmd
:TFLNO:216
:LDAT:6/6/2019 2:51:28 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:wh
:TCMOD:wmd
:TFLNO:217
:LDAT:6/6/2019 2:51:28 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:wh
:TCMOD:wmd
:TFLNO:219
:LDAT:6/6/2019 2:51:29 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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:wh
:TCMOD:wmd
:TFLNO:255
:LDAT:6/6/2019 2:44:53 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


domain	tccwar		var.whinr110.cwar		|#214852.n

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

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:69
:VERS:B4ct
:RELE:ce
:CUST:23
:TCPAC:wh
:TCMOD:wmd
:TFLNO:260
:LDAT:6/6/2019 2:51:30 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
