Módulo: CÂMBIO EXPORTAÇÃO
Funcionalidade: Valores Mantidos no Exterior
Data/Hora da Publicação: 21/12/2010 00:00:00
Data/Hora Última Alteração: 15/03/2011 17:13:19
Descrição da Nota: VME VALORES MANTIDOS NO EXTERIOR CONTABILIZAÇÃO COMISSÃO CG SALDO FATURA
Sintoma
Problemas no Log de Contabilização e Estorno. Problema para gerar a contabilização da Comissão de
Agentes. Problemas também na atualização da Tabela /pws/zycbt030 quando existia Liquidação em
Andamento Parcial. Problemas de atualização de valores na tela quando Fatura com Moeda JPY.
Problemas no botão Selecionar Faturas para Vinculação, onde não estava selecionando as faturas.
Solução
Ajustado os pontos no programa que preparam os dados para contabilização, ajustes na regra para
selecionar as faturas no botão de Selecionar Faturas para vinculação. Ajuste para exibir
corretamente as faturas em JPY.
8.0
Produto:
Nota
Descrição
Informações Complementares
----------------------------------------------------------------------------------------------------
Nota Número 10850 Data: 21/12/2010 Hora: 10:14:38
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
Nota Número : 10850
Categoria : Erro de Programa
Prioridade : Média
Versão PW.CE : 8.0
Pacote : 00006
Agrupamento : 00051
----------------------------------------------------------------------------------------------------
Referência às notas relacionadas:
Número - Ordem - Versão - Pacote - Descrição Breve
06009 - 00001 - 7.0 - 00004 - LIQUIDAÇÃO COM ARBITRAGEM - ATRIBUIÇÃO - /PWS/ZYGLT321 - FTE
07931 - 00002 - 7.0 - 00008 - DA - SISTEMA DE PAGAMENTOS EM MOEDA LOCAL E ASSOCIAÇÃO(SML)
08195 - 00003 - 7.0 - 00008 - VALORES MANTIDOS NO EXTERIOR - BAIXA DE COMISSÃO DE AGENTE CG NA
08733 - 00004 - 7.0 - 00010 - SML-SISTEMA DE MOEDA LOCAL-CONSIDERAR SÓ BRL-VME-ATUALIZAÇÃO ZYCB
----------------------------------------------------------------------------------------------------
VME VALORES MANTIDOS NO EXTERIOR CONTABILIZAÇÃO COMISSÃO CG SALDO FATURA
----------------------------------------------------------------------------------------------------
Palavras Chave:
VME - CONTABILIZAÇÃO COMISSÃO CG - SALDO FATURA E BOTÃO SELECIONAR
FATURA QUANDO TEM LIQUIDAÇÃO EM ANDAMENTO
----------------------------------------------------------------------------------------------------
Objetos da nota:
DYNP /PWS/SAPMZYCB034 0110
FUNC /PWS/ZYCB_TRANSACAO_F_30_S
REPS /PWS/MZYCB034F01
REPS /PWS/MZYCB034I01
REPS /PWS/MZYCB034TOP
----------------------------------------------------------------------------------------------------
Modificações efetuadas em DYNP /PWS/SAPMZYCB034 0110
MODIFICAR CAMPO TEXTO "/PWS/ZYCBE226-NRPARCF" em tbl.contr./tabstr.
Código função
MODIFICAR CAMPO TEXTO "/PWS/ZYCBE226-NRSEQ" em tbl.contr./tabstr.
Código função
MODIFICAR LÓGICA DE PROCESSAMENTO TELA 0110
...
loop with control tc_op.
module: preenche_tc_op.
endloop.
process after input.
module:
drilldown.
loop with control tc_op.
field /pws/zycbe226-nrinvoic module verifica_processo.
field /pws/zycbe226-bukrs.
field /pws/zycbe226-waers module verifica_moeda.
* >> Início da inclusão:
MODULE ajusta_valores_moeda.
* << Fim da inclusão
module: verifica_vlr_exterior,
verifica_dt_limite,
verifica_periodo_contabil,
atualiza_tc_op.
endloop.
module preenche_table_control.
module: user_command,
user_command_exit at exit-command.
process on value-request.
field /pws/zycbe226-nrinvoic module get_invoice.
...
----------------------------------------------------------------------------------------------------
Modificações efetuadas em FUNC /PWS/ZYCB_TRANSACAO_F_30_S
...
ELSEIF t_dados-koart EQ 'K'.
v_tela = '0302'.
ELSEIF t_dados-koart EQ 'S'.
v_tela = '0300'.
ENDIF.
PERFORM verifica_empresas USING t_dados-bukrs
'UMBUCHNG'
t_dados-d_newko
t_dados-koart.
IF NOT t_dados-agums IS INITIAL.
* >> Início da exclusão: FUNCTION /PWS/ZYCB_TRANSACAO_F_30_S
v_tela = '304'.
* << Fim da exclusão
* >> Início da inclusão: FUNCTION /PWS/ZYCB_TRANSACAO_F_30_S
v_tela = '0304'.
* << Fim da inclusão
t_dados-newbs = '09'.
ENDIF.
PERFORM bdc_screen USING 'SAPMF05A' '0700'.
PERFORM bdc_field USING:
'BDC_CURSOR' 'RF05A-AZEI1(01)',
'BDC_OKCODE' '=PI'.
CLEAR itab_oculto.
REFRESH itab_oculto.
IF t_dados-koart EQ 'D'.
SELECT SINGLE akont FROM knb1
...
...
PERFORM bdc_field USING: 'BSEG-SGTXT' t_dados-d_sgtxt.
ENDIF.
READ TABLE itab_oculto WITH KEY campo = 'BSEG-ZFBDT'
chave = 'D'.
IF sy-subrc NE 0 AND NOT t_dados-zfbdt IS INITIAL..
PERFORM bdc_field USING 'BSEG-ZFBDT' v_zfbdt.
ENDIF.
READ TABLE itab_oculto WITH KEY campo = 'BSEG-VALUT'
chave = 'D'.
IF sy-subrc NE 0 AND NOT t_dados-d_valut IS INITIAL
* >> Início da exclusão: FUNCTION /PWS/ZYCB_TRANSACAO_F_30_S
and v_tela ne '0301'.
* << Fim da exclusão
* >> Início da inclusão: FUNCTION /PWS/ZYCB_TRANSACAO_F_30_S
and v_tela ne '0301' and v_tela ne '0304'.
* << Fim da inclusão
PERFORM bdc_field USING 'BSEG-VALUT' v_valut.
ENDIF.
PERFORM verifica_sociedade_parceira USING t_dados-blart
t_dados-vbund
t_dados-bukrs
t_dados-d_newko
CHANGING v_soc_parc.
IF v_soc_parc = 'S' AND v_tela EQ '0300'.
PERFORM bdc_field USING 'BDC_OKCODE' '=ZK'.
ELSE.
...
----------------------------------------------------------------------------------------------------
Modificações efetuadas em REPS /PWS/MZYCB034F01
...
if sy-subrc = 0.
if sy-tcode+13(3) = 'SML' and v_wrbtr > 0.
wa_zycbt030-vlsltrans = wa_zycbt030-vlsltrans -
v_wrbtr.
else.
clear: v_dif, v_vl_liqand.
loop at itab_zycbt209 into wa_zycbt209
where nrinvoic = <fs_op>-nrinvoic
and nrparcf = <fs_op>-nrparcf
and gsberf = <fs_op>-gsberf.
* >> Início da exclusão: FORM DOC_OP
v_vl_liqand = v_vl_liqand + wa_zycbt209-vlme.
* << Fim da exclusão
* >> Início da inclusão: FORM DOC_OP
v_vl_liqand = v_vl_liqand + wa_zycbt209-saldo.
* << Fim da inclusão
endloop.
if <fs_op>-vlr_exterior > v_vl_liqand.
v_dif = <fs_op>-vlr_exterior - v_vl_liqand.
endif.
wa_zycbt030-vlsltrans = wa_zycbt030-vlsltrans - v_dif.
endif.
if wa_zycbt030-vlsltrans < 0.
v_wrbtr = wa_zycbt030-vlsltrans * ( -1 ).
clear wa_zycbt030-vlsltrans.
endif.
...
...
endif.
if v_sd = 'X' and screen-group1 = 'NRS'.
screen-invisible = '0'.
screen-input = '1'.
modify screen.
endif.
endif.
endloop.
endform.
form selecionar_zycbt017.
* >> Início da inclusão: FORM SELECIONAR_ZYCBT017
field-symbols: <fs_zycbt209_aux> like line of itab_zycbt209_aux.
* << Fim da inclusão
data: v_nlin type i value is initial.
if sy-ucomm eq 'CRET'.
free: itab_zycbt017_aux, itab_nrinvoic, itab_gsberf , itab_fkdat,
itab_kunag , itab_dtvencto, itab_dtbl , itab_inco1,
itab_nrre , itab_nrsd, itab_zycbt226_aux .
select *
into table itab_zycbt017_aux
from /pws/zycbt017
where nrinvoic in nrin
and gsberf in gsbe
...
...
exit.
endloop.
if sy-subrc ne 0 or
( sy-subrc eq 0 and wa_zycbt007-waersb is initial ).
message i061 with text-m51.
refresh itab_zycbt017_aux.
else.
delete itab_zycbt017_aux where waers ne wa_zycbt007-waersb.
endif.
endif.
* >> Início da inclusão: FORM SELECIONAR_ZYCBT017
select nrinvoic
nrparcf
gsberf
saldo
from /pws/zycbt209
into table itab_zycbt209_aux
for all entries in itab_zycbt017_aux
where bukrs eq itab_zycbt017_aux-bukrs
and nrinvoic eq itab_zycbt017_aux-nrinvoic.
* << Fim da inclusão
describe table itab_zycbt017_aux lines v_nlin.
loop at itab_zycbt017_aux.
itab_zycbt017_aux-v_fsaldo = 'X'.
modify itab_zycbt017_aux index sy-tabix.
itab_zycbt226_aux-bukrs = itab_zycbt017_aux-bukrs .
itab_zycbt226_aux-nrinvoic = itab_zycbt017_aux-nrinvoic .
itab_zycbt226_aux-gsberf = itab_zycbt017_aux-gsberf .
itab_zycbt226_aux-kunag = itab_zycbt017_aux-kunag .
itab_zycbt226_aux-nrparcf = itab_zycbt017_aux-nrparcf .
itab_zycbt226_aux-vlavinc = itab_zycbt017_aux-vlavinc.
itab_zycbt226_aux-dtlancto = sy-datum.
itab_zycbt226_aux-dtcredext = sy-datum.
itab_zycbt226_aux-waers = itab_zycbt017_aux-waers.
select * from /pws/zycbt030
up to 1 rows
where nrinvoic = itab_zycbt017_aux-nrinvoic and
nrparcf = itab_zycbt017_aux-nrparcf and
gsberf = itab_zycbt017_aux-gsberf.
endselect.
* >> Início da inclusão: FORM SELECIONAR_ZYCBT017
v_saldo_030 = 0.
v_saldo_209 = 0.
v_saldo_trans = 0.
* << Fim da inclusão
if sy-subrc = 0.
if /pws/zycbt030-vlsltrans > 0 .
* >> Início da exclusão: FORM SELECIONAR_ZYCBT017
itab_zycbt226_aux-sld_transferir = /pws/zycbt030-vlsltrans.
* << Fim da exclusão
* >> Início da inclusão: FORM SELECIONAR_ZYCBT017
v_saldo_030 = /pws/zycbt030-vlsltrans.
endif.
endif.
loop at itab_zycbt209_aux assigning <fs_zycbt209_aux>
where nrinvoic = itab_zycbt017_aux-nrinvoic and
nrparcf = itab_zycbt017_aux-nrparcf and
gsberf = itab_zycbt017_aux-gsberf.
v_saldo_209 = v_saldo_209 + <fs_zycbt209_aux>-saldo.
endloop.
v_saldo_trans = v_saldo_030 + v_saldo_209.
if v_saldo_trans > 0.
itab_zycbt226_aux-sld_transferir = v_saldo_trans.
* << Fim da inclusão
append itab_zycbt226_aux.
else.
continue.
* >> Início da exclusão: FORM SELECIONAR_ZYCBT017
endif.
* << Fim da exclusão
endif.
endloop.
if itab_zycbt226_aux[] is initial.
message w015 with text-m47.
...
...
where bukrs = wa_zycbt209-bukrs
and nrinvoic = wa_zycbt209-nrinvoic
and belnr = wa_zycbt209-belnr
and dtincl = wa_zycbt209-dtincl
and nrparcf = wa_zycbt209-nrparcf
and gsberf = wa_zycbt209-gsberf.
endloop.
endif.
endform.
form liquida_comissao_agente.
* >> Início da exclusão: FORM LIQUIDA_COMISSAO_AGENTE
check v_desm_cli = 'X'.
* << Fim da exclusão
* >> Início da inclusão: FORM LIQUIDA_COMISSAO_AGENTE
check v_desm_cli = 'X' or
v_desm_liqand = 'X'.
* << Fim da inclusão
clear: itab_selreg,
itab_zycet010,
itab_zycet013.
refresh: itab_zycet010,
itab_zycet013.
select single * from /pws/zycbt017
into itab_zycbt017_cg
where nrinvoic eq <fs_op>-nrinvoic
and nrparcf eq <fs_op>-nrparcf.
select single * from /pws/zycbt037
...
...
v_year = v_year
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.
select single kursf from bkpf into wa_zycbe033-kursf
* >> Início da exclusão: FORM VERIFICA_DATA
where bukrs = itab_zycbt006-bukrs and
* << Fim da exclusão
* >> Início da inclusão: FORM VERIFICA_DATA
where bukrs = <fs_op>-bukrs and
* << Fim da inclusão
belnr = v_belnr and
gjahr = v_year.
endif.
clear v_databl.
else.
v_databl = v_dtpagto.
endif.
endform.
form define_cambio using value(p_data)
value(p_moedae)
...
----------------------------------------------------------------------------------------------------
Modificações efetuadas em REPS /PWS/MZYCB034I01
...
if sy-subrc ne 0 or
( sy-subrc eq 0 and wa_zycbt007-waersb is initial ).
message e061 with text-m51.
else.
if /pws/zycbe226-waers ne wa_zycbt007-waersb.
message e061 with text-m52.
endif.
endif.
endif.
endmodule.
* >> Início da inclusão:
MODULE ajusta_valores_moeda INPUT.
IF NOT /pws/zycbe226-waers IS INITIAL.
SELECT *
FROM tcurx
INTO tcurx
UP TO 1 ROWS
WHERE currkey EQ /pws/zycbe226-waers.
ENDSELECT.
ENDIF.
CHECK sy-subrc = 0 AND tcurx-currdec = 0.
/pws/zycbe226-vlavinc = /pws/zycbe226-vlavinc *
( 10 ** ( tcurx-currdec - 2 ) ).
/pws/zycbe226-sld_transferir = /pws/zycbe226-sld_transferir *
( 10 ** ( tcurx-currdec - 2 ) ).
/pws/zycbe226-vlr_exterior = /pws/zycbe226-vlr_exterior *
( 10 ** ( tcurx-currdec - 2 ) ).
/pws/zycbe226-sld_exterior = /pws/zycbe226-sld_exterior *
( 10 ** ( tcurx-currdec - 2 ) ).
/pws/zycbe226-sld_associar = /pws/zycbe226-sld_associar *
( 10 ** ( tcurx-currdec - 2 ) ).
ENDMODULE.
* << Fim da inclusão
----------------------------------------------------------------------------------------------------
Modificações efetuadas em REPS /PWS/MZYCB034TOP
/pws/zycbt030,
skb1,
bsid,
bkpf,
j_1bbranch,
adrc,
/pws/zycet002,
/pws/zycet020,
/pws/zycet037,
/pws/zycbt226,
* >> Início da exclusão:
/pws/zycbt089.
* << Fim da exclusão
* >> Início da inclusão:
/pws/zycbt089,
tcurx.
* << Fim da inclusão
controls:
ts_70 type tabstrip,
ts_principal type tabstrip,
tc_op type tableview using screen '0110',
tc_30 type tableview using screen '0120',
tc_70 type tableview using screen '0131',
tc_contrato type tableview using screen '0132',
tc_00 type tableview using screen '0150',
tc_rendimentos type tableview using screen '0140',
tc_devolucao type tableview using screen '0200'.
...
...
begin of t_s_zycbt030.
include structure /pws/zycbt030.
types:
bukrs type bkpf-bukrs,
gjahr type bkpf-gjahr,
end of t_s_zycbt030,
begin of t_s_zycbt209.
include structure /pws/zycbt209.
types:
end of t_s_zycbt209,
* >> Início da inclusão:
begin of t_s_zycbt209_aux,
nrinvoic type /pws/zycbt209-nrinvoic,
nrparcf type /pws/zycbt209-nrparcf,
gsberf type /pws/zycbt209-gsberf,
saldo type /pws/zycbt209-saldo,
end of t_s_zycbt209_aux,
* << Fim da inclusão
begin of t_s_zycet001.
include structure /pws/zycet001.
types:
end of t_s_zycet001,
begin of t_s_zycet047.
include structure /pws/zycet047.
types:
end of t_s_zycet047,
begin of t_s_zycet048.
include structure /pws/zycet048.
...
...
descr type /pws/zycbt039-descr,
end of t_s_zycbt039,
begin of t_s_erro,
vbeln type /pws/zycbt226-belnr_op,
msg type /pws/zycbt032-msg,
end of t_s_erro,
begin of t_s_zycbe224.
include structure /pws/zycbe224.
types:
end of t_s_zycbe224,
* >> Início da inclusão:
t_t_zycbt209_aux type sorted table of t_s_zycbt209_aux
with non-unique key nrinvoic nrparcf gsberf,
* << Fim da inclusão
t_t_zycbt007 type sorted table of t_s_zycbt007
with unique key bukrs,
t_t_zyglt009 type sorted table of t_s_zyglt009
with unique key bukrs,
t_t_zycbt089 type sorted table of t_s_zycbt089
with unique key bukrs,
t_t_kna1 type sorted table of t_s_kna1
with unique key kunnr,
t_t_lfa1 type sorted table of t_s_lfa1
with unique key lifnr,
...
...
data: end of itab_zycet013.
data: begin of itab_zycbt017_cg occurs 1.
include structure /pws/zycbt017.
data: end of itab_zycbt017_cg.
data: begin of itab_zycbt037_cg occurs 1.
include structure /pws/zycbt037.
data: end of itab_zycbt037_cg.
data: begin of itab_zycbt012a occurs 2.
include structure /pws/zycbt012.
data: end of itab_zycbt012a.
* >> Início da inclusão:
data: itab_zycbt209_aux type t_t_zycbt209_aux.
* << Fim da inclusão
data: v_valorc like /pws/zycbt017-vlcomis,
v_vlcomis like /pws/zycbt017-vlcomis,
v_saliq like /pws/zycbt006-vlme,
v_some like /pws/zycbt006-vlme,
v_year like bkpf-gjahr,
v_dtpagto like /pws/zycbe006-dtpagto,
v_cpochv like /pws/zycbe033-cpochv,
v_gjahr like bsid-gjahr,
v_belnr6 like /pws/zycbt030-belnr6,
v_taxa like bkpf-kursf,
v_dtemb like /pws/zycet001-dtemb,
v_ms(5) type c,
v_trans(4),
v_databl like /pws/zycbe005-dtvincul,
* >> Início da exclusão:
v_vinculacao type c.
* << Fim da exclusão
* >> Início da inclusão:
v_vinculacao type c,
v_saldo_030 like /pws/zycbt030-vlsltrans,
v_saldo_209 like /pws/zycbt209-saldo,
v_saldo_trans like /pws/zycbt209-saldo.
* << Fim da inclusão
data: begin of itab_zycbt006_pagos occurs 0.
include structure /pws/zycbt006.
data: end of itab_zycbt006_pagos.
data: begin of itab_zycbt030_cg occurs 10.
include structure /pws/zycbt030.
data:
bukrs type bkpf-bukrs,
gjahr type bkpf-gjahr,
zterm like /pws/zycbt017-zterm,
v_belnr like /pws/zycbt030-belnr,
...