CE PLUS - Nota 011339

Módulo: CÂMBIO EXPORTAÇÃO

Funcionalidade: Desconto de Recebíveis

Data/Hora da Publicação: 20/07/2011 00:00:00

Data/Hora Última Alteração: 21/07/2011 09:45:08

Descrição da Nota: DESCONTO DE RECEBÍVEIS, CRIAR BOTÃO PARA SELECIONAR FATURAS

Sintoma

Na funcionalidade de Desconto de Recebíveis deverá ser incluído o botão de selecionar faturas.

 

 

Solução

Criado o botão para selecionar faturas com possibilidades de filtros por vários campos.

 

Versões Tratadas

8.0

Informações Complementares

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

Nota Número 11339 Data: 20/07/2011 Hora: 11:19:58

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

 

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

Nota Número              : 11339

Categoria                : Melhoria

Prioridade               : Média

Versão PW.CE             : 8.0

Pacote                   : 00008

Agrupamento              : 00078

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

Referência às notas relacionadas:

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

 

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

DESCONTO DE RECEBÍVEIS, CRIAR BOTÃO PARA SELECIONAR FATURAS

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

Palavras Chave:

DESCONTO DE RECEBÍVEIS, BOTÃO, SELECIONAR FATURAS

 

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

Objetos da nota:

CUAD /PWS/SAPMZYCB033

DYNP /PWS/SAPMZYCB033                        0200

DYNP /PWS/SAPMZYCB033                        0300

DYNP /PWS/SAPMZYCB033                        0301

REPS /PWS/MZYCB033F01

REPS /PWS/MZYCB033I01

REPS /PWS/MZYCB033O01

REPS /PWS/MZYCB033TOP

REPT /PWS/SAPMZYCB033

 

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

************************************

*                                  *

*  SOLICITAR DOWNLOAD DAS TELAS.:  *

*  /PWS/SAPMZYCB033  -  0200       *

*  /PWS/SAPMZYCB033  -  0300       *

*                                  *

************************************

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

*********************************************

* CRIAR TÍTS.GUI                            *

*                                           *

* 200 -> PROGRAMA    - /PWS/SAPMZYCB033     *

*     -> CODE TÍTULO - 200                  *

*     -> TÍTULO      - Seleção de Campos    *

*********************************************

*                                           *

* 300 -> PROGRAMA    - /PWS/SAPMZYCB033     *

*     -> CODE TÍTULO - 300                  *

*     -> TÍTULO      - Critérios de Seleção *

*                                           *

*********************************************

 

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

*********************************************

* CRIAR STATUS GUI                          *

*********************************************

***************

* STATUS 0200 *

***************

PROGRAMA     - /PWS/SAPMZYCB033

STATUS       - 0200

TEXTO BREVE  - CB - Escolha dos Critérios de Seleção das Faturas

CATEGORIA DE STATUS - STATUS DIÁLOGO

 

BARRA DE MENU

*************

 

BARRA DE BOTÕES

***************

1)

Código de função     - EXEC

Categoria de função  - Função de aplicação

Texto de função      - Executar

Nome de ícone        - ICON_EXECUTE_OBJECT

Texto informativo    - Executar seleções

Seleção direta       - E

 

2)

Código de função     - MARK

Categoria de função  - Função de aplicação

Texto de função      - Marcar Todos

Nome de ícone        - ICON_SELECT_ALL

 

3)

Código de função     - DESM

Categoria de função  - Função de aplicação

Texto de função      - Desmarcar Todos

Nome de ícone        - ICON_DESELECT_ALL

 

4)

Código de função     - %EX

Categoria de função  - E  Comando exit

Texto de função      - Cancelar

Nome de ícone        - ICON_CANCEL

 

TECLAS DE FUNÇÃO

****************

F5         - MARK - Marcar Todos

F6         - DESM - Desmarcar Todos

F8         - EXEC - Executar

Shift-F12  - %EX  - Cancelar

 

 

***************

* STATUS 0300 *

***************

PROGRAMA     - /PWS/SAPMZYCB033

STATUS       - 0300

TEXTO BREVE  - CB - Critérios de Seleção

CATEGORIA DE STATUS - STATUS DIÁLOGO

 

BARRA DE MENU

*************

 

BARRA DE BOTÕES

***************

Código de função     - EXEC

Categoria de função  - Função de aplicação

Texto de função      - Executar

Nome de ícone        - ICON_EXECUTE_OBJECT

Texto informativo    - Executar seleções

Seleção direta       - E

 

TECLAS DE FUNÇÃO

****************

F8         - EXEC - Executar

 

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

Modificações efetuadas em DYNP /PWS/SAPMZYCB033                        0200

 

MODIFICAR LÓGICA DE PROCESSAMENTO TELA 0200

* >> Início da inclusão:

PROCESS BEFORE OUTPUT.

 MODULE: STATUS_0200,

         LIMPA_CAMPOS.

PROCESS AFTER INPUT.

 MODULE: USER_COMMAND_0200,

         USER_COMMAND_EXIT AT EXIT-COMMAND.

* << Fim da inclusão

 

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

Modificações efetuadas em DYNP /PWS/SAPMZYCB033                        0300

 

MODIFICAR LÓGICA DE PROCESSAMENTO TELA 0300

* >> Início da inclusão:

PROCESS BEFORE OUTPUT.

 MODULE: STATUS_0300,

         set_screen_300.

