CE PLUS - Nota 000521

Módulo: DOC. IMPORTAÇÃO

Funcionalidade: DI

Data/Hora da Publicação: 23/12/2005 00:00:00

Data/Hora Última Alteração: 20/06/2011 12:08:54

Descrição da Nota: O PRINCIPAL OBJETIVO E EQUALIZAR O AMBIENTE COM RELAÇÃO AO RECL. COM DI.

Sintoma

O principal objetivo e equalizar o ambiente com relação ao Reclassificação da DI.

 

 

Solução

Ajuste no preenchimento da itab_bsis.

 

Versões Tratadas

6.0


Pré-Requisitos

Produto:

Nota

Descrição

AJUSTE NA DI - PARA DRAWBACK DO TIPO ISENÇÃO.

NCM COM 8 DÍGITOS.

AJUSTES NAS FUNÇÕES STANDARDS DO R/3.

DI, DULPICIDADE DE SEQUENCIAL AO CRIAR

CHAMADA DE EXIT NA DI ANTES DA F-05 E F-51 DA VARIAÇÃO CAMBIAL.

Informações Complementares

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

Nota Número 00521 Data: 23/12/2005 Hora: 15:26:19

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

 

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

Nota Número              : 00521

Categoria                : Melhoria

Prioridade               : Média

Versão PW.CE             : 6.0

Pacote                   : 00022

Agrupamento              : 00093

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

Referência às notas relacionadas:

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

 

00132  - 00001 - 6.0    - 00021  - CHAMADA DE EXIT NA DI ANTES DA F-05 E F-51 DA VARIAÇÃO CAMBIAL.

00237  - 00002 - 6.0    - 00021  - DI, DULPICIDADE DE SEQUENCIAL AO CRIAR

00302  - 00003 - 6.0    - 00021  - AJUSTES NAS FUNÇÕES STANDARDS DO R/3.

00379  - 00004 - 6.0    - 00021  - NCM COM 8 DÍGITOS.

00491  - 00005 - 6.0    - 00021  - AJUSTE NA DI - PARA DRAWBACK DO TIPO ISENÇÃO.

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

O PRINCIPAL OBJETIVO E EQUALIZAR O AMBIENTE COM RELAÇÃO AO RECL. COM DI.

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

Palavras Chave:

DI

 

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

Objetos da nota:

REPS /PWS/MZYCI023F03

REPS /PWS/MZYCI023TOP

 

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

Modificações efetuadas em REPS /PWS/MZYCI023F03

 

... < FORM RECLASSIFICACAO_IA >

***      append itab_matuse_aux.

***      clear itab_matuse_aux.

***    endif.

***  endloop.

 

  SORT itab_zycit006 BY belnr_p.

 

* < Início inclusão >               <-----Nota

* Chamado - 274855 - Inicio

**PWS251088 inicio

*  LOOP AT itab_zycit006.

*    LOOP AT itab_matuse_aux.

*      MOVE itab_zycit006 TO itab_zycit006_aux.

*      itab_zycit006_aux-hkont = itab_matuse_aux-hkont.

*      APPEND itab_zycit006_aux.

*    ENDLOOP.

*  ENDLOOP.

 

**  loop at itab_zycit006.

 

**    if not itab_matuse_aux[] is initial.

**PWS248911 inicio

**      select hkont dmbtr wrbtr belnr buzei from bsis into itab_bsis

**                for all entries in itab_matuse_aux

**                where bukrs eq /pws/zycie085-bukrs       and

**                  hkont     eq itab_matuse_aux-hkont     and

**                  gjahr     eq itab_zycit006-dtlanc+0(4) and

**                  belnr     eq itab_zycit006-belnr_p.

**

**        move itab_zycit006-tpfatura to itab_bsis-tpfatura.

**        append itab_bsis.

**        clear itab_bsis.

**      endselect.

*

**PWS251088 inicio

**      loop at itab_matuse_aux.

**        unpack itab_zycit006-belnr_p to itab_zycit006-belnr_p.

**        select single

**                 hkont dmbtr wrbtr belnr buzei from bsis into

*itab_bsis

**                  where bukrs eq /pws/zycie085-bukrs       and

**                    hkont     eq itab_matuse_aux-hkont     and

**                    gjahr     eq itab_zycit006-dtlanc+0(4) and

**                    belnr     eq itab_zycit006-belnr_p.

**

**        if sy-subrc = 0.

**          move itab_zycit006-tpfatura to itab_bsis-tpfatura.

**          append itab_bsis.

**          clear itab_bsis.

**        endif.

**      endloop.

*

*  IF NOT itab_zycit006_aux[] IS INITIAL.

*    SELECT hkont dmbtr wrbtr belnr buzei FROM bsis

*       INTO TABLE itab_bsis

*              FOR ALL ENTRIES IN itab_zycit006_aux

*              WHERE bukrs EQ /pws/zycie085-bukrs       AND

