CE PLUS - Nota 009943

Módulo: CÂMBIO IMPORTAÇÃO

Funcionalidade: Financiamento

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

Data/Hora Última Alteração: 18/02/2011 10:50:15

Descrição da Nota: AJUSTES NO PRINCIPAL E NO JUROS DO FINANCIAMENTO BOTÃO ELIMINAR LINHA

Sintoma

Quando há duas parcelas de principal e uma é excluída o sistema não refaz a contabilização.

 

 

Solução

Melhorias em todo o programa na parte de Juros e na parte de Principal.

 

Versões Tratadas

8.0


Pré-Requisitos

Produto:

Nota

Descrição

DESENVOLVIMENTO ADICIONAL - ESTORNO DA ROTINA MENSAL.

DA - COTAÇÃO DE MOEDAS PARA CAPTAÇÃO/FINANCIAMENTO/EMPRÉSTIMO

PADRONIZAÇÃO CLASSE /PWS/ZYCM PORTUGUÊS / INGLÊS

FINIMP - LONGO PRAZO - INFORMAÇÃO NO CABEÇALHO.

REFINANCIAMENTO - DA - BUSCA CONTAS POR TIPO MATERIAL FINANCIAMENTO

FINANCIAMENTO

FINANCIAMENTO IMPORTAÇÃO CRIAR

CODE INSPECTOR CÂMBIO

PONTOS DE EXIT-CAPTAÇÃO(CPT020)-EMPRÉSTIMO(EMP003)-FINANCIAMENTO(FIN003)

CODE INSPECTOR - CAMBIO EXPORTAÇÃO

Informações Complementares

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

Nota Número 09943 Data: 12/03/2010 Hora: 10:37:03

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

 

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

Nota Número              : 09943

Categoria                : Melhoria

Prioridade               : Alta

Versão PW.CE             : 8.0

Pacote                   : 00002

Agrupamento              : 00012

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

Referência às notas relacionadas:

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

 

01217  - 00011 - 6.0    - 00023  - PADRONIZAÇÃO CLASSE /PWS/ZYCM PORTUGUÊS / INGLÊS

03450  - 00010 - 7.0    - 00001  - DESENVOLVIMENTO ADICIONAL - ESTORNO DA ROTINA MENSAL.

04676  - 00009 - 7.0    - 00002  - FINANCIAMENTO IMPORTAÇÃO CRIAR

06730  - 00008 - 7.0    - 00005  - FINANCIAMENTO

06949  - 00007 - 7.0    - 00006  - REFINANCIAMENTO - DA - BUSCA CONTAS POR TIPO MATERIAL FINANCIAMEN

07965  - 00006 - 7.0    - 00008  - DA - COTAÇÃO DE MOEDAS PARA CAPTAÇÃO/FINANCIAMENTO/EMPRÉSTIMO

08579  - 00005 - 7.0    - 00010  - FINIMP - LONGO PRAZO - INFORMAÇÃO NO CABEÇALHO.

09055  - 00004 - 8.0    - 00001  - CODE INSPECTOR - CAMBIO EXPORTAÇÃO

09221  - 00003 - 8.0    - 00001  - CODE INSPECTOR CÂMBIO