PROCESS AFTER INPUT.

  MODULE:  selecionar_zycbt017,

           user_command_exit at exit-command.

* << Fim da inclusão

 

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

Modificações efetuadas em REPS /PWS/MZYCB033F01

 

...

    itab_pf-fcode = 'EXCL'.

    append itab_pf.

    itab_pf-fcode = 'ESTOR'.

    append itab_pf.

    itab_pf-fcode = 'NOOP'.

    append itab_pf.

    itab_pf-fcode = 'PROC'.

    append itab_pf.

    itab_pf-fcode = 'MODO'.

    append itab_pf.

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

    itab_pf-fcode = 'SELE'.

    append itab_pf.

* << Fim da inclusão

  else.

    itab_pf-fcode = 'AEND'.

    append itab_pf.

  endif.

  set pf-status '0100' excluding itab_pf.

  if v_status eq '0'.

    v_descricao = text-011.

  else.

    if sy-tcode eq c_transacao_c.

      v_descricao = text-009.

...

 

...

    when 'P+'.

      v_line_ini = v_line_ini + v_lines.

      if v_line_ini gt v_itens.

        v_line_ini = v_itens.

      endif.

    when 'P++'.

      v_line_ini = v_itens.

  endcase.

endform.

form exit_command.

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

  case sy-dynnr.

    when '0100'.

* << Fim da inclusão

  if sy-tcode eq c_transacao_c.

    leave program.

  else.

    leave to screen '0001'.

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

      endif.

    when '0200'.

      clear: v_nrinvoic_sel,

             v_re,

             v_nrre_ate,

             v_sd,

             v_gsberf,

             v_fkdat,

             v_kunag,

             v_dtvencto,

             v_dtbl,

             v_inco1.

      if ok_code = '%EX'.

        set screen 0.

        leave to screen 0.

      endif.

      if  ok_code = 'BACK'.

        set screen 100.

      endif.

    when '0300'.

      if ok_code = '%EX'.

        leave to screen 0.

      else.

        leave to screen '0200'.

* << Fim da inclusão

  endif.

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

    when others.

  endcase.

* << Fim da inclusão

endform.

form set_screen_tc.

  clear /pws/zyglt009.

  select single *

    from /pws/zyglt009

...

 

...

                  arbgb = '/PWS/ZYCBM'

                  msgty = 'I'

                  msgv1 = itab_zycbt034-descricao

                  txtnr = '061'

                  zeile = v_zeile.

        v_zeile = v_zeile + 1.

      endloop.

    endif.

  endif.

endform.

* >> Início da inclusão:

form limpa_selecao.

  /pws/zycbe017-nrinvoic  = ''.

  /pws/zycbe017-nrparcf   = ''.

  /pws/zycbe017-gsberf    = ''.

  /pws/zycbe017-dtbl      = ''.

  /pws/zycbe017-fkdat     = ''.

  /pws/zycbe017-kunag     = ''.

  /pws/zycbe017-dtvencto  = ''.

  /pws/zycbe017-inco1     = ''.

  /pws/zycbe017-nrsd      = ''.

  /pws/zycbe017-nrre      = ''.

  /pws/zycbe017a-nrinvoic = ''.

  /pws/zycbe017a-nrparcf  = ''.

  /pws/zycbe017a-gsberf   = ''.

  /pws/zycbe017a-dtbl     = ''.

  /pws/zycbe017a-fkdat    = ''.

  /pws/zycbe017a-kunag    = ''.

  /pws/zycbe017a-dtvencto = ''.

  /pws/zycbe017a-inco1    = ''.

  /pws/zycbe017a-nrsd     = ''.

  v_nrre_ate              = ''.

endform.

form set_screen_0301.

  set pf-status '0300'.

  set titlebar '300'.

  loop at screen.

    screen-input = '0'.

    screen-invisible = '1'.

    modify screen.

    if screen-name+15(9) ne 'OPTI_PUSH'.

      if v_nrinvoic_sel = 'X' and screen-group1 = 'FAT'.

        screen-invisible = '0'.

        screen-input = '1'.

        modify screen.

      endif.

      if v_gsberf = 'X' and screen-group1 = 'DIV'.

        screen-invisible = '0'.

        screen-input = '1'.

        modify screen.

      endif.

      if v_dtbl = 'X' and screen-group1 = 'DBL'.

        screen-invisible = '0'.

        screen-input = '1'.

        modify screen.

      endif.

      if v_fkdat = 'X' and screen-group1 = 'DFT'.

        screen-invisible = '0'.

        screen-input = '1'.

        modify screen.

      endif.

      if v_kunag = 'X' and screen-group1 = 'CLI'.

        screen-invisible = '0'.

        screen-input = '1'.

        modify screen.

      endif.

      if v_dtvencto = 'X' and screen-group1 = 'DV'.

        screen-invisible = '0'.

        screen-input = '1'.

        modify screen.

      endif.

      if v_inco1 = 'X' and screen-group1 = 'INC'.

        screen-invisible = '0'.

        screen-input = '1'.

        modify screen.

      endif.

      if v_re = 'X' and screen-group1 = 'NRE'.

        screen-invisible = '0'.

        screen-input = '1'.

        modify screen.

      endif.

      if v_sd = 'X' and screen-group1 = 'NRS'.

        screen-invisible = '0'.

        screen-input = '1'.

        modify screen.

      endif.

    endif.

  endloop.

