MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tc
:TCMOD:ibd
:TFLNO:410
:PRTX:START
g.ret = read.parameters.distribution(g.error.message)
fill.old.session.code.activities.array()
location.controlled.implemented()	|#800-143063.n
g.mc.depth = get.mc.depth()		|#Sp1.n
migrate tdsls045
:PRTX:END
:STAT:V
:VARI:#pragma used dll "otdslsdll0022"		|* Calculate Multi-Level Discount

#include	"itccom0007"		|* Round quantity
#include	"itcmcs0095"		|* Read parameters
#include	"itdsls0014"		|* Deal with order item line status
									|#Sp1.sn
#include 	"ibcswh0011"		|* Handle amount per cost component
									|#Sp1.en

	domain	tcmcs.s200m	g.error.message
	domain	tcsess		g.old.session.code.activities.array(20)
		long		g.ret
	domain	tccprg		g.price.group
	domain	tccuni		g.inventory.unit
	domain	tcbool		g.total.line
	domain	tcdate		g.total.dldt
	domain	tcqsl1		g.total.qoor
	domain	tcqsl1		g.total.qidl
	domain	tcqsl1		g.total.qbbo
	domain	tcamnt		g.total.oamt
	domain	tcamnt		g.total.damt
	domain	tcamnt		g.total.amld
	domain	tcamnt		g.total.amod
	domain	tckitm		g.item.type
	domain	tcbool		g.ilc.implemented				|#800-143063.n
	domain	tcbool		g.create.expected.delivery.line.for.tdilc401
	domain	tcpono		g.outbound.advice.record
		long		g.no.of.outbound.advices.per.sls.sequence
									|#800-143063.n
									|#Sp1.sn
	domain	tcmcs.str14	g.lot.and.serial.set
	domain	tcstva		g.inventory.valuation
	domain	bccost		g.cost.component
		double		g.cogs.amnt(3)
		long		g.mc.depth
									|#Sp1.en
:STBL:tdsls034,tdsls035,tdsls040,tdsls041,tdsls703,tcmcs002,tcmcs039,tcmcs042,tdinv310,tdpur041,tiitm001,tssma102,bcstc005,bcstc006,bcstc008,bcstc011,tdsls045,bcstc018,bcstd000,tccom010,trtcd120,bcsfm001,bcsti001,bcsts005,bcstc030,bcstd001,tdilc401,tdilc000,tdltc004,ticpr300,tipcs350,bcstc010
:COMT:START

---  Changes in table design  ---
%TTtdsls401, %TTtdsls402 and %TTtdsls406 are filled with data mainly coming from %STtdsls041 and %STtdsls045.


---  Source and Target Sessions  ---
Source session:
 %SStdsls4102m000 
Target sessions:
%TStdsls4101m000
%TStdsls4100m900
%TStdsls4102s200
%TStdsls4106m000
%TStdsls4109m000


---  Migration Logic  ---
The data is migrated from %STtdsls041 and %STtdsls045 to the %TV tables according to the following logic:

The next situations are possible in %SV:
1. One entry in %STtdsls041 and one in %STtdsls045.
2. One entry in %STtdsls041 and two or more in %STtdsls045.

Ad. 1: In this case there is only one record converted into %TTtdsls401, with order line type (%TFtdsls401.oltp) equals 'Order/Delivery Line' and the sequence number (%TFtdsls401.sqnb) is 0.

Ad. 2: In this case there are one or more backorder lines created for the order line. In %TTtdsls401 there will be a record created for every record in %STtdsls045. The following basic conversion rules will be applied:
If %SFtdsls045.srnb is zero, the record will be converted into %TTtdsls401 with %TFtdsls401.sqnb set to 1 and %TFtdsls401.oltp set to 'Order/Delivery Line'.
If %SFtdsls045.srnb is one or higher, the record will be converted into %TTtdsls401 with %TFtdsls401.sqnb set to sequence number in %SV + 1 and %TFtdsls401.oltp set to 'Back Order'.
For each order line having more than one delivery line (%STtdsls045 records) a total line record will be created in %TTtdsls401 in %TV. The record will get the following characteristics %TFtdsls401.sqnb set to 0 and %TFtdsls401.oltp set to 'Total Line'
On the total line, cumulative data is stored taken from all the back order lines.

The next two conversions apply for each %STtdsls045 record in %SV:
When a delivery is already done for this table (%SFtdsls045.ddat <> 0) then also one record is converted from %STtdsls041 and %STtdsls045 into %TTtdsls406.
If for the Sales order line in %SV the below rules are applicable then also a record is converted into %TTtdsls402 for the sales order line in %TV:
- A purchase order is linked to the sales order line or 
- The sales order line resulted from a sales quotation or 
- A delivery took place on the sales order line or 
- A transport order is linked to the sales order line or
- A planned purchase order present for the order line.

For each record created in %TTtdsls406 also the cost of goods sold records are logged in %TTtdsls409. See also %GTticpr0000

For each delivered lot controlled item the delivered Lot and/or serial information is stored in %TTtcibd410 and %TTtcibd411

---  Migration Parameters  ---
None


---  Migration Mapping Tables  ---
Addresses are retrieved from %STbcstc004
Contacts are retrieved from %STbcstc005
Cost components are retrieved from %STbcstc006
Business Partners are retrieved from %STbcstc008
Aggregated cost components are retrived from %STbcstc010
Exchange Rate type retrieved from %STbcstc011
Project codes are retrieved from %STbcstc016
The sales office is retrieved from %STbcstc018
The sales type is retrieved from %STbcstc020
Series for the price matrix and discount matrix are retrieved from %STbcstd012
Product variant codes are retrieved from %STbcsti001


---  Technical Notes  ---
None


---  Performance  ---
Because %STtdsls041 and %STtdsls045 have often many records it is recommended that the amount of records is reduced as much as possible. Deleting processed sales orders and/or archive these sales orders can do this.



:COMT:END
:TEXT:

:TEXT:END
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tc
:TCMOD:ibd
:TFLNO:411
:PRTX:START
g.ret = read.parameters.distribution(g.error.message)
fill.old.session.code.activities.array()
location.controlled.implemented()	|#800-143063.n
g.mc.depth = get.mc.depth()		|#Sp1.n
migrate tdsls045
:PRTX:END
:STAT:V
:VARI:#pragma used dll "otdslsdll0022"		|* Calculate Multi-Level Discount

#include	"itccom0007"		|* Round quantity
#include	"itcmcs0095"		|* Read parameters
#include	"itdsls0014"		|* Deal with order item line status
									|#Sp1.sn
#include 	"ibcswh0011"		|* Handle amount per cost component
									|#Sp1.en

	domain	tcmcs.s200m	g.error.message
	domain	tcsess		g.old.session.code.activities.array(20)
		long		g.ret
	domain	tccprg		g.price.group
	domain	tccuni		g.inventory.unit
	domain	tcbool		g.total.line
	domain	tcdate		g.total.dldt
	domain	tcqsl1		g.total.qoor
	domain	tcqsl1		g.total.qidl
	domain	tcqsl1		g.total.qbbo
	domain	tcamnt		g.total.oamt
	domain	tcamnt		g.total.damt
	domain	tcamnt		g.total.amld
	domain	tcamnt		g.total.amod
	domain	tckitm		g.item.type
	domain	tcbool		g.ilc.implemented				|#800-143063.n
	domain	tcbool		g.create.expected.delivery.line.for.tdilc401
	domain	tcpono		g.outbound.advice.record
		long		g.no.of.outbound.advices.per.sls.sequence
									|#800-143063.n
									|#Sp1.sn
	domain	tcmcs.str14	g.lot.and.serial.set
	domain	tcstva		g.inventory.valuation
	domain	bccost		g.cost.component
		double		g.cogs.amnt(3)
		long		g.mc.depth
									|#Sp1.en
