CE PLUS - Nota 013001

Módulo: CÂMBIO EXPORTAÇÃO

Funcionalidade: Captação

Data/Hora da Publicação: 04/06/2014 10:17:55

Data/Hora Última Alteração: 04/06/2014 10:17:55

Descrição da Nota: ASSOCIAÇÃO DE CONTRATO NCE COM CÂMBIO PRONTO (NOVO PROG)

Sintoma

Novo tratamento na funcionalidade de captação, proporcionando o pagamento das parcelas de principal

de NCE pela rotina de pagamento e associação dos contratos de câmbio Pronto na contratação.

 

 

Solução

Novo tratamento na funcionalidade de captação, proporcionando o pagamento das parcelas de principal

de NCE pela rotina de pagamento e associação dos contratos de câmbio Pronto na contratação.

 

Versões Tratadas

9.0


Pré-Requisitos

Produto:

Nota

Descrição

DESPESAS DE EXPORTAÇÃO

280101 - CAPTAÇÃO VINCULAÇÃO

CODE INSPECTOR , VERIFICAÇÃO AMPLIADA , RELATORIOS GL

ROTINA DE PAGAMENTO, COMPLEMENTO DO BOLETO, IMPRESSÃO DO BOLETO

LIQUIDAÇÃO DE ACC COM PRÉ - VARIOS CONTRATOS A LIQUIDAR

COMPLEMENTO DO BOLETO - REMESSA - APÓS ENTER EXIBE CAMPOS COM ASTERISCOS

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

ROTINA DE PAGAMENTO, TRILHA DE AUDITORIA

LIQUIDAÇÃO DE ACC COM PRÉ, NÃO ESTORNAR CONTRATO QDO JUROS JL ESTÁ PAGO

Informações Complementares

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

Nota Número 13001 Data: 22/05/2013 Hora: 14:17:08

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

 

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

Nota Número              : 13001

Categoria                : Melhoria

Prioridade               : Média

Versão PW.CE             : 9.0

Pacote                   : 00004

Agrupamento              : 00155

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

Referência às notas relacionadas:

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

 

00730  - 00001 - 6.0    - 00096  - 280101 - CAPTAÇÃO VINCULAÇÃO

05724  - 00002 - 7.0    - 00004  - CODE INSPECTOR , VERIFICAÇÃO AMPLIADA , RELATORIOS GL

06077  - 00003 - 7.0    - 00004  - DESPESAS DE EXPORTAÇÃO

08203  - 00004 - 7.0    - 00009  - ROTINA DE PAGAMENTO, COMPLEMENTO DO BOLETO, IMPRESSÃO DO BOLETO

09331  - 00005 - 8.0    - 00001  - COMPLEMENTO DO BOLETO - REMESSA - APÓS ENTER EXIBE CAMPOS COM AST

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

10634  - 00007 - 8.0    - 00005  - LIQUIDAÇÃO DE ACC COM PRÉ - VARIOS CONTRATOS A LIQUIDAR

11476  - 00008 - 8.0    - 00009  - LIQUIDAÇÃO DE ACC COM PRÉ, NÃO ESTORNAR CONTRATO QDO JUROS JL EST

11704  - 00009 - 8.0    - 00009  - ROTINA DE PAGAMENTO, TRILHA DE AUDITORIA

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

ASSOCIAÇÃO DE CONTRATO NCE COM CÂMBIO PRONTO (NOVO PROG)

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

Palavras Chave:

ASSOCIAÇÃO DE CONTRATO NCE COM CÂMBIO PRONTO (NOVO PROG)

PAGAMENTO DAS PARCELAS PRINCIPAL PELA ROTINA DE PAGAMENTO

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

Objetos da nota:

DOMD /PWS/ZYCBD030

DTEL /PWS/ZYCBL497

TABL /PWS/ZYCBT246

TABL /PWS/ZYCBE246

VIEW /PWS/ZYCBV305

VIEW /PWS/ZYCBV306

SHLP /PWS/ZYCBA305

SHLP /PWS/ZYCBA306

FUGR /PWS/ZYCBGF3

CUAD /PWS/SAPMZYCB001

DYNP /PWS/SAPMZYCB001                        0104

REPS /PWS/ZYGLR002

REPS /PWS/ZYCBR102

REPS /PWS/MZYCB001F04

REPS /PWS/MZYCB001I01

REPS /PWS/MZYCB001O01

REPS /PWS/MZYCB009I01

REPS /PWS/MZYCB110F01

REPS /PWS/MZYGL110F01

REPS /PWS/MZYGL110TOP

REPT /PWS/SAPMZYCB009

REPT /PWS/ZYGLR002

REPT /PWS/SAPMZYCB001

 

REPS /PWS/MZYCB125F01

REPS /PWS/MZYCB125I01

REPS /PWS/MZYCB125O01

REPS /PWS/MZYCB125TOP

REPS /PWS/SAPMZYCB125

REPS /PWS/ZYCBR125

 

TRAN /PWS/ZYCB125_C

TRAN /PWS/ZYCB125_A

TRAN /PWS/ZYCB125_E

TRAN /PWS/ZYCBR125

 

TABU TMENU01

 

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

Modificações efetuadas em DOMD /PWS/ZYCBD030

 

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

*** ALTERACAO NO DOMINIO - /PWS/ZYCBD030 ***

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

Domínio Alterado: /PWS/ZYCBD030

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

Descrição breve incluída (25 caracteres), idioma: EN

"GL - Corresponding Module"

Descrição breve incluída (27 caracteres), idioma: PT

"GL  - Módulo Correspondente"

Descrição breve incluída (30 caracteres), idioma: ES

"GL  - Modulo a correspondiente"

 

Classe de desenvolvimento: /PWS/ZYGL

Idioma original:      PT

Categoria de dados:   CHAR

Número de posições:   2

Comprimento de saída: 2

Rotina de conversão:

Letras minúsculas:    NÃO

 

** NOVO REGISTRO INCLUIDO

Incluído valor fixo "EN"

Texto incluído, idioma: PT (19 caracteres):

"Export. Contrato NC"

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

 

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

*** Criado Novo Elemento de Dados - DTEL /PWS/ZYCBL497 ***

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

Elemento de dados incluído: /PWS/ZYCBL497

Classe de desenvolvimento: /PWS/ZYCB

Idioma original: PT

Descrição breve incluída: (40 caracteres), idioma: PT

"CB - Data Associação Contrato NCE com CP"

Categoria de dados: Domínio

Domínio: DATUM

ID parâmetro:

Nome componente default:

Documentar modificações: NÃO

Nome da ajuda de pesquisa:

Parâmetro da ajuda de pesquisa:

Comprimento máximo do denominador breve: 10

Denominador breve incluído (10 caracteres), idioma: PT

"Dt.Associa"

Comprimento máximo do denominador médio: 17

Denominador médio incluído (17 caracteres), idioma: PT

"Dt.Associação NCE"

Comprimento máximo do denominador longo: 24

Denominador longo incluído (24 caracteres), idioma: PT

"Dt.Associação NCE com CP"

Comprimento máximo do título: 26

Título incluído (26 caracteres), idioma: PT

"Data Associação NCE com CP"

 

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

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

*** Criada Nova TABELA - TABL /PWS/ZYCBT246 ***

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

 

MODIFICAR TABELA TRANSPARENTE: /PWS/ZYCBT246

DESCRIÇÃO BREVE:               CB - Associação de Contratos NCE com CP

 

*** CARACTERÍSTICAS

CLASSE DESENVOLVIMENTO: /PWS/ZYCB

CATEGORIA DA TABELA:    Tabela transparente_

CLASSE DE ENTREGA:      A - Tabela de Aplicação

(X) - AUTUALIZAÇÃO DE TABELAS PERMITIDA

 

*** CAMPOS NOVOS

CAMPOS:         TP. CAMPO        CH: INI: TAB.VERIF.:    TAB.REF.:     CPO.RE

=============================================================================

MANDT           MANDT

NRSEQC_NCE      /PWS/ZYCBL019     X    X    ''

NRSEQC_CP       /PWS/ZYCBL019     X    X    ''

NRPARC          /PWS/ZYCBL047     X    X    ''

NRINVOIC        /PWS/ZYCBL084     X    X    ''

NRPARCF         RATNR             X    X    ''

GSBERF          GSBER             X    X    ''

DTVINCUL        /PWS/ZYCBL035     X    X    ''

DTPAGTO         /PWS/ZYCBL036     X    X    ''

DTPAGEXT        /PWS/ZYCBL289     X    X    ''

DTASSOC         /PWS/ZYCBL497     ''   ''   ''

WAERS           WAERS             ''   ''   ''

VLME            WRBTR             ''   ''   ''          /PWS/ZYCBT246  WAERS

VLME_C          WRBTR             ''   ''   ''          /PWS/ZYCBT246  WAERS_C

KUNNR           KUNNR             ''   ''   ''

GJAHR           GJAHR             ''   ''   ''

CATMOEDA        /PWS/ZYCBL004     ''   ''   ''

WAERS_C         WAERS             ''   ''   ''

 

*** OPÇÕES TÉCNICAS

TIPO DE DADOS:    APPL0

CATEGOR. TAMANHO: 3

 

(X) - AR. BUFFER NÃO PERMITIDO

(_) - AR. BUFFER PERMITIDO, MAS DESATIVADO

(_) - AR. BUFFER ATIVADO

(_) - RGSTS. IND ARMAZENADOS

(_) - ÁREA GEN ARMAZENADA EM BUFFER   Nº DE CPOS CHAVE: ______

(_) - TOTALMENTE ARMAZENADO

(_) - REGISTRAR MODIFICS. DDS. EM LOG.

 

 

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

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

*** Criada Nova ESTRUTURA - TABL /PWS/ZYCBE246 ***

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

 

CLASSE DESENVOLVIMENTO: /PWS/ZYCB

MODIFICAR ESTRUTURA:    /PWS/ZYCBE246

DESCRIÇÃO BREVE:        CB - Associação de Contratos NCE com CP

 

*** COMPONENTES NOVOS

COMPONENTE:     TP. COMP:         TAB.REF.:       CPO.REF.:    AJUD. PESQU.

===========================================================================

MANDT           MANDT               ''             ''          ''

NRSEQC_NCE      /PWS/ZYCBL019       ''             ''          ''

NRSEQC_CP       /PWS/ZYCBL019       ''             ''          /PWS/ZYCBA306

NRPARC          /PWS/ZYCBL047       ''             ''          ''

NRINVOIC        /PWS/ZYCBL084       ''             ''          ''

NRPARCF         RATNR               ''             ''          ''

GSBERF          GSBER               ''             ''          ''

DTVINCUL        /PWS/ZYCBL035       ''             ''          ''

DTPAGTO         /PWS/ZYCBL036       ''             ''          ''

DTPAGEXT        /PWS/ZYCBL289       ''             ''          ''

DTASSOC         /PWS/ZYCBL497       ''             ''          ''

WAERS           WAERS               ''             ''          ''

VLME            WRBTR            /PWS/ZYCBE246    WAERS

VLME_C          WRBTR            /PWS/ZYCBE246    WAERS_C

KUNNR           KUNNR               ''             ''          DEBI

GJAHR           GJAHR               ''             ''          ''

CATMOEDA        /PWS/ZYCBL004       ''             ''          ''

WAERS_C         WAERS               ''             ''          ''

 

 

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

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

*** Criada Nova Visão - VIEW /PWS/ZYCBV305 ***

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

 

CLASSE DESENVOLVIMENTO: /PWS/ZYCB

MODIFICAR VISAO :       /PWS/ZYCBV305

DESCRIÇÃO BREVE:        CB - Contratos de NCE para Associação ao CP

 

*** TABELAS/CONDIÇÕES JOIN

TABELAS:                            CONDIÇÕES JOIN:

=============          ================================================

/PWS/ZYCBT001          TABELA       NOME CPO     = TABELA      NOME CPO

 

*** CPOS. VISÃO

CAMPO VISÃO:     NOME TAB:    NOME CAMPO:     MOD:

==================================================

NRCONTR

NRSEQC

BUKRS

J_1BBRANCH

WAERS

SLVINC

TPCONTR

 

*** CONDIÇÕES DE SELEÇÃO

TABELA:          NOME CPO.:   OPERADOR:       VL COMP:       AND/OR

===================================================================

/PWS/ZYCBT001    TPCONTR      EQ              'NC'

 

*** STATUS AT.

ACESSO:

(X) - SÓ LER

(_) - LER E MODIFICAR

 

 

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

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

*** Criada Nova Visão - VIEW /PWS/ZYCBV306 ***

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

 

CLASSE DESENVOLVIMENTO: /PWS/ZYCB

MODIFICAR VISAO :       /PWS/ZYCBV306

DESCRIÇÃO BREVE:        CB - Contratos de CP p/ Associar aos Contratos de NCE

 

*** TABELAS/CONDIÇÕES JOIN

TABELAS:                            CONDIÇÕES JOIN:

=============          ================================================

/PWS/ZYCBT006          TABELA       NOME CPO     = TABELA      NOME CPO

 

*** CPOS. VISÃO

CAMPO VISÃO:     NOME TAB:    NOME CAMPO:     MOD:

==================================================

NRSEQC

NRINVOIC

NRPARCF

GSBERF

DTVINCUL

DTPAGTO

DTPAGEXT

KUNNR

WAERS

VLME

VLME_C

NRPARC

BUKRS

 

*** CONDIÇÕES DE SELEÇÃO

TABELA:          NOME CPO.:   OPERADOR:       VL COMP:       AND/OR

===================================================================

/PWS/ZYCBT006    TPCONTR      EQ              'C'

 

*** STATUS AT.

ACESSO:

(X) - SÓ LER

(_) - LER E MODIFICAR

 

 

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

*** Criacao de Função(SE37) - Módulo de Função - /PWS/ZYCBA306_CP

 

Classe desenvolvimento: /PWS/ZYCB

Grupo de funções:       /PWS/ZYCBGF3 - CB - Grupo de Função - Exit

Texto breve:            CB - Contratos CP para Associar ao NCE

 

*** Tipo de Execucao

(X) Módulo de função normal

(_) Módulo de acesso remoto

(_) Módulo de atualização

 

(X) Início imediato

(_) Início imediato-sem atual.poster.

(_) Iníc.retardado

(_) Proces.coletivo

 

*** ABAS

*** Importacao

*** Exportacao

 

*** Modificacao

Nome Parametro   Atrib.Tipo   Tipo referencia   Valor Proposto   Opcional    Transfer Valor

============================================================================================

SHLP             TYPE         SHLP_DESCR_T        ''              ''            'X'

CALLCONTROL      LIKE         DDSHF4CTRL          ''              ''            'X'

 

*** Tabelas

Nome Parametro   Atrib.Tipo   Tipo referencia   Opcional

========================================================

SHLP_TAB         TYPE         SHLP_DESCR_TAB_T    ''

RECORD_TAB       LIKE         SEAHLPRES           ''

 

*** Excecoes

 

*** Texto Fonte ***

 

function /pws/zycba306_cp.

*"----------------------------------------------------------------------

*"*"Interface local:

*"  TABLES

*"      SHLP_TAB TYPE  SHLP_DESCR_TAB_T

*"      RECORD_TAB STRUCTURE  SEAHLPRES

*"  CHANGING

*"     VALUE(SHLP) TYPE  SHLP_DESCR_T

*"     VALUE(CALLCONTROL) LIKE  DDSHF4CTRL STRUCTURE  DDSHF4CTRL

*"----------------------------------------------------------------------

 

  type-pools:

    shlp.

 

  types:

*   Parcelas do CP

    begin of t_s_dados,

      nrseqc       type  /pws/zycbt006-nrseqc,

      nrinvoic     type  /pws/zycbt006-nrinvoic,

      nrparcf      type  /pws/zycbt006-nrparcf,

      gsberf       type  /pws/zycbt006-gsberf,

      nrparc       type  /pws/zycbt006-nrparc,

      dtvincul     type  /pws/zycbt006-dtvincul,

      dtpagto      type  /pws/zycbt006-dtpagto,

      dtpagext     type  /pws/zycbt006-dtpagext,

      kunnr        type  /pws/zycbt006-kunnr,

      waers        type  /pws/zycbt006-waers,

      vlme         type  /pws/zycbt006-vlme,

      vlme_c       type  /pws/zycbt006-vlme_c,

      bukrs        type  /pws/zycbt006-bukrs,

    end of t_s_dados,

 

*   Parcelas Associadas

    begin of t_s_dados_ass,

      nrseqc_nce   type  /pws/zycbt246-nrseqc_nce,

      nrseqc_cp    type  /pws/zycbt246-nrseqc_cp,

      nrinvoic     type  /pws/zycbt246-nrinvoic,

      nrparcf      type  /pws/zycbt246-nrparcf,

      gsberf       type  /pws/zycbt246-gsberf,

      nrparc       type  /pws/zycbt246-nrparc,

      dtvincul     type  /pws/zycbt246-dtvincul,

      dtpagto      type  /pws/zycbt246-dtpagto,

      dtpagext     type  /pws/zycbt246-dtpagext,

    end of t_s_dados_ass,

 

*   Saldo do Contrato

    begin of t_s_dados_cp,

      nrseqc       type  /pws/zycbt001-nrseqc,

      slpagar      type  /pws/zycbt001-slpagar,

    end of t_s_dados_cp,

 

    t_t_dados      type  standard table of t_s_dados,

    t_t_dados_ass  type  standard table of t_s_dados_ass,

    t_t_dados_cp   type  standard table of t_s_dados_cp.

 

  data:

    itab_dados         type  t_t_dados      with header line,

    itab_dados_ass     type  t_t_dados_ass  with header line,

    itab_dados_cp      type  t_t_dados_cp   with header line,

    wa_dados           like  line of itab_dados,

    v_nrseqc           like  /pws/zycbt001-nrseqc,

    v_fieldname        type  dfies-lfieldname,

    v_tabix            type  sy-tabix,

    shlp_curr          type  shlp_descr_t.

 

  field-symbols:

    <fs_shlp>          like line of shlp_tab,

    <fs_fielddescr>    like line of shlp_tab-fielddescr,

    <fs_dados>         like line of itab_dados.

 

  import v_nrseqc from memory id 'NRSEQ-CB125'.

 

  if callcontrol-step = 'DISP' or

     callcontrol-step = 'RETURN'.

 

*   Busca na tabela shlp_tab os nomes dos campos

    read table shlp_tab index 1 assigning <fs_shlp>.

    check <fs_shlp> is assigned.

    loop at <fs_shlp>-fielddescr assigning <fs_fielddescr>.

 

*   Transfere os dados da record_tab para os respectivos

*   campos da tabela interna

 

      check: <fs_fielddescr>-fieldname = 'NRSEQC'     or

             <fs_fielddescr>-fieldname = 'NRINVOIC'   or

             <fs_fielddescr>-fieldname = 'NRPARCF'    or

             <fs_fielddescr>-fieldname = 'GSBERF'     or

             <fs_fielddescr>-fieldname = 'NRPARC'     or

             <fs_fielddescr>-fieldname = 'DTVINCUL'   or

             <fs_fielddescr>-fieldname = 'DTPAGTO'    or

             <fs_fielddescr>-fieldname = 'DTPAGEXT'   or

             <fs_fielddescr>-fieldname = 'KUNNR'      or

             <fs_fielddescr>-fieldname = 'WAERS'      or

             <fs_fielddescr>-fieldname = 'VLME'       or

             <fs_fielddescr>-fieldname = 'VLME_C'     or

             <fs_fielddescr>-fieldname = 'BUKRS'.

 

      v_fieldname = <fs_fielddescr>-fieldname.

 

***   CUIDADO AO EFETUAR SORT NA TABELA INTERNA ESPELHO DA RECORD_TAB,

***   POIS A FUNÇÃO TRANSFERE OS REGISTROS (PUT/GET) BASEADO NO INDÍCE

***   E NÃO NA CHAVE.

      call function 'F4UT_PARAMETER_VALUE_GET'

           exporting

                parameter         = <fs_fielddescr>-fieldname

                fieldname         = v_fieldname

           tables

                shlp_tab          = shlp_tab

                record_tab        = record_tab

                results_tab       = itab_dados

           changing

                shlp              = shlp

                callcontrol       = callcontrol

           exceptions

                parameter_unknown = 0

                others            = 0.

      if sy-subrc <> 0.

        exit.

      endif.

    endloop.

    unassign: <fs_shlp>, <fs_fielddescr>.

 

*   Elimina da record_tab as entradas sem saldo

    if callcontrol-step = 'DISP'.

 

      clear:   itab_dados_ass.

      refresh: itab_dados_ass.

 

*     Dados as Associações

      select nrseqc_nce  nrseqc_cp   nrinvoic

             nrparcf     gsberf      nrparc

             dtvincul    dtpagto     dtpagext

        into table itab_dados_ass

        from /pws/zycbt246

         for all entries in itab_dados

       where nrseqc_cp  =  itab_dados-nrseqc

         and nrparc     =  itab_dados-nrparc

         and nrinvoic   =  itab_dados-nrinvoic

         and nrparcf    =  itab_dados-nrparcf

         and gsberf     =  itab_dados-gsberf

         and dtvincul   =  itab_dados-dtvincul

         and dtpagto    =  itab_dados-dtpagto

         and dtpagext   =  itab_dados-dtpagext.

 

*     Dados do Contrato

      select nrseqc slpagar

        into table itab_dados_cp

        from /pws/zycbt001

         for all entries in itab_dados

       where nrseqc  =  itab_dados-nrseqc.

 

      loop at itab_dados assigning <fs_dados>.

 

        v_tabix = sy-tabix.

 

        if <fs_dados>-vlme <= 0.

 

          delete record_tab index v_tabix.

          delete itab_dados.

 

        else.

 

