CE PLUS - Nota 009980

Módulo: CÂMBIO EXPORTAÇÃO

Funcionalidade: Vinculação

Data/Hora da Publicação: 19/03/2010 00:00:00

Data/Hora Última Alteração: 18/02/2011 17:55:40

Descrição da Nota: VINCULAÇÃO COM LIQ AUTOMÁTICA - MENSAGEM INCORRETA DOCUMENTO COMPENSADO

Sintoma

Ao criar uma vinculação com liquidação automática, de Câmbio Pronto ou Down Payment, esta exibindo

mensagem de que o documento esta compensado ou não existe, mas o mesmo esta ok.

 

 

Solução

Ajustar a gravação do campo /PWS/ZYCBT001-DTVINCUL na vinculação, onde o mesmo só deve ser gravado

quando gerar alguma contabilização. Retirar tratamento de busca da data do documento do contrato,

para que respeite apenas o campo /pws/zycbt001-dtvincul, que depois do ajuste da sua gravação

passará a ficar correto.

 

Versões Tratadas

8.0


Pré-Requisitos

Produto:

Nota

Descrição

DA-LIQUIDAÇÃO E VINCULAÇÃO LIQ. AUTOMÁT - NORMAL/ARBITRAGEM/PERFORMANCE

VINCULAÇAO - AJUSTES CHAMADO 432177

VINCULAÇÃO COM LIQ AUTOMÁTICA - MENSAGEM INCORRETA DOCUMENTO COMPENSADO

DESVINCULAÇÃO LIQUIDAÇÃO ATUALIZAÇÃO INCORRETA 001-DTVINCUL E 005-BELNR

VINCULAÇÃO - GRAVAR DATA VINCULAÇÃO NA TABELA /PWS/ZYCBT001 - DTVINCUL

Informações Complementares

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

Nota Número 09980 Data: 19/03/2010 Hora: 13:45:37

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

 

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

Nota Número              : 09980

Categoria                : Erro de Programa

Prioridade               : Média

Versão PW.CE             : 8.0

Pacote                   : 00003

Agrupamento              : 00012

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

Referência às notas relacionadas:

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

 

06165  - 00002 - 7.0    - 00004  - VINCULAÇAO - AJUSTES CHAMADO 432177

06166  - 00001 - 7.0    - 00004  - VINCULAÇÃO - GRAVAR DATA VINCULAÇÃO NA TABELA /PWS/ZYCBT001 - DTV

07760  - 00003 - 7.0    - 00007  - DA-LIQUIDAÇÃO E VINCULAÇÃO LIQ. AUTOMÁT - NORMAL/ARBITRAGEM/PERFO

09062  - 00004 - 8.0    - 00001  - DESVINCULAÇÃO LIQUIDAÇÃO ATUALIZAÇÃO INCORRETA 001-DTVINCUL E 005

09903  - 00005 - 8.0    - 00002  - VINCULAÇÃO COM LIQ AUTOMÁTICA - MENSAGEM INCORRETA DOCUMENTO COMP

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

VINCULAÇÃO COM LIQ AUTOMÁTICA - MENSAGEM INCORRETA DOCUMENTO COMPENSADO

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

Palavras Chave:

VINCULAÇÃO COM LIQ AUTOMÁTICA - MENSAGEM INCORRETA DOCUMENTO COMPENSADO

 

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

Objetos da nota:

REPS /PWS/MZYCB004F01

REPS /PWS/MZYCB004F02

REPS /PWS/MZYCB004F03

REPS /PWS/MZYCB009F04

REPS /PWS/MZYCB009F10

 

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

Modificações efetuadas em REPS /PWS/MZYCB004F01

 

