MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:fm
:TCMOD:fmd
:TFLNO:010
:PRTX:START
#pragma used dll "otiitmdll0003"
#pragma used dll "obcstcdll0004"

tcmcs0095.read.parm("tccom999")

g.conv.factor = 1.0

if tccom999.trtr = tcyesno.yes then
	if read.parameter("trtcd000", o.mess) then
		return
	endif

	if trtcd000.cutm <> trtcd000.cuhr  and
	   not isspace(trtcd000.cutm) and
	   not isspace(trtcd000.cuhr) then
		l.conv.cutm = tiitm.dll0003.read.conv.with.physical.quantity(
					trtcd000.cutm,
					tctccu.time)
		l.conv.cuhr = tiitm.dll0003.read.conv.with.physical.quantity(
					trtcd000.cuhr,
					tctccu.time)

		g.conv.factor = l.conv.cutm / l.conv.cuhr
	endif
endif

|var.tccom139.idnr = 0					|#City.so
|var.prev.country = ""
|var.prev.city.code = ""					|#City.eo
var.date = date.num()					|#FP3.n

migrate bcstc004
:PRTX:END
:STAT:M
:VARI:|string			var.tccom139.seak(16)	mb		|#City.o
|long			var.tccom139.idnr			|#City.o
domain	bcstc.desc	var.tccom130.dsca			|#City.n
string			var.tccom130.lvdt(22)
string			var.tccom130.nama(35)
domain	tcmcs.st10	var.tccom130.hono
domain	tcmcs.st10	var.tccom130.pobn
domain	tcnamb		g.tccom130.pobn
|domain	tcccty		var.prev.country			|#City.o
|domain	bcstc.city	var.prev.city.code			|#City.o
domain	tccreg		var.fmfmd010.creg
domain	trtop.time	var.fmfmd010.lwtm
domain	trtop.time	var.fmfmd010.ldtm
domain	trtop.time	var.fmfmd010.uwtm
domain	trtop.time	var.fmfmd010.untm
domain	tcconv		l.conv.cutm
domain	tcconv		l.conv.cuhr
domain	tcconv		g.conv.factor
string			o.mess(1)
	long		var.date				|#FP3.n

#include	"itcmcs0095"
:STBL:bcstc004,trtcd000,tccom999,bcstc031
:COMT:START


---  Changes in table design  ---



---  Source and Target Sessions  ---



---  Migration Logic  ---
tccom130 is filled from the intermediate table bcstc004. The table bcstc004 is filled with records when the 'Generate Addresses' (bcstc0104m000) is run as a preconversion session. Record is inserted in bcstc004 from the source table "tccom000" and the corresponding company number. The 'cste' value is also filled for that record from tccom000. When bcstc004 is dumped into tccom130, automatically we have the corresponding record in the target side with the 'tccom000.cste' from source into tccom130.cste.


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:

:TEXT:END
True
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tc
:TCMOD:com
:TFLNO:100
:PRTX:START
hold.cmpnr = compnr
var.utc0 = utc(0, 0)
var.date = date.num()					|#FP3.n
bp.code.depth = 0					|#800-141749.n

define.length.and.search.def()

select 	bcstc011.* 
from	bcstc011
where	bcstc011.brtp in ("SLS", "PUR") 
selectdo 
	 if (bcstc011.brtp = "SLS") then 
		var.tccom112.rtyp = bcstc011.rtyp 
	 else 
		var.tccom12x.rtyp = bcstc011.rtyp
	 endif 
endselect 

read.parameters.common(o.mess)

read.parameter("tdsls000", o.mess)
read.parameter("tdpst000", o.mess)
read.parameter("tdpur000", o.mess)
read.parameter("tccom000", o.mess)  
read.parameter("tccom999", o.mess)			|#800-142060.sn

if tccom999.trtr = tcyesno.yes then
	var.tccom110.frin = tcyesno.yes
else
	var.tccom110.frin = tcyesno.no
endif							|#800-142060.en

var.tccom100.ccur =  get.home.currency.orig.comp()  
|#800-141596.sn
|* Parent business partner should always be filled with the business
|* partner, which is defined in bcstc000 (Default Parent Business Partner).
|* Retrieve business partner from customer or supplier or factoring company.
|get.business.partner(	bcstc000.scad,		|#200003.so
|			bcstc000.orgn,
|			o.mess)
|var.tccom100.prbp = bcstc008.bpid		|#200003.eo
|create.default.parent.bp(var.tccom100.prbp)	|#200003.n	|#FP3.o
create.default.parent.bp(hold.tccom100.prbp)	|#200003.n	|#FP3.sn
|* One-Time BP should not get a Parent BP filled.		|#FP3.en
|#800-141596.en

						|#FP3.sn
var.tccom100.bprl = 1	|* 1	No roles defined
			|* 2	Customer
			|* 3	Supplier		|#FP3.en
migrate   tcmcs025

var.tccom100.bprl = 2	|* 2	Customer	|#FP3.n
migrate   tccom010

var.tccom100.bprl = 3	|* 3	Supplier 	|#FP3.n
migrate   tccom020

|* Can also be: Both (Customer & Supplier).	|#FP3.sn
|* However, then the BP is already dumped as a 'Customer', which cannot be updated.
|* This can be corrected in Post migration session bcttc0201, with option Correct 'CP Role' checked.
:PRTX:END
:STAT:M
:VARI:#define	MEMORY_ALLOCATION_SIZE	10000				|#800-141749.n

|#201931.sn
	string		hold.tccom100.bpid(9)	|* For cuno and suno 
domain  bccadr		hold.tccom010.cadr 
domain	bccadr		hold.tccom111.cadr 
domain	bccnv.ccnt 	hold.tccom110.ccnt 
|#201931.en

domain		tcncmp hold.cmpnr 
domain		bccnv.fent  var.tccom110.cofc 
domain		bccnv.fent  var.tccom120.cofc
long		link.to.sub 

string		var.tccom100.bpid(9)	|* For cuno and suno 
string		temp.key.ccor(9) 
string		temp.key.cdel(9) 
string		var.tccom110.bppr(9)
string		o.mess(1)
string		var.utc0(23)
 
domain  bccadr		var.tccom010.cadr 
domain  bccadr		var.tccom020.cadr 
domain	bccadr		var.tccom100.cadr
domain	bccadr		var.tccom110.cadr 
domain	bccadr		var.tccom111.cadr 
domain	bccadr		var.tccom120.cadr

string	var.tccom112.rtyp(3)
string	var.tccom12x.rtyp(3)	|* used for tccom122.rtyp and tccom124.rtyp


domain	tcyesno	var.tccom100.sndr 
long	var.tccom100.prst
domain	tcyesno	var.tccom100.edyn
domain	tcyesno	var.tccom100.inrl
domain	tcccur	var.tccom100.ccur
domain	tcnama	var.tccom100.nama
domain	tcseak	var.tccom100.seak

domain tcyesno	var.tccom110.frin		|#800-142060.n
  
domain	bccnv.ccnt	hold.ccnt
domain	bccnv.ccnt 	var.tccom110.ccnt 
domain	bccnv.ccnt 	var.tccom112.ccnt 
domain	bccnv.ccnt 	var.tccom120.ccnt 
domain	bccnv.ccnt 	var.tccom122.ccnt 

long	var.tccom110.scon
 
long	var.tccom112.itst
string	var.tccom112.cinm(3)
 
domain	bccom.bpid	var.tccom120.scus
domain	bcstc.bpid 	var.tccom100.bptx

long	var.tccom100.bpst
long	var.tccom111.bpst
long	var.tccom114.bpst 
long	var.tccom120.bpst
long	var.tccom121.bpst
long	var.tccom122.bpst
long	var.tccom124.bpst

domain	tcyesno	var.tccom112.cvyn
domain	tcyesno	var.tccom122.cvyn
string	var.tccom122.ptbp(9)				|#800-141749.n

static	long		bp.code.depth			|#800-141749.sn
	long		sorted.bp.code.def(1, 4)
	long		bp.code.length
domain  bcstc.bpid	bp.code.list(1)	based		|#800-141749.en

domain	tccuno		converted.cuno
|#800-141596.sn
domain	bcstc.bpid	var.tccom100.prbp
|#800-141596.en
domain	bcstc.bpid	hold.tccom100.prbp			|#FP3.n

domain	bcstc.bpid	var.tccom112.pfbp		|#148806.n
						|#FBU.sn
string var.mstm(3)
string var.docm(3)
domain tcmcs.s200m	var.err.mess

						|#FBU.en

	long		var.tccom100.bprl		|#FP3.sn
	long		var.date			|#FP3.en
:STBL:tccom010,tccom020,tirou001,bcstc011,bcstc008,bcstc000,bcstc004,bcstc005,bcstc018,tdsls000,tdpst000,tcmcs025,tccom000,tccom999,tdpur040,tdpur300,tfacp262,tfacp316,tccom013
:COMT:START



---  Changes in table design  ---

In the %SV there are separate tables for customers, suppliers and factoring companies.
In the %TV there is 1 business partner table (%TTtccom100) with 8 related tables containing role specific information. These roles are:

Customer Roles:
- sold-to       (%TTtccom110)
- ship-to       (%TTtccom111)
- invoice-to   (%TTtccom112)
- pay-by       (%TTtccom114)

Supplier Roles:
- buy-from     (%TTtccom120)
- ship-from     (%TTtccom121)
- invoice-from (%TTtccom122)
- pay-to        (%TTtccom124)



---  Source and Target Sessions  ---
Source session: %SStccom1101m000
Source session: %SStccom2101m000
Source session: %SStcmcs0125m000
Target session: %TStccom4500m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---
The business partner is retrieved based on the mapping table %STbcstc008.


---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:

:TEXT:END
True
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tc
:TCMOD:com
:TFLNO:110
:PRTX:START
hold.cmpnr = compnr
var.utc0 = utc(0, 0)
var.date = date.num()					|#FP3.n
bp.code.depth = 0					|#800-141749.n

define.length.and.search.def()

select 	bcstc011.* 
from	bcstc011
where	bcstc011.brtp in ("SLS", "PUR") 
selectdo 
	 if (bcstc011.brtp = "SLS") then 
		var.tccom112.rtyp = bcstc011.rtyp 
	 else 
		var.tccom12x.rtyp = bcstc011.rtyp
	 endif 
endselect 

read.parameters.common(o.mess)

read.parameter("tdsls000", o.mess)
read.parameter("tdpst000", o.mess)
read.parameter("tdpur000", o.mess)
read.parameter("tccom000", o.mess)  
read.parameter("tccom999", o.mess)			|#800-142060.sn

if tccom999.trtr = tcyesno.yes then
	var.tccom110.frin = tcyesno.yes
else
	var.tccom110.frin = tcyesno.no
endif							|#800-142060.en

var.tccom100.ccur =  get.home.currency.orig.comp()  
|#800-141596.sn
|* Parent business partner should always be filled with the business
|* partner, which is defined in bcstc000 (Default Parent Business Partner).
|* Retrieve business partner from customer or supplier or factoring company.
|get.business.partner(	bcstc000.scad,		|#200003.so
|			bcstc000.orgn,
|			o.mess)
|var.tccom100.prbp = bcstc008.bpid		|#200003.eo
|create.default.parent.bp(var.tccom100.prbp)	|#200003.n	|#FP3.o
create.default.parent.bp(hold.tccom100.prbp)	|#200003.n	|#FP3.sn
|* One-Time BP should not get a Parent BP filled.		|#FP3.en
|#800-141596.en

						|#FP3.sn
var.tccom100.bprl = 1	|* 1	No roles defined
			|* 2	Customer
			|* 3	Supplier		|#FP3.en
migrate   tcmcs025

var.tccom100.bprl = 2	|* 2	Customer	|#FP3.n
migrate   tccom010

var.tccom100.bprl = 3	|* 3	Supplier 	|#FP3.n
migrate   tccom020

|* Can also be: Both (Customer & Supplier).	|#FP3.sn
|* However, then the BP is already dumped as a 'Customer', which cannot be updated.
|* This can be corrected in Post migration session bcttc0201, with option Correct 'CP Role' checked.
:PRTX:END
:STAT:M
:VARI:#define	MEMORY_ALLOCATION_SIZE	10000				|#800-141749.n

