Which trigger to use for this?

Hello,
I have this code here that should stop the user from creating a new record (therefore not adding it to the tree) if the value of sublevel = 0.
I dont know which trigger I can use to make this kind of validation.
declare
v_group_code varchar(12);     
var number;
begin
v_group_code:= ftree.get_tree_node_property('CONTROL.GROUP_TREE',nvl(:SYSTEM.TRIGGER_NODE,1),FTREE.NODE_VALUE);
:parameter.grup_cd_selected     :=  v_group_code;
select SUB_LEVEL
into var
from pyr_group
where code = v_group_code;
if var = 0 then
          message('You cannot create group here.');
          message('You cannot create group here.');
          RAISE form_trigger_failure;
end if;
end;Thank you

Hi
This code here that should stop the user from creating a new record (therefore not adding it to the tree) if the value of sublevel = 0.Pls try to use WHEN-CREATE-RECORD Trigger
Hope this helps...
Regards,
Abdetu...

Similar Messages

  • Which trigger to use in this case

    Hello All,
    I have a form in which I have an list item STATUS
    STATUS may have values a or b or c or d
    One event should happen when user selects 'c' whose earlier status is 'b'. Here I have two doubts
    1) Which trigger I have to use
    2) How to get the old value of the STATUSi.e 'b'
    because event should fire only when the status is changed from 'b' to 'c'.
    I am using forms4.5
    Cheers

    you can use the pre-insert or pre-update-trigger. the when-validate-record is as useless for your case, because navigating out of the record/block starts the trigger before your commit.
    but the two pre-trigger fire on each insert and update. Not only, when you have to validate your data. That means you have programatically to check, if your data changed the value between query- and commit-time.
    try it
    Gerd

  • Which widgets did used for this website?

    Hi Guys
    I have just visited the http://fashionologieedina.com/index.html  nicely designed by Ptauly.
    What widget did he used for top banner (Sliding the images)? or how did he created that banner in Muse?
    regards.
    sanjay

    Hi Sanjay,
    It looks like the designer has just used a 'Blank Slideshow' widget and deselected the 'Prev/Next/Captions/Counter' options from the widget menu (the little blue arrow next to your widget) and added their own images.
    You can add your own images by clicking the folder icon on the widget menu, then enable 'Thumbnails' so you can see which pictures are in your slideshow, then select the default pictures that you don't need in your slide (usually the flower pictures) and just delete them, then turn the thumbnails back off.
    Hope this helps.
    Regards,
    Karl

  • Which trigger to use for insert data into db table in Forms

    Hi,
    My form is current having a database block with table reference. When enter data into form field and click on save button. Automatically the record is inserted into database table.
    I want to make this as manual insert. I changed the data block to a non-database. Where should i write the insert statement in order to insert data into table.
    Is it Key-commit trigger at form level?
    Please advise.
    Thanks,
    Yuvaraaj.

    Hi Yuvaraaj.
    Insert should happen when we click on the save which is inbuilt in the form. In this case where should i write the insert statement.Forms in built save commit's the form data where block is based on database not non database.
    @2nd reply
    Ypu are right. The reason i chnaged the database block to non-database is Currently i have a database block with form field canvas which insert only 1 record in to >table when we click on standard save button. The requirement was to add a field called CHANNEL which should have multiple values displayed. (i created this channel >field in a seperate datablock (non database) and used the same canvas.) When we insert data in all fields (single record) and channel we should be able to selected >multiple channel (say A,B and C) when we click on save then 3 records should be inserted in to the table which looping values for each channel. This was the actual >requirement and this is the reason why iam changing the block to non-database block.You are talking about two blocks.. 1. Master block and 2. Details block name channel
    You are inserting one record in master block then insert 3 record name A,B,C for that master record.
    Now you want master record should insert to each A,B,C record. Means
    'how are you' --master record
    and you want
    'A'- 'how are you'
    'B'- 'how are you'
    'C'- 'how are you'OR
    ?Ok. If you want master record save in database and then want to save non-database(channel) data into database USE Post-Insert trigger at block level and do the rest.
    Hope this helps...
    Hamid
    Mark correct/helpful to help others to get right answer(s).*
    Edited by: HamidHelal on Jan 26, 2013 1:20 AM

  • Which trigger to use for error logging output ?

    hello,
    is there a trigger which is executed every time
    an error occurs in report generation ?
    so that i can write the error-message via
    "TEXT_IO" to an external file every time the
    trigger fires ?
    any suggestions
    greetings
    thorsten lorenz

    No, there's no equivalent of the Forms On-Error trigger. Please see my response in your other thread for information on where the error messages can be found.
    Hope this helps,
    Danny

  • Which LayoutManager to use for this purpose.

    I am trying to set a panel inside JTableColumn. The panel consists of JTextField and a Button. The Button is very small in size and should appear in the SouthEast portion of the panel. The remaining space should be used up by JTextField. Which LayoutManager will help me achieve this. Here is a diagram of the layout of panel that I want.
    (----) stands for JTextField area and (||||) stands for the JButton.
    ------------------------|||||||||
    -------------------------------Please Note that the width of Panel is not known as it depends on the size of table column.
    regards,
    nirvan.

    Guys,
    Thanks for the replies. I achieve what I wanted using BorderLayout. Here is the program demonstrating what I was looking for. It's an SSCCE. The problem is solved.
    package com.ns;
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.FlowLayout;
    import java.awt.Toolkit;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.BorderFactory;
    import javax.swing.JButton;
    import javax.swing.JOptionPane;
    import javax.swing.JPanel;
    import javax.swing.JTextField;
    import javax.swing.WindowConstants;
    public class PropertySheetLayout extends javax.swing.JFrame {
        // Variables declaration - do not modify
        private JPanel dummyPanel;
        private JTextField inputText;
        private JButton lookUpButton;
        private JPanel outerPanel;
        // End of variables declaration
        public PropertySheetLayout() {
            initComponents();
        @SuppressWarnings("unchecked")
        // <editor-fold defaultstate="collapsed" desc="Generated Code">
        private void initComponents() {
            outerPanel = new JPanel();
            inputText = new JTextField();
            dummyPanel = new JPanel();
            lookUpButton = new JButton();
            setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
            getContentPane().setLayout(new FlowLayout());
            outerPanel.setBorder(BorderFactory.createEtchedBorder());
            outerPanel.setPreferredSize(new Dimension(150, 75));
            outerPanel.setLayout(new BorderLayout());
            inputText.setBorder(null);
            inputText.setPreferredSize(new Dimension(100, 20));
            outerPanel.add(inputText, BorderLayout.CENTER);
            dummyPanel.setBackground(Color.white);
            dummyPanel.setPreferredSize(new Dimension(25, 75));
            dummyPanel.setLayout(new BorderLayout());
            lookUpButton.setText("jButton1");
            lookUpButton.setPreferredSize(new Dimension(25, 25));
            lookUpButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    lookUpButtonActionPerformed(evt);
            dummyPanel.add(lookUpButton, BorderLayout.SOUTH);
            outerPanel.add(dummyPanel, BorderLayout.EAST);
            getContentPane().add(outerPanel);
            Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
            setBounds((screenSize.width-408)/2, (screenSize.height-334)/2, 408, 334);
        }// </editor-fold>
        private void lookUpButtonActionPerformed(ActionEvent evt) {
            inputText.setText(JOptionPane.showInputDialog("Enter your Name"));
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new PropertySheetLayout().setVisible(true);
    }regards,
    nirvan.

  • Please help...Its really urgent- Which class to use for this?

    Can someone help me with this? I want to read characters from a file
    Ultimately I want to load some information from a text file which has information like this:
    0123456789
    0
    1
    4
    10
    X0123456789
    01202120212
    11202120212
    20212021202
    I want to load the information from X onwards .. all the rows and columns in a 2D array..
    I am not able to read the file at all ...
    I tried RandomAccessFile, BufferedReader..... They had problems.....what class sould I use.. any if you can give hints how I can reach X and start reading to 2d array...... It will be really very very helpful........
    Please help......

    Hi...
    See this is the partial code
    class LanguageRecognizer
         String word;
         String fileName;
         BufferedReader reader;
         char transitionTable[][];
         char letters[];
         char startState;
         char endStates[];
         int rows;
         int columns;
         public void getFileName(String fileName_)
              /********** Create File Objects to read file ******************************/
              try{
              this.fileName = fileName_;
              java.io.BufferedReader reader = new java.io.BufferedReader(new FileReader(fileName));
                   /***** Read File **************/
                   int i;
                   int X = 0;
                        /** as long as its not the EOF **/
                        while((i=reader.read()) != -1)
                             //Print all characters
                             System.out.println((char)i);
                             if (((char)i)=='X')
                                  X = i;
                                  System.out.println("X is at "+(char)i);                         
                             }//if
                        }//while          
              catch(Exception e)
                   e.printStackTrace();
              /**Call Prompt user and ask user to enter a word****************************/
                   promptUser();
         }//getFileName()When I say
    The while loop prints this file containing:
    0123456789
    0
    1
    4
    10
    X0123456789
    01202120212
    11202120212
    20212021202
    But it prints it in this format :
    0
    1
    2
    3
    4
    5
    6
    7
    8
    9
    //Want to take this in the letter[]
    0 //want to take this as the startstate
    1 // This is the end state which could be more than one so in endState[]
    4 // This is the number of rows in the transition table
    1 // This is columns
    0
    //This is the transition table that I want in a 2D array......
    X // This is the X printed with the if() in the code
    X
    0
    1
    2
    3
    4
    5
    6
    7
    8
    9
    0
    1
    2
    0
    2
    1
    2
    0
    2
    1
    2
    1
    1
    2
    0
    2
    1
    2
    0
    2
    1
    2
    2
    0
    2
    1
    2
    0
    2
    1
    2
    0
    2
    So I want to capture each letter typed in arrays.......But I am not able to seperate them and get them in my datatypes... atleast not using this class BufferedReader.... so can I use this class and get it or which class can I use??

  • I have Mac Pro 2007, which have no bluetooth hardware. What should I do to use Apple wireless keyboard and magic mouse??? Can 'third party's internal bluetooth card' be used for this purpose? Help please...

    I have Mac Pro 2007, which have no bluetooth hardware. What should I do to use Apple wireless keyboard and magic mouse??? Can 'third party's internal bluetooth card' be used for this purpose? Help me please...

    You can find the Apple Bluetooth card on eBay for as little ten dollars (says its for the 2008 model Mac Pro, not sure about the 2007).
    http://www.ebay.com/itm/Bluetooth-Board-iMac-and-Mac-Pro-922-8233-922-8233-/1208 49278570
    Here is a link to a full explanation of the card and how to install it. Part numbers may differ a bit as that is an old article and newer models have come out.
    http://www.xlr8yourmac.com/systems/Mac_Pro/Bluetooth_MacPro_install/Bluetooth_Ma cPro_install.html
    Just make sure that the part will work in your model Mac Pro. To that end, you may be better off avoiding eBay and going to a parts reseller. There are even third party cards that use the internal Apple bluetooth slot.
    http://fastmac.com/bluetooth.php
    In theory, using a USB or PCI card will work at login so long as it is recognized by Apples drivers. You say you need to launch an application to use your current USB Bluetooth dongle? If it is not controlled by the Bluetooth icon in the menu bar then it must be using a third party driver of some sort. Unfortunately, I don't know off hand which USB and PCI cards are supported.

  • I have a licence code for Adobe CS6 Master Collection which I'm using for more  than a year, suddeny I am in trial mode (all programs)  an it seems that this code is not accepted anymore. Help needed!!

    I have a licence code for Adobe CS6 Master Collection which I'm using for more  than a year, suddeny I am in trial mode (all programs)  an it seems that this code is not accepted anymore. Help needed!!

    Chat Now button near the bottom for Activation and Deactivation problems may help
    http://helpx.adobe.com/x-productkb/policy-pricing/activation-deactivation-products.html

  • I Have to set Rej.Ind in ME47...which BADI or Exit is used for this.

    Hi experts,
                  Can anybody suggest me. If we I have to set permanent Rej.Ind in ME47, which BADI or Exit will be used for this.
    Thanks
    Pankaj

    Hello,
    Check with following BADIs. It may help.
    ME_PROCESS_PO
    ME_PROCESS_PO_CUST
    Regards
    Arindam

  • Which method is used for event creation

    Dear All,
    My client has more then one Purchase Organization. Workflow for Purchase order release very from pur org to pur org. For example - workflow WS92000030 is trigger when PO is created for India pur org where as workflow WS92000021 is trigger when PO is created for US pur org.  
    I checked and found that same Object Type - BUS2012 & event - RELEASESTEPCREATED is used in all Pur. Org PO release workflow. Also I found in Transaction code - SWETYP that Type linkage activate for  BUS2012, RELEASESTEPCREATED in all the PO workflow - WS92000030 & WS92000021.
    As per my knowledge, event can be created in various way such as Function module, Change document, General status management, Business Transaction Events etc.
    Can some one guide me, how can I found that which method is used for event creation in different pur org?
    How can I fould what is the fuctional module used for event creation if Fuctional module used for event creation. 
    For your information, I can see in T. Code - SWUO that 'Result dependent on a check function module'  for all the workflow - WS92000030, WS92000021 etc.
    Thanks in

    Hi Sahu,
    I dont think they have used the Function module or change document or any other kind of methods to trigger the workflow. This is because RELEASESTEPCREATED method is a standard method and it will be triggered by standard SAP. They can not make changes in standard sap saying RELEASESTEPCREATED should be triggered for this Purchase Org .
    Istead what i think is, they might have given the Event Condition for each workflow.
    In SWDD>> basic settings>> Start Events, we can give condition on triggering the workflow.
    Please check this.
    Regards,
    Gautham

  • What are all the tables used for this report:

    hi
    what are all the tables used for this report:
    report:
    •     <b>Stock Report, which will give opening balance, receipt, issue, and closing balance for any given Duration for any material.</b>
    thanks in advance

    Tables: MSEG, MKPF, MARD.
    FOR REFERENCE SEE TRANSACTION : MB5B.
    Message was edited by: Sharath kumar R

  • Which CKM is used for moving data from Oracle to delimited file ?

    Hi All
    Please let me know Which CKM is used for moving data from Oracle to delimited file ?
    Also is there need of defining each columns before hand in target datastore. Cant ODI take it from the oracle table itself ?

    Addy,
    A CKM is a Check KM which is used to validate data and log errors. It is not going to assist you in data movement. You will need an LKM SQL to File append as answered in another thread.
    Assuming that you have a one to one mapping, to make things simpler you can duplicate the Oracle based model and create a file based model. This will take all the column definitions from the Oracle based model.
    Alternatively, you can also use an ODI tool odiSQLUnload to dump the data to a file
    HTH

  • How to specify which cert to use for software virt server?

    Is there a way to specify which certificate to use for each software virtual server? So, for example a user hitting https://somewhere.com would get the certificate for somewhere.com while the virtual server https://somewhereelse.com would use the certifcate with the name somewhereelse.com in it?

    No, this is not possible due to limitations of the underlying protocols.
    HTTP requests are sent over TCP connections which deal with IP addresses and port numbers (i.e. hardware virtual server properties), not hostnames (i.e. software virtual server properties). The HTTP protocol adds software virtual server support by allowing a client to identify the hostname (e.g. "www.iplanet.com") of the server it wishes to communicate with. This is achieved by including a "Host:" header with each HTTP request.
    Unfortunately, the SSL/TLS protocols require that the web server present its SSL/TLS certificate BEFORE the client sends its HTTP request. Since the software virtual server information is contained in the HTTP request, it is not possible for the server to select different certificates for different software virtual servers.
    You will need to use hardware virtual servers (i.e. virtual servers that have different IP addresses and/or port numbers) if you wish to use distinct SSL/TLS certificates.

  • HT1918 I am trying to enter the No. Of my VISA card (which I normaly use for payments) in the billing info of my account and it is not accepted. Does anyone have any idea why?

    I am trying to enter the No. Of my VISA card (which I normaly use for payments) in the billing info of my account and it is not accepted. Does anyone have any idea why?

    JarleEkanger wrote:
    How about this? Use Delete array subset to extract chunks for averaging, and a shift register to retain the remaining array.
    It is typically not advisable to use "delete from array" in a tight loop. The constant memory reallocations due to array resizing are probably inefficient.
    Here's one simple way to do it..
    (If the number of points is not divisible by 10, the excess tail is discarded. You can easily modify that behavior if desired.)
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    averages of 10.png ‏5 KB
    averages of 10.vi ‏9 KB

