Módulo: CÂMBIO FINANCEIRO
Funcionalidade: SISCOSERV
Data/Hora da Publicação: 06/11/2013 14:12:08
Data/Hora Última Alteração: 06/11/2013 14:12:08
Descrição da Nota: SISCOSERV, MATCH CODE DE SELEÇÃO DE EMBARQUES DE IMP/EXP
Sintoma
Conforme verificado, os embarques que deverão ser registrados no siscoserv. são serviços a partir
de 01.08.2012, conforme manual informativo. Sendo assim todo processo que contem a data de inicio
de 31.07.2012 não deverão que aparecer no match code.
Nos caso de importação FRETE e SEGURO, a Data de inicio é considerado a data do BL, onde o sistema
busca na tabela /PWS/ZYCIT093 - campo "DTEMISS". para Embarque de Importação s/serviço, não tem
tratamento de data inicial.
Na Exportação FRETE e SEGURO, a Data de inicio é a data do Embarque. na tabela /PWS/ZYCET001 -
campo - "DTEMB". Para Embarque de Exportação s/serviço, o sistema busca a data da tabela
/PWS/ZYCET002 - campo FKDAT.
Também ajustar o match code - "Frete s/embarque de exportação" onde deve buscar apenas frete
onde é por conta do cliente, ou seja com o Incoterm EXW e FOB. O sistema deve verificar o
incoterm do embarque na tabela /PWS/ZYCET001 - Campo "INCO1"
Solução
Criado novos Match Codes para realizar todos os Filtros solicitados. Filtro de Datas e Filtros de
Incoterm.
9.0
Produto:
Nota
Descrição
Informações Complementares
----------------------------------------------------------------------------------------------------
Nota Número 13383 Data: 05/11/2013 Hora: 15:34:58
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
Nota Número : 13383
Categoria : Erro de Programa
Prioridade : Baixa
Versão PW.CE : 9.0
Pacote : 00006
Agrupamento : 00166
----------------------------------------------------------------------------------------------------
Referência às notas relacionadas:
Número - Ordem - Versão - Pacote - Descrição Breve
13172 - 00001 - 9.0 - 00005 - SISCOSERV - ASSOCIAÇÃO SISCOSERV - PRAZO PARA RAS/RVS E RP/RF
13327 - 00002 - 9.0 - 00006 - SISCOSERV
13366 - 00003 - 9.0 - 00006 - SISCOSERV, NOVO TRATAMENTO PARA CRIAÇÃO DE RAS / RVS, VÁRIOS EMBA
----------------------------------------------------------------------------------------------------
SISCOSERV, MATCH CODE DE SELEÇÃO DE EMBARQUES DE IMP/EXP
----------------------------------------------------------------------------------------------------
Palavras Chave:
SISCOSERV, MATCH CODE DE SELEÇÃO DE EMBARQUES DE IMP/EXP
----------------------------------------------------------------------------------------------------
Objetos da nota:
SHLP /PWS/ZYCAA180
SHLP /PWS/ZYCAA179
FUNC /PWS/ZYCAA179
FUNC /PWS/ZYCAA180
REPS /PWS/MZYCA011F01
REPS /PWS/MZYCA011TOP
REPS /PWS/LZYCAGFUXX
----------------------------------------------------------------------------------------------------
Modificações efetuadas em FUNC /PWS/ZYCAA179
*** CRIAÇÃO DE NOVA FUNÇÃO PELA SE37
*** Caracteristicas
Modulo de função - /PWS/ZYCAA179
Grupo de funções - /PWS/ZYCAGF - CA - Grupo de funções
Texto breve - Exit Ajuda Pesquisa Embarques Exportação Siscoserv
Cl.desenvolvimento - /PWS/ZYCA
(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
*** Importacao
*** Exportacao
*** Modific.
nome parametro atributo/tipo tipo referencia valor proposto opcional transfer.valor
----------------------------------------------------------------------------------------------
CALLCONTROL LIKE DDSHF4CTRL '' '' 'X'
SHLP TYPE SHLP_DESCR_T '' '' 'X'
*** Tabelas
nome parametro atributo/tipo tipo referencia opcional
-----------------------------------------------------------
RECORD_TAB LIKE SEAHLPRES ''
SHLP_TAB TYPE SHLP_DESCR_TAB_T ''
*** Exceções
*** Texto Fonte
* >> Início da inclusão:
FUNCTION /PWS/ZYCAA179.
types:
begin of ty_dados,
nrseq type /pws/zycet001-nrseq,
nremb type /pws/zycet001-nremb,
werks type /pws/zycet001-werks,
name1 type /pws/zycet001-name1,
navio type /pws/zycet001-navio,
dtemb type /pws/zycet001-dtemb,
inco1 type /pws/zycet001-inco1,
end of ty_dados.
data: itab_dados type standard table of ty_dados,
v_fieldname type dfies-lfieldname,
v_tabix type sy-tabix,
i_tporigem type /pws/zycat030-tp_origem,
wa_zycet002 type /pws/zycet002.
field-symbols:
<fs_shlp> like line of shlp_tab,
<fs_fielddescr> like line of shlp_tab-fielddescr,
<fs_dados> type ty_dados,
<fs_dados_aux> type ty_dados,
<fs_record_tab> type seahlpres.
clear callcontrol-maxrecords.
if callcontrol-step = 'DISP' or
callcontrol-step = 'PRESEL'.
import i_tporigem from memory id 'CA011-OR'.
read table shlp_tab index 1 assigning <fs_shlp>.
check <fs_shlp> is assigned.
loop at <fs_shlp>-fielddescr assigning <fs_fielddescr>.
check <fs_fielddescr>-fieldname = 'NRSEQ' or
<fs_fielddescr>-fieldname = 'NREMB' or
<fs_fielddescr>-fieldname = 'WERKS' or
<fs_fielddescr>-fieldname = 'NAME1' or
<fs_fielddescr>-fieldname = 'NAVIO' or
<fs_fielddescr>-fieldname = 'DTEMB' or
<fs_fielddescr>-fieldname = 'INCO1'.
v_fieldname = <fs_fielddescr>-fieldname.
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 = 1
others = 2.
if sy-subrc <> 0.
exit.
endif.
endloop.
unassign: <fs_shlp>, <fs_fielddescr>.
if not itab_dados[] is initial.
loop at itab_dados assigning <fs_dados>.
v_tabix = sy-tabix.
if i_tporigem eq 'FE' or i_tporigem eq 'SE'.
if <fs_dados>-dtemb <= '20120731' or
( i_tporigem eq 'FE' and
<fs_dados>-INCO1 ne 'EXW' and
<fs_dados>-INCO1 ne 'FOB' ).
delete itab_dados index sy-tabix.
delete record_tab index sy-tabix.
endif.
else.
select single *
from /pws/zycet002
into wa_zycet002
where nrseq = <fs_dados>-nrseq.
if sy-subrc ne 0.
delete itab_dados index sy-tabix.
delete record_tab index sy-tabix.
else.
if wa_zycet002-fkdat <= '20120731'.
delete itab_dados index sy-tabix.
delete record_tab index sy-tabix.
endif.
endif.
endif.
endloop.
endif.
endif.
ENDFUNCTION.
* << Fim da inclusão
----------------------------------------------------------------------------------------------------
Modificações efetuadas em FUNC /PWS/ZYCAA180
*** CRIAÇÃO DE NOVA FUNÇÃO PELA SE37
*** Caracteristicas
Modulo de função - /PWS/ZYCAA180
Grupo de funções - /PWS/ZYCAGF - CA - Grupo de funções
Texto breve - Exit Ajuda Pesquisa Embarques Importação Siscoserv
Cl.desenvolvimento - /PWS/ZYCA
(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
*** Importacao
*** Exportacao
*** Modific.
nome parametro atributo/tipo tipo referencia valor proposto opcional transfer.valor
----------------------------------------------------------------------------------------------
CALLCONTROL LIKE DDSHF4CTRL '' '' 'X'
SHLP TYPE SHLP_DESCR_T '' '' 'X'
*** Tabelas
nome parametro atributo/tipo tipo referencia opcional
-----------------------------------------------------------
RECORD_TAB LIKE SEAHLPRES ''
SHLP_TAB TYPE SHLP_DESCR_TAB_T ''
*** Exceções
*** Texto Fonte
* >> Início da inclusão:
FUNCTION /PWS/ZYCAA180.
types:
begin of ty_dados,
nrseq type /pws/zycit001-nrseq,
embarca type /pws/zycit001-embarca,
bukrs type /pws/zycit001-bukrs,
j_1bbranch type /pws/zycit001-j_1bbranch,
end of ty_dados.
data: itab_dados type standard table of ty_dados,
v_fieldname type dfies-lfieldname,
v_tabix type sy-tabix,
i_tporigem type /pws/zycat030-tp_origem,
wa_zycit094 type /pws/zycit094,
wa_zycit093 type /pws/zycit093.
field-symbols:
<fs_shlp> like line of shlp_tab,
<fs_fielddescr> like line of shlp_tab-fielddescr,
<fs_dados> type ty_dados,
<fs_dados_aux> type ty_dados,
<fs_record_tab> type seahlpres.
clear callcontrol-maxrecords.
if callcontrol-step = 'DISP' or
callcontrol-step = 'PRESEL'.
import i_tporigem from memory id 'CA011-OR'.
read table shlp_tab index 1 assigning <fs_shlp>.
check <fs_shlp> is assigned.
loop at <fs_shlp>-fielddescr assigning <fs_fielddescr>.
check <fs_fielddescr>-fieldname = 'NRSEQ' or
<fs_fielddescr>-fieldname = 'EMBARCA' or
<fs_fielddescr>-fieldname = 'BUKRS' or
<fs_fielddescr>-fieldname = 'J_1BBRANCH'.
v_fieldname = <fs_fielddescr>-fieldname.
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 = 1
others = 2.
if sy-subrc <> 0.
exit.
endif.
endloop.
unassign: <fs_shlp>, <fs_fielddescr>.
check i_tporigem eq 'FI' or
i_tporigem eq 'SI'.
if not itab_dados[] is initial.
loop at itab_dados assigning <fs_dados>.
v_tabix = sy-tabix.
select single *
from /pws/zycit094
into wa_zycit094
where nrseq = <fs_dados>-nrseq.
if sy-subrc eq 0.
select single *
from /pws/zycit093
into wa_zycit093
where nrseqce = wa_zycit094-nrseqce.
endif.
if sy-subrc ne 0.
delete itab_dados index sy-tabix.
delete record_tab index sy-tabix.
else.
if wa_zycit093-dtemiss <= '20120731'.
delete itab_dados index sy-tabix.
delete record_tab index sy-tabix.
endif.
endif.
endloop.
endif.
endif.
ENDFUNCTION.
* << Fim da inclusão
----------------------------------------------------------------------------------------------------
Modificações efetuadas em SHLP /PWS/ZYCAA179
MODIFICAR AJUDA DE PESQUISA: /PWS/ZYCAA179
DESCRIÇÃO BREVE: CA - Número Sequencial do Embarque Exportação
CL.DESENVOLVIMENTO: /PWS/ZYCA
DEFINIÇÃO
OBTENÇÃO DE DADOS
MÉTODO DE SELEÇÃO: /PWS/ZYCET001
COMPORTAMENTO DE DIÁLOGO:
TIPO DE DIÁLOGO: D - Exibição de Valores Imediata
HOT KEY: ____
EXIT AJUD. PESQUISA: /PWS/ZYCAA179
PARÂMETROS:
PARAM. IMP EXP POSL ISEL EXAJ ELEM. DADOS
------------------------------------------------
NRSEQ 'X' 'X' 1 1 '' /PWS/ZYCEL001
NREMB '' 'X' 2 2 '' /PWS/ZYCEL002
WERKS '' '' 3 3 '' WERKS_D
NAME1 '' '' 4 4 '' /PWS/ZYCEL021
NAVIO '' '' 5 5 '' /PWS/ZYCEL004
DTEMB '' '' 0 0 '' /PWS/ZYCEL010
INCO1 '' '' 0 0 '' INCO1
----------------------------------------------------------------------------------------------------
Modificações efetuadas em SHLP /PWS/ZYCAA180
MODIFICAR AJUDA DE PESQUISA: /PWS/ZYCAA180
DESCRIÇÃO BREVE: CA - Número Sequencial do Embarque Importação
CL.DESENVOLVIMENTO: /PWS/ZYCA
DEFINIÇÃO
OBTENÇÃO DE DADOS
MÉTODO DE SELEÇÃO: /PWS/ZYCIT001
COMPORTAMENTO DE DIÁLOGO:
TIPO DE DIÁLOGO: D - Exibição de Valores Imediata
HOT KEY: B
EXIT AJUD. PESQUISA: /PWS/ZYCAA180
PARÂMETROS:
PARAM. IMP EXP POSL ISEL EXAJ ELEM. DADOS
--------------------------------------------------
NRSEQ 'X' 'X' 1 1 '' /PWS/ZYCIL001
EMBARCA 'X' '' 2 2 '' /PWS/ZYCIL008
BUKRS 'X' '' 3 3 '' BUKRS
J_1BBRANCH 'X' '' 4 4 '' J_1BBRANC_
----------------------------------------------------------------------------------------------------
Modificações efetuadas em REPS /PWS/MZYCA011F01
...
if p_novo = 'N'.
loop at itab_zycet001.
read table itab_zycat031t
with key nrseq_origem = itab_zycet001-nrseq.
if sy-subrc eq 0.
message i061 with text-i30 itab_zycet001-nrseq text-i32.
delete itab_zycet001.
endif.
endloop.
endif.
* >> Início da inclusão: FORM BUSCA_EMB_EXP_2
select nrseq fkdat matnr
from /pws/zycet002
into table itab_zycet002
for all entries in itab_zycet001
where nrseq = itab_zycet001-nrseq.
loop at itab_zycet001.
read table itab_zycet002
into wa_zycet002 with key nrseq = itab_zycet001-nrseq.
if sy-subrc ne 0.
delete itab_zycet001.
else.
if wa_zycet002-fkdat <= '20120731'.
delete itab_zycet001.
endif.
endif.
endloop.
* << Fim da inclusão
if itab_zycet001[] is initial.
p_erro = 'X'.
message i015 with text-i25 text-i26.
exit.
endif.
* >> Início da exclusão: FORM BUSCA_EMB_EXP_2
select nrseq fkdat matnr
from /pws/zycet002
into table itab_zycet002
for all entries in itab_zycet001
where nrseq = itab_zycet001-nrseq.
* << Fim da exclusão
select * from /pws/zycet156
into table itab_zycet156
for all entries in itab_zycet001
where bukrs = itab_zycet001-bukrs
and codmod = 'X'
and proccond = 'FOB'.
if sy-subrc eq 0.
select nrseq codigo vlme_f waers
from /pws/zycet008
into table itab_zycet008
...
...
endloop.
if p_novo = 'N'.
loop at itab_zycit094.
read table itab_zycat031t
with key nrseq_origem = itab_zycit094-nrseq.
if sy-subrc eq 0.
message i061 with text-i30 itab_zycit094-nrseq text-i32.
delete itab_zycit094.
endif.
endloop.
* >> Início da inclusão: FORM BUSCA_FRETE_SEG_IMP_2
endif.
loop at itab_zycit094.
select single nrseqce dtemiss dtcheg vlfre
from /pws/zycit093
into wa_zycit093
where nrseqce = itab_zycit094-nrseqce.
if sy-subrc ne 0.
delete itab_zycit094.
else.
if wa_zycit093-dtemiss <= '20120731'.
delete itab_zycit094.
endif.
* << Fim da inclusão
endif.
* >> Início da inclusão: FORM BUSCA_FRETE_SEG_IMP_2
endloop.
* << Fim da inclusão
if itab_zycit094[] is initial.
p_erro = 'X'.
message i015 with text-i25 text-i26.
exit.
endif.
select nrseq tpfatura vlmerc vlfre
...
...
v_kschl type /pws/zycet156-kschl,
v_matnr type /pws/zycat046-matnr,
v_count type /pws/zycat031-operacao,
v_existe(1) type c,
begin of itab_zycet001 occurs 0,
nrseq type /pws/zycet001-nrseq,
bukrs type /pws/zycet001-bukrs,
dtemb type /pws/zycet001-dtemb,
codportd type /pws/zycet001-codportd,
tipo_emb type /pws/zycet001-tipo_emb,
* >> Início da inclusão: FORM BUSCA_FRETE_SEG_EXP_2
inco1 type /pws/zycet001-inco1,
* << Fim da inclusão
end of itab_zycet001,
begin of itab_zycet003 occurs 0,
nrseq type /pws/zycet003-nrseq,
nrseqre type /pws/zycet003-nrseqre,
end of itab_zycet003,
begin of itab_zycet008 occurs 0,
nrseq type /pws/zycet008-nrseq,
codigo type /pws/zycet008-codigo,
vlme_f type /pws/zycet008-vlme_f,
waers type /pws/zycet008-waers,
...
...
if not v_freteexp is initial.
v_tp_origem = 'FE'.
v_kschl = 'ZFTE'.
v_matnr = 'FRT'.
elseif not v_segexp is initial.
v_tp_origem = 'SE'.
v_kschl = 'ZSEG'.
v_matnr = 'SEG'.
endif.
select nrseq bukrs dtemb codportd tipo_emb
* >> Início da inclusão: FORM BUSCA_FRETE_SEG_EXP_2
inco1
* << Fim da inclusão
from /pws/zycet001
into table itab_zycet001
where nrseq in r_embexp.
if sy-subrc ne 0.
p_erro = 'X'.
message i015 with text-i25 text-i26.
exit.
endif.
loop at itab_zycet001.
perform verifica_operacao using itab_zycet001-nrseq
...
...
endloop.
if p_novo = 'N'.
loop at itab_zycet001.
read table itab_zycat031t
with key nrseq_origem = itab_zycet001-nrseq.
if sy-subrc eq 0.
message i061 with text-i30 itab_zycet001-nrseq text-i32.
delete itab_zycet001.
endif.
endloop.
* >> Início da inclusão: FORM BUSCA_FRETE_SEG_EXP_2
endif.
delete itab_zycet001 where dtemb <= '20120731'.
if v_tp_origem = 'FE'.
delete itab_zycet001 where inco1 ne 'EXW'
and inco1 ne 'FOB'.
* << Fim da inclusão
endif.
if itab_zycet001[] is initial.
p_erro = 'X'.
message i015 with text-i25 text-i26.
exit.
endif.
select nrseq nrseqre
from /pws/zycet003
into table itab_zycet003
for all entries in itab_zycet001
...
...
refresh: r_embexp.
set screen 0.
leave screen.
when 'CANCEL'.
clear: r_embexp.
refresh: r_embexp.
set screen 0.
leave screen.
endcase.
endform.
* >> Início da inclusão:
form match_code_importacao using p_low_high.
data: l_display(1) type c,
itab_result type table of ddshretval,
wa_result type ddshretval,
i_fieldname type dfies-fieldname,
i_tporigem type /pws/zycat030-tp_origem.
i_tporigem = /pws/zycat030-tp_origem.
if i_tporigem is initial.
if not v_freteimp is initial.
i_tporigem = 'FI'.
elseif not v_segimp is initial.
i_tporigem = 'SI'.
elseif not v_embimp is initial.
i_tporigem = 'EI'.
endif.
endif.
export i_tporigem to memory id 'CA011-OR'.
if p_low_high = 'L'.
i_fieldname = 'LOW'.
else.
i_fieldname = 'HIGH'.
endif.
call function 'F4IF_FIELD_VALUE_REQUEST'
exporting
tabname = 'R_EMBIMP'
fieldname = i_fieldname
searchhelp = '/PWS/ZYCAA180'
display = l_display
tables
return_tab = itab_result
exceptions
others = 5.
if sy-subrc = 0.
else.
endif.
read table itab_result into wa_result index 1.
if p_low_high = 'L'.
r_embimp-low = wa_result-fieldval.
else.
r_embimp-high = wa_result-fieldval.
endif.
free memory id 'CA011-OR'.
endform.
form match_code_exportacao using p_low_high.
data: l_display(1) type c,
itab_result type table of ddshretval,
wa_result type ddshretval,
i_fieldname type dfies-fieldname,
i_tporigem type /pws/zycat030-tp_origem.
i_tporigem = /pws/zycat030-tp_origem.
if i_tporigem is initial.
if not v_freteexp is initial.
i_tporigem = 'FE'.
elseif not v_segexp is initial.
i_tporigem = 'SE'.
elseif not v_embexp is initial.
i_tporigem = 'EE'.
endif.
endif.
export i_tporigem to memory id 'CA011-OR'.
if p_low_high = 'L'.
i_fieldname = 'LOW'.
else.
i_fieldname = 'HIGH'.
endif.
call function 'F4IF_FIELD_VALUE_REQUEST'
exporting
tabname = 'R_EMBEXP'
fieldname = i_fieldname
searchhelp = '/PWS/ZYCAA179'
display = l_display
tables
return_tab = itab_result
exceptions
others = 5.
if sy-subrc = 0.
else.
endif.
read table itab_result into wa_result index 1.
if p_low_high = 'L'.
r_embexp-low = wa_result-fieldval.
else.
r_embexp-high = wa_result-fieldval.
endif.
free memory id 'CA011-OR'.
endform.
* << Fim da inclusão
----------------------------------------------------------------------------------------------------
Modificações efetuadas em REPS /PWS/MZYCA011TOP
...
case sy-dynnr.
when '0004' or '0005' or '0006'.
perform set_screen_origem.
endcase.
at selection-screen on value-request for r_pcompr-low.
perform match_code_pedcompra.
at selection-screen on value-request for r_item-low.
perform match_code_item_low.
at selection-screen on value-request for r_item-high.
perform match_code_item_high.
* >> Início da inclusão:
at selection-screen on value-request for r_embimp-low.
perform match_code_importacao using 'L'.
at selection-screen on value-request for r_embimp-high.
perform match_code_importacao using 'H'.
at selection-screen on value-request for r_embexp-low.
perform match_code_exportacao using 'L'.
at selection-screen on value-request for r_embexp-high.
perform match_code_exportacao using 'H'.
* << Fim da inclusão
----------------------------------------------------------------------------------------------------