|#201931.sn
	string		hold.tccom100.bpid(9)	|* For cuno and suno 
domain  bccadr		hold.tccom010.cadr 
domain	bccadr		hold.tccom111.cadr 
domain	bccnv.ccnt 	hold.tccom110.ccnt 
|#201931.en

domain		tcncmp hold.cmpnr 
domain		bccnv.fent  var.tccom110.cofc 
domain		bccnv.fent  var.tccom120.cofc
long		link.to.sub 

string		var.tccom100.bpid(9)	|* For cuno and suno 
string		temp.key.ccor(9) 
string		temp.key.cdel(9) 
string		var.tccom110.bppr(9)
string		o.mess(1)
string		var.utc0(23)
 
domain  bccadr		var.tccom010.cadr 
domain  bccadr		var.tccom020.cadr 
domain	bccadr		var.tccom100.cadr
domain	bccadr		var.tccom110.cadr 
domain	bccadr		var.tccom111.cadr 
domain	bccadr		var.tccom120.cadr

string	var.tccom112.rtyp(3)
string	var.tccom12x.rtyp(3)	|* used for tccom122.rtyp and tccom124.rtyp


domain	tcyesno	var.tccom100.sndr 
long	var.tccom100.prst
domain	tcyesno	var.tccom100.edyn
domain	tcyesno	var.tccom100.inrl
domain	tcccur	var.tccom100.ccur
domain	tcnama	var.tccom100.nama
domain	tcseak	var.tccom100.seak

domain tcyesno	var.tccom110.frin		|#800-142060.n
  
domain	bccnv.ccnt	hold.ccnt
domain	bccnv.ccnt 	var.tccom110.ccnt 
domain	bccnv.ccnt 	var.tccom112.ccnt 
domain	bccnv.ccnt 	var.tccom120.ccnt 
domain	bccnv.ccnt 	var.tccom122.ccnt 

long	var.tccom110.scon
 
long	var.tccom112.itst
string	var.tccom112.cinm(3)
 
domain	bccom.bpid	var.tccom120.scus
domain	bcstc.bpid 	var.tccom100.bptx

long	var.tccom100.bpst
long	var.tccom111.bpst
long	var.tccom114.bpst 
long	var.tccom120.bpst
long	var.tccom121.bpst
long	var.tccom122.bpst
long	var.tccom124.bpst

domain	tcyesno	var.tccom112.cvyn
domain	tcyesno	var.tccom122.cvyn
string	var.tccom122.ptbp(9)				|#800-141749.n

static	long		bp.code.depth			|#800-141749.sn
	long		sorted.bp.code.def(1, 4)
	long		bp.code.length
domain  bcstc.bpid	bp.code.list(1)	based		|#800-141749.en

domain	tccuno		converted.cuno
|#800-141596.sn
domain	bcstc.bpid	var.tccom100.prbp
|#800-141596.en
domain	bcstc.bpid	hold.tccom100.prbp			|#FP3.n

domain	bcstc.bpid	var.tccom112.pfbp		|#148806.n
						|#FBU.sn
string var.mstm(3)
string var.docm(3)
domain tcmcs.s200m	var.err.mess

						|#FBU.en

	long		var.tccom100.bprl		|#FP3.sn
	long		var.date			|#FP3.en
:STBL:tccom010,tccom020,tirou001,bcstc011,bcstc008,bcstc000,bcstc004,bcstc005,bcstc018,tdsls000,tdpst000,tcmcs025,tccom000,tccom999,tdpur040,tdpur300,tfacp262,tfacp316,tccom013
:COMT:START




:COMT:END
:TEXT:

:TEXT:END
True
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tc
:TCMOD:com
:TFLNO:111
:PRTX:START
hold.cmpnr = compnr
var.utc0 = utc(0, 0)
var.date = date.num()					|#FP3.n
bp.code.depth = 0					|#800-141749.n

define.length.and.search.def()

select 	bcstc011.* 
from	bcstc011
where	bcstc011.brtp in ("SLS", "PUR") 
selectdo 
	 if (bcstc011.brtp = "SLS") then 
		var.tccom112.rtyp = bcstc011.rtyp 
	 else 
		var.tccom12x.rtyp = bcstc011.rtyp
	 endif 
endselect 

read.parameters.common(o.mess)

read.parameter("tdsls000", o.mess)
read.parameter("tdpst000", o.mess)
read.parameter("tdpur000", o.mess)
read.parameter("tccom000", o.mess)  
read.parameter("tccom999", o.mess)			|#800-142060.sn

if tccom999.trtr = tcyesno.yes then
	var.tccom110.frin = tcyesno.yes
else
	var.tccom110.frin = tcyesno.no
endif							|#800-142060.en

var.tccom100.ccur =  get.home.currency.orig.comp()  
|#800-141596.sn
|* Parent business partner should always be filled with the business
|* partner, which is defined in bcstc000 (Default Parent Business Partner).
|* Retrieve business partner from customer or supplier or factoring company.
|get.business.partner(	bcstc000.scad,		|#200003.so
|			bcstc000.orgn,
|			o.mess)
|var.tccom100.prbp = bcstc008.bpid		|#200003.eo
|create.default.parent.bp(var.tccom100.prbp)	|#200003.n	|#FP3.o
create.default.parent.bp(hold.tccom100.prbp)	|#200003.n	|#FP3.sn
|* One-Time BP should not get a Parent BP filled.		|#FP3.en
|#800-141596.en

						|#FP3.sn
var.tccom100.bprl = 1	|* 1	No roles defined
			|* 2	Customer
			|* 3	Supplier		|#FP3.en
migrate   tcmcs025

var.tccom100.bprl = 2	|* 2	Customer	|#FP3.n
migrate   tccom010

var.tccom100.bprl = 3	|* 3	Supplier 	|#FP3.n
migrate   tccom020

|* Can also be: Both (Customer & Supplier).	|#FP3.sn
|* However, then the BP is already dumped as a 'Customer', which cannot be updated.
|* This can be corrected in Post migration session bcttc0201, with option Correct 'CP Role' checked.
:PRTX:END
:STAT:M
:VARI:#define	MEMORY_ALLOCATION_SIZE	10000				|#800-141749.n

|#201931.sn
	string		hold.tccom100.bpid(9)	|* For cuno and suno 
domain  bccadr		hold.tccom010.cadr 
domain	bccadr		hold.tccom111.cadr 
domain	bccnv.ccnt 	hold.tccom110.ccnt 
|#201931.en

domain		tcncmp hold.cmpnr 
domain		bccnv.fent  var.tccom110.cofc 
domain		bccnv.fent  var.tccom120.cofc
long		link.to.sub 

string		var.tccom100.bpid(9)	|* For cuno and suno 
string		temp.key.ccor(9) 
string		temp.key.cdel(9) 
string		var.tccom110.bppr(9)
string		o.mess(1)
string		var.utc0(23)
 
domain  bccadr		var.tccom010.cadr 
domain  bccadr		var.tccom020.cadr 
domain	bccadr		var.tccom100.cadr
domain	bccadr		var.tccom110.cadr 
domain	bccadr		var.tccom111.cadr 
domain	bccadr		var.tccom120.cadr

string	var.tccom112.rtyp(3)
string	var.tccom12x.rtyp(3)	|* used for tccom122.rtyp and tccom124.rtyp


domain	tcyesno	var.tccom100.sndr 
long	var.tccom100.prst
domain	tcyesno	var.tccom100.edyn
domain	tcyesno	var.tccom100.inrl
domain	tcccur	var.tccom100.ccur
domain	tcnama	var.tccom100.nama
domain	tcseak	var.tccom100.seak

domain tcyesno	var.tccom110.frin		|#800-142060.n
  
domain	bccnv.ccnt	hold.ccnt
domain	bccnv.ccnt 	var.tccom110.ccnt 
domain	bccnv.ccnt 	var.tccom112.ccnt 
domain	bccnv.ccnt 	var.tccom120.ccnt 
domain	bccnv.ccnt 	var.tccom122.ccnt 

long	var.tccom110.scon
 
long	var.tccom112.itst
string	var.tccom112.cinm(3)
 
domain	bccom.bpid	var.tccom120.scus
domain	bcstc.bpid 	var.tccom100.bptx

long	var.tccom100.bpst
long	var.tccom111.bpst
long	var.tccom114.bpst 
long	var.tccom120.bpst
long	var.tccom121.bpst
long	var.tccom122.bpst
long	var.tccom124.bpst

domain	tcyesno	var.tccom112.cvyn
domain	tcyesno	var.tccom122.cvyn
string	var.tccom122.ptbp(9)				|#800-141749.n

static	long		bp.code.depth			|#800-141749.sn
	long		sorted.bp.code.def(1, 4)
	long		bp.code.length
domain  bcstc.bpid	bp.code.list(1)	based		|#800-141749.en

domain	tccuno		converted.cuno
|#800-141596.sn
domain	bcstc.bpid	var.tccom100.prbp
|#800-141596.en
domain	bcstc.bpid	hold.tccom100.prbp			|#FP3.n

domain	bcstc.bpid	var.tccom112.pfbp		|#148806.n
						|#FBU.sn
string var.mstm(3)
string var.docm(3)
domain tcmcs.s200m	var.err.mess

						|#FBU.en

	long		var.tccom100.bprl		|#FP3.sn
	long		var.date			|#FP3.en
:STBL:tccom010,tccom020,tirou001,bcstc011,bcstc008,bcstc000,bcstc004,bcstc005,bcstc018,tdsls000,tdpst000,tcmcs025,tccom000,tccom999,tdpur040,tdpur300,tfacp262,tfacp316,tccom013
:COMT:START




:COMT:END
:TEXT:

:TEXT:END
True
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tc
:TCMOD:com
:TFLNO:112
:PRTX:START
hold.cmpnr = compnr
var.utc0 = utc(0, 0)
var.date = date.num()					|#FP3.n
bp.code.depth = 0					|#800-141749.n

define.length.and.search.def()

select 	bcstc011.* 
from	bcstc011
where	bcstc011.brtp in ("SLS", "PUR") 
selectdo 
	 if (bcstc011.brtp = "SLS") then 
		var.tccom112.rtyp = bcstc011.rtyp 
	 else 
		var.tccom12x.rtyp = bcstc011.rtyp
	 endif 
endselect 

read.parameters.common(o.mess)

read.parameter("tdsls000", o.mess)
read.parameter("tdpst000", o.mess)
read.parameter("tdpur000", o.mess)
read.parameter("tccom000", o.mess)  
read.parameter("tccom999", o.mess)			|#800-142060.sn

if tccom999.trtr = tcyesno.yes then
	var.tccom110.frin = tcyesno.yes
else
	var.tccom110.frin = tcyesno.no
endif							|#800-142060.en

var.tccom100.ccur =  get.home.currency.orig.comp()  
|#800-141596.sn
|* Parent business partner should always be filled with the business
|* partner, which is defined in bcstc000 (Default Parent Business Partner).
|* Retrieve business partner from customer or supplier or factoring company.
|get.business.partner(	bcstc000.scad,		|#200003.so
|			bcstc000.orgn,
|			o.mess)
|var.tccom100.prbp = bcstc008.bpid		|#200003.eo
|create.default.parent.bp(var.tccom100.prbp)	|#200003.n	|#FP3.o
create.default.parent.bp(hold.tccom100.prbp)	|#200003.n	|#FP3.sn
|* One-Time BP should not get a Parent BP filled.		|#FP3.en
|#800-141596.en

						|#FP3.sn
var.tccom100.bprl = 1	|* 1	No roles defined
			|* 2	Customer
			|* 3	Supplier		|#FP3.en
migrate   tcmcs025

var.tccom100.bprl = 2	|* 2	Customer	|#FP3.n
migrate   tccom010

var.tccom100.bprl = 3	|* 3	Supplier 	|#FP3.n
migrate   tccom020

|* Can also be: Both (Customer & Supplier).	|#FP3.sn
|* However, then the BP is already dumped as a 'Customer', which cannot be updated.
|* This can be corrected in Post migration session bcttc0201, with option Correct 'CP Role' checked.
:PRTX:END
:STAT:M
:VARI:#define	MEMORY_ALLOCATION_SIZE	10000				|#800-141749.n