:STBL:tdsls034,tdsls035,tdsls040,tdsls041,tdsls703,tcmcs002,tcmcs039,tcmcs042,tdinv310,tdpur041,tiitm001,tssma102,bcstc005,bcstc006,bcstc008,bcstc011,tdsls045,bcstc018,bcstd000,tccom010,trtcd120,bcsfm001,bcsti001,bcsts005,bcstc030,bcstd001,tdilc401,tdilc000,tdltc004,ticpr300,tipcs350,bcstc010
:COMT:START

---  Changes in table design  ---
%TTtdsls401, %TTtdsls402 and %TTtdsls406 are filled with data mainly coming from %STtdsls041 and %STtdsls045.


---  Source and Target Sessions  ---
Source session:
 %SStdsls4102m000 
Target sessions:
%TStdsls4101m000
%TStdsls4100m900
%TStdsls4102s200
%TStdsls4106m000
%TStdsls4109m000


---  Migration Logic  ---
The data is migrated from %STtdsls041 and %STtdsls045 to the %TV tables according to the following logic:

The next situations are possible in %SV:
1. One entry in %STtdsls041 and one in %STtdsls045.
2. One entry in %STtdsls041 and two or more in %STtdsls045.

Ad. 1: In this case there is only one record converted into %TTtdsls401, with order line type (%TFtdsls401.oltp) equals 'Order/Delivery Line' and the sequence number (%TFtdsls401.sqnb) is 0.

Ad. 2: In this case there are one or more backorder lines created for the order line. In %TTtdsls401 there will be a record created for every record in %STtdsls045. The following basic conversion rules will be applied:
If %SFtdsls045.srnb is zero, the record will be converted into %TTtdsls401 with %TFtdsls401.sqnb set to 1 and %TFtdsls401.oltp set to 'Order/Delivery Line'.
If %SFtdsls045.srnb is one or higher, the record will be converted into %TTtdsls401 with %TFtdsls401.sqnb set to sequence number in %SV + 1 and %TFtdsls401.oltp set to 'Back Order'.
For each order line having more than one delivery line (%STtdsls045 records) a total line record will be created in %TTtdsls401 in %TV. The record will get the following characteristics %TFtdsls401.sqnb set to 0 and %TFtdsls401.oltp set to 'Total Line'
On the total line, cumulative data is stored taken from all the back order lines.

The next two conversions apply for each %STtdsls045 record in %SV:
When a delivery is already done for this table (%SFtdsls045.ddat <> 0) then also one record is converted from %STtdsls041 and %STtdsls045 into %TTtdsls406.
If for the Sales order line in %SV the below rules are applicable then also a record is converted into %TTtdsls402 for the sales order line in %TV:
- A purchase order is linked to the sales order line or 
- The sales order line resulted from a sales quotation or 
- A delivery took place on the sales order line or 
- A transport order is linked to the sales order line or
- A planned purchase order present for the order line.

For each record created in %TTtdsls406 also the cost of goods sold records are logged in %TTtdsls409. See also %GTticpr0000

For each delivered lot controlled item the delivered Lot and/or serial information is stored in %TTtcibd410 and %TTtcibd411

---  Migration Parameters  ---
None


---  Migration Mapping Tables  ---
Addresses are retrieved from %STbcstc004
Contacts are retrieved from %STbcstc005
Cost components are retrieved from %STbcstc006
Business Partners are retrieved from %STbcstc008
Aggregated cost components are retrived from %STbcstc010
Exchange Rate type retrieved from %STbcstc011
Project codes are retrieved from %STbcstc016
The sales office is retrieved from %STbcstc018
The sales type is retrieved from %STbcstc020
Series for the price matrix and discount matrix are retrieved from %STbcstd012
Product variant codes are retrieved from %STbcsti001


---  Technical Notes  ---
None


---  Performance  ---
Because %STtdsls041 and %STtdsls045 have often many records it is recommended that the amount of records is reduced as much as possible. Deleting processed sales orders and/or archive these sales orders can do this.



:COMT:END
:TEXT:

:TEXT:END
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:td
:TCMOD:sls
:TFLNO:401
:PRTX:START
g.ret = read.parameters.distribution(g.error.message)
fill.old.session.code.activities.array()
location.controlled.implemented()	|#800-143063.n
g.mc.depth = get.mc.depth()		|#Sp1.n
migrate tdsls045
:PRTX:END
:STAT:V
:VARI:#pragma used dll "otdslsdll0022"		|* Calculate Multi-Level Discount

#include	"itccom0007"		|* Round quantity
#include	"itcmcs0095"		|* Read parameters
#include	"itdsls0014"		|* Deal with order item line status
									|#Sp1.sn
#include 	"ibcswh0011"		|* Handle amount per cost component
									|#Sp1.en

	domain	tcmcs.s200m	g.error.message
	domain	tcsess		g.old.session.code.activities.array(20)
		long		g.ret
	domain	tccprg		g.price.group
	domain	tccuni		g.inventory.unit
	domain	tcbool		g.total.line
	domain	tcdate		g.total.dldt
	domain	tcqsl1		g.total.qoor
	domain	tcqsl1		g.total.qidl
	domain	tcqsl1		g.total.qbbo
	domain	tcamnt		g.total.oamt
	domain	tcamnt		g.total.damt
	domain	tcamnt		g.total.amld
	domain	tcamnt		g.total.amod
	domain	tckitm		g.item.type
	domain	tcbool		g.ilc.implemented				|#800-143063.n
	domain	tcbool		g.create.expected.delivery.line.for.tdilc401
	domain	tcpono		g.outbound.advice.record
		long		g.no.of.outbound.advices.per.sls.sequence
									|#800-143063.n
									|#Sp1.sn
	domain	tcmcs.str14	g.lot.and.serial.set
	domain	tcstva		g.inventory.valuation
	domain	bccost		g.cost.component
		double		g.cogs.amnt(3)
		long		g.mc.depth
									|#Sp1.en
:STBL:tdsls034,tdsls035,tdsls040,tdsls041,tdsls703,tcmcs002,tcmcs039,tcmcs042,tdinv310,tdpur041,tiitm001,tssma102,bcstc005,bcstc006,bcstc008,bcstc011,tdsls045,bcstc018,bcstd000,tccom010,trtcd120,bcsfm001,bcsti001,bcsts005,bcstc030,bcstd001,tdilc401,tdilc000,tdltc004,ticpr300,tipcs350,bcstc010
:COMT:START

---  Changes in table design  ---
%TTtdsls401, %TTtdsls402 and %TTtdsls406 are filled with data mainly coming from %STtdsls041 and %STtdsls045.


---  Source and Target Sessions  ---
Source session:
 %SStdsls4102m000 
Target sessions:
%TStdsls4101m000
%TStdsls4100m900
%TStdsls4102s200
%TStdsls4106m000
%TStdsls4109m000


---  Migration Logic  ---
The data is migrated from %STtdsls041 and %STtdsls045 to the %TV tables according to the following logic:

The next situations are possible in %SV:
1. One entry in %STtdsls041 and one in %STtdsls045.
2. One entry in %STtdsls041 and two or more in %STtdsls045.

Ad. 1: In this case there is only one record converted into %TTtdsls401, with order line type (%TFtdsls401.oltp) equals 'Order/Delivery Line' and the sequence number (%TFtdsls401.sqnb) is 0.