Maybe you are looking for

  • Messages crashes upon opening since upgrading to Mavericks

    Haven't been able to find any solutions in the previous discussions about this, so I'm gonna try asking again. I don't know if it helps, but my upgrade to Mavericks from Mountain Lion didn't go smoothly, so I had to completely reinstall Mavericks and

  • How to aware a DN that has been copied to AR draft

    Dear all, When they copy a DN to an A/R, the DN is still open and the system will allow us to copy it to another A/R draft. I know if we add one A/R, the others include that DN the system will not allow us to add it. The problem is, sometimes they ha

  • ITunes slow, "Do not disconnect" and freezing - how I fixed it

    Ok, I don't know how many people this might help but I thought I would post how I managed to fix my iTunes. I was experiencing various problems. Firstly, when starting up iTunes it would just give hourglass, stop, then boot up the program 1 minute la

  • PS CS5 - Working with Variables | The Complete Picture with Julieanne Kost | Adobe TV

    In this episode of The Complete Picture, Julieanne demonstrates the incredible power of Variables in Photoshop. Learn how to cut hours of time out of your production time when you need to combine text and photographs. Although this feature has been i

  • ABAP Coding doubts in BW

    Hi All,     I wish to know the difference between  SMOD and CMOD.I wish to get the step by step screen shots of both.and also wish to know User Exits and SAP exits .Becasuse these topics are very necessary things in our on going BW Project. I expect