|#201931.sn
	string		hold.tccom100.bpid(9)	|* For cuno and suno 
domain  bccadr		hold.tccom010.cadr 
domain	bccadr		hold.tccom111.cadr 
domain	bccnv.ccnt 	hold.tccom110.ccnt 
|#201931.en

domain		tcncmp hold.cmpnr 
domain		bccnv.fent  var.tccom110.cofc 
domain		bccnv.fent  var.tccom120.cofc
long		link.to.sub 

string		var.tccom100.bpid(9)	|* For cuno and suno 
string		temp.key.ccor(9) 
string		temp.key.cdel(9) 
string		var.tccom110.bppr(9)
string		o.mess(1)
string		var.utc0(23)
 
domain  bccadr		var.tccom010.cadr 
domain  bccadr		var.tccom020.cadr 
domain	bccadr		var.tccom100.cadr
domain	bccadr		var.tccom110.cadr 
domain	bccadr		var.tccom111.cadr 
domain	bccadr		var.tccom120.cadr

string	var.tccom112.rtyp(3)
string	var.tccom12x.rtyp(3)	|* used for tccom122.rtyp and tccom124.rtyp


domain	tcyesno	var.tccom100.sndr 
long	var.tccom100.prst
domain	tcyesno	var.tccom100.edyn
domain	tcyesno	var.tccom100.inrl
domain	tcccur	var.tccom100.ccur
domain	tcnama	var.tccom100.nama
domain	tcseak	var.tccom100.seak

domain tcyesno	var.tccom110.frin		|#800-142060.n
  
domain	bccnv.ccnt	hold.ccnt
domain	bccnv.ccnt 	var.tccom110.ccnt 
domain	bccnv.ccnt 	var.tccom112.ccnt 
domain	bccnv.ccnt 	var.tccom120.ccnt 
domain	bccnv.ccnt 	var.tccom122.ccnt 

long	var.tccom110.scon
 
long	var.tccom112.itst
string	var.tccom112.cinm(3)
 
domain	bccom.bpid	var.tccom120.scus
domain	bcstc.bpid 	var.tccom100.bptx

long	var.tccom100.bpst
long	var.tccom111.bpst
long	var.tccom114.bpst 
long	var.tccom120.bpst
long	var.tccom121.bpst
long	var.tccom122.bpst
long	var.tccom124.bpst

domain	tcyesno	var.tccom112.cvyn
domain	tcyesno	var.tccom122.cvyn
string	var.tccom122.ptbp(9)				|#800-141749.n

static	long		bp.code.depth			|#800-141749.sn
	long		sorted.bp.code.def(1, 4)
	long		bp.code.length
domain  bcstc.bpid	bp.code.list(1)	based		|#800-141749.en

domain	tccuno		converted.cuno
|#800-141596.sn
domain	bcstc.bpid	var.tccom100.prbp
|#800-141596.en
domain	bcstc.bpid	hold.tccom100.prbp			|#FP3.n

domain	bcstc.bpid	var.tccom112.pfbp		|#148806.n
						|#FBU.sn
string var.mstm(3)
string var.docm(3)
domain tcmcs.s200m	var.err.mess

						|#FBU.en

	long		var.tccom100.bprl		|#FP3.sn
	long		var.date			|#FP3.en
:STBL:tccom010,tccom020,tirou001,bcstc011,bcstc008,bcstc000,bcstc004,bcstc005,bcstc018,tdsls000,tdpst000,tcmcs025,tccom000,tccom999,tdpur040,tdpur300,tfacp262,tfacp316,tccom013
:COMT:START




:COMT:END
:TEXT:

:TEXT:END
True
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tc
:TCMOD:com
:TFLNO:114
:PRTX:START
hold.cmpnr = compnr
var.utc0 = utc(0, 0)
var.date = date.num()					|#FP3.n
bp.code.depth = 0					|#800-141749.n

define.length.and.search.def()

select 	bcstc011.* 
from	bcstc011
where	bcstc011.brtp in ("SLS", "PUR") 
selectdo 
	 if (bcstc011.brtp = "SLS") then 
		var.tccom112.rtyp = bcstc011.rtyp 
	 else 
		var.tccom12x.rtyp = bcstc011.rtyp
	 endif 
endselect 

read.parameters.common(o.mess)

read.parameter("tdsls000", o.mess)
read.parameter("tdpst000", o.mess)
read.parameter("tdpur000", o.mess)
read.parameter("tccom000", o.mess)  
read.parameter("tccom999", o.mess)			|#800-142060.sn

if tccom999.trtr = tcyesno.yes then
	var.tccom110.frin = tcyesno.yes
else
	var.tccom110.frin = tcyesno.no
endif							|#800-142060.en

var.tccom100.ccur =  get.home.currency.orig.comp()  
|#800-141596.sn
|* Parent business partner should always be filled with the business
|* partner, which is defined in bcstc000 (Default Parent Business Partner).
|* Retrieve business partner from customer or supplier or factoring company.
|get.business.partner(	bcstc000.scad,		|#200003.so
|			bcstc000.orgn,
|			o.mess)
|var.tccom100.prbp = bcstc008.bpid		|#200003.eo
|create.default.parent.bp(var.tccom100.prbp)	|#200003.n	|#FP3.o
create.default.parent.bp(hold.tccom100.prbp)	|#200003.n	|#FP3.sn
|* One-Time BP should not get a Parent BP filled.		|#FP3.en
|#800-141596.en

						|#FP3.sn
var.tccom100.bprl = 1	|* 1	No roles defined
			|* 2	Customer
			|* 3	Supplier		|#FP3.en
migrate   tcmcs025

var.tccom100.bprl = 2	|* 2	Customer	|#FP3.n
migrate   tccom010

var.tccom100.bprl = 3	|* 3	Supplier 	|#FP3.n
migrate   tccom020

|* Can also be: Both (Customer & Supplier).	|#FP3.sn
|* However, then the BP is already dumped as a 'Customer', which cannot be updated.
|* This can be corrected in Post migration session bcttc0201, with option Correct 'CP Role' checked.
:PRTX:END
:STAT:M
:VARI:#define	MEMORY_ALLOCATION_SIZE	10000				|#800-141749.n

|#201931.sn
	string		hold.tccom100.bpid(9)	|* For cuno and suno 
domain  bccadr		hold.tccom010.cadr 
domain	bccadr		hold.tccom111.cadr 
domain	bccnv.ccnt 	hold.tccom110.ccnt 
|#201931.en

domain		tcncmp hold.cmpnr 
domain		bccnv.fent  var.tccom110.cofc 
domain		bccnv.fent  var.tccom120.cofc
long		link.to.sub 

string		var.tccom100.bpid(9)	|* For cuno and suno 
string		temp.key.ccor(9) 
string		temp.key.cdel(9) 
string		var.tccom110.bppr(9)
string		o.mess(1)
string		var.utc0(23)
 
domain  bccadr		var.tccom010.cadr 
domain  bccadr		var.tccom020.cadr 
domain	bccadr		var.tccom100.cadr
domain	bccadr		var.tccom110.cadr 
domain	bccadr		var.tccom111.cadr 
domain	bccadr		var.tccom120.cadr

string	var.tccom112.rtyp(3)
string	var.tccom12x.rtyp(3)	|* used for tccom122.rtyp and tccom124.rtyp


domain	tcyesno	var.tccom100.sndr 
long	var.tccom100.prst
domain	tcyesno	var.tccom100.edyn
domain	tcyesno	var.tccom100.inrl
domain	tcccur	var.tccom100.ccur
domain	tcnama	var.tccom100.nama
domain	tcseak	var.tccom100.seak

domain tcyesno	var.tccom110.frin		|#800-142060.n
  
domain	bccnv.ccnt	hold.ccnt
domain	bccnv.ccnt 	var.tccom110.ccnt 
domain	bccnv.ccnt 	var.tccom112.ccnt 
domain	bccnv.ccnt 	var.tccom120.ccnt 
domain	bccnv.ccnt 	var.tccom122.ccnt 

long	var.tccom110.scon
 
long	var.tccom112.itst
string	var.tccom112.cinm(3)
 
domain	bccom.bpid	var.tccom120.scus
domain	bcstc.bpid 	var.tccom100.bptx

long	var.tccom100.bpst
long	var.tccom111.bpst
long	var.tccom114.bpst 
long	var.tccom120.bpst
long	var.tccom121.bpst
long	var.tccom122.bpst
long	var.tccom124.bpst

domain	tcyesno	var.tccom112.cvyn
domain	tcyesno	var.tccom122.cvyn
string	var.tccom122.ptbp(9)				|#800-141749.n

static	long		bp.code.depth			|#800-141749.sn
	long		sorted.bp.code.def(1, 4)
	long		bp.code.length
domain  bcstc.bpid	bp.code.list(1)	based		|#800-141749.en

domain	tccuno		converted.cuno
|#800-141596.sn
domain	bcstc.bpid	var.tccom100.prbp
|#800-141596.en
domain	bcstc.bpid	hold.tccom100.prbp			|#FP3.n

domain	bcstc.bpid	var.tccom112.pfbp		|#148806.n
						|#FBU.sn
string var.mstm(3)
string var.docm(3)
domain tcmcs.s200m	var.err.mess

						|#FBU.en

	long		var.tccom100.bprl		|#FP3.sn
	long		var.date			|#FP3.en
:STBL:tccom010,tccom020,tirou001,bcstc011,bcstc008,bcstc000,bcstc004,bcstc005,bcstc018,tdsls000,tdpst000,tcmcs025,tccom000,tccom999,tdpur040,tdpur300,tfacp262,tfacp316,tccom013
:COMT:START




:COMT:END
:TEXT:

:TEXT:END
True
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tc
:TCMOD:com
:TFLNO:115
:PRTX:START


migrate tccom015
:PRTX:END
:STAT:M
:VARI:string	var.tccom115.pfbp(9)
string	o.mess(1)
domain	bcstf.bank	var.tccom115.brch
:STBL:tccom015,bcstc008,bcstf006
:COMT:START


---  Changes in table design  ---



---  Source and Target Sessions  ---
%TStccom4515m000 -> %SStccom1105m000


---  Migration Logic  ---
In our standard migration solution, tfcmg011 is filled from intermediate table bcstf006(bcstf0106m000  is executed first as a preconversion session to insert the records into bcstf006 from Baan IV source tables) and bcstf006  has a field called 'cbad' (international bank ID) that takes the swift code from the corresponding Baan IV tables. There after during actual migration, records are dumped from bcstf006 into tfcmg011. So even when customer migrates the data from FBU vrc, he will still run the preconversion session to insert records in bcstf006 from  Baan IV FBU tables and the same logic will hold good. So there is really no need to write any additional logic for filling the tccom115.brch in the IBCA for FBU.  The SWIFT code will in any case map to tfcmg011 when we insert records in bcstf006 followed by dumping  into tfcmg011 from bcstf006 in the actual migration run..  


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:



:TEXT:END
False
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tc
:TCMOD:com
:TFLNO:120
:PRTX:START
hold.cmpnr = compnr
var.utc0 = utc(0, 0)
var.date = date.num()					|#FP3.n
bp.code.depth = 0					|#800-141749.n

define.length.and.search.def()

select 	bcstc011.* 
from	bcstc011
where	bcstc011.brtp in ("SLS", "PUR") 
selectdo 
	 if (bcstc011.brtp = "SLS") then 
		var.tccom112.rtyp = bcstc011.rtyp 
	 else 
		var.tccom12x.rtyp = bcstc011.rtyp
	 endif 
endselect 

read.parameters.common(o.mess)

read.parameter("tdsls000", o.mess)
read.parameter("tdpst000", o.mess)
read.parameter("tdpur000", o.mess)
read.parameter("tccom000", o.mess)  
read.parameter("tccom999", o.mess)			|#800-142060.sn

if tccom999.trtr = tcyesno.yes then
	var.tccom110.frin = tcyesno.yes
else
	var.tccom110.frin = tcyesno.no
endif							|#800-142060.en