09339  - 00001 - 8.0    - 00001  - PONTOS DE EXIT-CAPTAÇÃO(CPT020)-EMPRÉSTIMO(EMP003)-FINANCIAMENTO(

09936  - 00002 - 8.0    - 00002  - FINANCIAMENTO IMPORTAÇÃO, CONTABILIZAÇÃO

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

AJUSTES NO PRINCIPAL E NO JUROS DO FINANCIAMENTO BOTÃO ELIMINAR LINHA

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

Palavras Chave:

PRINCIPAL JURO FINANCIAMENTO NO BOTÃO ELIMINAR LINHA

 

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

Objetos da nota:

DOCU NA/PWS/ZYCMM273

MESS /PWS/ZYCMM273

REPS /PWS/MZYCM101F01

REPS /PWS/MZYCM101I01

REPS /PWS/MZYCM101O01

REPS /PWS/MZYCM101TOP

 

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

Modificações efetuadas em MESS /PWS/ZYCMM273

 

Criada mensagem 273.

 

Somatório das parcelas inferior ao valor do principal.

 

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

Modificações efetuadas em DOCU NA/PWS/ZYCMM273

 

Marcado Flag Auto Explicativo da mensagem 273.

 

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

Modificações efetuadas em REPS /PWS/MZYCM101F01

 

...

          itab_zycbt113p-dtfinal =

             ( itab_zycbt113p-dtinicio + itab_zycbt113p-nrdias ).

          itab_zycbt113p-nrdias  =

             ( itab_zycbt113p-dtfinal - itab_zycbt113p-dtinicio ).

        endif.

      endif.

    endif.

    itab_zycbt113p-vlme   = /pws/zycbe113-vlme.

    itab_zycbt113p-txtinf = /pws/zycbe113-txtinf.

    v_vlmel = v_vlme + /pws/zycbe113-vlme.

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

    if /pws/zycbe112-vlme => v_vlmel.

      itab_zycbt113p-vlme = /pws/zycbe113-vlme.

    else.

      itab_zycbt113p-vlme = /pws/zycbe112-vlme - v_vlme.

* << Fim da exclusão

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

    if /pws/zycbe112-vlme < v_vlmel.

* << Fim da inclusão

      message i031.

    endif.

    v_vlme = v_vlme + itab_zycbt113p-vlme.

    if /pws/zycbe113-nrdias <> itab_zycbt113p-nrdias

       or /pws/zycbe113-dtfinal <> itab_zycbt113p-dtfinal

       and not /pws/zycbe113-dtvecto is initial.

      itab_zycbt113p-dtvecto = itab_zycbt113p-dtfinal.

    endif.

    if itab_zycbt113p-dtvecto <> itab_zycbt113p-dtfinal.

      itab_zycbt113p-dtvecto = /pws/zycbe113-dtvecto.

...

 

...

  clear : itab_zycbt113pa.

  refresh : itab_zycbt113pa.

  select *

         from /pws/zycbt113

         into table itab_zycbt113pa

         where nrseq eq /pws/zycbe112-nrseq

           and tpparc eq 'P'.

  clear : v_modifp, v_mdparc.

  loop at itab_zycbt113pa where belnr ne ' '.

    read table itab_zycbt113p with key nrparc = itab_zycbt113pa-nrparc.

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

    v_tabix = sy-tabix.

* << Fim da inclusão

    if sy-subrc eq 0 and

       ( itab_zycbt113pa-vlme ne itab_zycbt113p-vlme or

         itab_zycbt113pa-dtvecto ne itab_zycbt113p-dtvecto ).

      v_modifp = 'X'.

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

    endif.

    if sy-subrc eq 0

   and v_modifp is initial.

      read table itab_excluidos

      with key nrparc = itab_zycbt113p-nrparc.

      if sy-subrc eq 0.

        if not itab_excluidos-belnr is initial.

          move itab_excluidos-belnr

            to itab_zycbt113p-belnr.

          modify itab_zycbt113p

           index v_tabix.

          delete itab_excluidos

           where nrparc eq itab_zycbt113p-nrparc.

* << Fim da inclusão

    endif.

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

      endif.

    endif.

* << Fim da inclusão

  endloop.

  if  /pws/zycbe112-nrseq+0(1) ne '5' and

     ( ( not /pws/zycbe112-belnr is initial and

             /pws/zycbe112-fassoc eq ' ' ) or

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

     not itab_excluidos[] is initial ).

* << Fim da exclusão

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

     not itab_excluidos[] is initial and v_modifp is initial ).

* << Fim da inclusão

    perform reverse_document_zycbt112.

    perform save_zycbt113.

  else.

    perform verifica_relevantes.

    if v_relevante is initial.

      clear: v_flag.

      if not /pws/zycbe112-dtdesem ne wa_zycbt112-dtdesem and

         not /pws/zycbe112-lifnr ne wa_zycbt112-lifnr.

        loop at itab_zycbt113p.

          read table itab_zycbt113pa

...

 

...

          endif.

        endif.

        perform save_zycbt113.

      else.

        clear: v_flag.

        loop at itab_zycbt113p.

          read table itab_zycbt113pa

               with key nrseq  = itab_zycbt113p-nrseq

                      tpparc = itab_zycbt113p-tpparc

                      nrparc = itab_zycbt113p-nrparc.

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

          if itab_zycbt113p-vlme eq itab_zycbt113pa-vlme.

* << Fim da exclusão

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

          if itab_zycbt113p-vlme eq itab_zycbt113pa-vlme

         and itab_zycbt113p-nrdias eq itab_zycbt113pa-nrdias.

* << Fim da inclusão

            if itab_zycbt113p-dtfinal ne itab_zycbt113pa-dtfinal and

               itab_zycbt113p-ftransf eq itab_zycbt113pa-ftransf.

              perform fill_date_fb02.

              modify /pws/zycbt112 from /pws/zycbe112.

              commit work.

            endif.

          endif.

        endloop.

        perform reverse_document_zycbt112.

        perform save_zycbt113.