Ad. 2: In this case there are one or more backorder lines created for the order line. In %TTtdsls401 there will be a record created for every record in %STtdsls045. The following basic conversion rules will be applied:
If %SFtdsls045.srnb is zero, the record will be converted into %TTtdsls401 with %TFtdsls401.sqnb set to 1 and %TFtdsls401.oltp set to 'Order/Delivery Line'.
If %SFtdsls045.srnb is one or higher, the record will be converted into %TTtdsls401 with %TFtdsls401.sqnb set to sequence number in %SV + 1 and %TFtdsls401.oltp set to 'Back Order'.
For each order line having more than one delivery line (%STtdsls045 records) a total line record will be created in %TTtdsls401 in %TV. The record will get the following characteristics %TFtdsls401.sqnb set to 0 and %TFtdsls401.oltp set to 'Total Line'
On the total line, cumulative data is stored taken from all the back order lines.

The next two conversions apply for each %STtdsls045 record in %SV:
When a delivery is already done for this table (%SFtdsls045.ddat <> 0) then also one record is converted from %STtdsls041 and %STtdsls045 into %TTtdsls406.
If for the Sales order line in %SV the below rules are applicable then also a record is converted into %TTtdsls402 for the sales order line in %TV:
- A purchase order is linked to the sales order line or 
- The sales order line resulted from a sales quotation or 
- A delivery took place on the sales order line or 
- A transport order is linked to the sales order line or
- A planned purchase order present for the order line.

For each record created in %TTtdsls406 also the cost of goods sold records are logged in %TTtdsls409. See also %GTticpr0000

For each delivered lot controlled item the delivered Lot and/or serial information is stored in %TTtcibd410 and %TTtcibd411

---  Migration Parameters  ---
None


---  Migration Mapping Tables  ---
Addresses are retrieved from %STbcstc004
Contacts are retrieved from %STbcstc005
Cost components are retrieved from %STbcstc006
Business Partners are retrieved from %STbcstc008
Aggregated cost components are retrived from %STbcstc010
Exchange Rate type retrieved from %STbcstc011
Project codes are retrieved from %STbcstc016
The sales office is retrieved from %STbcstc018
The sales type is retrieved from %STbcstc020
Series for the price matrix and discount matrix are retrieved from %STbcstd012
Product variant codes are retrieved from %STbcsti001


---  Technical Notes  ---
None


---  Performance  ---
Because %STtdsls041 and %STtdsls045 have often many records it is recommended that the amount of records is reduced as much as possible. Deleting processed sales orders and/or archive these sales orders can do this.



:COMT:END
:TEXT:

:TEXT:END
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:td
:TCMOD:sls
:TFLNO:402
:PRTX:START
g.ret = read.parameters.distribution(g.error.message)
fill.old.session.code.activities.array()
location.controlled.implemented()	|#800-143063.n
g.mc.depth = get.mc.depth()		|#Sp1.n
migrate tdsls045
:PRTX:END
:STAT:V
:VARI:#pragma used dll "otdslsdll0022"		|* Calculate Multi-Level Discount

#include	"itccom0007"		|* Round quantity
#include	"itcmcs0095"		|* Read parameters
#include	"itdsls0014"		|* Deal with order item line status
									|#Sp1.sn
#include 	"ibcswh0011"		|* Handle amount per cost component
									|#Sp1.en

	domain	tcmcs.s200m	g.error.message
	domain	tcsess		g.old.session.code.activities.array(20)
		long		g.ret
	domain	tccprg		g.price.group
	domain	tccuni		g.inventory.unit
	domain	tcbool		g.total.line
	domain	tcdate		g.total.dldt
	domain	tcqsl1		g.total.qoor
	domain	tcqsl1		g.total.qidl
	domain	tcqsl1		g.total.qbbo
	domain	tcamnt		g.total.oamt
	domain	tcamnt		g.total.damt
	domain	tcamnt		g.total.amld
	domain	tcamnt		g.total.amod
	domain	tckitm		g.item.type
	domain	tcbool		g.ilc.implemented				|#800-143063.n
	domain	tcbool		g.create.expected.delivery.line.for.tdilc401
	domain	tcpono		g.outbound.advice.record
		long		g.no.of.outbound.advices.per.sls.sequence
									|#800-143063.n
									|#Sp1.sn
	domain	tcmcs.str14	g.lot.and.serial.set
	domain	tcstva		g.inventory.valuation
	domain	bccost		g.cost.component
		double		g.cogs.amnt(3)
		long		g.mc.depth
									|#Sp1.en
:STBL:tdsls034,tdsls035,tdsls040,tdsls041,tdsls703,tcmcs002,tcmcs039,tcmcs042,tdinv310,tdpur041,tiitm001,tssma102,bcstc005,bcstc006,bcstc008,bcstc011,tdsls045,bcstc018,bcstd000,tccom010,trtcd120,bcsfm001,bcsti001,bcsts005,bcstc030,bcstd001,tdilc401,tdilc000,tdltc004,ticpr300,tipcs350,bcstc010
:COMT:START

---  Changes in table design  ---
%TTtdsls401, %TTtdsls402 and %TTtdsls406 are filled with data mainly coming from %STtdsls041 and %STtdsls045.


---  Source and Target Sessions  ---
Source session:
 %SStdsls4102m000 
Target sessions:
%TStdsls4101m000
%TStdsls4100m900
%TStdsls4102s200
%TStdsls4106m000
%TStdsls4109m000


---  Migration Logic  ---
The data is migrated from %STtdsls041 and %STtdsls045 to the %TV tables according to the following logic:

The next situations are possible in %SV:
1. One entry in %STtdsls041 and one in %STtdsls045.
2. One entry in %STtdsls041 and two or more in %STtdsls045.

Ad. 1: In this case there is only one record converted into %TTtdsls401, with order line type (%TFtdsls401.oltp) equals 'Order/Delivery Line' and the sequence number (%TFtdsls401.sqnb) is 0.

Ad. 2: In this case there are one or more backorder lines created for the order line. In %TTtdsls401 there will be a record created for every record in %STtdsls045. The following basic conversion rules will be applied:
If %SFtdsls045.srnb is zero, the record will be converted into %TTtdsls401 with %TFtdsls401.sqnb set to 1 and %TFtdsls401.oltp set to 'Order/Delivery Line'.
If %SFtdsls045.srnb is one or higher, the record will be converted into %TTtdsls401 with %TFtdsls401.sqnb set to sequence number in %SV + 1 and %TFtdsls401.oltp set to 'Back Order'.
For each order line having more than one delivery line (%STtdsls045 records) a total line record will be created in %TTtdsls401 in %TV. The record will get the following characteristics %TFtdsls401.sqnb set to 0 and %TFtdsls401.oltp set to 'Total Line'
On the total line, cumulative data is stored taken from all the back order lines.

The next two conversions apply for each %STtdsls045 record in %SV:
When a delivery is already done for this table (%SFtdsls045.ddat <> 0) then also one record is converted from %STtdsls041 and %STtdsls045 into %TTtdsls406.
If for the Sales order line in %SV the below rules are applicable then also a record is converted into %TTtdsls402 for the sales order line in %TV:
- A purchase order is linked to the sales order line or 
- The sales order line resulted from a sales quotation or 
- A delivery took place on the sales order line or 
- A transport order is linked to the sales order line or
- A planned purchase order present for the order line.

For each record created in %TTtdsls406 also the cost of goods sold records are logged in %TTtdsls409. See also %GTticpr0000

For each delivered lot controlled item the delivered Lot and/or serial information is stored in %TTtcibd410 and %TTtcibd411