*         Consiste se ja esta associado

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

 

            read table itab_dados_ass

                           with key nrseqc_cp   =  <fs_dados>-nrseqc

                                    nrparc      =  <fs_dados>-nrparc

                                    nrinvoic    =  <fs_dados>-nrinvoic

                                    nrparcf     =  <fs_dados>-nrparcf

                                    gsberf      =  <fs_dados>-gsberf

                                    dtvincul    =  <fs_dados>-dtvincul

                                    dtpagto     =  <fs_dados>-dtpagto

                                    dtpagext    =  <fs_dados>-dtpagext.

 

            if sy-subrc eq 0.

 

              delete record_tab index v_tabix.

              delete itab_dados.

 

            else.

 

*             Verifica se existe alguma Fatura do Contrato CP

*             Ja foi associacao em outro Contrato NCE

              read table itab_dados_ass

                               with key nrseqc_cp = <fs_dados>-nrseqc.

 

              if sy-subrc eq 0 and

                 itab_dados_ass-nrseqc_nce ne v_nrseqc.

 

                delete record_tab index v_tabix.

                delete itab_dados.

 

              else.

 

*               Verifica se o contrato Existe e se esta Liquidado

                read table itab_dados_cp

                                 with key nrseqc = <fs_dados>-nrseqc.

                if  sy-subrc ne 0 or

                  ( sy-subrc eq 0 and itab_dados_cp-slpagar > 0 ).

                  delete record_tab index v_tabix.

                  delete itab_dados.

                endif.

 

              endif.

 

            endif.

 

          endif.

 

        endif.

 

      endloop.

 

    endif.

 

  endif.

 

  shlp_curr-shlpname = '/PWS/ZYCBA306'.

  export shlp_curr    to memory id 'mcx_shlp_curr'.

  export record_tab[] to memory id 'mcx_record_tab'.

  export itab_dados[] to memory id 'mcx_itab_dados'.

 

endfunction.

 

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

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

*** Criada Nova Ajuda de Pesquisa - SHLP /PWS/ZYCBA305 ***

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

 

MODIFICAR AJUDA DE PESQUISA: /PWS/ZYCBA305

DESCRIÇÃO BREVE:             CB - Contratos de NCE para Associação ao CP

CLASSE DESENVOLVIMENTO:      /PWS/ZYCB

 

DEFINIÇÃO

 

OBTENÇÃO DE DADOS

MÉTODO DE SELEÇÃO: /PWS/ZYCBV305

 

COMPORTAMENTO DE DIÁLOGO: D - Exibição de Valores imediata

TIPO DE DIÁLOGO:

HOT KEY:

 

EXIT AJUD. PESQUISA:

 

PARÂMETROS:

 

PARAM.      IMP EXP   POSL ISEL EXAJ   ELEM. DADOS

===================================================

NRCONTR     ''   ''    1    1    ''   /PWS/ZYCBL020

NRSEQC      ''   'X'   2    2    ''   /PWS/ZYCBL019

BUKRS       'X'  ''    3    3    ''   BUKRS

J_1BBRANCH  ''   ''    4    4    ''   J_1BBRANC_

WAERS       ''   ''    5    5    ''   WAERS

SLVINC      ''   ''    6    6    ''   /PWS/ZYCBL043

TPCONTR     'X'  ''    7    7    ''   /PWS/ZYCBL015

 

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

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

*** Criada Nova Ajuda de Pesquisa - SHLP /PWS/ZYCBA306 ***

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

 

MODIFICAR AJUDA DE PESQUISA: /PWS/ZYCBA306

DESCRIÇÃO BREVE:             CB - Contratos de CP p/ Associar aos Contratos de NCE

CLASSE DESENVOLVIMENTO:      /PWS/ZYCB

 

DEFINIÇÃO

 

OBTENÇÃO DE DADOS

MÉTODO DE SELEÇÃO: /PWS/ZYCBV306

 

COMPORTAMENTO DE DIÁLOGO: D - Exibição de Valores imediata

TIPO DE DIÁLOGO:

HOT KEY:

 

EXIT AJUD. PESQUISA: /PWS/ZYCBA306_CP

 

PARÂMETROS:

 

PARAM.      IMP EXP   POSL ISEL EXAJ   ELEM. DADOS       VALOR PROPOSTO

=======================================================================

NRSEQC      'X' 'X'    1    1    ''    /PWS/ZYCBL019        ''

NRINVOIC    'X' 'X'    2    2    ''    /PWS/ZYCBL084        ''

NRPARCF     'X' 'X'    3    3    ''    RATNR                ''

GSBERF      'X' 'X'    4    4    ''    GSBER                ''

DTVINCUL    'X' 'X'    5    5    ''    /PWS/ZYCBL035        ''

DTPAGTO     'X' 'X'    6    6    ''    /PWS/ZYCBL036        ''

DTPAGEXT    'X' 'X'    7    7    ''    /PWS/ZYCBL289        ''

KUNNR       'X' 'X'    8    8    ''    KUNNR                ''

WAERS       'X' 'X'    9    9    ''    WAERS                ''

VLME        'X' 'X'   10   10    ''    WRBTR                ''

VLME_C      'X' 'X'   11   11    ''    WRBTR                ''

NRPARC      'X' 'X'   12   12    ''    /PWS/ZYCBL047        ''

BUKRS       'X' 'X'    0    0    ''    BUKRS                'BUK'

 

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

*** Modificações efetuadas em CUAD /PWS/SAPMZYCB001

 

*** ALTERACAO STATUS GUI - 0100  -  CB-CAPTAÇÕES

 

*** Inclusao de Um Novo Botão em .: BARRA DE BOTOES

 

Código de função:     BOLNC

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

Texto de função:      Processar Boleto

Nome de ícone:        ICON_PROTOCOL

Texto informativo:    Processar Boleto NC

Tecla de função:      Shift-F6

 

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

Modificações efetuadas em DYNP /PWS/SAPMZYCB001                        0104

 

*** Modificações efetuadas na Lógica de Processamento

 

process before output.

 

  module set_screen.

 

  module load_itab_zycbt002.

 

  module esconde_campo.

 

  module atualiza_prorrogacao.

 

  loop at itab_zycbt002p cursor tc_perp-current_line.

 

    module insert_line.

 

* >> Início da inclusão:

    module set_screen_princ.

* << Fim da inclusão

 

  endloop.

 

process after input.

 

 

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

Modificações efetuadas em REPS /PWS/ZYGLR002

 

...

      vlme              like /pws/zycbt002-vlme,

      txtinf            like /pws/zycbt002-txtinf,

      kostl             like /pws/zycbt002-kostl,

      prctr             like /pws/zycbt002-prctr,

      dtpagto           like /pws/zycbt002-dtpagto,

      vlir              like /pws/zycbt002-vlir,

      waers             like /pws/zycbt002-waers,

      dtvencto          like /pws/zycbt002-dtvencto,

      belnr_ir          like /pws/zycbt002-belnr_ir,

      belnr_ir_comp     like /pws/zycbt002-belnr_ir_comp,

* >> Início da exclusão:

      dtpagtoir         like /pws/zycbt002-dtpagtoir.

* << Fim da exclusão

* >> Início da inclusão:

      dtpagtoir         like /pws/zycbt002-dtpagtoir,

      przcontr          like /pws/zycbt002-przcontr.

* << Fim da inclusão

data: end of itab_zycbt002.

data: begin of itab_zycbt157 occurs 0.

        include structure /pws/zycbt157.

data: end of itab_zycbt157.

data: begin of itab_zycet037 occurs 0.

        include structure /pws/zycet037.

data: end of itab_zycet037.

data: begin of itab_zycet013 occurs 0.

        include structure /pws/zycet013.

data: end of itab_zycet013.

...

 

...

/pws/zycba261.

selection-screen end of block bl_1.

selection-screen begin of block bl_2 with frame title text-046.

parameters: p_trava  as checkbox user-command p_trava,

            p_despes as checkbox user-command p_despes,

            p_desp_e as checkbox user-command p_desp_e,

            p_com    as checkbox user-command p_com,

            p_credit as checkbox user-command p_credit,

            p_comiss as checkbox user-command p_comiss,

            p_juros  as checkbox user-command p_juros,

* >> Início da exclusão:

            p_prest  as checkbox user-command p_prest.

* << Fim da exclusão

* >> Início da inclusão:

            p_prest  as checkbox user-command p_prest,

            p_contr  as checkbox user-command p_contr.

* << Fim da inclusão

selection-screen end of block bl_2.

include /pws/zycbi102.

initialization.

  set pf-status '0100'.

  perform parameter_cambio.

at selection-screen output.

  loop at screen.

    if not p_trava is initial.

      if not p_despes is initial.

        if not p_credit is initial.

...

 

...

                free: carta, letraj, codmod.

                screen-input = '0'.

              endif.

            endif.

          endif.

        endif.

      else.

        if not p_credit is initial.

          if not p_comiss is initial.

            if not p_juros is initial.

* >> Início da exclusão:

              if not p_com is initial.

* << Fim da exclusão

* >> Início da inclusão:

              if not p_com is initial or not p_contr is initial.

* << Fim da inclusão

                if screen-name(6) = 'CONTRAT' or

                   screen-name(6) = 'MOEDA'.

                  screen-input = '1'.

                endif.

              else.

                if screen-name(6) = 'CODMOD'.

                  free: codmod.

                  screen-input = '0'.

                endif.

              endif.

...

 

...

                free: carta, letraj, codmod.

                screen-input = '0'.

              endif.

            endif.

          endif.

        endif.

      else.

        if not p_credit is initial.

          if not p_comiss is initial.

            if not p_juros is initial.

* >> Início da exclusão:

              if not p_com is initial.

* << Fim da exclusão

* >> Início da inclusão:

              if not p_com is initial or not p_contr is initial.

* << Fim da inclusão

                if screen-name(6) = 'CODMOD'.

                  free codmod.

                  screen-input = '0'.

                endif.

              else.

                if screen-name(7) = 'CONTRAT' or

                   screen-name(6) = 'CODMOD'.

                  free: contrat, codmod.

                  screen-input = '0'.

                endif.

              endif.

            else.

* >> Início da exclusão:

              if not p_com is initial.

* << Fim da exclusão

* >> Início da inclusão:

              if not p_com is initial or not p_contr is initial.

* << Fim da inclusão

                if screen-name(6) = 'LETRAJ'  or

                   screen-name(6) = 'CODMOD'.

                  free: letraj, codmod.

                  screen-input = '0'.

                endif.

              else.

                if screen-name(7) = 'CONTRAT' or

                   screen-name(6) = 'LETRAJ'  or

                   screen-name(6) = 'CODMOD'.

                  free: contrat, letraj, codmod.

                  screen-input = '0'.

                endif.

              endif.

            endif.

          else.

            if not p_juros is initial.

* >> Início da exclusão:

              if p_com is initial.

* << Fim da exclusão

* >> Início da inclusão:

              if p_com is initial or p_contr is initial.

* << Fim da inclusão

                if screen-name(7) = 'CONTRAT' or

                   screen-name(6) = 'CODMOD'.

                  free: contrat, codmod.

                  screen-input = '0'.

                endif.

              endif.

            else.

* >> Início da exclusão:

              if not p_com is initial.

* << Fim da exclusão

* >> Início da inclusão:

              if not p_com is initial or not p_contr is initial.

* << Fim da inclusão

                if screen-name(6) = 'LETRAJ'  or

                   screen-name(7) = 'INVOICE' or

                   screen-name(6) = 'CODMOD'.

                  free: letraj, invoice, codmod.

                  screen-input = '0'.

                endif.

              else.

                if screen-name(7) = 'CONTRAT' or

                   screen-name(6) = 'LETRAJ'  or

                   screen-name(7) = 'INVOICE' or

...

 

...

              if screen-name(7) = 'CONTRAT' or

                 screen-name(6) = 'LETRAJ'  or

                 screen-name(5) = 'CARTA'   or

                 screen-name(6) = 'CODMOD'.

                free: contrat, letraj, carta, codmod.

                screen-input = '0'.

              endif.

            endif.

          else.

            if not p_juros is initial.

* >> Início da exclusão:

              if not p_com is initial.

* << Fim da exclusão

* >> Início da inclusão:

              if not p_com is initial or not p_contr is initial.

* << Fim da inclusão

                if screen-name(7) = 'FORNECE' or

                   screen-name(6) = 'CODMOD'  or

                   screen-name(7) = 'INVOICE' or

                   screen-name(6) = 'LETRAJ'  or

                   screen-name(5) = 'CARTA'.

                  free: invoice, carta, fornece, codmod, letraj.

                  screen-input = '0'.

                endif.

              else.

                if screen-name(7) = 'CONTRAT' or

                   screen-name(5) = 'CARTA'   or

                   screen-name(7) = 'FORNECE' or

                   screen-name(6) = 'CODMOD'.

                  free: contrat, carta, fornece, codmod.

                  screen-input = '0'.

                endif.

              endif.

            else.

* >> Início da exclusão:

              if not p_com is initial.

* << Fim da exclusão

* >> Início da inclusão:

              if not p_com is initial or not p_contr is initial.

* << Fim da inclusão

                if screen-name(7) = 'FORNECE' or

                   screen-name(6) = 'CODMOD'  or

                   screen-name(7) = 'INVOICE' or

                   screen-name(6) = 'LETRAJ'  or

                   screen-name(5) = 'CARTA'.

                  free: invoice, carta, fornece, codmod, letraj.

                  screen-input = '0'.

                endif.

              else.

                if screen-name(7) = 'FORNECE' or

...

 

...

    leave to transaction '/PWS/ZYCBR102'.

  elseif sy-ucomm = 'ONLI'.

    perform seleciona_parametros.

    if p_trava  is initial and

       p_despes is initial and

       p_desp_e is initial and

       p_com    is initial and

       p_credit is initial and

       p_comiss is initial and

       p_juros  is initial and

* >> Início da exclusão:

       p_prest  is initial.

* << Fim da exclusão

* >> Início da inclusão:

       p_prest  is initial and

       p_contr  is initial.

* << Fim da inclusão

      perform seleciona_trava.

      perform seleciona_despesa.

      perform seleciona_com_contrato.

      perform seleciona_carta_credito.

      perform seleciona_comissao.

      perform seleciona_juros.

      perform seleciona_prestconta.

* >> Início da inclusão:

      perform seleciona_contrato_nc.

* << Fim da inclusão

    else.

      if not p_trava is initial.

        perform seleciona_trava.

      endif.

      if not p_despes is initial.

        perform seleciona_despesa.

      endif.

      if not p_desp_e is initial.

        perform seleciona_desp_e.

      endif.

...

 

...

        perform seleciona_carta_credito.

      endif.

      if not p_comiss is initial.

        perform seleciona_comissao.

      endif.

      if not p_juros is initial.

        perform seleciona_juros.

      endif.

      if not p_prest is initial.

        perform seleciona_prestconta.

* >> Início da inclusão:

      endif.

      if not p_contr is initial.

        perform seleciona_contrato_nc.

* << Fim da inclusão

      endif.

    endif.

    if not v_control2 is initial.

      export empresa[]     to memory id 'E001'.

      export data[]        to memory id 'E002'.

      export v_data        to memory id 'E003'.

      export itab_selreg[] to memory id 'E008'.

    else.

      free memory id 'E010'.

      export itab_selreg[] to memory id 'E010'.

...

 

...

  import v_desp     from memory id 'E015'.

  if v_desp = 'X'.

    p_desp_e = 'X'.

  endif.

  case v_codmodul.

    when 'IN' or 'OP'.

      get parameter id '/PWS/ZYCBP343' field despesa-low.

      free memory id '/PWS/ZYCBP343'.

      if not despesa-low is initial.

        append despesa.

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

      endif.

    when 'EN'.

      p_contr = 'X'.

      get parameter id '/PWS/ZYCBP343' field contrat-low.

      free memory id '/PWS/ZYCBP343'.

      if not contrat-low is initial.

        append contrat.

* << Fim da inclusão

      endif.

  endcase.

endform.

form seleciona_desp_e.

  if data-high is initial.

    select nrseq nrdesp tpdesp bukrs codmodul nrref dtvencto benefic

           fcambio kursf ftaxa waers vlme kostl prctr frpagto txtinf

           frgzu estrat frgsx1 frgsx2 frgsx3 frgsx4 frgsx5 nlib

           seq aprova bname dtbname hrbname frggr

      into table itab_zycbt118

...

 

...

      itab_zycbt118-seq       to itab_selreg-seq,

      itab_zycbt118-aprova    to itab_selreg-aprova,

      itab_zycbt118-bname     to itab_selreg-bname,

      itab_zycbt118-dtbname   to itab_selreg-dtbname,

      itab_zycbt118-hrbname   to itab_selreg-hrbname,

      itab_zycbt118-frggr     to itab_selreg-frggr.

    append itab_selreg.

  endloop.

  clear: v_tipo, v_taxa_dia, itab_zycbt118, /pws/zycbt015, itab_selreg.

endform.

* >> Início da inclusão:

form seleciona_contrato_nc.

  clear:   itab_zycbt002.

  refresh: itab_zycbt002.

  if data-high is initial.

    select nrseqc  nrparc   tpparc    nrcontr tpcontr bcofinan  dtinicio

           dtfinal vlme     txtinf    kostl   prctr   dtpagto   vlir

           waers   dtvencto belnr_ir  belnr_ir_comp   dtpagtoir przcontr

      into table itab_zycbt002

            from /pws/zycbt002

      where dtpagto   eq  '00000000'

        and dtfinal   le  v_data

        and nrseqc    in  contrat

        and waers     in  moeda

        and tpcontr   eq  'NC'

        and tpparc    eq  'P'.

  else.

    select nrseqc  nrparc   tpparc   nrcontr tpcontr bcofinan  dtinicio

           dtfinal vlme     txtinf   kostl   prctr   dtpagto   vlir

           waers   dtvencto belnr_ir belnr_ir_comp   dtpagtoir przcontr

      into table itab_zycbt002

            from /pws/zycbt002

      where dtpagto   eq  '00000000'

        and dtfinal   in  data

        and nrseqc    in  contrat

        and waers     in  moeda

        and tpcontr   eq  'NC'

        and tpparc    eq  'P'.

  endif.

  if not itab_zycbt002[] is initial.

    select * from /pws/zycbt001

      into table itab_zycbt001

      for all entries in itab_zycbt002

      where nrseqc  =  itab_zycbt002-nrseqc

        and bukrs  in  empresa.

  endif.

  loop at itab_zycbt002.

    read table itab_zycbt001 with key nrseqc = itab_zycbt002-nrseqc.

    if sy-subrc ne 0.

      clear itab_zycbt002-nrseqc.

      modify itab_zycbt002.

    endif.

  endloop.

  delete itab_zycbt002 where nrseqc is initial.

  loop at itab_zycbt001 where f_encerrado eq 'E'.

    read table itab_zycbt002 with key nrseqc = itab_zycbt001-nrseqc

      transporting no fields.

    if sy-subrc = 0.

      delete itab_zycbt002 index sy-tabix.

    endif.

  endloop.

  delete itab_zycbt001 where f_encerrado = 'E'.

  loop at itab_zycbt002.

    read table itab_zycbt001 with key nrseqc = itab_zycbt002-nrseqc.

    concatenate itab_zycbt002-nrparc itab_zycbt002-tpparc text-042

                text-055 into v_tipo.

    clear: v_me, v_usd.

    v_me = itab_zycbt002-vlme.

    move:

      text-032                to itab_selreg-mod,

      itab_zycbt002-nrseqc    to itab_selreg-nrchave,

      itab_zycbt002-tpcontr   to itab_selreg-tpcontr,

      itab_zycbt002-tpparc    to itab_selreg-tpparc,

      itab_zycbt002-bcofinan  to itab_selreg-benefic,

      text-050                to itab_selreg-tab,

      v_tipo                  to itab_selreg-tipo,

      itab_zycbt002-dtfinal   to itab_selreg-dtvencto,

      v_taxa_dia              to itab_selreg-txdia,

      itab_zycbt002-waers     to itab_selreg-waers,

      itab_zycbt002-vlme      to itab_selreg-vlme,

      v_usd                   to itab_selreg-vlusd,

      'S'                     to itab_selreg-fcamb,

      itab_zycbt002-nrparc    to itab_selreg-nrparc,

      itab_zycbt002-dtinicio  to itab_selreg-dtincl,

      itab_zycbt002-txtinf    to itab_selreg-txtinf,

      text-056                to itab_selreg-fmd,

      itab_zycbt004-kostl     to itab_selreg-kostl,

      itab_zycbt004-prctr     to itab_selreg-prctr,

      itab_zycbt002-dtpagto   to itab_selreg-dtpagto,

      itab_zycbt002-vlir      to itab_selreg-vlir,

      itab_zycbt002-dtpagtoir to itab_selreg-dtpagtoir,

      itab_zycbt002-przcontr  to itab_selreg-prazo,

      itab_zycbt001-bukrs     to itab_selreg-bukrs.

    append itab_selreg.

  endloop.

  clear: v_tipo, v_taxa_dia, itab_zycbt004, itab_zycbt015, itab_selreg.

endform.

* << Fim da inclusão

 

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

Modificações efetuadas em REPS /PWS/ZYCBR102

 

...

            WHERE nrchave  = itab_selreg-nrchave

              AND mdcorresp EQ itab_selreg-fmd.

          ENDSELECT .

          IF sy-subrc EQ 0.

            DELETE itab_selreg.

            CONTINUE.

          ELSE.

          ENDIF.

        ENDIF.

      ENDIF.

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

    ELSEIF itab_selreg-fmd = 'IP'.