var.tccom100.ccur =  get.home.currency.orig.comp()  
|#800-141596.sn
|* Parent business partner should always be filled with the business
|* partner, which is defined in bcstc000 (Default Parent Business Partner).
|* Retrieve business partner from customer or supplier or factoring company.
|get.business.partner(	bcstc000.scad,		|#200003.so
|			bcstc000.orgn,
|			o.mess)
|var.tccom100.prbp = bcstc008.bpid		|#200003.eo
|create.default.parent.bp(var.tccom100.prbp)	|#200003.n	|#FP3.o
create.default.parent.bp(hold.tccom100.prbp)	|#200003.n	|#FP3.sn
|* One-Time BP should not get a Parent BP filled.		|#FP3.en
|#800-141596.en

						|#FP3.sn
var.tccom100.bprl = 1	|* 1	No roles defined
			|* 2	Customer
			|* 3	Supplier		|#FP3.en
migrate   tcmcs025

var.tccom100.bprl = 2	|* 2	Customer	|#FP3.n
migrate   tccom010

var.tccom100.bprl = 3	|* 3	Supplier 	|#FP3.n
migrate   tccom020

|* Can also be: Both (Customer & Supplier).	|#FP3.sn
|* However, then the BP is already dumped as a 'Customer', which cannot be updated.
|* This can be corrected in Post migration session bcttc0201, with option Correct 'CP Role' checked.
:PRTX:END
:STAT:M
:VARI:#define	MEMORY_ALLOCATION_SIZE	10000				|#800-141749.n

|#201931.sn
	string		hold.tccom100.bpid(9)	|* For cuno and suno 
domain  bccadr		hold.tccom010.cadr 
domain	bccadr		hold.tccom111.cadr 
domain	bccnv.ccnt 	hold.tccom110.ccnt 
|#201931.en

domain		tcncmp hold.cmpnr 
domain		bccnv.fent  var.tccom110.cofc 
domain		bccnv.fent  var.tccom120.cofc
long		link.to.sub 

string		var.tccom100.bpid(9)	|* For cuno and suno 
string		temp.key.ccor(9) 
string		temp.key.cdel(9) 
string		var.tccom110.bppr(9)
string		o.mess(1)
string		var.utc0(23)
 
domain  bccadr		var.tccom010.cadr 
domain  bccadr		var.tccom020.cadr 
domain	bccadr		var.tccom100.cadr
domain	bccadr		var.tccom110.cadr 
domain	bccadr		var.tccom111.cadr 
domain	bccadr		var.tccom120.cadr

string	var.tccom112.rtyp(3)
string	var.tccom12x.rtyp(3)	|* used for tccom122.rtyp and tccom124.rtyp


domain	tcyesno	var.tccom100.sndr 
long	var.tccom100.prst
domain	tcyesno	var.tccom100.edyn
domain	tcyesno	var.tccom100.inrl
domain	tcccur	var.tccom100.ccur
domain	tcnama	var.tccom100.nama
domain	tcseak	var.tccom100.seak

domain tcyesno	var.tccom110.frin		|#800-142060.n
  
domain	bccnv.ccnt	hold.ccnt
domain	bccnv.ccnt 	var.tccom110.ccnt 
domain	bccnv.ccnt 	var.tccom112.ccnt 
domain	bccnv.ccnt 	var.tccom120.ccnt 
domain	bccnv.ccnt 	var.tccom122.ccnt 

long	var.tccom110.scon
 
long	var.tccom112.itst
string	var.tccom112.cinm(3)
 
domain	bccom.bpid	var.tccom120.scus
domain	bcstc.bpid 	var.tccom100.bptx

long	var.tccom100.bpst
long	var.tccom111.bpst
long	var.tccom114.bpst 
long	var.tccom120.bpst
long	var.tccom121.bpst
long	var.tccom122.bpst
long	var.tccom124.bpst

domain	tcyesno	var.tccom112.cvyn
domain	tcyesno	var.tccom122.cvyn
string	var.tccom122.ptbp(9)				|#800-141749.n

static	long		bp.code.depth			|#800-141749.sn
	long		sorted.bp.code.def(1, 4)
	long		bp.code.length
domain  bcstc.bpid	bp.code.list(1)	based		|#800-141749.en

domain	tccuno		converted.cuno
|#800-141596.sn
domain	bcstc.bpid	var.tccom100.prbp
|#800-141596.en
domain	bcstc.bpid	hold.tccom100.prbp			|#FP3.n

domain	bcstc.bpid	var.tccom112.pfbp		|#148806.n
						|#FBU.sn
string var.mstm(3)
string var.docm(3)
domain tcmcs.s200m	var.err.mess

						|#FBU.en

	long		var.tccom100.bprl		|#FP3.sn
	long		var.date			|#FP3.en
:STBL:tccom010,tccom020,tirou001,bcstc011,bcstc008,bcstc000,bcstc004,bcstc005,bcstc018,tdsls000,tdpst000,tcmcs025,tccom000,tccom999,tdpur040,tdpur300,tfacp262,tfacp316,tccom013
:COMT:START




:COMT:END
:TEXT:

:TEXT:END
True
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tc
:TCMOD:com
:TFLNO:121
:PRTX:START
hold.cmpnr = compnr
var.utc0 = utc(0, 0)
var.date = date.num()					|#FP3.n
bp.code.depth = 0					|#800-141749.n

define.length.and.search.def()

select 	bcstc011.* 
from	bcstc011
where	bcstc011.brtp in ("SLS", "PUR") 
selectdo 
	 if (bcstc011.brtp = "SLS") then 
		var.tccom112.rtyp = bcstc011.rtyp 
	 else 
		var.tccom12x.rtyp = bcstc011.rtyp
	 endif 
endselect 

read.parameters.common(o.mess)

read.parameter("tdsls000", o.mess)
read.parameter("tdpst000", o.mess)
read.parameter("tdpur000", o.mess)
read.parameter("tccom000", o.mess)  
read.parameter("tccom999", o.mess)			|#800-142060.sn

if tccom999.trtr = tcyesno.yes then
	var.tccom110.frin = tcyesno.yes
else
	var.tccom110.frin = tcyesno.no
endif							|#800-142060.en

var.tccom100.ccur =  get.home.currency.orig.comp()  
|#800-141596.sn
|* Parent business partner should always be filled with the business
|* partner, which is defined in bcstc000 (Default Parent Business Partner).
|* Retrieve business partner from customer or supplier or factoring company.
|get.business.partner(	bcstc000.scad,		|#200003.so
|			bcstc000.orgn,
|			o.mess)
|var.tccom100.prbp = bcstc008.bpid		|#200003.eo
|create.default.parent.bp(var.tccom100.prbp)	|#200003.n	|#FP3.o
create.default.parent.bp(hold.tccom100.prbp)	|#200003.n	|#FP3.sn
|* One-Time BP should not get a Parent BP filled.		|#FP3.en
|#800-141596.en

						|#FP3.sn
var.tccom100.bprl = 1	|* 1	No roles defined
			|* 2	Customer
			|* 3	Supplier		|#FP3.en
migrate   tcmcs025

var.tccom100.bprl = 2	|* 2	Customer	|#FP3.n
migrate   tccom010

var.tccom100.bprl = 3	|* 3	Supplier 	|#FP3.n
migrate   tccom020

|* Can also be: Both (Customer & Supplier).	|#FP3.sn
|* However, then the BP is already dumped as a 'Customer', which cannot be updated.
|* This can be corrected in Post migration session bcttc0201, with option Correct 'CP Role' checked.
:PRTX:END
:STAT:M
:VARI:#define	MEMORY_ALLOCATION_SIZE	10000				|#800-141749.n

|#201931.sn
	string		hold.tccom100.bpid(9)	|* For cuno and suno 
domain  bccadr		hold.tccom010.cadr 
domain	bccadr		hold.tccom111.cadr 
domain	bccnv.ccnt 	hold.tccom110.ccnt 
|#201931.en

domain		tcncmp hold.cmpnr 
domain		bccnv.fent  var.tccom110.cofc 
domain		bccnv.fent  var.tccom120.cofc
long		link.to.sub 

string		var.tccom100.bpid(9)	|* For cuno and suno 
string		temp.key.ccor(9) 
string		temp.key.cdel(9) 
string		var.tccom110.bppr(9)
string		o.mess(1)
string		var.utc0(23)
 
domain  bccadr		var.tccom010.cadr 
domain  bccadr		var.tccom020.cadr 
domain	bccadr		var.tccom100.cadr
domain	bccadr		var.tccom110.cadr 
domain	bccadr		var.tccom111.cadr 
domain	bccadr		var.tccom120.cadr

string	var.tccom112.rtyp(3)
string	var.tccom12x.rtyp(3)	|* used for tccom122.rtyp and tccom124.rtyp


domain	tcyesno	var.tccom100.sndr 
long	var.tccom100.prst
domain	tcyesno	var.tccom100.edyn
domain	tcyesno	var.tccom100.inrl
domain	tcccur	var.tccom100.ccur
domain	tcnama	var.tccom100.nama
domain	tcseak	var.tccom100.seak

domain tcyesno	var.tccom110.frin		|#800-142060.n
  
domain	bccnv.ccnt	hold.ccnt
domain	bccnv.ccnt 	var.tccom110.ccnt 
domain	bccnv.ccnt 	var.tccom112.ccnt 
domain	bccnv.ccnt 	var.tccom120.ccnt 
domain	bccnv.ccnt 	var.tccom122.ccnt 

long	var.tccom110.scon
 
long	var.tccom112.itst
string	var.tccom112.cinm(3)
 
domain	bccom.bpid	var.tccom120.scus
domain	bcstc.bpid 	var.tccom100.bptx

long	var.tccom100.bpst
long	var.tccom111.bpst
long	var.tccom114.bpst 
long	var.tccom120.bpst
long	var.tccom121.bpst
long	var.tccom122.bpst
long	var.tccom124.bpst

domain	tcyesno	var.tccom112.cvyn
domain	tcyesno	var.tccom122.cvyn
string	var.tccom122.ptbp(9)				|#800-141749.n

static	long		bp.code.depth			|#800-141749.sn
	long		sorted.bp.code.def(1, 4)
	long		bp.code.length
domain  bcstc.bpid	bp.code.list(1)	based		|#800-141749.en

domain	tccuno		converted.cuno
|#800-141596.sn
domain	bcstc.bpid	var.tccom100.prbp
|#800-141596.en
domain	bcstc.bpid	hold.tccom100.prbp			|#FP3.n

domain	bcstc.bpid	var.tccom112.pfbp		|#148806.n
						|#FBU.sn
string var.mstm(3)
string var.docm(3)
domain tcmcs.s200m	var.err.mess

						|#FBU.en

	long		var.tccom100.bprl		|#FP3.sn
	long		var.date			|#FP3.en
:STBL:tccom010,tccom020,tirou001,bcstc011,bcstc008,bcstc000,bcstc004,bcstc005,bcstc018,tdsls000,tdpst000,tcmcs025,tccom000,tccom999,tdpur040,tdpur300,tfacp262,tfacp316,tccom013
:COMT:START




:COMT:END
:TEXT:

:TEXT:END
True
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tc
:TCMOD:com
:TFLNO:122
:PRTX:START
hold.cmpnr = compnr
var.utc0 = utc(0, 0)
var.date = date.num()					|#FP3.n
bp.code.depth = 0					|#800-141749.n

define.length.and.search.def()

select 	bcstc011.* 
from	bcstc011
where	bcstc011.brtp in ("SLS", "PUR") 
selectdo 
	 if (bcstc011.brtp = "SLS") then 
		var.tccom112.rtyp = bcstc011.rtyp 
	 else 
		var.tccom12x.rtyp = bcstc011.rtyp
	 endif 
endselect 

read.parameters.common(o.mess)

read.parameter("tdsls000", o.mess)
read.parameter("tdpst000", o.mess)
read.parameter("tdpur000", o.mess)
read.parameter("tccom000", o.mess)  
read.parameter("tccom999", o.mess)			|#800-142060.sn

if tccom999.trtr = tcyesno.yes then
	var.tccom110.frin = tcyesno.yes
else
	var.tccom110.frin = tcyesno.no
endif							|#800-142060.en

