Home » Developer & Programmer » Forms » Alert in oracle forms
Alert in oracle forms [message #608004] Fri, 14 February 2014 03:21 Go to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi all,

I want an alert please suggest me,

BEGIN
    IF inventory_item_status_code = 'Active' THEN
      SELECT item_number
      FROM   regal.regal_inv_landed_cost_tab ril
      WHERE  EXISTS (SELECT 1
                     FROM   mtl_system_items
                     WHERE  organization_id IN ( 81, 82 )
                            AND inventory_item_status_code = 'Active');
    ELSE
   fnd_message.Set_string('This item is  Inacive status please active and move  ');

   fnd_message.show;
END IF;
END;  


Is this query shows me the correct Alert?
Re: Alert in oracle forms [message #608005 is a reply to message #608004] Fri, 14 February 2014 03:25 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
How on earth would we know?
We don't have your tables.
We don't have your data.
We have no idea what you are trying to achieve.
Re: Alert in oracle forms [message #608020 is a reply to message #608005] Fri, 14 February 2014 05:59 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
I want to stop the process when i get the Alert This item is not in active status please active and move
Stop the process and but in my program , i am getting the Alert and it goes to the next process.How can i stop?

Please help.
Re: Alert in oracle forms [message #608023 is a reply to message #608020] Fri, 14 February 2014 06:18 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
Well fnd_message.Set_string is an oracle apps thing, so I have no idea what it does, I imagine there are other oracle apps functions that will cause processing to stop. Otherwise you can use raise form_trigger_failure
Re: Alert in oracle forms [message #608026 is a reply to message #608023] Fri, 14 February 2014 06:33 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
 DECLARE
    alert_button NUMBER;
    alert_button2 NUMBER; -->Added on 14-Feb-2014
    v_message    VARCHAR2(1000);
    v_count1     Number;  -->Added on 14-Feb-2014
    v_count      NUMBER := 0;
BEGIN
      IF show_alert('ACTIVE') = alert_button1 then
      SELECT  Count(1)
      INTO   v_count1
      FROM   regal_inv_landed_cost_tab ril,
             mtl_system_items mtk
      WHERE  ril.inventory_item_id = mtk.inventory_item_id
       AND ril.organization_id = mtk.organization_id
       AND ril.ORGANIZATION_ID='1381'
       AND mtk.inventory_item_status_code = 'Inactive';
     ELSE
        fnd_message.Set_string('This item is  not in active status please active and move  ');
        fnd_message.show;
        raise form_trigger_failure; 
     END IF;
     
    v_message := 'Are you sure,you want to move data into Brooklyn Warehouse?';

    Set_alert_property('BRW', alert_message_text, v_message);

    alert_button := Show_alert('BRW');   
   
    IF alert_button = alert_button1 THEN
      commit_form;

      BEGIN
          SELECT Count(1)
          INTO   v_count
          FROM   regal_inv_landed_cost_tab
          WHERE  file_number = :RHCLANDEDCOSTHEADER.file_number
                 AND selected_flag = 'Y'
                 AND brw_processed = 'Y'
                 AND orig_quantity_received = quantity_received;
      END;
      IF v_count != 0 THEN
        fnd_message.Set_string('You are selecting Processed Records. Please Check ');--testing
        fnd_message.show;
      ELSE
        submit_inv_request;
      END IF;
  END IF;

END;  


This process the submit_inv_request program, can u please help me
Re: Alert in oracle forms [message #608030 is a reply to message #608026] Fri, 14 February 2014 07:30 Go to previous message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
Can you please write a proper question.
We can't run that code, so we have no idea what it's currently doing.
Nor do we know what you expect it to do.

You need to tell us both of these things.
Previous Topic: unable to run form
Next Topic: Disable All Validations
Goto Forum:
  


Current Time: Wed Apr 24 12:36:55 CDT 2024