* << Fim da exclusão

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

    elseif itab_selreg-fmd = 'IP' or

           itab_selreg-fmd = 'EN'.

* << Fim da inclusão

      SELECT  *

        FROM /pws/zycbt031

          UP TO 1 ROWS

        WHERE nrcorresp EQ itab_selreg-nrchave

          AND mdcorresp EQ itab_selreg-fmd

          AND nrparc    EQ itab_selreg-nrparc.

      ENDSELECT.

      IF sy-subrc EQ 0.

        DELETE itab_selreg.

        CONTINUE.

...

 

 

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

Modificações efetuadas em REPS /PWS/MZYCB001F04

 

...

       wa_zycbt007-fprovisao eq 'C' .

      itab_pf_status-fcode = 'ANL_ENC'.

      append itab_pf_status.

      itab_pf_status-fcode = 'ENCE'.

      append itab_pf_status.

    else.

      itab_pf_status-fcode = 'ENCE'.

      append itab_pf_status.

    endif.

  endif.

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

  if /pws/zycbe001-tpcontr ne 'NC'.

    itab_pf_status-fcode = 'BOLNC'.

    append itab_pf_status.

  else.

    if v_status_s ne '1'.

      itab_pf_status-fcode = 'BOLNC'.

      append itab_pf_status.

    endif.

  endif.

* << Fim da inclusão

  if /pws/zycbe001-tpcontr(1) ne 'T'.

    itab_pf_status-fcode = 'PREMIO'.

    append itab_pf_status.

  endif.

  if /pws/zycbe001-slvinc > 0.

    itab_pf_status-fcode = 'ENCE'.

    append itab_pf_status.

  endif.

  clear v_trilha_auditoria.

  select trilha_auditoria from /pws/zyglt009

...

 

...

    if not itab_zyglt100-zexit_ativa is initial.

      perform (itab_zyglt100-formulario)

              in program (itab_zyglt100-programa)

              using      okcode

              changing   e_subrc.

      if e_subrc ne 0.

        exit.

      endif.

    endif.

  endif.

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

  itab_zycbe033-flag_nc = 'X'.

* << Fim da inclusão

  append itab_zycbe033.

  loop at itab_zycbt034.

    message i016 with itab_zycbt034-descricao.

  endloop.

  if itab_zycbt034 is initial.

    delete itab_partidas where belnr is initial.

    call function '/PWS/ZYCB_TRANSACAO_F_30_W'

         exporting

              v_modo          = v_modo_bi

              v_vinc_tot      = 'X'

...

 

...

  select *

          from /pws/zycbt061

          into table itab_zycbt061

          where nrseq eq /pws/zycbe001-nrseqc.

  if not itab_zycbt061[] is initial.

    if not estorno_ok is initial.

      itab_zycbe033-d_newko = itab_zyglt316-konts.

    endif.

  endif.

  itab_zycbe033-vbund   = wa_zycbt001-vbund.

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

  itab_zycbe033-flag_nc = 'X'.

* << Fim da inclusão

  append itab_zycbe033.

  loop at itab_zycbt034.

    message i016 with itab_zycbt034-descricao.

  endloop.

  if itab_zycbt034 is initial.

    call function '/PWS/ZYCB_TRANSACAO_F_30_A'

         exporting

              v_modo          = v_modo_bi

         tables

              t_dados         = itab_zycbe033

...

 

...

        itab_zycbt226-sld_exterior = v_saldo_total -

                                     itab_zycbt226-vlr_ord .

        modify itab_zycbt226 index v_tabix.

        v_enter = 'X'.

      else.

        message i061 with text-512 text-513.

      endif.

    endif.

  endloop.

endform.

* >> Início da inclusão:

form chama_boleto.

  data: limpaid     type c value space,

        v_lin       type n,

        v_resp      type c,

        v_bol       type c,

        v_dtvencto  like /pws/zycbe112-dtvencto,

        v_codmodul  like /pws/zycbe031-mdcorresp,

        wa_zycbt031 like /pws/zycbe031.

  data: begin of empresa occurs 0,

          sign(1)   type c,

          option(2) type c,

          low(4)    type c,

          high(4)   type c,

        end of empresa.

  clear: v_bol.

  loop at itab_zycbt002p.

    select  *

      from /pws/zycbt031

        up to 1 rows

      into wa_zycbt031

     where bukrs     = /pws/zycbe001-bukrs

       and mdcorresp = 'EN'

       and nrcorresp = itab_zycbt002p-nrseqc

       and tpparc    = 'P'

       and nrparc    = itab_zycbt002p-nrparc

       and tabela    = '/PWS/ZYCBT002'.

    endselect.

    if sy-subrc ne 0.

      select *

        from /pws/zycbt064

          up to 1 rows

        into /pws/zycbt064

       where nrchave   = itab_zycbt002p-nrseqc

         and tpparc    = itab_zycbt002p-tpparc

         and nrparc    = itab_zycbt002p-nrparc

         and mdcorresp = 'EN'.

      endselect.

      if sy-subrc ne 0.

        v_bol = 'X'.

      endif.

    endif.

  endloop.

  if v_bol is initial.

    message w015 with text-560 text-561.

    exit.

  endif.

  read table itab_zycbt002p with key mark = 'X'.

  if sy-subrc ne 0.

    message w015 with text-562 text-563.

    exit.

  endif.

  move itab_zycbt002p-dtfinal to v_dtvencto.

  call function 'POPUP_TO_CONFIRM'

       exporting

            text_question         = text-559

            text_button_1         = text-366

            icon_button_1         = 'ICON_OKAY'

            text_button_2         = text-367

            icon_button_2         = 'ICON_CANCEL'

            default_button        = '1'

            display_cancel_button = ' '

       importing

            answer                = v_resp

       exceptions

            text_not_found        = 1

            others                = 2.

  if sy-subrc = 0 .

  else.

  endif.

  if v_resp eq '1'.

    authority-check object 'S_TCODE' id 'TCD' field '/PWS/ZYCBR102'.

    if sy-subrc eq 0.

      set parameter id '/PWS/ZYCBP343' field /pws/zycbe001-nrseqc.

      v_codmodul     = 'EN'.

      empresa-sign   = 'I'.

      empresa-option = 'EQ'.

      empresa-low    = /pws/zycbe001-bukrs.

      append empresa.

      export empresa    to memory id 'E001'.

      export v_codmodul to memory id 'E141'.

      submit /pws/zycbr102 with export eq 'X'

                           with data   eq v_dtvencto

                and return.

      set parameter id '/PWS/ZYCBP343' field limpaid.

    endif.

  else.

    exit.

  endif.

endform.

* << Fim da inclusão

 

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

Modificações efetuadas em REPS /PWS/MZYCB001I01

 

...

    when 'CLOSE'.

      clear r_okcode.

      v_tela_help = '0052'.

      exit.

    when 'CLI'.

      perform drill_down.

    when 'DELE'.

      clear v_exc_bol.

      perform verifica_boleto_acc_pre changing v_exc_bol.

      check v_exc_bol is initial.

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

      clear v_boleto.

      if /pws/zycbe001-tpcontr eq 'NC'.

        select single *

          from /pws/zycbt064

         where nrchave = /pws/zycbe001-nrseqc

           and tpparc  = 'P'.

        if sy-subrc eq 0.

          v_boleto = 'X'.

        endif.

        if v_boleto = 'X'.

          message e015 with text-564 text-526.

        endif.

      endif.

* << Fim da inclusão

      if /pws/zycbe001-tpcontr(1) ca 'PSN'.

        loop at itab_zycbt002.

          read table itab_zycbt064 with key

            nrchave = itab_zycbt002-nrseqc

            nrparc  = itab_zycbt002-nrparc

            tpdesp  = itab_zycbt002-tpparc.

          if sy-subrc eq 0.

            v_boleto = 'X'.

            exit.

          endif.

...

 

...

           exceptions

                text_not_found = 1

                others         = 2.

      if sy-subrc <> 0.

        message i015 with text-356.

      endif.

    when 'LOG_TRILHA'.

      perform log_trilha using sy-repid

                               /pws/zycbe001-nrseqc

                               ' '.

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

    when 'BOLNC'.

      perform chama_boleto.

* << Fim da inclusão

  endcase.

  perform executa_exit_cliente using 'CPT020'.

  clear okcode.

endmodule.

module modify_line input.

  case sy-dynnr.

    when '0102'.

      perform update_itab_zycbt002.

    when '0103'.

      perform update_itab_zycbt003.

...

 

 

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

Modificações efetuadas em REPS /PWS/MZYCB001O01

 

...

      move-corresponding itab_zycbt003 to /pws/zycbe003.

    when '0104'.

      check not itab_zycbt002p[] is initial.

      move-corresponding itab_zycbt002p to /pws/zycbe002p.

      write /pws/zycbe002p-slvinc currency /pws/zycbe002p-waers.

      write /pws/zycbe002p-vlme currency /pws/zycbe002p-waers.

      if not itab_zycbt002p_ant[] is initial.

        read table itab_zycbt002p_ant with key

              nrparc = itab_zycbt002p-nrparc.

        if sy-subrc eq '0'.

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

          if itab_zycbt002p_ant-vlme ne itab_zycbt002p_ant-slvinc

             and itab_zycbt002p_ant-slvinc is initial.

* << Fim da exclusão

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

          if ( itab_zycbt002p_ant-vlme   ne itab_zycbt002p_ant-slvinc

           and itab_zycbt002p_ant-slvinc is initial ) or

             ( /pws/zycbe001-tpcontr          eq 'NC'

           and not itab_zycbt002p_ant-dtpagto is initial ).

* << Fim da inclusão

            loop at screen.

              screen-input = '0'.

              modify screen.

            endloop.

          endif.

        endif.

      else.

      endif.

    when '0105'.

      move-corresponding itab_zycbt002 to /pws/zycbe002.

...

 

...

        it_sort              = it_sort.

    create object event_handler_histjur.

    set handler event_handler_histjur->handle_hotspot_click_histjur

            for ctl_alv_hist.

  else.

    call method ctl_alv_hist->refresh_table_display

         exporting

           is_stable = v_stable.

  endif.

endmodule.

* >> Início da inclusão:

module set_screen_princ output.

    check /pws/zycbe001-tpcontr eq 'NC'.

    if not itab_zycbt002p-dtpagto is initial.

      loop at screen.

        if sy-subrc eq 0.

          screen-input = '0'.

        endif.

        modify screen.

      endloop.

    endif.

endmodule.

* << Fim da inclusão

 

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

Modificações efetuadas em REPS /PWS/MZYCB009I01

 

...

      if sy-subrc = 0.

        if /pws/zycbe001-tp_pagt_antc = 'C'.

          message w601(sf) with text-471.

          exit.

        endif.

        if /pws/zycbe001-belnr is initial or

           /pws/zycbe001-status eq 'I'.

          message w601(sf) with text-378 text-379.

          exit.

        endif.

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

        if /pws/zycbe001-tpcontr = 'NC'.

          message w601(sf) with text-517.

          exit.

        endif.

* << Fim da inclusão

        select single * from /pws/zycbt074

               into corresponding fields of /pws/zycbe074

                        where nrseqc = v_nrseqc.

        move: /pws/zycbe001-j_1bbranch to /pws/zycbe005-j_1bbranch,

              /pws/zycbe001-werks      to /pws/zycbe005-werks     .

        v_encontrou = 'S'.

        perform seleciona_parametros_gerais.

        set parameter id 'BUK' field /pws/zycbe001-bukrs.

        v_zterm = /pws/zycbe001-zterm.

        export v_zterm to memory id '009'.

...

 

 

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

Modificações efetuadas em REPS /PWS/MZYCB110F01

 

...

  endcase.

  perform busca_parametros321_ip

    using v_codeven

    changing wa_zycbe033.

  perform verifica_campo_vazio using:

    wa_zycbe033-bukrs        'BUKRS'   'Empresa'(010),

    wa_zycbe033-waers        'WAERS'   'Moeda'(011),

    wa_zycbe033-blart        'BLART'   'Tipo de documento'(268),

    wa_zycbe033-bldat        'BLDAT'   'Data documento'(267),

    wa_zycbe033-budat        'BUDAT'   'Data lançamento'(269).

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

  wa_zycbe033-c_prctr = wa_zycbt119-prctr.

  wa_zycbe033-bktxt   = wa_zycbt007-bktxt.

* << Fim da inclusão

  check itab_zycbt034 is initial.

  append wa_zycbe033 to itab_zycbe033.

endform.

form busca_filial

  using    p_bukrs type /pws/zycbe033-bukrs

           p_werks type /pws/zycbe033-werks

  changing p_brnch type /pws/zycbe033-brnch.

  check not p_brnch is initial.

  select single * from t001w where werks = p_werks.

  if sy-subrc = 0 and not t001w-j_1bbranch is initial.

...

 

...

              c_tipo_msg_e

              itab_zycbt032-msgv1

              itab_zycbt032-msgv2

              space

              space

              016.

    endloop.

    /pws/zycbe031-statusp = 'I'.

  endif.

endform.

* >> Início da inclusão:

form contabiliza_en.

  perform verifica_estrategia_liberacao.

  check erro_bi is initial.

  perform selecionar_en.

  if /pws/zycbe031-statusp eq 'I' or /pws/zycbe031-statusp is initial.

    /pws/zycbe031-statusp = 'I'.

    if /pws/zycbe031-frgzu = '2'.

      perform fill_date_f-30_en using 'PRINCIPAL'.

    endif.

  elseif /pws/zycbe031-statusp eq 'C'.

    if /pws/zycbe031-frgzu = '2'.

      perform estorna_fbra_en.

      perform fill_date_f-30_en using 'PRINCIPAL'.

    endif.

  endif.

endform.

form selecionar_en.

  clear:   wa_zycbt001,

           itab_zycbt002_aux.

  refresh: itab_zycbt002_aux.

  read table itab_zycbt031_tc index 1.

  if sy-subrc eq 0.

    select single *

      into wa_zycbt001

      from /pws/zycbt001

     where nrseqc = itab_zycbt031_tc-nrcorresp.

    select *

      into table itab_zycbt002_aux

      from /pws/zycbt002

      for all entries in itab_zycbt064

     where nrseqc = itab_zycbt064-nrchave(8)

       and nrparc = itab_zycbt064-nrparc

       and tpparc = 'P'.

  endif.

endform.

form fill_date_f-30_en using p_tpimp.

  data: v_dtdocto like /pws/zycbe033-dtdocto.

  check erro_bi is initial.

  perform clear_date_batch.

  perform get_parameters_en using 'PRINCIPAL'.

  itab_zycbe033-tcode   = 'F-30'.

  itab_zycbe033-tabela  = '/PWS/ZYCBT031'.

  itab_zycbe033-cpochv  = /pws/zycbe031-nrseq.

  itab_zycbe033-zterm   = space.

  itab_zycbe033-budat   = /pws/zycbe031-dtcredpr.

  if wa_zycbt007-fdtdoc   = 'D'.

    itab_zycbe033-bldat   = sy-datum.

  else.

    itab_zycbe033-bldat   = itab_zycbe033-budat.

  endif.

  itab_zycbe033-bktxt = wa_zycbt007-bktxt.

  perform verify_null_field using wa_zycbt001-bukrs

                                  'BUKRS'

                                  text-010.

  itab_zycbe033-bukrs  = wa_zycbt001-bukrs.

  perform verify_null_field using wa_zycbt001-waers

                                  'WAERS'

                                  text-011.

  itab_zycbe033-waers  = wa_zycbt001-waers.

  itab_zycbe033-kursf  = /pws/zycbe031-kursf.

  perform verify_null_field using wa_zycbt011-blart

                                  'BLART'

                                  text-012.

  itab_zycbe033-blart  = wa_zycbt011-blart.

  itab_zycbe033-agkoa   = 'K'.

  itab_zycbe033-newbs   = '31'.

  itab_zycbe033-d_gsber = wa_zycbt001-gsber.

  itab_zycbe033-c_gsber = wa_zycbt001-gsber.

  itab_zycbe033-d_newko = /pws/zycbe031-bcooper.

  perform verify_null_field using itab_zycbe033-d_newko

                                  'D_NEWKO'

                                  text-016.

  read table itab_zycbt002_aux index 1.

  concatenate wa_zycbt001-tpcontr itab_zycbt002_aux-przcontr

         into v_codaux separated by space.

  call function '/PWS/ZYGL_READ_ACCOUNT_NUMBER'

       exporting

            bukrs           = wa_zycbt001-bukrs

            ktosl           = 'CPT'

            codaux1         = v_codaux

       tables

            account         = itab_zyglt316

       exceptions

            key_not_found   = 1

            rules_not_found = 2

            others          = 3.

  if sy-subrc eq 0.

    read table itab_zyglt316 index 1.

    itab_zycbe033-agkon = itab_zyglt316-konth.

    itab_zycbe033-agkoa = 'S'.

  endif.

  perform verify_null_field using itab_zycbe033-agkon

                                  'AGKON'

                                  text-021.

  perform verify_null_field using /pws/zycbe031-vlme

                                  'VLME'

                                  text-013.

  itab_zycbe033-wrbtr  = /pws/zycbe031-vlme.

  itab_zycbe033-dmbtr  = /pws/zycbe031-vlmi.

  if wa_zycbt001-dt_lcto_tr is initial.

    case wa_zycbt001-fdtlanc.

      when 'D'.

        v_dtdocto = wa_zycbt001-dtdesem.

      when 'C'.

        v_dtdocto = wa_zycbt001-dtcred.

      when 'O'.

        v_dtdocto = wa_zycbt001-dtcontr.

    endcase.

  else.

    v_dtdocto = wa_zycbt001-dt_lcto_tr.

  endif.

  clear itab_zycbt036.

  refresh itab_zycbt036.

  loop at itab_zycbt002_aux.

    itab_zycbt036-tcode   = 'F-30'.

    itab_zycbt036-tabela  = '/PWS/ZYCBT031'.

    itab_zycbt036-cpochv  = /pws/zycbe031-nrseq.

    itab_zycbt036-belnr   = itab_zycbt002_aux-belnr.

    perform determina_ano using v_dtdocto

                                /pws/zycbe031-bukrs

                       changing v_ano.

    select single budat awkey from bkpf

      into (itab_zycbt036-dtdocto,itab_zycbt036-awkey)

     where belnr eq itab_zycbt036-belnr

       and bukrs eq /pws/zycbe031-bukrs

       and gjahr eq v_ano.

    append itab_zycbt036.

    perform verify_null_field using itab_zycbt036-belnr

                                    'BELNR'

                                    text-035.

  endloop.

  loop at itab_zyglt321.

    case itab_zyglt321-cpor3.

      when 'SGTXT'.

        if itab_zyglt321-cpocb = 'NRCONTR'.

          itab_zycbe033-c_sgtxt = wa_zycbt001-nrcontr.

          itab_zycbe033-d_sgtxt = wa_zycbt001-nrcontr.

        elseif itab_zyglt321-cpocb = 'NRSEQ'.

          itab_zycbe033-c_sgtxt = wa_zycbt001-nrseqc.

          itab_zycbe033-d_sgtxt = wa_zycbt001-nrseqc.

        elseif itab_zyglt321-cpocb = 'TXINF' or

               itab_zyglt321-cpocb = 'TXTINF'.

          itab_zycbe033-c_sgtxt = wa_zycbt001-txtinf.

          itab_zycbe033-d_sgtxt = wa_zycbt001-txtinf.

        elseif itab_zyglt321-cpocb is initial and

           not itab_zyglt321-descr is initial.

          itab_zycbe033-c_sgtxt = itab_zyglt321-descr.

          itab_zycbe033-d_sgtxt = itab_zyglt321-descr.

        endif.

      when 'VALUT'.

        if itab_zyglt321-cpocb = 'DTDOCTO'.

          itab_zycbe033-c_valut = v_dtdocto.

          itab_zycbe033-d_valut = v_dtdocto.

        elseif itab_zyglt321-cpocb = 'DTCREDPR'.

          itab_zycbe033-c_valut = itab_dados_tc-dtlanc.

          itab_zycbe033-d_valut = itab_dados_tc-dtlanc.

        endif.

      when 'XBLNR'.

        if itab_zyglt321-cpocb = 'NRSEQ'.

          itab_zycbe033-xblnr = wa_zycbt001-nrseqc.

        elseif itab_zyglt321-cpocb = 'NRCONTR'.

          itab_zycbe033-xblnr = wa_zycbt001-nrcontr.

        elseif itab_zyglt321-cpocb = 'TXINF'.

          itab_zycbe033-xblnr = wa_zycbt001-txtinf.

        elseif itab_zyglt321-cpocb is initial and

               not itab_zyglt321-descr is initial.

          itab_zycbe033-xblnr = itab_zyglt321-descr.

        endif.

      when 'ZFBDT'.

        if itab_zyglt321-cpocb = 'DTDOCTO'.

          itab_zycbe033-zfbdt = v_dtdocto.

        elseif itab_zyglt321-cpocb = 'DTLANC'.

          itab_zycbe033-zfbdt = itab_dados_tc-dtlanc.

        endif.

      when 'ZUONR'.

        if itab_zyglt321-cpocb = 'NRSEQ'.

          itab_zycbe033-c_zuonr = wa_zycbt001-nrseqc.

        elseif itab_zyglt321-cpocb = 'NRCONTR'.

          itab_zycbe033-c_zuonr = wa_zycbt001-nrcontr.

        elseif itab_zyglt321-cpocb = 'TXINF'.

          itab_zycbe033-c_zuonr = wa_zycbt001-txtinf.

        elseif itab_zyglt321-cpocb is initial and

               not itab_zyglt321-descr is initial.

          itab_zycbe033-c_zuonr = itab_zyglt321-descr.

        endif.

    endcase.

  endloop.

  itab_zycbe033-d_zuonr = itab_zycbe033-c_zuonr.

  itab_zycbe033-vbund   =  wa_zycbt001-vbund.

  append itab_zycbe033.

  loop at itab_zycbt034.

    itab_zycbt032-msgv1 = itab_zycbt034-descricao.

    perform message_store

      using c_classe_msg

            c_tipo_msg_e

            itab_zycbt032-msgv1

            space

            space

            space

            016.

  endloop.

  if itab_zycbt034[] is initial.

    v_syrepid = sy-repid.

    call function '/PWS/ZYGL_BUSCA_EXIT_CLIENTE'

         exporting

              i_codmod                = 'E'

              i_func                  = v_syrepid

         tables

              itab_zyglt100           = itab_zyglt100

         exceptions

              i_codmod_nao_encontrado = 1

              i_func_nao_encontrado   = 2

              i_zexit_nao_encontrado  = 3

              others                  = 4.

    read table itab_zyglt100 with key zexit  = 'CBF009' binary search.

    if sy-subrc eq 0 and not itab_zyglt100-zexit_ativa is initial.

      perform (itab_zyglt100-formulario)

              in program (itab_zyglt100-programa)

              if found.

    else.

      call function '/PWS/ZYCA_TRANSACAO_F_30R'

           exporting

                v_modo          = v_modo_bi

           tables

                t_dados         = itab_zycbe033

                t_campo         = itab_zycbt034

                t_zycbt032      = itab_zycbt032

                t_zycbt036      = itab_zycbt036

           exceptions

                campo_em_branco = 1

                periodo_fechado = 2

                others          = 3.

    endif.

    if sy-subrc = 0.

      read table itab_zycbt032 with key tcode  = 'F-30'

                                        tabela = '/PWS/ZYCBT031'

                                        cpochv = /pws/zycbe031-nrseq

                                        tpmsg  = 'S'.

      if sy-subrc = 0.

        itab_zycbt032-msgv1 = itab_zycbt032-belnr.

        perform message_store

          using c_classe_msg

                c_tipo_msg_i

                itab_zycbt032-msgv1

                space

                space

                space

                043.

        itab_dados_tc-belnr = itab_zycbt032-belnr.

        modify itab_dados_tc transporting belnr where tpimp = p_tpimp.

        loop at itab_zycbt002_aux.

          select single *

            from /pws/zycbt002

            into wa_zycbt002

           where nrseqc  =  itab_zycbt002_aux-nrseqc

             and nrparc  =  itab_zycbt002_aux-nrparc

             and tpparc  =  itab_zycbt002_aux-tpparc.

          wa_zycbt002-slvinc   =  0.

          wa_zycbt002-dtpagto  =  /pws/zycbe031-dtcredpr.

          wa_zycbt002-belnr2   =  itab_zycbt032-belnr.

          update /pws/zycbt002 set slvinc   = wa_zycbt002-slvinc

                                   dtpagto  = wa_zycbt002-dtpagto

                                   dtvincul = wa_zycbt002-dtpagto

                                   belnr2   = wa_zycbt002-belnr2

           where nrseqc  =  itab_zycbt002_aux-nrseqc

             and nrparc  =  itab_zycbt002_aux-nrparc

             and tpparc  =  itab_zycbt002_aux-tpparc.

          move-corresponding wa_zycbt002 to /pws/zycbt002.

          v_funcionalidade2 = '/PWS/SAPMZYCB001'.

          v_identificador2  =  /pws/zycbt002-nrseqc.

          perform carrega_log using '/PWS/ZYCBT002'

                                    'U'

                                    sy-tcode

                                    v_funcionalidade2

                                    v_identificador2.

          update /pws/zycbt001 set slpagar = slpagar - wa_zycbt002-vlme

           where nrseqc  =  itab_zycbt002_aux-nrseqc.

          move-corresponding /pws/zycbt001 to /pws/zycbt001.

          v_funcionalidade2 = '/PWS/SAPMZYCB001'.

          v_identificador2  =  /pws/zycbt002-nrseqc.

          perform carrega_log using '/PWS/ZYCBT001'

                                    'U'

                                    sy-tcode

                                    v_funcionalidade2

                                    v_identificador2.

        endloop.

        /pws/zycbe031-belnr_p  = itab_zycbt032-belnr.

        /pws/zycbe031-statusp  = 'C'.

        modify /pws/zycbt031 from /pws/zycbe031.            "#EC ENHOK

        move-corresponding /pws/zycbe031 to /pws/zycbt031.

        perform carrega_log using '/PWS/ZYCBT031'

                                  'U'

                                  sy-tcode

                                  v_funcionalidade

                                  v_identificador.

      else.

        erro_bi = 'X'.

        loop at itab_zycbt032.

          itab_zycbt032-msgv1 = itab_zycbt032-msg(50).

          itab_zycbt032-msgv2 = itab_zycbt032-msg+50.

          perform message_store

            using c_classe_msg

                  c_tipo_msg_i

                  itab_zycbt032-msgv1

                  itab_zycbt032-msgv2

                  space

                  space

                  015.

        endloop.

      endif.

    else.

      erro_bi = 'X'.

      loop at itab_zycbt034.

        itab_zycbt032-msgv1 = itab_zycbt034-descricao.

        itab_zycbt032-msgv2 = v_evento.

        perform message_store

          using c_classe_msg

                c_tipo_msg_e

                itab_zycbt032-msgv1

                itab_zycbt032-msgv2

                space

                space

                127.

      endloop.

    endif.

  else.

    erro_bi = 'X'.

  endif.