endform.

form selecionar_zycbt017.

  data: v_nlin type i value is initial.

  if sy-ucomm eq 'CRET'.

    free:   itab_zycbt017_aux, itab_nrinvoic, itab_gsberf  , itab_fkdat,

            itab_kunag       , itab_dtvencto, itab_dtbl    , itab_inco1,

            itab_nrre        , itab_nrsd.

    select *

       into table itab_zycbt017_aux

       from /pws/zycbt017

        where nrinvoic in nrin

          and gsberf   in gsbe

          and fkdat    in fkda

          and kunag    in kuna

          and dtvencto in dtve

          and dtbl     in dtbl

          and inco1    in inco

          and nrre     in nrre

          and nrsd     in nrsd

          and status   eq space.

    describe table itab_zycbt017_aux lines v_nlin.

    loop at itab_zycbt017_aux.

      itab_zycbt017_aux-v_fsaldo = 'X'.

      modify itab_zycbt017_aux index sy-tabix.

      itab_zycbt219-bukrs = itab_zycbt017_aux-bukrs .

      itab_zycbt219-nrinvoic = itab_zycbt017_aux-nrinvoic .

      itab_zycbt219-gsberf = itab_zycbt017_aux-gsberf .

      itab_zycbt219-kunnr = itab_zycbt017_aux-kunag .

      itab_zycbt219-nrparcf = itab_zycbt017_aux-nrparcf .

      itab_zycbt219-waers = itab_zycbt017_aux-waers .

      itab_zycbt219-vlavinc   = itab_zycbt017_aux-vlavinc.

      itab_zycbt219-dtincl = sy-datum.

      itab_zycbt219-dtcredext = sy-datum.

      select * from /pws/zycbt030

               up to 1 rows

           where nrinvoic = itab_zycbt017_aux-nrinvoic and

                 nrparcf  = itab_zycbt017_aux-nrparcf  and

                 gsberf   = itab_zycbt017_aux-gsberf.

      endselect.

      if sy-subrc = 0.

        if /pws/zycbt030-vlsltrans > 0 .

          itab_zycbt219-vlsltrans = /pws/zycbt030-vlsltrans.

          append itab_zycbt219.

        else.

          continue.

        endif.

      endif.

    endloop.

    if itab_zycbt219[] is initial.

      message w015 with text-062.

    endif.

    if v_nlin is initial.

      message w015 with text-061.

    else.

      v_select = 'X'.

      set screen '0100'.

      leave to screen '0100'.

    endif.

  endif.

endform.

* << Fim da inclusão

 

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

Modificações efetuadas em REPS /PWS/MZYCB033I01

 

...

      PERFORM command_proc.

    WHEN 'BACK'.

      PERFORM command_back.

    WHEN 'DRILL'.

      PERFORM command_drill.

    WHEN 'P-' OR 'P--' OR 'P+' OR 'P++'.

      PERFORM command_page.

      tc_desrec-top_line = v_line_ini.

    WHEN 'MODO'.

      PERFORM command_modo.

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

    when 'SELE'.

      set screen '0200'.

      leave to screen '0200'.

* << Fim da inclusão

  ENDCASE.

ENDMODULE.

MODULE user_command_exit INPUT.

  PERFORM exit_command.

ENDMODULE.

MODULE user_command_0051 INPUT.

  CASE ok_code.

    WHEN 'BC'.

      CALL METHOD html_control->go_back.

      CLEAR ok_code.

...

 

...

      CLEAR ok_code.

  ENDCASE.

ENDMODULE.

MODULE seta_top_of_line INPUT.

  READ TABLE itab_zycbt219 INDEX tc_desrec-top_line.

  IF sy-subrc NE 0.

    DESCRIBE TABLE itab_zycbt219 LINES v_line_ini.

    tc_desrec-top_line = v_line_ini + 1.

  ENDIF.

ENDMODULE.

* >> Início da inclusão:

module user_command_0200 input.

  case ok_code.

    when 'EXEC'.

      if  v_inco1 = ' ' and  v_nrinvoic_sel = ' ' and v_gsberf = ' ' and

          v_kunag = ' ' and  v_dtvencto     = ' ' and v_fkdat  = ' ' and

          v_dtbl  = ' ' and  v_re           = ' ' and v_sd     = ' '.

        message w015 with text-076.

      else.

        perform limpa_selecao.

        call selection-screen 0301.

      endif.

    when 'MARK'.

       v_nrinvoic_sel = 'X'.

       v_gsberf       = 'X'.

       v_fkdat        = 'X'.

       v_kunag        = 'X'.

       v_dtvencto     = 'X'.

       v_dtbl         = 'X'.

       v_inco1        = 'X'.

       v_re           = 'X'.

       v_sd           = 'X'.

    when 'DESM'.

       v_nrinvoic_sel = ' '.

       v_gsberf       = ' '.

       v_fkdat        = ' '.

       v_kunag        = ' '.

       v_dtvencto     = ' '.

       v_dtbl         = ' '.

       v_inco1        = ' '.

       v_re           = ' '.

       v_sd           = ' '.

  endcase.

endmodule.

