Módulo: CÂMBIO EXPORTAÇÃO
Funcionalidade: Liquidação de Fatura
Data/Hora da Publicação: 20/04/2010 00:00:00
Data/Hora Última Alteração: 18/02/2011 17:03:34
Descrição da Nota: VINC/LIQ CP 2 FATS. ERRO CONTA BLOQUEADA NA SEGUNDA FAT-NÃO SALVA DADOS
Sintoma
1- Ao vincular um contrato de CP com duas faturas ou mais e liquidar as mesmas no mesmo momento,
após terminar a liquidação da primeira corretamente, outro usuário processou a conta do Contrato.
Neste instante, ao iniciar a liquidação da segunda fatura, exibe mensagem de que Conta do contrato
esta Bloqueada e estorna o que gerou da segunda fatura e abandona. Só que não esta salvando os dados
da primeira fatura, não sendo possível prosseguir posteriormente com o cenário.
2- Erro também na gravação do documento de saldo do contrato nas tabelas /pws/zycbt001 e
/pws/zycbt005.
3- Erro na F-30 de estorno, clearing do contrato, onde esta ficando com a atribuição Desm... na
partida de saldo.
Solução
1- Desconsiderar o tratamento deste flag antes do armazenamento dos dados.
2- Deixar sempre o campo v_zycbt001_belnr2 com o documento que tem o saldo do contrato.
3- Efetuar o duplo clique na primeira partida do clearing do contrato, ou seja, partida que tem o
saldo, alterando a atribuição da mesma, para não ficar Desm....
8.0
Produto:
Nota
Descrição
Informações Complementares
----------------------------------------------------------------------------------------------------
Nota Número 10084 Data: 20/04/2010 Hora: 13:24:54
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
Nota Número : 10084
Categoria : Erro de Programa
Prioridade : Média
Versão PW.CE : 8.0
Pacote : 00003
Agrupamento : 00018
----------------------------------------------------------------------------------------------------
Referência às notas relacionadas:
Número - Ordem - Versão - Pacote - Descrição Breve
03678 - 00001 - 7.0 - 00001 - LIQUIDAÇÃO - DA - CHECK DOS DOCUMENTOS - ESTORNO DAS FATURAS
06351 - 00002 - 7.0 - 00005 - LIQUIDAÇÃO - CHAVE DE REFERÊNCIA DESMEMBRAMENTO CLIENTE F-30
07760 - 00003 - 7.0 - 00007 - DA-LIQUIDAÇÃO E VINCULAÇÃO LIQ. AUTOMÁT - NORMAL/ARBITRAGEM/PERFO
07821 - 00004 - 7.0 - 00008 - LIQUIDAÇÃO - DESMEMBRAMENTO LIQUIDAÇÃO EM ANDAMENTO PARCIAL-ZFBDT
08536 - 00005 - 7.0 - 00009 - DA-VINCULAÇÃO/LIQUIDAÇÃO-OTIMIZAÇÃO-BUSCA TAXAS/TIPO DOCTO. POR C
08930 - 00006 - 7.0 - 00010 - CAPTAÇÃO - LIQUIDAÇÃO DAS CAPTAÇÕES DE PRÉ-PAGAMENTO E SECURITIZA
08935 - 00007 - 7.0 - 00010 - LIQUIDAÇÃO DE ACC COM PRÉ - CAPTAÇÕES
09062 - 00008 - 8.0 - 00001 - DESVINCULAÇÃO LIQUIDAÇÃO ATUALIZAÇÃO INCORRETA 001-DTVINCUL E 005
09941 - 00009 - 8.0 - 00002 - LIQUIDAÇÃO PARCIAL E DEPOIS RESTANTE DO SALDO-CONTABILIZAÇÃO E AT
09970 - 00010 - 8.0 - 00003 - CAPTAÇAO - ACC C/ PRÉ -CONTRATO DE DP - PROBLEMA BI
----------------------------------------------------------------------------------------------------
VINC/LIQ CP 2 FATS. ERRO CONTA BLOQUEADA NA SEGUNDA FAT-NÃO SALVA DADOS
----------------------------------------------------------------------------------------------------
Palavras Chave:
VINCULAÇÃO LIQUIDAÇÃO CP CÂMBIO PRONTO COM DUAS FATURAS OU MAIS
ERRO CONTA BLOQUEADA NA SEGUNDA FATURA NÃO SALVA DADOS PRIMEIRA FATURA
----------------------------------------------------------------------------------------------------
Objetos da nota:
REPS /PWS/MZYCB004F01
REPS /PWS/MZYCB004F02
REPS /PWS/MZYCB004F03
FUNC /PWS/ZYCB_TRANSACAO_F_30_P
----------------------------------------------------------------------------------------------------
Modificações efetuadas em REPS /PWS/MZYCB004F01
...
where bukrs eq space.
endif.
select single * from /pws/zycbt089
where bukrs eq /pws/zycbe001-bukrs.
if /pws/zycbt089-est_variacao eq 'X'.
perform seleciona_paga_documento2.
if v_erro_documento eq 'X'.
clear v_erro_documento.
exit.
endif.
* >> Início da exclusão: FORM GRAVA_TABELAS
if v_cta_bloq eq 'S'.
exit.
endif.
* << Fim da exclusão
call function '/PWS/ZYCB_ENQUEUE_CONTAS'
exporting
i_bloqueia = ' '
tables
itab_zycbt224 = itab_zycbe224
exceptions
zycbe224_null = 1
erro_bloqueio = 2
others = 3.
if sy-subrc ne 0.
...
----------------------------------------------------------------------------------------------------
Modificações efetuadas em REPS /PWS/MZYCB004F02
...
append itab_zycbe033.
v_desmembramento = 'X'.
endif.
clear: v_tot_cliente, /pws/zycbt084.
select * from /pws/zycbt006
into /pws/zycbt006
up to 1 rows
where nrseqc = /pws/zycbe001-nrseqc
and nrinvoic = itab_zycbt006-nrinvoic
and nrparcf = itab_zycbt006-nrparcf
* >> Início da exclusão: FORM DESMEMBRA_CLIENTE
and gsberf = itab_zycbt006-gsberf.
* << Fim da exclusão
* >> Início da inclusão: FORM DESMEMBRA_CLIENTE
and gsberf = itab_zycbt006-gsberf
and status = 'C'.
* << Fim da inclusão
endselect.
if sy-subrc ne 0.
if v_wrbtr = itab_zycbe033-wrbtr
and /pws/zycbe001-tpcontr(1) ne 'P'
and /pws/zycbe001-tpcontr(1) ne 'S'.
v_tot_cliente = 'X'.
endif.
endif.
v_tpcontabil = 'D_CLI'.
perform busca_dados_bi using itab_zycbe033-bukrs
...
...
v_tpcontabil = 'D_CON'.
perform busca_dados_bi using itab_zycbe033-bukrs
v_tpcontabil.
clear v_tot_contrato.
select * from /pws/zycbt006
into /pws/zycbt006
up to 1 rows
where nrseqc = /pws/zycbe001-nrseqc
and nrinvoic = itab_zycbt006-nrinvoic
and nrparcf = itab_zycbt006-nrparcf
* >> Início da exclusão: FORM DESMEMBRA_ACE
and gsberf = itab_zycbt006-gsberf.
* << Fim da exclusão
* >> Início da inclusão: FORM DESMEMBRA_ACE
and gsberf = itab_zycbt006-gsberf
and status = 'C'.
* << Fim da inclusão
endselect.
if sy-subrc ne 0.
if itab_zycbt005-slpagar is initial and
not itab_zycbt005-vlvinc < /pws/zycbe001-vlme
and /pws/zycbe001-tpcontr(1) ne 'P'
and /pws/zycbe001-tpcontr(1) ne 'S'.
v_tot_contrato = 'X'.
endif.
endif.
if v_tot_contrato is initial.
...
...
and /pws/zycbe001-tpcontr(1) ne 'S'.
v_vinc_tot = 'X'.
endif.
clear v_tot_cliente.
select * from /pws/zycbt006
into /pws/zycbt006
up to 1 rows
where nrseqc = /pws/zycbe001-nrseqc
and nrinvoic = itab_zycbt006-nrinvoic
and nrparcf = itab_zycbt006-nrparcf
* >> Início da exclusão: FORM ABRE_DOCTO_CLIENTE_2
and gsberf = itab_zycbt006-gsberf.
* << Fim da exclusão
* >> Início da inclusão: FORM ABRE_DOCTO_CLIENTE_2
and gsberf = itab_zycbt006-gsberf
and status = 'C'.
* << Fim da inclusão
endselect.
if sy-subrc ne 0.
v_tot_cliente = v_vinc_tot.
endif.
clear /pws/zycbt084.
if v_tot_cliente is initial.
loop at itab_zycbt034.
message i016 with itab_zycbt034-descricao.
endloop.
endif.
...
...
perform clear_date_batch.
clear v_vinc_tot.
perform fill_date6_f30_ace.
clear v_tot_contrato.
select * from /pws/zycbt006
into /pws/zycbt006
up to 1 rows
where nrseqc = /pws/zycbe001-nrseqc
and nrinvoic = itab_zycbt006-nrinvoic
and nrparcf = itab_zycbt006-nrparcf
* >> Início da exclusão: FORM ABRE_DOCTO_ACE_2
and gsberf = itab_zycbt006-gsberf.
* << Fim da exclusão
* >> Início da inclusão: FORM ABRE_DOCTO_ACE_2
and gsberf = itab_zycbt006-gsberf
and status = 'C'.
* << Fim da inclusão
endselect.
if sy-subrc ne 0.
if itab_zycbt005-slpagar is initial and
not itab_zycbt005-vlvinc < /pws/zycbe001-vlme
and /pws/zycbe001-tpcontr(1) ne 'P'
and /pws/zycbe001-tpcontr(1) ne 'S'.
v_tot_contrato = 'X'.
endif.
endif.
v_tpcontabil = 'D_CON'.
...
...
and /pws/zycbe001-tpcontr(1) ne 'S'.
v_vinc_tot = 'X'.
endif.
clear v_tot_cliente.
select * from /pws/zycbt006
into /pws/zycbt006
up to 1 rows
where nrseqc = /pws/zycbe001-nrseqc
and nrinvoic = itab_zycbt006-nrinvoic
and nrparcf = itab_zycbt006-nrparcf
* >> Início da exclusão: FORM DESMEMBRA_LIQ_AND
and gsberf = itab_zycbt006-gsberf.
* << Fim da exclusão
* >> Início da inclusão: FORM DESMEMBRA_LIQ_AND
and gsberf = itab_zycbt006-gsberf
and status = 'C'.
* << Fim da inclusão
endselect.
if sy-subrc ne 0.
v_tot_cliente = v_vinc_tot.
endif.
append itab_zycbe033.
v_tpcontabil = 'D_LIA'.
perform busca_dados_bi using itab_zycbe033-bukrs
v_tpcontabil.
clear /pws/zycbt084.
if v_tot_cliente is initial.
...
...
v_tpcontabil = 'D_CON'.
perform busca_dados_bi using itab_zycbe033-bukrs
v_tpcontabil.
clear v_tot_contrato.
select * from /pws/zycbt006
into /pws/zycbt006
up to 1 rows
where nrseqc = /pws/zycbe001-nrseqc
and nrinvoic = itab_zycbt006-nrinvoic
and nrparcf = itab_zycbt006-nrparcf
* >> Início da exclusão: FORM DESM_DESC_RECEB
and gsberf = itab_zycbt006-gsberf.
* << Fim da exclusão
* >> Início da inclusão: FORM DESM_DESC_RECEB
and gsberf = itab_zycbt006-gsberf
and status = 'C'.
* << Fim da inclusão
endselect.
if sy-subrc ne 0.
if itab_zycbt005-slpagar is initial and
not itab_zycbt005-vlme_p < /pws/zycbe001-vlme
and /pws/zycbe001-tpcontr(1) ne 'P'
and /pws/zycbe001-tpcontr(1) ne 'S'.
v_tot_contrato = 'X'.
endif.
endif.
if v_tot_contrato is initial.
...
----------------------------------------------------------------------------------------------------
Modificações efetuadas em REPS /PWS/MZYCB004F03
...
if <fs_zycbt006_aux>-belnr_d is initial.
v_zycbe001-belnr2 = <fs_zycbt006_aux>-belnr5.
else.
v_zycbe001-belnr2 = <fs_zycbt006_aux>-belnr_d.
endif.
v_zycbe001-dtvincul = <fs_zycbt006_aux>-dtpagto.
<fs_zycbe001>-belnr2 = v_zycbe001-belnr2.
<fs_zycbe001>-dtvincul = <fs_zycbt006_aux>-dtpagto.
unassign <fs_zycbt006_aux>.
else.
* >> Início da inclusão: FORM ATUALIZA_TAB_CONT_ERRO
if v_zycbe001-belnr2 is initial.
* << Fim da inclusão
v_zycbe001-belnr2 = <fs_zycbe001>-belnr2.
v_zycbe001-dtvincul = <fs_zycbe001>-dtvincul.
* >> Início da inclusão: FORM ATUALIZA_TAB_CONT_ERRO
endif.
* << Fim da inclusão
endif.
endif.
endif.
modify /pws/zycbt084 from table itab_zycbt084.
endform.
...
----------------------------------------------------------------------------------------------------
OBS.: O OBJETO ABAIXO FOI INCLUÍDO NO CORPO DA NOTA.
----------------------------------------------------------------------------------------------------
Modificações efetuadas em FUNC /PWS/ZYCB_TRANSACAO_F_30_P
...
'BDC_OKCODE' '=PI'.
endif.
perform bdc_screen using 'SAPDF05X' '3100'.
perform bdc_field using 'BDC_CURSOR' 'RF05A-ABPOS'.
perform bdc_field using 'BDC_OKCODE' '=Z+'.
perform bdc_screen using 'SAPDF05X' '3100'.
if t_dados-flag_nc eq 'X'.
perform bdc_field using: 'BDC_OKCODE' '=BU'.
else.
perform bdc_field using: 'BDC_OKCODE' '=BS'.
* >> Início da exclusão: FUNCTION /PWS/ZYCB_TRANSACAO_F_30_P
perform bdc_field using: 'BDC_OKCODE' '=BU'.
* << Fim da exclusão
endif.
perform verifica_empresas using t_dados-bukrs
'UMBUCHNG'
t_dados-d_newko
v_agkoa.
if v_linhas eq 1
and v_dp eq 'X'.
v_linhas = v_linhas + 1.
endif.
move t_dados-brnch to c_brnch.
...