endform.

form carrega_dados_en.

  loop at itab_zycbt064.

    clear itab_zycbt031_tc.

    select single * from /pws/zycbt002

      where nrseqc   =  itab_zycbt064-nrchave

        and tpparc   =  itab_zycbt064-tpparc

        and nrparc   =  itab_zycbt064-nrparc.

    if sy-subrc = 0.

      itab_zycbt031_tc-dtvencto       = /pws/zycbt002-dtvencto.

      itab_zycbt031_tc-tpparc         = /pws/zycbt002-tpparc.

      itab_zycbt031_tc-nrparc         = /pws/zycbt002-nrparc.

      itab_zycbt031_tc-dtincl         = /pws/zycbt002-dtinicio.

      select single * from /pws/zycbt001

        into /pws/zycbt001

       where nrseqc   = /pws/zycbt002-nrseqc.

      if sy-subrc eq 0.

        itab_zycbt031_tc-gsber          = /pws/zycbt001-gsber.

        itab_zycbt031_tc-nrpagto        = /pws/zycbt001-nrcontr.

        itab_zycbt031_tc-bukrs          = /pws/zycbt001-bukrs.

        itab_zycbt031_tc-werks          = /pws/zycbt001-werks.

        itab_zycbt031_tc-j_1bbranch     = /pws/zycbt001-j_1bbranch.

      endif.

      itab_zycbt031_tc-lifnr            = itab_zycbt064-lifnr.

      if itab_zycbt064-vlmi gt 0.

        itab_zycbt031_tc-v_vlmi       = itab_zycbt064-vlmi.

      else.

        v_vlmeaux =

          itab_zycbt064-vlme / ( 10 ** ( tcurx-currdec - 2 ) ).

        itab_zycbt031_tc-v_vlmi =

            ( ( /pws/zycbe031-kursf / v_dfact ) * v_pfact ) * v_vlmeaux.

        if wa_tcurx-currdec = 0.

          itab_zycbt031_tc-v_vlmi =

           itab_zycbt031_tc-v_vlmi * ( 10 ** ( wa_tcurx-currdec - 2 ) ).

        endif.

      endif.

      if /pws/zycbe031-vlir gt 0.

        itab_zycbt031_tc-v_vlir       = /pws/zycbt002-vlir.

        if itab_zycbt064-vlmiir > 0.

          itab_zycbt031_tc-v_vlmiir   = itab_zycbt064-vlmiir.

        else.

          v_vlmeaux =

            /pws/zycbt002-vlir / ( 10 ** ( tcurx-currdec - 2 ) ).

          itab_zycbt031_tc-v_vlmiir =

           ( ( /pws/zycbe031-taxair / v_dfact ) * v_pfact ) * v_vlmeaux.

          if wa_tcurx-currdec = 0.

            itab_zycbt031_tc-v_vlmiir = itab_zycbt031_tc-v_vlmiir *

                                   ( 10 ** ( wa_tcurx-currdec - 2 ) ).

          endif.

        endif.

      endif.

      perform carrega_dados_globais.

      append itab_zycbt031_tc.

    endif.

  endloop.

endform.

form get_parameters_en using p_tpimp.

  clear:   itab_zyglt321, wa_zycbt011.

  refresh: itab_zyglt321.

  if p_tpimp = 'PRINCIPAL'.

    v_codeven = '022NC'.

    v_trans   = 'F-30'.

  endif.

  select single * from /pws/zycbt011

    into wa_zycbt011

   where codeven = v_codeven

     and codmod  = 'E'

     and bukrs   = /pws/zycbe031-bukrs.

  select * from /pws/zyglt321

    into table itab_zyglt321

   where ktosl   = 'CPT'

     and codeven = v_codeven.

endform.

form estorna_fbra_en.

  clear: v_monat, v_ano.

  itab_zycbe033-budat = /pws/zycbe031-dtcredpr.

  itab_zycbe033-mandt  = sy-mandt.

  itab_zycbe033-tcode  = text-069.

  itab_zycbe033-tabela = text-204.

  itab_zycbe033-cpochv = /pws/zycbe031-nrseq.

  itab_zycbe033-belnr  = /pws/zycbe031-belnr_p.

  itab_zycbe033-bukrs  = /pws/zycbe031-bukrs.

  itab_zycbe033-bldat  = sy-datum.

  append itab_zycbe033.

  call function '/PWS/ZYCM_TRANSACAO_FBRA'

       exporting

            v_modo          = v_modo_bi

       tables

            t_dados         = itab_zycbe033

            t_campo         = itab_zycbt034

            t_zycbt032      = itab_zycbt032

       exceptions

            campo_em_branco = 1

            others          = 2.

  if sy-subrc = 0.

    read table itab_zycbt032 with key tcode  = text-069

                                      tabela = text-204

                                      cpochv = /pws/zycbe031-nrseq

                                      tpmsg  = 'S'.

    if sy-subrc eq 0.

      perform estorna_fb08_en.

    else.

      erro_bi = 'X'.

      loop at itab_zycbt032.

        itab_zycbt032-msgv1 = itab_zycbt032-msg(50).

        itab_zycbt032-msgv2 = itab_zycbt032-msg+50.

        perform message_store

          using c_classe_msg

                c_tipo_msg_i

                itab_zycbt032-msgv1

                itab_zycbt032-msgv2

                space

                space

                015.

      endloop.

    endif.

  else.

    erro_bi = 'X'.

  endif.

endform.

form estorna_fb08_en.

  perform clear_date_batch.

  itab_zycbe033-tcode  = text-103.

  itab_zycbe033-tabela = text-204.

  itab_zycbe033-cpochv = /pws/zycbe031-nrseq.

  itab_zycbe033-belnr  = /pws/zycbe031-belnr_p.

  itab_zycbe033-bukrs  = /pws/zycbe031-bukrs.

  itab_zycbe033-bldat  = wa_zycbt031-dtcredpr.

  itab_zycbe033-budat  = wa_zycbt031-dtcredpr.

  perform determina_periodo using itab_zycbe033-bldat

                                  itab_zycbe033-bukrs

                          changing v_monat.

  perform determina_ano using itab_zycbe033-bldat

                              itab_zycbe033-bukrs

                     changing v_ano.

  call function 'FI_PERIOD_CHECK'

       exporting

            i_bukrs          = itab_zycbe033-bukrs

            i_gjahr          = v_ano

            i_koart          = '+'

            i_monat          = v_monat

       exceptions

            error_period     = 1

            error_period_acc = 2

            others           = 3.

  if sy-subrc = 0.

    itab_zycbe033-stgrd = '01'.

  else.

    itab_zycbe033-stgrd = '02'.

    itab_zycbe033-budat  = sy-datum.

  endif.

  append itab_zycbe033.

  call function '/PWS/ZYCM_TRANSACAO_FB08'

       exporting

            v_modo          = v_modo_bi

       tables

            t_dados         = itab_zycbe033

            t_campo         = itab_zycbt034

            t_zycbt032      = itab_zycbt032

       exceptions

            campo_em_branco = 1

            others          = 2.

  if sy-subrc = 0.

    read table itab_zycbt032 with key tcode  = text-103

                                      tabela = text-204

                                      cpochv = /pws/zycbe031-nrseq

                                      tpmsg  = 'S'.

    if sy-subrc eq 0.

      itab_zycbt032-msgv1 = text-098.

      itab_zycbt032-msgv2 = /pws/zycbe031-belnr_comp.

      itab_zycbt032-msgv3 = text-192.

      itab_zycbt032-msgv4 = itab_zycbt032-belnr.

      perform message_store

        using c_classe_msg

              c_tipo_msg_i

              itab_zycbt032-msgv1

              itab_zycbt032-msgv2

              itab_zycbt032-msgv3

              itab_zycbt032-msgv4

              061.

      /pws/zycbe031-belnr_p = space.

      modify /pws/zycbt031 from /pws/zycbe031.              "#EC ENHOK

      move-corresponding /pws/zycbe031 to /pws/zycbt031.

      perform carrega_log using '/PWS/ZYCBT031'

                                'U'

                                sy-tcode

                                v_funcionalidade

                                v_identificador.

      loop at itab_zycbt002_aux.

        select single *

          from /pws/zycbt002

          into wa_zycbt002

         where nrseqc  =  itab_zycbt002_aux-nrseqc

           and nrparc  =  itab_zycbt002_aux-nrparc

           and tpparc  =  itab_zycbt002_aux-tpparc.

        clear: wa_zycbt002-dtpagto,

               wa_zycbt002-dtvincul,

               wa_zycbt002-belnr2.

        wa_zycbt002-slvinc   =  wa_zycbt002-vlme.

        update /pws/zycbt002 set slvinc   =  wa_zycbt002-slvinc

                                 dtpagto  =  wa_zycbt002-dtpagto

                                 dtvincul =  wa_zycbt002-dtvincul

                                 belnr2   =  wa_zycbt002-belnr2

         where nrseqc  =  itab_zycbt002_aux-nrseqc

           and nrparc  =  itab_zycbt002_aux-nrparc

           and tpparc  =  itab_zycbt002_aux-tpparc.

        move-corresponding wa_zycbt002 to /pws/zycbt002.

        v_funcionalidade2 = '/PWS/SAPMZYCB001'.

        v_identificador2  =  /pws/zycbt002-nrseqc.

        perform carrega_log using '/PWS/ZYCBT002'

                                  'U'

                                  sy-tcode

                                  v_funcionalidade2

                                  v_identificador2.

        update /pws/zycbt001 set slpagar = slpagar + wa_zycbt002-vlme

         where nrseqc  =  itab_zycbt002_aux-nrseqc.

        move-corresponding /pws/zycbt001 to /pws/zycbt001.

        v_funcionalidade2 = '/PWS/SAPMZYCB001'.

        v_identificador2  =  /pws/zycbt002-nrseqc.

        perform carrega_log using '/PWS/ZYCBT001'

                                  'U'

                                  sy-tcode

                                  v_funcionalidade2

                                  v_identificador2.

      endloop.

      if ok_code eq 'DEL'.

        /pws/zycbe031-status = 'E'.

      else.

        clear /pws/zycbt031-statusp.

      endif.

    else.

      loop at itab_zycbt032.

        itab_zycbt032-msgv1 = itab_zycbt032-msg(50).

        itab_zycbt032-msgv2 = itab_zycbt032-msg+50.

        perform message_store

          using c_classe_msg

                c_tipo_msg_i

                itab_zycbt032-msgv1

                itab_zycbt032-msgv2

                space

                space

                015.

      endloop.

      erro_bi = 'X'.

    endif.

  else.

    erro_bi = 'X'.

  endif.

endform.

* << Fim da inclusão

 

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

Modificações efetuadas em REPS /PWS/MZYGL110F01

 

...

    when 'CP'.

      perform verifica_cp.

    when 'CE'.

      perform contabiliza_ce.

    when 'CD'.

      perform contabiliza_cd.

    when 'TV'.

      perform contabiliza_tv.

    when 'EO'.

      perform contabiliza_eo.

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

    when 'EN'.

      perform contabiliza_en.

* << Fim da inclusão

  endcase.

  move v_modo_bi to v_modo_bi_aux.

  clear v_modo_bi.

endform.

form imprime_boleto.

  data: v_imprime value 'S'.

  if w_ok <> 'IMPR'.

    if /pws/zycbe031-bcooper ne wa_zycbt031-bcooper or

       /pws/zycbe031-kursf   ne wa_zycbt031-kursf   or

       /pws/zycbe031-frpagto ne wa_zycbt031-frpagto.

...

 

...

      and   nrparc = itab_zycbt002-nrparc

      and   tpparc = itab_zycbt002-tpparc.

    move-corresponding itab_zycbt002 to /pws/zycbt002.

    v_funcionalidade2 = '/PWS/SAPMZYCB001'.

    v_identificador2 = /pws/zycbt002-nrseqc.

    perform carrega_log using '/PWS/ZYCBT002'

                              'U'

                              sy-tcode

                              v_funcionalidade2

                              v_identificador2.

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

    if /pws/zycbe031-mdcorresp = 'EN'.

      perform selecionar_en.

      perform estorna_fbra_en.

* << Fim da inclusão

  endif.

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

  endif.

* << Fim da inclusão

endform.

form modo_batch_input.

  select * from /pws/zycbt039

    into corresponding fields of table itab_modo.       "#EC CI_NOWHERE

  sort itab_modo descending.

  call function 'POPUP_TO_DECIDE_LIST'

...

 

...

      loop at screen.

        if screen-name eq '/PWS/ZYCBE145-BUKRS_P' or

           screen-name eq '/PWS/ZYCBE145-ZLSCH' or

           screen-name eq '/PWS/ZYCBE031-BCOOPER' or

           screen-name eq '/PWS/ZYCBE031-KURSF' or

           screen-name eq '/PWS/ZYCBE031-DTCREDPR'.

          screen-input = '0'.

          modify screen.

        endif.

      endloop.

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

    endif.

  endif.

  if /pws/zycbe031-mdcorresp eq 'EN'.

    /pws/zycbe031-kursf = 1.

    loop at screen.

      if screen-name eq '/PWS/ZYCBE031-KURSF'.

        screen-input = '0'.

        modify screen.

* << Fim da inclusão

    endif.

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

    endloop.

* << Fim da inclusão

  endif.

  tc_cont-line_sel_mode  = 0.

  tc_dados-line_sel_mode = 0.

endform.

module insert_line output.

  perform insere_dados.

...

 

...

    when 'EC'.

      perform carrega_dados_ec.

    when 'EJ'.

      perform carrega_dados_ej.

    when 'EP'.

      perform carrega_dados_ep.

    when 'IU'.

      perform carrega_dados_iu.

    when 'EO'.

      perform carrega_dados_eo.

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

    when 'EN'.

      perform carrega_dados_en.

* << Fim da inclusão

  endcase.

  loop at itab_zycbt031_tc.

    if /pws/zycbe145-cod_fech ne 'TR'.

      case itab_zycbt031_tc-mdcorresp.

        when 'CP'.

          read table itab_zycbt124_aux with key

                          nrseq = itab_zycbt031_tc-nrcorresp.

          if itab_zycbt124_aux-frpagto = 'R' and

             not /pws/zycbe031-belnr_p is initial.

            itab_zycbt031_tc-belnr_p    = /pws/zycbe031-belnr_p.

...

 

...

            itab_zycbt031_tc-belnr_cide      = /pws/zycbe031-belnr_cide.

          endif.

      endcase.

    else.

      itab_zycbt031_tc-belnr_p    = /pws/zycbe031-belnr_p.

      itab_zycbt031_tc-belnr_pi   = /pws/zycbe031-belnr_pi.

      itab_zycbt031_tc-belnr_cide = /pws/zycbe031-belnr_cide.

    endif.

    modify itab_zycbt031_tc.

  endloop.

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

  clear:   itab_zyglt100.

  refresh: itab_zyglt100.

  if itab_zyglt100[] is initial.

    v_syrepid = sy-repid.

    call function '/PWS/ZYGL_BUSCA_EXIT_CLIENTE'

         exporting

              i_codmod                = 'F'

              i_func                  = v_syrepid

         tables

              itab_zyglt100           = itab_zyglt100

         exceptions

              i_codmod_nao_encontrado = 1

              i_func_nao_encontrado   = 2

              i_zexit_nao_encontrado  = 3

              others                  = 4.

  endif.

  read table itab_zyglt100 with key zexit  = 'CBF010' binary search.

  if sy-subrc eq 0.

    if not itab_zyglt100-zexit_ativa is initial.

      perform (itab_zyglt100-formulario)

              in program (itab_zyglt100-programa).

    endif.

  endif.

* << Fim da inclusão

endform.

form altera_dados.

  data: v_currdec like tcurx-currdec.

  itab_zycbt031_tc-bukrs         = /pws/zycbt031-bukrs.

  itab_zycbt031_tc-gsber         = /pws/zycbe119-gsber.

  itab_zycbt031_tc-werks         = /pws/zycbe119-werks.

  itab_zycbt031_tc-j_1bbranch    = /pws/zycbe119-j_1bbranch.

  itab_zycbt031_tc-belnr_p       = /pws/zycbt031-belnr_p.

  itab_zycbt031_tc-belnr_pi      = /pws/zycbt031-belnr_pi.

  itab_zycbt031_tc-belnr_cide    = /pws/zycbt031-belnr_cide.