...

        itab_zycbe033-belnr   = /pws/zycbe001-belnr.

        itab_zycbe033-dtdocto = v_data.

      else.

        itab_zycbe033-belnr   = /pws/zycbe001-belnr2.

        select single * from /pws/zycbt074

          where nrseqc = /pws/zycbe001-nrseqc.

        if not /pws/zycbt074-dtcont is initial.

          itab_zycbe033-dtdocto = /pws/zycbt074-dtcont.

        else.

          itab_zycbe033-dtdocto = /pws/zycbe001-dtvincul.

* >> Início da exclusão: FORM FILL_DATE6_F30_ACE

          if ( /pws/zycbe001-tpcontr(1)  eq 'D'   and

               /pws/zycbt089-f_cont_vinc eq 'F' ) or

             ( /pws/zycbe001-tpcontr(1)  eq 'C'   and

               wa_zycbt007-liq_cp        eq 'X' ).

            select * from /pws/zycbt005 into table itab_zycbt005_vinc

                     where nrseqc = /pws/zycbe001-nrseqc

                       and status = 'C'.

            sort itab_zycbt005_vinc by dtvincul.

            describe table itab_zycbt005_vinc lines v_linha.

            while v_linha > 0.

              read table itab_zycbt005_vinc index v_linha.

              if sy-subrc = 0.

                select dtvincul

                     up to 1 rows

                     from /pws/zycbt005 into wa_zycbt005-dtvincul

                     where nrseqc   = /pws/zycbe001-nrseqc

                       and dtvincul > itab_zycbt005_vinc-dtvincul

                       and status   ne 'C'.

                endselect.

                if sy-subrc ne 0.

                  exit.

                endif.

              endif.

              if sy-subrc = 0

                 and

                 itab_zycbt005_vinc-slpagar < itab_zycbt005_vinc-vlvinc

                 and

                 itab_zycbt005_vinc-dtvincul < /pws/zycbe001-dtvincul.

                itab_zycbe033-dtdocto = itab_zycbt005_vinc-dtvincul.

                exit.

              else.

                v_linha = v_linha - 1.

              endif.

            endwhile.

          endif.

* << Fim da exclusão

        endif.

      endif.

    else.

      if itab_zycbt005-belnr is initial.

        itab_zycbe033-belnr  = itab_zycbt005-belnr_vinc.

      else.

        itab_zycbe033-belnr  = itab_zycbt005-belnr.

      endif.

      itab_zycbe033-dtdocto = itab_zycbt005-dtbelnr.

* >> Início da exclusão: FORM FILL_DATE6_F30_ACE

      if ( /pws/zycbe001-tpcontr(1)  eq 'D'   and

           /pws/zycbt089-f_cont_vinc eq 'F' ) or

         ( /pws/zycbe001-tpcontr(1)  eq 'C'   and

           wa_zycbt007-liq_cp        eq 'X' ).

        select * from /pws/zycbt005 into table itab_zycbt005_vinc

                 where nrseqc = /pws/zycbe001-nrseqc

                   and status = 'C'.

        sort itab_zycbt005_vinc by dtvincul.

        describe table itab_zycbt005_vinc lines v_linha.

        while v_linha > 0.

          read table itab_zycbt005_vinc index v_linha.

          if sy-subrc = 0.

            select dtvincul

                 up to 1 rows

                 from /pws/zycbt005 into wa_zycbt005-dtvincul

                 where nrseqc   = /pws/zycbe001-nrseqc

                   and dtvincul > itab_zycbt005_vinc-dtvincul

                   and status   ne 'C'.

            endselect.

            if sy-subrc ne 0.

              exit.

            endif.

          endif.

          if sy-subrc = 0

             and

             itab_zycbt005_vinc-slpagar < itab_zycbt005_vinc-vlvinc

             and

             itab_zycbt005_vinc-dtvincul < itab_zycbt005-dtbelnr.

            itab_zycbe033-dtdocto = itab_zycbt005_vinc-dtvincul.

            exit.

          else.

            v_linha = v_linha - 1.

          endif.

        endwhile.

      endif.

