CREATE OR REPLACE TRIGGER LOG_PED_PARAMPEDIDO
AFTER DELETE OR INSERT OR UPDATE
ON PARAMPEDIDO 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(2000);
  V_ITPESQ       VARCHAR2(80);
  V_NMOPERADOR   VARCHAR2(40);
  V_IDTIPOOPER   VARCHAR2(1);
  V_CDFILLOGOPER VARCHAR2(4);
  V_TAM          INTEGER;

BEGIN
/* IDTIPOOPER - '1' - Inclusao, '2' - Alteracao, '3' - Exclusao*/

   V_DESC       := '';
   V_ITPESQ     := '';
   V_NMOPERADOR := '';
   V_IDTIPOOPER := '';
   V_CDFILLOGOPER := '';

   NMUSUARIO(V_NMOPERADOR);
   WEBTUNNING(V_DSREMOTEADDR,
              V_DSREMOTEHOST,
              V_DSSERVERRDM,
              V_DSSERVMETHOD,
              V_DSREMOTEOPER);

   IF INSERTING THEN

      IF :NEW.CDFILIAL IS NOT NULL THEN
         V_DESC := V_DESC || 'CDFILIAL= ' || NVL(:NEW.CDFILIAL,'') || ' ' ;
      END IF;

      IF :NEW.IDOBRTPOPPED IS NOT NULL THEN
         V_DESC := V_DESC || 'IDOBRTPOPPED= ' || NVL(:NEW.IDOBRTPOPPED,'') || ' ' ;
      END IF;

      IF :NEW.CDMODPGTO IS NOT NULL THEN
         V_DESC := V_DESC || 'CDMODPGTO= ' || NVL(:NEW.CDMODPGTO,'') || ' ' ;
      END IF;

      IF :NEW.CDVENDEDOR IS NOT NULL THEN
         V_DESC := V_DESC || 'CDVENDEDOR= ' || NVL(:NEW.CDVENDEDOR,'') || ' ' ;
      END IF;

      IF :NEW.IDTABPRECO IS NOT NULL THEN
         V_DESC := V_DESC || 'IDTABPRECO= ' || NVL(:NEW.IDTABPRECO,'') || ' ' ;
      END IF;

      IF :NEW.IDLANCPED IS NOT NULL THEN
         V_DESC := V_DESC || 'IDLANCPED= ' || NVL(:NEW.IDLANCPED,'') || ' ' ;
      END IF;

      IF :NEW.IDLANENCARGOPED IS NOT NULL THEN
         V_DESC := V_DESC || 'IDLANENCARGOPED= ' || NVL(:NEW.IDLANENCARGOPED,'') || ' ' ;
      END IF;

      IF :NEW.IDTESTAEST IS NOT NULL THEN
         V_DESC := V_DESC || 'IDTESTAEST= ' || NVL(:NEW.IDTESTAEST,'') || ' ' ;
      END IF;

      IF :NEW.NRDIASENTPED IS NOT NULL THEN
         V_DESC := V_DESC || 'NRDIASENTPED= ' || NVL(:NEW.NRDIASENTPED,'') || ' ' ;
      END IF;

      IF :NEW.IDOBRINFTRAN IS NOT NULL THEN
         V_DESC := V_DESC || 'IDOBRINFTRAN= ' || NVL(:NEW.IDOBRINFTRAN,'') || ' ' ;
      END IF;

      IF :NEW.CDOPERAPRO1 IS NOT NULL THEN
         V_DESC := V_DESC || 'CDOPERAPRO1= ' || NVL(:NEW.CDOPERAPRO1,'') || ' ' ;
      END IF;

      IF :NEW.CDOPERAPRO2 IS NOT NULL THEN
         V_DESC := V_DESC || 'CDOPERAPRO2= ' || NVL(:NEW.CDOPERAPRO2,'') || ' ' ;
      END IF;

      IF :NEW.IDSITUFINAN IS NOT NULL THEN
         V_DESC := V_DESC || 'IDSITUFINAN= ' || NVL(:NEW.IDSITUFINAN,'') || ' ' ;
      END IF;

      IF :NEW.CDGROPERAPRO IS NOT NULL THEN
         V_DESC := V_DESC || 'CDGROPERAPRO= ' || NVL(:NEW.CDGROPERAPRO,'') || ' ' ;
      END IF;

      IF :NEW.NRDIAPENDFIN IS NOT NULL THEN
         V_DESC := V_DESC || 'NRDIAPENDFIN= ' || NVL(:NEW.NRDIAPENDFIN,'') || ' ' ;
      END IF;

      IF :NEW.NRMAXITNFPED IS NOT NULL THEN
         V_DESC := V_DESC || 'NRMAXITNFPED= ' || NVL(:NEW.NRMAXITNFPED,'') || ' ' ;
      END IF;

      IF :NEW.IDEXIBPEDIDO IS NOT NULL THEN
         V_DESC := V_DESC || 'IDEXIBPEDIDO= ' || NVL(:NEW.IDEXIBPEDIDO,'') || ' ' ;
      END IF;

      IF :NEW.IDMENSVEND IS NOT NULL THEN
         V_DESC := V_DESC || 'IDMENSVEND= ' || NVL(:NEW.IDMENSVEND,'') || ' ' ;
      END IF;

      IF :NEW.IDPERALTPRECO IS NOT NULL THEN
         V_DESC := V_DESC || 'IDPERALTPRECO= ' || NVL(:NEW.IDPERALTPRECO,'') || ' ' ;
      END IF;

      IF :NEW.IDUTRESELOTE IS NOT NULL THEN
         V_DESC := V_DESC || 'IDUTRESELOTE= ' || NVL(:NEW.IDUTRESELOTE,'') || ' ' ;
      END IF;

      IF :NEW.CDGROPLIBINC IS NOT NULL THEN
         V_DESC := V_DESC || 'CDGROPLIBINC= ' || NVL(:NEW.CDGROPLIBINC,'') || ' ' ;
      END IF;

      IF :NEW.IDUTVALIPED IS NOT NULL THEN
         V_DESC := V_DESC || 'IDUTVALIPED= ' || NVL(:NEW.IDUTVALIPED,'') || ' ' ;
      END IF;

      IF :NEW.QTDIAVALIPED IS NOT NULL THEN
         V_DESC := V_DESC || 'QTDIAVALIPED= ' || NVL(:NEW.QTDIAVALIPED,'') || ' ' ;
      END IF;

      IF :NEW.IDUTDESCMAXI IS NOT NULL THEN
         V_DESC := V_DESC || 'IDUTDESCMAXI= ' || NVL(:NEW.IDUTDESCMAXI,'') || ' ' ;
      END IF;

      IF :NEW.IDEXCLPEDIDO IS NOT NULL THEN
         V_DESC := V_DESC || 'IDEXCLPEDIDO= ' || NVL(:NEW.IDEXCLPEDIDO,'') || ' ' ;
      END IF;

      IF :NEW.IDESTTODFIL IS NOT NULL THEN
         V_DESC := V_DESC || 'IDESTTODFIL= ' || NVL(:NEW.IDESTTODFIL,'') || ' ' ;
      END IF;

      IF :NEW.VRLIMAPROVA IS NOT NULL THEN
         V_DESC := V_DESC || 'VRLIMAPROVA= ' || NVL(:NEW.VRLIMAPROVA,'') || ' ' ;
      END IF;

      IF :NEW.IDENTRSAIDOP IS NOT NULL THEN
         V_DESC := V_DESC || 'IDENTRSAIDOP= ' || NVL(:NEW.IDENTRSAIDOP,'') || ' ' ;
      END IF;

      IF :NEW.CDTIPOOPER IS NOT NULL THEN
         V_DESC := V_DESC || 'CDTIPOOPER= ' || NVL(:NEW.CDTIPOOPER,'') || ' ' ;
      END IF;

      IF :NEW.CDCLIENTE IS NOT NULL THEN
         V_DESC := V_DESC || 'CDCLIENTE= ' || NVL(:NEW.CDCLIENTE,'') || ' ' ;
      END IF;

      IF :NEW.IDUTCTRELANP IS NOT NULL THEN
         V_DESC := V_DESC || 'IDUTCTRELANP= ' || NVL(:NEW.IDUTCTRELANP,'') || ' ' ;
      END IF;

      IF :NEW.IDTPCOMPPROD IS NOT NULL THEN
         V_DESC := V_DESC || 'IDTPCOMPPROD= ' || NVL(:NEW.IDTPCOMPPROD,'') || ' ' ;
      END IF;

      IF :NEW.IDEXIBIMPITPED IS NOT NULL THEN
         V_DESC := V_DESC || 'IDEXIBIMPITPED= ' || NVL(:NEW.IDEXIBIMPITPED,'') || ' ' ;
      END IF;

      IF :NEW.VRPERDIFCUSPREC IS NOT NULL THEN
         V_DESC := V_DESC || 'VRPERDIFCUSPREC= ' || NVL(:NEW.VRPERDIFCUSPREC,'') || ' ' ;
      END IF;

      IF :NEW.IDATUTABPRECINI IS NOT NULL THEN
         V_DESC := V_DESC || 'IDATUTABPRECINI= ' || NVL(:NEW.IDATUTABPRECINI,'') || ' ' ;
      END IF;

      IF :NEW.IDEXIBRENTPED IS NOT NULL THEN
         V_DESC := V_DESC || 'IDEXIBRENTPED= ' || NVL(:NEW.IDEXIBRENTPED,'') || ' ' ;
      END IF;

      IF :NEW.CDITFORPRECOPRO IS NOT NULL THEN
         V_DESC := V_DESC || 'CDITFORPRECOPRO= ' || NVL(:NEW.CDITFORPRECOPRO,'') || ' ' ;
      END IF;

      IF :NEW.IDEXIBPRINATIV IS NOT NULL THEN
         V_DESC := V_DESC || 'IDEXIBPRINATIV= ' || NVL(:NEW.IDEXIBPRINATIV,'') || ' ' ;
      END IF;

      IF :NEW.IDEXIBEPRAZOPED IS NOT NULL THEN
         V_DESC := V_DESC || 'IDEXIBEPRAZOPED= ' || NVL(:NEW.IDEXIBEPRAZOPED,'') || ' ' ;
      END IF;

      IF :NEW.IDTIPOPEDINC IS NOT NULL THEN
         V_DESC := V_DESC || 'IDTIPOPEDINC= ' || NVL(:NEW.IDTIPOPEDINC,'') || ' ' ;
      END IF;

      IF :NEW.IDEVOLESTLIQMAN IS NOT NULL THEN
         V_DESC := V_DESC || 'IDEVOLESTLIQMAN= ' || NVL(:NEW.IDEVOLESTLIQMAN,'') || ' ' ;
      END IF;

      IF :NEW.VRMINPEDIDO IS NOT NULL THEN
         V_DESC := V_DESC || 'VRMINPEDIDO= ' || NVL(:NEW.VRMINPEDIDO,'') || ' ' ;
      END IF;

      IF :NEW.VRSERVBANHO IS NOT NULL THEN
         V_DESC := V_DESC || 'VRSERVBANHO= ' || NVL(:NEW.VRSERVBANHO,'') || ' ' ;
      END IF;

      IF :NEW.IDGERAOPPEDIDO IS NOT NULL THEN
         V_DESC := V_DESC || 'IDGERAOPPEDIDO= ' || NVL(:NEW.IDGERAOPPEDIDO,'') || ' ' ;
      END IF;

      IF :NEW.IDENCARPRIPARC IS NOT NULL THEN
         V_DESC := V_DESC || 'IDENCARPRIPARC= ' || NVL(:NEW.IDENCARPRIPARC,'') || ' ' ;
      END IF;

      IF :NEW.IDALTFORMAPAG IS NOT NULL THEN
         V_DESC := V_DESC || 'IDALTFORMAPAG= ' || NVL(:NEW.IDALTFORMAPAG,'') || ' ' ;
      END IF;

      IF :NEW.DSPERALTMAIOR IS NOT NULL THEN
         V_DESC := V_DESC || 'DSPERALTMAIOR= ' || NVL(:NEW.DSPERALTMAIOR,'') || ' ' ;
      END IF;

      IF :NEW.DSPERALTMENOR IS NOT NULL THEN
         V_DESC := V_DESC || 'DSPERALTMENOR= ' || NVL(:NEW.DSPERALTMENOR,'') || ' ' ;
      END IF;

      IF :NEW.CDGRUALTPRECO IS NOT NULL THEN
         V_DESC := V_DESC || 'CDGRUALTPRECO= ' || NVL(:NEW.CDGRUALTPRECO,'') || ' ' ;
      END IF;

      IF :NEW.IDCONSESTGEROP IS NOT NULL THEN
         V_DESC := V_DESC || 'IDCONSESTGEROP= ' || NVL(:NEW.IDCONSESTGEROP,'') || ' ' ;
      END IF;

      IF :NEW.IDALTMODPAG IS NOT NULL THEN
         V_DESC := V_DESC || 'IDALTMODPAG= ' || NVL(:NEW.IDALTMODPAG,'') || ' ' ;
      END IF;

      IF :NEW.IDCALCPRECODIME IS NOT NULL THEN
         V_DESC := V_DESC || 'IDCALCPRECODIME= ' || NVL(:NEW.IDCALCPRECODIME,'') || ' ' ;
      END IF;

      IF :NEW.IDDIMEVARDESC IS NOT NULL THEN
         V_DESC := V_DESC || 'IDDIMEVARDESC= ' || NVL(:NEW.IDDIMEVARDESC,'') || ' ' ;
      END IF;

      IF :NEW.IDOBRDIMENSAO IS NOT NULL THEN
         V_DESC := V_DESC || 'IDOBRDIMENSAO= ' || NVL(:NEW.IDOBRDIMENSAO,'') || ' ' ;
      END IF;

      IF :NEW.IDUTENDEENTRPED IS NOT NULL THEN
         V_DESC := V_DESC || 'IDUTENDEENTRPED= ' || NVL(:NEW.IDUTENDEENTRPED,'') || ' ' ;
      END IF;

      IF :NEW.IDEXIBLOCALENTRCLI IS NOT NULL THEN
         V_DESC := V_DESC || 'IDEXIBLOCALENTRCLI= ' || NVL(:NEW.IDEXIBLOCALENTRCLI,'') || ' ' ;
      END IF;

      IF :NEW.IDUTFILIALDESTINO IS NOT NULL THEN
         V_DESC := V_DESC || 'IDUTFILIALDESTINO= ' || NVL(:NEW.IDUTFILIALDESTINO,'') || ' ' ;
      END IF;

      IF :NEW.IDCONFISPRODCLIE IS NOT NULL THEN
         V_DESC := V_DESC || 'IDCONFISPRODCLIE= ' || NVL(:NEW.IDCONFISPRODCLIE,'') || ' ' ;
      END IF;

      IF :NEW.IDCONFISPRODFIL IS NOT NULL THEN
         V_DESC := V_DESC || 'IDCONFISPRODFIL= ' || NVL(:NEW.IDCONFISPRODFIL,'') || ' ' ;
      END IF;

      IF :NEW.IDCONFISPRODTRA IS NOT NULL THEN
         V_DESC := V_DESC || 'IDCONFISPRODTRA= ' || NVL(:NEW.IDCONFISPRODTRA,'') || ' ' ;
      END IF;

      IF :NEW.CDGRUPOCONTPPROD IS NOT NULL THEN
         V_DESC := V_DESC || 'CDGRUPOCONTPPROD= ' || NVL(:NEW.CDGRUPOCONTPPROD,'') || ' ' ;
      END IF;

      IF :NEW.IDUTDEPOSITO IS NOT NULL THEN
         V_DESC := V_DESC || 'IDUTDEPOSITO= ' || NVL(:NEW.IDUTDEPOSITO,'') || ' ' ;
      END IF;

      IF :NEW.CDFILDEPOSITO IS NOT NULL THEN
         V_DESC := V_DESC || 'CDFILDEPOSITO= ' || NVL(:NEW.CDFILDEPOSITO,'') || ' ' ;
      END IF;

      IF :NEW.IDCALCPRECFAT IS NOT NULL THEN
         V_DESC := V_DESC || 'IDCALCPRECFAT= ' || NVL(:NEW.IDCALCPRECFAT,'') || ' ' ;
      END IF;

      IF :NEW.IDTPVARATUPRECO IS NOT NULL THEN
         V_DESC := V_DESC || 'IDTPVARATUPRECO= ' || NVL(:NEW.IDTPVARATUPRECO,'') || ' ' ;
      END IF;

      IF :NEW.IDPENDFINAN IS NOT NULL THEN
         V_DESC := V_DESC || 'IDPENDFINAN= ' || NVL(:NEW.IDPENDFINAN,'') || ' ' ;
      END IF;

      IF :NEW.IDBLOQAPROVACAO IS NOT NULL THEN
         V_DESC := V_DESC || 'IDBLOQAPROVACAO= ' || NVL(:NEW.IDBLOQAPROVACAO,'') || ' ' ;
      END IF;

      IF :NEW.IDEXIBVENDCOM IS NOT NULL THEN
         V_DESC := V_DESC || 'IDEXIBVENDCOM= ' || NVL(:NEW.IDEXIBVENDCOM,'') || ' ' ;
      END IF;

      V_ITPESQ := :NEW.CDFILIAL;

      V_IDTIPOOPER := '1';

   END IF;

   IF UPDATING THEN

      IF (:NEW.CDFILIAL <> :OLD.CDFILIAL) THEN
         V_DESC := V_DESC || 'CDFILIAL= ' || NVL(:NEW.CDFILIAL,'') || ' ' ;
      END IF;

      IF (:NEW.IDOBRTPOPPED <> :OLD.IDOBRTPOPPED) THEN
         V_DESC := V_DESC || 'IDOBRTPOPPED= ' || NVL(:NEW.IDOBRTPOPPED,'') || ' ' ;
      END IF;

      IF (:NEW.CDMODPGTO <> :OLD.CDMODPGTO) THEN
         V_DESC := V_DESC || 'CDMODPGTO= ' || NVL(:NEW.CDMODPGTO,'') || ' ' ;
      END IF;

      IF (:NEW.CDVENDEDOR <> :OLD.CDVENDEDOR) THEN
         V_DESC := V_DESC || 'CDVENDEDOR= ' || NVL(:NEW.CDVENDEDOR,'') || ' ' ;
      END IF;

      IF (:NEW.IDTABPRECO <> :OLD.IDTABPRECO) THEN
         V_DESC := V_DESC || 'IDTABPRECO= ' || NVL(:NEW.IDTABPRECO,'') || ' ' ;
      END IF;

      IF (:NEW.IDLANCPED <> :OLD.IDLANCPED) THEN
         V_DESC := V_DESC || 'IDLANCPED= ' || NVL(:NEW.IDLANCPED,'') || ' ' ;
      END IF;

      IF (:NEW.IDLANENCARGOPED <> :OLD.IDLANENCARGOPED) THEN
         V_DESC := V_DESC || 'IDLANENCARGOPED= ' || NVL(:NEW.IDLANENCARGOPED,'') || ' ' ;
      END IF;

      IF (:NEW.IDTESTAEST <> :OLD.IDTESTAEST) THEN
         V_DESC := V_DESC || 'IDTESTAEST= ' || NVL(:NEW.IDTESTAEST,'') || ' ' ;
      END IF;

      IF (:NEW.NRDIASENTPED <> :OLD.NRDIASENTPED) THEN
         V_DESC := V_DESC || 'NRDIASENTPED= ' || NVL(:NEW.NRDIASENTPED,'') || ' ' ;
      END IF;

      IF (:NEW.IDOBRINFTRAN <> :OLD.IDOBRINFTRAN) THEN
         V_DESC := V_DESC || 'IDOBRINFTRAN= ' || NVL(:NEW.IDOBRINFTRAN,'') || ' ' ;
      END IF;

      IF (:NEW.CDOPERAPRO1 <> :OLD.CDOPERAPRO1) THEN
         V_DESC := V_DESC || 'CDOPERAPRO1= ' || NVL(:NEW.CDOPERAPRO1,'') || ' ' ;
      END IF;

      IF (:NEW.CDOPERAPRO2 <> :OLD.CDOPERAPRO2) THEN
         V_DESC := V_DESC || 'CDOPERAPRO2= ' || NVL(:NEW.CDOPERAPRO2,'') || ' ' ;
      END IF;

      IF (:NEW.IDSITUFINAN <> :OLD.IDSITUFINAN) THEN
         V_DESC := V_DESC || 'IDSITUFINAN= ' || NVL(:NEW.IDSITUFINAN,'') || ' ' ;
      END IF;

      IF (:NEW.CDGROPERAPRO <> :OLD.CDGROPERAPRO) THEN
         V_DESC := V_DESC || 'CDGROPERAPRO= ' || NVL(:NEW.CDGROPERAPRO,'') || ' ' ;
      END IF;

      IF (:NEW.NRDIAPENDFIN <> :OLD.NRDIAPENDFIN) THEN
         V_DESC := V_DESC || 'NRDIAPENDFIN= ' || NVL(:NEW.NRDIAPENDFIN,'') || ' ' ;
      END IF;

      IF (:NEW.NRMAXITNFPED <> :OLD.NRMAXITNFPED) THEN
         V_DESC := V_DESC || 'NRMAXITNFPED= ' || NVL(:NEW.NRMAXITNFPED,'') || ' ' ;
      END IF;

      IF (:NEW.IDEXIBPEDIDO <> :OLD.IDEXIBPEDIDO) THEN
         V_DESC := V_DESC || 'IDEXIBPEDIDO= ' || NVL(:NEW.IDEXIBPEDIDO,'') || ' ' ;
      END IF;

      IF (:NEW.IDMENSVEND <> :OLD.IDMENSVEND) THEN
         V_DESC := V_DESC || 'IDMENSVEND= ' || NVL(:NEW.IDMENSVEND,'') || ' ' ;
      END IF;

      IF (:NEW.IDPERALTPRECO <> :OLD.IDPERALTPRECO) THEN
         V_DESC := V_DESC || 'IDPERALTPRECO= ' || NVL(:NEW.IDPERALTPRECO,'') || ' ' ;
      END IF;

      IF (:NEW.IDUTRESELOTE <> :OLD.IDUTRESELOTE) THEN
         V_DESC := V_DESC || 'IDUTRESELOTE= ' || NVL(:NEW.IDUTRESELOTE,'') || ' ' ;
      END IF;

      IF (:NEW.CDGROPLIBINC <> :OLD.CDGROPLIBINC) THEN
         V_DESC := V_DESC || 'CDGROPLIBINC= ' || NVL(:NEW.CDGROPLIBINC,'') || ' ' ;
      END IF;

      IF (:NEW.IDUTVALIPED <> :OLD.IDUTVALIPED) THEN
         V_DESC := V_DESC || 'IDUTVALIPED= ' || NVL(:NEW.IDUTVALIPED,'') || ' ' ;
      END IF;

      IF (:NEW.QTDIAVALIPED <> :OLD.QTDIAVALIPED) THEN
         V_DESC := V_DESC || 'QTDIAVALIPED= ' || NVL(:NEW.QTDIAVALIPED,'') || ' ' ;
      END IF;

      IF (:NEW.IDUTDESCMAXI <> :OLD.IDUTDESCMAXI) THEN
         V_DESC := V_DESC || 'IDUTDESCMAXI= ' || NVL(:NEW.IDUTDESCMAXI,'') || ' ' ;
      END IF;

      IF (:NEW.IDEXCLPEDIDO <> :OLD.IDEXCLPEDIDO) THEN
         V_DESC := V_DESC || 'IDEXCLPEDIDO= ' || NVL(:NEW.IDEXCLPEDIDO,'') || ' ' ;
      END IF;

      IF (:NEW.IDESTTODFIL <> :OLD.IDESTTODFIL) THEN
         V_DESC := V_DESC || 'IDESTTODFIL= ' || NVL(:NEW.IDESTTODFIL,'') || ' ' ;
      END IF;

      IF (:NEW.VRLIMAPROVA <> :OLD.VRLIMAPROVA) THEN
         V_DESC := V_DESC || 'VRLIMAPROVA= ' || NVL(:NEW.VRLIMAPROVA,'') || ' ' ;
      END IF;

      IF (:NEW.IDENTRSAIDOP <> :OLD.IDENTRSAIDOP) THEN
         V_DESC := V_DESC || 'IDENTRSAIDOP= ' || NVL(:NEW.IDENTRSAIDOP,'') || ' ' ;
      END IF;

      IF (:NEW.CDTIPOOPER <> :OLD.CDTIPOOPER) THEN
         V_DESC := V_DESC || 'CDTIPOOPER= ' || NVL(:NEW.CDTIPOOPER,'') || ' ' ;
      END IF;

      IF (:NEW.CDCLIENTE <> :OLD.CDCLIENTE) THEN
         V_DESC := V_DESC || 'CDCLIENTE= ' || NVL(:NEW.CDCLIENTE,'') || ' ' ;
      END IF;

      IF (:NEW.IDUTCTRELANP <> :OLD.IDUTCTRELANP) THEN
         V_DESC := V_DESC || 'IDUTCTRELANP= ' || NVL(:NEW.IDUTCTRELANP,'') || ' ' ;
      END IF;

      IF (:NEW.IDTPCOMPPROD <> :OLD.IDTPCOMPPROD) THEN
         V_DESC := V_DESC || 'IDTPCOMPPROD= ' || NVL(:NEW.IDTPCOMPPROD,'') || ' ' ;
      END IF;

      IF (:NEW.IDEXIBIMPITPED <> :OLD.IDEXIBIMPITPED) THEN
         V_DESC := V_DESC || 'IDEXIBIMPITPED= ' || NVL(:NEW.IDEXIBIMPITPED,'') || ' ' ;
      END IF;

      IF (:NEW.VRPERDIFCUSPREC <> :OLD.VRPERDIFCUSPREC) THEN
         V_DESC := V_DESC || 'VRPERDIFCUSPREC= ' || NVL(:NEW.VRPERDIFCUSPREC,'') || ' ' ;
      END IF;

      IF (:NEW.IDATUTABPRECINI <> :OLD.IDATUTABPRECINI) THEN
         V_DESC := V_DESC || 'IDATUTABPRECINI= ' || NVL(:NEW.IDATUTABPRECINI,'') || ' ' ;
      END IF;

      IF (:NEW.IDEXIBRENTPED <> :OLD.IDEXIBRENTPED) THEN
         V_DESC := V_DESC || 'IDEXIBRENTPED= ' || NVL(:NEW.IDEXIBRENTPED,'') || ' ' ;
      END IF;

      IF (:NEW.CDITFORPRECOPRO <> :OLD.CDITFORPRECOPRO) THEN
         V_DESC := V_DESC || 'CDITFORPRECOPRO= ' || NVL(:NEW.CDITFORPRECOPRO,'') || ' ' ;
      END IF;

      IF (:NEW.IDEXIBPRINATIV <> :OLD.IDEXIBPRINATIV) THEN
         V_DESC := V_DESC || 'IDEXIBPRINATIV= ' || NVL(:NEW.IDEXIBPRINATIV,'') || ' ' ;
      END IF;

      IF (:NEW.IDEXIBEPRAZOPED <> :OLD.IDEXIBEPRAZOPED) THEN
         V_DESC := V_DESC || 'IDEXIBEPRAZOPED= ' || NVL(:NEW.IDEXIBEPRAZOPED,'') || ' ' ;
      END IF;

      IF (:NEW.IDTIPOPEDINC <> :OLD.IDTIPOPEDINC) THEN
         V_DESC := V_DESC || 'IDTIPOPEDINC= ' || NVL(:NEW.IDTIPOPEDINC,'') || ' ' ;
      END IF;

      IF (:NEW.IDEVOLESTLIQMAN <> :OLD.IDEVOLESTLIQMAN) THEN
         V_DESC := V_DESC || 'IDEVOLESTLIQMAN= ' || NVL(:NEW.IDEVOLESTLIQMAN,'') || ' ' ;
      END IF;

      IF (:NEW.VRMINPEDIDO <> :OLD.VRMINPEDIDO) THEN
         V_DESC := V_DESC || 'VRMINPEDIDO= ' || NVL(:NEW.VRMINPEDIDO,'') || ' ' ;
      END IF;

      IF (:NEW.VRSERVBANHO <> :OLD.VRSERVBANHO) THEN
         V_DESC := V_DESC || 'VRSERVBANHO= ' || NVL(:NEW.VRSERVBANHO,'') || ' ' ;
      END IF;

      IF (:NEW.IDGERAOPPEDIDO <> :OLD.IDGERAOPPEDIDO) THEN
         V_DESC := V_DESC || 'IDGERAOPPEDIDO= ' || NVL(:NEW.IDGERAOPPEDIDO,'') || ' ' ;
      END IF;

      IF (:NEW.IDENCARPRIPARC <> :OLD.IDENCARPRIPARC) THEN
         V_DESC := V_DESC || 'IDENCARPRIPARC= ' || NVL(:NEW.IDENCARPRIPARC,'') || ' ' ;
      END IF;

      IF (:NEW.IDALTFORMAPAG <> :OLD.IDALTFORMAPAG) THEN
         V_DESC := V_DESC || 'IDALTFORMAPAG= ' || NVL(:NEW.IDALTFORMAPAG,'') || ' ' ;
      END IF;

      IF (:NEW.DSPERALTMAIOR <> :OLD.DSPERALTMAIOR) THEN
         V_DESC := V_DESC || 'DSPERALTMAIOR= ' || NVL(:NEW.DSPERALTMAIOR,'') || ' ' ;
      END IF;

      IF (:NEW.DSPERALTMENOR <> :OLD.DSPERALTMENOR) THEN
         V_DESC := V_DESC || 'DSPERALTMENOR= ' || NVL(:NEW.DSPERALTMENOR,'') || ' ' ;
      END IF;

      IF (:NEW.CDGRUALTPRECO <> :OLD.CDGRUALTPRECO) THEN
         V_DESC := V_DESC || 'CDGRUALTPRECO= ' || NVL(:NEW.CDGRUALTPRECO,'') || ' ' ;
      END IF;

      IF (:NEW.IDCONSESTGEROP <> :OLD.IDCONSESTGEROP) THEN
         V_DESC := V_DESC || 'IDCONSESTGEROP= ' || NVL(:NEW.IDCONSESTGEROP,'') || ' ' ;
      END IF;

      IF (:NEW.IDALTMODPAG <> :OLD.IDALTMODPAG) THEN
         V_DESC := V_DESC || 'IDALTMODPAG= ' || NVL(:NEW.IDALTMODPAG,'') || ' ' ;
      END IF;

      IF (:NEW.IDCALCPRECODIME <> :OLD.IDCALCPRECODIME) THEN
         V_DESC := V_DESC || 'IDCALCPRECODIME= ' || NVL(:NEW.IDCALCPRECODIME,'') || ' ' ;
      END IF;

      IF (:NEW.IDDIMEVARDESC <> :OLD.IDDIMEVARDESC) THEN
         V_DESC := V_DESC || 'IDDIMEVARDESC= ' || NVL(:NEW.IDDIMEVARDESC,'') || ' ' ;
      END IF;

      IF (:NEW.IDOBRDIMENSAO <> :OLD.IDOBRDIMENSAO) THEN
         V_DESC := V_DESC || 'IDOBRDIMENSAO= ' || NVL(:NEW.IDOBRDIMENSAO,'') || ' ' ;
      END IF;

      IF (:NEW.IDUTENDEENTRPED <> :OLD.IDUTENDEENTRPED) THEN
         V_DESC := V_DESC || 'IDUTENDEENTRPED= ' || NVL(:NEW.IDUTENDEENTRPED,'') || ' ' ;
      END IF;

      IF (:NEW.IDEXIBLOCALENTRCLI <> :OLD.IDEXIBLOCALENTRCLI) THEN
         V_DESC := V_DESC || 'IDEXIBLOCALENTRCLI= ' || NVL(:NEW.IDEXIBLOCALENTRCLI,'') || ' ' ;
      END IF;

      IF (:NEW.IDUTFILIALDESTINO <> :OLD.IDUTFILIALDESTINO) THEN
         V_DESC := V_DESC || 'IDUTFILIALDESTINO= ' || NVL(:NEW.IDUTFILIALDESTINO,'') || ' ' ;
      END IF;

      IF (:NEW.IDCONFISPRODCLIE <> :OLD.IDCONFISPRODCLIE) THEN
         V_DESC := V_DESC || 'IDCONFISPRODCLIE= ' || NVL(:NEW.IDCONFISPRODCLIE,'') || ' ' ;
      END IF;

      IF (:NEW.IDCONFISPRODFIL <> :OLD.IDCONFISPRODFIL) THEN
         V_DESC := V_DESC || 'IDCONFISPRODFIL= ' || NVL(:NEW.IDCONFISPRODFIL,'') || ' ' ;
      END IF;

      IF (:NEW.IDCONFISPRODTRA <> :OLD.IDCONFISPRODTRA) THEN
         V_DESC := V_DESC || 'IDCONFISPRODTRA= ' || NVL(:NEW.IDCONFISPRODTRA,'') || ' ' ;
      END IF;

      IF (:NEW.CDGRUPOCONTPPROD <> :OLD.CDGRUPOCONTPPROD) THEN
         V_DESC := V_DESC || 'CDGRUPOCONTPPROD= ' || NVL(:NEW.CDGRUPOCONTPPROD,'') || ' ' ;
      END IF;

      IF (:NEW.IDUTDEPOSITO <> :OLD.IDUTDEPOSITO) THEN
         V_DESC := V_DESC || 'IDUTDEPOSITO= ' || NVL(:NEW.IDUTDEPOSITO,'') || ' ' ;
      END IF;

      IF (:NEW.CDFILDEPOSITO <> :OLD.CDFILDEPOSITO) THEN
         V_DESC := V_DESC || 'CDFILDEPOSITO= ' || NVL(:NEW.CDFILDEPOSITO,'') || ' ' ;
      END IF;

      IF (:NEW.IDCALCPRECFAT <> :OLD.IDCALCPRECFAT) THEN
         V_DESC := V_DESC || 'IDCALCPRECFAT= ' || NVL(:NEW.IDCALCPRECFAT,'') || ' ' ;
      END IF;

      IF (:NEW.IDTPVARATUPRECO <> :OLD.IDTPVARATUPRECO) THEN
         V_DESC := V_DESC || 'IDTPVARATUPRECO= ' || NVL(:NEW.IDTPVARATUPRECO,'') || ' ' ;
      END IF;

      IF (:NEW.IDPENDFINAN <> :OLD.IDPENDFINAN) THEN
         V_DESC := V_DESC || 'IDPENDFINAN= ' || NVL(:NEW.IDPENDFINAN,'') || ' ' ;
      END IF;

      IF (:NEW.IDBLOQAPROVACAO <> :OLD.IDBLOQAPROVACAO) THEN
         V_DESC := V_DESC || 'IDBLOQAPROVACAO= ' || NVL(:NEW.IDBLOQAPROVACAO,'') || ' ' ;
      END IF;

      IF (:NEW.IDEXIBVENDCOM <> :OLD.IDEXIBVENDCOM) THEN
         V_DESC := V_DESC || 'IDEXIBVENDCOM= ' || NVL(:NEW.IDEXIBVENDCOM,'') || ' ' ;
      END IF;

      V_ITPESQ := :NEW.CDFILIAL;

      V_IDTIPOOPER := '2';

   END IF;

   IF DELETING  THEN

      IF :OLD.CDFILIAL IS NOT NULL THEN
         V_DESC := V_DESC || 'CDFILIAL= ' || NVL(:OLD.CDFILIAL,'') || ' ' ;
      END IF;

      IF :OLD.IDOBRTPOPPED IS NOT NULL THEN
         V_DESC := V_DESC || 'IDOBRTPOPPED= ' || NVL(:OLD.IDOBRTPOPPED,'') || ' ' ;
      END IF;

      IF :OLD.CDMODPGTO IS NOT NULL THEN
         V_DESC := V_DESC || 'CDMODPGTO= ' || NVL(:OLD.CDMODPGTO,'') || ' ' ;
      END IF;

      IF :OLD.CDVENDEDOR IS NOT NULL THEN
         V_DESC := V_DESC || 'CDVENDEDOR= ' || NVL(:OLD.CDVENDEDOR,'') || ' ' ;
      END IF;

      IF :OLD.IDTABPRECO IS NOT NULL THEN
         V_DESC := V_DESC || 'IDTABPRECO= ' || NVL(:OLD.IDTABPRECO,'') || ' ' ;
      END IF;

      IF :OLD.IDLANCPED IS NOT NULL THEN
         V_DESC := V_DESC || 'IDLANCPED= ' || NVL(:OLD.IDLANCPED,'') || ' ' ;
      END IF;

      IF :OLD.IDLANENCARGOPED IS NOT NULL THEN
         V_DESC := V_DESC || 'IDLANENCARGOPED= ' || NVL(:OLD.IDLANENCARGOPED,'') || ' ' ;
      END IF;

      IF :OLD.IDTESTAEST IS NOT NULL THEN
         V_DESC := V_DESC || 'IDTESTAEST= ' || NVL(:OLD.IDTESTAEST,'') || ' ' ;
      END IF;

      IF :OLD.NRDIASENTPED IS NOT NULL THEN
         V_DESC := V_DESC || 'NRDIASENTPED= ' || NVL(:OLD.NRDIASENTPED,'') || ' ' ;
      END IF;

      IF :OLD.IDOBRINFTRAN IS NOT NULL THEN
         V_DESC := V_DESC || 'IDOBRINFTRAN= ' || NVL(:OLD.IDOBRINFTRAN,'') || ' ' ;
      END IF;

      IF :OLD.CDOPERAPRO1 IS NOT NULL THEN
         V_DESC := V_DESC || 'CDOPERAPRO1= ' || NVL(:OLD.CDOPERAPRO1,'') || ' ' ;
      END IF;

      IF :OLD.CDOPERAPRO2 IS NOT NULL THEN
         V_DESC := V_DESC || 'CDOPERAPRO2= ' || NVL(:OLD.CDOPERAPRO2,'') || ' ' ;
      END IF;

      IF :OLD.IDSITUFINAN IS NOT NULL THEN
         V_DESC := V_DESC || 'IDSITUFINAN= ' || NVL(:OLD.IDSITUFINAN,'') || ' ' ;
      END IF;

      IF :OLD.CDGROPERAPRO IS NOT NULL THEN
         V_DESC := V_DESC || 'CDGROPERAPRO= ' || NVL(:OLD.CDGROPERAPRO,'') || ' ' ;
      END IF;

      IF :OLD.NRDIAPENDFIN IS NOT NULL THEN
         V_DESC := V_DESC || 'NRDIAPENDFIN= ' || NVL(:OLD.NRDIAPENDFIN,'') || ' ' ;
      END IF;

      IF :OLD.NRMAXITNFPED IS NOT NULL THEN
         V_DESC := V_DESC || 'NRMAXITNFPED= ' || NVL(:OLD.NRMAXITNFPED,'') || ' ' ;
      END IF;

      IF :OLD.IDEXIBPEDIDO IS NOT NULL THEN
         V_DESC := V_DESC || 'IDEXIBPEDIDO= ' || NVL(:OLD.IDEXIBPEDIDO,'') || ' ' ;
      END IF;

      IF :OLD.IDMENSVEND IS NOT NULL THEN
         V_DESC := V_DESC || 'IDMENSVEND= ' || NVL(:OLD.IDMENSVEND,'') || ' ' ;
      END IF;

      IF :OLD.IDPERALTPRECO IS NOT NULL THEN
         V_DESC := V_DESC || 'IDPERALTPRECO= ' || NVL(:OLD.IDPERALTPRECO,'') || ' ' ;
      END IF;

      IF :OLD.IDUTRESELOTE IS NOT NULL THEN
         V_DESC := V_DESC || 'IDUTRESELOTE= ' || NVL(:OLD.IDUTRESELOTE,'') || ' ' ;
      END IF;

      IF :OLD.CDGROPLIBINC IS NOT NULL THEN
         V_DESC := V_DESC || 'CDGROPLIBINC= ' || NVL(:OLD.CDGROPLIBINC,'') || ' ' ;
      END IF;

      IF :OLD.IDUTVALIPED IS NOT NULL THEN
         V_DESC := V_DESC || 'IDUTVALIPED= ' || NVL(:OLD.IDUTVALIPED,'') || ' ' ;
      END IF;

      IF :OLD.QTDIAVALIPED IS NOT NULL THEN
         V_DESC := V_DESC || 'QTDIAVALIPED= ' || NVL(:OLD.QTDIAVALIPED,'') || ' ' ;
      END IF;

      IF :OLD.IDUTDESCMAXI IS NOT NULL THEN
         V_DESC := V_DESC || 'IDUTDESCMAXI= ' || NVL(:OLD.IDUTDESCMAXI,'') || ' ' ;
      END IF;

      IF :OLD.IDEXCLPEDIDO IS NOT NULL THEN
         V_DESC := V_DESC || 'IDEXCLPEDIDO= ' || NVL(:OLD.IDEXCLPEDIDO,'') || ' ' ;
      END IF;

      IF :OLD.IDESTTODFIL IS NOT NULL THEN
         V_DESC := V_DESC || 'IDESTTODFIL= ' || NVL(:OLD.IDESTTODFIL,'') || ' ' ;
      END IF;

      IF :OLD.VRLIMAPROVA IS NOT NULL THEN
         V_DESC := V_DESC || 'VRLIMAPROVA= ' || NVL(:OLD.VRLIMAPROVA,'') || ' ' ;
      END IF;

      IF :OLD.IDENTRSAIDOP IS NOT NULL THEN
         V_DESC := V_DESC || 'IDENTRSAIDOP= ' || NVL(:OLD.IDENTRSAIDOP,'') || ' ' ;
      END IF;

      IF :OLD.CDTIPOOPER IS NOT NULL THEN
         V_DESC := V_DESC || 'CDTIPOOPER= ' || NVL(:OLD.CDTIPOOPER,'') || ' ' ;
      END IF;

      IF :OLD.CDCLIENTE IS NOT NULL THEN
         V_DESC := V_DESC || 'CDCLIENTE= ' || NVL(:OLD.CDCLIENTE,'') || ' ' ;
      END IF;

      IF :OLD.IDUTCTRELANP IS NOT NULL THEN
         V_DESC := V_DESC || 'IDUTCTRELANP= ' || NVL(:OLD.IDUTCTRELANP,'') || ' ' ;
      END IF;

      IF :OLD.IDTPCOMPPROD IS NOT NULL THEN
         V_DESC := V_DESC || 'IDTPCOMPPROD= ' || NVL(:OLD.IDTPCOMPPROD,'') || ' ' ;
      END IF;

      IF :OLD.IDEXIBIMPITPED IS NOT NULL THEN
         V_DESC := V_DESC || 'IDEXIBIMPITPED= ' || NVL(:OLD.IDEXIBIMPITPED,'') || ' ' ;
      END IF;

      IF :OLD.VRPERDIFCUSPREC IS NOT NULL THEN
         V_DESC := V_DESC || 'VRPERDIFCUSPREC= ' || NVL(:OLD.VRPERDIFCUSPREC,'') || ' ' ;
      END IF;

      IF :OLD.IDATUTABPRECINI IS NOT NULL THEN
         V_DESC := V_DESC || 'IDATUTABPRECINI= ' || NVL(:OLD.IDATUTABPRECINI,'') || ' ' ;
      END IF;

      IF :OLD.IDEXIBRENTPED IS NOT NULL THEN
         V_DESC := V_DESC || 'IDEXIBRENTPED= ' || NVL(:OLD.IDEXIBRENTPED,'') || ' ' ;
      END IF;

      IF :OLD.CDITFORPRECOPRO IS NOT NULL THEN
         V_DESC := V_DESC || 'CDITFORPRECOPRO= ' || NVL(:OLD.CDITFORPRECOPRO,'') || ' ' ;
      END IF;

      IF :OLD.IDEXIBPRINATIV IS NOT NULL THEN
         V_DESC := V_DESC || 'IDEXIBPRINATIV= ' || NVL(:OLD.IDEXIBPRINATIV,'') || ' ' ;
      END IF;

      IF :OLD.IDEXIBEPRAZOPED IS NOT NULL THEN
         V_DESC := V_DESC || 'IDEXIBEPRAZOPED= ' || NVL(:OLD.IDEXIBEPRAZOPED,'') || ' ' ;
      END IF;

      IF :OLD.IDTIPOPEDINC IS NOT NULL THEN
         V_DESC := V_DESC || 'IDTIPOPEDINC= ' || NVL(:OLD.IDTIPOPEDINC,'') || ' ' ;
      END IF;

      IF :OLD.IDEVOLESTLIQMAN IS NOT NULL THEN
         V_DESC := V_DESC || 'IDEVOLESTLIQMAN= ' || NVL(:OLD.IDEVOLESTLIQMAN,'') || ' ' ;
      END IF;

      IF :OLD.VRMINPEDIDO IS NOT NULL THEN
         V_DESC := V_DESC || 'VRMINPEDIDO= ' || NVL(:OLD.VRMINPEDIDO,'') || ' ' ;
      END IF;

      IF :OLD.VRSERVBANHO IS NOT NULL THEN
         V_DESC := V_DESC || 'VRSERVBANHO= ' || NVL(:OLD.VRSERVBANHO,'') || ' ' ;
      END IF;

      IF :OLD.IDGERAOPPEDIDO IS NOT NULL THEN
         V_DESC := V_DESC || 'IDGERAOPPEDIDO= ' || NVL(:OLD.IDGERAOPPEDIDO,'') || ' ' ;
      END IF;

      IF :OLD.IDENCARPRIPARC IS NOT NULL THEN
         V_DESC := V_DESC || 'IDENCARPRIPARC= ' || NVL(:OLD.IDENCARPRIPARC,'') || ' ' ;
      END IF;

      IF :OLD.IDALTFORMAPAG IS NOT NULL THEN
         V_DESC := V_DESC || 'IDALTFORMAPAG= ' || NVL(:OLD.IDALTFORMAPAG,'') || ' ' ;
      END IF;

      IF :OLD.DSPERALTMAIOR IS NOT NULL THEN
         V_DESC := V_DESC || 'DSPERALTMAIOR= ' || NVL(:OLD.DSPERALTMAIOR,'') || ' ' ;
      END IF;

      IF :OLD.DSPERALTMENOR IS NOT NULL THEN
         V_DESC := V_DESC || 'DSPERALTMENOR= ' || NVL(:OLD.DSPERALTMENOR,'') || ' ' ;
      END IF;

      IF :OLD.CDGRUALTPRECO IS NOT NULL THEN
         V_DESC := V_DESC || 'CDGRUALTPRECO= ' || NVL(:OLD.CDGRUALTPRECO,'') || ' ' ;
      END IF;

      IF :OLD.IDCONSESTGEROP IS NOT NULL THEN
         V_DESC := V_DESC || 'IDCONSESTGEROP= ' || NVL(:OLD.IDCONSESTGEROP,'') || ' ' ;
      END IF;

      IF :OLD.IDALTMODPAG IS NOT NULL THEN
         V_DESC := V_DESC || 'IDALTMODPAG= ' || NVL(:OLD.IDALTMODPAG,'') || ' ' ;
      END IF;

      IF :OLD.IDCALCPRECODIME IS NOT NULL THEN
         V_DESC := V_DESC || 'IDCALCPRECODIME= ' || NVL(:OLD.IDCALCPRECODIME,'') || ' ' ;
      END IF;

      IF :OLD.IDDIMEVARDESC IS NOT NULL THEN
         V_DESC := V_DESC || 'IDDIMEVARDESC= ' || NVL(:OLD.IDDIMEVARDESC,'') || ' ' ;
      END IF;

      IF :OLD.IDOBRDIMENSAO IS NOT NULL THEN
         V_DESC := V_DESC || 'IDOBRDIMENSAO= ' || NVL(:OLD.IDOBRDIMENSAO,'') || ' ' ;
      END IF;

      IF :OLD.IDUTENDEENTRPED IS NOT NULL THEN
         V_DESC := V_DESC || 'IDUTENDEENTRPED= ' || NVL(:OLD.IDUTENDEENTRPED,'') || ' ' ;
      END IF;

      IF :OLD.IDEXIBLOCALENTRCLI IS NOT NULL THEN
         V_DESC := V_DESC || 'IDEXIBLOCALENTRCLI= ' || NVL(:OLD.IDEXIBLOCALENTRCLI,'') || ' ' ;
      END IF;

      IF :OLD.IDUTFILIALDESTINO IS NOT NULL THEN
         V_DESC := V_DESC || 'IDUTFILIALDESTINO= ' || NVL(:OLD.IDUTFILIALDESTINO,'') || ' ' ;
      END IF;

      IF :OLD.IDCONFISPRODCLIE IS NOT NULL THEN
         V_DESC := V_DESC || 'IDCONFISPRODCLIE= ' || NVL(:OLD.IDCONFISPRODCLIE,'') || ' ' ;
      END IF;

      IF :OLD.IDCONFISPRODFIL IS NOT NULL THEN
         V_DESC := V_DESC || 'IDCONFISPRODFIL= ' || NVL(:OLD.IDCONFISPRODFIL,'') || ' ' ;
      END IF;

      IF :OLD.IDCONFISPRODTRA IS NOT NULL THEN
         V_DESC := V_DESC || 'IDCONFISPRODTRA= ' || NVL(:OLD.IDCONFISPRODTRA,'') || ' ' ;
      END IF;

      IF :OLD.CDGRUPOCONTPPROD IS NOT NULL THEN
         V_DESC := V_DESC || 'CDGRUPOCONTPPROD= ' || NVL(:OLD.CDGRUPOCONTPPROD,'') || ' ' ;
      END IF;

      IF :OLD.IDUTDEPOSITO IS NOT NULL THEN
         V_DESC := V_DESC || 'IDUTDEPOSITO= ' || NVL(:OLD.IDUTDEPOSITO,'') || ' ' ;
      END IF;

      IF :OLD.CDFILDEPOSITO IS NOT NULL THEN
         V_DESC := V_DESC || 'CDFILDEPOSITO= ' || NVL(:OLD.CDFILDEPOSITO,'') || ' ' ;
      END IF;

      IF :OLD.IDCALCPRECFAT IS NOT NULL THEN
         V_DESC := V_DESC || 'IDCALCPRECFAT= ' || NVL(:OLD.IDCALCPRECFAT,'') || ' ' ;
      END IF;

      IF :OLD.IDTPVARATUPRECO IS NOT NULL THEN
         V_DESC := V_DESC || 'IDTPVARATUPRECO= ' || NVL(:OLD.IDTPVARATUPRECO,'') || ' ' ;
      END IF;

      IF :OLD.IDPENDFINAN IS NOT NULL THEN
         V_DESC := V_DESC || 'IDPENDFINAN= ' || NVL(:OLD.IDPENDFINAN,'') || ' ' ;
      END IF;

      IF :OLD.IDBLOQAPROVACAO IS NOT NULL THEN
         V_DESC := V_DESC || 'IDBLOQAPROVACAO= ' || NVL(:OLD.IDBLOQAPROVACAO,'') || ' ' ;
      END IF;

      IF :OLD.IDEXIBVENDCOM IS NOT NULL THEN
         V_DESC := V_DESC || 'IDEXIBVENDCOM= ' || NVL(:OLD.IDEXIBVENDCOM,'') || ' ' ;
      END IF;

      V_ITPESQ := :OLD.CDFILIAL;

      V_IDTIPOOPER := '3';

   END IF;

   IF NOT (V_DESC IS NULL) THEN
      V_TAM := LENGTH(V_DESC);
      WHILE (V_TAM >= 0) LOOP
         INSERT INTO LOGOPERA ( NMTABELA, DTOPERACAO, NMRESPOPER,
                                IDTIPOOPER,   DSOPERACAO, CDPESQITEM,
                                DSRDMUSUOPER, DSENDUSUOPER, DSNMUSUOPER,
                                DSMETUSUOPER, CDORESPOPER, CDFILLOGOPER)
                      VALUES  ('PARAMPEDIDO', SYSDATE ,    NVL(V_NMOPERADOR,' '),
                                V_IDTIPOOPER,  SUBSTR(V_DESC,1,300), V_ITPESQ,
                                V_DSSERVERRDM, V_DSREMOTEADDR,  V_DSREMOTEHOST,
                                V_DSSERVMETHOD,   V_DSREMOTEOPER, V_CDFILLOGOPER);
         V_DESC := SUBSTR(V_DESC, 300, V_TAM);
         V_TAM := LENGTH(V_DESC);
      END LOOP;

   END IF;
END;
/