...

 

 

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

Modificações efetuadas em REPS /PWS/MZYGL110TOP

 

...

      wa_zycbt002_log   like /pws/zycbt002.

data: begin of itab_sequencia occurs 10,

            nrchave(10) type c,

      end of itab_sequencia.

data: begin of itab_remetente occurs 10,

            name1(35) type c,

      end of itab_remetente.

data: begin of itab_tipos occurs 10,

            tipo(30) type c,

      end of itab_tipos.

* >> Início da inclusão:

data: begin of itab_zycbt002_aux occurs 0.

          include structure /pws/zycbt002.

data: end of itab_zycbt002_aux.

data: wa_zycbt001 type /pws/zycbt001,

      wa_zycbt002 type /pws/zycbt002.

* << Fim da inclusão

selection-screen begin of screen 0500.

select-options: s_forn for lfa1-lifnr,

                s_moed for /pws/zycbe124-waers,

                s_reme for /pws/zycbe124-nrseq matchcode object

 /pws/zygla006,

                s_desp for /pws/zycbe118-nrseq matchcode object

 /pws/zygla004,

                s_empr for /pws/zycbe128-nrseq matchcode object

 /pws/zygla007.

selection-screen end of screen 0500.

...

 

 

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

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

*** Modificações efetuadas em REPT /PWS/SAPMZYCB009 (textos de reports) ***

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

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

Incluído símbolo de texto:

 

Idioma: PT

 

Símbolo: 517

 

Texto: (62 caracteres)

"Para Contratos de NCE não é permitido a Vinculação de Faturas."

 

Comprimento máximo: 62

 

 

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

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

*** Modificações efetuadas em REPT /PWS/ZYGLR002 (textos de reports) ***

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

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

Incluído símbolo de texto:

 

Idioma: PT

 

Símbolo: 055

 

Texto: (9 caracteres)

"Principal"

 

Comprimento máximo: 9

 

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

Incluído símbolo de texto:

 

Idioma: PT

 

Símbolo: 056

 

Texto: (2 caracteres)

"EN"

 

Comprimento máximo: 2

 

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

Incluído texto de seleção:

 

Idioma: PT

 

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

 

Texto: (29 caracteres)

"Principal de Contrato"

 

Referência ao Dictionary: NÃO

 

 

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

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

*** Modificações efetuadas em REPT /PWS/SAPMZYCB001 ***

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

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

Incluído símbolo de texto:

 

Idioma: PT

 

Símbolo: 559

 

Texto: (25 caracteres)

"Deseja Processar Boleto.?"

 

Comprimento máximo: 25

 

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

Incluído símbolo de texto:

 

Idioma: PT

 

Símbolo: 560

 

Texto: (34 caracteres)

"Já Existe Boleto(s) Criado(s) para"

 

Comprimento máximo: 34

 

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

Incluído símbolo de texto:

 

Idioma: PT

 

Símbolo: 561

 

Texto: (31 caracteres)

"todas as Parcelas de Principal."

 

Comprimento máximo: 31

 

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

Incluído símbolo de texto:

 

Idioma: PT

 

Símbolo: 562

 

Texto: (38 caracteres)

"Selecionar a Parcela de Principal para"

 

Comprimento máximo: 38

 

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

Incluído símbolo de texto:

 

Idioma: PT

 

Símbolo: 563

 

Texto: (18 caracteres)

"Geração do Boleto."

 

Comprimento máximo: 18

 

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

Incluído símbolo de texto:

 

Idioma: PT

 

Símbolo: 564

 

Texto: (51 caracteres)

"Existem boletos gerados para parcelas de Principal."

 

Comprimento máximo: 51

 

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

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

*** Criado Programa Novo (Module Pool) - REPS /PWS/SAPMZYCB125 ***

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

 

Código:                  /PWS/SAPMZYCB125

Título:                  Associação de Contrato de NCE com Câmbio Pronto

Categoria:               M Pool de Módulo

Status:

Aplicação:

Grupo de autorização:

Classe desenvolvimento:  /PWS/ZYCB - pw.CE - Câmbio Exportação

Banco de dados lógico:

Versão tela seleção:

 

* >> Início da inclusão:

include /pws/mzycb125top.

include /pws/mzycb125o01.

include /pws/mzycb125i01.

include /pws/mzycb125f01.

include /pws/zygllog.

* << Fim da inclusão

 

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

 

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

*** PROGRAMA - /PWS/SAPMZYCB125 ***

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

 

*** SOLICITAR OS ARQUIVOS DAS TELAS ***

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

13001_SAPMZYCB125_TELA_0001.txt

13001_SAPMZYCB125_TELA_0002.txt

13001_SAPMZYCB125_TELA_0100.txt

13001_SAPMZYCB125_TELA_0101.txt

 

 

*** CRIACAO DE TIT.GUI ***

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

Programa:     /PWS/SAPMZYCB125

Code título:  0001

Título:       Associação Contrato NCE com CP

 

Programa:     /PWS/SAPMZYCB125

Code título:  0002

Título:       Associação Contrato NCE com CP - Exibir

 

Programa:     /PWS/SAPMZYCB125

Code título:  0200

Título:       Critérios de Seleção

 

Programa:     /PWS/SAPMZYCB125

Code título:  100A

Título:       Associação de Contrato NCE com CP - Atualizar

 

Programa:     /PWS/SAPMZYCB125

Code título:  100E

Título:       Associação de Contrato NCE com CP - Exibir

 

 

*** CRIACAO DE STATUS GUI ***

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

STATUS GUI - 0001 - Associação Contrato NCE com CP

* Barra de menu

 

* Barra de botões

 

* Teclas de função -> Barra Ferramenta

  Código de função:     ENTER

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

  Texto de função       Executar

  Nome de ícone:        (ícone do ENTER)

 

  Código de função:     BACK

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

  Texto de função       Voltar

  Nome de ícone:        (ícone do Voltar - verde)

 

  Código de função:     BACK

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

  Texto de função       Encerrar

  Nome de ícone:        (ícone do Voltar - amarelo)

 

  Código de função:     EXIT

  Categoria de função:  E - Comando Exit

  Texto de função       Cancelar

  Nome de ícone:        ICON_CANCEL

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

 

STATUS GUI - 0002 - Associação Contrato NCE com CP - Exibir

* Barra de menu

 

* Barra de botões

 

* Teclas de função -> Barra Ferramenta

  Código de função:     ENTER

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

  Texto de função       Executar

  Nome de ícone:        (ícone do ENTER)

 

  Código de função:     BACK

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

  Texto de função       Voltar

  Nome de ícone:        (ícone do Voltar - verde)

 

  Código de função:     BACK

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

  Texto de função       Encerrar

  Nome de ícone:        (ícone do Voltar - amarelo)

 

  Código de função:     EXIT

  Categoria de função:  E - Comando Exit

  Texto de função       Cancelar

  Nome de ícone:        ICON_CANCEL

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

 

STATUS GUI - 0100 - Associação Contrato NCE com CP

* Barra de menu

 

* Barra de botões

  Código de função:     RELAT

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

  Texto de função:      Relatório

  Nome de ícone:        ICON_PROTOCOL

  Texto informativo:    Relatório de Associação NCE com CP

  Tecla de Função:      F7

 

  Código de função:     INFO

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

  Texto de função:      Informação

  Nome de ícone:        ICON_INFORMATION

  Tecla de Função:      F5

 

  Código de função:     LOG_TRILHA

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

  Texto de função:      Log de Modificações

  Nome de ícone:        ICON_PHIO_CLASS

  Tecla de Função:      F9

 

* Teclas de função -> Barra Ferramenta

  Código de função:     SAVE

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

  Texto de função       Gravar

  Nome de ícone:        ICON_SYSTEM_SAVE (ícone gravar)

 

  Código de função:     BACK

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

  Texto de função       Voltar

  Nome de ícone:        (ícone do Voltar - verde)

 

  Código de função:     BACK

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

  Texto de função       Encerrar

  Nome de ícone:        (ícone do Voltar - amarelo)

 

  Código de função:     EXIT

  Categoria de função:  E - Comando Exit

  Texto de função       Cancelar

  Nome de ícone:        ICON_CANCEL

 

*** Definições recomendadas de teclas função

*** F2 - CAPT - Selecionar

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

 

STATUS GUI - 0200 - CB - Critérios de Seleção

* 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

  Tecla de Função:      F8

 

* Teclas de função -> Barra Ferramenta

  Código de função:     ENTER

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

  Texto de função       Executar

  Nome de ícone:        (ícone do ENTER)

 

  Código de função:     BACK

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

  Texto de função       Voltar

  Nome de ícone:        (ícone do Voltar - verde)

 

  Código de função:     %EX

  Categoria de função:  E - Comando Exit

  Texto de função       Cancelar

  Nome de ícone:        (ícone do Voltar - amarelo)

 

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

*** Criado Include - REPS /PWS/MZYCB125F01

 

* >> Início da inclusão:

form user_command_0001.

  case v_okcode.

    when 'BACK'.

      leave program.

    when 'ENTER'.

      clear v_exibe.

      perform seleciona_dados_modif.

  endcase.

endform.

 

form user_command_0100.

  data: v_answer.

  case v_okcode.

    when 'SAVE'.

      perform salva_associacao.

      clear v_okcode.

    when 'BACK'.

      if itab_zycbt246[] ne itab_zycbt246_ant[] and

         v_exibe is initial.

        call function 'POPUP_TO_CONFIRM_STEP'

             exporting

                  defaultoption = 'N'

                  textline1     = text-i02

                  textline2     = text-i03

                  titel         = text-i01

             importing

                  answer        = v_answer

             exceptions

                  others        = 1.

        if sy-subrc eq 0.

          if v_answer eq 'J'.

            perform limpa_dados.

            perform unlock_record using /pws/zycbe001-nrseqc.

            set screen 0001.

            set screen v_screen.

            leave screen.

          endif.

        endif.

      else.

        perform unlock_record using /pws/zycbe001-nrseqc.

        set screen v_screen.

        leave screen.

      endif.

      clear v_okcode.

    when 'RELAT'.

      v_nrseqc = /pws/zycbe001-nrseqc.

      export v_nrseqc to memory id 'NRSEQ-CB125'.

      call transaction '/PWS/ZYCBR125'.

      clear v_okcode.

    when 'LOG_TRILHA'.

      perform log_trilha using sy-repid

                               /pws/zycbe001-nrseqc

                               ' '.

      clear v_okcode.

    when 'CAPT'.

      get cursor field v_campo value v_valor.

      perform drill_down.

  endcase.

endform.

 

form seleciona_dados_modif.

  data: v_bloq.

  perform verifica_autorizacao_emp changing v_bloq.

  check v_bloq is initial.

  perform lock_record using /pws/zycbe001-nrseqc.

  select single *

    from /pws/zycbt001

    into /pws/zycbt001

    where nrseqc   = /pws/zycbe001-nrseqc.

  if sy-subrc ne 0.

    clear v_okcode.

    message w015 with text-e02.

    exit.

  else.

    if /pws/zycbt001-tpcontr ne 'NC'.

      clear v_okcode.

      message w015 with text-e03.

      exit.

    endif.

  endif.

  move-corresponding /pws/zycbt001 to /pws/zycbe001.

  if sy-tcode eq c_transacao_c.

    if /pws/zycbe001-slvinc <= 0.

      message w015 with text-e09 text-e10.

      exit.

    endif.

  endif.

  clear wa_zycbt007.

  select single *

    from /pws/zycbt007

    into wa_zycbt007

   where bukrs eq /pws/zycbt001-bukrs.

  select * from /pws/zycbt246

    into table itab_zycbt246

   where nrseqc_nce = /pws/zycbt001-nrseqc.

  if sy-subrc ne 0 and sy-tcode = c_transacao_a.

    clear v_okcode.

    message w015 with text-e11 text-e12.

    exit.

  endif.

  if sy-subrc eq 0 and sy-tcode = c_transacao_c.

    clear v_okcode.

    message w015 with text-e14 text-e15.

    exit.

  endif.

  if not itab_zycbt246[] is initial.

    read table itab_zycbt246 index 1.

    v_cat_moeda = itab_zycbt246-catmoeda.

    clear: v_compra,

           v_venda,

           v_media.

    if v_cat_moeda = 'G'.

      v_compra = 'X'.

    else.

      if v_cat_moeda = 'B'.

        v_venda = 'X'.

      elseif v_cat_moeda = 'M'.

        v_media = 'X'.

      endif.

    endif.

  endif.

  itab_zycbt246_ant[] = itab_zycbt246[].

  clear v_okcode.

  v_screen = sy-dynnr.

  v_dynnr  = '0101'.

  set screen 0100.

  leave screen.

endform.

 

form atualiza_tela using    p_itab_zycbt246 structure itab_zycbt246

                            p_pws_zycbe246  structure /pws/zycbe246.

  move-corresponding p_itab_zycbt246 to p_pws_zycbe246.

  move p_itab_zycbt246-mark to v_mark.

endform.

 

form adiciona_linha_tc

  using

    value(p_fieldname)  type dynpread-fieldname

    value(p_fieldvalue)

    value(p_stepl)      type dynpread-stepl

  changing

    p_itab_dynpread     type t_itab_dynpread.

  data:

    wa_dynpread type dynpread.

  wa_dynpread-fieldname  = p_fieldname.

  wa_dynpread-fieldvalue = p_fieldvalue.

  wa_dynpread-stepl      = p_stepl.

  append wa_dynpread to p_itab_dynpread.

endform.

 

form user_command_0101.

  case v_okcode.

    when 'SELEC'.

      call selection-screen 0200.

      clear v_okcode.

    when 'MALL'.

      loop at itab_zycbt246.

        itab_zycbt246-mark = 'X'.

        modify itab_zycbt246.

      endloop.

      clear v_okcode.

    when 'DMALL'.

      loop at itab_zycbt246.

        clear itab_zycbt246-mark.

        modify itab_zycbt246.

      endloop.

      clear v_okcode.

    when 'ELIM'.

      loop at itab_zycbt246 where mark = 'X'.

          delete itab_zycbt246.

      endloop.

      perform calcula_saldo_vinc.

      clear v_okcode.

    when 'CAPT'.

      get cursor field v_campo value v_valor.

      perform drill_down.

  endcase.

endform.

 

form atualiza_itab tables   p_itab_zycbt246 structure itab_zycbt246

                   using    p_pws_zycbe246  structure /pws/zycbe246

                            p_tc_assoc      type cx_tableview.

  move: p_pws_zycbe246-dtassoc to p_itab_zycbt246-dtassoc,

        v_mark                 to p_itab_zycbt246-mark,

        v_cat_moeda            to p_itab_zycbt246-catmoeda.

  modify p_itab_zycbt246 index p_tc_assoc-current_line.

endform.

 

form verifica_autorizacao_emp changing p_bloq.

  data v_bukrs type /pws/zycbt001-bukrs.

  select single bukrs from /pws/zycbt001

    into v_bukrs

    where nrseqc = /pws/zycbe001-nrseqc.

  authority-check object 'F_BKPF_BUK' id 'BUKRS'

                                   dummy

                                   id 'ACTVT' field '01'.

  if sy-subrc ne 0.

    authority-check object 'F_BKPF_BUK' id 'BUKRS' field

                                        v_bukrs

                                        id 'ACTVT' field '01'.

    if sy-subrc ne 0.

      clear v_okcode.

      p_bloq = 'X'.

      message e015 with text-e04.

    endif.

  else.

    authority-check object 'F_BKPF_BUK' id 'BUKRS' field

                                        v_bukrs

                                        id 'ACTVT' field '01'.

    if sy-subrc ne 0.

      clear v_okcode.

      p_bloq = 'X'.

      message e015 with text-e04.

    endif.

  endif.

endform.

 

form salva_associacao.

  data: v_assoc_ok.

  if itab_zycbt246[] = itab_zycbt246_ant[].

    message s015 with text-s01.

    v_exibe = 'X'.

    clear v_okcode.

    perform unlock_record using /pws/zycbe001-nrseqc.

    exit.

  endif.

  perform verifica_associacao changing v_assoc_ok.

  check v_assoc_ok is initial.

  loop at itab_zycbt246_ant into wa_zycbt246_ant.

    read table itab_zycbt246 into wa_zycbt246

      with key nrseqc_cp   =  wa_zycbt246_ant-nrseqc_cp

               nrparc      =  wa_zycbt246_ant-nrparc

               nrinvoic    =  wa_zycbt246_ant-nrinvoic

               nrparcf     =  wa_zycbt246_ant-nrparcf

               gsberf      =  wa_zycbt246_ant-gsberf

               dtvincul    =  wa_zycbt246_ant-dtvincul

               dtpagto     =  wa_zycbt246_ant-dtpagto

               dtpagext    =  wa_zycbt246_ant-dtpagext.

    if sy-subrc ne 0.

      select single *

        from /pws/zycbt246

        into wa_zycbt246

       where nrseqc_nce  =  /pws/zycbe001-nrseqc       and

             nrseqc_cp   =  wa_zycbt246_ant-nrseqc_cp  and

             nrparc      =  wa_zycbt246_ant-nrparc     and

             nrinvoic    =  wa_zycbt246_ant-nrinvoic   and

             nrparcf     =  wa_zycbt246_ant-nrparcf    and

             gsberf      =  wa_zycbt246_ant-gsberf     and

             dtvincul    =  wa_zycbt246_ant-dtvincul   and

             dtpagto     =  wa_zycbt246_ant-dtpagto    and

             dtpagext    =  wa_zycbt246_ant-dtpagext.

      if sy-subrc eq 0.

        move /pws/zycbt246-nrseqc_nce to v_identificador.

        move-corresponding wa_zycbt246 to /pws/zycbt246.

        perform carrega_log using '/PWS/ZYCBT246'

                                  'D'

                                  sy-tcode

                                  v_funcionalidade

                                  v_identificador.

        delete /pws/zycbt246 from wa_zycbt246.

      endif.

    endif.

  endloop.

  loop at itab_zycbt246 into wa_zycbt246.

    read table itab_zycbt246_ant into wa_zycbt246_ant

      with key nrseqc_cp   =  wa_zycbt246-nrseqc_cp

               nrparc      =  wa_zycbt246-nrparc

               nrinvoic    =  wa_zycbt246-nrinvoic

               nrparcf     =  wa_zycbt246-nrparcf

               gsberf      =  wa_zycbt246-gsberf

               dtvincul    =  wa_zycbt246-dtvincul

               dtpagto     =  wa_zycbt246-dtpagto

               dtpagext    =  wa_zycbt246-dtpagext.

    if sy-subrc ne 0.

      insert /pws/zycbt246 from wa_zycbt246.

      move /pws/zycbt246-nrseqc_nce to v_identificador.

      move-corresponding wa_zycbt246 to /pws/zycbt246.

      perform carrega_log using '/PWS/ZYCBT246'

                                'I'

                                sy-tcode

                                v_funcionalidade

                                v_identificador.

    else.

      modify /pws/zycbt246 from wa_zycbt246.

      move /pws/zycbt246-nrseqc_nce to v_identificador.

      move-corresponding wa_zycbt246 to /pws/zycbt246.

      perform carrega_log using '/PWS/ZYCBT246'

                                'U'

                                sy-tcode

                                v_funcionalidade

                                v_identificador.

    endif.

  endloop.

  update /pws/zycbt001

     set slvinc = /pws/zycbt001-slvinc

   where nrseqc = /pws/zycbt001-nrseqc.

  move /pws/zycbt001-nrseqc to v_identificador.

  move-corresponding /pws/zycbt001 to /pws/zycbt001.

  perform carrega_log using '/PWS/ZYCBT001'

                            'U'

                            sy-tcode

                            v_funcionalidade

                            v_identificador.

  commit work.

  v_exibe = 'X'.

  message s015 with text-s02.

  clear v_okcode.

  perform unlock_record using /pws/zycbe001-nrseqc.

  refresh itab_zycbt246_ant.

  itab_zycbt246_ant[] = itab_zycbt246[].

endform.

 

form verifica_associacao changing p_assoc_ok.

  data:  v_valor_vinc  type  /pws/zycbt001-vlme,

         v_saldo_vinc  type  /pws/zycbt001-vlme.

  clear: p_assoc_ok.

  if itab_zycbt246[] is initial.

    exit.

  endif.

  loop at itab_zycbt246.

    if itab_zycbt246-dtassoc is initial.

      clear v_okcode.

      message e015 with text-e05.

      p_assoc_ok = 'X'.

      exit.

    endif.

  endloop.

  v_saldo_vinc = /pws/zycbt001-vlme.

  loop at itab_zycbt246.

    v_valor_vinc = v_valor_vinc + itab_zycbt246-vlme_c.

  endloop.

  if v_valor_vinc > v_saldo_vinc.

    clear v_okcode.

    message e015 with text-e06 text-e07.

    p_assoc_ok = 'X'.

  endif.

endform.

 

form user_command_0002.

  case v_okcode.

    when 'BACK'.

      leave program.

    when 'ENTER'.

      clear v_exibe.

      perform seleciona_dados_exib.

  endcase.

endform.

 