module selecionar_zycbt017 input.

  data: v_nlin type i value is initial.

  if ok_code eq 'EXEC'.

    free:  itab_nrinvoic,

           itab_gsberf,

           itab_fkdat,

           itab_kunag,

           itab_dtvencto,

           itab_dtbl,

           itab_inco1,

           itab_nrre,

           itab_nrsd.

    if not /pws/zycbe017-nrinvoic  is initial and

         /pws/zycbe017a-nrinvoic is initial.

      itab_nrinvoic-sign = 'I'.

      itab_nrinvoic-option = 'EQ'.

      itab_nrinvoic-low = /pws/zycbe017-nrinvoic.

      itab_nrinvoic-high = /pws/zycbe017a-nrinvoic.

      append itab_nrinvoic.

    elseif /pws/zycbe017-nrinvoic is initial and

          not /pws/zycbe017a-nrinvoic is initial.

      itab_nrinvoic-sign = 'I'.

      itab_nrinvoic-option = 'BT'.

      itab_nrinvoic-low = /pws/zycbe017-nrinvoic.

      itab_nrinvoic-high = /pws/zycbe017a-nrinvoic.

      append itab_nrinvoic.

    elseif not /pws/zycbe017-nrinvoic  is initial and

           not /pws/zycbe017a-nrinvoic is initial.

      itab_nrinvoic-sign = 'I'.

      itab_nrinvoic-option = 'BT'.

      itab_nrinvoic-low = /pws/zycbe017-nrinvoic.

      itab_nrinvoic-high = /pws/zycbe017a-nrinvoic.

      append itab_nrinvoic.

    endif.

    if not /pws/zycbe017-gsberf  is initial and

           /pws/zycbe017a-gsberf is initial.

      itab_gsberf-sign = 'I'.

      itab_gsberf-option = 'EQ'.

      itab_gsberf-low = /pws/zycbe017-gsberf.

      itab_gsberf-high = /pws/zycbe017a-gsberf.

      append itab_gsberf.

    elseif /pws/zycbe017-gsberf  is initial and

           not /pws/zycbe017a-gsberf is initial.

      itab_gsberf-sign = 'I'.

      itab_gsberf-option = 'BT'.

      itab_gsberf-low = /pws/zycbe017-gsberf.

      itab_gsberf-high = /pws/zycbe017a-gsberf.

      append itab_gsberf.

    elseif not /pws/zycbe017-gsberf  is initial and

           not /pws/zycbe017a-gsberf is initial.

      itab_gsberf-sign = 'I'.

      itab_gsberf-option = 'BT'.

      itab_gsberf-low = /pws/zycbe017-gsberf.

      itab_gsberf-high = /pws/zycbe017a-gsberf.

      append itab_gsberf.

    endif.

    if not /pws/zycbe017-kunag  is initial and

           /pws/zycbe017a-kunag is initial.

      itab_kunag-sign = 'I'.

      itab_kunag-option = 'EQ'.

      itab_kunag-low = /pws/zycbe017-kunag.

      itab_kunag-high = /pws/zycbe017a-kunag.

      append itab_kunag.

    elseif /pws/zycbe017-kunag  is initial and

           not /pws/zycbe017a-kunag is initial.

      itab_kunag-sign = 'I'.

      itab_kunag-option = 'BT'.

      itab_kunag-low = /pws/zycbe017-kunag.

      itab_kunag-high = /pws/zycbe017a-kunag.

      append itab_kunag.

    elseif not /pws/zycbe017-kunag  is initial and

           not /pws/zycbe017a-kunag is initial.

      itab_kunag-sign = 'I'.

      itab_kunag-option = 'BT'.

      itab_kunag-low = /pws/zycbe017-kunag.

      itab_kunag-high = /pws/zycbe017a-kunag.

      append itab_kunag.

    endif.

    if not /pws/zycbe017-inco1  is initial and

           /pws/zycbe017a-inco1 is initial.

      itab_inco1-sign = 'I'.

      itab_inco1-option = 'EQ'.

      itab_inco1-low = /pws/zycbe017-inco1.

      itab_inco1-high = /pws/zycbe017a-inco1.

      append itab_inco1.

    elseif /pws/zycbe017-inco1  is initial and

           not /pws/zycbe017a-inco1 is initial.

      itab_inco1-sign = 'I'.

      itab_inco1-option = 'BT'.

      itab_inco1-low = /pws/zycbe017-inco1.

      itab_inco1-high = /pws/zycbe017a-inco1.

      append itab_inco1.

    elseif not /pws/zycbe017-inco1  is initial and

           not /pws/zycbe017a-inco1 is initial.

      itab_inco1-sign = 'I'.

      itab_inco1-option = 'BT'.

      itab_inco1-low = /pws/zycbe017-inco1.

      itab_inco1-high = /pws/zycbe017a-inco1.

      append itab_inco1.

    endif.

    if ( ( /pws/zycbe017-fkdat ne '' )           and

         ( /pws/zycbe017-fkdat ne '00000000' ) ) and

       ( ( /pws/zycbe017a-fkdat eq '' )          or

         ( /pws/zycbe017a-fkdat eq '00000000' ) ).

      itab_fkdat-sign = 'I'.

      itab_fkdat-option = 'EQ'.

      itab_fkdat-low = /pws/zycbe017-fkdat.

      itab_fkdat-high = /pws/zycbe017a-fkdat.

      append itab_fkdat.

    elseif ( ( /pws/zycbe017-fkdat eq '' )           or

             ( /pws/zycbe017-fkdat eq '00000000' ) ) and

           ( ( /pws/zycbe017a-fkdat ne '' )          and

            ( /pws/zycbe017a-fkdat ne '00000000' ) ).

      itab_fkdat-sign = 'I'.

      itab_fkdat-option = 'BT'.

      itab_fkdat-low = /pws/zycbe017-fkdat.

      itab_fkdat-high = /pws/zycbe017a-fkdat.

      append itab_fkdat.

    elseif ( ( /pws/zycbe017-fkdat ne '' )           and

             ( /pws/zycbe017-fkdat ne '00000000' ) ) and

           ( ( /pws/zycbe017a-fkdat ne '' )          and

             ( /pws/zycbe017a-fkdat ne '00000000' ) ).

      itab_fkdat-sign = 'I'.

      itab_fkdat-option = 'BT'.

      itab_fkdat-low = /pws/zycbe017-fkdat.

      itab_fkdat-high = /pws/zycbe017a-fkdat.

      append itab_fkdat.

    endif.

    if ( ( /pws/zycbe017-dtvencto ne '' )           and

         ( /pws/zycbe017-dtvencto ne '00000000' ) ) and

       ( ( /pws/zycbe017a-dtvencto eq '' )          or

       ( /pws/zycbe017a-dtvencto eq '00000000' ) ).

      itab_dtvencto-sign = 'I'.

      itab_dtvencto-option = 'EQ'.

      itab_dtvencto-low = /pws/zycbe017-dtvencto.

      itab_dtvencto-high = /pws/zycbe017a-dtvencto.

      append itab_dtvencto.

    elseif ( ( /pws/zycbe017-dtvencto eq '' )           or

             ( /pws/zycbe017-dtvencto eq '00000000' ) ) and

           ( ( /pws/zycbe017a-dtvencto ne '' )          and

           ( /pws/zycbe017a-dtvencto ne '00000000' ) ).

      itab_dtvencto-sign = 'I'.

      itab_dtvencto-option = 'BT'.

      itab_dtvencto-low = /pws/zycbe017-dtvencto.

      itab_dtvencto-high = /pws/zycbe017a-dtvencto.

      append itab_dtvencto.

    elseif ( ( /pws/zycbe017-dtvencto ne '' )           and

             ( /pws/zycbe017-dtvencto ne '00000000' ) ) and

           ( ( /pws/zycbe017a-dtvencto ne '' )          and

           ( /pws/zycbe017a-dtvencto ne '00000000' ) ).

      itab_dtvencto-sign = 'I'.

      itab_dtvencto-option = 'BT'.

      itab_dtvencto-low = /pws/zycbe017-dtvencto.

      itab_dtvencto-high = /pws/zycbe017a-dtvencto.

      append itab_dtvencto.

    endif.

    if ( ( /pws/zycbe017-dtbl ne '' )           and

         ( /pws/zycbe017-dtbl ne '00000000' ) ) and

       ( ( /pws/zycbe017a-dtbl eq '' )          or

         ( /pws/zycbe017a-dtbl eq '00000000' ) ).

      itab_dtbl-sign = 'I'.

      itab_dtbl-option = 'EQ'.

      itab_dtbl-low = /pws/zycbe017-dtbl.

      itab_dtbl-high = /pws/zycbe017a-dtbl.

      append itab_dtbl.

    elseif ( ( /pws/zycbe017-dtbl eq '' )           or

             ( /pws/zycbe017-dtbl eq '00000000' ) ) and

           ( ( /pws/zycbe017a-dtbl ne '' )          and

             ( /pws/zycbe017a-dtbl ne '00000000' ) ).

      itab_dtbl-sign = 'I'.

      itab_dtbl-option = 'BT'.

      itab_dtbl-low = /pws/zycbe017-dtbl.

      itab_dtbl-high = /pws/zycbe017a-dtbl.

      append itab_dtbl.

    elseif ( ( /pws/zycbe017-dtbl ne '' )           and

             ( /pws/zycbe017-dtbl ne '00000000' ) ) and

           ( ( /pws/zycbe017a-dtbl ne '' )          and

             ( /pws/zycbe017a-dtbl ne '00000000' ) ).

      itab_dtbl-sign = 'I'.

      itab_dtbl-option = 'BT'.

      itab_dtbl-low = /pws/zycbe017-dtbl.

      itab_dtbl-high = /pws/zycbe017a-dtbl.

      append itab_dtbl.

    endif.

    if not /pws/zycbe017-nrre is initial and

           v_nrre_ate is initial.

      itab_nrre-sign = 'I'.

      itab_nrre-option = 'EQ'.

      itab_nrre-low = /pws/zycbe017-nrre.

      itab_nrre-high = v_nrre_ate.

      append itab_nrre.

    elseif /pws/zycbe017-nrre is initial and

           not v_nrre_ate is initial.

      itab_nrre-sign = 'I'.

      itab_nrre-option = 'BT'.

      itab_nrre-low = /pws/zycbe017-nrre.

      itab_nrre-high = v_nrre_ate.

      append itab_nrre.

    elseif not /pws/zycbe017-nrre  is initial and

           not v_nrre_ate is initial.

      itab_nrre-sign = 'I'.

      itab_nrre-option = 'BT'.

      itab_nrre-low = /pws/zycbe017-nrre.

      itab_nrre-high = v_nrre_ate.

      append itab_nrre.

    endif.

    if not /pws/zycbe017-nrsd  is initial and

           /pws/zycbe017a-nrsd is initial.

      itab_nrsd-sign = 'I'.

      itab_nrsd-option = 'EQ'.

      itab_nrsd-low = /pws/zycbe017-nrsd.

      itab_nrsd-high = /pws/zycbe017a-nrsd.

      append itab_nrsd.

    elseif /pws/zycbe017-nrsd  is initial and

           not /pws/zycbe017a-nrsd is initial.

      itab_nrsd-sign = 'I'.

      itab_nrsd-option = 'BT'.

      itab_nrsd-low = /pws/zycbe017-nrsd.

      itab_nrsd-high = /pws/zycbe017a-nrsd.

      append itab_nrsd.

    elseif not /pws/zycbe017-nrsd  is initial and

           not /pws/zycbe017a-nrsd is initial.

      itab_nrsd-sign = 'I'.

      itab_nrsd-option = 'BT'.

      itab_nrsd-low = /pws/zycbe017-nrsd.

      itab_nrsd-high = /pws/zycbe017a-nrsd.

      append itab_nrsd.

    endif.

    select *

       into table itab_zycbt017_aux

       from /pws/zycbt017

        where nrinvoic in itab_nrinvoic

          and gsberf   in itab_gsberf

          and fkdat    in itab_fkdat

          and kunag    in itab_kunag

          and dtvencto in itab_dtvencto

          and dtbl     in itab_dtbl

          and inco1    in itab_inco1

          and nrre     in itab_nrre

          and nrsd     in itab_nrsd

       and status   eq space.

    describe table itab_zycbt017_aux lines v_nlin.

    loop at itab_zycbt017_aux.

      itab_zycbt017_aux-v_fsaldo = 'X'.

      modify itab_zycbt017_aux index sy-tabix.

      itab_zycbt219-bukrs     = itab_zycbt017_aux-bukrs.

      itab_zycbt219-nrinvoic  = itab_zycbt017_aux-nrinvoic.

      itab_zycbt219-gsberf    = itab_zycbt017_aux-gsberf.

      itab_zycbt219-kunnr     = itab_zycbt017_aux-kunag.

      itab_zycbt219-nrparcf   = itab_zycbt017_aux-nrparcf.

      itab_zycbt219-waers     = itab_zycbt017_aux-waers.

      itab_zycbt219-vlavinc   = itab_zycbt017_aux-vlavinc.

      itab_zycbt219-dtincl    = sy-datum.

      itab_zycbt219-dtcredext = sy-datum.

      select * from /pws/zycbt030

               up to 1 rows

           where nrinvoic = itab_zycbt017_aux-nrinvoic and

                 nrparcf  = itab_zycbt017_aux-nrparcf  and

                 gsberf   = itab_zycbt017_aux-gsberf.

      endselect.

      if sy-subrc = 0.

        if /pws/zycbt030-vlsltrans > 0 .

          itab_zycbt219-vlsltrans = /pws/zycbt030-vlsltrans.

          append itab_zycbt219.

        else.

          continue.

        endif.

      endif.

    endloop.

    if v_nlin is initial.

      message w015 with text-061.

    else.

      v_select = 'X'.

      set screen '0100'.

      leave to screen '0100'.

    endif.

  endif.