---  Migration Parameters  ---
None


---  Migration Mapping Tables  ---
Addresses are retrieved from %STbcstc004
Contacts are retrieved from %STbcstc005
Cost components are retrieved from %STbcstc006
Business Partners are retrieved from %STbcstc008
Aggregated cost components are retrived from %STbcstc010
Exchange Rate type retrieved from %STbcstc011
Project codes are retrieved from %STbcstc016
The sales office is retrieved from %STbcstc018
The sales type is retrieved from %STbcstc020
Series for the price matrix and discount matrix are retrieved from %STbcstd012
Product variant codes are retrieved from %STbcsti001


---  Technical Notes  ---
None


---  Performance  ---
Because %STtdsls041 and %STtdsls045 have often many records it is recommended that the amount of records is reduced as much as possible. Deleting processed sales orders and/or archive these sales orders can do this.



:COMT:END
:TEXT:

:TEXT:END
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:td
:TCMOD:sls
:TFLNO:406
:PRTX:START
g.ret = read.parameters.distribution(g.error.message)
fill.old.session.code.activities.array()
location.controlled.implemented()	|#800-143063.n
g.mc.depth = get.mc.depth()		|#Sp1.n
migrate tdsls045
:PRTX:END
:STAT:V
:VARI:#pragma used dll "otdslsdll0022"		|* Calculate Multi-Level Discount

#include	"itccom0007"		|* Round quantity
#include	"itcmcs0095"		|* Read parameters
#include	"itdsls0014"		|* Deal with order item line status
									|#Sp1.sn
#include 	"ibcswh0011"		|* Handle amount per cost component
									|#Sp1.en

	domain	tcmcs.s200m	g.error.message
	domain	tcsess		g.old.session.code.activities.array(20)
		long		g.ret
	domain	tccprg		g.price.group
	domain	tccuni		g.inventory.unit
	domain	tcbool		g.total.line
	domain	tcdate		g.total.dldt
	domain	tcqsl1		g.total.qoor
	domain	tcqsl1		g.total.qidl
	domain	tcqsl1		g.total.qbbo
	domain	tcamnt		g.total.oamt
	domain	tcamnt		g.total.damt
	domain	tcamnt		g.total.amld
	domain	tcamnt		g.total.amod
	domain	tckitm		g.item.type
	domain	tcbool		g.ilc.implemented				|#800-143063.n
	domain	tcbool		g.create.expected.delivery.line.for.tdilc401
	domain	tcpono		g.outbound.advice.record
		long		g.no.of.outbound.advices.per.sls.sequence
									|#800-143063.n
									|#Sp1.sn
	domain	tcmcs.str14	g.lot.and.serial.set
	domain	tcstva		g.inventory.valuation
	domain	bccost		g.cost.component
		double		g.cogs.amnt(3)
		long		g.mc.depth
									|#Sp1.en
:STBL:tdsls034,tdsls035,tdsls040,tdsls041,tdsls703,tcmcs002,tcmcs039,tcmcs042,tdinv310,tdpur041,tiitm001,tssma102,bcstc005,bcstc006,bcstc008,bcstc011,tdsls045,bcstc018,bcstd000,tccom010,trtcd120,bcsfm001,bcsti001,bcsts005,bcstc030,bcstd001,tdilc401,tdilc000,tdltc004,ticpr300,tipcs350,bcstc010
:COMT:START

---  Changes in table design  ---
%TTtdsls401, %TTtdsls402 and %TTtdsls406 are filled with data mainly coming from %STtdsls041 and %STtdsls045.


---  Source and Target Sessions  ---
Source session:
 %SStdsls4102m000 
Target sessions:
%TStdsls4101m000
%TStdsls4100m900
%TStdsls4102s200
%TStdsls4106m000
%TStdsls4109m000


---  Migration Logic  ---
The data is migrated from %STtdsls041 and %STtdsls045 to the %TV tables according to the following logic:

The next situations are possible in %SV:
1. One entry in %STtdsls041 and one in %STtdsls045.
2. One entry in %STtdsls041 and two or more in %STtdsls045.

Ad. 1: In this case there is only one record converted into %TTtdsls401, with order line type (%TFtdsls401.oltp) equals 'Order/Delivery Line' and the sequence number (%TFtdsls401.sqnb) is 0.

Ad. 2: In this case there are one or more backorder lines created for the order line. In %TTtdsls401 there will be a record created for every record in %STtdsls045. The following basic conversion rules will be applied:
If %SFtdsls045.srnb is zero, the record will be converted into %TTtdsls401 with %TFtdsls401.sqnb set to 1 and %TFtdsls401.oltp set to 'Order/Delivery Line'.
If %SFtdsls045.srnb is one or higher, the record will be converted into %TTtdsls401 with %TFtdsls401.sqnb set to sequence number in %SV + 1 and %TFtdsls401.oltp set to 'Back Order'.
For each order line having more than one delivery line (%STtdsls045 records) a total line record will be created in %TTtdsls401 in %TV. The record will get the following characteristics %TFtdsls401.sqnb set to 0 and %TFtdsls401.oltp set to 'Total Line'
On the total line, cumulative data is stored taken from all the back order lines.

The next two conversions apply for each %STtdsls045 record in %SV:
When a delivery is already done for this table (%SFtdsls045.ddat <> 0) then also one record is converted from %STtdsls041 and %STtdsls045 into %TTtdsls406.
If for the Sales order line in %SV the below rules are applicable then also a record is converted into %TTtdsls402 for the sales order line in %TV:
- A purchase order is linked to the sales order line or 
- The sales order line resulted from a sales quotation or 
- A delivery took place on the sales order line or 
- A transport order is linked to the sales order line or
- A planned purchase order present for the order line.

For each record created in %TTtdsls406 also the cost of goods sold records are logged in %TTtdsls409. See also %GTticpr0000

For each delivered lot controlled item the delivered Lot and/or serial information is stored in %TTtcibd410 and %TTtcibd411

---  Migration Parameters  ---
None


---  Migration Mapping Tables  ---
Addresses are retrieved from %STbcstc004
Contacts are retrieved from %STbcstc005
Cost components are retrieved from %STbcstc006
Business Partners are retrieved from %STbcstc008
Aggregated cost components are retrived from %STbcstc010
Exchange Rate type retrieved from %STbcstc011
Project codes are retrieved from %STbcstc016
The sales office is retrieved from %STbcstc018
The sales type is retrieved from %STbcstc020
Series for the price matrix and discount matrix are retrieved from %STbcstd012
Product variant codes are retrieved from %STbcsti001


---  Technical Notes  ---
None


---  Performance  ---
Because %STtdsls041 and %STtdsls045 have often many records it is recommended that the amount of records is reduced as much as possible. Deleting processed sales orders and/or archive these sales orders can do this.



:COMT:END
:TEXT:

:TEXT:END
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:td
:TCMOD:sls
:TFLNO:409
:PRTX:START
g.ret = read.parameters.distribution(g.error.message)
fill.old.session.code.activities.array()
location.controlled.implemented()	|#800-143063.n
g.mc.depth = get.mc.depth()		|#Sp1.n
migrate tdsls045
:PRTX:END
:STAT:V
:VARI:#pragma used dll "otdslsdll0022"		|* Calculate Multi-Level Discount

#include	"itccom0007"		|* Round quantity
#include	"itcmcs0095"		|* Read parameters
#include	"itdsls0014"		|* Deal with order item line status
									|#Sp1.sn
