SELECT
   CDPRODUTO,
   1 AS PRO_CODEMP,
   CDPRODUTO AS PRO_CODIGO,
   'N' AS PRO_PODEVENDER,
   'S' AS PRO_ATIVO,
   'N' AS PRO_SERVICO,
   NMPRODUTO AS PRO_NOME,
   CDCLASFISC AS PRO_NCM,
   DSCOMPLNOME AS PRO_COMPLEMENTO,
   SGUNIDADE AS PRO_UNIDADEVENDA,
   CDBARPRODUTO AS PRO_CODIGOBARRAS,
   VRPESOBRUTPR AS PRO_PESOBRUTO,
   VRPESOLIQUPR AS PRO_PESOLIQUIDO,
   '5.01.01.01.1.01.001' AS PRO_CODCCU,
   '1.02.02.01.1.01.483' AS PRO_CODCCUCOMPRA,
   'CENTR' AS PRO_CODALM,
   '0000.00.00' AS PRO_CODCLA,
   (SELECT NVL(MAX(PR.CDPRODINTE),'NI')
    FROM PRODUTO PR
    WHERE P.CDARVPROD LIKE PR.CDARVPROD||'%'
      AND PR.CDNVPRODUTO = '3') AS PRO_CODFAM,
   50607 AS PRO_CODFIS,
   14504 AS PRO_CODFISCOMPRA,
   1 AS PRO_CODPLA,
   763 AS PRO_CODUSU,
   'NI' AS PRO_SUBFAM,
   3 AS PRO_CODGRU,
   751 AS PRO_CODUNI,
   751 AS PRO_CODUNICOMPRA
FROM PRODUTO P
WHERE USR_DTEXPORTACAO IS NULL
  AND CDNVPRODUTO = '5'
  AND CDPRODUTO = CDPRODESTO