form seleciona_dados_exib.

  data: v_bloq.

  perform verifica_autorizacao_emp changing v_bloq.

  check v_bloq is initial.

  select single *

    from /pws/zycbt001

    into /pws/zycbt001

    where nrseqc   = /pws/zycbe001-nrseqc.

  if sy-subrc ne 0.

    clear v_okcode.

    message w015 with text-e02.

    exit.

  else.

    if /pws/zycbt001-tpcontr ne 'NC'.

      clear v_okcode.

      message w015 with text-e03.

      exit.

    endif.

  endif.

  move-corresponding /pws/zycbt001 to /pws/zycbe001.

  clear wa_zycbt007.

  select single *

    from /pws/zycbt007

    into wa_zycbt007

   where bukrs eq /pws/zycbt001-bukrs.

  select * from /pws/zycbt246

    into table itab_zycbt246

   where nrseqc_nce = /pws/zycbt001-nrseqc.

  if sy-subrc ne 0.

    clear v_okcode.

    message w015 with text-e11 text-e13.

    exit.

  endif.

  if not itab_zycbt246[] is initial.

    read table itab_zycbt246 index 1.

    v_cat_moeda = itab_zycbt246-catmoeda.

    clear: v_compra,

           v_venda,

           v_media.

    if v_cat_moeda = 'G'.

      v_compra = 'X'.

    else.

      if v_cat_moeda = 'B'.

        v_venda = 'X'.

      elseif v_cat_moeda = 'M'.

        v_media = 'X'.

      endif.

    endif.

    v_exibe = 'X'.

  endif.

  itab_zycbt246_ant[] = itab_zycbt246[].

  clear v_okcode.

  v_screen = sy-dynnr.

  v_dynnr  = '0101'.

  set screen 0100.

  leave screen.

endform.

 

form calcula_montante using    p_vlme

                               p_de_moeda

                               p_para_moeda

                               p_ctgmoeda

                               p_dtbase

                               p_vl_conv.

  call function '/PWS/ZYCB_MONTANTE_CONVERTE'

       exporting

            i_montante                 = p_vlme

            i_demoeda                  = p_de_moeda

            i_paramoeda                = p_para_moeda

            i_ctmoeda                  = p_ctgmoeda

            i_dtbase                   = p_dtbase

       importing

            e_montante                 = p_vl_conv

       exceptions

            i_demoeda_nao_encontrado   = 1

            i_paramoeda_nao_encontrado = 2

            i_ctmoeda_nao_encontrado   = 3

            i_dtbase_nao_encontrada    = 4

            taxa_nao_encontrada        = 5

            fator_nao_encontrado       = 6

            i_montante_nao_encontrado  = 7

            others                     = 8.

  if sy-subrc ne 0.

    clear p_vl_conv.

  endif.

endform.

 

form limpa_dados.

  clear:   v_okcode,

           /pws/zycbt001,

           /pws/zycbt006,

           /pws/zycbe001,

           itab_zycbt246,

           itab_zycbt246_ant.

  refresh: itab_zycbt246,

           itab_zycbt246_ant.

endform.

 

form set_screen_0200.

  set pf-status '0200'.

  set titlebar  '0200'.

endform.

 

form calcula_saldo_vinc.

  data:  v_saldo_vinc    type /pws/zycbt001-slvinc.

  clear: v_saldo_vinc.

  loop at itab_zycbt246.

    v_saldo_vinc = v_saldo_vinc + itab_zycbt246-vlme_c.

  endloop.

  if v_saldo_vinc > /pws/zycbt001-vlme.

    /pws/zycbt001-slvinc = 0.

  else.

    /pws/zycbt001-slvinc = /pws/zycbt001-vlme - v_saldo_vinc.

  endif.

endform.

 

form selecionar_faturas.

  data: begin of itab_zycbt006 occurs 0.

     include structure /pws/zycbt006.

  data: end of itab_zycbt006.

  data: v_nlin(1)   type c,

        v_existe(1) type c.

  if nrseqc[] is initial.

    exit.

  endif.

  clear: v_nlin,

         v_existe.

  select *

    from /pws/zycbt006

    into table itab_zycbt006

   where nrseqc in nrseqc.

  select *

    from /pws/zycbt001

    into table itab_zycbt001

   where nrseqc in nrseqc.

  if not itab_zycbt006[] is initial.

    loop at itab_zycbt006.

      select single *

        from /pws/zycbt246

      where nrseqc_cp   =  itab_zycbt006-nrseqc

        and nrseqc_nce ne  /pws/zycbt001-nrseqc.

      if sy-subrc ne 0.

        select single *

          from /pws/zycbt246

        where nrseqc_cp  =  itab_zycbt006-nrseqc

          and nrparc     =  itab_zycbt006-nrparc

          and nrinvoic   =  itab_zycbt006-nrinvoic

          and nrparcf    =  itab_zycbt006-nrparcf

          and gsberf     =  itab_zycbt006-gsberf

          and dtvincul   =  itab_zycbt006-dtvincul

          and dtpagto    =  itab_zycbt006-dtpagto

          and dtpagext   =  itab_zycbt006-dtpagext.

        if sy-subrc ne 0.

          read table itab_zycbt246 with key

                               nrseqc_cp  =  itab_zycbt006-nrseqc

                               nrparc     =  itab_zycbt006-nrparc

                               nrinvoic   =  itab_zycbt006-nrinvoic

                               nrparcf    =  itab_zycbt006-nrparcf

                               gsberf     =  itab_zycbt006-gsberf

                               dtvincul   =  itab_zycbt006-dtvincul

                               dtpagto    =  itab_zycbt006-dtpagto

                               dtpagext   =  itab_zycbt006-dtpagext.

        endif.

      endif.

      if sy-subrc ne 0.

        v_nlin = 'X'.

        clear: itab_zycbt246,

               v_brl_contr.

        if v_compra = 'X'.

          v_cat_moeda = 'G'.

        else.

          if v_venda = 'X'.

            v_cat_moeda = 'B'.

          elseif v_media = 'X'.

            v_cat_moeda = 'M'.

          endif.

        endif.

        itab_zycbt246-mandt       =  sy-mandt.

        itab_zycbt246-nrseqc_nce  =  /pws/zycbt001-nrseqc.

        itab_zycbt246-nrseqc_cp   =  itab_zycbt006-nrseqc.

        itab_zycbt246-nrparc      =  itab_zycbt006-nrparc.

        itab_zycbt246-nrinvoic    =  itab_zycbt006-nrinvoic.

        itab_zycbt246-nrparcf     =  itab_zycbt006-nrparcf.

        itab_zycbt246-gsberf      =  itab_zycbt006-gsberf.

        itab_zycbt246-dtvincul    =  itab_zycbt006-dtvincul.

        itab_zycbt246-dtpagto     =  itab_zycbt006-dtpagto.

        itab_zycbt246-dtpagext    =  itab_zycbt006-dtpagext.

        itab_zycbt246-waers       =  itab_zycbt006-waers.

        itab_zycbt246-vlme        =  itab_zycbt006-vlme.

        itab_zycbt246-kunnr       =  itab_zycbt006-kunnr.

        itab_zycbt246-catmoeda    =  v_cat_moeda.

        v_brl_contr = itab_zycbt006-vlme.

        perform casas_decimais   using itab_zycbt246-waers

                                       wa_zycbt007-waersb.

        if v_decimais eq 0 and v_decimais_c > 0.

          v_brl_contr = v_brl_contr * 100.

        endif.

        perform calcula_montante using v_brl_contr

                                       itab_zycbt246-waers

                                       wa_zycbt007-waersb

                                       v_cat_moeda

                                       /pws/zycbt001-dtcontr

                                       v_brl_contr.

        itab_zycbt246-vlme_c   =  v_brl_contr.

        itab_zycbt246-waers_c  =  wa_zycbt007-waersb.

        read table itab_zycbt001 with key nrseqc = itab_zycbt006-nrseqc.

        if sy-subrc eq 0 and itab_zycbt001-slpagar = 0.

          call function '/PWS/ZYGL_OBTEM_ANO_CONTABIL'

               exporting

                    v_bukrs                = /pws/zycbt001-bukrs

                    v_date                 = itab_zycbt001-dtcontr

               importing

                    v_year                 = v_gjahr

               exceptions

                    variante_de_exercicio  = 1

                    data_nao_encontrada    = 2

                    empresa_nao_encontrada = 3

                    period_in_not_valid    = 4

                    period_not_assigned    = 5

                    version_undefined      = 6

                    others                 = 7.

          itab_zycbt246-gjahr       =  v_gjahr.

          clear v_lock.

          perform lock_record_cp using itab_zycbt006-nrseqc

                                       itab_zycbt006-tpdesp

                                       itab_zycbt006-nrparc

                                       itab_zycbt006-dtincl

                                       itab_zycbt006-nrinvoic

                                       itab_zycbt006-gsberf

                                       itab_zycbt006-dtvincul

                              changing v_lock.

          if v_lock is initial.

            append itab_zycbt246.

          else.

            concatenate itab_zycbt006-nrseqc

                        itab_zycbt006-nrparc

                   into v_contrato separated by '-'.

            message w061 with text-i09 v_contrato text-i10.

          endif.

        endif.

      endif.

    endloop.

  endif.

  clear: v_okcode.

  if v_nlin is initial.

    message e015 with text-e08.

  else.

    leave to screen '0100'.

  endif.

endform.

 

form drill_down.

  check v_campo eq '/PWS/ZYCBT001-NRSEQC'     or

        v_campo eq '/PWS/ZYCBE246-NRSEQC_CP'.

  if not v_valor is initial.

    authority-check object 'S_TCODE' id 'TCD'

                     field  '/PWS/ZYCB001_E'.

    if sy-subrc eq 0.

      set parameter id '/PWS/ZYCBP019' field v_valor.

      call transaction '/PWS/ZYCB001_E' and skip first screen.

    else.

      message e261(sf) with '/PWS/ZYCB001_E'.

    endif.

  endif.

  clear v_okcode.

endform.

 

form casas_decimais using  p_de_moeda

                           p_para_moeda.

  select single currdec from tcurx

    into v_decimais

    where currkey = p_de_moeda.

  if sy-subrc <> 0.

    v_decimais = 2.

  endif.

  select single currdec from tcurx

    into v_decimais_c

    where currkey = p_para_moeda.

  if sy-subrc <> 0.

    v_decimais_c = 2.

  endif.

endform.

 

form lock_record using p_nrseqc.

  clear v_reg_usado.

  check sy-tcode = c_transacao_c or

        sy-tcode = c_transacao_a or

        sy-tcode = c_transacao_e.

  check not p_nrseqc is initial.

  call function '/PWS/ZYCB_ENQUEUE_ZYCBT001'

       exporting

            nrseqc         = p_nrseqc

       exceptions

            foreign_lock   = 1

            system_failure = 2.

  case sy-subrc.

    when 1.

      message w015 with text-i06 text-i07.

      v_exibe     = 'X'.

      v_reg_usado = 'X'.

    when 2.

      message a015 with text-i08.

  endcase.

endform.

 

form unlock_record using p_nrseqc.

  check sy-tcode = c_transacao_c or

        sy-tcode = c_transacao_a.

  call function '/PWS/ZYCB_DEQUEUE_ZYCBT001'

       exporting

            nrseqc = p_nrseqc.

  loop at itab_lock_cp.

    call function '/PWS/ZYCB_DEQUEUE_ZYCBT005'

         exporting

              nrseqc   = itab_lock_cp-nrseqc

              tpdesp   = itab_lock_cp-tpdesp

              nrparc   = itab_lock_cp-nrparc

              dtincl   = itab_lock_cp-dtincl

              nrinvoic = itab_lock_cp-nrinvoic

              gsberf   = itab_lock_cp-gsberf

              dtvincul = itab_lock_cp-dtvincul.

  endloop.

  clear   itab_lock_cp.

  refresh itab_lock_cp.

endform.

 

form lock_record_cp using p_nrseqc

                          p_tpdesp

                          p_nrparc

                          p_dtincl

                          p_nrinvoic

                          p_gsberf

                          p_dtvincul

                 changing v_lock.

  clear v_lock.

  read table itab_lock_cp with key nrseqc    =  p_nrseqc

                                   tpdesp    =  p_tpdesp

                                   nrparc    =  p_nrparc

                                   dtincl    =  p_dtincl

                                   nrinvoic  =  p_nrinvoic

                                   gsberf    =  p_gsberf

                                   dtvincul  =  p_dtvincul.

  check sy-subrc ne 0.

  call function '/PWS/ZYCB_ENQUEUE_ZYCBT005'

       exporting

            nrseqc         =  p_nrseqc

            tpdesp         =  p_tpdesp

            nrparc         =  p_nrparc

            dtincl         =  p_dtincl

            nrinvoic       =  p_nrinvoic

            gsberf         =  p_gsberf

            dtvincul       =  p_dtvincul

       exceptions

            foreign_lock   = 1

            system_failure = 2.

  if sy-subrc ne 0.

    v_lock = 'N'.

  else.

    clear itab_lock_cp.

    itab_lock_cp-nrseqc    =  p_nrseqc.

    itab_lock_cp-tpdesp    =  p_tpdesp.

    itab_lock_cp-nrparc    =  p_nrparc.

    itab_lock_cp-dtincl    =  p_dtincl.

    itab_lock_cp-nrinvoic  =  p_nrinvoic.

    itab_lock_cp-gsberf    =  p_gsberf.

    itab_lock_cp-dtvincul  =  p_dtvincul.

    append itab_lock_cp.

  endif.

endform.

* << Fim da inclusão

 

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

*** Criado Include - REPS /PWS/MZYCB125I01

 

* >> Início da inclusão:

module exit_command input.

  case sy-dynnr.

    when '0001' or '0002'.

      leave program.

    when '0100'.

      perform unlock_record using /pws/zycbe001-nrseqc.

      set screen v_screen.

      leave screen.

  endcase.

endmodule.

 

module user_command input.

  case sy-dynnr.

    when '0001'.

      perform user_command_0001.

    when '0002'.

      perform user_command_0002.

    when '0100'.

      perform user_command_0100.

    when '0101'.

      perform user_command_0101.

  endcase.

endmodule.

 

module match_code_associacao input.

  call function 'DYNP_GET_STEPL'

       importing

            povstepl = v_line.

  v_tabname     = '/PWS/ZYCBE001'.

  v_fieldname   = 'NRSEQC'.

  v_searchhelp  = '/PWS/ZYCBA305'.

  v_shlpparam   = 'NRSEQC'.

  refresh: itab_tdynpread, itab_result.

  clear:   wa_tdynpread, wa_result.

  concatenate v_tabname v_fieldname into wa_tdynpread-fieldname

    separated by '-'.

  wa_tdynpread-stepl      = v_line.

  append wa_tdynpread to itab_tdynpread.

  call function 'DYNP_VALUES_READ'

       exporting

            dyname     = '/PWS/SAPMZYCB125'

            dynumb     = sy-dynnr

       tables

            dynpfields = itab_tdynpread.

  read table itab_tdynpread into wa_tdynpread index 1.

  check sy-subrc eq 0.

  refresh: itab_tdynpread, itab_result.

  clear: wa_tdynpread, wa_result.

  call function 'F4IF_FIELD_VALUE_REQUEST'

       exporting

            tabname    = v_tabname

            fieldname  = v_fieldname

            searchhelp = v_searchhelp

            shlpparam  = v_shlpparam

            display    = l_display

       tables

            return_tab = itab_result

       exceptions

            others     = 5.

  if sy-subrc eq 0.

  endif.

  read table itab_result into wa_result index 1.

  if sy-subrc eq 0.

    concatenate v_tabname v_fieldname into wa_tdynpread-fieldname

      separated by '-'.

    wa_tdynpread-fieldvalue = wa_result-fieldval.

    wa_tdynpread-stepl      = v_line.

    append wa_tdynpread to itab_tdynpread.

    call function 'DYNP_VALUES_UPDATE'

         exporting

              dyname     = sy-cprog

              dynumb     = sy-dynnr

         tables

              dynpfields = itab_tdynpread

         exceptions

              others     = 8.

    if sy-subrc eq 0.

    endif.

  endif.

endmodule.

 