endmodule.

* << Fim da inclusão

 

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

Modificações efetuadas em REPS /PWS/MZYCB033O01

 

...

    APPEND myevent TO myevent_tab.

    CALL METHOD html_control->set_registered_events

        EXPORTING

           events = myevent_tab.

    CREATE OBJECT evt_receiver.

    SET HANDLER evt_receiver->on_sapevent

                FOR html_control.

    PERFORM load_home_page.

  ENDIF.

ENDMODULE.

* >> Início da inclusão:

module STATUS_0200 output.

  set pf-status '0200'.

  set titlebar  '200'.

endmodule.

module LIMPA_CAMPOS output.

  if ok_code <> 'MARK' and ok_code <> 'DESM'.

    v_nrinvoic_sel = ' '.

    v_gsberf       = ' '.

    v_fkdat        = ' '.

    v_kunag        = ' '.

    v_dtvencto     = ' '.

    v_dtbl         = ' '.

    v_inco1        = ' '.

    v_re           = ' '.

    v_sd           = ' '.

  endif.

endmodule.

module STATUS_0300 output.

  set pf-status '0300'.

  set titlebar '300'.

endmodule.

module set_screen_300 output.

  loop at screen.

    screen-input = '0'.

    screen-invisible = '1'.

    modify screen.

    if v_nrinvoic_sel = 'X' and screen-group2 = 'FAT'.

      screen-invisible = '0'.

      screen-input = '1'.

      modify screen.

    endif.

    if v_gsberf = 'X' and screen-group2 = 'DIV'.

      screen-invisible = '0'.

      screen-input = '1'.

      modify screen.

    endif.

    if v_dtbl = 'X' and screen-group2 = 'DBL'.

      screen-invisible = '0'.

      screen-input = '1'.

      modify screen.

    endif.

    if v_fkdat = 'X' and screen-group2 = 'DFT'.

      screen-invisible = '0'.

      screen-input = '1'.

      modify screen.

    endif.

    if v_kunag = 'X'  and screen-group2 = 'CLI'.

      screen-invisible = '0'.

      screen-input = '1'.

      modify screen.

    endif.

    if v_dtvencto = 'X' and screen-group2 = 'DV'.

      screen-invisible = '0'.

      screen-input = '1'.

      modify screen.

    endif.

    if v_inco1 = 'X' and screen-group2 = 'INC'.

      screen-invisible = '0'.

      screen-input = '1'.

      modify screen.

    endif.

    if v_re = 'X' and screen-group2 = 'NRE'.

      screen-invisible = '0'.

      screen-input = '1'.

      modify screen.

    endif.

    if v_sd = 'X' and screen-group2 = 'NSD'.

      screen-invisible = '0'.

      screen-input = '1'.

      modify screen.

    endif.

  endloop.

