Customized message in Trigger at EBS Oracle

Perguntas relacionadas a questões técnicas do Oracle EBS. Criação de Concorrentes, Value Sets, Alerts, Forms Personalizations, Configurações, etc
Post Reply
marlonpasquali
Rank: DBA Pleno
Rank: DBA Pleno
Posts: 248
Joined: Fri, 06 Feb 2009 3:02 pm
Location: ERECHIM - RS

Good afternoon Personal
I did a Trigger After Insert on a table, and I would like to test a condition and send a message to the user if this conduct is true. I did like this:

Select all

       If Vn_Realizado > Vn_Orcado Then 
          RAISE_APPLICATION_ERROR (-20500,'O Valor Realizado é Superior ao Orçado! '); 
       End if;
But when the condition is virator, the text I set in the message does not appear.
Someone has any suggestions.
Note: We use Oracle's EBS and the message would have to appear in EBS Core Forms at the time the user is inserting a new record.
User avatar
madmax
Rank: DBA Pleno
Rank: DBA Pleno
Posts: 293
Joined: Wed, 13 Dec 2006 5:02 pm
Location: São Paulo
Contact:
________________________________
Douglas - Madmax.

Hello Marlon.

Thus:




Anything posed and.

ABS ..

Douglas
marlonpasquali
Rank: DBA Pleno
Rank: DBA Pleno
Posts: 248
Joined: Fri, 06 Feb 2009 3:02 pm
Location: ERECHIM - RS

Douglas
makes error in compilation:

Select all

PLS-00302: o componente 'SET_STRING' deve ser declarado 
PL/SQL: Statement ignored 
PLS-00302: o componente 'SHOW' deve ser declarado

ATT
Marlon
User avatar
madmax
Rank: DBA Pleno
Rank: DBA Pleno
Posts: 293
Joined: Wed, 13 Dec 2006 5:02 pm
Location: São Paulo
Contact:
________________________________
Douglas - Madmax.

Oops was poorly


Try this:

Select all

        Fnd_Message.SET_NAME('FND','FND_GENERIC_MESSAGE'); 
        Fnd_Message.SET_TOKEN('MESSAGE', 'Error en trigger XX_AR_CUST_TRX_LIN_TAX_TRG_BIU. ' || sqlerrm); 
        Fnd_Message.RAISE_ERROR;
Anything posts toE.

ABS ..
marlonpasquali
Rank: DBA Pleno
Rank: DBA Pleno
Posts: 248
Joined: Fri, 06 Feb 2009 3:02 pm
Location: ERECHIM - RS

OK. It worked when I'm changing an item (Updating). But in inclusion does not show this message.
Any idea of ??why?
My trigger is like this:

Select all

IF INSERTING THEN 
       Begin 
        If Vn_Realizado > Vn_Orcado Then 
            Fnd_Message.SET_NAME('FND','FND_GENERIC_MESSAGE'); 
            Fnd_Message.SET_TOKEN('MESSAGE', 'Valor Realizado é Maior que o Orçado. Procure o Patrocinador da Conta. ' || sqlerrm); 
            Fnd_Message.RAISE_ERROR; 
        End if; 
       End; 
END IF; 
 
 
IF UPDATING THEN 
       Begin 
        If Vn_Realizado > Vn_Orcado Then 
            Fnd_Message.SET_NAME('FND','FND_GENERIC_MESSAGE'); 
            Fnd_Message.SET_TOKEN('MESSAGE', 'Valor Realizado é Maior que o Orçado. Procure o Patrocinador da Conta. ' || sqlerrm); 
            Fnd_Message.RAISE_ERROR; 
        End if; 
       End; 
END IF;
User avatar
madmax
Rank: DBA Pleno
Rank: DBA Pleno
Posts: 293
Joined: Wed, 13 Dec 2006 5:02 pm
Location: São Paulo
Contact:
________________________________
Douglas - Madmax.

Marlon.

Try to make your trigger like this:

Select all

Create Or Replace Trigger TRG_xxxxxxxxx 
Before Insert Or Update On  ra_customer_trx_lines_all 
For Each Row 
 
 Begin 
        If Vn_Realizado > Vn_Orcado Then 
            Fnd_Message.SET_NAME('FND','FND_GENERIC_MESSAGE'); 
            Fnd_Message.SET_TOKEN('MESSAGE', 'Valor Realizado é Maior que o Orçado. Procure o Patrocinador da Conta. ' || sqlerrm); 
            Fnd_Message.RAISE_ERROR; 
        End if; 
        
 
End; 
This way it will work for Update and Insert.

I hope I have helped.

ABS.

Douglas
marlonpasquali
Rank: DBA Pleno
Rank: DBA Pleno
Posts: 248
Joined: Fri, 06 Feb 2009 3:02 pm
Location: ERECHIM - RS

beleza Douglas. Now it worked. It worked right.

Thank you for the help of all of the group.

Hugs!
Marlon
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests