CE PLUS - Nota 009629

Módulo: CÂMBIO EXPORTAÇÃO

Funcionalidade: Rotina de Pagamento

Data/Hora da Publicação: 28/12/2009 00:00:00

Data/Hora Última Alteração: 18/02/2011 13:58:30

Descrição da Nota: ROTINA DE PAGAMENTO, PROCESSAR BOLETO - STATUS FATURA

Sintoma

Na rotina de pagamento / processar boleto, algumas faturas aparecem de forma incorreta em relação

ao status da fatura ¿Total Liquidada / Não Liquidada¿.

 

 

Solução

O Programa estava se perdendo em determinados momentos. Para isso foi feito um ajuste no BI para que

o sistema efetue a seleção correta quando buscar o documento contabil na tabela.

 

Versões Tratadas

8.0


Pré-Requisitos

Produto:

Nota

Descrição

PROCESSAR BOLETO - COMISSÃO DE AGENTE LIQUIDADA FORA DO PW.CE

DESPESAS DE EXPORTAÇÃO

PROCESSAR BOLETO - PRESTAÇÃO DE CONTAS - EXCLUSÃO DE DADOS INCORRETA

PROCESSAR BOLETO - ERRO COMISSÃO DE AGENTE SEM REGISTRO NA /PWS/ZYCET010

PROCESSAR BOLETO - EXPORTAÇÃO - COMISSÃO DE AGENTE - COLUNA PAGTO.FAT

Informações Complementares

----------------------------------------------------------------------------------------------------

Nota Número 09629 Data: 28/12/2009 Hora: 11:34:53

----------------------------------------------------------------------------------------------------

 

----------------------------------------------------------------------------------------------------

Nota Número              : 09629

Categoria                : Erro de Programa

Prioridade               : Média

Versão PW.CE             : 8.0

Pacote                   : 00002

Agrupamento              : 00001

----------------------------------------------------------------------------------------------------

Referência às notas relacionadas:

Número - Ordem - Versão - Pacote - Descrição Breve

 

05036  - 00005 - 7.0    - 00003  - PROCESSAR BOLETO - EXPORTAÇÃO - COMISSÃO DE AGENTE - COLUNA PAGTO

06077  - 00004 - 7.0    - 00004  - DESPESAS DE EXPORTAÇÃO

06357  - 00003 - 7.0    - 00005  - PROCESSAR BOLETO - ERRO COMISSÃO DE AGENTE SEM REGISTRO NA /PWS/Z

07766  - 00002 - 7.0    - 00007  - PROCESSAR BOLETO - PRESTAÇÃO DE CONTAS - EXCLUSÃO DE DADOS INCORR

08907  - 00001 - 7.0    - 00010  - PROCESSAR BOLETO - COMISSÃO DE AGENTE LIQUIDADA FORA DO PW.CE

----------------------------------------------------------------------------------------------------

ROTINA DE PAGAMENTO, PROCESSAR BOLETO - STATUS FATURA

----------------------------------------------------------------------------------------------------

Palavras Chave:

ROTINA DE PAGAMENTO, PROCESSAR BOLETO - STATUS FATURA

 

----------------------------------------------------------------------------------------------------

Objetos da nota:

REPS /PWS/ZYGLR002

 

----------------------------------------------------------------------------------------------------

Modificações efetuadas em REPS /PWS/ZYGLR002

 

...

  v_usd           like /pws/zycbt112-vlme,

  v_control2      type i,

  v_zero8(8)      type n,

  v_codmodul      like /pws/zycbe118-codmodul,

  v_desp,

  v_mconame       type shlpname,

  l_display(1)    type c,

  v_fat(1)        type c,

  v_averb(1)      type c.

data: v_tabix type sy-tabix.

* >> Início da inclusão:

data: v_tabela(8) type c.

* << Fim da inclusão

data: begin of itab_result occurs 0.

        include structure ddshretval.

data: end of itab_result.

data: begin of record_tab occurs 0.

        include structure seahlpres.

data: end of record_tab.

selection-screen begin of block bl_1 with frame title text-001.

select-options: empresa for /pws/zycbt007-bukrs    no-display,

                data    for /pws/zycbt119-dtvencto no-display,

                fornece for lfa1-lifnr,

...

 

...

                       nrparcf  eq itab_zycbt017-nrparcf  and

                       gsberf   eq itab_zycbt017-gsberf."#EC CI_NOFIRST

        select * from /pws/zycbt030

                 into table itab_zycbt030

                 for all entries in itab_zycbt017

                 where nrinvoic = itab_zycbt017-nrinvoic

                   and nrparcf  = itab_zycbt017-nrparcf

                   and gsberf   = itab_zycbt017-gsberf.

      endif.

    endif.

* >> Início da inclusão: FORM SELECIONA_COMISSAO

    v_tabela = 'ZYCET010'.

* << Fim da inclusão

    loop at itab_zycet010.

      read table itab_zycbt017 with key nrinvoic = itab_zycet010-nrseq.

      if sy-subrc ne 0.

        delete itab_zycet010.

        continue.

      endif.

      read table itab_zycbt089 with key bukrs = itab_zycbt017-bukrs.

      read table itab_zycbt006 with key nrinvoic = itab_zycet010-nrseq.

      if ( itab_zycbt017-parvw      eq 'CG'   or

           itab_zycbt017-parvw      eq 'AD'   or

...

 

...

    endloop.

    select * from /pws/zycbt007 into table itab_zycbt007.

    if not itab_zycbt017[] is initial.

      select * from /pws/zycbt030

               into table itab_zycbt030

               for all entries in itab_zycbt017

               where nrinvoic = itab_zycbt017-nrinvoic

                 and nrparcf  = itab_zycbt017-nrparcf

                 and gsberf   = itab_zycbt017-gsberf.

    endif.

* >> Início da inclusão: FORM SELECIONA_COMISSAO

    v_tabela = 'ZYCET013'.

* << Fim da inclusão

    loop at itab_zycet013.

      read table itab_zycbt017 with key nrinvoic = itab_zycet013-nrseq.

      read table itab_zycbt089 with key bukrs = itab_zycbt017-bukrs.

      read table itab_zycbt006 with key nrinvoic = itab_zycet013-nrseq.

      read table itab_zycbt007 with key bukrs = itab_zycbt017-bukrs.

      if ( itab_zycbt017-parvw      eq 'CG'   or

           itab_zycbt017-parvw      eq 'AD'   or

           itab_zycbt017-parvw      eq 'DA' ) and

         ( itab_zycbt007-liq_com_cg ne 'RP'   or

         ( itab_zycbt007-comis      eq 'R'    and sy-subrc ne 0 ) ).

...

 

...

endform.

form verifica_fatura.

  data: v_vlliq like /pws/zycbt006-vlme.

  data: v_num10(10) type n.

  clear: itab_selreg-fat_liq, itab_selreg-controle.

  read table itab_t001 with key bukrs = itab_zycbt017-bukrs.

  if itab_t001-land1 ne 'BR'.

    if not itab_zycbt089-liq_com_ar eq ' '.

      move 'X' to itab_selreg-controle.

    endif.

* >> Início da inclusão: FORM VERIFICA_FATURA

    if v_tabela = 'ZYCET010'.

* << Fim da inclusão

    read table itab_zycet002 with key nrseq = itab_zycet010-nrseq.

    if sy-subrc ne 0.

      read table itab_zycet002 with key nrseq = itab_zycet013-nrseq.

* >> Início da inclusão: FORM VERIFICA_FATURA

      endif.

    else.

      read table itab_zycet002 with key nrseq = itab_zycet013-nrseq.

      if sy-subrc ne 0.

         read table itab_zycet002 with key nrseq = itab_zycet010-nrseq.

      endif.

* << Fim da inclusão

    endif.

    if sy-subrc eq 0.

      read table itab_bkpf with key bukrs = itab_zycet002-bukrs

                                    awkey = itab_zycet002-vbeln_vf

                                    awtyp = 'VBRK'

                                    awsys = ' '.

      if sy-subrc ne 0.

        v_num10 = itab_zycet002-vbeln_vf.

        itab_zycet002-vbeln_vf = v_num10.

        read table itab_bkpf with key bukrs = itab_zycet002-bukrs

...