Boa tarde,
A informação fica no campo item-doc-est.num-pedido, for each abaixo facilita rsss
for each docum-est use-index dt-tp-estab where
docum-est.dt-trans >= da-dt-ini and
docum-est.dt-trans <= da-dt-fim and
docum-est.cod-estabel >= c-cod-estabel-ini and
docum-est.cod-estabel <= c-cod-estabel-fim and
docum-est.usuario >= c-usuario-ini and
docum-est.usuario <= c-usuario-fim no-lock,
each item-doc-est of docum-est no-lock,
first natur-oper where
natur-oper.nat-operacao = docum-est.nat-operacao no-lock,
first estabelec where
estabelec.cod-estabel = docum-est.cod-estabel and
estabelec.ep-codigo = string(i-ep-codigo) no-lock,
first emitente where
emitente.cod-emitente = docum-est.cod-emitente no-lock:
disp
docum-est.serie-docto
docum-est.nro-docto
docum-est.cod-emitente
docum-est.nat-operacao
item-doc-est.it-codigo
item-doc-est.num-pedido
with 1 col width 300.
end.
Também podes verificar se a nota de contrato.
find first rat-ordem where
rat-ordem.serie-docto = docum-est.serie-docto and
rat-ordem.nro-docto = docum-est.nro-docto and
rat-ordem.cod-emitente = docum-est.cod-emitente and
rat-ordem.nat-operacao = docum-est.nat-operacao and
rat-ordem.sequencia = item-doc-est.sequencia no-error.
Espero ter ajudado
Sds