...

 

...

      if /pws/zycbt154-dtcont > /pws/zycbe112-dtdesem

          and sy-tcode eq '/PWS/ZYCB101_C'.

        message w087.

      endif.

    endif.

  endif.

  v_tcode = text-237.

  loop at itab_zycbt113p .

    read table itab_zycbt113pa with key nrparc = itab_zycbt113p-nrparc.

    if itab_zycbt113p-vlme eq itab_zycbt113pa-vlme and

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

       itab_zycbt113p-nrdias eq itab_zycbt113pa-nrdias and

* << Fim da inclusão

       itab_zycbt113p-ftransf eq itab_zycbt113pa-ftransf

       and sy-subrc = 0.

      if not itab_zycbt113pa-belnr is initial.

        continue.

      endif.

    endif.

    read table itab_zycmt020 index sy-tabix.

    perform get_parameters_112.

    if itab_zycbt113p-ftransf eq 'C' or

       itab_zycbt113p-belnr   ne ' ' or

...

 

...

                space

                '061'.

      endloop.

      perform clear_date_batch.

    endif.

  endif.

endform.

form estorna_parcelas_excluidas.

  data:

    wa_mensagem like line of itab_mensagem.

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

  sort itab_excluidos

    by nrparc

       belnr.

  delete adjacent duplicates from itab_excluidos

                        comparing nrparc

                                  belnr.

* << Fim da inclusão

  loop at itab_excluidos.

    itab_zycbe033-mandt = sy-mandt.

    itab_zycbe033-tcode = 'FB08'.

    itab_zycbe033-tabela = text-008.

    itab_zycbe033-cpochv = /pws/zycbe112-nrseq.

    itab_zycbe033-belnr  = itab_excluidos-belnr.

    itab_zycbe033-bukrs  = wa_zycbt112-bukrs.

    read table itab_zycbt113p

               with key  dtpagto = '00000000'.

    if sy-subrc = 0.

...

 

 

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

Modificações efetuadas em REPS /PWS/MZYCM101I01

 

...

      perform call_zycb105_l.

    when 'SAVE'.

      if /pws/zycbe112-flinha = 'X' and

         not /pws/zycbe112-nrlinha is initial.

        if wa_zycbt114-saldo lt /pws/zycbe112-vlme.

          clear /pws/zycbe112-vlme.

          message e015 with text-029.

          exit.

        endif.

      endif.

* >> Início da inclusão: MODULE USER_COMMAND_0100

      clear v_vlme.

      loop at itab_zycbt113p.

        add itab_zycbt113p-vlme to v_vlme.

      endloop.

      if v_vlme ne /pws/zycbe112-vlme.

        message i273.

        exit.

      endif.

* << Fim da inclusão

      if /pws/zycbe112-tpcomis eq 'F'.

        describe table itab_zycbt113c lines v_li.

        if v_li > 1.

          message i015 with text-178 text-179.

          exit.

        endif.

      endif.

      perform ativa_pedido.

      if v_pedido eq 'X'.

        if not /pws/zycbe112-ebeln is initial and

...

 

...

          clear v_boleto_p.

          read table itab_zycbt113j with key mark = 'X'.

          if sy-subrc eq 0.

            loop at itab_zycbt113j where mark eq 'X'.

              perform checa_boleto.

              itab_zycbt113j-tpjurv = /pws/zycbe113-tpjurv.

              modify itab_zycbt113j.

            endloop.

            if v_dele is initial and v_boleto_p is initial.

              delete itab_zycbt113j where mark eq 'X'.

* >> Início da inclusão: MODULE USER_COMMAND_0103

              move 'X' to v_juros_excluidos.

* << Fim da inclusão

            endif.

          endif.

      endcase.

    when 'CS'.

      get cursor field v_campo value v_valor.

      if v_campo eq '/PWS/ZYCBE113-BELNR_P' and

         not v_valor is initial.

        i_belnr = v_valor.

        i_bukrs = /pws/zycbe112-bukrs.

        read table itab_zycbt113j with key belnr_p = v_valor.

...

 

 

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

Modificações efetuadas em REPS /PWS/MZYCM101O01

 

...

endmodule.

module load_itab_zycbt113p output.

  case sy-dynnr.

    when '0102'.

      v_countlinej = '00001'.

      if v_nrseqc is initial.

        if /pws/zycbe112-dtdesem ne '00000000' and sy-ucomm ne 'DELE'.

          perform create_zycbt113_p.

        endif.

      elseif sy-tcode ne  '/PWS/ZYCB101_C'.

