Home » Developer & Programmer » Forms » Wrong Updation in When-Validate-Trigger (Oracle FORMS)
Wrong Updation in When-Validate-Trigger [message #595812] Sat, 14 September 2013 00:41 Go to next message
Blankhero
Messages: 27
Registered: September 2013
Junior Member
Hi All,
In when-Validate-Item trigger,I am checking a condition like
if %>=90 and days<=7 then status='Y'
else status='N'


It is working fine in 95% cases
But in Some cases it is wrongly updating
like even if both conditions are true status ='N'

This is happening in user side on rare occasions
so what we do currently is ask the user to delete that line and insert it again and it is working

What I need is how to recreate that scenario which is wrongly updating(Ofcourse,what is going wrong????)

Thnks

Re: Wrong Updation in When-Validate-Trigger [message #595813 is a reply to message #595812] Sat, 14 September 2013 00:52 Go to previous messageGo to next message
BlackSwan
Messages: 22926
Registered: January 2009
Senior Member
how can we reproduce what you report?
Re: Wrong Updation in When-Validate-Trigger [message #595819 is a reply to message #595813] Sat, 14 September 2013 01:19 Go to previous messageGo to next message
Blankhero
Messages: 27
Registered: September 2013
Junior Member
Why It is wrongly updating what might be the issue?
Re: Wrong Updation in When-Validate-Trigger [message #595837 is a reply to message #595819] Sat, 14 September 2013 07:13 Go to previous messageGo to next message
Blankhero
Messages: 27
Registered: September 2013
Junior Member
We are using a customized form in which for each customer

In the line level after user entering the discount amount and discount days,

the status is being checked in when-Validate-Item trigger in both the items
discount amount and discount days.

At last,using a save button the values are commited using FORMS_DDL ('COMMIT');

In some cases,status is updated as 'N' even if the conditions are true,

Why it is happening?What might be the issue?
Re: Wrong Updation in When-Validate-Trigger [message #595841 is a reply to message #595837] Sat, 14 September 2013 07:58 Go to previous messageGo to next message
BlackSwan
Messages: 22926
Registered: January 2009
Senior Member
Please read and follow the forum guidelines, to enable us to help you:

http://www.orafaq.com/forum/t/88153/0/
Re: Wrong Updation in When-Validate-Trigger [message #595849 is a reply to message #595841] Sat, 14 September 2013 14:11 Go to previous messageGo to next message
Littlefoot
Messages: 19711
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Could you post contents of that trigger? I mean, its real code, not the one you already posted (as it is obviously invalid). Seeing it, someone might get the idea.

For example, IF contains a global variable which wasn't set to a new value between two trigger calls so you used its old value (thinking that it used the new one).
Re: Wrong Updation in When-Validate-Trigger [message #595854 is a reply to message #595849] Sun, 15 September 2013 01:03 Go to previous messageGo to next message
Blankhero
Messages: 27
Registered: September 2013
Junior Member
HI,

the original trigger code

if :TJD_CFA_CUST_ORD_ADV_DTL_TB.ADVANCE_PAYMENT > :TJD_CFA_CUST_ORD_ADV_DTL_TB.CUSTOMER_ORDER_VALUE then
fnd_message.debug('Kindly Enter the Advance Amount Less Than Customer Order Value') ;
RAISE form_trigger_failure;
end if;
declare
l_amount_paid_percent number;
l_diff_days number;
l_days_discount NUMBER;
l_discount_percentage number;

begin

l_diff_days := :TJD_CFA_CUST_ORD_ADV_DTL_TB.CHEQUE_DATE - :TJD_CFA_CUST_ORD_ADV_DTL_TB.CUSTOMER_ORDER_DATE;

select
round((:TJD_CFA_CUST_ORD_ADV_DTL_TB.ADVANCE_PAYMENT / :TJD_CFA_CUST_ORD_ADV_DTL_TB.CUSTOMER_ORDER_VALUE)*100,2)
into
l_amount_paid_percent
from
dual;

SELECT TO_NUMBER (parameter2),TO_NUMBER (parameter3)
INTO l_discount_percentage,l_days_discount
FROM tnq_all_parameter_tb
WHERE parameter1 = 'CFA_CUST_ORD_ADVANCE';


:TJD_CFA_CUST_ORD_ADV_DTL_TB.ADVANCE_PERCENTAGE:=l_amount_paid_percent;
SET_ITEM_PROPERTY ('ADVANCE_PERCENTAGE',enabled, property_false);

if l_amount_paid_percent >= l_discount_percentage and l_diff_days <= l_days_discount then
:TJD_CFA_CUST_ORD_ADV_DTL_TB.DISCOUNT_STATUS := 'Y';
else
:TJD_CFA_CUST_ORD_ADV_DTL_TB.DISCOUNT_STATUS := 'N';
end if;


end;


Thnks
Re: Wrong Updation in When-Validate-Trigger [message #595855 is a reply to message #595854] Sun, 15 September 2013 01:12 Go to previous messageGo to next message
Michel Cadot
Messages: 59499
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" or "Preview Quick Reply" button to verify.
Also always post your Oracle version, with 4 decimals.

Regards
Michel
Re: Wrong Updation in When-Validate-Trigger [message #595857 is a reply to message #595855] Sun, 15 September 2013 01:34 Go to previous messageGo to next message
Blankhero
Messages: 27
Registered: September 2013
Junior Member
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

if :TJD_CFA_CUST_ORD_ADV_DTL_TB.ADVANCE_PAYMENT  > :TJD_CFA_CUST_ORD_ADV_DTL_TB.CUSTOMER_ORDER_VALUE then
fnd_message.debug('Kindly Enter the Advance Amount Less Than Customer Order Value')    ;
    RAISE form_trigger_failure;
end if;
declare
l_amount_paid_percent number;    
l_diff_days                     number;
l_days_discount       NUMBER;
l_discount_percentage number;
begin
    l_diff_days := :TJD_CFA_CUST_ORD_ADV_DTL_TB.CHEQUE_DATE - :TJD_CFA_CUST_ORD_ADV_DTL_TB.CUSTOMER_ORDER_DATE;
    select
    round((:TJD_CFA_CUST_ORD_ADV_DTL_TB.ADVANCE_PAYMENT / :TJD_CFA_CUST_ORD_ADV_DTL_TB.CUSTOMER_ORDER_VALUE)*100,2)
    into
    l_amount_paid_percent
    from
    dual;
        SELECT TO_NUMBER (parameter2), TO_NUMBER (parameter3)
  INTO l_discount_percentage, l_days_discount
  FROM tnq_all_parameter_tb
 WHERE parameter1 = 'CFA_CUST_ORD_ADVANCE';
 
 :TJD_CFA_CUST_ORD_ADV_DTL_TB.ADVANCE_PERCENTAGE:=l_amount_paid_percent;
    SET_ITEM_PROPERTY ('ADVANCE_PERCENTAGE',enabled, property_false);
    
    if l_amount_paid_percent >= l_discount_percentage and l_diff_days <= l_days_discount 
    then
        :TJD_CFA_CUST_ORD_ADV_DTL_TB.DISCOUNT_STATUS := 'Y';
    else                                                
        :TJD_CFA_CUST_ORD_ADV_DTL_TB.DISCOUNT_STATUS := 'N';
    end if;
end;
Re: Wrong Updation in When-Validate-Trigger [message #595859 is a reply to message #595857] Sun, 15 September 2013 04:51 Go to previous messageGo to next message
Lalit Kumar B
Messages: 2456
Registered: May 2013
Location: World Wide on the Web
Senior Member
Blankhero wrote on Sun, 15 September 2013 12:04

        SELECT TO_NUMBER (parameter2), TO_NUMBER (parameter3)
  INTO l_discount_percentage, l_days_discount
  FROM tnq_all_parameter_tb
 WHERE parameter1 = 'CFA_CUST_ORD_ADVANCE';


What is the data type of columns parameter2 and parameter3 in table tnq_all_parameter_tb?
Why do you want to convert it to number.

The issue here might be due to the to_number conversion of l_discount_percentage and l_days_discount.
Quote:
if l_amount_paid_percent >= l_discount_percentage and l_diff_days <= l_days_discount
then
:TJD_CFA_CUST_ORD_ADV_DTL_TB.DISCOUNT_STATUS := 'Y';
else
:TJD_CFA_CUST_ORD_ADV_DTL_TB.DISCOUNT_STATUS := 'N';
end if;


Re: Wrong Updation in When-Validate-Trigger [message #595872 is a reply to message #595859] Sun, 15 September 2013 12:17 Go to previous messageGo to next message
Blankhero
Messages: 27
Registered: September 2013
Junior Member
Hi,
It is a parameter table with all columns character data type. If it is due to to_number can u explain why it happens rarely ?how to recreate that scenario ?

Thanks
Re: Wrong Updation in When-Validate-Trigger [message #595876 is a reply to message #595872] Sun, 15 September 2013 13:09 Go to previous messageGo to next message
Littlefoot
Messages: 19711
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
The following will not solve your problem, but this:
select
    round((:TJD_CFA_CUST_ORD_ADV_DTL_TB.ADVANCE_PAYMENT / :TJD_CFA_CUST_ORD_ADV_DTL_TB.CUSTOMER_ORDER_VALUE)*100,2)
    into
    l_amount_paid_percent
    from
    dual;
should rather be rewritten so that you don't SELECT FROM DUAL, as
l_amount_paid_percent := round((:TJD_CFA_CUST_ORD_ADV_DTL_TB.ADVANCE_PAYMENT / 
                                :TJD_CFA_CUST_ORD_ADV_DTL_TB.CUSTOMER_ORDER_VALUE) * 100, 2);



As of your problems, display all variables used in IF statement, just before you call it, such as
message('l_amount_paid_percent = ' || l_amount_paid_percent);
message('l_discount_percentage = ' || l_discount_percentage);
...
if ...
else
end if;

Doing so, you'd see which input values evaluate to which variable values and the reason your IF fails (or, should I rather say, does exactly what you told it to).

[Updated on: Sun, 15 September 2013 13:10]

Report message to a moderator

Re: Wrong Updation in When-Validate-Trigger [message #595878 is a reply to message #595872] Sun, 15 September 2013 13:21 Go to previous messageGo to next message
Lalit Kumar B
Messages: 2456
Registered: May 2013
Location: World Wide on the Web
Senior Member
Blankhero wrote on Sun, 15 September 2013 22:47
If it is due to to_number can u explain why it happens rarely ?how to recreate that scenario ?


You mean to say I need to recreate the scenario which YOU are facing? It's impossible with such limited information. You should have some logging mechanism to know for which values you are facing the issue. All it needs is to dig in to the issue step by step, start with what Littlefoot suggested.

[Updated on: Sun, 15 September 2013 13:21]

Report message to a moderator

Re: Wrong Updation in When-Validate-Trigger [message #595881 is a reply to message #595876] Sun, 15 September 2013 13:58 Go to previous messageGo to next message
Blankhero
Messages: 27
Registered: September 2013
Junior Member
Hi ,
thanks. I will try this one. I have a doubt ?what will happen if it does not trigger or triggered twice?
Re: Wrong Updation in When-Validate-Trigger [message #595882 is a reply to message #595881] Sun, 15 September 2013 14:03 Go to previous messageGo to next message
Lalit Kumar B
Messages: 2456
Registered: May 2013
Location: World Wide on the Web
Senior Member
Blankhero wrote on Mon, 16 September 2013 00:28
I have a doubt ?what will happen if it does not trigger or triggered twice?


1. If no triggering event occurs, you would not see the input values in your output message.
2. If the triggering event happens twice, you would find two entries of input values in your output message(assuming you are logging it somewhere)
Re: Wrong Updation in When-Validate-Trigger [message #595883 is a reply to message #595881] Sun, 15 September 2013 14:04 Go to previous messageGo to next message
Littlefoot
Messages: 19711
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
If it doesn't fire, nothing will happen (obviously).

If it fires twice, nothing much will happen; DISCOUNT_STATUS will get one of values. Or it will not. Why not? Because, if CUSTOMER_ORDER_VALUE is 0, your code will explode.
Re: Wrong Updation in When-Validate-Trigger [message #595890 is a reply to message #595878] Sun, 15 September 2013 23:14 Go to previous messageGo to next message
Blankhero
Messages: 27
Registered: September 2013
Junior Member
HI,
thnks for your info.What I am asking is a case in which to_number functionality might have failed.
What additional info you need?I will try to provide that?

Thanks
Re: Wrong Updation in When-Validate-Trigger [message #595893 is a reply to message #595890] Mon, 16 September 2013 00:11 Go to previous messageGo to next message
Littlefoot
Messages: 19711
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
TO_NUMBER fails if you try to convert 'A' into a number. Or 'Blankhero' to a number. Or similar. As there's no exception handler section in your code, I guess that you shouldn't worry about it because you'd see it very obviously if TO_NUMBER failed. Unless, of course, you decided to suppress all errors & messages by, for example, setting the :SYSTEM.MESSAGE_LEVEL to a high value, or use ON-ERROR trigger or similar.

On the other hand, the question is: why do you store those parameters as characters if you need them as numbers?
Re: Wrong Updation in When-Validate-Trigger [message #595896 is a reply to message #595893] Mon, 16 September 2013 00:56 Go to previous messageGo to next message
Blankhero
Messages: 27
Registered: September 2013
Junior Member
HI,
It is a customized table used by all developers for storing additional information.In our case we are storing discount percent and days.so only all columns are character datatype.Based on the requirement,developer can make use of to_number or other functionality.

I have tried displaying messages.Since it is happening rarely,still now I haven't got one scenario.Also,all other values are updating properly like :TJD_CFA_CUST_ORD_ADV_DTL_TB.ADVANCE_PERCENTAGE.The only one failing is :TJD_CFA_CUST_ORD_ADV_DTL_TB.DISCOUNT_STATUS.

Based on your info,I am trying to create a scenario in which I am getting a message like :TJD_CFA_CUST_ORD_ADV_DTL_TB.ADVANCE_PERCENTAGE is null,what can I infer from that?
Because :TJD_CFA_CUST_ORD_ADV_DTL_TB.ADVANCE_PERCENTAGE this value is updating properly

Any other chances of IF condition failing and returning ELSE value?

Thanks
Re: Wrong Updation in When-Validate-Trigger [message #595898 is a reply to message #595896] Mon, 16 September 2013 01:13 Go to previous messageGo to next message
Littlefoot
Messages: 19711
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Does any of end users, by any chance, remember which values he/she entered into that form so that it produced wrong result? It would, I hope, help solve the case.

IF looks like this:
if l_amount_paid_percent >= l_discount_percentage and l_diff_days <= l_days_discount

Both of these conditions must be met in order to set the DISCOUNT_STATUS to 'Y'. In any other case, it will be set to 'N'.
Re: Wrong Updation in When-Validate-Trigger [message #595901 is a reply to message #595898] Mon, 16 September 2013 01:25 Go to previous messageGo to next message
Blankhero
Messages: 27
Registered: September 2013
Junior Member
HI,
All the values are saved in the database.So ,I can even check back if user has entered any wrong value.Moreover,even if updates wrongly,we ask the user to delete that line and exactly enter the same details.The second time it is updating properly.What might have happened in the first case?What I am missing?Any chances of local variable misbehaving?whether I have to Initialize those variables?In our case it is only declared like
l_amount_paid_percent number;

Thanks
Re: Wrong Updation in When-Validate-Trigger [message #595909 is a reply to message #595901] Mon, 16 September 2013 03:07 Go to previous messageGo to next message
Littlefoot
Messages: 19711
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Your declaration seems to be OK. These are local variables, no problem with that (I think).

That's why I asked (see here) whether global variables (or, possibly, parameters) are involved in this operation. Apparently not.

I don't see any reason why is this happening. Maybe we should wait for someone else with fresh ideas. I don't have any, sorry.
Re: Wrong Updation in When-Validate-Trigger [message #595918 is a reply to message #595909] Mon, 16 September 2013 04:14 Go to previous messageGo to next message
DrabJay
Messages: 32
Registered: May 2013
Member
I assume this is a When-Validate-Item trigger on an Item in the TJD_CFA_CUST_ORD_ADV_DTL_TB block. In any case, could you specify which item this trigger is connect to?

If it is on an item in the TJD_CFA_CUST_ORD_ADV_DTL_TB I would say this code is at the wrong level, this should be in a When-Validate-Record trigger as you are using values from more than one item in this block and are making assumptions as to the order in which the item values are entered by the user.
Re: Wrong Updation in When-Validate-Trigger [message #595919 is a reply to message #595918] Mon, 16 September 2013 04:26 Go to previous messageGo to next message
Blankhero
Messages: 27
Registered: September 2013
Junior Member
Hi,
the status is being checked in when-Validate-Item trigger in both the items
:TJD_CFA_CUST_ORD_ADV_DTL_TB.ADVANCE_PAYMENT
and :TJD_CFA_CUST_ORD_ADV_DTL_TB.CUSTOMER_ORDER_VALUE

Thanks
Re: Wrong Updation in When-Validate-Trigger [message #595924 is a reply to message #595919] Mon, 16 September 2013 04:41 Go to previous messageGo to next message
DrabJay
Messages: 32
Registered: May 2013
Member
But not on the items ADVANCE_PERCENTAGE and CHEQUE_DATE which are also used in the When-Validate-Item trigger? Are these not user-enterable and so do not need any validation?
Re: Wrong Updation in When-Validate-Trigger [message #595925 is a reply to message #595924] Mon, 16 September 2013 04:44 Go to previous messageGo to next message
Blankhero
Messages: 27
Registered: September 2013
Junior Member
Hi,
:TJD_CFA_CUST_ORD_ADV_DTL_TB.ADVANCE_PERCENTAGE is calculated on that trigger only and CHEQUE_DATE is non-user enterable

Thanks
Re: Wrong Updation in When-Validate-Trigger [message #595926 is a reply to message #595925] Mon, 16 September 2013 04:47 Go to previous messageGo to next message
cookiemonster
Messages: 11088
Registered: September 2008
Location: Rainy Manchester
Senior Member
what about TJD_CFA_CUST_ORD_ADV_DTL_TB.CUSTOMER_ORDER_DATE?
Re: Wrong Updation in When-Validate-Trigger [message #595927 is a reply to message #595926] Mon, 16 September 2013 04:51 Go to previous messageGo to next message
Blankhero
Messages: 27
Registered: September 2013
Junior Member
Hi,
It is same as CHEQUE_DATE

Thanks
Re: Wrong Updation in When-Validate-Trigger [message #595929 is a reply to message #595927] Mon, 16 September 2013 05:03 Go to previous messageGo to next message
cookiemonster
Messages: 11088
Registered: September 2008
Location: Rainy Manchester
Senior Member
Really?
Then why are you doing this calculation if the two are always the same?
l_diff_days := :TJD_CFA_CUST_ORD_ADV_DTL_TB.CHEQUE_DATE - :TJD_CFA_CUST_ORD_ADV_DTL_TB.CUSTOMER_ORDER_DATE;
Re: Wrong Updation in When-Validate-Trigger [message #595930 is a reply to message #595927] Mon, 16 September 2013 05:06 Go to previous messageGo to next message
Blankhero
Messages: 27
Registered: September 2013
Junior Member
Hi,
they are not same.What i tried to convey is both are non-user enterable

Thanks
Re: Wrong Updation in When-Validate-Trigger [message #595931 is a reply to message #595930] Mon, 16 September 2013 05:19 Go to previous messageGo to next message
cookiemonster
Messages: 11088
Registered: September 2008
Location: Rainy Manchester
Senior Member
Let's cut to the chase.

For discount_status to get set to N the following statement must not be true:
if l_amount_paid_percent >= l_discount_percentage and l_diff_days <= l_days_discount 

It'll be not true in the following cases:
a) l_amount_paid_percent < l_discount_percentage
b) l_days_discount < l_diff_days
c) any of the four variables is null.

l_amount_paid_percent will be null if either TJD_CFA_CUST_ORD_ADV_DTL_TB.ADVANCE_PAYMENT or :TJD_CFA_CUST_ORD_ADV_DTL_TB.CUSTOMER_ORDER_VALUE is null.
l_discount_percentage will be null if parameter2 is null.
l_diff_days will be null if either TJD_CFA_CUST_ORD_ADV_DTL_TB.CHEQUE_DATE or :TJD_CFA_CUST_ORD_ADV_DTL_TB.CUSTOMER_ORDER_DATE is null.
l_days_discount will be null if parameter3 is null.

Those are the options, it's up to you to work out which one is causing the issue.
Re: Wrong Updation in When-Validate-Trigger [message #595932 is a reply to message #595931] Mon, 16 September 2013 05:30 Go to previous messageGo to next message
Blankhero
Messages: 27
Registered: September 2013
Junior Member
Hi,

Could you explain a and b
a)l_amount_paid_percent < l_discount_percentage
b) l_days_discount < l_diff_days

Because i have faced this one like 90<=90 which has to return status 'Y' yet returns 'N'

But even when it is deleted and entered back then status as 'Y' returned

can u explain this?

Thanks
Re: Wrong Updation in When-Validate-Trigger [message #595933 is a reply to message #595932] Mon, 16 September 2013 05:32 Go to previous messageGo to next message
cookiemonster
Messages: 11088
Registered: September 2008
Location: Rainy Manchester
Senior Member
90=90 so that comparison is not the problem.
So one of the other options must be the problem or another trigger entirely is setting the item to N.
Re: Wrong Updation in When-Validate-Trigger [message #595934 is a reply to message #595933] Mon, 16 September 2013 05:36 Go to previous messageGo to next message
cookiemonster
Messages: 11088
Registered: September 2008
Location: Rainy Manchester
Senior Member
Unless one of those 90s is actually 90.02 or 89.67.
Are you accounting for decimals?
Re: Wrong Updation in When-Validate-Trigger [message #595935 is a reply to message #595933] Mon, 16 September 2013 05:37 Go to previous messageGo to next message
Blankhero
Messages: 27
Registered: September 2013
Junior Member
Hi,
I can't get this point
"another trigger entirely is setting the item to N."

Since it is happening rarely whether it might have any dba related issue?
Like at that point something might have failed?
Re: Wrong Updation in When-Validate-Trigger [message #595936 is a reply to message #595934] Mon, 16 September 2013 05:40 Go to previous messageGo to next message
Blankhero
Messages: 27
Registered: September 2013
Junior Member
whatever it may be why it is updating first time wrong ?even if it is 87.65 or 90.35 in both the occasions the status has to be either 'Y' or 'N'.
Re: Wrong Updation in When-Validate-Trigger [message #595937 is a reply to message #595935] Mon, 16 September 2013 05:41 Go to previous messageGo to next message
cookiemonster
Messages: 11088
Registered: September 2008
Location: Rainy Manchester
Senior Member
Blankhero wrote on Mon, 16 September 2013 11:37
Hi,
I can't get this point
"another trigger entirely is setting the item to N."

Means exactly what it says. Code in another trigger is setting DISCOUNT_STATUS to N. If there are no other triggers that set DISCOUNT_STATUS then you can ignore this.

Blankhero wrote on Mon, 16 September 2013 11:37

Since it is happening rarely whether it might have any dba related issue?
Like at that point something might have failed?

Such as?

If discount_status is not set or is set to Y and then gets set to N as a result of this trigger firing then the trigger is not failing and the above options I've laid out are the only possibilities.
Re: Wrong Updation in When-Validate-Trigger [message #595938 is a reply to message #595936] Mon, 16 September 2013 05:42 Go to previous messageGo to next message
cookiemonster
Messages: 11088
Registered: September 2008
Location: Rainy Manchester
Senior Member
Blankhero wrote on Mon, 16 September 2013 11:40
whatever it may be why it is updating first time wrong ?even if it is 87.65 or 90.35 in both the occasions the status has to be either 'Y' or 'N'.

Something is rounding the values off in between runs?
Re: Wrong Updation in When-Validate-Trigger [message #605276 is a reply to message #595938] Wed, 08 January 2014 06:40 Go to previous messageGo to next message
Blankhero
Messages: 27
Registered: September 2013
Junior Member
HI,
l_diff_days number;

l_diff_days := :TJD_CFA_CUST_ORD_ADV_DTL_TB.CHEQUE_DATE - :TJD_CFA_CUST_ORD_ADV_DTL_TB.CUSTOMER_ORDER_DATE;

this local variable is returning null value at sometimes instead of returning correct value.
that is the reason for wrong updation.
Any reasons why this is happening?

Thanks

Re: Wrong Updation in When-Validate-Trigger [message #605278 is a reply to message #605276] Wed, 08 January 2014 06:51 Go to previous messageGo to previous message
cookiemonster
Messages: 11088
Registered: September 2008
Location: Rainy Manchester
Senior Member
l_diff_days will only be null if one or both of the datablock items used to calculate it is null.
Previous Topic: Getting ORA-12154: TNS error when running a form
Next Topic: Error: To retrieve the Information in this block, use menu option view in oracle apps form
Goto Forum:
  


Current Time: Thu Oct 30 13:21:20 CDT 2014

Total time taken to generate the page: 0.09731 seconds