You are on page 1of 12

Nºsecuen C E Descripción Consulta SQL

1C S Definición vardefine numOrder int


10 C S Creación de tcreate table $*asientos (external_file char(250), account_code char(10),
20 C S Lectura del fi copy in import file = $query_param1, colsep = F, table = $*asientos, acc
25 C S update del noupdate $*asientos t set external_file = '$query_param1'
30 C S update del d update $*asientos t set dc_market = '1' where dc_market = 'D'
40 C S update del d update $*asientos t set dc_market = '-1', amount = concat('-',amount), o
50 C S update del T update $*asientos t set journal_type = 'CV' where upper(external_file) lik
60 C S update del T update $*asientos t set journal_type = 'SF' where upper(external_file) lik
70 C S update del Tiupdate $*asientos t set journal_type = 'SR' where upper(external_file) lik
80 C S update del Tiupdate $*asientos t set journal_type = 'ST' where upper(external_file) lik
90 C S update del Tiupdate $*asientos t set journal_type = 'SC' where upper(external_file) lik
100 C S Insert acrbat insert into acrbatchinput (account, batch_id, client, period, trans_date, a
r(250), account_code char(10), filler1 char(5), accounting_period char(7),transaction_date char(8), filler2 char(2), record_type char(1), jou
sep = F, table = $*asientos, account_code = 10, filler1 = 5, accounting_period = 7,transaction_date = 8, filler2 = 2, record_type = 1, journa
query_param1'
where dc_market = 'D'
amount = concat('-',amount), other_amount = concat('-',other_amount) where dc_market = 'C'
V' where upper(external_file) like '%CAF%'
F' where upper(external_file) like '%CAR%'
R' where upper(external_file) like '%RRH%'
T' where upper(external_file) like '%TES%'
C' where upper(external_file) like '%FAT%'
_id, client, period, trans_date, amount, dc_flag, voucher_type, ext_inv_ref, description, due_date,currency, exch_rate, cur_amount, dim_1
har(2), record_type char(1), journal_number char(7), line char(7), amount char(19),dc_market char(2), allocation_indicator char(1), journa
ler2 = 2, record_type = 1, journal_number = 7, line = 7, amount = 18, dc_market = 1, allocation_indicator = 1, journal_type = 5, journal_sou

y, exch_rate, cur_amount, dim_1, dim_6, dim_3, dim_2, sequence_no, voucher_date, voucher_no, interface, status, trans_type) select t.ac
cation_indicator char(1), journal_type char(5), journal_source char(5), transaction_reference char(15), description char(25), entry_date ch
1, journal_type = 5, journal_source = 5, transaction_reference = 15, description = 25, entry_date = 8, entry_period = 7, due_date = 8, filler

e, status, trans_type) select t.account_code, ´$orderno´, ´$client´, convert(char,int,left(t.accounting_period,4)+right(t.accounting_period,2


scription char(25), entry_date char(8), entry_period char(7), due_date char(8), filler3 char(6), payment_allocation_ref char(9), payment_al
y_period = 7, due_date = 8, filler3 = 6, payment_allocation_ref = 9, payment_allocation_date = 8, payment_allocation_period = 7, asset_in

d,4)+right(t.accounting_period,2)), convert(char,date,t.transaction_date), convert(char,money,concat(concat(left(t.amount,15),´.´),right(t.


ocation_ref char(9), payment_allocation_date char(8), payment_allocation_period char(7), asset_indicador char(1), asset_code char(10), a
_allocation_period = 7, asset_indicador = 1, asset_code = 10, asset_subcode = 5, conversion_code = 5, conversion_rate = 18, other_amou

cat(left(t.amount,15),´.´),right(t.amount,3))), convert(char,int,dc_market), t.journal_type, t.transaction_reference, t.description, convert(c


r char(1), asset_code char(10), asset_subcode char(5), conversion_code char(5),conversion_rate char(18), other_amount char(19), other_a
version_rate = 18, other_amount = 18, other_amount_dec_places = 1, operator_id1 = 3, operator_id2 = 3, operator_id3 = 3, next_period

erence, t.description, convert(char,date,t.due_date), t.conversion_code, convert(char,float,concat(concat(left(t.conversion_rate,15),´.´),ri


other_amount char(19), other_amount_dec_places char(1), operator_id1 char(3), operator_id2 char(3), operator_id3 char(3), next_period
operator_id3 = 3, next_period = 1, text_linked = 1, rough_book_flag = 1, in_use_flag = 1, analysis_code0 = 15, analysis_code1 = 15,analys

(left(t.conversion_rate,15),´.´),right(t.conversion_rate,3))), convert(char,float,concat(concat(left(t.other_amount,15),´.´),right(t.other_amo
perator_id3 char(3), next_period char(1), sequence_no int, text_linked char(1), rough_book_flag char(1), in_use_flag char(1), analysis_cod
15, analysis_code1 = 15,analysis_code2 = 15,analysis_code3 = 15,analysis_code4 = 15,analysis_code5 = 15,analysis_code6 = 15,analysis_c

mount,15),´.´),right(t.other_amount,3))), t.analysis_code0, t.analysis_code1, concat(squeeze(t.analysis_code2),squeeze(t.conversion_code


_use_flag char(1), analysis_code0 char(15), analysis_code1 char(15),analysis_code2 char(15),analysis_code3 char(15),analysis_code4 char
5,analysis_code6 = 15,analysis_code7 = 15,analysis_code8 = 15,analysis_code9 = 15, posting_date = 8, update_order = 1, filler4 = 112, seq

e2),squeeze(t.conversion_code)), t.analysis_code3, t.sequence_no, convert(char,date,t.posting_date), 1, ´BI´, ´N´, ´GL´ from $*asientos t


e3 char(15),analysis_code4 char(15),analysis_code5 char(15),analysis_code6 char(15), analysis_code7 char(15),analysis_code8 char(15),an
ate_order = 1, filler4 = 112, sequence_no = s 1

BI´, ´N´, ´GL´ from $*asientos t


r(15),analysis_code8 char(15),analysis_code9 char(15), posting_date char(8), update_order char(1), filler4 char(112))

You might also like