* << Fim da exclusão

    endif.

  endif.

  itab_zycbt036-tcode   = 'F-30'.

  itab_zycbt036-tabela  = '/PWS/ZYCBT006'.

  itab_zycbt036-cpochv  = v_cpochv.

  perform determina_fator using v_parafator

                                v_defator.

  select *

         up to 1 rows

         from tcurx

...

 

 

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

Modificações efetuadas em REPS /PWS/MZYCB004F02

 

...

        itab_zycbe033-belnr   = v_zycbe001-belnr.

        itab_zycbe033-dtdocto = v_data.

      else.

        itab_zycbe033-belnr   = v_zycbe001-belnr2.

        select single * from /pws/zycbt074

          where nrseqc = v_zycbe001-nrseqc.

        if not /pws/zycbt074-dtcont is initial.

          itab_zycbe033-dtdocto = /pws/zycbt074-dtcont.

        else.

          itab_zycbe033-dtdocto = v_zycbe001-dtvincul.

* >> Início da exclusão: FORM DESMEMBRA_ACE

          if ( /pws/zycbe001-tpcontr(1)  eq 'D'   and

               /pws/zycbt089-f_cont_vinc eq 'F' ) or

             ( /pws/zycbe001-tpcontr(1)  eq 'C'   and

               wa_zycbt007-liq_cp        eq 'X' ).

            select * from /pws/zycbt005 into table itab_zycbt005_vinc

                     where nrseqc = /pws/zycbe001-nrseqc

                       and status = 'C'.

            sort itab_zycbt005_vinc by dtvincul.

            describe table itab_zycbt005_vinc lines v_linha.

            while v_linha > 0.

              read table itab_zycbt005_vinc index v_linha.

              if sy-subrc = 0.

                select dtvincul

                     up to 1 rows

                     from /pws/zycbt005 into wa_zycbt005-dtvincul

                     where nrseqc   = /pws/zycbe001-nrseqc

                       and dtvincul > itab_zycbt005_vinc-dtvincul

                       and status   ne 'C'.

                endselect.

                if sy-subrc ne 0.

                  exit.

                endif.

              endif.

              if sy-subrc = 0

                 and

                 itab_zycbt005_vinc-slpagar < itab_zycbt005_vinc-vlvinc

                 and

                 itab_zycbt005_vinc-dtvincul < v_zycbe001-dtvincul.

                itab_zycbe033-dtdocto = itab_zycbt005_vinc-dtvincul.

                exit.

              else.

                v_linha = v_linha - 1.

              endif.

            endwhile.

          endif.

* << Fim da exclusão

        endif.

      endif.

    else.

      itab_zycbe033-belnr   = itab_zycbt006-belnr5.

      itab_zycbe033-dtdocto = itab_zycbt005-dtbelnr.

      if /pws/zycbe001-belnr = itab_zycbt005-belnr.

        case /pws/zycbe001-fdtlanc.

          when 'O'.

            itab_zycbe033-dtdocto = /pws/zycbe001-dtcontr.

          when 'D'.

            itab_zycbe033-dtdocto = /pws/zycbe001-dtdesem.

          when others.

            itab_zycbe033-dtdocto = /pws/zycbe001-dtcred.

        endcase.

      elseif itab_zycbt006-belnr5 = itab_zycbt005-belnr.

        itab_zycbe033-dtdocto = itab_zycbt005-dtvincul.

