CE PLUS - Nota 012855

Módulo: CÂMBIO FINANCEIRO

Funcionalidade: SISCOSERV

Data/Hora da Publicação: 20/03/2013 13:25:24

Data/Hora Última Alteração: 20/03/2013 13:25:24

Descrição da Nota: SISCOSERV - GERAÇÃO XML

Sintoma

O programa está gerando a TAG 'NBS' com pontos separadores e a TAG 'MOEDA' com o código SAP e o MDIC

não está aceitando esses valores

 

 

Solução

O programa foi ajustado para preencher a TAG 'NBS' somente com números e a TAG 'MOEDA' com o código

da moeda

 

Versões Tratadas

9.0


Pré-Requisitos

Produto:

Nota

Descrição

SISCOSERV

SISCOSERV

Informações Complementares

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

Nota Número 12855 Data: 20/03/2013 Hora: 08:41:11

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

 

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

Nota Número              : 12855

Categoria                : Erro de Programa

Prioridade               : Média

Versão PW.CE             : 9.0

Pacote                   : 00004

Agrupamento              : 00150

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

Referência às notas relacionadas:

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

 

12480  - 00001 - 9.0    - 00001  - SISCOSERV

12811  - 00002 - 9.0    - 00003  - SISCOSERV

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

SISCOSERV - GERAÇÃO XML

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

Palavras Chave:

SISCOSERV - GERAÇÃO XML - TAG'S NBS E MOEDA

 

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

Objetos da nota:

REPS /PWS/LZYCAGFF01

 

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

Modificações efetuadas em REPS /PWS/LZYCAGFF01

 

...

                             using  p_zycat030 structure /pws/zycat030

                                    p_processo

                 changing document          type ref to if_ixml_document

                          element_principal type ref to if_ixml_element

                           element_operacao type ref to if_ixml_element

                           element_enquad   type ref to if_ixml_element

                           element_re_di    type ref to if_ixml_element.

  data: v_stras      type lfa1-stras,

        v_mcod3      type lfa1-mcod3,

        v_name1      type lfa1-name1.

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

  data: wa_zycat044 type /pws/zycat044.

* << Fim da inclusão

  if p_processo = 'IRVS'.

    call method document->create_simple_element

             exporting

                name      = 'IncluirRVS'

                parent    = document

             receiving

                rval      = element_principal.

  elseif p_processo = 'IRAS'.

    call method document->create_simple_element

             exporting

...

 

...

      concatenate attrib_value p_infcomp-tdline into attrib_value

        separated by space.

    endloop.

    condense attrib_value.

    call method document->create_simple_element

         exporting

            name      = 'InfoComplementar'

            value     = attrib_value

            parent    = element_principal.

  endif.

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

  attrib_value = p_zycat030-waers.

* << Fim da exclusão

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

  select single * from /pws/zycat044

    into wa_zycat044

    where waers = p_zycat030-waers.

  attrib_value = wa_zycat044-cod_moeda.

* << Fim da inclusão

  condense attrib_value.

  call method document->create_simple_element

       exporting

          name      = 'CodigoMoeda'

          value     = attrib_value

          parent    = element_principal.

endform.

form xml_inclusao_aditivo

        tables   p_zycat031     structure /pws/zycat031

                 p_zycat031_ant structure /pws/zycat031

...

 

...

  concatenate v_count sy-datum+2(2) into p_nrseq.

endform.

form xml_operacao tables   p_zycat032 structure /pws/zycat032

                  using    p_zycat031 structure /pws/zycat031

                           p_processo

                 changing document          type ref to if_ixml_document

                          element_principal type ref to if_ixml_element

                          element_operacao type ref to if_ixml_element

                          element_enquad   type ref to if_ixml_element

                          element_re_di    type ref to if_ixml_element.

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

  data: v_data(10) type c.

* << Fim da exclusão

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

  data: v_data(10) type c,

        v_subrc    type sy-subrc.

* << Fim da inclusão

  call method document->create_simple_element

       exporting

          name      = 'Operacao'

          parent    = element_principal

       receiving

          rval      = element_operacao.

  attrib_value = p_zycat031-operacao.

  condense attrib_value.

  if p_processo = 'IRVS' or

     p_processo = 'IARVS'.

...

 