#include 	"ibcswh0011"		|* Handle amount per cost component
									|#Sp1.en

	domain	tcmcs.s200m	g.error.message
	domain	tcsess		g.old.session.code.activities.array(20)
		long		g.ret
	domain	tccprg		g.price.group
	domain	tccuni		g.inventory.unit
	domain	tcbool		g.total.line
	domain	tcdate		g.total.dldt
	domain	tcqsl1		g.total.qoor
	domain	tcqsl1		g.total.qidl
	domain	tcqsl1		g.total.qbbo
	domain	tcamnt		g.total.oamt
	domain	tcamnt		g.total.damt
	domain	tcamnt		g.total.amld
	domain	tcamnt		g.total.amod
	domain	tckitm		g.item.type
	domain	tcbool		g.ilc.implemented				|#800-143063.n
	domain	tcbool		g.create.expected.delivery.line.for.tdilc401
	domain	tcpono		g.outbound.advice.record
		long		g.no.of.outbound.advices.per.sls.sequence
									|#800-143063.n
									|#Sp1.sn
	domain	tcmcs.str14	g.lot.and.serial.set
	domain	tcstva		g.inventory.valuation
	domain	bccost		g.cost.component
		double		g.cogs.amnt(3)
		long		g.mc.depth
									|#Sp1.en
:STBL:tdsls034,tdsls035,tdsls040,tdsls041,tdsls703,tcmcs002,tcmcs039,tcmcs042,tdinv310,tdpur041,tiitm001,tssma102,bcstc005,bcstc006,bcstc008,bcstc011,tdsls045,bcstc018,bcstd000,tccom010,trtcd120,bcsfm001,bcsti001,bcsts005,bcstc030,bcstd001,tdilc401,tdilc000,tdltc004,ticpr300,tipcs350,bcstc010
:COMT:START

---  Changes in table design  ---
%TTtdsls401, %TTtdsls402 and %TTtdsls406 are filled with data mainly coming from %STtdsls041 and %STtdsls045.


---  Source and Target Sessions  ---
Source session:
 %SStdsls4102m000 
Target sessions:
%TStdsls4101m000
%TStdsls4100m900
%TStdsls4102s200
%TStdsls4106m000
%TStdsls4109m000


---  Migration Logic  ---
The data is migrated from %STtdsls041 and %STtdsls045 to the %TV tables according to the following logic:

The next situations are possible in %SV:
1. One entry in %STtdsls041 and one in %STtdsls045.
2. One entry in %STtdsls041 and two or more in %STtdsls045.

Ad. 1: In this case there is only one record converted into %TTtdsls401, with order line type (%TFtdsls401.oltp) equals 'Order/Delivery Line' and the sequence number (%TFtdsls401.sqnb) is 0.

Ad. 2: In this case there are one or more backorder lines created for the order line. In %TTtdsls401 there will be a record created for every record in %STtdsls045. The following basic conversion rules will be applied:
If %SFtdsls045.srnb is zero, the record will be converted into %TTtdsls401 with %TFtdsls401.sqnb set to 1 and %TFtdsls401.oltp set to 'Order/Delivery Line'.
If %SFtdsls045.srnb is one or higher, the record will be converted into %TTtdsls401 with %TFtdsls401.sqnb set to sequence number in %SV + 1 and %TFtdsls401.oltp set to 'Back Order'.
For each order line having more than one delivery line (%STtdsls045 records) a total line record will be created in %TTtdsls401 in %TV. The record will get the following characteristics %TFtdsls401.sqnb set to 0 and %TFtdsls401.oltp set to 'Total Line'
On the total line, cumulative data is stored taken from all the back order lines.

The next two conversions apply for each %STtdsls045 record in %SV:
When a delivery is already done for this table (%SFtdsls045.ddat <> 0) then also one record is converted from %STtdsls041 and %STtdsls045 into %TTtdsls406.
If for the Sales order line in %SV the below rules are applicable then also a record is converted into %TTtdsls402 for the sales order line in %TV:
- A purchase order is linked to the sales order line or 
- The sales order line resulted from a sales quotation or 
- A delivery took place on the sales order line or 
- A transport order is linked to the sales order line or
- A planned purchase order present for the order line.

For each record created in %TTtdsls406 also the cost of goods sold records are logged in %TTtdsls409. See also %GTticpr0000

For each delivered lot controlled item the delivered Lot and/or serial information is stored in %TTtcibd410 and %TTtcibd411

---  Migration Parameters  ---
None


---  Migration Mapping Tables  ---
Addresses are retrieved from %STbcstc004
Contacts are retrieved from %STbcstc005
Cost components are retrieved from %STbcstc006
Business Partners are retrieved from %STbcstc008
Aggregated cost components are retrived from %STbcstc010
Exchange Rate type retrieved from %STbcstc011
Project codes are retrieved from %STbcstc016
The sales office is retrieved from %STbcstc018
The sales type is retrieved from %STbcstc020
Series for the price matrix and discount matrix are retrieved from %STbcstd012
Product variant codes are retrieved from %STbcsti001


---  Technical Notes  ---
None


---  Performance  ---
Because %STtdsls041 and %STtdsls045 have often many records it is recommended that the amount of records is reduced as much as possible. Deleting processed sales orders and/or archive these sales orders can do this.



:COMT:END
:TEXT:

:TEXT:END
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:td
:TCMOD:sls
:TFLNO:451
:PRTX:START
g.ret = get.exchange.rate.type("SLS", g.error.mess)
g.ret = get.purchase.sales.type(bcpstp.sales, g.error.mess)
migrate tdsls051
:PRTX:END
:STAT:V
:VARI:#include "itccom0007"	|* Round quantity with given domain and unit rounding method

domain	tcccty		var.tdsls451.ccty	fixed
domain	tccvat		var.tdsls451.cvat	fixed
domain	tcmcs.s200m	g.error.mess
	long		g.ret
:STBL:tdsls051,tiitm001,bcstc018,tdsls050,bcstc011,bcstc020,tipcs021,bcsti001,tdsls704,bcstc005,tcmcs042
:COMT:START



---  Changes in table design  ---
In table %STtdsls051 there are in total 76 fields present whereas in table %TTtdsls451 there are 169 fields present. This is partly as a result of storing sales schedule line history data in this table as well.

Nevertheless there are some fields that are not converted to %TV:
-%SFtdsls051.plev
-%SFtdsls051.dlev
-%SFtdsls051.coop
-%SFtdsls051.stcd
-%SFtdsls051.ttyr
-%SFtdsls051.invr
-%SFtdsls051.txam.l


---  Source and Target Sessions  ---
Source sessions:
%SStdsls5501m000 
%SStdsls5502m000
%SStdsls5503m000
%SStdsls5504m000
%SStdsls5507m000
%SStdsls7504m000

Target session:
%TStdsls4551m000


---  Migration Logic  ---
Each record present in %STtdsls051 is converted unconditionally into %TTtdsls451.

In %TTtdsls451 a lot more fields are present compared to %STtdsls051 and as a result many of these fields will be left empty or will be filled with an initial value. Some fields can be filled with existing source data, however, as this will have a negative impact on the performance of the conversion process, these fields can optionally be filled by means of a post conversion session.

These fields are:
%TFtdsls451.ccfg
%TFtdsls451.amld
%TFtdsls451.amod
%TFtdsls451.bqco
%TFtdsls451.lseq
%TFtdsls451.oltp
%TFtdsls451.opri
%TFtdsls451.oseq
%TFtdsls451.ccof

See also %GTtcgen0001

For filling target fields %TFtdsls451.ccof and %TFtdsls451.scon, data is retrived from %STtdsls050. The corresponding sales order header is determined based on the time stamp fields (%SFtdsls051.trdt and %SFtdsls051.trtm).