* >> Início da exclusão: MODULE LOAD_ITAB_ZYCBT113P

        if itab_zycbt113p is initial.

* << Fim da exclusão

* >> Início da inclusão: MODULE LOAD_ITAB_ZYCBT113P

        if itab_zycbt113p[] is initial

       and itab_excluidos[] is initial.

* << Fim da inclusão

          select * from /pws/zycbt113 into table itab_zycbt113p

            where nrseq eq v_nrseqc

              and tpparc eq 'P'

              and status ne 'E'.

          itab_zycbt113p_ant[] = itab_zycbt113p[].

        endif.

      endif.

      loop at itab_zycbt113p.

        if itab_zycbt113p-dtvecto is initial.

          itab_zycbt113p-dtvecto = itab_zycbt113p-dtfinal.

...

 

...

           v_li > 0 and itab_zycbt113p-belnr_p is initial.

          v_flagp = 'X'.

          message w240.

          itab_zycbt113p-dtfinal = /pws/zycbe112-dtvencto.

          itab_zycbt113p-nrdias =

            ( itab_zycbt113p-dtfinal - itab_zycbt113p-dtinicio ).

        endif.

      endif.

    when '0103'.

      if not v_nrseqc is initial.

* >> Início da exclusão: MODULE LOAD_ITAB_ZYCBT113P

        if itab_zycbt113j is initial.

* << Fim da exclusão

* >> Início da inclusão: MODULE LOAD_ITAB_ZYCBT113P

        if itab_zycbt113j is initial

       and v_juros_excluidos is initial.

* << Fim da inclusão

          select * from /pws/zycbt113 into table itab_zycbt113j

            where nrseq eq v_nrseqc

              and tpparc eq 'J'

              and status ne 'E'.

          itab_zycbt113j_ant[] = itab_zycbt113j[].

        endif.

      endif.

      loop at itab_zycbt113j.

        if itab_zycbt113j-dtvecto is initial.

          itab_zycbt113j-dtvecto = itab_zycbt113j-dtfinal.

...

 

...

        fornecedor = lfa1-name1.

      endif.

      if not /pws/zycbe112-dtvencto is initial.

        if /pws/zycbe112-dtvencto is initial or

            /pws/zycbe112-dtdesem  is initial.

          clear nrdias.

        else.

          nrdias = ( /pws/zycbe112-dtvencto - /pws/zycbe112-dtdesem ).

          if not nrdias is initial.

            if sy-tcode ne  '/PWS/ZYCB101_C'.

* >> Início da exclusão: MODULE SET-SCREEN

              if itab_zycbt113p[] is initial.

* << Fim da exclusão

* >> Início da inclusão: MODULE SET-SCREEN

              if itab_zycbt113p[] is initial

             and itab_excluidos[] is initial.

* << Fim da inclusão

                select * from /pws/zycbt113

                  into table itab_zycbt113p

                 where nrseq eq v_nrseqc

                   and tpparc eq 'P'

                   and status ne 'E'.

              endif.

            endif.

            read table itab_zycbt113p index sy-tfill.

            if sy-tcode eq c_transacao_e.

              if itab_zycbt113p-ftransf = c_prazo_l.

...

 

 

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

Modificações efetuadas em REPS /PWS/MZYCM101TOP

 

...

  v_modifp ,                                                "#EC NEEDED

  txtmodalidade(25) TYPE c,

  v_syrepid        LIKE sy-repid,

  v_sydynnr        LIKE sy-dynnr,                           "#EC NEEDED

  v_nrseq_agrp     LIKE /pws/zycbt112-nrseq,

  v_codaux1        LIKE /pws/zyglt316-codaux1,

  v_conta_lp       LIKE /pws/zyglt316-konth,

  v_conta_cp       LIKE /pws/zyglt316-konth,

  v_conta_sp       LIKE /pws/zyglt316-konth,

  v_vltotfinan     LIKE /pws/zycme023-vlfinmi,

* >> Início da inclusão:

v_juros_excluidos,

* << Fim da inclusão

  v_msg_           TYPE c,

  v_nome_campo(35) TYPE c,

  v_comp(35)       TYPE c,

  v_cod_grupo      LIKE /pws/zyglt320-cod_grupo,

  cont             TYPE i VALUE 0,

  v_tela           LIKE sy-ucomm,

  v_line           TYPE i,

  v_tcode          LIKE sy-tcode,

  v_wrbtr          LIKE /pws/zycbe033-wrbtr,

  v_ult_pedi       LIKE ekpo-ebeln,

...