endmodule.

* << Fim da inclusão

 

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

Modificações efetuadas em REPS /PWS/MZYCB033TOP

 

program /pws/sapmzycb031 message-id /pws/zycbm.

* >> Início da inclusão:

data  v_nrinvoic.

* << Fim da inclusão

include <icon>.

include /pws/mzycb033x01.

include /pws/zygli100.

include /pws/zygli101.

data: itab_zyglt100 like /pws/zyglt100 occurs 0 with header line.

data  v_tela_help   like sy-dynnr value '0052'.             "#EC *

tables:

        /pws/zycbt007,

        /pws/zyglt009,

        /pws/zycbt089,

        /pws/zycbt011,

        /pws/zycbt017,

        /pws/zycbt030,

        /pws/zyglt364,                                      "#EC *

        /pws/zycbt006,                                      "#EC *

* >> Início da exclusão:

        /pws/zycbt005.                                      "#EC *

* << Fim da exclusão

* >> Início da inclusão:

        /pws/zycbt005,                                      "#EC *

        /pws/zycbe017,

        /pws/zycbe017a.

* << Fim da inclusão

data: begin of itab_zycbt219_ant occurs 0.

        include structure /pws/zycbt219.

data: vlsltrans like /pws/zycbt030-vlsltrans,

      oper(1)   type c,

      mark(1)   type c,

      v_name1   type kna1-name1,

      vlavinc   type /pws/zycbt017-vlavinc.