---  Migration Parameters  ---
Migration parameter %SFbcstc000.mmnu is used for converting the sales order number into the desired format in %TV.


---  Migration Mapping Tables  ---
Migration mapping table %STbcstc004 is used for retrieving the user-defined addresses.

Migration mapping table %STbcstc008 is used for retrieving the user defined business partners.

Migration mapping table %STbcstc011 is used for retrieving the user defined exchange rate type for conversion base rate type 'SLS'.

Migration mapping table %STbcstc016 is used for retrieving the user defined project codes.

Migration mapping table %STbcstc018 is used for retrieving the user defined sales contract office for the generated enterprise units for the financial companies in %SV.

Migration mapping table %STbcstc020 is used for retrieving the user defined sales type.

Migration mapping table %STbcstd012 is used for retrieving the user defined series per matrix definition type, based on which number series are composed.

Migration mapping table %STbcsti001 is used for retrieving the converted new product variant code.


---  Technical Notes  ---



---  Performance  ---

:COMT:END
:TEXT:

:TEXT:END
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tf
:TCMOD:cat
:TFLNO:000
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tf
:TCMOD:cat
:TFLNO:004
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tf
:TCMOD:cat
:TFLNO:210
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tf
:TCMOD:cat
:TFLNO:211
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tf
:TCMOD:cat
:TFLNO:220
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tf
:TCMOD:cat
:TFLNO:221
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tf
:TCMOD:cat
:TFLNO:240
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tf
:TCMOD:cat
:TFLNO:400
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tf
:TCMOD:cat
:TFLNO:412
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tf
:TCMOD:fbs
:TFLNO:000
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tf
:TCMOD:fbs
:TFLNO:003
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tf
:TCMOD:fbs
:TFLNO:005
:PRTX:START


migrate tffbs101
:PRTX:END
:STAT:V
:VARI:domain tfgld.year var.tffbs005.cbyr, var.tffbs005.pbyr, var.tffbs005.dbyr
:STBL:tffbs101,tffbs003,ctcat016
:COMT:START


---  Changes in table design  ---
This is a new table in %TV which gets data from %STtffbs101 and   %SVtffbs003 of    %SV.

Refer to the following document for more details:

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 : %SStffbs1101m000, %SSctcat1110m000
Target Session : %TStffbs0505m000

---  Migration Logic  ---

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



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:



:TEXT:END
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tf
:TCMOD:fbs
:TFLNO:010
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tf
:TCMOD:fbs
:TFLNO:011
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tf
:TCMOD:fbs
:TFLNO:012
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tf
:TCMOD:fbs
:TFLNO:020
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tf
:TCMOD:fbs
:TFLNO:021
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tf
:TCMOD:fbs
:TFLNO:030
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tf
:TCMOD:fbs
:TFLNO:040
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tf
:TCMOD:fbs
:TFLNO:041
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tf
:TCMOD:fbs
:TFLNO:042
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tf
:TCMOD:fbs
:TFLNO:100
: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
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tf
:TCMOD:fbs
:TFLNO:101
: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
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tf
:TCMOD:fbs
:TFLNO:110
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tf
:TCMOD:fbs
:TFLNO:111
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tf
:TCMOD:fbs
:TFLNO:120
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tf
:TCMOD:fbs
:TFLNO:121
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tf
:TCMOD:fbs
:TFLNO:130
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:tf
:TCMOD:fbs
:TFLNO:131
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:ti
:TCMOD:cpr
:TFLNO:000
:PRTX:START
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
:STBL:ticpr000
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:ti
:TCMOD:cpr
:TFLNO:099
: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	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
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:ti
:TCMOD:cpr
:TFLNO:110
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:ti
:TCMOD:cpr
:TFLNO:150
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:ti
:TCMOD:cpr
:TFLNO:200
: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	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
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:ti
:TCMOD:cpr
:TFLNO:201
: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	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
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:ti
:TCMOD:cpr
:TFLNO:205
: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	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
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:ti
:TCMOD:cpr
:TFLNO:206
: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	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
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:ti
:TCMOD:cpr
:TFLNO:220
: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:M
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:ti
:TCMOD:cpr
:TFLNO:240
: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	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
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:ti
:TCMOD:cpr
:TFLNO:300
: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	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
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:ti
:TCMOD:cpr
:TFLNO:301
: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	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
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:ti
:TCMOD:cpr
:TFLNO:305
: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	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
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:ti
:TCMOD:cpr
:TFLNO:306
: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	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
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:ti
:TCMOD:cpr
:TFLNO:320
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:ti
:TCMOD:cpr
:TFLNO:340
: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	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
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:ti
:TCMOD:pcs
:TFLNO:000
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:ti
:TCMOD:pcs
:TFLNO:320
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:ti
:TCMOD:pcs
:TFLNO:350
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:ti
:TCMOD:pcs
:TFLNO:360
: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
False
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:wh
:TCMOD:ina
:TFLNO:112
:PRTX:START

read.parameters.common(o.mess)
read.parameter("tdinv000", o.mess)

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

alloc.mem(arr.whina112.trdt, 22, array.len)
alloc.mem(arr.whina112.seqn, array.len)
alloc.mem(arr.whina112.qskt, array.len)

i = 0
migrate tdinv700

set.mem(arr.whina112.trdt,"")
set.mem(arr.whina112.seqn,0)
set.mem(arr.whina112.qskt,0.0)

hold.cprj = ""
hold.item = ""
								|#800-142000.sn
check1.trdt = 0
check2.trdt = 0
check2.item = ""
check2.cwar = ""
								|#800-142000.en
i = 0

migrate tipcs700

free.mem(arr.whina112.trdt)
free.mem(arr.whina112.seqn)
free.mem(arr.whina112.qskt)
:PRTX:END
:STAT:V
:VARI:#include "ibcswh0011"			|#CNT.n
long	g.mc.depth

long	i
long	itid
long	prev.sern
long	array.len
long	hold.tdinv700.trdt


long		dummy.array.nr
long		receipt.counter

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)

							| #  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

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

double	var.whina112.qskt
double	var.whina112.qstk

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	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
:STBL:tcmcs003,tdinv700,tipcs700,tipcs021,bcstc008,tiitm001,bcswh004,ticpr300,bcstc000,tdinv001,tipcs350,tdilc102,tdinv100,tdilc000,tdinv000,tdsls045,tdrpl100
: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
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:wh
:TCMOD:ina
:TFLNO:113
:PRTX:START

read.parameters.common(o.mess)
read.parameter("tdinv000", o.mess)

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

alloc.mem(arr.whina112.trdt, 22, array.len)
alloc.mem(arr.whina112.seqn, array.len)
alloc.mem(arr.whina112.qskt, array.len)

i = 0
migrate tdinv700

set.mem(arr.whina112.trdt,"")
set.mem(arr.whina112.seqn,0)
set.mem(arr.whina112.qskt,0.0)

hold.cprj = ""
hold.item = ""
								|#800-142000.sn
check1.trdt = 0
check2.trdt = 0
check2.item = ""
check2.cwar = ""
								|#800-142000.en
i = 0

migrate tipcs700

free.mem(arr.whina112.trdt)
free.mem(arr.whina112.seqn)
free.mem(arr.whina112.qskt)
:PRTX:END
:STAT:V
:VARI:#include "ibcswh0011"			|#CNT.n
long	g.mc.depth

long	i
long	itid
long	prev.sern
long	array.len
long	hold.tdinv700.trdt


long		dummy.array.nr
long		receipt.counter

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)

							| #  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

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

