Home » Developer & Programmer » Forms » message's in find button
message's in find button [message #603405] Mon, 16 December 2013 00:39 Go to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi all,

I wrote to display message's in the find button
begin
IF :HOPE_FORECAST_CONTROL.sales_channel IS NOT NULL THEN 
        finalstr := finalstr || 'AND SALES_CHANNEL =' || ( ':HOPE_FORECAST_CONTROL.SALES_CHANNEL' ); 

      Go_block('HOPE_FORECAST_DATA'); 

      dfinalstr := Get_block_property('HOPE_FORECAST_DATA', default_where); 

      Set_block_property('HOPE_FORECAST_DATA', default_where, finalstr); 

      Execute_query(); 
    ELSE 
      [color=red]fnd_message.Set_string('Please Select  Any One Of The Item'); 

      fnd_message.show; [/color]
    END IF; 
    end;


When i select without lov and click on the find button show the above message , but here when i select another (fiscal_year) click on the find button it shows 'Please Select Any One Of The Item' messages i don't need this message when i select the lov . What is the problem of the above code please suggest me.


Thank you
Re: message's in find button [message #603410 is a reply to message #603405] Mon, 16 December 2013 01:15 Go to previous messageGo to next message
Littlefoot
Messages: 21809
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
The way you put it, message is displayed when :HOPE_FORECAST_CONTROL.SALES_CHANNEL is null. If this is not the only condition that controls whether message displays or not, you'll have to include additional condition(s) into the code.
Re: message's in find button [message #603411 is a reply to message #603410] Mon, 16 December 2013 01:22 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi Littlefoot,

I changed the above and working fine now .Is this code correct? Please suggest..

DECLARE 
    finalstr  VARCHAR2(5000); 
    dfinalstr VARCHAR2(5000); 
BEGIN 
    IF :HOPE_FORECAST_CONTROL.sales_channel IS NULL THEN 
      fnd_message.Set_string('Please Select Any One Item'); 

      fnd_message.show; 
    ELSE 
      finalstr := 'WHERE 1=1'; 

      IF :HOPE_FORECAST_CONTROL.sales_channel IS NOT NULL THEN 
        finalstr := finalstr 
                    || 'AND SALES_CHANNEL =' 
                    || ( ':HOPE_FORECAST_CONTROL.SALES_CHANNEL' ); 
      END IF; 

      Go_block('HOPE_FORECAST_DATA'); 

      dfinalstr := Get_block_property('HOPE_FORECAST_DATA', default_where); 

      Set_block_property('HOPE_FORECAST_DATA', default_where, finalstr); 

      Execute_query(); 
    END IF; 
END; 


Thank You.
Re: message's in find button [message #603413 is a reply to message #603411] Mon, 16 December 2013 01:27 Go to previous messageGo to next message
Littlefoot
Messages: 21809
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Is it correct? How would I know, it is your application, you'll test it.
Re: message's in find button [message #603416 is a reply to message #603413] Mon, 16 December 2013 01:29 Go to previous message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Thank you Littlefoot.. Smile

[Updated on: Mon, 16 December 2013 01:29]

Report message to a moderator

Previous Topic: How to create finishing application using oracle form 6i
Next Topic: FRM-40735:when-button-pressed trigger raised unhandled exception ORA-06502
Goto Forum:
  


Current Time: Fri May 17 18:44:48 CDT 2024