module match_code_cambio_pronto input.

  types:

    begin of t_s_dados,

      nrseqc       type /pws/zycbt006-nrseqc,

      nrinvoic     type /pws/zycbt006-nrinvoic,

      nrparcf      type /pws/zycbt006-nrparcf,

      gsberf       type /pws/zycbt006-gsberf,

      nrparc       type /pws/zycbt006-nrparc,

      dtvincul     type /pws/zycbt006-dtvincul,

      dtpagto      type /pws/zycbt006-dtpagto,

      dtpagext     type /pws/zycbt006-dtpagext,

      kunnr        type /pws/zycbt006-kunnr,

      waers        type /pws/zycbt006-waers,

      vlme         type /pws/zycbt006-vlme,

      vlme_c       type /pws/zycbt006-vlme_c,

      bukrs        type /pws/zycbt006-bukrs,

    end of t_s_dados,

    t_t_dados type standard table of t_s_dados.

  types:

    begin of shlp_intdescr_t,

      issimple       like  dd30v-issimple,

      hotkey         like  dd30v-hotkey,

      selmtype       like  dd30v-selmtype,

      selmethod      like  dd30v-selmethod,

      texttab        like  dd30v-texttab,

      selmexit       like  dd30v-selmexit,

      dialogtype     like  dd30v-dialogtype,

      ddlanguage     like  dd30v-ddlanguage,

      ddtext         like  dd30v-ddtext,

      dialoginfo(1)  type  c,

      f4state(1)     type  c,

      tabname        like  dd02v-tabname,

      fieldname      like  dd03p-fieldname,

      title          like  dd04v-ddtext,

      history,

      handle         type sy-tabix,

    end of shlp_intdescr_t.

  types:

    begin of shlp_descr_t,

      shlpname       like  dd30v-shlpname,

      shlptype       like  ddshdescr-shlptype,

      intdescr       type  shlp_intdescr_t,

      interface      like  ddshiface occurs 0,

      fielddescr     like  dfies occurs 0,

      fieldprop      like  ddshfprop occurs 0,

      selopt         like  ddshselopt occurs 0,

    end of shlp_descr_t.

  data:

      shlp_curr      type  shlp_descr_t,

      shlp_struc     like  /pws/zycbv306,

      tdynpread      like  dynpread occurs 0 with header line,

      v_pos(1)       type  c,

      v_index        type  i value 0,

      itab_dados     type  t_t_dados with header line,

      wa_zycbt006    like  /pws/zycbt006,

      v_dtvincul(10) type c,

      v_dtpagto(10)  type c,

      v_dtpagext(10) type c,

      v_dtassoc(10)  type c,

      v_msg(100)     type c.

  data: begin of itab_zycbt006_aux occurs 0.

          include structure /pws/zycbt006.

  data: end of itab_zycbt006_aux.

  data: begin of record_tab occurs 0.

          include structure seahlpres.

  data: end of record_tab.

  set parameter id 'BUK' field /pws/zycbe001-bukrs.

  call function 'DYNP_GET_STEPL'

       importing

            povstepl = v_line.

  v_tabname     = '/PWS/ZYCBE246'.

  v_fieldname   = 'NRSEQC_CP'.

  v_searchhelp  = '/PWS/ZYCBA306'.

  v_shlpparam   = 'NRSEQC'.

  refresh: itab_tdynpread, itab_result.

  clear:   wa_tdynpread, wa_result.

  concatenate v_tabname v_fieldname into wa_tdynpread-fieldname

    separated by '-'.

  wa_tdynpread-stepl      = v_line.

  append wa_tdynpread to itab_tdynpread.

  call function 'DYNP_VALUES_READ'

       exporting

            dyname     = '/PWS/SAPMZYCB125'

            dynumb     = sy-dynnr

       tables

            dynpfields = itab_tdynpread.

  read table itab_tdynpread into wa_tdynpread index 1.

  check sy-subrc eq 0.

  v_nrseqc = /pws/zycbt001-nrseqc.

  export v_nrseqc to memory id 'NRSEQ-CB125'.

  refresh: itab_tdynpread, itab_result.

  clear: wa_tdynpread, wa_result.

  call function 'F4IF_FIELD_VALUE_REQUEST'

       exporting

            tabname         = v_tabname

            fieldname       = v_fieldname

            searchhelp      = v_searchhelp

            shlpparam       = v_shlpparam

            multiple_choice = 'X'

            display         = l_display

       tables

            return_tab      = itab_result

       exceptions

            others          = 5.

  check sy-subrc eq 0 and l_display eq space.

  import itab_dados from memory id 'mcx_itab_dados'.

  import record_tab from memory id 'mcx_record_tab'.

  import shlp_curr  from memory id 'mcx_shlp_curr'.

  check sy-subrc eq 0.

  free memory id 'NRSEQ-CB125'.

  check v_exibe is initial.

  do v_line times.

    clear tdynpread.

    refresh tdynpread.

    tdynpread-fieldname = '/PWS/ZYCBE246-NRINVOIC'.

    tdynpread-stepl     = v_line - 1.

    append tdynpread.

    call function 'DYNP_VALUES_READ'

         exporting

              dyname     = '/PWS/SAPMZYCB125'

              dynumb     = '0101'

         tables

              dynpfields = tdynpread.

    if sy-subrc              eq 0       and

        tdynpread-fieldvalue is initial and

        tdynpread-stepl      gt 0.

      v_line = tdynpread-stepl.

    elseif sy-subrc             eq 0       and

       not tdynpread-fieldvalue is initial.

      exit.

    endif.

  enddo.

  clear   tdynpread.

  refresh tdynpread.

  check not record_tab[] is initial.

  if not itab_dados[] is initial.

    refresh itab_zycbt006_aux.

    loop at itab_dados.

      read table itab_zycbt246

                      with key nrseqc_cp  =  itab_dados-nrseqc

                               nrparc     =  itab_dados-nrparc

                               nrinvoic   =  itab_dados-nrinvoic

                               nrparcf    =  itab_dados-nrparcf

                               gsberf     =  itab_dados-gsberf

                               dtvincul   =  itab_dados-dtvincul

                               dtpagto    =  itab_dados-dtpagto

                               dtpagext   =  itab_dados-dtpagext.

      if sy-subrc ne 0.

        select single *

          from /pws/zycbt006

          into wa_zycbt006

         where nrseqc    =  itab_dados-nrseqc    and

               nrparc    =  itab_dados-nrparc    and

               nrinvoic  =  itab_dados-nrinvoic  and

               nrparcf   =  itab_dados-nrparcf   and

               gsberf    =  itab_dados-gsberf    and

               dtvincul  =  itab_dados-dtvincul  and

               dtpagto   =  itab_dados-dtpagto   and

               dtpagext  =  itab_dados-dtpagext.

        if sy-subrc eq 0.

          move-corresponding wa_zycbt006 to itab_zycbt006_aux.

          append itab_zycbt006_aux.

        endif.

      endif.

    endloop.

  endif.

  if v_compra = 'X'.

    v_cat_moeda = 'G'.

  else.

    if v_venda = 'X'.

      v_cat_moeda = 'B'.

    elseif v_media = 'X'.

      v_cat_moeda = 'M'.

    endif.

  endif.

  v_index = 0.

  clear v_reg_lock.

  if not itab_zycbt006_aux[] is initial.

    select *

      from /pws/zycbt001

      into table itab_zycbt001

    for all entries in itab_zycbt006_aux

     where nrseqc = itab_zycbt006_aux-nrseqc.

    loop at itab_zycbt006_aux.

      clear v_lock.

      perform lock_record_cp using itab_zycbt006_aux-nrseqc

                                   itab_zycbt006_aux-tpdesp

                                   itab_zycbt006_aux-nrparc

                                   itab_zycbt006_aux-dtincl

                                   itab_zycbt006_aux-nrinvoic

                                   itab_zycbt006_aux-gsberf

                                   itab_zycbt006_aux-dtvincul

                          changing v_lock.

      if not v_lock is initial.

        v_reg_lock = 'X'.

      else.

        v_index = v_index + 1.

        if v_index gt 1.

          v_line = v_line + 1.

        endif.

        read table itab_zycbt001

                        with key nrseqc = itab_zycbt006_aux-nrseqc.

        call function '/PWS/ZYGL_OBTEM_ANO_CONTABIL'

             exporting

                  v_bukrs                = /pws/zycbt001-bukrs

                  v_date                 = itab_zycbt001-dtcontr

             importing

                  v_year                 = v_gjahr

             exceptions

                  variante_de_exercicio  = 1

                  data_nao_encontrada    = 2

                  empresa_nao_encontrada = 3

                  period_in_not_valid    = 4

                  period_not_assigned    = 5

                  version_undefined      = 6

                  others                 = 7.

        call function '/PWS/ZYGL_TRATA_DATA'

             exporting

                  i_trdata   = itab_zycbt006_aux-dtvincul

             importing

                  e_trdata   = v_dtvincul

             exceptions

                  v_dtbranco = 1.

        call function '/PWS/ZYGL_TRATA_DATA'

             exporting

                  i_trdata   = itab_zycbt006_aux-dtpagto

             importing

                  e_trdata   = v_dtpagto

             exceptions

                  v_dtbranco = 1.

        call function '/PWS/ZYGL_TRATA_DATA'

             exporting

                  i_trdata   = itab_zycbt006_aux-dtpagext

             importing

                  e_trdata   = v_dtpagext

             exceptions

                  v_dtbranco = 1.

        call function '/PWS/ZYGL_TRATA_DATA'

             exporting

                  i_trdata   = sy-datum

             importing

                  e_trdata   = v_dtassoc

             exceptions

                  v_dtbranco = 1.

        perform adiciona_linha_tc:

          using

            '/PWS/ZYCBE246-NRSEQC_CP' itab_zycbt006_aux-nrseqc   v_line

          changing

            tdynpread[],

          using

            '/PWS/ZYCBE246-NRINVOIC'  itab_zycbt006_aux-nrinvoic v_line

          changing

            tdynpread[],

          using

            '/PWS/ZYCBE246-NRPARCF'   itab_zycbt006_aux-nrparcf  v_line

          changing

            tdynpread[],

          using

            '/PWS/ZYCBE246-GSBERF'    itab_zycbt006_aux-gsberf   v_line

          changing

            tdynpread[],

          using

            '/PWS/ZYCBE246-DTVINCUL'  v_dtvincul                 v_line

          changing

            tdynpread[],

          using

            '/PWS/ZYCBE246-DTPAGTO'   v_dtpagto                  v_line

          changing

            tdynpread[],

          using

            '/PWS/ZYCBE246-DTPAGEXT'  v_dtpagext                 v_line

          changing

            tdynpread[],

          using

            '/PWS/ZYCBE246-KUNNR'     itab_zycbt006_aux-kunnr    v_line

          changing

            tdynpread[],

          using

            '/PWS/ZYCBE246-WAERS'     itab_zycbt006_aux-waers    v_line

          changing

            tdynpread[],

          using

            '/PWS/ZYCBE246-VLME'      itab_zycbt006_aux-vlme     v_line

          changing

            tdynpread[],

          using

            '/PWS/ZYCBE246-VLME_C'    itab_zycbt006_aux-vlme_c   v_line

          changing

            tdynpread[],

          using

            '/PWS/ZYCBE246-GJAHR'     v_gjahr                    v_line

          changing

            tdynpread[].

        itab_zycbt246-mandt       =  sy-mandt.

        itab_zycbt246-nrseqc_nce  =  /pws/zycbt001-nrseqc.

        itab_zycbt246-nrseqc_cp   =  itab_zycbt006_aux-nrseqc.

        itab_zycbt246-nrparc      =  itab_zycbt006_aux-nrparc.

        itab_zycbt246-nrinvoic    =  itab_zycbt006_aux-nrinvoic.

        itab_zycbt246-nrparcf     =  itab_zycbt006_aux-nrparcf.

        itab_zycbt246-gsberf      =  itab_zycbt006_aux-gsberf.

        itab_zycbt246-dtvincul    =  itab_zycbt006_aux-dtvincul.

        itab_zycbt246-dtpagto     =  itab_zycbt006_aux-dtpagto.

        itab_zycbt246-dtpagext    =  itab_zycbt006_aux-dtpagext.

        itab_zycbt246-waers       =  itab_zycbt006_aux-waers.

        itab_zycbt246-vlme        =  itab_zycbt006_aux-vlme.

        itab_zycbt246-vlme_c      =  itab_zycbt006_aux-vlme_c.

        itab_zycbt246-kunnr       =  itab_zycbt006_aux-kunnr.

        itab_zycbt246-catmoeda    =  v_cat_moeda.

        itab_zycbt246-gjahr       =  v_gjahr.

        append itab_zycbt246.

      endif.

    endloop.

    call function 'DYNP_VALUES_UPDATE'

         exporting

              dyname     = sy-cprog

              dynumb     = '0101'

         tables

              dynpfields = tdynpread

         exceptions

              others     = 8.

  endif.

endmodule.

 

module atualiza_itab_associacao input.

  perform atualiza_itab tables  itab_zycbt246

                        using   /pws/zycbe246

                                tc_associacao.

endmodule.

 

module calcula_saldo input.

  data:  v_exc(1) type c.

  clear: v_saldo,

         v_brl_contr.

  if v_compra = 'X'.

    v_cat_moeda = 'G'.

  else.

    if v_venda = 'X'.

      v_cat_moeda = 'B'.

    elseif v_media = 'X'.

      v_cat_moeda = 'M'.

    endif.

  endif.

  loop at itab_zycbt246.

    v_brl_contr = itab_zycbt246-vlme.

    perform casas_decimais   using itab_zycbt246-waers

                                   wa_zycbt007-waersb.

    if v_decimais eq 0 and v_decimais_c > 0.

      v_brl_contr = v_brl_contr * 100.

    endif.

    perform calcula_montante using v_brl_contr

                                   itab_zycbt246-waers

                                   wa_zycbt007-waersb

                                   v_cat_moeda

                                   /pws/zycbt001-dtcontr

                                   v_brl_contr.

    itab_zycbt246-vlme_c   =  v_brl_contr.

    itab_zycbt246-waers_c  =  wa_zycbt007-waersb.

    modify itab_zycbt246.

  endloop.

  v_exc = 'N'.

  loop at itab_zycbt246.

    v_saldo = v_saldo + itab_zycbt246-vlme_c.

    if v_saldo > /pws/zycbt001-vlme.

      v_exc   = 'S'.

      v_saldo = v_saldo - itab_zycbt246-vlme_c.

      delete itab_zycbt246 index sy-tabix.

    endif.

  endloop.

  if v_exc = 'S'.

    message w015 with text-i04 text-i05.

  endif.

  /pws/zycbt001-slvinc = /pws/zycbt001-vlme - v_saldo.

endmodule.

* << Fim da inclusão

 

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

*** Criado Include - REPS /PWS/MZYCB125O01

 

* >> Início da inclusão:

module status_0001 output.

  set pf-status '0001'.

  set titlebar  '0001'.

endmodule.

 

module status_0100 output.

  refresh itab_fcode.

  if v_reg_lock = 'X'.

    clear v_reg_lock.

    message i015 with text-i11 text-i12.

  endif.

  if sy-tcode eq c_transacao_c and

     v_exibe  is initial.

    wa_fcode-ucomm = 'RELAT'.

    append wa_fcode to itab_fcode.

  endif.

  if v_exibe is initial.

    wa_fcode-ucomm = 'INFO'.

    append wa_fcode to itab_fcode.

    wa_fcode-ucomm = 'LOG_TRILHA'.

    append wa_fcode to itab_fcode.

  else.

    wa_fcode-ucomm = 'SAVE'.

    append wa_fcode to itab_fcode.

  endif.

  if not v_exibe is initial or not itab_zycbt246_ant[] is initial.

    loop at screen.

      screen-input = 0.

      modify screen.

    endloop.

  endif.

  set pf-status '0100' excluding itab_fcode.

  if v_exibe is initial.

    set titlebar '100A'.

  else.

    set titlebar '100E'.

  endif.

endmodule.

 

module verifica_autorizacao output.

  authority-check object 'S_TCODE' id 'TCD' field sy-tcode.

  if sy-subrc ne 0.

    message e015 with text-e01.

  endif.

endmodule.

 

module atualiza_tela_associacao output.

  perform atualiza_tela using itab_zycbt246

                              /pws/zycbe246.

endmodule.

 

module ajusta_tc output.

  clear v_lines.

  case sy-dynnr.

    when '0101'.

      describe table itab_zycbt246 lines v_lines.

      tc_associacao-lines = v_lines + 15.

  endcase.

endmodule.

 

module status_0101 output.

  if not v_exibe is initial.

    loop at screen.

      screen-input = 0.

      modify screen.

    endloop.

    loop at tc_associacao-cols into wa_cols.

      wa_cols-screen-input = '0'.

      modify tc_associacao-cols from wa_cols.

    endloop.

  else.

    loop at screen.

      screen-input = 1.

      modify screen.

    endloop.

    loop at tc_associacao-cols into wa_cols.

      if wa_cols-screen-name  =  '/PWS/ZYCBE246-DTASSOC'   or

         wa_cols-screen-name  =  '/PWS/ZYCBE246-NRSEQC_CP'.

        wa_cols-screen-input = '1'.

      else.

        wa_cols-screen-input = '0'.

      endif.

      modify tc_associacao-cols from wa_cols.

    endloop.

  endif.

endmodule.

 

module status_0002 output.

  set pf-status '0002'.

  set titlebar  '0002'.

endmodule.

* << Fim da inclusão

 

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

*** Criado Include - REPS /PWS/MZYCB125TOP

 

* >> Início da inclusão:

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

type-pools:cxtab.

types:

  t_itab_dynpread type table of dynpread,

  begin of ty_zycbt246t.

          include structure /pws/zycbe246.

  types:  mark,

  end of ty_zycbt246t,

  begin of ty_fcode,

    ucomm type sy-ucomm,

  end of ty_fcode.

tables: /pws/zycbe001,

        /pws/zycbe246,

        /pws/zycbt001,

        /pws/zycbt246,

        /pws/zycbt006.

data: itab_zycbt246       type table of ty_zycbt246t with header line,

      itab_zycbt246_ant   type table of ty_zycbt246t with header line,

      itab_tdynpread      type standard table of dynpread,

      itab_result         type standard table of ddshretval,

      itab_fcode          type standard table of ty_fcode.

data: begin of itab_zycbt001 occurs 0.

  include structure /pws/zycbt001.

data: end of itab_zycbt001.

data: begin of itab_lock_cp occurs 0,

         nrseqc    like  /pws/zycbt006-nrseqc,

         tpdesp    like  /pws/zycbt006-tpdesp,

         nrparc    like  /pws/zycbt006-nrparc,

         dtincl    like  /pws/zycbt006-dtincl,

         nrinvoic  like  /pws/zycbt006-nrinvoic,

         gsberf    like  /pws/zycbt006-gsberf,

         dtvincul  like  /pws/zycbt006-dtvincul,

      end of itab_lock_cp.

data: wa_cols             type cxtab_column,

      wa_tdynpread        type dynpread,

      wa_result           type ddshretval,

      wa_fcode            type ty_fcode,

      wa_zycbt007         type /pws/zycbt007,

      wa_zycbt246         type /pws/zycbt246,

      wa_zycbt246_ant     type /pws/zycbt246.

data: v_okcode            type sy-ucomm,

      v_exibe             type c,

      v_screen            type sy-dynnr,

      v_dynnr             type sy-dynnr,

      v_gjahr             type bseg-gjahr,

      v_mark              type c,

      v_lines             type i,

      v_nrseqc            type /pws/zycbt001-nrseqc,

      v_reg_usado(1)      type c,

      v_lock(1)           type c,

      v_reg_lock(1)       type c,

      v_contrato(30)      type c,

      v_compra,

      v_venda,

      v_media,

      v_funcionalidade    type  /pws/zyglt390-programa

                                        value '/PWS/SAPMZYCB125',

      v_identificador     type  /pws/zyglt390-identificador,

      v_saldo             type  /pws/zycbt001-slvinc,

      v_brl_contr         type  /pws/zycbt001-slvinc,

      v_cat_moeda         type  tcurr-kurst,

      v_valor(20),

      v_campo(27),

      v_decimais          like  tcurx-currdec,

      v_decimais_c        like  tcurx-currdec.

data: v_tabname           type dfies-tabname,

      v_fieldname         type dfies-fieldname,

      v_searchhelp        type shlpname,

      v_shlpparam         type shlpfield,

      l_display(1)        type c,

      v_line              type i.

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

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

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

controls: tc_associacao   type tableview using screen '0101'.

 selection-screen begin of screen 0200.

 select-options:

         nrseqc for /pws/zycbe001-nrseqc modif id nsq

                                      matchcode object /pws/zycba306.

 selection-screen end of screen 0200.

at selection-screen output.

   if sy-dynnr = '0200'.

     v_nrseqc = /pws/zycbe001-nrseqc.

     export v_nrseqc to memory id 'NRSEQ-CB125'.

     perform set_screen_0200.

   endif.

 at selection-screen.

   if sy-dynnr = '0200'.

     free memory id 'NRSEQ-CB125'.

     perform selecionar_faturas.

   endif.

* << Fim da inclusão

 

 

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

 

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

*** Criado Novo Report - REPS /PWS/ZYCBR125 ***

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

 

Código:                  /PWS/ZYCBR125

Título:                  Relatório Associação de Contrato NCE com CP

Categoria:               1 Programa executável

Status:

Aplicação:

Grupo de autorização:

Classe desenvolvimento:  /PWS/ZYCB - pw.CE - Câmbio Exportação

Banco de dados lógico:

Versão tela seleção:

 

 

* >> Início da inclusão:

report  /pws/zycbr125 message-id /pws/zycbm

                      line-count 65(1)

                      line-size  286

                      no standard page heading.

tables:

  /pws/zycbt001,

  /pws/zycbt007,

  /pws/zycbt021,

  /pws/zycbt246,

  kna1,

  t001.

data:

  v_nrseqc type  /pws/zycbt001-nrseqc.

include /pws/z_rel_alv.

data: begin of rs_result,

         nrseqc_nce     like /pws/zycbt246-nrseqc_nce,

         nrseqc_cp      like /pws/zycbt246-nrseqc_cp,

         nrparc         like /pws/zycbt246-nrparc,

         nrinvoic       like /pws/zycbt246-nrinvoic,

         nrparcf        like /pws/zycbt246-nrparcf,

         gsberf         like /pws/zycbt246-gsberf,

         dtvincul       like /pws/zycbt246-dtvincul,

         dtpagto        like /pws/zycbt246-dtpagto,

         dtpagext       like /pws/zycbt246-dtpagext,

         dtassoc        like /pws/zycbt246-dtassoc,

         waers          like /pws/zycbt246-waers,

         vlme           like /pws/zycbt246-vlme,

         vlme_c         like /pws/zycbt246-vlme_c,

         kunnr          like /pws/zycbt246-kunnr,

         gjahr          like /pws/zycbt246-gjahr,

         j_1bbranch     like /pws/zycbt001-j_1bbranch,

         nrcontr        like /pws/zycbt001-nrcontr,

         bukrs          like /pws/zycbt001-bukrs,

         slvinc         like /pws/zycbt001-slvinc,

         name1          like kna1-name1,

         waers_c        like /pws/zycbt246-waers_c,

      end of rs_result.

data: i_result like standard table of rs_result initial size 10

       with header line.

data: begin of i_final occurs 0.

        include structure rs_result.

data: end of i_final.

data: begin of itab_relat occurs 0.

        include structure rs_result.

data: end of itab_relat.

data: begin of itab_relat2 occurs 0.

        include structure rs_result.

data: end of itab_relat2.

data: begin of itab_zycbt246 occurs 0.

        include structure /pws/zycbt246.

data: end of itab_zycbt246.

data: begin of itab_zycbt001 occurs 0.

        include structure /pws/zycbt001.

data: end of itab_zycbt001.

data: begin of itab_kna1 occurs 0.

        include structure kna1.

data: end of itab_kna1.

data: v_dia_sem(20)   type  c,

      v_titulo(80)    type  c,

      itab_listheader type  slis_t_listheader.

selection-screen begin of block b1 with frame title text-001.

select-options: bukrs      for /pws/zycbt001-bukrs,

                filial     for /pws/zycbt001-j_1bbranch,

                nrseqnce   for /pws/zycbt246-nrseqc_nce

                                matchcode object /pws/zycba305,

                nrcontr    for /pws/zycbt001-nrcontr,

                dtassoc    for /pws/zycbt246-dtassoc,

                nrseqcp    for /pws/zycbt246-nrseqc_cp

                                matchcode object /pws/zycba306.

selection-screen end of block b1.

selection-screen begin of block bl2 with frame title text-t05.

parameters: p_zebra as checkbox,

            p_otimi as checkbox.

selection-screen end of block bl2.

selection-screen begin of block variant with frame title text-t06.

selection-screen begin of line.

selection-screen comment (31) text-021 for field p_varian

                                            modif id var.

parameters p_varian like disvariant-variant modif id var.

selection-screen comment 47(40) p_vartxt for field p_varian

                                            modif id var.   "#EC NEEDED

selection-screen end of line.

selection-screen end of block variant.

 

initialization.

  authority-check object 'S_TCODE' id 'TCD' field sy-tcode.

  if sy-subrc ne 0.

    message e015 with text-e01.

  endif.

  clear g_variant.

  g_variant-report     = sy-repid.

  g_variant-username   = sy-uname.

  import v_nrseqc from memory id 'NRSEQ-CB125'.

  free memory id 'NRSEQ-CB125'.

  nrseqnce-low = v_nrseqc.

  if not nrseqnce-low is initial.

    append nrseqnce.

  endif.

 

at selection-screen.

  clear p_varian.

 

at selection-screen on value-request for p_varian.

  perform f_init_alv.

 

start-of-selection.

  perform selecionar_dados.

  perform processar_dados.

  v_repid = sy-repid.

  if itab_relat[] is initial.

    message i222.

  else.

    perform f_monta_final.

    perform f_fieldcat_fill.

    perform monta_top_of_page.

    perform imprime_relatorio_alv.

  endif.

end-of-selection.

 