var.tccom100.ccur =  get.home.currency.orig.comp()  
|#800-141596.sn
|* Parent business partner should always be filled with the business
|* partner, which is defined in bcstc000 (Default Parent Business Partner).
|* Retrieve business partner from customer or supplier or factoring company.
|get.business.partner(	bcstc000.scad,		|#200003.so
|			bcstc000.orgn,
|			o.mess)
|var.tccom100.prbp = bcstc008.bpid		|#200003.eo
|create.default.parent.bp(var.tccom100.prbp)	|#200003.n	|#FP3.o
create.default.parent.bp(hold.tccom100.prbp)	|#200003.n	|#FP3.sn
|* One-Time BP should not get a Parent BP filled.		|#FP3.en
|#800-141596.en

						|#FP3.sn
var.tccom100.bprl = 1	|* 1	No roles defined
			|* 2	Customer
			|* 3	Supplier		|#FP3.en
migrate   tcmcs025

var.tccom100.bprl = 2	|* 2	Customer	|#FP3.n
migrate   tccom010

var.tccom100.bprl = 3	|* 3	Supplier 	|#FP3.n
migrate   tccom020

|* Can also be: Both (Customer & Supplier).	|#FP3.sn
|* However, then the BP is already dumped as a 'Customer', which cannot be updated.
|* This can be corrected in Post migration session bcttc0201, with option Correct 'CP Role' checked.
:PRTX:END
:STAT:M
:VARI:#define	MEMORY_ALLOCATION_SIZE	10000				|#800-141749.n

|#201931.sn
	string		hold.tccom100.bpid(9)	|* For cuno and suno 
domain  bccadr		hold.tccom010.cadr 
domain	bccadr		hold.tccom111.cadr 
domain	bccnv.ccnt 	hold.tccom110.ccnt 
|#201931.en

domain		tcncmp hold.cmpnr 
domain		bccnv.fent  var.tccom110.cofc 
domain		bccnv.fent  var.tccom120.cofc
long		link.to.sub 

string		var.tccom100.bpid(9)	|* For cuno and suno 
string		temp.key.ccor(9) 
string		temp.key.cdel(9) 
string		var.tccom110.bppr(9)
string		o.mess(1)
string		var.utc0(23)
 
domain  bccadr		var.tccom010.cadr 
domain  bccadr		var.tccom020.cadr 
domain	bccadr		var.tccom100.cadr
domain	bccadr		var.tccom110.cadr 
domain	bccadr		var.tccom111.cadr 
domain	bccadr		var.tccom120.cadr

string	var.tccom112.rtyp(3)
string	var.tccom12x.rtyp(3)	|* used for tccom122.rtyp and tccom124.rtyp


domain	tcyesno	var.tccom100.sndr 
long	var.tccom100.prst
domain	tcyesno	var.tccom100.edyn
domain	tcyesno	var.tccom100.inrl
domain	tcccur	var.tccom100.ccur
domain	tcnama	var.tccom100.nama
domain	tcseak	var.tccom100.seak

domain tcyesno	var.tccom110.frin		|#800-142060.n
  
domain	bccnv.ccnt	hold.ccnt
domain	bccnv.ccnt 	var.tccom110.ccnt 
domain	bccnv.ccnt 	var.tccom112.ccnt 
domain	bccnv.ccnt 	var.tccom120.ccnt 
domain	bccnv.ccnt 	var.tccom122.ccnt 

long	var.tccom110.scon
 
long	var.tccom112.itst
string	var.tccom112.cinm(3)
 
domain	bccom.bpid	var.tccom120.scus
domain	bcstc.bpid 	var.tccom100.bptx

long	var.tccom100.bpst
long	var.tccom111.bpst
long	var.tccom114.bpst 
long	var.tccom120.bpst
long	var.tccom121.bpst
long	var.tccom122.bpst
long	var.tccom124.bpst

domain	tcyesno	var.tccom112.cvyn
domain	tcyesno	var.tccom122.cvyn
string	var.tccom122.ptbp(9)				|#800-141749.n

static	long		bp.code.depth			|#800-141749.sn
	long		sorted.bp.code.def(1, 4)
	long		bp.code.length
domain  bcstc.bpid	bp.code.list(1)	based		|#800-141749.en

domain	tccuno		converted.cuno
|#800-141596.sn
domain	bcstc.bpid	var.tccom100.prbp
|#800-141596.en
domain	bcstc.bpid	hold.tccom100.prbp			|#FP3.n

domain	bcstc.bpid	var.tccom112.pfbp		|#148806.n
						|#FBU.sn
string var.mstm(3)
string var.docm(3)
domain tcmcs.s200m	var.err.mess

						|#FBU.en

	long		var.tccom100.bprl		|#FP3.sn
	long		var.date			|#FP3.en
:STBL:tccom010,tccom020,tirou001,bcstc011,bcstc008,bcstc000,bcstc004,bcstc005,bcstc018,tdsls000,tdpst000,tcmcs025,tccom000,tccom999,tdpur040,tdpur300,tfacp262,tfacp316,tccom013
:COMT:START




:COMT:END
:TEXT:

:TEXT:END
True
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tc
:TCMOD:com
:TFLNO:124
:PRTX:START
hold.cmpnr = compnr
var.utc0 = utc(0, 0)
var.date = date.num()					|#FP3.n
bp.code.depth = 0					|#800-141749.n

define.length.and.search.def()

select 	bcstc011.* 
from	bcstc011
where	bcstc011.brtp in ("SLS", "PUR") 
selectdo 
	 if (bcstc011.brtp = "SLS") then 
		var.tccom112.rtyp = bcstc011.rtyp 
	 else 
		var.tccom12x.rtyp = bcstc011.rtyp
	 endif 
endselect 

read.parameters.common(o.mess)

read.parameter("tdsls000", o.mess)
read.parameter("tdpst000", o.mess)
read.parameter("tdpur000", o.mess)
read.parameter("tccom000", o.mess)  
read.parameter("tccom999", o.mess)			|#800-142060.sn

if tccom999.trtr = tcyesno.yes then
	var.tccom110.frin = tcyesno.yes
else
	var.tccom110.frin = tcyesno.no
endif							|#800-142060.en

var.tccom100.ccur =  get.home.currency.orig.comp()  
|#800-141596.sn
|* Parent business partner should always be filled with the business
|* partner, which is defined in bcstc000 (Default Parent Business Partner).
|* Retrieve business partner from customer or supplier or factoring company.
|get.business.partner(	bcstc000.scad,		|#200003.so
|			bcstc000.orgn,
|			o.mess)
|var.tccom100.prbp = bcstc008.bpid		|#200003.eo
|create.default.parent.bp(var.tccom100.prbp)	|#200003.n	|#FP3.o
create.default.parent.bp(hold.tccom100.prbp)	|#200003.n	|#FP3.sn
|* One-Time BP should not get a Parent BP filled.		|#FP3.en
|#800-141596.en

						|#FP3.sn
var.tccom100.bprl = 1	|* 1	No roles defined
			|* 2	Customer
			|* 3	Supplier		|#FP3.en
migrate   tcmcs025

var.tccom100.bprl = 2	|* 2	Customer	|#FP3.n
migrate   tccom010

var.tccom100.bprl = 3	|* 3	Supplier 	|#FP3.n
migrate   tccom020

|* Can also be: Both (Customer & Supplier).	|#FP3.sn
|* However, then the BP is already dumped as a 'Customer', which cannot be updated.
|* This can be corrected in Post migration session bcttc0201, with option Correct 'CP Role' checked.
:PRTX:END
:STAT:M
:VARI:#define	MEMORY_ALLOCATION_SIZE	10000				|#800-141749.n

|#201931.sn
	string		hold.tccom100.bpid(9)	|* For cuno and suno 
domain  bccadr		hold.tccom010.cadr 
domain	bccadr		hold.tccom111.cadr 
domain	bccnv.ccnt 	hold.tccom110.ccnt 
|#201931.en

domain		tcncmp hold.cmpnr 
domain		bccnv.fent  var.tccom110.cofc 
domain		bccnv.fent  var.tccom120.cofc
long		link.to.sub 

string		var.tccom100.bpid(9)	|* For cuno and suno 
string		temp.key.ccor(9) 
string		temp.key.cdel(9) 
string		var.tccom110.bppr(9)
string		o.mess(1)
string		var.utc0(23)
 
domain  bccadr		var.tccom010.cadr 
domain  bccadr		var.tccom020.cadr 
domain	bccadr		var.tccom100.cadr
domain	bccadr		var.tccom110.cadr 
domain	bccadr		var.tccom111.cadr 
domain	bccadr		var.tccom120.cadr

string	var.tccom112.rtyp(3)
string	var.tccom12x.rtyp(3)	|* used for tccom122.rtyp and tccom124.rtyp


domain	tcyesno	var.tccom100.sndr 
long	var.tccom100.prst
domain	tcyesno	var.tccom100.edyn
domain	tcyesno	var.tccom100.inrl
domain	tcccur	var.tccom100.ccur
domain	tcnama	var.tccom100.nama
domain	tcseak	var.tccom100.seak

domain tcyesno	var.tccom110.frin		|#800-142060.n
  
domain	bccnv.ccnt	hold.ccnt
domain	bccnv.ccnt 	var.tccom110.ccnt 
domain	bccnv.ccnt 	var.tccom112.ccnt 
domain	bccnv.ccnt 	var.tccom120.ccnt 
domain	bccnv.ccnt 	var.tccom122.ccnt 

long	var.tccom110.scon
 
long	var.tccom112.itst
string	var.tccom112.cinm(3)
 
domain	bccom.bpid	var.tccom120.scus
domain	bcstc.bpid 	var.tccom100.bptx

long	var.tccom100.bpst
long	var.tccom111.bpst
long	var.tccom114.bpst 
long	var.tccom120.bpst
long	var.tccom121.bpst
long	var.tccom122.bpst
long	var.tccom124.bpst

domain	tcyesno	var.tccom112.cvyn
domain	tcyesno	var.tccom122.cvyn
string	var.tccom122.ptbp(9)				|#800-141749.n

static	long		bp.code.depth			|#800-141749.sn
	long		sorted.bp.code.def(1, 4)
	long		bp.code.length
domain  bcstc.bpid	bp.code.list(1)	based		|#800-141749.en

domain	tccuno		converted.cuno
|#800-141596.sn
domain	bcstc.bpid	var.tccom100.prbp
|#800-141596.en
domain	bcstc.bpid	hold.tccom100.prbp			|#FP3.n

domain	bcstc.bpid	var.tccom112.pfbp		|#148806.n
						|#FBU.sn
string var.mstm(3)
string var.docm(3)
domain tcmcs.s200m	var.err.mess

						|#FBU.en

	long		var.tccom100.bprl		|#FP3.sn
	long		var.date			|#FP3.en
:STBL:tccom010,tccom020,tirou001,bcstc011,bcstc008,bcstc000,bcstc004,bcstc005,bcstc018,tdsls000,tdpst000,tcmcs025,tccom000,tccom999,tdpur040,tdpur300,tfacp262,tfacp316,tccom013
:COMT:START




:COMT:END
:TEXT:

:TEXT:END
True
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tc
:TCMOD:com
:TFLNO:125
:PRTX:START


migrate tccom025

migrate tcmcs026
:PRTX:END
:STAT:V
:VARI:string	var.tccom125.ptbp(9)	

string	o.mess(1)

domain	bcstf.bank	var.tccom125.brch

domain  tccuno		tmp.cfcc
:STBL:tccom025,bcstc008,bcstf006,tcmcs026
:COMT:START


---  Changes in table design  ---



---  Source and Target Sessions  ---
%TStccom4525m000 -> %SStccom2105m000


---  Migration Logic  ---
In our standard migration solution, tfcmg011 is filled from intermediate table bcstf006(bcstf0106m000  is executed first as a preconversion session to insert the records into bcstf006 from Baan IV source tables) and bcstf006  has a field called 'cbad' (international bank ID) that takes the swift code from the corresponding Baan IV tables. There after during actual migration, records are dumped from bcstf006 into tfcmg011. So even when customer migrates the data from FBU vrc, he will still run the preconversion session to insert records in bcstf006 from  Baan IV FBU tables and the same logic will hold good. So there is really no need to write any additional logic for filling the tccom125.brch in the IBCA for FBU.  The SWIFT code will in any case map to tfcmg011 when we insert records in bcstf006 followed by dumping  into tfcmg011 from bcstf006 in the actual migration run


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:



:TEXT:END
False
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tc
:TCMOD:com
:TFLNO:130
:PRTX:START
#pragma used dll "otiitmdll0003"
#pragma used dll "obcstcdll0004"

tcmcs0095.read.parm("tccom999")

g.conv.factor = 1.0

if tccom999.trtr = tcyesno.yes then
	if read.parameter("trtcd000", o.mess) then
		return
	endif

	if trtcd000.cutm <> trtcd000.cuhr  and
	   not isspace(trtcd000.cutm) and
	   not isspace(trtcd000.cuhr) then
		l.conv.cutm = tiitm.dll0003.read.conv.with.physical.quantity(
					trtcd000.cutm,
					tctccu.time)
		l.conv.cuhr = tiitm.dll0003.read.conv.with.physical.quantity(
					trtcd000.cuhr,
					tctccu.time)

		g.conv.factor = l.conv.cutm / l.conv.cuhr
	endif
endif

|var.tccom139.idnr = 0					|#City.so
|var.prev.country = ""
|var.prev.city.code = ""					|#City.eo
var.date = date.num()					|#FP3.n

migrate bcstc004
:PRTX:END
:STAT:M
:VARI:|string			var.tccom139.seak(16)	mb		|#City.o
|long			var.tccom139.idnr			|#City.o
domain	bcstc.desc	var.tccom130.dsca			|#City.n
string			var.tccom130.lvdt(22)
string			var.tccom130.nama(35)
domain	tcmcs.st10	var.tccom130.hono
domain	tcmcs.st10	var.tccom130.pobn
domain	tcnamb		g.tccom130.pobn
|domain	tcccty		var.prev.country			|#City.o
|domain	bcstc.city	var.prev.city.code			|#City.o
domain	tccreg		var.fmfmd010.creg
domain	trtop.time	var.fmfmd010.lwtm
domain	trtop.time	var.fmfmd010.ldtm
domain	trtop.time	var.fmfmd010.uwtm
domain	trtop.time	var.fmfmd010.untm
domain	tcconv		l.conv.cutm
domain	tcconv		l.conv.cuhr
domain	tcconv		g.conv.factor
string			o.mess(1)
	long		var.date				|#FP3.n

#include	"itcmcs0095"
:STBL:bcstc004,trtcd000,tccom999,bcstc031
:COMT:START


---  Changes in table design  ---



---  Source and Target Sessions  ---



---  Migration Logic  ---
tccom130 is filled from the intermediate table bcstc004. The table bcstc004 is filled with records when the 'Generate Addresses' (bcstc0104m000) is run as a preconversion session. Record is inserted in bcstc004 from the source table "tccom000" and the corresponding company number. The 'cste' value is also filled for that record from tccom000. When bcstc004 is dumped into tccom130, automatically we have the corresponding record in the target side with the 'tccom000.cste' from source into tccom130.cste.


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:

:TEXT:END
True
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tc
:TCMOD:mcs
:TFLNO:002
:PRTX:START
Migrate tcmcs002
:PRTX:END
:STAT:V
:VARI:domain tcccur	var.tcmcs002.ccur
:STBL:tcmcs002
:COMT:START


---  Changes in table design  ---
Not Applicable.


---  Source and Target Sessions  ---
%SStcmcs0102m000 - %TStcmcs0102m000


---  Migration Logic  ---
For FBU, only if tcmcs002.ccur # tcmcs002.icur and tcmcs002.icur <> "", then tcmcs002.ccur is filled from tcmcs002.icur (From FBU VRC) otherwise tcmcs002.ccur is filled from tcmcs002.ccur.



---  Migration Parameters  ---
Not Applicable.


---  Migration Mapping Tables  ---
Not Applicable.


---  Technical Notes  ---
Not Applicable.


---  Performance  ---
Not Applicable.


:COMT:END
:TEXT:

:TEXT:END
False
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tc
:TCMOD:mcs
:TFLNO:010
:PRTX:START


read.tccom999.bnch()

on case tccom999.bnch
case tccom.bnch.proof11:  
	var.tcmcs010.bnch =  target(tccom.bnch.proof11)
	|* 11 - Check
	break
case tccom.bnch.proof97:
	var.tcmcs010.bnch =  target(tccom.bnch.proof97)
	|* 97 - Check
	break
case tccom.bnch.none:
	var.tcmcs010.bnch =  target(tccom.bnch.none)
	|* No Check
	break
default:
	var.tcmcs010.bnch =  target(tccom.bnch.none)
endcase

Migrate tcmcs010
:PRTX:END
:STAT:V
:VARI:table	ttccom999
table	ttracs020

domain	tcyesno	var.tcmcs010.meec
long		var.tcmcs010.bnch
string		var.tcmcs010.coaf(3)
long		var.tcmcs010.ppcd
string		var.tcmcs010.tzid(3)
string		dummy.err.mess(200)	mb
:STBL:bcstc014,tcmcs010,bcstc026
:COMT:START


---  Changes in table design  ---
Not Applicable.


---  Source and Target Sessions  ---
%SStcmcs0110m000 - %TStcmcs0510m000


---  Migration Logic  ---
Not Applicable.


---  Migration Parameters  ---
Not Applicable.


---  Migration Mapping Tables  ---
%STbcstc014
%STbcstc026

---  Technical Notes  ---
Not Applicable.


---  Performance  ---
Not Applicable.

:COMT:END
:TEXT:



:TEXT:END
False
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tf
:TCMOD:acp
:TFLNO:005
:PRTX:START

ret.long = get.default.pur.type.for.tfacp(
		var.tfacp015.ptyp,
		error.message)  

hold.financial.bpg = "" 

migrate tfacp005
:PRTX:END
:STAT:V
:VARI:long			var.tfacp005.tran
domain	tcmcs.str6	var.tfacp015.ptyp
domain	tfgld.dimn	var.tfacp005.typ1
domain	tfgld.dimn	var.tfacp005.typ2
domain	tfgld.dimn	var.tfacp005.typ3
domain	tfgld.dimn	var.tfacp005.typ4
domain	tfgld.dimn	var.tfacp005.typ5
domain	tfacp.fisu	hold.financial.bpg
string	error.message
long	ret.long
:STBL:tfacp005,tfgld003,tfgld004
:COMT:START



--- Changes in table design ---
The table %STtfacp005 in the %SV environment has been split up in two tables in the %TV enviroment. These two tables are %TTtfacp005 and %TTtfacp015. In %TV the user has the ability to define per financial supplier group multiple control accounts. The entity, which is used to be able to create multiple control accounts per financial supplier group, is called Purchase Type.
 
--- Source and Target Sessions ---
%SStfacp0111s000 - %TStfacp0110m100

--- Migration Logic ---
The control accounts in %SV are inserted into the new table %TTtfacp015 in %TV. The entity Purchase Type is entered by the user in the session %SSbcstc0120m000.
For every new type of transaction in %TV compared to %SV, a default entry is added to %TTtfacp005.

--- Migration Mapping Tables ---
The default purchase type ,used to fill %TTtfacp015, is retrieved from mapping table %STbcstc020.

---  Technical Notes  ---

---  Performance  ---

:COMT:END
:TEXT:


:TEXT:END
True
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tf
:TCMOD:acp
:TFLNO:015
:PRTX:START

ret.long = get.default.pur.type.for.tfacp(
		var.tfacp015.ptyp,
		error.message)  

hold.financial.bpg = "" 

migrate tfacp005
:PRTX:END
:STAT:V
:VARI:long			var.tfacp005.tran
domain	tcmcs.str6	var.tfacp015.ptyp
domain	tfgld.dimn	var.tfacp005.typ1
domain	tfgld.dimn	var.tfacp005.typ2
domain	tfgld.dimn	var.tfacp005.typ3
domain	tfgld.dimn	var.tfacp005.typ4
domain	tfgld.dimn	var.tfacp005.typ5
domain	tfacp.fisu	hold.financial.bpg
string	error.message
long	ret.long
:STBL:tfacp005,tfgld003,tfgld004
:COMT:START



--- Changes in table design ---
The table %STtfacp005 in the %SV environment has been split up in two tables in the %TV enviroment. These two tables are %TTtfacp005 and %TTtfacp015. In %TV the user has the ability to define per financial supplier group multiple control accounts. The entity, which is used to be able to create multiple control accounts per financial supplier group, is called Purchase Type.
 
--- Source and Target Sessions ---
%SStfacp0111s000 - %TStfacp0110m100

--- Migration Logic ---
The control accounts in %SV are inserted into the new table %TTtfacp015 in %TV. The entity Purchase Type is entered by the user in the session %SSbcstc0120m000.
For every new type of transaction in %TV compared to %SV, a default entry is added to %TTtfacp005.

--- Migration Mapping Tables ---
The default purchase type ,used to fill %TTtfacp015, is retrieved from mapping table %STbcstc020.

---  Technical Notes  ---

---  Performance  ---

:COMT:END
:TEXT:


:TEXT:END
True
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tf
:TCMOD:acp
:TFLNO:103
:PRTX:START


default.date = utc(0,0,2)
prev.suno = ""
prev.line = 0
migrate tfacp151
:PRTX:END
:STAT:V
:VARI:#include "itfgld0012"		|* Get period and year from date

string		var.str.bpid(9)	

	long	var.ninv
	long	var.bpay
	long	prev.line
	long	var.rcrr
	long	var.cbtn
	long	var.cdoc,var.tfacp103.radt
	
	string	prev.suno(6)	fixed
	string	var.ttyp(3)	fixed	
	string	var.crdt(20),var.tfacp103.dued(20)
	string	var.cyer(20)
	string	var.ctyp(3)	fixed
	string	default.date(20)

	domain tcmcs.s200m	var.err.mess
	domain	tfgld.year  var.nyer,var.tyer,var.ryer
	domain	tfgld.prod  var.fprd,var.rprd,var.tprd
:STBL:tfacp151,bcstc008
:COMT:START


---  Changes in table design  ---
In BaanIVc4 standard standing orders, recurring journal entries and payment schedules can be administered. For registering rent or lease payments in advance (characteristic: no invoice, but contract) as standing orders, no open items were generated. Also handling of this feature using the functionality of recurring journal entries or by payment schedules was not convenient. Therefore functionality was provided in BaanIVc4 FBU extension, table tfacp151, where in several due dates and the corresponding payment amount could be administered. For those, open items are also generated. 
In SSA ERP LN 6.1, this functionality is exclusively available in the table tfacp103.


---  Source and Target Sessions  ---
%SStfacp1551m000 -> %TStfacp1513m000


---  Migration Logic  ---
Only recurring invoices with status = posted for the first serial number of each line per supplier can be migrated. The customer is therefore advised to post all the recurring transactions before migration.


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:



:TEXT:END
False
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tf
:TCMOD:acp
:TFLNO:311
:PRTX:START

migrate tfacp311
:PRTX:END
:STAT:V
:VARI:long		var.tfacp311.stms	 	
long		var.tfacp311.stmf
long		var.tfacp311.frqt
:STBL:tfacp311
:COMT:START


---  Changes in table design  ---
No changes in table design from source (FBU) and target.The enum constants have changed for %SFtfacp311.stmf and %SFtfacp311.stms from %SV to %TV



---  Source and Target Sessions  ---
%SStfacp3111m000 -->%TStfacp3522m000


---  Migration Logic  ---
Direct Mapping.


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
False
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tf
:TCMOD:acp
:TFLNO:312
:PRTX:START


migrate tfacp312
:PRTX:END
:STAT:V
:VARI:long var.tfacp312.styp
:STBL:tfacp312
:COMT:START


---  Changes in table design  ---
No changes in table design except that tfacp312.styp has three enum constants in source but two in target.  
tfacp312.styp = 3 (source) -->tfacp312.styp =  2 (target)


---  Source and Target Sessions  ---
%SStfacp3112m000--> %TStfacp3512m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:



:TEXT:END
False
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tf
:TCMOD:acp
:TFLNO:313
:PRTX:START


migrate tfacp313
:PRTX:END
:STAT:V
:VARI:
:STBL:tfacp313
:COMT:START


---  Changes in table design  ---



---  Source and Target Sessions  ---
%SStfacp3113m000--> %TStfacp3513m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:



:TEXT:END
False
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tf
:TCMOD:acp
:TFLNO:314
:PRTX:START


migrate tfacp314
:PRTX:END
:STAT:V
:VARI:
:STBL:tfacp314
:COMT:START


---  Changes in table design  ---



---  Source and Target Sessions  ---
 Source :  %SStfacp3114s000
 Target :  %TStfacp3114m000



---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:



:TEXT:END
False
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tf
:TCMOD:acp
:TFLNO:315
:PRTX:START


migrate tfacp315
:PRTX:END
:STAT:V
:VARI:
:STBL:tfacp315
:COMT:START


---  Changes in table design  ---



---  Source and Target Sessions  ---
 Source :  %SStfacp3115s000
 Target :   %TStfacp3115s000



---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:



:TEXT:END
False
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tf
:TCMOD:acp
:TFLNO:460
:PRTX:START


migrate tfacp260
:PRTX:END
:STAT:V
:VARI:long		var.tfacp460.frst
long		var.tfacp460.secd
:STBL:tfacp260
:COMT:START


---  Changes in table design  ---



---  Source and Target Sessions  ---
 %SStfacp2160m000 -> %TStfacp4160m000 


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:



:TEXT:END
False
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tf
:TCMOD:acp
:TFLNO:461
:PRTX:START


migrate tfacp261
:PRTX:END
:STAT:V
:VARI:
:STBL:tfacp261
:COMT:START


---  Changes in table design  ---



---  Source and Target Sessions  ---
%SStfacp2161m000 -> %TStfacp4161m000 


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:



:TEXT:END
False
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tf
:TCMOD:acr
:TFLNO:103
:PRTX:START


default.date = utc(0,0,2)
prev.suno = ""
prev.line = 0
migrate tfacr151
:PRTX:END
:STAT:V
:VARI:#include "itfgld0012"		|* Get period and year from date
string		var.str.bpid(9)
string		default.date(20)
	string	var.tfacr103.dued(20)

	long	var.ninv
	long	var.bpay
	long	prev.line
	long	var.rcrr
	long	var.cbtn
	long	var.cdoc,var.tfacr103.radt

	
	string	prev.suno(6)	fixed
	string	var.ttyp(3)	fixed	
	string	var.crdt(20)
	string	var.cyer(20)
	string	var.ctyp(3)	fixed

	domain tcmcs.s200m	var.err.mess
	domain	tfgld.year  var.nyer,var.tyer,var.ryer
	domain	tfgld.prod  var.fprd,var.rprd,var.tprd
:STBL:tfacr151,bcstc008
:COMT:START


---  Changes in table design  ---
The functionality of recurring sales invoice instructions was not available in BaanIVc4 standard but was introduced in the FBU extension, table tfacr151. In SSA ERP LN 6.1, this functionality is exclusively available in the table tfacr103.


---  Source and Target Sessions  ---
%SStfacr1551m000 -> %TStfacr1513m000


---  Migration Logic  ---
Only recurring invoices with status = posted for the first serial number of each line per customer can be migrated. The customer is therefore advised to post all the recurring transactions before migration.



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:



:TEXT:END
False
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tf
:TCMOD:cmg
:TFLNO:002
:PRTX:START


migrate tfcmg002
:PRTX:END
:STAT:V
:VARI:long		var.tfcmg002.vldc	
	domain	tcyesno	var.tfcmg002.serv
:STBL:tfcmg002,tfcmg116
:COMT:START


---  Changes in table design  ---
Four new fields are added in the %TTtfcmg002 .


---  Source and Target Sessions  ---
Source Session : %SStfcmg0130m000
Target Session : %TStfcmg0130m000

For FBU
Source Session : %SStfcmg1118m000

---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:



:TEXT:END
False
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tf
:TCMOD:cmg
:TFLNO:003
:PRTX:START
migrate tfcmg003
:PRTX:END
:STAT:V
:VARI:long		var.tfcmg003.poda
string		var.tfcmg003.sess(20)
long	var.tfcmg003.copt
long	var.tfcmg003.cact
long	var.tfcmg003.dnum
long	var.tfcmg003.typp
long	var.tfcmg003.odv1
long	var.tfcmg003.bodd
long	var.tfcmg003.uiba
long	var.tfcmg003.rgrp
long	var.tfcmg003.rgr2
	
long	var.tfcmg003.proc,var.tfcmg003.auto	|#FBU.n
:STBL:tfcmg003,tfcmg007
:COMT:START


---  Changes in table design  ---
     
     A lot of functional changes are incorporated in %TV. 25 new fields are added in %TTtfcmg003. To know details of the fields and table mapping, following documents can be referred.
CS Data Conversion form Baan IVc4 to SSA Baan ERP 6.1 - Finance (D3439A US)

Also see the DD Results for new fields added.

The %SFtfcmg003.pacu is removed in %TV because in %TV , we no longer maintain suppliers and customers separately but as business partners. In the business partner table, user can link roles such as invoice-from, pay-to etc. So if for a payment method, the %SFtfcmg003.pacu is filled with some value that indicates whether the document is sent to next higher parent or highest parent, then the user can get a similar information from the field %TFtccom122.ptbp in %TV. From the value filled in there, user can know whether it is the same BP or the parent BP or the highest parent BP that is linked to the pay-to role.

For FBU
%TFtfcmg003.proc corresponds to the FBU field %SFtfcmg003.ddmt. 


---  Source and Target Sessions  ---
    
     Source : %SStfcmg0140m000
     Target : %TStfcmg0540m000 

---  Migration Logic  ---
In %TV there is no report group 17 or any equivalent report. When report group 17 is migrated from the %SV it is migrated as 15, US checks layout. Report group 17 will be added in %TV later. 


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:

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

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

	string		var.str.rdat(22)	

	string		var.str.rtyp(3)	

	string		var.str.pur.rtyp(3)	

	string		var.str.sls.rtyp(3)	

	string		var.tfcmg101.bpid(9)	

domain  tcmcs.s200m	var.str.err.mess
domain tcccty new.country
domain tccvat new.tax
:STBL:tfcmg101,tfacp200,tfacr200,bcstc008,bcstc011,tfcmg295
:COMT:START

---  Changes in table design  ---
Some new fields are added. See DDC results for the data model changes. The removed fields are:
tfcmg101.suno - It is replaced by %TFtfcmg101.ptbp. This is done through intermediate bc table %STbcstc008

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

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

For FBU
%TFtfcmg101.adty is filled from the FBU table field %SFtfcmg295.adty

tfcmg101.schn will be filled in post conversion.



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



---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:

:TEXT:END
False
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tf
:TCMOD:cmg
:TFLNO:103
:PRTX:START
migrate tfcmg103
:PRTX:END
:STAT:V
:VARI:long	var.tfcmg103.blac
long	var.tfcmg103.comp
long	var.tfcmg103.paid
long	var.tfcmg103.post
long	var.tfcmg103.rlet

domain	tcmcs.s200m	err.mess
domain	bcstc.bpid	var.tfcmg103.ptbp
:STBL:tfcmg103,bcstc008
:COMT:START


---  Changes in table design  ---
%SFtfcmg103.suno is removed in %TV. Now it is replaced by %TFtfcmg103.ptbp in %TV

Refer to the following document for more details:

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


---  Source and Target Sessions  ---
%SStfcmg1245m000  - %TStfcmg1503m000 


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:

:TEXT:END
False
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tf
:TCMOD:cmg
:TFLNO:104
:PRTX:START
if not get.exchange.rate.type("PUR", err.mess) then
	var.str.pur.rtyp = bcstc011.rtyp 
else
	var.str.pur.rtyp = ""
endif

migrate tfcmg104
:PRTX:END
:STAT:V
:VARI:string		var.str.rdat(22)	

|	string		var.str.ratt(3)	
	string 		var.str.pur.rtyp(3)
|	string		var.str.bpid(9)	
	string		var.tfcmg104.bpid(9)	


	long		var.tfcmg104.rade
	long		var.tfcmg104.adty
	domain tcmcs.s200m err.mess
domain tcccty new.country
domain tccvat new.tax
:STBL:tfcmg104,tfcmg105,bcstc008,bcstc011,tfcmg297
:COMT:START


---  Changes in table design  ---
%SFtfcmg104.suno is no more in %TTtfcmg104. Now it is replaced with %TFtfcmg104.ifbp

For FBU
%TFtfcmg104.adty is filled from the FBU table field %SFtfcmg297.adty


---  Source and Target Sessions  ---
%SStfcmg1110m000 - %TStfcmg1510m000


---  Migration Logic  ---


---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:

:TEXT:END
False
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tf
:TCMOD:cmg
:TFLNO:111
:PRTX:START
utc.default = utc(0,0)
if not get.exchange.rate.type("SLS", err.mess) then 	   |  # ravi.sn  
	var.str.sls.rtyp = bcstc011.rtyp
else
	var.str.sls.rtyp = ""
endif
if not get.exchange.rate.type("PUR", err.mess) then
	var.str.pur.rtyp = bcstc011.rtyp				 
else
	var.str.pur.rtyp = ""
endif						  |  # ravi.en
migrate tfcmg111
:PRTX:END
:STAT:M
:VARI:long var.tfcmg111.blac
long var.tfcmg111.adty
string		var.str.rdin(22)	|*

	string		var.str.rrdt(22)	|*

	string		var.str.rtin(3)	|*

	string		var.str.rrty(3)	|*

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

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

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

	string		utc.default(22)	|*

	string		var.tfcmg111.bpid(9)	|*
domain	tcmcs.s200m	err.mess
long var.tfcmg111.ratf
domain tcccty new.country
domain tccvat new.tax
:STBL:tfcmg111,tfacr200,tfacp200,tfcmg110,bcstc008,bcstc011,tfcmg296
:COMT:START

---  Changes in table design  ---
%SFtfcmg111.cuno, %SFtfcmg111.pcun and %SFtfcmg111.suno no more exists in %TTtfcmg111. Now %SFtfcmg111.cuno  and                  %SFtfcmg111.suno  are replaced by %TFtfcmg111.bpid.
%SFtfcmg111.pcun is replaced by %TFtfcmg111.prbp

Refer to the following document for more details:

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

For FBU
%TFtfcmg111.adty is filled from the FBU table field %SFtfcmg296.adty

tfcmg111.schn will be filled in post conversion.


---  Source and Target Sessions  ---
%SStfcmg2116s000, %SStfcmg2117s000 - %TStfcmg2116s000, %TStfcmg2117s000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:

:TEXT:END
False
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tf
:TCMOD:cmg
:TFLNO:130
:PRTX:START

var.date = utc(0,0,2)
var.tfcmg130.sequ = 0
select	tccom000.ccur
from	tccom000
as set with 1 rows
selectdo
endselect
migrate tfcmg001
:PRTX:END
:STAT:V
:VARI:long var.tfcmg130.sequ
long	var.coal	

string	bank.array(1,1)		based			|FBU

string	var.date(10)
|long var.oadt,order.count,counter1		|#148935.o
long var.tfcmg130.oadt,order.count,counter1	|#148935.n


domain	tcbool	bank.dumped			|FBU
:STBL:tfcmg101,tfcmg117,tccom000,tfcmg001
:COMT:START


---  Changes in table design  ---



---  Source and Target Sessions  ---
Target Session
%TStfcmg1530m000 
Source Session
%SStfcmg1120m000
%SStfcmg0110m000
%SStfcmg1117m000

---  Migration Logic  ---
For FBU
For the electronic data interchange between a company and its bank the rules of the 'Deutsche Bundesbank' - central bank in Germany have to be considered. There is a paper specifying the format of the bank file taking several trade laws into consideration. Table tfcmg117 is used to enter some required information to the bank file.
Business case: If you have a purchasing company buying oranges in Spain they will pay their invoices on a regular base on sending a disk to their bank. As the bank file will look similar every time it is good to have also defaults for the additional information. As a consequence tfcmg117 has to be migrated to tfcmg130.

tfcmg117 is maintained during the payment run if tfcmg003.sess is tfgld1262s000. For each combination of tfcmg103.bank, tfcmg103.paym the table tfcmg117 is maintained for each customer paid by the payment batch, using the tfcmg103.bank, tfcmg103.paym. As typically the tfcmg101 values are prepared respectively they can be used to create the defaults in tfcmg130.