...

            value     = attrib_value

            parent    = element_operacao.

  elseif p_processo = 'IRAS' or

         p_processo = 'IARAS'.

    call method document->create_simple_element

         exporting

            name      = 'NumeroServAdqEmpresa'

            value     = attrib_value

            parent    = element_operacao.

  endif.

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

  while v_subrc is initial.

    replace '.' with space into p_zycat031-nbs.

    v_subrc = sy-subrc.

  endwhile.

  condense p_zycat031-nbs no-gaps.

* << Fim da inclusão

  attrib_value = p_zycat031-nbs.

  condense attrib_value.

  call method document->create_simple_element

       exporting

          name      = 'CodigoNbs'

          value     = attrib_value

          parent    = element_operacao.

  attrib_value = p_zycat031-cod_pais.

  condense attrib_value.

  call method document->create_simple_element

...

 

...

             p_zycat030_ant structure /pws/zycat030

             p_processo

    changing document          type ref to if_ixml_document

             element_principal type ref to if_ixml_element

             element_operacao type ref to if_ixml_element

             element_enquad   type ref to if_ixml_element

             element_re_di    type ref to if_ixml_element.

  data: v_stras      type lfa1-stras,

        v_mcod3      type lfa1-mcod3,

        v_name1      type lfa1-name1.

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

  data: wa_zycat044 type /pws/zycat044.

* << Fim da inclusão

  if p_processo = 'RRVS'.

    call method document->create_simple_element

             exporting

                name      = 'RetificarRVS'

                parent    = document

             receiving

                rval      = element_principal.

  elseif p_processo = 'RRAS'.

    call method document->create_simple_element

             exporting

...

 

...

  if p_infcomp[] ne p_infcomp_ant[].

    clear attrib_value.

    loop at p_infcomp.

      concatenate attrib_value p_infcomp-tdline into attrib_value

        separated by space.

    endloop.

    condense attrib_value.

    call method document->create_simple_element

         exporting

            name      = 'InfoComplementar'

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

            value     = attrib_value

            parent    = element_principal.

  endif.

  if p_zycat030-waers ne p_zycat030_ant-waers.

    select single * from /pws/zycat044

      into wa_zycat044

      where waers = p_zycat030-waers.

    attrib_value = wa_zycat044-cod_moeda.

    condense attrib_value.

    call method document->create_simple_element

         exporting

            name      = 'CodigoMoeda'

* << Fim da inclusão

            value     = attrib_value

            parent    = element_principal.

  endif.

endform.

form xml_alteracao_operacao

      tables   p_zycat031_ant structure /pws/zycat031

               p_zycat032     structure /pws/zycat032

               p_zycat032_ant structure /pws/zycat032

      using    p_zycat031     structure /pws/zycat031

               p_processo

      changing document          type ref to if_ixml_document

               element_principal type ref to if_ixml_element

               element_operacao type ref to if_ixml_element

               element_enquad   type ref to if_ixml_element

               element_re_di    type ref to if_ixml_element.

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

  data v_data(10) type c.

* << Fim da exclusão

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

  data: v_data(10) type c,

        v_subrc    type sy-subrc.

* << Fim da inclusão

  read table p_zycat031_ant with key operacao = p_zycat031-operacao.

  if p_zycat031_ant ne p_zycat031.

    call method document->create_simple_element

         exporting

            name      = 'Operacao'

            parent    = element_principal

         receiving

            rval      = element_operacao.

    attrib_value = p_zycat031-operacao.

    condense attrib_value.

...

 

...

              parent    = element_operacao.

    elseif p_processo = 'RRAS' or

           p_processo = 'RARAS'.

      call method document->create_simple_element

           exporting

              name      = 'NumeroServAdqEmpresa'

              value     = attrib_value

              parent    = element_operacao.

    endif.

    if p_zycat031_ant-nbs ne p_zycat031-nbs.

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

      while v_subrc is initial.

        replace '.' with space into p_zycat031-nbs.

        v_subrc = sy-subrc.

      endwhile.

      condense p_zycat031-nbs no-gaps.

* << Fim da inclusão

      attrib_value = p_zycat031-nbs.

      condense attrib_value.

      call method document->create_simple_element

           exporting

              name      = 'CodigoNbs'

              value     = attrib_value

              parent    = element_operacao.

    endif.

    if p_zycat031_ant-cod_pais ne p_zycat031-cod_pais.

      attrib_value = p_zycat031-cod_pais.

...