CREATE OR REPLACE TRIGGER LOG_VND_PRODUTO
AFTER DELETE OR INSERT OR UPDATE
ON PRODUTO FOR EACH ROW
DECLARE
  V_DSREMOTEADDR VARCHAR2(15);
  V_DSREMOTEHOST VARCHAR2(15);
  V_DSSERVERRDM  VARCHAR2(20);
  V_DSSERVMETHOD VARCHAR2(30);
  V_DSREMOTEOPER VARCHAR2(12);
  V_DESC         VARCHAR2(4000);
  V_ITPESQ       VARCHAR2(40);
  V_NMOPERADOR   VARCHAR2(40);
  V_IDTIPOOPER   VARCHAR2(1);
BEGIN
 /* IDTIPOOPER - '1' - Inclusao, '2' - Alteracao, '3' - Exclusao*/
    V_DESC       := '';
    V_ITPESQ     := '';
    V_NMOPERADOR := '';
    V_IDTIPOOPER := '';
    NMUSUARIO(V_NMOPERADOR);
    IF :NEW.IDORIGENDPOINT = 'S' THEN
      V_NMOPERADOR := 'ORIGEM ENDPOINT';
    END IF;
    WEBTUNNING(V_DSREMOTEADDR,
              V_DSREMOTEHOST,
              V_DSSERVERRDM,
              V_DSSERVMETHOD,
              V_DSREMOTEOPER);
    IF UPDATING THEN
      IF NVL(:NEW.CDPRODUTO,'NULL') <> NVL(:OLD.CDPRODUTO,'NULL') THEN
         V_DESC := 'Prod ' || '' || NVL(:NEW.CDPRODUTO,''  );
      END IF;
      IF NVL(:NEW.IDIMPPRODUTO, 99999) <> NVL(:OLD.IDIMPPRODUTO,999999) THEN
         V_DESC := NVL(V_DESC, '') || ' ' || 'Imprime Prin ' || '' || NVL(:NEW.IDIMPPRODUTO,''  );
      END IF;
	    IF NVL(:NEW.IDPRODATIVPR,'NULL') <> NVL(:OLD.IDPRODATIVPR,'NULL') THEN
         V_DESC := NVL(V_DESC, '') || ' ' || 'Ativo ' || '' || NVL(:NEW.IDPRODATIVPR,'' );
      END IF;
	    IF NVL(:NEW.IDPESAPROD,'NULL') <> NVL(:OLD.IDPESAPROD,'NULL') THEN
         V_DESC := NVL(V_DESC, '') || ' ' || 'Pesa ' || '' || NVL(:NEW.IDPESAPROD,'' );
      END IF;
	    IF NVL(:NEW.QTTARAPROD, 99999) <> NVL(:OLD.QTTARAPROD, 99999) THEN
         V_DESC := NVL(V_DESC, '') || ' ' ||'Tara ' || '' || NVL(:NEW.QTTARAPROD,'' );
      END IF;
      IF NVL(:NEW.CDBARPRODUTO,'NULL') <> NVL(:OLD.CDBARPRODUTO,'NULL') THEN
         V_DESC := NVL(V_DESC, '') || ' ' || 'Cd Barra ' || '' || NVL(:NEW.CDBARPRODUTO,''  );
      END IF;
      IF NVL(:NEW.NMPRODIMPFIS,'NULL') <> NVL(:OLD.NMPRODIMPFIS,'NULL') THEN
         V_DESC := NVL(V_DESC, '') || ' ' || 'Nm Abrev ' || '' || NVL(:NEW.NMPRODIMPFIS,''  );
      END IF;
      IF NVL(:NEW.IDCOBTXSERV,'NULL') <> NVL(:OLD.IDCOBTXSERV,'NULL') THEN
         V_DESC := NVL(V_DESC, '') || ' ' || 'Cobra Tx ' || '' || NVL(:NEW.IDCOBTXSERV,''  );
      END IF;
      IF NVL(:NEW.IDTIPOPROD,'NULL') <> NVL(:OLD.IDTIPOPROD,'NULL') THEN
         V_DESC := NVL(V_DESC, '') || ' ' || 'Grupo Prod Comb ' || '' || NVL(:NEW.IDTIPOPROD,''  );
      END IF;
      IF NVL(:NEW.CDPROTECLADO,'NULL') <> NVL(:OLD.CDPROTECLADO,'NULL') THEN
         V_DESC := NVL(V_DESC, '') || ' ' || 'Cd Teclado ' || '' || NVL(:NEW.CDPROTECLADO,''  );
      END IF;
      IF NVL(:NEW.IDIMPRODUVEZ,'NULL') <> NVL(:OLD.IDIMPRODUVEZ,'NULL') THEN
         V_DESC := NVL(V_DESC, '') || ' ' || 'Imprime Prod ' || '' || NVL(:NEW.IDIMPRODUVEZ,''  );
      END IF;
      IF NVL(:NEW.IDSOLLOCIMP,'NULL') <> NVL(:OLD.IDSOLLOCIMP,'NULL') THEN
         V_DESC := NVL(V_DESC, '') || ' ' || 'Sol Local Imp ' || '' || NVL(:NEW.IDSOLLOCIMP,''  );
      END IF;
      IF NVL(:NEW.CDNVPRODUTO,'NULL') <> NVL(:OLD.CDNVPRODUTO,'NULL') THEN
        V_DESC := NVL(V_DESC, '') || ' ' || 'CDNVPRODUTO' || '' || NVL(:NEW.CDNVPRODUTO,''  );
      END IF;   
      IF NVL(:NEW.SGUNIDADE,'NULL') <> NVL(:OLD.SGUNIDADE,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'SGUNIDADE' || '' || NVL(:NEW.SGUNIDADE,''  );
      END IF;
      IF NVL(:NEW.NMPRODUTO,'NULL') <> NVL(:OLD.NMPRODUTO,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'NMPRODUTO' || '' || NVL(:NEW.NMPRODUTO,''  );
      END IF;  
      IF NVL(:NEW.NMPRODINGLES,'NULL') <> NVL(:OLD.NMPRODINGLES,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'NMPRODINGLES' || '' || NVL(:NEW.NMPRODINGLES,''  );
      END IF;
      IF NVL(:NEW.NMPRODESPANH,'NULL') <> NVL(:OLD.NMPRODESPANH,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'NMPRODESPANH' || '' || NVL(:NEW.NMPRODESPANH,''  );
      END IF;
      IF NVL(:NEW.VRPESOUNID, 99999) <> NVL(:OLD.VRPESOUNID,999999) THEN
        V_DESC := NVL(V_DESC, '') || ' ' || 'VRPESOUNID' || '' || NVL(:NEW.VRPESOUNID,''  );
      END IF; 
      IF NVL(:NEW.VRPEFATOCORR, 99999) <> NVL(:OLD.VRPEFATOCORR,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'VRPEFATOCORR' || '' || NVL(:NEW.VRPEFATOCORR,''  );
      END IF;    
      IF NVL(:NEW.CDPRODESTO,'NULL') <> NVL(:OLD.CDPRODESTO,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDPRODESTO' || '' || NVL(:NEW.CDPRODESTO,''  );
      END IF;   
      IF NVL(:NEW.VRFATOCONV, 99999) <> NVL(:OLD.VRFATOCONV,999999) THEN
        V_DESC := NVL(V_DESC, '') || ' ' || 'VRFATOCONV' || '' || NVL(:NEW.VRFATOCONV,''  );
      END IF;   
      IF NVL(:NEW.VRARREDREQ, 99999) <> NVL(:OLD.VRARREDREQ,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'VRARREDREQ' || '' || NVL(:NEW.VRARREDREQ,''  );
      END IF;
      IF NVL(:NEW.VRARREDCMP, 99999) <> NVL(:OLD.VRARREDCMP,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'VRARREDCMP' || '' || NVL(:NEW.VRARREDCMP,''  );
      END IF;
      IF NVL(:NEW.VRPEFATOCOCC, 99999) <> NVL(:OLD.VRPEFATOCOCC,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'VRPEFATOCOCC' || '' || NVL(:NEW.VRPEFATOCOCC,''  );
      END IF;
      IF NVL(:NEW.IDINTESAFR,'NULL') <> NVL(:OLD.IDINTESAFR,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDINTESAFR' || '' || NVL(:NEW.IDINTESAFR,''  );
      END IF;  
      IF NVL(:NEW.CDTPCTRECEB,'NULL') <> NVL(:OLD.CDTPCTRECEB,'NULL') THEN
        V_DESC := NVL(V_DESC, '') || ' ' || 'CDTPCTRECEB' || '' || NVL(:NEW.CDTPCTRECEB,''  );
      END IF;   
      IF NVL(:NEW.CDTPCTPAGAR,'NULL') <> NVL(:OLD.CDTPCTPAGAR,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDTPCTPAGAR' || '' || NVL(:NEW.CDTPCTPAGAR,''  );
      END IF;   
      IF NVL(:NEW.CDSETOR,'NULL') <> NVL(:OLD.CDSETOR,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDSETOR' || '' || NVL(:NEW.CDSETOR,''  );
      END IF;  
      IF NVL(:NEW.IDTPPRODDOS,'NULL') <> NVL(:OLD.IDTPPRODDOS,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDTPPRODDOS' || '' || NVL(:NEW.IDTPPRODDOS,''  );
      END IF;   
      IF NVL(:NEW.CDPRODUTODOS,'NULL') <> NVL(:OLD.CDPRODUTODOS,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDPRODUTODOS' || '' || NVL(:NEW.CDPRODUTODOS,''  );
      END IF; 
      IF NVL(:NEW.VRPREUNIT, 99999) <> NVL(:OLD.VRPREUNIT,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'VRPREUNIT' || '' || NVL(:NEW.VRPREUNIT,''  );
      END IF;  
      IF NVL(:NEW.CDCLASFISC,'NULL') <> NVL(:OLD.CDCLASFISC,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDCLASFISC' || '' || NVL(:NEW.CDCLASFISC,''  );
      END IF; 
      IF NVL(:NEW.CDCCUSTENTR,'NULL') <> NVL(:OLD.CDCCUSTENTR,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDCCUSTENTR' || '' || NVL(:NEW.CDCCUSTENTR,''  );
      END IF; 
      IF NVL(:NEW.CDCCUSTSAID,'NULL') <> NVL(:OLD.CDCCUSTSAID,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDCCUSTSAID' || '' || NVL(:NEW.CDCCUSTSAID,''  );
      END IF;   
      IF NVL(:NEW.NRHRMONTPROD,'NULL') <> NVL(:OLD.NRHRMONTPROD,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'NRHRMONTPROD' || '' || NVL(:NEW.NRHRMONTPROD,''  );
      END IF; 
      IF NVL(:NEW.NRHRCOMPPROD,'NULL') <> NVL(:OLD.NRHRCOMPPROD,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'NRHRCOMPPROD' || '' || NVL(:NEW.NRHRCOMPPROD,''  );
      END IF;    
      IF NVL(:NEW.CDPRODINTE,'NULL') <> NVL(:OLD.CDPRODINTE,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDPRODINTE' || '' || NVL(:NEW.CDPRODINTE,''  );
      END IF;  
      IF NVL(:NEW.DSCOMPLNOME,'NULL') <> NVL(:OLD.DSCOMPLNOME,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'DSCOMPLNOME' || '' || NVL(:NEW.DSCOMPLNOME,''  );
      END IF; 
      IF NVL(:NEW.CDPRODORIG,'NULL') <> NVL(:OLD.CDPRODORIG,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDPRODORIG' || '' || NVL(:NEW.CDPRODORIG,''  );
      END IF; 
      IF NVL(:NEW.VRFATACRCMP, 99999) <> NVL(:OLD.VRFATACRCMP,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'VRFATACRCMP' || '' || NVL(:NEW.VRFATACRCMP,''  );
      END IF; 
      IF NVL(:NEW.VRFATPERDCMP, 99999) <> NVL(:OLD.VRFATPERDCMP,999999) THEN
        V_DESC := NVL(V_DESC, '') || ' ' || 'VRFATPERDCMP' || '' || NVL(:NEW.VRFATPERDCMP,''  );
      END IF;  
      IF NVL(:NEW.VRPELIARRCMP, 99999) <> NVL(:OLD.VRPELIARRCMP,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'VRPELIARRCMP' || '' || NVL(:NEW.VRPELIARRCMP,''  );
      END IF;
      IF NVL(:NEW.VRPELSARRCMP, 99999) <> NVL(:OLD.VRPELSARRCMP,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'VRPELSARRCMP' || '' || NVL(:NEW.VRPELSARRCMP,''  );
      END IF;
      IF NVL(:NEW.CDNATUPROD,'NULL') <> NVL(:OLD.CDNATUPROD,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDNATUPROD' || '' || NVL(:NEW.CDNATUPROD,''  );
      END IF; 
      IF NVL(:NEW.QTCONTRPROVA, 99999) <> NVL(:OLD.QTCONTRPROVA,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'QTCONTRPROVA' || '' || NVL(:NEW.QTCONTRPROVA,''  );
      END IF;  
      IF NVL(:NEW.VRDOSEMINIMA, 99999) <> NVL(:OLD.VRDOSEMINIMA,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'VRDOSEMINIMA' || '' || NVL(:NEW.VRDOSEMINIMA,''  );
      END IF;  
      IF NVL(:NEW.VRDOSEMAXIMA, 99999) <> NVL(:OLD.VRDOSEMAXIMA,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'VRDOSEMAXIMA' || '' || NVL(:NEW.VRDOSEMAXIMA,''  );
      END IF;
      IF NVL(:NEW.NRDIASVALIDA, 99999) <> NVL(:OLD.NRDIASVALIDA,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'NRDIASVALIDA' || '' || NVL(:NEW.NRDIASVALIDA,''  );
      END IF;  
      IF NVL(:NEW.VRDENSIDADE, 99999) <> NVL(:OLD.VRDENSIDADE,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'VRDENSIDADE' || '' || NVL(:NEW.VRDENSIDADE,''  );
      END IF;  
      IF NVL(:NEW.VRVOLMED, 99999) <> NVL(:OLD.VRVOLMED,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'VRVOLMED' || '' || NVL(:NEW.VRVOLMED,''  );
      END IF;   
      IF NVL(:NEW.VRFATSEG, 99999) <> NVL(:OLD.VRFATSEG,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'VRFATSEG' || '' || NVL(:NEW.VRFATSEG,''  );
      END IF; 
      IF NVL(:NEW.CDGENERO,'NULL') <> NVL(:OLD.CDGENERO,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDGENERO' || '' || NVL(:NEW.CDGENERO,''  );
      END IF; 
      IF NVL(:NEW.CDAREACON,'NULL') <> NVL(:OLD.CDAREACON,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDAREACON' || '' || NVL(:NEW.CDAREACON,''  );
      END IF; 
      IF NVL(:NEW.CDIDIOM,'NULL') <> NVL(:OLD.CDIDIOM,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDIDIOM' || '' || NVL(:NEW.CDIDIOM,''  );
      END IF; 
      IF NVL(:NEW.CDFABRIC,'NULL') <> NVL(:OLD.CDFABRIC,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDFABRIC' || '' || NVL(:NEW.CDFABRIC,''  );
      END IF;  
      IF NVL(:NEW.DSUNIDCOBR,'NULL') <> NVL(:OLD.DSUNIDCOBR,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'DSUNIDCOBR' || '' || NVL(:NEW.DSUNIDCOBR,''  );
      END IF;   
      IF NVL(:NEW.CDNASCDESP,'NULL') <> NVL(:OLD.CDNASCDESP,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDNASCDESP' || '' || NVL(:NEW.CDNASCDESP,''  );
      END IF;   
      IF NVL(:NEW.CDNACDESHOSP,'NULL') <> NVL(:OLD.CDNACDESHOSP,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDNACDESHOSP' || '' || NVL(:NEW.CDNACDESHOSP,''  );
      END IF;  
      IF NVL(:NEW.VRFATIMPPREC, 99999) <> NVL(:OLD.VRFATIMPPREC,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'VRFATIMPPREC' || '' || NVL(:NEW.VRFATIMPPREC,''  );
      END IF;
      IF NVL(:NEW.CDARVPROD,'NULL') <> NVL(:OLD.CDARVPROD,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDARVPROD' || '' || NVL(:NEW.CDARVPROD,''  );
      END IF;  
      IF NVL(:NEW.IDPRODPROD,'NULL') <> NVL(:OLD.IDPRODPROD,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDPRODPROD' || '' || NVL(:NEW.IDPRODPROD,''  );
      END IF; 
      IF NVL(:NEW.CDPRODPROD,'NULL') <> NVL(:OLD.CDPRODPROD,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDPRODPROD' || '' || NVL(:NEW.CDPRODPROD,''  );
      END IF; 
      IF NVL(:NEW.VRFATOCONVPR, 99999) <> NVL(:OLD.VRFATOCONVPR,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'VRFATOCONVPR' || '' || NVL(:NEW.VRFATOCONVPR,''  );
      END IF;
      IF NVL(:NEW.CDVIACESDIET,'NULL') <> NVL(:OLD.CDVIACESDIET,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDVIACESDIET' || '' || NVL(:NEW.CDVIACESDIET,''  );
      END IF;
      IF NVL(:NEW.CDCLATERAP,'NULL') <> NVL(:OLD.CDCLATERAP,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDCLATERAP' || '' || NVL(:NEW.CDCLATERAP,''  );
      END IF;
      IF NVL(:NEW.NRREGIPROD,'NULL') <> NVL(:OLD.NRREGIPROD,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'NRREGIPROD' || '' || NVL(:NEW.NRREGIPROD,''  );
      END IF;
      IF NVL(:NEW.NRDIASVALANA, 99999) <> NVL(:OLD.NRDIASVALANA,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'NRDIASVALANA' || '' || NVL(:NEW.NRDIASVALANA,''  );
      END IF;
      IF NVL(:NEW.VRPESOBRUTPR, 99999) <> NVL(:OLD.VRPESOBRUTPR,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'VRPESOBRUTPR' || '' || NVL(:NEW.VRPESOBRUTPR,''  );
      END IF;
      IF NVL(:NEW.VRPESOLIQUPR, 99999) <> NVL(:OLD.VRPESOLIQUPR,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'VRPESOLIQUPR' || '' || NVL(:NEW.VRPESOLIQUPR,''  );
      END IF;
      IF NVL(:NEW.CDCTBLENTRPR,'NULL') <> NVL(:OLD.CDCTBLENTRPR,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDCTBLENTRPR' || '' || NVL(:NEW.CDCTBLENTRPR,''  );
      END IF;
      IF NVL(:NEW.CDCTBLSAIDPR,'NULL') <> NVL(:OLD.CDCTBLSAIDPR,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDCTBLSAIDPR' || '' || NVL(:NEW.CDCTBLSAIDPR,''  );
      END IF;
      IF NVL(:NEW.CDCTBLPRODPR,'NULL') <> NVL(:OLD.CDCTBLPRODPR,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDCTBLPRODPR' || '' || NVL(:NEW.CDCTBLPRODPR,''  );
      END IF;   
      IF NVL(:NEW.CDCTBLCPROPR,'NULL') <> NVL(:OLD.CDCTBLCPROPR,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDCTBLCPROPR' || '' || NVL(:NEW.CDCTBLCPROPR,''  );
      END IF;
      IF NVL(:NEW.CDCTBLAJUSPR,'NULL') <> NVL(:OLD.CDCTBLAJUSPR,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDCTBLAJUSPR' || '' || NVL(:NEW.CDCTBLAJUSPR,''  );
      END IF;
      IF NVL(:NEW.CDCTBLIMPLPR,'NULL') <> NVL(:OLD.CDCTBLIMPLPR,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDCTBLIMPLPR' || '' || NVL(:NEW.CDCTBLIMPLPR,''  );
      END IF;
      IF NVL(:NEW.CDCTBLPRACPR,'NULL') <> NVL(:OLD.CDCTBLPRACPR,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDCTBLPRACPR' || '' || NVL(:NEW.CDCTBLPRACPR,''  );
      END IF;
      IF NVL(:NEW.NRDIARESEPRO, 99999) <> NVL(:OLD.NRDIARESEPRO,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'NRDIARESEPRO' || '' || NVL(:NEW.NRDIARESEPRO,''  );
      END IF; 
      IF NVL(:NEW.NRDIAEMPRPRO, 99999) <> NVL(:OLD.NRDIAEMPRPRO,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'NRDIAEMPRPRO' || '' || NVL(:NEW.NRDIAEMPRPRO,''  );
      END IF;  
      IF NVL(:NEW.CDTPINDICE,'NULL') <> NVL(:OLD.CDTPINDICE,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDTPINDICE' || '' || NVL(:NEW.CDTPINDICE,''  );
      END IF; 
      IF NVL(:NEW.IDPERVALOR,'NULL') <> NVL(:OLD.IDPERVALOR,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDPERVALOR' || '' || NVL(:NEW.IDPERVALOR,''  );
      END IF;   
      IF NVL(:NEW.CDINDICE,'NULL') <> NVL(:OLD.CDINDICE,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDINDICE' || '' || NVL(:NEW.CDINDICE,''  );
      END IF;   
      IF NVL(:NEW.DSREFBIBPROD,'NULL') <> NVL(:OLD.DSREFBIBPROD,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'DSREFBIBPROD' || '' || NVL(:NEW.DSREFBIBPROD,''  );
      END IF;  
      IF NVL(:NEW.CDPRODNCM,'NULL') <> NVL(:OLD.CDPRODNCM,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDPRODNCM' || '' || NVL(:NEW.CDPRODNCM,''  );
      END IF;  
      IF NVL(:NEW.CDCIA,'NULL') <> NVL(:OLD.CDCIA,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDCIA' || '' || NVL(:NEW.CDCIA,''  );
      END IF; 
      IF NVL(:NEW.CDPADSERV,'NULL') <> NVL(:OLD.CDPADSERV,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDPADSERV' || '' || NVL(:NEW.CDPADSERV,''  );
      END IF; 
      IF NVL(:NEW.IDSERVESP,'NULL') <> NVL(:OLD.IDSERVESP,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDSERVESP' || '' || NVL(:NEW.IDSERVESP,''  );
      END IF; 
      IF NVL(:NEW.CDEXTSERV,'NULL') <> NVL(:OLD.CDEXTSERV,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDEXTSERV' || '' || NVL(:NEW.CDEXTSERV,''  );
      END IF; 
      IF NVL(:NEW.DSEXTSERV,'NULL') <> NVL(:OLD.DSEXTSERV,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'DSEXTSERV' || '' || NVL(:NEW.DSEXTSERV,''  );
      END IF;   
      IF NVL(:NEW.TXCOMENTSERV,'NULL') <> NVL(:OLD.TXCOMENTSERV,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'TXCOMENTSERV' || '' || NVL(:NEW.TXCOMENTSERV,''  );
      END IF; 
      IF NVL(:NEW.IDSERVICO,'NULL') <> NVL(:OLD.IDSERVICO,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDSERVICO' || '' || NVL(:NEW.IDSERVICO,''  );
      END IF; 
      IF NVL(:NEW.IDFATSERV,'NULL') <> NVL(:OLD.IDFATSERV,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDFATSERV' || '' || NVL(:NEW.IDFATSERV,''  );
      END IF;  
      IF NVL(:NEW.IDTPPRECO,'NULL') <> NVL(:OLD.IDTPPRECO,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDTPPRECO' || '' || NVL(:NEW.IDTPPRECO,''  );
      END IF;  
      IF NVL(:NEW.IDPRODCOMISS,'NULL') <> NVL(:OLD.IDPRODCOMISS,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDPRODCOMISS' || '' || NVL(:NEW.IDPRODCOMISS,''  );
      END IF;   
      IF NVL(:NEW.IDNACPRODUTO,'NULL') <> NVL(:OLD.IDNACPRODUTO,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDNACPRODUTO' || '' || NVL(:NEW.IDNACPRODUTO,''  );
      END IF;    
      IF NVL(:NEW.CDCLASSE,'NULL') <> NVL(:OLD.CDCLASSE,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDCLASSE' || '' || NVL(:NEW.CDCLASSE,''  );
      END IF;   
      IF NVL(:NEW.CDCICLO,'NULL') <> NVL(:OLD.CDCICLO,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDCICLO' || '' || NVL(:NEW.CDCICLO,''  );
      END IF; 
      IF NVL(:NEW.CDPRODFATURA,'NULL') <> NVL(:OLD.CDPRODFATURA,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDPRODFATURA' || '' || NVL(:NEW.CDPRODFATURA,''  );
      END IF;   
      IF NVL(:NEW.NMFOTOPROD,'NULL') <> NVL(:OLD.NMFOTOPROD,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'NMFOTOPROD' || '' || NVL(:NEW.NMFOTOPROD,''  );
      END IF;     
      IF NVL(:NEW.IDDIASVALIDA,'NULL') <> NVL(:OLD.IDDIASVALIDA,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDDIASVALIDA' || '' || NVL(:NEW.IDDIASVALIDA,''  );
      END IF;  
      IF NVL(:NEW.VRPEDIFEREXP, 99999) <> NVL(:OLD.VRPEDIFEREXP,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'VRPEDIFEREXP' || '' || NVL(:NEW.VRPEDIFEREXP,''  );
      END IF;   
      IF NVL(:NEW.IDCTRVERSAO,'NULL') <> NVL(:OLD.IDCTRVERSAO,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDCTRVERSAO' || '' || NVL(:NEW.IDCTRVERSAO,''  );
      END IF;    
      IF NVL(:NEW.DSDIRBASEVER,'NULL') <> NVL(:OLD.DSDIRBASEVER,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'DSDIRBASEVER' || '' || NVL(:NEW.DSDIRBASEVER,''  );
      END IF;  
      IF NVL(:NEW.DSDIRVSS,'NULL') <> NVL(:OLD.DSDIRVSS,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'DSDIRVSS' || '' || NVL(:NEW.DSDIRVSS,''  );
      END IF;    
      IF NVL(:NEW.DSDIRARQHOMO,'NULL') <> NVL(:OLD.DSDIRARQHOMO,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'DSDIRARQHOMO' || '' || NVL(:NEW.DSDIRARQHOMO,''  );
      END IF; 
      IF NVL(:NEW.DSSUBGRUPROD,'NULL') <> NVL(:OLD.DSSUBGRUPROD,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'DSSUBGRUPROD' || '' || NVL(:NEW.DSSUBGRUPROD,''  );
      END IF; 
      IF NVL(:NEW.CDGRTOTAPROD,'NULL') <> NVL(:OLD.CDGRTOTAPROD,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDGRTOTAPROD' || '' || NVL(:NEW.CDGRTOTAPROD,''  );
      END IF;   
      IF NVL(:NEW.CDFORMORCA,'NULL') <> NVL(:OLD.CDFORMORCA,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDFORMORCA' || '' || NVL(:NEW.CDFORMORCA,''  );
      END IF;  
      IF NVL(:NEW.IDTIPOMARKUP,'NULL') <> NVL(:OLD.IDTIPOMARKUP,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDTIPOMARKUP' || '' || NVL(:NEW.IDTIPOMARKUP,''  );
      END IF;   
      IF NVL(:NEW.VRARREDEMPPR, 99999) <> NVL(:OLD.VRARREDEMPPR,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'VRARREDEMPPR' || '' || NVL(:NEW.VRARREDEMPPR,''  );
      END IF;
      IF NVL(:NEW.IDPRODBLOQ,'NULL') <> NVL(:OLD.IDPRODBLOQ,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDPRODBLOQ' || '' || NVL(:NEW.IDPRODBLOQ,''  );
      END IF;    
      IF NVL(:NEW.CDGENPROD,'NULL') <> NVL(:OLD.CDGENPROD,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDGENPROD' || '' || NVL(:NEW.CDGENPROD,''  );
      END IF;  
      IF NVL(:NEW.CDFILIPEDORC,'NULL') <> NVL(:OLD.CDFILIPEDORC,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDFILIPEDORC' || '' || NVL(:NEW.CDFILIPEDORC,''  );
      END IF;   
      IF NVL(:NEW.CDDEPTPEDORC,'NULL') <> NVL(:OLD.CDDEPTPEDORC,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDDEPTPEDORC' || '' || NVL(:NEW.CDDEPTPEDORC,''  );
      END IF;  
      IF NVL(:NEW.IDPRCMPATIVO,'NULL') <> NVL(:OLD.IDPRCMPATIVO,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDPRCMPATIVO' || '' || NVL(:NEW.IDPRCMPATIVO,''  );
      END IF;    
      IF NVL(:NEW.HRLIMPRODORE,'NULL') <> NVL(:OLD.HRLIMPRODORE,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'HRLIMPRODORE' || '' || NVL(:NEW.HRLIMPRODORE,''  );
      END IF; 
      IF NVL(:NEW.IDIMPPRODORE,'NULL') <> NVL(:OLD.IDIMPPRODORE,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDIMPPRODORE' || '' || NVL(:NEW.IDIMPPRODORE,''  );
      END IF;    
      IF NVL(:NEW.CDEQUIPERESP,'NULL') <> NVL(:OLD.CDEQUIPERESP,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDEQUIPERESP' || '' || NVL(:NEW.CDEQUIPERESP,''  );
      END IF; 
      IF NVL(:NEW.IDSEGMENTOPROD,'NULL') <> NVL(:OLD.IDSEGMENTOPROD,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDSEGMENTOPROD' || '' || NVL(:NEW.IDSEGMENTOPROD,''  );
      END IF;    
      IF NVL(:NEW.CDPRODNIVANTE,'NULL') <> NVL(:OLD.CDPRODNIVANTE,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDPRODNIVANTE' || '' || NVL(:NEW.CDPRODNIVANTE,''  );
      END IF;   
      IF NVL(:NEW.IDTIPOCOMPPROD,'NULL') <> NVL(:OLD.IDTIPOCOMPPROD,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDTIPOCOMPPROD' || '' || NVL(:NEW.IDTIPOCOMPPROD,''  );
      END IF;   
      IF NVL(:NEW.VRYELDRECEPROD, 99999) <> NVL(:OLD.VRYELDRECEPROD,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'VRYELDRECEPROD' || '' || NVL(:NEW.VRYELDRECEPROD,''  );
      END IF;   
      IF NVL(:NEW.QTTEMPRECEPROD, 99999) <> NVL(:OLD.QTTEMPRECEPROD,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'QTTEMPRECEPROD' || '' || NVL(:NEW.QTTEMPRECEPROD,''  );
      END IF;   
      IF NVL(:NEW.VRVOLUMEPROD, 99999) <> NVL(:OLD.VRVOLUMEPROD,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'VRVOLUMEPROD' || '' || NVL(:NEW.VRVOLUMEPROD,''  );
      END IF; 
      IF NVL(:NEW.DTINIVGPROMOC,TO_DATE('01/01/0001','DD/MM/YYYY')) <> NVL(:OLD.DTINIVGPROMOC,TO_DATE('01/01/0001','DD/MM/YYYY')) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'DTINIVGPROMOC' || '' || NVL(:NEW.DTINIVGPROMOC,'');
      END IF;          
      IF NVL(:NEW.DTFINVGPROMOC,TO_DATE('01/01/0001','DD/MM/YYYY')) <> NVL(:OLD.DTFINVGPROMOC,TO_DATE('01/01/0001','DD/MM/YYYY')) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'DTFINVGPROMOC' || '' || NVL(:NEW.DTFINVGPROMOC,'');
      END IF;         
      IF NVL(:NEW.IDARREDTRUNC,'NULL') <> NVL(:OLD.IDARREDTRUNC,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDARREDTRUNC' || '' || NVL(:NEW.IDARREDTRUNC,''  );
      END IF; 
      IF NVL(:NEW.IDPRODPROPTERC,'NULL') <> NVL(:OLD.IDPRODPROPTERC,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDPRODPROPTERC' || '' || NVL(:NEW.IDPRODPROPTERC,''  );
      END IF;   
      IF NVL(:NEW.CDCLASSPROD,'NULL') <> NVL(:OLD.CDCLASSPROD,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDCLASSPROD' || '' || NVL(:NEW.CDCLASSPROD,''  );
      END IF;   
      IF NVL(:NEW.QTDIAVALPRODVND,'NULL') <> NVL(:OLD.QTDIAVALPRODVND,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'QTDIAVALPRODVND' || '' || NVL(:NEW.QTDIAVALPRODVND,''  );
      END IF;   
      IF NVL(:NEW.DSINFADIPRODVND,'NULL') <> NVL(:OLD.DSINFADIPRODVND,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'DSINFADIPRODVND' || '' || NVL(:NEW.DSINFADIPRODVND,''  );
      END IF; 
      IF NVL(:NEW.DSDADOSFORNVND,'NULL') <> NVL(:OLD.DSDADOSFORNVND,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'DSDADOSFORNVND' || '' || NVL(:NEW.DSDADOSFORNVND,''  );
      END IF; 
      IF NVL(:NEW.QTPORCAOVND,'NULL') <> NVL(:OLD.QTPORCAOVND,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'QTPORCAOVND' || '' || NVL(:NEW.QTPORCAOVND,''  );
      END IF; 
      IF NVL(:NEW.IDUNPORCAOVND,'NULL') <> NVL(:OLD.IDUNPORCAOVND,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDUNPORCAOVND' || '' || NVL(:NEW.IDUNPORCAOVND,''  );
      END IF; 
      IF NVL(:NEW.IDPADEMEDCASVND,'NULL') <> NVL(:OLD.IDPADEMEDCASVND,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDPADEMEDCASVND' || '' || NVL(:NEW.IDPADEMEDCASVND,''  );
      END IF;   
      IF NVL(:NEW.QTMEDCASVND,'NULL') <> NVL(:OLD.QTMEDCASVND,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'QTMEDCASVND' || '' || NVL(:NEW.QTMEDCASVND,''  );
      END IF;   
      IF NVL(:NEW.IDTIPOMEDCASVND,'NULL') <> NVL(:OLD.IDTIPOMEDCASVND,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDTIPOMEDCASVND' || '' || NVL(:NEW.IDTIPOMEDCASVND,''  );
      END IF;  
      IF NVL(:NEW.IDSITUPROD,'NULL') <> NVL(:OLD.IDSITUPROD,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDSITUPROD' || '' || NVL(:NEW.IDSITUPROD,''  );
      END IF;  
      IF NVL(:NEW.IDPRODCONTRSUBV,'NULL') <> NVL(:OLD.IDPRODCONTRSUBV,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDPRODCONTRSUBV' || '' || NVL(:NEW.IDPRODCONTRSUBV,''  );
      END IF; 
      IF NVL(:NEW.DSDIRPREHOMOPR,'NULL') <> NVL(:OLD.DSDIRPREHOMOPR,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'DSDIRPREHOMOPR' || '' || NVL(:NEW.DSDIRPREHOMOPR,''  );
      END IF; 
      IF NVL(:NEW.DSDIRSUBVHOMOPR,'NULL') <> NVL(:OLD.DSDIRSUBVHOMOPR,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'DSDIRSUBVHOMOPR' || '' || NVL(:NEW.DSDIRSUBVHOMOPR,''  );
      END IF; 
      IF NVL(:NEW.DSDIRBASEVERHOM,'NULL') <> NVL(:OLD.DSDIRBASEVERHOM,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'DSDIRBASEVERHOM' || '' || NVL(:NEW.DSDIRBASEVERHOM,''  );
      END IF; 
      IF NVL(:NEW.CDPRODREPLICSVN,'NULL') <> NVL(:OLD.CDPRODREPLICSVN,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDPRODREPLICSVN' || '' || NVL(:NEW.CDPRODREPLICSVN,''  );
      END IF; 
      IF NVL(:NEW.DSDIRHOMOLDES,'NULL') <> NVL(:OLD.DSDIRHOMOLDES,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'DSDIRHOMOLDES' || '' || NVL(:NEW.DSDIRHOMOLDES,''  );
      END IF; 
      IF NVL(:NEW.IDORIGPRODPR,'NULL') <> NVL(:OLD.IDORIGPRODPR,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDORIGPRODPR' || '' || NVL(:NEW.IDORIGPRODPR,''  );
      END IF; 
      IF NVL(:NEW.CDLIVROMAG,'NULL') <> NVL(:OLD.CDLIVROMAG,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDLIVROMAG' || '' || NVL(:NEW.CDLIVROMAG,''  );
      END IF; 
      IF NVL(:NEW.CDTPITEMPROD,'NULL') <> NVL(:OLD.CDTPITEMPROD,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDTPITEMPROD' || '' || NVL(:NEW.CDTPITEMPROD,''  );
      END IF;    
      IF NVL(:NEW.VRPEDESCPRODORC, 99999) <> NVL(:OLD.VRPEDESCPRODORC,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'VRPEDESCPRODORC' || '' || NVL(:NEW.VRPEDESCPRODORC,''  );
      END IF;
      IF NVL(:NEW.IDTIPORETIORE,'NULL') <> NVL(:OLD.IDTIPORETIORE,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDTIPORETIORE' || '' || NVL(:NEW.IDTIPORETIORE,''  );
      END IF;  
      IF NVL(:NEW.IDRETISEMESTORE,'NULL') <> NVL(:OLD.IDRETISEMESTORE,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDRETISEMESTORE' || '' || NVL(:NEW.IDRETISEMESTORE,''  );
      END IF; 
      IF NVL(:NEW.CDPRODMOVCPC,'NULL') <> NVL(:OLD.CDPRODMOVCPC,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDPRODMOVCPC' || '' || NVL(:NEW.CDPRODMOVCPC,''  );
      END IF; 
      IF NVL(:NEW.DTATUPRODSUBVER,TO_DATE('01/01/0001','DD/MM/YYYY')) <> NVL(:OLD.DTATUPRODSUBVER,TO_DATE('01/01/0001','DD/MM/YYYY')) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'DTATUPRODSUBVER' || '' || NVL(:NEW.DTATUPRODSUBVER,'');
      END IF;         
      IF NVL(:NEW.VRFATARREDQTORE, 99999) <> NVL(:OLD.VRFATARREDQTORE,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'VRFATARREDQTORE' || '' || NVL(:NEW.VRFATARREDQTORE,''  );
      END IF;  
      IF NVL(:NEW.VRPEARRINFQTORE, 99999) <> NVL(:OLD.VRPEARRINFQTORE,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'VRPEARRINFQTORE' || '' || NVL(:NEW.VRPEARRINFQTORE,''  );
      END IF; 
      IF NVL(:NEW.NMFANTPRODUTO,'NULL') <> NVL(:OLD.NMFANTPRODUTO,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'NMFANTPRODUTO' || '' || NVL(:NEW.NMFANTPRODUTO,''  );
      END IF; 
      IF NVL(:NEW.IDFATURAPRODORE,'NULL') <> NVL(:OLD.IDFATURAPRODORE,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDFATURAPRODORE' || '' || NVL(:NEW.IDFATURAPRODORE,''  );
      END IF; 
      IF NVL(:NEW.IDIMCOMPOSPRORE,'NULL') <> NVL(:OLD.IDIMCOMPOSPRORE,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDIMCOMPOSPRORE' || '' || NVL(:NEW.IDIMCOMPOSPRORE,''  );
      END IF; 
      IF NVL(:NEW.IDTIPOPRODOREV,'NULL') <> NVL(:OLD.IDTIPOPRODOREV,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDTIPOPRODOREV' || '' || NVL(:NEW.IDTIPOPRODOREV,''  );
      END IF; 
      IF NVL(:NEW.CDCSTDIG1PROD,'NULL') <> NVL(:OLD.CDCSTDIG1PROD,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDCSTDIG1PROD' || '' || NVL(:NEW.CDCSTDIG1PROD,''  );
      END IF;  
      IF NVL(:NEW.IDPRODUSOCONS,'NULL') <> NVL(:OLD.IDPRODUSOCONS,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDPRODUSOCONS' || '' || NVL(:NEW.IDPRODUSOCONS,''  );
      END IF; 
      IF NVL(:NEW.DSPROPNUTRI,'NULL') <> NVL(:OLD.DSPROPNUTRI,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'DSPROPNUTRI' || '' || NVL(:NEW.DSPROPNUTRI,''  );
      END IF; 
      IF NVL(:NEW.IDGERREVPROCFA,'NULL') <> NVL(:OLD.IDGERREVPROCFA,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDGERREVPROCFA' || '' || NVL(:NEW.IDGERREVPROCFA,''  );
      END IF;   
      IF NVL(:NEW.IDGERACOMISOREV,'NULL') <> NVL(:OLD.IDGERACOMISOREV,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDGERACOMISOREV' || '' || NVL(:NEW.IDGERACOMISOREV,''  );
      END IF;  
      IF NVL(:NEW.DTEXPPRODSAGA,TO_DATE('01/01/0001','DD/MM/YYYY')) <> NVL(:OLD.DTEXPPRODSAGA,TO_DATE('01/01/0001','DD/MM/YYYY')) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'DTEXPPRODSAGA' || '' || NVL(:NEW.DTEXPPRODSAGA,'');
      END IF;
      IF NVL(:NEW.QTVOLUMES, 99999) <> NVL(:OLD.QTVOLUMES,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'QTVOLUMES' || '' || NVL(:NEW.QTVOLUMES,''  );
      END IF;   
      IF NVL(:NEW.QTPROPVOLUME, 99999) <> NVL(:OLD.QTPROPVOLUME,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'QTPROPVOLUME' || '' || NVL(:NEW.QTPROPVOLUME,''  );
      END IF;    
      IF NVL(:NEW.IDTEMNUTRIENTE,'NULL') <> NVL(:OLD.IDTEMNUTRIENTE,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDTEMNUTRIENTE' || '' || NVL(:NEW.IDTEMNUTRIENTE,''  );
      END IF; 
      IF NVL(:NEW.IDALTERANUTR,'NULL') <> NVL(:OLD.IDALTERANUTR,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDALTERANUTR' || '' || NVL(:NEW.IDALTERANUTR,''  );
      END IF; 
      IF NVL(:NEW.DTATUALNUTR,TO_DATE('01/01/0001','DD/MM/YYYY')) <> NVL(:OLD.DTATUALNUTR,TO_DATE('01/01/0001','DD/MM/YYYY')) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'DTATUALNUTR' || '' || NVL(:NEW.DTATUALNUTR,'');
      END IF;          
      IF NVL(:NEW.DSOBSNUTR,'NULL') <> NVL(:OLD.DSOBSNUTR,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'DSOBSNUTR' || '' || NVL(:NEW.DSOBSNUTR,''  );
      END IF; 
      IF NVL(:NEW.VRCAPEMBALAG, 99999) <> NVL(:OLD.VRCAPEMBALAG,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'VRCAPEMBALAG' || '' || NVL(:NEW.VRCAPEMBALAG,''  );
      END IF;  
      IF NVL(:NEW.VRVALIDPROD, 99999) <> NVL(:OLD.VRVALIDPROD,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'VRVALIDPROD' || '' || NVL(:NEW.VRVALIDPROD,''  );
      END IF;
      IF NVL(:NEW.IDGERETIQPROD,'NULL') <> NVL(:OLD.IDGERETIQPROD,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDGERETIQPROD' || '' || NVL(:NEW.IDGERETIQPROD,''  );
      END IF;    
      IF NVL(:NEW.VRQTDEMB, 99999) <> NVL(:OLD.VRQTDEMB,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'VRQTDEMB' || '' || NVL(:NEW.VRQTDEMB,''  );
      END IF;
      IF NVL(:NEW.SGUNIDEMB,'NULL') <> NVL(:OLD.SGUNIDEMB,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'SGUNIDEMB' || '' || NVL(:NEW.SGUNIDEMB,''  );
      END IF; 
      IF NVL(:NEW.DTINATIVAPROD,TO_DATE('01/01/0001','DD/MM/YYYY')) <> NVL(:OLD.DTINATIVAPROD,TO_DATE('01/01/0001','DD/MM/YYYY')) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'DTINATIVAPROD' || '' || NVL(:NEW.DTINATIVAPROD,'');
      END IF;          
      IF NVL(:NEW.CDOPERINATPR,'NULL') <> NVL(:OLD.CDOPERINATPR,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDOPERINATPR' || '' || NVL(:NEW.CDOPERINATPR,''  );
      END IF; 
      IF NVL(:NEW.CDHISTPADR,'NULL') <> NVL(:OLD.CDHISTPADR,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDHISTPADR' || '' || NVL(:NEW.CDHISTPADR,''  );
      END IF; 
      IF NVL(:NEW.DTCUSTOREC,TO_DATE('01/01/0001','DD/MM/YYYY')) <> NVL(:OLD.DTCUSTOREC,TO_DATE('01/01/0001','DD/MM/YYYY')) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'DTCUSTOREC' || '' || NVL(:NEW.DTCUSTOREC,'');
      END IF;                    
      IF NVL(:NEW.IDTPCUSTOREC, 99999) <> NVL(:OLD.IDTPCUSTOREC,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDTPCUSTOREC' || '' || NVL(:NEW.IDTPCUSTOREC,''  );
      END IF;
      IF NVL(:NEW.CDPRATOPROD,'NULL') <> NVL(:OLD.CDPRATOPROD,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDPRATOPROD' || '' || NVL(:NEW.CDPRATOPROD,''  );  
      END IF; 
      IF NVL(:NEW.CDFILPRATOPROD,'NULL') <> NVL(:OLD.CDFILPRATOPROD,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDFILPRATOPROD' || '' || NVL(:NEW.CDFILPRATOPROD,''  );
      END IF; 
      IF NVL(:NEW.CDLEANCODE,'NULL') <> NVL(:OLD.CDLEANCODE,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDLEANCODE' || '' || NVL(:NEW.CDLEANCODE,''  );
      END IF; 
      IF NVL(:NEW.NMFANTPROD,'NULL') <> NVL(:OLD.NMFANTPROD,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'NMFANTPROD' || '' || NVL(:NEW.NMFANTPROD,''  );
      END IF; 
      IF NVL(:NEW.CDCEST,'NULL') <> NVL(:OLD.CDCEST,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDCEST' || '' || NVL(:NEW.CDCEST,''  );
      END IF; 
      IF NVL(:NEW.IDTEOROBRIG,'NULL') <> NVL(:OLD.IDTEOROBRIG,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDTEOROBRIG' || '' || NVL(:NEW.IDTEOROBRIG,''  );
      END IF; 
      IF NVL(:NEW.CDINFOEXTRA,'NULL') <> NVL(:OLD.CDINFOEXTRA,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'CDINFOEXTRA' || '' || NVL(:NEW.CDINFOEXTRA,''  );
      END IF; 
      IF NVL(:NEW.IDFATVENDADEVOL,'NULL') <> NVL(:OLD.IDFATVENDADEVOL,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDFATVENDADEVOL' || '' || NVL(:NEW.IDFATVENDADEVOL,''  );
      END IF;  
      IF NVL(:NEW.IDCONTROLAREFIL,'NULL') <> NVL(:OLD.IDCONTROLAREFIL,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDCONTROLAREFIL' || '' || NVL(:NEW.IDCONTROLAREFIL,''  );
      END IF;  
      IF NVL(:NEW.VRMINCONSUMODEB, 99999) <> NVL(:OLD.VRMINCONSUMODEB,999999) THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'VRMINCONSUMODEB' || '' || NVL(:NEW.VRMINCONSUMODEB,''  );
      END IF; 
      IF NVL(:NEW.IDTPPRODDEBCONS,'NULL') <> NVL(:OLD.IDTPPRODDEBCONS,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDTPPRODDEBCONS' || '' || NVL(:NEW.IDTPPRODDEBCONS,''  );
      END IF; 
      IF NVL(:NEW.IDVDANALISE,'NULL') <> NVL(:OLD.IDVDANALISE,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDVDANALISE' || '' || NVL(:NEW.IDVDANALISE,''  );
      END IF; 
      IF NVL(:NEW.DSFORMULAVDANA,'NULL') <> NVL(:OLD.DSFORMULAVDANA,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'DSFORMULAVDANA' || '' || NVL(:NEW.DSFORMULAVDANA,''  );
      END IF; 
      IF NVL(:NEW.DSFORMULAVDRANA,'NULL') <> NVL(:OLD.DSFORMULAVDRANA,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'DSFORMULAVDRANA' || '' || NVL(:NEW.DSFORMULAVDRANA,''  );
      END IF; 
      IF NVL(:NEW.IDPRODPERIG,'NULL') <> NVL(:OLD.IDPRODPERIG,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'IDPRODPERIG' || '' || NVL(:NEW.IDPRODPERIG,''  );
      END IF;   
      IF NVL(:NEW.DSINFADICPROD,'NULL') <> NVL(:OLD.DSINFADICPROD,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'DSINFADICPROD' || '' || NVL(:NEW.DSINFADICPROD,''  );
      END IF; 
      IF NVL(:NEW.DTULTATUPROD,TO_DATE('01/01/0001','DD/MM/YYYY')) <> NVL(:OLD.DTULTATUPROD,TO_DATE('01/01/0001','DD/MM/YYYY')) THEN
         V_DESC := NVL(V_DESC, '') || ' ' || 'Data Ult Atualizacao ' || '' || NVL(:NEW.DTULTATUPROD,'');
      END IF;
      IF NVL(:NEW.DSPRODVENDA,'NULL') <> NVL(:OLD.DSPRODVENDA,'NULL') THEN
          V_DESC := NVL(V_DESC, '') || ' ' || 'DSPRODVENDA' || '' || NVL(:NEW.DSPRODVENDA,''  );
      END IF; 
      V_ITPESQ := :NEW.CDPRODUTO;
      V_IDTIPOOPER := '2';
   ELSE
      IF INSERTING THEN
         V_DESC   := 'Prod  '                || '' || NVL(:NEW.CDPRODUTO,   '') || ' ' ||
                     'Imprime Prin  '        || '' || NVL(:NEW.IDIMPPRODUTO,'') || ' ' ||
                     'Ativo  '               || '' || NVL(:NEW.IDPRODATIVPR,'') || ' ' ||
                     'Pesa  '                || '' || NVL(:NEW.IDPESAPROD,''  ) || ' ' ||
                     'Tara  '                || '' || NVL(:NEW.QTTARAPROD,''  ) || ' ' ||
                     'Cd Barra  '            || '' || NVL(:NEW.CDBARPRODUTO,'') || ' ' ||
                     'NmAbrev  '             || '' || NVL(:NEW.NMPRODIMPFIS,'') || ' ' ||
                     'Cobra Tx  '            || '' || NVL(:NEW.IDCOBTXSERV,'' ) || ' ' ||
                     'Grupo Prod Comb  '     || '' || NVL(:NEW.IDTIPOPROD,''  ) || ' ' ||
                     'Cd Teclado  ' 	     || '' || NVL(:NEW.CDPROTECLADO,'') || ' ' ||
                     'Imprime Prod  '        || '' || NVL(:NEW.IDIMPRODUVEZ,'') || ' ' ||
                     'Sol Local Imp  '       || '' || NVL(:NEW.IDSOLLOCIMP,'' ) || ' ' ||
                     'Data Ult Atualizacao ' || '' || NVL(:NEW.DTULTATUPROD,'') || ' ' ||
                     'DSPRODVENDA ' || '' || NVL(:NEW.DSPRODVENDA, '');
      V_ITPESQ := :NEW.CDPRODUTO;
      V_IDTIPOOPER := '1';
      ELSE
         IF DELETING THEN
            V_DESC   := 'Cod Prod '               || '' || NVL(:OLD.CDPRODUTO,''    )   || ' ' ||
                        'Data Ult Atualizacao ' || '' || NVL(:OLD.DTULTATUPROD,'') || ' ' ||
                         'DSPRODVENDA ' || '' || NVL(:OLD.DSPRODVENDA, '');
            V_ITPESQ := :OLD.CDPRODUTO;
            V_IDTIPOOPER := '3';
         END IF;
      END IF;
   END IF;
   V_DESC := SUBSTR(V_DESC, 1, 4000);
   INSERT INTO LOGOPERAVND
      (NMTABELAVND,
       DTOPERACAOVND,
       NMRESPOPERVND,
       IDTIPOOPERVND,
       DSOPERACAOVND,
       CDPESQITEMVND,
       DSRDMUSUOPERVND,
       DSENDUSUOPERVND,
       DSNMUSUOPERVND,
       DSMETUSUOPERVND,
       CDORESPOPERVND,
       CDFILLOGOPERVND)
   VALUES
      ('PRODUTO',
       SYSDATE,
       NVL(V_NMOPERADOR,' '),
       V_IDTIPOOPER,
       NVL(V_DESC,' '),
       V_ITPESQ,
       V_DSSERVERRDM,
       V_DSREMOTEADDR,
       V_DSREMOTEHOST,
       V_DSSERVMETHOD,
       V_DSREMOTEOPER,
       '');
END;
/