* >> Início da exclusão: FORM DESMEMBRA_ACE

        if ( /pws/zycbe001-tpcontr(1)  eq 'D'   and

             /pws/zycbt089-f_cont_vinc eq 'F' ) or

           ( /pws/zycbe001-tpcontr(1)  eq 'C'   and

             wa_zycbt007-liq_cp        eq 'X' ).

          select * from /pws/zycbt005 into table itab_zycbt005_vinc

                   where nrseqc = /pws/zycbe001-nrseqc

                     and status = 'C'.

          sort itab_zycbt005_vinc by dtvincul.

          describe table itab_zycbt005_vinc lines v_linha.

          while v_linha > 0.

            read table itab_zycbt005_vinc index v_linha.

            if sy-subrc = 0.

              select dtvincul

                   up to 1 rows

                   from /pws/zycbt005 into wa_zycbt005-dtvincul

                   where nrseqc   = /pws/zycbe001-nrseqc

                     and dtvincul > itab_zycbt005_vinc-dtvincul

                     and status   ne 'C'.

              endselect.

              if sy-subrc ne 0.

                exit.

              endif.

            endif.

            if sy-subrc = 0

               and

               itab_zycbt005_vinc-slpagar < itab_zycbt005_vinc-vlvinc

               and

               itab_zycbt005_vinc-dtvincul < itab_zycbt005-dtvincul.

              itab_zycbe033-dtdocto = itab_zycbt005_vinc-dtvincul.

              exit.

            else.

              v_linha = v_linha - 1.

            endif.

          endwhile.

        endif.

* << Fim da exclusão

      endif.

    endif.

  endif.

  itab_zycbt036-tcode   = 'F-30'.

  itab_zycbt036-tabela  = 'ZYCBT006'.

  itab_zycbt036-cpochv  = itab_zycbe033-cpochv.

  if itab_zycbt006-v_armda is initial.

    itab_zycbt036-residuo = itab_zycbt006-vlme.

  else.

    read table itab_paridade with key nrinvoic = itab_zycbt006-nrinvoic

...

 

 

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

Modificações efetuadas em REPS /PWS/MZYCB004F03

 

...

              when 'O'.

                assign /pws/zycbe001-dtcontr to <fs_dtdocto>.

              when others.

                assign /pws/zycbe001-dtcred to <fs_dtdocto>.

            endcase.

          else.

            assign /pws/zycbt074-dtcont to <fs_dtdocto>.

          endif.

        else.

          assign /pws/zycbe001-dtvincul to <fs_dtdocto>.

* >> Início da exclusão: FORM DOCUMENTO_VINCULACAO

          if ( /pws/zycbe001-tpcontr(1)  eq 'D'   and

               /pws/zycbt089-f_cont_vinc eq 'F' ) or

             ( /pws/zycbe001-tpcontr(1)  eq 'C'   and

               wa_zycbt007-liq_cp        eq 'X' ).

            select * from /pws/zycbt005 into table itab_zycbt005_vinc

                     where nrseqc = /pws/zycbe001-nrseqc

                       and status = 'C'.

            sort itab_zycbt005_vinc by dtvincul.

            describe table itab_zycbt005_vinc lines v_linha.

            while v_linha > 0.

              read table itab_zycbt005_vinc index v_linha.

              if sy-subrc = 0.

                select dtvincul

                     up to 1 rows

                     from /pws/zycbt005 into wa_zycbt005-dtvincul

                     where nrseqc   = /pws/zycbe001-nrseqc

                       and dtvincul > itab_zycbt005_vinc-dtvincul

                       and status   ne 'C'.

                endselect.

                if sy-subrc ne 0.

                  exit.

                endif.

              endif.

              if sy-subrc = 0

                 and

                 itab_zycbt005_vinc-slpagar < itab_zycbt005_vinc-vlvinc

                 and

                 itab_zycbt005_vinc-dtvincul < <fs_dtdocto>.

                assign itab_zycbt005_vinc-dtvincul to <fs_dtdocto>.

                exit.

              else.

                v_linha = v_linha - 1.

              endif.

            endwhile.

          endif.

* << Fim da exclusão

        endif.

      endif.

  endcase.

  perform adiciona_documentos

    using

      p_vinculacao-bukrs_c

      <fs_belnr>

      <fs_dtdocto>

      'H'.

endform.

...

 

 

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

Modificações efetuadas em REPS /PWS/MZYCB009F04

 

