






{cpp/cpapi014.i} /* tt-transf */
{cpp/cpapi014.i1} /* tt-req-sum */
def var c-erro as character no-undo.
def var c-texto as character no-undo.
def var h-cpapi014 as handle no-undo.
create tt-transf.
assign tt-transf.tipo-trans = ""
tt-transf.cod-estabel = ""
tt-transf.data = ""
tt-transf.nr-req-sum = ""
tt-transf.cod-depos-dest = ""
tt-transf.cod-localiz-dest = ""
tt-transf.deposito-ini = ""
tt-transf.deposito-fim = ""
tt-transf.item-ini = ""
tt-transf.item-fim = ""
tt-transf.cod-versao-integracao = 1
tt-transf.procura-saldos = ""
tt-transf.loc-ent-unica = ""
tt-transf.conta-contabil = ""
tt-transf.percentual = ""
tt-transf.carrega-req-sum = "".
run cpp/cpapi014.p persistent set h-cpapi014 (input table tt-transf,
input-output table tt-erro,
input yes).
for each tt-error:
message tt-erro.cd-erro skip
tt-erro.mensagem view-as alert-box.
end.
if return-value = "NOK" then
return "NOK".
run pi-dados-default in h-cpapi014.
find first tt-transf.
run pi-valida-transf in h-cpapi014 (input no,
input tt-transf.nr-req-sum,
output c-erro,
output c-texto).
do i-cont = 1 to num-entries (c-erro):
create tt-erro.
assign tt-erro.cd-erro = int(entry (i-cont, c-erro)) no-error.
run utp/ut-msgs.p (input "msg",
input tt-erro.cd-erro,
input entry (i-cont, c-texto)).
assign tt-erro.mensagem = return-value.
end.
for each tt-error:
message tt-erro.cd-erro skip
tt-erro.mensagem view-as alert-box.
end.
if c-erro <> ""
then return return-value.
run pi-carrega-tt-req-sum IN h-cpapi014. /* carrega temp-table */
for each tt-req-sum:
delete tt-req-sum.
end.
run pi-retorna-tt-req-sum in h-cpapi014 (output table tt-req-sum).
for each tt-req-sum:
assign tt-req-sum.lote = ""
tt-req-sum.cod-localiz = ""
tt-req-sum.cod-refer = ""
tt-req-sum.qt-requis = "".
end.
run pi-recebe-tt-req-sum in h-cpapi014 (input table tt-req-sum).
run pi-processa-transf in h-cpapi014 (input table tt-transf,
input-output table tt-erro,
input yes).
if valid-handle(h-cpapi014) then
delete object h-cpapi014.



Usuários navegando neste fórum: CommonCrawl [Bot] e 1 visitante