*                hkont     EQ itab_zycit006_aux-hkont     AND

*                gjahr     EQ itab_zycit006_aux-dtlanc+0(4) AND

*                belnr     EQ itab_zycit006_aux-belnr_p.

*

*  ENDIF.

*  LOOP AT itab_bsis.

*    LOOP AT itab_zycit006 WHERE belnr_p = itab_bsis-belnr.

*      MOVE itab_zycit006-tpfatura TO itab_bsis-tpfatura.

*      MODIFY itab_bsis.

*    ENDLOOP.

*  ENDLOOP.

*

**PWS248911 fim

*

**    endif.

**  endloop.

*

**PWS251088 fim

*

*

****  loop at itab_zycit006.

****

***** Buscando a conta de importação em andanento.

****    select single * from /pws/zycbt012

****                where codeven like '001V%'

****                  and codaux  = itab_matuse-j_1bmatuse.

****

****    select hkont dmbtr wrbtr belnr from bsis into itab_bsis

****              for all entries in itab_matuse_aux

****              where bukrs eq /pws/zycie085-bukrs            and

****                hkont     eq itab_matuse_aux-hkont     and

****                gjahr     eq itab_zycit006-dtlanc+0(4) and

****                belnr     eq itab_zycit006-belnr_p.

****

****      move itab_zycit006-tpfatura to itab_bsis-tpfatura.

****      append itab_bsis.

****

****    endselect.

****  endloop.

 

  LOOP AT itab_zycit006.

    IF NOT itab_matuse_aux[] IS INITIAL.

      LOOP AT itab_matuse_aux.

        UNPACK itab_zycit006-belnr_p TO itab_zycit006-belnr_p.

        SELECT hkont dmbtr wrbtr belnr buzei

          FROM bsis

           INTO TABLE itab_bsis_aux1

                  WHERE bukrs EQ /pws/zycie085-bukrs       AND

                    hkont     EQ itab_matuse_aux-hkont     AND

                    gjahr     EQ itab_zycit006-dtlanc+0(4) AND

                    gjahr     EQ itab_zycit006-dtlanc+0(4) AND

                    belnr     EQ itab_zycit006-belnr_p.

        LOOP AT itab_bsis_aux1.

          MOVE: itab_bsis_aux1-hkont TO itab_bsis-hkont,

                itab_bsis_aux1-buzei TO itab_bsis-buzei,

                itab_bsis_aux1-belnr TO itab_bsis-belnr.

 

          itab_bsis-dmbtr = itab_bsis-dmbtr + itab_bsis_aux1-dmbtr.

          itab_bsis-wrbtr = itab_bsis-wrbtr + itab_bsis_aux1-wrbtr.

        ENDLOOP.

        IF sy-subrc = 0.

          MOVE itab_zycit006-tpfatura TO itab_bsis-tpfatura.

          APPEND itab_bsis.

          CLEAR itab_bsis.

        ENDIF.

      ENDLOOP.

    ENDIF.

  ENDLOOP.

* < Fim   inclusão >               <-----Nota

 

IF NOT /pws/zycit000-provfre IS INITIAL.

  DELETE itab_bsis WHERE tpfatura = '02'.

ENDIF.

 

IF NOT /pws/zycit000-provseg IS INITIAL.

  DELETE itab_bsis WHERE tpfatura = '03'.

ENDIF.

 

LOOP AT itab_bsis.

  MOVE: itab_bsis-hkont TO itab_bsis_aux-hkont      ,

        itab_bsis-wrbtr TO itab_bsis_aux-wrbtr      ,

        itab_bsis-dmbtr TO itab_bsis_aux-dmbtr      ,

        itab_bsis-tpfatura TO itab_bsis_aux-tpfatura.

  COLLECT itab_bsis_aux.

ENDLOOP.

...

 

 

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

Modificações efetuadas em REPS /PWS/MZYCI023TOP

 

...

DATA: BEGIN OF itab_modo OCCURS 0.

DATA:   modo    LIKE /pws/zycbt039-modo,

        descr   LIKE /pws/zycbt039-descr.

        INCLUDE STRUCTURE spopli.

DATA: END OF itab_modo.

* < Início inclusão >               <-----Nota

DATA: BEGIN OF itab_bsis_aux1 OCCURS 10.

DATA: hkont    LIKE bsis-hkont       ,

      dmbtr    LIKE bsis-dmbtr       ,

      wrbtr    LIKE bsis-wrbtr       ,

      belnr    LIKE bsis-belnr       ,

      buzei    LIKE bsis-buzei       ,

      tpfatura LIKE /pws/zycit006-tpfatura.

DATA: END OF itab_bsis_aux1.

* < Fim   inclusão >               <-----Nota

DATA wa_zycbt011    LIKE /pws/zycbt011.

DATA:

        vl_variacao LIKE /pws/zycit085-vlfob,

        v_rec_ia    TYPE i,

        v_rec_ia_1  TYPE i,

...