...

        when 'O'.

          assign /pws/zycbe001-dtcontr to <fs_dtdocto>.

        when others.

          assign /pws/zycbe001-dtcred to <fs_dtdocto>.

      endcase.

    else.

      assign v_dtcont to <fs_dtdocto>.

    endif.

  else.

    assign /pws/zycbe001-dtvincul to <fs_dtdocto>.

* >> Início da exclusão: FORM DOCUMENTO_CONTRATO

    if ( /pws/zycbe001-tpcontr(1)  eq 'D'   and

         /pws/zycbt089-f_cont_vinc eq 'F' ) or

       ( /pws/zycbe001-tpcontr(1)  eq 'C'   and

         wa_zycbt007-liq_cp        eq 'X' ).

      select * from /pws/zycbt005 into table itab_zycbt005_vinc

               where nrseqc = /pws/zycbe001-nrseqc

                 and status = 'C'.

      sort itab_zycbt005_vinc by dtvincul.

      describe table itab_zycbt005_vinc lines v_line.

      while v_line > 0.

        read table itab_zycbt005_vinc index v_line.

        if sy-subrc = 0.

          select dtvincul

               up to 1 rows

               from /pws/zycbt005 into wa_zycbt005-dtvincul

               where nrseqc   = /pws/zycbe001-nrseqc

                 and dtvincul > itab_zycbt005_vinc-dtvincul

                 and status   ne 'C'.

          endselect.

          if sy-subrc ne 0.

            exit.

          endif.

        endif.

        if sy-subrc = 0

           and

           itab_zycbt005_vinc-slpagar < itab_zycbt005_vinc-vlvinc

           and

           itab_zycbt005_vinc-dtvincul < /pws/zycbe001-dtvincul.

          assign itab_zycbt005_vinc-dtvincul to <fs_dtdocto>.

          exit.

        else.

          v_line = v_line - 1.

        endif.

      endwhile.

    endif.

* << Fim da exclusão

  endif.

  perform adiciona_documentos

    using

      /pws/zycbe001-bukrs

      <fs_belnr>

      <fs_dtdocto>

      'H'.

endform.

form documentos_principal.

  field-symbols:

...

 

 

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

Modificações efetuadas em REPS /PWS/MZYCB009F10

 

...

          v_pos_itab = sy-tabix.

          itab_zycbt017-vlslf = ( itab_zycbt017-vlslf -

                                  itab_zycbt005_excluidas-vlme_p ).

          itab_zycbt017-fvinc = 'X'.

          modify itab_zycbt017 index v_pos_itab.

        endif.

      endif.

    endloop.

  endif.

  /pws/zycbe001-belnr2   = v_belnr_001.

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

  select dtvincul

       up to 1 rows

       from /pws/zycbt005 into /pws/zycbt005-dtvincul

       where nrseqc   = /pws/zycbe001-nrseqc.

  endselect.

* << Fim da inclusão

  if not ( ( /pws/zycbe001-tpcontr(1) = 'E' or

             /pws/zycbe001-tpcontr(1) = 'C' or

             ( /pws/zycbe001-tpcontr(1) = 'D' and

               /pws/zycbt089-f_cont_vinc = 'F' ) )

* >> Início da exclusão: FORM GRAVA_CONTABILIZACAO

     and sy-tcode  eq '/PWS/ZYCB009_A' ).

* << Fim da exclusão

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

            and ( sy-tcode  eq '/PWS/ZYCB009_A'

            or ( sy-tcode  eq '/PWS/ZYCB009_C' and sy-subrc eq 0 ) ) ).

* << Fim da inclusão

    if not itab_zycbe033-budat is initial.

      /pws/zycbe001-dtvincul = itab_zycbe033-budat.

    else.

      /pws/zycbe001-dtvincul = /pws/zycbe005-dtvincul.

    endif.

  endif.

  if /pws/zycbe001-tpcontr(1) eq 'C' and

     wa_zycbt007-liq_cp eq 'X'

     or ( /pws/zycbe001-tpcontr(1) eq 'D'  and

          /pws/zycbt089-f_cont_vinc eq 'F' ).

...