data: end of itab_zycbt219_ant.

data: begin of itab_zycbt030 occurs 0.

        include structure /pws/zycbt030.

...

 

...

      status_d(1).

data: end of itab_zycbt030.

data: itab_zycbt013 like /pws/zycbt013 occurs 10 with header line."#EC *

data: begin of itab_modo occurs 0.

        include structure spopli.

data: end of itab_modo.

data: begin of itab_zyglt321 occurs 0.

        include structure /pws/zyglt321.

data: end of itab_zyglt321.

data: itab_zyglt368 like /pws/zyglt368 occurs 0 with header line."#EC *

* >> Início da inclusão:

data:   v_nrinvoic_sel  value space,

        v_gsberf        value space,

        v_fkdat         value space,

        v_kunag         value space,

        v_dtvencto      value space,

        v_dtbl          value space,

        v_inco1         value space,

        v_re            value space,

        v_sd            value space,

        v_nrre_ate      like /pws/zycbe017-nrre,

        v_select        type c.

data:  begin of itab_nrinvoic occurs 1,

         sign(1)   type c,

         option(2) type c,

         low       like /pws/zycbe017-nrinvoic,

         high      like /pws/zycbe017a-nrinvoic,

       end of itab_nrinvoic.

data:  begin of itab_gsberf occurs 1,

         sign(1)   type c,

         option(2) type c,

         low       like /pws/zycbe017-gsberf,

         high      like /pws/zycbe017a-gsberf,

       end of itab_gsberf.

data:  begin of itab_fkdat occurs 1,

         sign(1)   type c,

         option(2) type c,

         low       like /pws/zycbe017-fkdat,

         high      like /pws/zycbe017a-fkdat,

       end of itab_fkdat.

data:  begin of itab_kunag occurs 1,

         sign(1)   type c,

         option(2) type c,

         low       like /pws/zycbe017-kunag,

         high      like /pws/zycbe017a-kunag,

       end of itab_kunag.

data:  begin of itab_dtvencto occurs 1,

         sign(1)   type c,

         option(2) type c,

         low       like /pws/zycbe017-dtvencto,

         high      like /pws/zycbe017a-dtvencto,

       end of itab_dtvencto.

data:  begin of itab_dtbl occurs 1,

         sign(1)   type c,

         option(2) type c,

         low       like /pws/zycbe017-dtbl,

         high      like /pws/zycbe017a-dtbl,

       end of itab_dtbl.

data:  begin of itab_inco1 occurs 1,

         sign(1)   type c,

         option(2) type c,

         low       like /pws/zycbe017-inco1,

         high      like /pws/zycbe017a-inco1,

       end of itab_inco1.

data:  begin of itab_nrre occurs 1,

         sign(1)   type c,

         option(2) type c,

         low       like /pws/zycbe017-nrre,

         high      type /pws/zycbe017-nrre,

       end of itab_nrre.

data:  begin of itab_nrsd occurs 1,

         sign(1)   type c,

         option(2) type c,

         low       like /pws/zycbe017-nrsd,

         high      like /pws/zycbe017a-nrsd,

       end of itab_nrsd.

data: begin of itab_zycbt017_aux occurs 0.

        include structure /pws/zycbt017.

data: v_fsaldo type c,

end of itab_zycbt017_aux.

* << Fim da inclusão

constants: c_transacao_c(14) value '/PWS/ZYCB033_C',

           c_transacao_a(14) value '/PWS/ZYCB033_A',

           c_transacao_e(14) value '/PWS/ZYCB033_E'.