double	var.whina112.qskt
double	var.whina112.qstk

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	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
:STBL:tcmcs003,tdinv700,tipcs700,tipcs021,bcstc008,tiitm001,bcswh004,ticpr300,bcstc000,tdinv001,tipcs350,tdilc102,tdinv100,tdilc000,tdinv000,tdsls045,tdrpl100
: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
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:wh
:TCMOD:ina
:TFLNO:114
:PRTX:START

read.parameters.common(o.mess)
read.parameter("tdinv000", o.mess)

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

alloc.mem(arr.whina112.trdt, 22, array.len)
alloc.mem(arr.whina112.seqn, array.len)
alloc.mem(arr.whina112.qskt, array.len)

i = 0
migrate tdinv700

set.mem(arr.whina112.trdt,"")
set.mem(arr.whina112.seqn,0)
set.mem(arr.whina112.qskt,0.0)

hold.cprj = ""
hold.item = ""
								|#800-142000.sn
check1.trdt = 0
check2.trdt = 0
check2.item = ""
check2.cwar = ""
								|#800-142000.en
i = 0

migrate tipcs700

free.mem(arr.whina112.trdt)
free.mem(arr.whina112.seqn)
free.mem(arr.whina112.qskt)
:PRTX:END
:STAT:V
:VARI:#include "ibcswh0011"			|#CNT.n
long	g.mc.depth

long	i
long	itid
long	prev.sern
long	array.len
long	hold.tdinv700.trdt


long		dummy.array.nr
long		receipt.counter

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)

							| #  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

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

double	var.whina112.qskt
double	var.whina112.qstk

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	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
:STBL:tcmcs003,tdinv700,tipcs700,tipcs021,bcstc008,tiitm001,bcswh004,ticpr300,bcstc000,tdinv001,tipcs350,tdilc102,tdinv100,tdilc000,tdinv000,tdsls045,tdrpl100
: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
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:wh
:TCMOD:ina
:TFLNO:115
:PRTX:START

read.parameters.common(o.mess)
read.parameter("tdinv000", o.mess)

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

alloc.mem(arr.whina112.trdt, 22, array.len)
alloc.mem(arr.whina112.seqn, array.len)
alloc.mem(arr.whina112.qskt, array.len)

i = 0
migrate tdinv700

set.mem(arr.whina112.trdt,"")
set.mem(arr.whina112.seqn,0)
set.mem(arr.whina112.qskt,0.0)

hold.cprj = ""
hold.item = ""
								|#800-142000.sn
check1.trdt = 0
check2.trdt = 0
check2.item = ""
check2.cwar = ""
								|#800-142000.en
i = 0

migrate tipcs700

free.mem(arr.whina112.trdt)
free.mem(arr.whina112.seqn)
free.mem(arr.whina112.qskt)
:PRTX:END
:STAT:V
:VARI:#include "ibcswh0011"			|#CNT.n
long	g.mc.depth

long	i
long	itid
long	prev.sern
long	array.len
long	hold.tdinv700.trdt


long		dummy.array.nr
long		receipt.counter

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)

							| #  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

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

double	var.whina112.qskt
double	var.whina112.qstk

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	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
:STBL:tcmcs003,tdinv700,tipcs700,tipcs021,bcstc008,tiitm001,bcswh004,ticpr300,bcstc000,tdinv001,tipcs350,tdilc102,tdinv100,tdilc000,tdinv000,tdsls045,tdrpl100
: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
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:wh
:TCMOD:ina
:TFLNO:120
:PRTX:START

read.parameters.common(o.mess)
read.parameter("tdinv000", o.mess)

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

alloc.mem(arr.whina112.trdt, 22, array.len)
alloc.mem(arr.whina112.seqn, array.len)
alloc.mem(arr.whina112.qskt, array.len)

i = 0
migrate tdinv700

set.mem(arr.whina112.trdt,"")
set.mem(arr.whina112.seqn,0)
set.mem(arr.whina112.qskt,0.0)

hold.cprj = ""
hold.item = ""
								|#800-142000.sn
check1.trdt = 0
check2.trdt = 0
check2.item = ""
check2.cwar = ""
								|#800-142000.en
i = 0

migrate tipcs700

free.mem(arr.whina112.trdt)
free.mem(arr.whina112.seqn)
free.mem(arr.whina112.qskt)
:PRTX:END
:STAT:V
:VARI:#include "ibcswh0011"			|#CNT.n
long	g.mc.depth

long	i
long	itid
long	prev.sern
long	array.len
long	hold.tdinv700.trdt


long		dummy.array.nr
long		receipt.counter

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)

							| #  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

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

double	var.whina112.qskt
double	var.whina112.qstk

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	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
:STBL:tcmcs003,tdinv700,tipcs700,tipcs021,bcstc008,tiitm001,bcswh004,ticpr300,bcstc000,tdinv001,tipcs350,tdilc102,tdinv100,tdilc000,tdinv000,tdsls045,tdrpl100
:COMT:START




:COMT:END
:TEXT:


:TEXT:END
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:wh
:TCMOD:ina
:TFLNO:121
:PRTX:START

read.parameters.common(o.mess)
read.parameter("tdinv000", o.mess)

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

alloc.mem(arr.whina112.trdt, 22, array.len)
alloc.mem(arr.whina112.seqn, array.len)
alloc.mem(arr.whina112.qskt, array.len)

i = 0
migrate tdinv700

set.mem(arr.whina112.trdt,"")
set.mem(arr.whina112.seqn,0)
set.mem(arr.whina112.qskt,0.0)

hold.cprj = ""
hold.item = ""
								|#800-142000.sn
check1.trdt = 0
check2.trdt = 0
check2.item = ""
check2.cwar = ""
								|#800-142000.en
i = 0

migrate tipcs700

free.mem(arr.whina112.trdt)
free.mem(arr.whina112.seqn)
free.mem(arr.whina112.qskt)
:PRTX:END
:STAT:V
:VARI:#include "ibcswh0011"			|#CNT.n
long	g.mc.depth

long	i
long	itid
long	prev.sern
long	array.len
long	hold.tdinv700.trdt


long		dummy.array.nr
long		receipt.counter

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)

							| #  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

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

double	var.whina112.qskt
double	var.whina112.qstk

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	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
:STBL:tcmcs003,tdinv700,tipcs700,tipcs021,bcstc008,tiitm001,bcswh004,ticpr300,bcstc000,tdinv001,tipcs350,tdilc102,tdinv100,tdilc000,tdinv000,tdsls045,tdrpl100
:COMT:START




:COMT:END
:TEXT:


:TEXT:END
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:wh
:TCMOD:inr
:TFLNO:110
:PRTX:START

read.parameters.common(o.mess)
read.parameter("tdinv000", o.mess)

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

alloc.mem(arr.whina112.trdt, 22, array.len)
alloc.mem(arr.whina112.seqn, array.len)
alloc.mem(arr.whina112.qskt, array.len)

i = 0
migrate tdinv700

set.mem(arr.whina112.trdt,"")
set.mem(arr.whina112.seqn,0)
set.mem(arr.whina112.qskt,0.0)

hold.cprj = ""
hold.item = ""
								|#800-142000.sn
check1.trdt = 0
check2.trdt = 0
check2.item = ""
check2.cwar = ""
								|#800-142000.en
i = 0

migrate tipcs700

free.mem(arr.whina112.trdt)
free.mem(arr.whina112.seqn)
free.mem(arr.whina112.qskt)
:PRTX:END
:STAT:V
:VARI:#include "ibcswh0011"			|#CNT.n
long	g.mc.depth

long	i
long	itid
long	prev.sern
long	array.len
long	hold.tdinv700.trdt