form f_fieldcat_fill.

  data i type i.

  i = i + 5.

  clear afield.

  afield-col_pos = i.

  afield-fieldname = 'NRCONTR'.

  afield-ref_fieldname = 'NRCONTR'.

  afield-ref_tabname = '/PWS/ZYCBT001'.

  afield-key = 'X'.

  afield-seltext_s = text-002.

  afield-seltext_m = text-002.

  afield-seltext_l = text-002.

  afield-reptext_ddic = text-002.

  afield-sp_group    = 'A'.

  append afield to i_fieldcat.

  i = i + 5.

  clear afield.

  afield-col_pos = i.

  afield-fieldname = 'NRSEQC_NCE'.

  afield-ref_fieldname = 'NRSEQC_NCE'.

  afield-ref_tabname = '/PWS/ZYCBT246'.

  afield-key = 'X'.

  afield-seltext_s = text-003.

  afield-seltext_m = text-003.

  afield-seltext_l = text-003.

  afield-reptext_ddic = text-003.

  append afield to i_fieldcat.

  i = i + 5.

  clear afield.

  afield-col_pos = i.

  afield-fieldname = 'BUKRS'.

  afield-ref_fieldname = 'BUKRS'.

  afield-ref_tabname = '/PWS/ZYCBT001'.

  afield-seltext_s = text-004.

  afield-seltext_m = text-004.

  afield-seltext_l = text-004.

  afield-reptext_ddic = text-004.

  append afield to i_fieldcat.

  i = i + 5.

  clear afield.

  afield-col_pos = i.

  afield-fieldname = 'J_1BBRANCH'.

  afield-ref_fieldname = 'J_1BBRANCH'.

  afield-ref_tabname = '/PWS/ZYCBT001'.

  afield-seltext_s = text-005.

  afield-seltext_m = text-005.

  afield-seltext_l = text-005.

  afield-reptext_ddic = text-005.

  afield-sp_group    = 'A'.

  append afield to i_fieldcat.

  i = i + 5.

  clear afield.

  afield-col_pos = i.

  afield-fieldname = 'SLVINC'.

  afield-ref_fieldname = 'SLVINC'.

  afield-ref_tabname = '/PWS/ZYCBT001'.

  afield-cfieldname = 'WAERS_C'.

  afield-seltext_s = text-006.

  afield-seltext_m = text-006.

  afield-seltext_l = text-006.

  afield-reptext_ddic = text-006.

  afield-sp_group    = 'A'.

  append afield to i_fieldcat.

  i = i + 5.

  clear afield.

  afield-col_pos = i.

  afield-fieldname = 'DTASSOC'.

  afield-ref_fieldname = 'DTASSOC'.

  afield-ref_tabname = '/PWS/ZYCBT246'.

  afield-seltext_s = text-007.

  afield-seltext_m = text-007.

  afield-seltext_l = text-007.

  afield-reptext_ddic = text-007.

  afield-sp_group    = 'A'.

  append afield to i_fieldcat.

  i = i + 5.

  clear afield.

  afield-col_pos = i.

  afield-fieldname = 'NRSEQC_CP'.

  afield-ref_fieldname = 'NRSEQC_CP'.

  afield-ref_tabname = '/PWS/ZYCBT246'.

  afield-key = 'X'.

  afield-seltext_s = text-008.

  afield-seltext_m = text-008.

  afield-seltext_l = text-008.

  afield-reptext_ddic = text-008.

  append afield to i_fieldcat.

  i = i + 5.

  clear afield.

  afield-col_pos = i.

  afield-fieldname = 'NRINVOIC'.

  afield-ref_fieldname = 'NRINVOIC'.

  afield-ref_tabname = '/PWS/ZYCBT246'.

  afield-seltext_s = text-009.

  afield-seltext_m = text-009.

  afield-seltext_l = text-009.

  afield-reptext_ddic = text-009.

  append afield to i_fieldcat.

  i = i + 5.

  clear afield.

  afield-col_pos = i.

  afield-fieldname = 'NRPARCF'.

  afield-ref_fieldname = 'NRPARCF'.

  afield-ref_tabname = '/PWS/ZYCBT246'.

  afield-seltext_s = text-010.

  afield-seltext_m = text-010.

  afield-seltext_l = text-010.

  afield-reptext_ddic = text-010.

  append afield to i_fieldcat.

  i = i + 5.

  clear afield.

  afield-col_pos = i.

  afield-fieldname = 'GSBERF'.

  afield-ref_fieldname = 'GSBERF'.

  afield-ref_tabname = '/PWS/ZYCBT246'.

  afield-seltext_s = text-012.

  afield-seltext_m = text-012.

  afield-seltext_l = text-012.

  afield-reptext_ddic = text-012.

  append afield to i_fieldcat.

  i = i + 5.

  clear afield.

  afield-col_pos = i.

  afield-fieldname = 'DTVINCUL'.

  afield-ref_fieldname = 'DTVINCUL'.

  afield-ref_tabname = '/PWS/ZYCBT246'.

  afield-seltext_s = text-012.

  afield-seltext_m = text-012.

  afield-seltext_l = text-012.

  afield-reptext_ddic = text-012.

  afield-sp_group    = 'A'.

  append afield to i_fieldcat.

  i = i + 5.

  clear afield.

  afield-col_pos = i.

  afield-fieldname = 'DTPAGTO'.

  afield-ref_fieldname = 'DTPAGTO'.

  afield-ref_tabname = '/PWS/ZYCBT246'.

  afield-seltext_s = text-013.

  afield-seltext_m = text-013.

  afield-seltext_l = text-013.

  afield-reptext_ddic = text-013.

  afield-sp_group    = 'A'.

  append afield to i_fieldcat.

  i = i + 5.

  clear afield.

  afield-col_pos = i.

  afield-fieldname = 'DTPAGEXT'.

  afield-ref_fieldname = 'DTPAGEXT'.

  afield-ref_tabname = '/PWS/ZYCBT246'.

  afield-seltext_s = text-014.

  afield-seltext_m = text-014.

  afield-seltext_l = text-014.

  afield-reptext_ddic = text-014.

  afield-sp_group    = 'A'.

  append afield to i_fieldcat.

  i = i + 5.

  clear afield.

  afield-col_pos = i.

  afield-fieldname = 'KUNNR'.

  afield-ref_fieldname = 'KUNNR'.

  afield-ref_tabname = 'KNA1'.

  afield-seltext_s = text-015.

  afield-seltext_m = text-015.

  afield-seltext_l = text-015.

  afield-reptext_ddic = text-015.

  afield-sp_group    = 'A'.

  append afield to i_fieldcat.

  i = i + 5.

  clear afield.

  afield-col_pos = i.

  afield-fieldname = 'NAME1'.

  afield-ref_fieldname = 'NAME1'.

  afield-ref_tabname = 'KNA1'.

  afield-seltext_s = text-016.

  afield-seltext_m = text-016.

  afield-seltext_l = text-016.

  afield-reptext_ddic = text-016.

  afield-sp_group    = 'A'.

  append afield to i_fieldcat.

  i = i + 5.

  clear afield.

  afield-col_pos = i.

  afield-fieldname = 'GJAHR'.

  afield-ref_fieldname = 'GJAHR'.

  afield-ref_tabname = '/PWS/ZYCBT246'.

  afield-seltext_s = text-017.

  afield-seltext_m = text-017.

  afield-seltext_l = text-017.

  afield-reptext_ddic = text-017.

  afield-sp_group    = 'A'.

  append afield to i_fieldcat.

  i = i + 5.

  clear afield.

  afield-col_pos = i.

  afield-fieldname = 'WAERS'.

  afield-ref_fieldname = 'WAERS'.

  afield-ref_tabname = '/PWS/ZYCBT246'.

  afield-seltext_s = text-018.

  afield-seltext_m = text-018.

  afield-seltext_l = text-018.

  afield-reptext_ddic = text-018.

  afield-sp_group    = 'A'.

  append afield to i_fieldcat.

  i = i + 5.

  clear afield.

  afield-col_pos = i.

  afield-fieldname = 'VLME'.

  afield-ref_fieldname = 'VLME'.

  afield-ref_tabname = '/PWS/ZYCBT246'.

  afield-cfieldname = 'WAERS'.

  afield-seltext_s = text-019.

  afield-seltext_m = text-019.

  afield-seltext_l = text-019.

  afield-reptext_ddic = text-019.

  afield-sp_group     = 'A'.

  append afield to i_fieldcat.

  i = i + 5.

  clear afield.

  afield-col_pos = i.

  afield-fieldname = 'VLME_C'.

  afield-ref_fieldname = 'VLME_C'.

  afield-ref_tabname = '/PWS/ZYCBT246'.

  afield-cfieldname = 'WAERS_C'.

  afield-seltext_s = text-020.

  afield-seltext_m = text-020.

  afield-seltext_l = text-020.

  afield-reptext_ddic = text-020.

  afield-sp_group     = 'A'.

  append afield to i_fieldcat.

endform.

 

form imprime_relatorio_alv.

  call function '/PWS/ZYGL_GERA_RELATORIO_ALV'

       exporting

            v_program       =  v_repid

            v_pf_status     =  ' '

            v_user_command  =  'USER_COMMAND'

            v_top_of_page   =  'TOP_OF_PAGE'

            v_variant       =   g_variant

            v_marc          =   ' '

            v_selinfo       =   'X'

            v_zebra         =   p_zebra

            v_otimizado     =   p_otimi

       tables

            i_fieldcat      =   i_fieldcat

            t_data          =   i_final.

endform.

 

form selecionar_dados.

  clear:    itab_zycbt246,

            itab_zycbt001.

  refresh:  itab_zycbt246,

            itab_zycbt001.

  select a~mandt

         a~nrseqc_nce

         a~nrseqc_cp

         a~nrparc

         a~nrinvoic

         a~nrparcf

         a~gsberf

         a~dtvincul

         a~dtpagto

         a~dtpagext

         a~dtassoc

         a~waers

         a~vlme

         a~vlme_c

         a~kunnr

         a~gjahr

         a~catmoeda

         a~waers_c

    into table itab_zycbt246

    from /pws/zycbt246 as a inner join

         /pws/zycbt001 as b

      on a~nrseqc_nce = b~nrseqc

   where b~bukrs       in bukrs     and

         b~j_1bbranch  in filial    and

         b~nrcontr     in nrcontr   and

         a~nrseqc_nce  in nrseqnce  and

         a~dtassoc     in dtassoc   and

         a~nrseqc_cp   in nrseqcp.

  if not itab_zycbt246[] is initial.

    select *

      from /pws/zycbt001

      into table itab_zycbt001

      for all entries in itab_zycbt246

    where nrseqc = itab_zycbt246-nrseqc_nce.

    select *

      from kna1

      into table itab_kna1

      for all entries in itab_zycbt246

    where kunnr = itab_zycbt246-kunnr.

  endif.

endform.

 

form processar_dados.

  clear:   itab_relat.

  refresh: itab_relat.

  loop at itab_zycbt246.

    clear: itab_relat.

    move: itab_zycbt246-nrseqc_nce  to  itab_relat-nrseqc_nce,

          itab_zycbt246-nrseqc_cp   to  itab_relat-nrseqc_cp,

          itab_zycbt246-nrparc      to  itab_relat-nrparc,

          itab_zycbt246-nrinvoic    to  itab_relat-nrinvoic,

          itab_zycbt246-nrparcf     to  itab_relat-nrparcf,

          itab_zycbt246-gsberf      to  itab_relat-gsberf,

          itab_zycbt246-dtvincul    to  itab_relat-dtvincul,

          itab_zycbt246-dtpagto     to  itab_relat-dtpagto,

          itab_zycbt246-dtpagext    to  itab_relat-dtpagext,

          itab_zycbt246-dtassoc     to  itab_relat-dtassoc,

          itab_zycbt246-waers       to  itab_relat-waers,

          itab_zycbt246-vlme        to  itab_relat-vlme,

          itab_zycbt246-vlme_c      to  itab_relat-vlme_c,

          itab_zycbt246-kunnr       to  itab_relat-kunnr,

          itab_zycbt246-gjahr       to  itab_relat-gjahr,

          itab_zycbt246-waers_c     to  itab_relat-waers_c.

    read table itab_kna1 with key kunnr = itab_relat-kunnr.

    if sy-subrc eq 0.

      move itab_kna1-name1 to itab_relat-name1.

    endif.

    read table itab_zycbt001 with key nrseqc = itab_relat-nrseqc_nce.

    if sy-subrc eq 0.

      move: itab_zycbt001-bukrs      to itab_relat-bukrs,

            itab_zycbt001-slvinc     to itab_relat-slvinc,

            itab_zycbt001-nrcontr    to itab_relat-nrcontr,

            itab_zycbt001-j_1bbranch to itab_relat-j_1bbranch.

    endif.

    append itab_relat.

  endloop.

endform.

 

form f_monta_final.

  loop at itab_relat.

    clear: i_result.

    move: itab_relat-nrseqc_nce   to  i_result-nrseqc_nce,

          itab_relat-nrseqc_cp    to  i_result-nrseqc_cp,

          itab_relat-nrparc       to  i_result-nrparc,

          itab_relat-nrinvoic     to  i_result-nrinvoic,

          itab_relat-nrparcf      to  i_result-nrparcf,

          itab_relat-gsberf       to  i_result-gsberf,

          itab_relat-dtvincul     to  i_result-dtvincul,

          itab_relat-dtpagto      to  i_result-dtpagto,

          itab_relat-dtpagext     to  i_result-dtpagext,

          itab_relat-dtassoc      to  i_result-dtassoc,

          itab_relat-waers        to  i_result-waers,

          itab_relat-vlme         to  i_result-vlme,

          itab_relat-vlme_c       to  i_result-vlme_c,

          itab_relat-kunnr        to  i_result-kunnr,

          itab_relat-gjahr        to  i_result-gjahr,

          itab_relat-j_1bbranch   to  i_result-j_1bbranch,

          itab_relat-nrcontr      to  i_result-nrcontr,

          itab_relat-bukrs        to  i_result-bukrs,

          itab_relat-slvinc       to  i_result-slvinc,

          itab_relat-name1        to  i_result-name1,

          itab_relat-waers_c      to  i_result-waers_c.

    append i_result.

  endloop.

  i_final[] = i_result[].

endform.

 

form monta_top_of_page.

  data: wa_listheader type slis_listheader,

        v_data(10)    type c,

        v_hora(08)    type c.

  refresh itab_listheader.

  write:

    sy-datum to v_data,

    sy-uzeit to v_hora.

  translate v_data using './'.

  wa_listheader-typ = 'H'.

  move text-t01 to wa_listheader-info.

  append wa_listheader to itab_listheader.

  clear wa_listheader.

  wa_listheader-typ = 'S'.

  wa_listheader-info = text-t02.

  append wa_listheader to itab_listheader.

  clear wa_listheader.

  wa_listheader-typ = 'S'.

  concatenate

    text-t03 v_data '-' text-t04 v_hora

    into wa_listheader-info

    separated by space.

  append wa_listheader to itab_listheader.

endform.

 

form top_of_page.

  call function 'REUSE_ALV_COMMENTARY_WRITE'

       exporting

            it_list_commentary = itab_listheader.

endform.

 

form f_init_alv.

  data: locl_variant type disvariant.

  clear exit.

  call function 'REUSE_ALV_VARIANT_F4'

       exporting

            is_variant = g_variant

            i_save     = 'A'

       importing

            e_exit     = exit

            es_variant = locl_variant

       exceptions

            not_found  = 2.

  if sy-subrc = 2.

    message id sy-msgid type 'S'  number sy-msgno

            with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

  else.

    if exit = space.

      p_varian = locl_variant-variant.

      p_vartxt = locl_variant-text.

      move locl_variant to g_variant.

    endif.

  endif.

endform.

 

form user_command using ucomm    type sy-ucomm

                        selfield type slis_selfield.        "#EC CALLED

  case ucomm.

    when 'BEAN'.

      read table i_final    index selfield-tabindex.

      replace '1-' with ' ' into selfield-sel_tab_field.

      condense selfield-sel_tab_field no-gaps.

      feld = selfield-sel_tab_field.

      if feld = 'NRSEQC_NCE' or feld = 'NRCONTR'.

        read table itab_relat with key nrseqc_nce = i_final-nrseqc_nce.

      elseif feld = 'NRSEQC_CP'.

        read table itab_relat with key nrseqc_cp  = i_final-nrseqc_cp.

      endif.

      if feld = 'NRSEQC_NCE' or

         feld = 'NRSEQC_CP'  or

         feld = 'NRCONTR'.

        authority-check object 'S_TCODE' id 'TCD'

                        field  '/PWS/ZYCB001_E'.

        if sy-subrc eq 0.

          if feld = 'NRSEQC_NCE' or feld = 'NRCONTR'.

            set parameter id '/PWS/ZYCBP019'

                                      field itab_relat-nrseqc_nce.

          elseif feld = 'NRSEQC_CP'.

                 set parameter id '/PWS/ZYCBP019'

                                           field itab_relat-nrseqc_cp.

          endif.

          call transaction '/PWS/ZYCB001_E' and skip first screen.

        else.

          message e261(sf) with '/PWS/ZYCB001_E'.

        endif.

      endif.

  endcase.

endform.

* << Fim da inclusão

 

*** FIM DO REPORT   - /PWS/ZYCBR125

*** CRIAR TRANSAÇÃO - TRAN /PWS/ZYCBR125 (FINAL)

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

 

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

*** Criada Nova Transação - TRAN /PWS/ZYCB125_C ***

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

 

Código de transação:      /PWS/ZYCB125_C

Classe Desenvolvimento:   /PWS/ZYCB

Texto da transação:       Associação Contrato NCE x CP-Criar

Programa:                 /PWS/SAPMZYCB125

Nº tela:                  0001

 

*** Classificação de Transação

(X) Transação Professional User

(_) Transação Easy Web

 

*** Capacidade GUI

(X) SAP GUI para HTML

(X) SAP GUI para Java

(X) SAP GUI para Windows

 

 

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

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

*** Criada Nova Transação - TRAN /PWS/ZYCB125_A ***

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

 

Código de transação:      /PWS/ZYCB125_A

Classe Desenvolvimento:   /PWS/ZYCB

Texto da transação:       Associação Contrato NCE x CP-Modific

Programa:                 /PWS/SAPMZYCB125

Nº tela:                  0001

 

*** Classificação de Transação

(X) Transação Professional User

(_) Transação Easy Web

 

*** Capacidade GUI

(X) SAP GUI para HTML

(X) SAP GUI para Java

(X) SAP GUI para Windows

 

 

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

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

*** Criada Nova Transação - TRAN /PWS/ZYCB125_E ***

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

 

Código de transação:      /PWS/ZYCB125_E

Classe Desenvolvimento:   /PWS/ZYCB

Texto da transação:       Associação Contrato NCE x CP-Exibir

Programa:                 /PWS/SAPMZYCB125

Nº tela:                  0002

 

*** Classificação de Transação

(X) Transação Professional User

(_) Transação Easy Web

 

*** Capacidade GUI

(X) SAP GUI para HTML

(X) SAP GUI para Java

(X) SAP GUI para Windows

 

 

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

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

*** Criada Nova Transação - TRAN /PWS/ZYCBR125 ***

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

 

Código de transação:      /PWS/ZYCBR125

Classe Desenvolvimento:   /PWS/ZYCB

Texto da transação:       Rel.Associação NCE com CP

Programa:                 /PWS/ZYCBR125

Nº tela:                  1000

 

*** Classificação de Transação

(X) Transação Professional User

(_) Transação Easy Web

 

*** Capacidade GUI

(X) SAP GUI para HTML

(X) SAP GUI para Java

(X) SAP GUI para Windows

 

 

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

*** Alteração no Menu do /PWS/ZYCB pela SE43

*** Inclusão de Novos Itens no Menu

 

*** Inclusão do Menu "Associação de Contrato NCE com Câmbio Pronto"

Arvore -> Exportação -> Captação -> Associação de Contrato NCE com Câmbio Pronto

 

*** Inclusão do Menu "Criar"

Arvore -> Exportação -> Captação -> Associação de Contrato NCE com Câmbio Pronto -> Criar

Código da Transação.: /PWS/ZYCB125_C

 

*** Inclusão do Menu "Modificar"

Arvore -> Exportação -> Captação -> Associação de Contrato NCE com Câmbio Pronto -> Modificar

Código da Transação.: /PWS/ZYCB125_A

 

*** Inclusão do Menu "Exibir"

Arvore -> Exportação -> Captação -> Associação de Contrato NCE com Câmbio Pronto -> Exibir

Código da Transação.: /PWS/ZYCB125_E

 

*** Após a Inclusão o Menu deverá ficar com a seguinte Sequencia.:

 

*** Menu

pw.CE - Comércio Exterior - Câmbio

|_Exportação

     |_ Fatura

     |_ Captação

        |_Criar

        |_Modificar

        |_Exibir

        |_ Capitalização de Juros

        |_ Liquidação de ACC com Pré Pagto

***     |_ Associação de Contrato NCE com Câmbio Pronto

***        |_Criar

***        |_Modificar

***        |_Exibir

        |_Cálculo de Juros de NCE

 

     |_Vinculação

     |_Liquidação em Andamento

|_Importação

|_Financeiro

...

 

...

 

*** Inclusão de Novos Itens no Menu

*** Inclusão do Menu "Relatório de Associação de Contrato NCE com CP"

Arvore -> Exportação -> Relatórios -> Relatório de Associação de Contrato NCE com CP

Código da Transação.: /PWS/ZYCBR125

 

*** Incluir este Relatório Após o Último Item Existente na Arvore.:

Arvore -> Exportação -> Relatórios

 

 

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

Símbolos de Textos Criados

E01 Usuário não tem autorização para a transação.

E02 Contrato NCE Não Encontrado.

E03 Este Contrato não é do Tipo NCE.

E04 Usuário não tem autorização para a empresa

E05 Preencher corretamente a Data da Associação

E06 Valor total das Faturas Superior ao

E07 Saldo a Vincular.

E08 Nenhuma fatura foi selecionada.

E09 Contrato com Saldo Totalmente Associado.

E10 Permitido somente Modificar ou Exibir.

E11 Não Existe Associação criada para este

E12 Contrato NCE. Modificação não Permitida.

E13 Contrato NCE. Exibição não Permitida.

E14 Associação Já Criada para este Contrato

E15 NCE. Permitido Modificação / Exibição.

I01 Confirmação

I02 Existem alterações ainda não gravadas

I03 Deseja realmente sair sem gravar?

I04 A Soma das Faturas selecionadas é Superior

I05 ao Valor do Contrato NCE.

I06 O Contrato está sendo alterado por outro usuário.

I07 É possivel apenas exibí-lo.

I08 Problemas de bloqueio. Avisar administrador do sistema.

I09 O Contrato CP

I10 está sendo alterado por outro usuário.

I11 Contrato CP sendo alterado por outro usuário.

I12 Não é possível realizar a associação.

S01 Nenhuma alteração efetuada

S02 Registro gravado com sucesso

 

Textos de Seleção:

NRSEQC N. Sequencial do Contrato CP