constants: c_no_modify(1) value 'X'.

controls: tc_desrec   type tableview using screen '0100'.

data:

      v_oper       like icons-text,

      v_status(1)  type c value '1',

      v_vlsltrans  like /pws/zycbt030-vlsltrans,

      v_line_ini   type i value 1,

...

 

...

      v_belnr_inv  type /pws/zycbt219-belnr.

selection-screen begin of screen 0001.

select-options: s_nrinv for /pws/zycbt219-nrinvoic,

                s_bukrs for /pws/zycbt219-bukrs,

                s_gsber for /pws/zycbt219-gsberf,

                s_werks for /pws/zycbt219-werks,

                s_nparc for /pws/zycbt219-nrparcf,

                s_kunnr for /pws/zycbt219-kunnr,

                s_dtinc for /pws/zycbt219-dtincl.

selection-screen end of screen 0001.

* >> Início da inclusão:

selection-screen begin of screen 0301.

select-options: nrin for /pws/zycbe017-nrinvoic

                     matchcode object /pws/zycba249 modif id fat ,

        gsbe for /pws/zycbe017-gsberf    modif id div,

        dtbl for /pws/zycbe017-dtbl      modif id dbl,

        fkda for /pws/zycbe017-fkdat     modif id dft,

        kuna for /pws/zycbe017-kunag     modif id cli

                     matchcode object debia,

        dtve for /pws/zycbe017-dtvencto  modif id dv,

        inco for /pws/zycbe017-inco1     modif id inc,

        nrre for /pws/zycbe017-nrre      modif id nre,

        nrsd for /pws/zycbe017-nrsd      modif id nrs.

selection-screen end of screen 0301.

* << Fim da inclusão

at selection-screen on value-request for s_nrinv-low.

  perform f4_for_nrinv_low.

at selection-screen on value-request for s_nrinv-high.

  perform f4_for_nrinv_high.

at selection-screen output.

* >> Início da inclusão:

  if sy-dynnr = '0301'.

    perform set_screen_0301.

  else.

* << Fim da inclusão

  perform set_status_sel.

* >> Início da inclusão:

  endif.

* << Fim da inclusão

at selection-screen.

* >> Início da inclusão:

  if sy-dynnr = '0301'.

    perform selecionar_zycbt017.

  endif.

* << Fim da inclusão

  check sy-dynnr eq '0001'.

  case sy-ucomm.

    when 'CRET'.

      perform seleciona_zycbt219.

      if sy-subrc eq 0.

        if sy-tcode eq c_transacao_e.

          v_status = '0'.

        else.

          v_status = '1'.

        endif.

...

 

 

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

Modificações efetuadas em REPT /PWS/SAPMZYCB033

 

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

* Incluído símbolo de texto:

 

Idioma: PT

 

Símbolo: 061

 

Texto: (31 caracteres)

"Nenhuma fatura foi selecionada."

 

Comprimento máximo: 31

 

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

* Incluído símbolo de texto:

 

Idioma: PT

 

Símbolo: 062

 

Texto: (47 caracteres)

"Saldo a Transferir está zerado para esta Fatura"

 

Comprimento máximo: 47

 

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

** Incluído texto de seleção:

 

Idioma: PT

 

Variável (SELECT-OPTION / PARAMETER): DTBL

 

Texto: (24 caracteres)

"Data do Embarque"

 

Referência ao Dictionary: NÃO

 

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

** Incluído texto de seleção:

 

Idioma: PT

 

Variável (SELECT-OPTION / PARAMETER): DTVE

 

Texto: (26 caracteres)

"Data de Vencimento"

 

Referência ao Dictionary: NÃO

 

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

** Incluído texto de seleção:

 

Idioma: PT

 

Variável (SELECT-OPTION / PARAMETER): FKDA

 

Texto: (27 caracteres)

"Data de Faturamento"

 

Referência ao Dictionary: NÃO

 

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

** Incluído texto de seleção:

 

Idioma: PT

 

Variável (SELECT-OPTION / PARAMETER): GSBE

 

Texto: (25 caracteres)

"Divisão da Fatura"

 

Referência ao Dictionary: NÃO

 

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

** Incluído texto de seleção:

 

Idioma: PT

 

Variável (SELECT-OPTION / PARAMETER): INCO

 

Texto: (17 caracteres)

"Incoterms"

 

Referência ao Dictionary: NÃO

 

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

** Incluído texto de seleção:

 

Idioma: PT

 

Variável (SELECT-OPTION / PARAMETER): KUNA

 

Texto: (15 caracteres)

"Cliente"

 

Referência ao Dictionary: NÃO

 

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

** Incluído texto de seleção:

 

Idioma: PT

 

Variável (SELECT-OPTION / PARAMETER): NRIN

 

Texto: (17 caracteres)

"Nº Fatura"

 

Referência ao Dictionary: NÃO

 

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

** Incluído texto de seleção:

 

Idioma: PT

 

Variável (SELECT-OPTION / PARAMETER): NRRE

 

Texto: (10 caracteres)

"RE"

 

Referência ao Dictionary: NÃO

 

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

** Incluído texto de seleção:

 

Idioma: PT

 

Variável (SELECT-OPTION / PARAMETER): NRSD

 

Texto: (10 caracteres)

"SD"

 

Referência ao Dictionary: NÃO