---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
False
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tf
:TCMOD:cmg
:TFLNO:131
:PRTX:START


migrate tfcmg117
:PRTX:END
:STAT:V
:VARI:string var.str.bpid(8)
	domain tcmcs.s200m	var.err.mess

	long	var.oadt,var.tfcmg131.blac
	long	var.coal	
	domain	tcyesno	var.anno
:STBL:tfcmg101,tfcmg117,tfcmg103,tfcmg001,bcstc008
:COMT:START


---  Changes in table design  ---



---  Source and Target Sessions  ---
Target Session
%TStfcmg1531m000
Source Session
%SStfcmg1117m000
%SStfcmg1120m000

---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:



:TEXT:END
False
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tf
:TCMOD:cmg
:TFLNO:204
:PRTX:START
if not get.exchange.rate.type("SLS", err.mess) then  	   |  # ravi.sn  
	var.str.sls.rtyp = bcstc011.rtyp
else
	var.str.sls.rtyp = ""
endif
if not get.exchange.rate.type("PUR", err.mess) then
	var.str.pur.rtyp = bcstc011.rtyp				 
else
	var.str.pur.rtyp = ""
endif
if not get.exchange.rate.type("EU", err.mess) then
	var.str.eu.rtyp =  bcstc011.rtyp			
else
	var.str.eu.rtyp = ""
endif					|#ravi.en
|select	bccnv114.* 
|	from	bccnv114 
|	selectdo 
|		on case bccnv114.brtp 
|		case "PUR": 
|			var.str.pur.rtyp = bccnv114.rtyp 
|		break 
|		case "SLS": 
|			var.str.sls.rtyp = bccnv114.rtyp 
|		break 
|		case "EU ": 
|			var.str.eu.rtyp = bccnv114.rtyp 
|		break 
|		endcase 
|	endselect 

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

	string		var.tfcmg204.pbpt(9)	|*

	string		var.str.rdat(22)	|*

	string		var.str.rtyp(3)	|*

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

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

	string		var.str.eu.rtyp(3)	|*
domain	tcmcs.s200m	err.mess
long 	var.tfcmg204.adty
domain tcccty new.country
domain tccvat new.tax
:STBL:tfcmg204,tfacr200,tfacp200,bcstc011,bcstc008,tfcmg294
:COMT:START

---  Changes in table design  ---
%SFtfcmg204.suno and %SFtfcmg204.cuno are removed in %TV. They are replaced by %TFtfcmg204.bpid field.
Refer to the following document for more details:

CS Data Conversion form Baan IVc4 to SSA Baan ERP 6.1 - Finance (D3439A US)
For FBU
%TFtfcmg204.adty is filled from the FBU table field %SFtfcmg294.adty
tfcmg204.schn will be filled in post conversion.


---  Source and Target Sessions  ---

%SStfcmg2100s000 - %TStfcmg2100s000

---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:

:TEXT:END
False
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tf
:TCMOD:cmg
:TFLNO:507
:PRTX:START


migrate tfcmg950
:PRTX:END
:STAT:V
:VARI:
:STBL:tfcmg950
:COMT:START


---  Changes in table design  ---



---  Source and Target Sessions  ---
Source Session : %SStfcmg9150m000
Target Session : %TStfcmg5507m000

---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:



:TEXT:END
False
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tf
:TCMOD:gld
:TFLNO:008
:PRTX:START
select	tfgld004.clac, tfgld004.clcl 
from	tfgld004 
as set with 1 rows 
selectdo 
endselect

dummy.long = read.parameters.finance(error.mess)
dump 4	|* Exchange Gain and Loss Account is added

read.dimensions.used(						|#210751.sn
	dimension1.used,
	dimension2.used,
	dimension3.used,
	dimension4.used,
	dimension5.used)					|#210751.en

migrate tfgld008
migrate bcstf008
migrate tfgld009
:PRTX:END
:STAT:V
:VARI:long				var.tfgld008.alat
domain	tfgld.dbcr		var.tfgld008.dbcr
	long			var.tfgld008.ifas	
	long			var.tfgld008.iprj	
domain	tcicur			var.tfgld008.icur
domain 	tfgld.dopt		var.tfgld008.dim1
domain	tfgld.dopt		var.tfgld008.dim2
domain	tfgld.dopt		var.tfgld008.dim3
domain	tfgld.dopt		var.tfgld008.dim4
domain	tfgld.dopt		var.tfgld008.dim5
domain	tfgld.atyp		var.tfgld008.atyp
domain	tfgld.leac		var.tfgld008.cdca
domain	tfgld.leac		var.tfgld009.leac
domain	tfgld.dimn		var.tfgld009.dtyp
domain	tfgld.dimx		var.tfgld009.fdim
domain	tfgld.dimx		var.tfgld009.udim
	long			dummy.long
domain	tcmcs.s200m		error.mess
domain	tfgld.seri		var.tfgld008.dmsq		|#148329.n
domain	tcyesno			dimension1.used			|#210751.sn
domain	tcyesno			dimension2.used
domain	tcyesno			dimension3.used
domain	tcyesno			dimension4.used
domain	tcyesno			dimension5.used			|#210751.en
:STBL:tfgld004,tfgld008,bcstf000,bcstf007,bcstf008,tfacp005,tfacr005,tfgld009,tfgld198
:COMT:START



---  Changes in table design  ---
%GTtfgld0000


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

---  Migration Logic  ---
%GTtfgld0000


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


---  Migration Mapping Tables  ---
%TTbcstf007


---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:

:TEXT:END
True
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tf
:TCMOD:gld
:TFLNO:009
:PRTX:START
select	tfgld004.clac, tfgld004.clcl 
from	tfgld004 
as set with 1 rows 
selectdo 
endselect

dummy.long = read.parameters.finance(error.mess)
dump 4	|* Exchange Gain and Loss Account is added

read.dimensions.used(						|#210751.sn
	dimension1.used,
	dimension2.used,
	dimension3.used,
	dimension4.used,
	dimension5.used)					|#210751.en

migrate tfgld008
migrate bcstf008
migrate tfgld009
:PRTX:END
:STAT:V
:VARI:long				var.tfgld008.alat
domain	tfgld.dbcr		var.tfgld008.dbcr
	long			var.tfgld008.ifas	
	long			var.tfgld008.iprj	
domain	tcicur			var.tfgld008.icur
domain 	tfgld.dopt		var.tfgld008.dim1
domain	tfgld.dopt		var.tfgld008.dim2
domain	tfgld.dopt		var.tfgld008.dim3
domain	tfgld.dopt		var.tfgld008.dim4
domain	tfgld.dopt		var.tfgld008.dim5
domain	tfgld.atyp		var.tfgld008.atyp
domain	tfgld.leac		var.tfgld008.cdca
domain	tfgld.leac		var.tfgld009.leac
domain	tfgld.dimn		var.tfgld009.dtyp
domain	tfgld.dimx		var.tfgld009.fdim
domain	tfgld.dimx		var.tfgld009.udim
	long			dummy.long
domain	tcmcs.s200m		error.mess
domain	tfgld.seri		var.tfgld008.dmsq		|#148329.n
domain	tcyesno			dimension1.used			|#210751.sn
domain	tcyesno			dimension2.used
domain	tcyesno			dimension3.used
domain	tcyesno			dimension4.used
domain	tcyesno			dimension5.used			|#210751.en
:STBL:tfgld004,tfgld008,bcstf000,bcstf007,bcstf008,tfacp005,tfacr005,tfgld009,tfgld198
:COMT:START



---  Changes in table design  ---
%GTtfgld0000


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

---  Migration Logic  ---
%GTtfgld0000


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


---  Migration Mapping Tables  ---
%TTbcstf007


---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:

:TEXT:END
True
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tf
:TCMOD:gld
:TFLNO:102
:PRTX:START
|* Get Sales rate type 
ret.long = get.exchange.rate.type("SLS", error.message)
var.str.sls.rtyp = bcstc011.rtyp

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

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


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



:COMT:END
:TEXT:

:TEXT:END
False
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tf
:TCMOD:gld
:TFLNO:106
:PRTX:START
|* Get Sales rate type 
ret.long = get.exchange.rate.type("SLS", error.message)
var.str.sls.rtyp = bcstc011.rtyp

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

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

migrate tfgld106
:PRTX:END
:STAT:V
:VARI:string			var.str.bpid(9)
string			var.str.sls.rtyp(3)
string			var.str.pur.rtyp(3)
string			var.str.eu.rtyp(3)
string			var.str.rtyp(3)
long			var.tfgld106.tcsh
long			ret.long
long			element
domain	tcmcs.s200m	error.message
domain	tcccty		var.tfgld106.ccty
|domain	tccvat		var.tfgld106.cvat			|#SP2.o
domain	tfgld.rate	var.tfgld106.rate(3)
domain	tcratf		var.tfgld106.fact(3)
domain	tfgld.amnt	var.tfgld106.amth(3)
domain	tfgld.amnt	var.tfgld106.vamh(3)
long			var.tfgld106.adty
long			var.tfgld106.vtyp
long			var.tfgld106.catg
:STBL:tfgld106,bcstc011,bcstc008,tfcmg294,tfcmg295,tfcmg101
:COMT:START



:COMT:END
:TEXT:

:TEXT:END
False
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tf
:TCMOD:gld
:TFLNO:116
:PRTX:START

company = get.compnr()
migrate tfgld199
:PRTX:END
:STAT:V
:VARI:domain	tcccty		var.tfgld116.ccty
domain	tccvat		var.tfgld116.cvat
domain	tfgld.catg	var.tfgld116.catg
domain	tcmcs.st19m	var.tfgld116.rmah
domain	tcncmp		company
:STBL:tfgld199,tfgld102,tfgld106,tfgld018,tfgld011
:COMT:START

---  Changes in table design  ---
%STtfgld199 is replaced by %TTtfgld116 in %TV.


---  Source and Target Sessions  ---
%SStfgld1599m000 - %TStfgld1516m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
False
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tf
:TCMOD:gld
:TFLNO:117
:PRTX:START

migrate tfgld198
:PRTX:END
:STAT:V
:VARI:domain	tfgld.desc	var.tfgld117.desc
:STBL:tfgld198
:COMT:START

---  Changes in table design  ---
%STtfgld198 in %SV is replaced by %TTtfgld117 in %TV.


---  Source and Target Sessions  ---
%SStfgld1598s000 - %TStfgld1517m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:


:TEXT:END
False
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tf
:TCMOD:gld
:TFLNO:130
:PRTX:START
migrate tfust100
:PRTX:END
:STAT:V
:VARI:long var.tfgld130.rtyp
:STBL:tfust100
:COMT:START

---  Changes in table design  ---
%STtfust100 is migrated to %TTtfgld130. This is related to migration of the reconciliation type by ledger accounts.


---  Source and Target Sessions  ---
Source Session:%SStfust1100m000 

---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:

:TEXT:END
False
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tf
:TCMOD:gld
:TFLNO:131
:PRTX:START
migrate tfust106
:PRTX:END
:STAT:V
:VARI:long var.tfgld131.rtyp,var.tfgld131.vtyp
:STBL:tfust106
:COMT:START

---  Changes in table design  ---
%STtfust106 is migrated to %TTtfgld131


---  Source and Target Sessions  ---
Source Session:%SStfust1206m000,%SStfust1406m000,%SStfust1506m000 


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:

:TEXT:END
False
MO
:MPRF:28
:VERS:B4fb
:RELE:61
:CUST:sy30
:TCPAC:tf
:TCMOD:gld
:TFLNO:132
:PRTX:START
migrate tfust107
:PRTX:END
:STAT:V
:VARI:long var.tfgld132.rtyp,var.tfgld132.vtyp
:STBL:tfust107
:COMT:START

---  Changes in table design  ---
%STtfust107 is migrated to %TTtfgld132


---  Source and Target Sessions  ---
Source Session:%SStfust1407m000


---  Migration Logic  ---



---  Migration Parameters  ---



---  Migration Mapping Tables  ---



---  Technical Notes  ---



---  Performance  ---


:COMT:END
:TEXT:

:TEXT:END
False