long		dummy.array.nr
long		receipt.counter

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)

							| #  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

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

double	var.whina112.qskt
double	var.whina112.qstk

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	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
:STBL:tcmcs003,tdinv700,tipcs700,tipcs021,bcstc008,tiitm001,bcswh004,ticpr300,bcstc000,tdinv001,tipcs350,tdilc102,tdinv100,tdilc000,tdinv000,tdsls045,tdrpl100
: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
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:wh
:TCMOD:ltc
:TFLNO:100
: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	tccprj		project.code
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)

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)	
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	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
:COMT:START



---  Changes in table design  ---

%GTtdltc0000
%GTticpr0000

---  Source and Target Sessions  ---

Source session: %SStdltc0101m000
Target session: %TSwhltc1100m000


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


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:wh
:TCMOD:ltc
:TFLNO:101
: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	tccprj		project.code
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)

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)	
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	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
:COMT:START



---  Changes in table design  ---

%GTtdltc0000
%GTticpr0000

---  Source and Target Sessions  ---

Source session: %SStdltc0507m000
Target session: %TSwhltc1501m000


---  Migration Logic  ---
Migration will be carried out for lot-controlled items with %SFtiitm001.stva on Lot Price.
For each record in the table %STtdltc004 the following checks will be done:
1. For normal items:
- convert Baan IV %SFtdltc004.cpcp with origin Manufacturing to the iBaanERP6.0a %TFtcmcs048.cpcp using mapping table %STbcstc006. 
- if cost component chart %SFbcsti007.chrt is linked to the combination %SFtiitm001.kitm / %SFtiitm001.citg and converted cost component is present in the mapping table %STbcsti008 for this chart then dump record with converted cost component to the table %TTwhltc101.
- if iBaanERP6.0a cost component is not present in the table %STbcsti008 then determine a type of the original component: %SFticpr010.cref and depend on this type add %SFtdltc004.pric to one of the aggregated components:
%SFbcstc010.matc or %SFbcstc010.oprc or %SFbcstc010.surc.
- dump records for each aggregated cost component.    
2. For customized items:
- convert Baan IV %SFtdltc004.cpcp with origin Project to the iBaanERP6.0a %TFtcmcs048.cpcp using mapping table %STbcstc006. 
- follow the same procedure as for normal item.

---  Migration Parameters  ---



---  Migration Mapping Tables  ---
%STbcstc000
%STbcstc006
%STbcstc008
%STbcstc010
%STbcsti006
%STbcsti007
%STbcsti008

---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:wh
:TCMOD:ltc
:TFLNO:105
: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	tccprj		project.code
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)

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)	
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	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
:COMT:START



---  Changes in table design  ---


---  Source and Target Sessions  ---

Source session: %SStdilc1505m000
Target session: %TSwhltc1505m000


---  Migration Logic  ---
In case of lot-controlled item (see technical design for the table %TTwhltc100) records from the table %STtdilc101 will be migrated to the table %TTwhltc105.


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---




:COMT:END
:TEXT:


:TEXT:END
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:wh
:TCMOD:ltc
:TFLNO:500
: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	tccprj		project.code
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)

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)	
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	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
:COMT:START



---  Changes in table design  ---

---  Source and Target Sessions  ---

Source session: %SStdilc1506s000
Target session: %TSwhltc5100m000


---  Migration Logic  ---
All records from the table %STtdltc001 will be migrated to the table %TTwhltc500 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 Unit or
- record in %STtdltc001 contains a customized item (%SFtdltc001.cprj is not empty) and field %SFtipcs021.kltc in the table %STtipcs021 has a value Unit.


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:wh
:TCMOD:wmd
:TFLNO:210
:PRTX:START

migrate tdinv001
:PRTX:END
:STAT:V
:VARI:#include "ibcswh0011"			|#CNT.n
long	var.whwmd210.nopr
long	var.whwmd210.ptyp
double	var.whwmd210.sftm
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
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
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	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
:STBL:tcmcs003,tdinv001,ticpr300,tipcs021,tipcs350,tiitm001,tipcs000,tdilc000,tdilc101,tdilc111,tppdm605,bcstc000,tipcs020,tdilc401,tdinv000
: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
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:wh
:TCMOD:wmd
:TFLNO:215
:PRTX:START

migrate tdinv001
:PRTX:END
:STAT:V
:VARI:#include "ibcswh0011"			|#CNT.n
long	var.whwmd210.nopr
long	var.whwmd210.ptyp
double	var.whwmd210.sftm
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
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
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	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
:STBL:tcmcs003,tdinv001,ticpr300,tipcs021,tipcs350,tiitm001,tipcs000,tdilc000,tdilc101,tdilc111,tppdm605,bcstc000,tipcs020,tdilc401,tdinv000
: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
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:wh
:TCMOD:wmd
:TFLNO:216
:PRTX:START

migrate tdinv001
:PRTX:END
:STAT:V
:VARI:#include "ibcswh0011"			|#CNT.n
long	var.whwmd210.nopr
long	var.whwmd210.ptyp
double	var.whwmd210.sftm
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
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
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	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
:STBL:tcmcs003,tdinv001,ticpr300,tipcs021,tipcs350,tiitm001,tipcs000,tdilc000,tdilc101,tdilc111,tppdm605,bcstc000,tipcs020,tdilc401,tdinv000
: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
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:wh
:TCMOD:wmd
:TFLNO:217
:PRTX:START

migrate tdinv001
:PRTX:END
:STAT:V
:VARI:#include "ibcswh0011"			|#CNT.n
long	var.whwmd210.nopr
long	var.whwmd210.ptyp
double	var.whwmd210.sftm
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
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
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	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
:STBL:tcmcs003,tdinv001,ticpr300,tipcs021,tipcs350,tiitm001,tipcs000,tdilc000,tdilc101,tdilc111,tppdm605,bcstc000,tipcs020,tdilc401,tdinv000
: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
True
MO
:MPRF:19
:VERS:B40U
:RELE:c4
:CUST:cont
:TCPAC:wh
:TCMOD:wmd
:TFLNO:255
:PRTX:START

read.parameters.common(o.mess)
read.parameter("tdinv000", o.mess)

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

alloc.mem(arr.whina112.trdt, 22, array.len)
alloc.mem(arr.whina112.seqn, array.len)
alloc.mem(arr.whina112.qskt, array.len)

i = 0
migrate tdinv700

set.mem(arr.whina112.trdt,"")
set.mem(arr.whina112.seqn,0)
set.mem(arr.whina112.qskt,0.0)

hold.cprj = ""
hold.item = ""
								|#800-142000.sn
check1.trdt = 0
check2.trdt = 0
check2.item = ""
check2.cwar = ""
								|#800-142000.en
i = 0

migrate tipcs700

free.mem(arr.whina112.trdt)
free.mem(arr.whina112.seqn)
free.mem(arr.whina112.qskt)
:PRTX:END
:STAT:V
:VARI:#include "ibcswh0011"			|#CNT.n
long	g.mc.depth

long	i
long	itid
long	prev.sern
long	array.len
long	hold.tdinv700.trdt


long		dummy.array.nr
long		receipt.counter

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)

							| #  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

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

double	var.whina112.qskt
double	var.whina112.qstk

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	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
:STBL:tcmcs003,tdinv700,tipcs700,tipcs021,bcstc008,tiitm001,bcswh004,ticpr300,bcstc000,tdinv001,tipcs350,tdilc102,tdinv100,tdilc000,tdinv000,tdsls045,tdrpl100
:COMT:START




:COMT:END
:TEXT:


:TEXT:END
True
