Módulo: CÂMBIO EXPORTAÇÃO
Funcionalidade: Liquidação de Fatura
Data/Hora da Publicação: 17/06/2011 00:00:00
Data/Hora Última Alteração: 27/06/2011 14:21:29
Descrição da Nota: VINCULAÇÃO - LIQUIDAÇÃO COM LIQUIDAÇÃO EM ANDAMENTO E VME
Sintoma
Na liquidação modificar o sistema não estava exibindo a tela para escolher processo de Liquidação em
Andamento ou VME e assim contabilizava a liquidação errada, fazendo lançamento a mais no banco e
cliente.
O sistema estava atualizando o documento contábil incorretamente no contrato quando da liquidação de
um contrato de Câmbio Pronto e ACE quando tinha mais de uma fatura e dava erro na contabilização da
baixa do ACE contra o cliente.
Solução
O programa foi ajustado para atualizar o documento do ACE somente quando todas as contabilizações
forem finalizadas com sucesso
Informações Complementares
----------------------------------------------------------------------------------------------------
Nota Número 11253 Data: 17/06/2011 Hora: 09:46:56
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
Nota Número : 11253
Categoria : Erro de Programa
Prioridade : Média
Versão PW.CE : 8.0
Pacote : 00008
Agrupamento : 00074
----------------------------------------------------------------------------------------------------
Referência às notas relacionadas:
Número - Ordem - Versão - Pacote - Descrição Breve
06093 - 00001 - 7.0 - 00004 - CB - 444548 - CODE INSPECTOR E VERIFICAÇÃO AMPLIADA
06100 - 00002 - 7.0 - 00004 - CB - 444521 - CODE INSPECTOR E VERIFICAÇÃO AMPLIADA
07760 - 00003 - 7.0 - 00007 - DA-LIQUIDAÇÃO E VINCULAÇÃO LIQ. AUTOMÁT - NORMAL/ARBITRAGEM/PERFO
----------------------------------------------------------------------------------------------------
VINCULAÇÃO - LIQUIDAÇÃO COM LIQUIDAÇÃO EM ANDAMENTO E VME
----------------------------------------------------------------------------------------------------
Palavras Chave:
VINCULAÇÃO - LIQUIDAÇÃO COM LIQUIDAÇÃO EM ANDAMENTO E VME
LIQUIDAÇÃO MODIFICAR - DOCUMENTO DO CONTRATO DE CAMBIO PRONTO
----------------------------------------------------------------------------------------------------
Objetos da nota:
REPS /PWS/MZYCB004F02
REPS /PWS/MZYCB004F03
REPS /PWS/MZYCB009F10
----------------------------------------------------------------------------------------------------
Modificações efetuadas em REPS /PWS/MZYCB004F02
...
modify /pws/zycbt030 from table itab_zycbt030.
endif.
modify /pws/zycbt209 from table itab_zycbt209.
modify /pws/zycbt219 from table itab_zycbt219.
if /pws/zycbe001-tpcontr(1) ca 'CE'
or ( /pws/zycbe001-tpcontr(1) eq 'D' and
/pws/zycbt089-f_cont_vinc eq 'F' ).
update /pws/zycbt001 set: belnr2 = /pws/zycbe001-belnr2
dtvincul = /pws/zycbe001-dtvincul
where nrseqc = /pws/zycbe001-nrseqc.
* >> Início da inclusão: FORM ATUALIZA_TABELAS_TRANSP2
IF /pws/zycbe001-tpcontr(1) CA 'CE'.
UPDATE /pws/zycbt005 SET: belnr = /pws/zycbe001-belnr2
WHERE nrseqc = /pws/zycbe001-nrseqc.
* << Fim da inclusão
endif.
* >> Início da inclusão: FORM ATUALIZA_TABELAS_TRANSP2
ENDIF.
* << Fim da inclusão
clear itab_zycbt005_ant.
refresh: itab_zycbt005_ant, itab_zycbt006_pre.
move itab_zycbt005[] to itab_zycbt005_ant[].
clear v_exec_arb.
if v_vinculacao is initial.
commit work.
...
...
and nrinvoic = itab_zycbt006-nrinvoic
and dtvincul = itab_zycbt006-dtvincul
and gsberf = itab_zycbt006-gsberf
and nrparcf = itab_zycbt006-nrparcf.
itab_zycbt069-belnr = itab_zycbt069-belnr_d.
modify itab_zycbt069.
endloop.
if itab_zycbt006-tpcontr(1) ca 'CE'
or ( /pws/zycbe001-tpcontr(1) eq 'D' and
/pws/zycbt089-f_cont_vinc eq 'F' ).
* >> Início da exclusão: FORM LANCAMENTO_PROVISAO2
/pws/zycbe001-belnr2 = v_zycbe001-belnr2.
* << Fim da exclusão
* >> Início da inclusão: FORM LANCAMENTO_PROVISAO2
/pws/zycbe001-belnr2 = itab_zycbt006-belnr_d.
* << Fim da inclusão
/pws/zycbe001-dtvincul = v_zycbe001-dtvincul.
endif.
endloop.
sy-subrc = v_subrc.
endform.
form desmembra_cliente
using p_performance
changing v_subrc.
data:
v_wrbtr like bsid-wrbtr,
...
----------------------------------------------------------------------------------------------------
Modificações efetuadas em REPS /PWS/MZYCB004F03
...
delete from /pws/zycbt231 where nrseq = itab_zycbt231-nrseq
and nrseqc = itab_zycbt231-nrseqc
and dtpagext = itab_zycbt231-dtpagext
and dtpagto = itab_zycbt231-dtpagto.
delete itab_zycbt231.
if v_vinculacao is initial.
commit work.
endif.
endform.
form selecao_faturas.
* >> Início da exclusão: FORM SELECAO_FATURAS
if sy-tcode eq c_transacao_a.
* << Fim da exclusão
* >> Início da inclusão: FORM SELECAO_FATURAS
DATA: itab_zycbt005_rec type table of /pws/zycbt005,
wa_zycbt005_rec type /pws/zycbt005,
itab_zycbt006_rec TYPE TABLE OF /pws/zycbt006,
wa_zycbt006_rec TYPE /pws/zycbt006.
IF sy-tcode EQ c_transacao_a AND
NOT itab_zycbt006[] IS INITIAL.
* << Fim da inclusão
select nrinvoic gsberf nrparcf vlme dtvincul tpfatura_or
from /pws/zycbt006
into table it_zycbt006
for all entries in itab_zycbt006
where nrinvoic = itab_zycbt006-nrinvoic
and nrparcf = itab_zycbt006-nrparcf
and gsberf = itab_zycbt006-gsberf
and dtvincul = itab_zycbt006-dtvincul. "#EC CI_NOFIRST
endif.
* >> Início da exclusão: FORM SELECAO_FATURAS
check not itab_zycbt005[] is initial and
itab_zycbt005_ant[] is initial.
* << Fim da exclusão
* >> Início da inclusão: FORM SELECAO_FATURAS
SELECT * FROM /pws/zycbt006
INTO TABLE itab_zycbt006_rec
WHERE nrseqc = v_nrseqc
AND dtvincul = v_dtvincul
AND dtpagext = v_dtpagext
AND dtpagto = v_dtpagto.
loop at itab_zycbt005.
read table itab_zycbt006_rec into wa_zycbt006_rec
with key nrseqc = itab_zycbt005-nrseqc
nrinvoic = itab_zycbt005-nrinvoic
nrparcf = itab_zycbt005-nrparcf
gsberf = itab_zycbt005-gsberf
dtvincul = itab_zycbt005-dtvincul.
if sy-subrc ne 0 or
sy-subrc eq 0 and wa_zycbt006_rec-status = 'I'.
move-corresponding itab_zycbt005 to wa_zycbt005_rec.
append wa_zycbt005_rec to itab_zycbt005_rec.
clear wa_zycbt005_rec.
endif.
endloop.
CHECK NOT itab_zycbt005_rec[] IS INITIAL.
* << Fim da inclusão
select *
from /pws/zycbt226
into table it_zycbt226
* >> Início da exclusão: FORM SELECAO_FATURAS
for all entries in itab_zycbt005
where nrinvoic = itab_zycbt005-nrinvoic
and nrparcf = itab_zycbt005-nrparcf
and gsberf = itab_zycbt005-gsberf
* << Fim da exclusão
* >> Início da inclusão: FORM SELECAO_FATURAS
FOR ALL ENTRIES IN itab_zycbt005_rec
WHERE nrinvoic = itab_zycbt005_rec-nrinvoic
AND nrparcf = itab_zycbt005_rec-nrparcf
AND gsberf = itab_zycbt005_rec-gsberf
* << Fim da inclusão
and sld_exterior gt 0.
if sy-subrc eq 0.
select *
from /pws/zycbt209
into table it_zycbt209
for all entries in it_zycbt226
where nrinvoic = it_zycbt226-nrinvoic
and nrparcf = it_zycbt226-nrparcf
and gsberf = it_zycbt226-gsberf
and saldo gt 0. "#EC CI_NOFIRST
...
----------------------------------------------------------------------------------------------------
Modificações efetuadas em REPS /PWS/MZYCB009F10
...
refresh: it_mensagem,
itab_recurso,
itab_recurso_aux,
it_zycbt226,
it_zycbt209,
it_zycbt030,
it_zycbt017,
it_zycbt006.
endform.
form selecao_faturas.
* >> Início da exclusão: FORM SELECAO_FATURAS
if sy-tcode eq c_transacao_a.
* << Fim da exclusão
* >> Início da inclusão: FORM SELECAO_FATURAS
data: itab_zycbt005_rec type table of /pws/zycbt005,
wa_zycbt005_rec type /pws/zycbt005,
itab_zycbt006_rec type table of /pws/zycbt006,
wa_zycbt006_rec type /pws/zycbt006.
if sy-tcode eq c_transacao_a and
not itab_zycbt006[] is initial.
* << Fim da inclusão
select nrinvoic gsberf nrparcf vlme dtvincul tpfatura_or
from /pws/zycbt006
into table it_zycbt006
for all entries in itab_zycbt006
where nrinvoic = itab_zycbt006-nrinvoic
and nrparcf = itab_zycbt006-nrparcf
and gsberf = itab_zycbt006-gsberf
and dtvincul = itab_zycbt006-dtvincul. "#EC CI_NOFIRST
endif.
* >> Início da exclusão: FORM SELECAO_FATURAS
check not itab_zycbt005[] is initial and
itab_zycbt005_ant[] is initial.
* << Fim da exclusão
* >> Início da inclusão: FORM SELECAO_FATURAS
select * from /pws/zycbt006
into table itab_zycbt006_rec
where nrseqc = v_nrseqc
and dtvincul = v_dtvincul.
loop at itab_zycbt005.
read table itab_zycbt006_rec into wa_zycbt006_rec
with key nrseqc = itab_zycbt005-nrseqc
nrinvoic = itab_zycbt005-nrinvoic
nrparcf = itab_zycbt005-nrparcf
gsberf = itab_zycbt005-gsberf
dtvincul = itab_zycbt005-dtvincul.
if sy-subrc ne 0 or
sy-subrc eq 0 and wa_zycbt006_rec-status = 'I'.
move-corresponding itab_zycbt005 to wa_zycbt005_rec.
append wa_zycbt005_rec to itab_zycbt005_rec.
clear wa_zycbt005_rec.
endif.
endloop.
check not itab_zycbt005_rec[] is initial.
* << Fim da inclusão
select *
from /pws/zycbt226
into table it_zycbt226
* >> Início da exclusão: FORM SELECAO_FATURAS
for all entries in itab_zycbt005
where nrinvoic = itab_zycbt005-nrinvoic
and nrparcf = itab_zycbt005-nrparcf
and gsberf = itab_zycbt005-gsberf
* << Fim da exclusão
* >> Início da inclusão: FORM SELECAO_FATURAS
for all entries in itab_zycbt005_rec
where nrinvoic = itab_zycbt005_rec-nrinvoic
and nrparcf = itab_zycbt005_rec-nrparcf
and gsberf = itab_zycbt005_rec-gsberf
* << Fim da inclusão
and sld_exterior gt 0.
if sy-subrc eq 0.
select *
from /pws/zycbt209
into table it_zycbt209
for all entries in it_zycbt226
where nrinvoic = it_zycbt226-nrinvoic
and nrparcf = it_zycbt226-nrparcf
and gsberf = it_zycbt226-gsberf
and saldo gt 0. "#EC CI_NOFIRST
...