Post-change trigger raising when query!!

this trigger is form related: i just attach a post-change trigger with an item.
contains the following code
declare
name varchar2(50);
name1 varchar2(50);
begin
name1 :='%'||:BLK_EMP_MST.FATHER_NM||'%';
select first_nm INTO name from hrt_emp_mst
where father_nm like name1;
if(name is not null) then
MESSAGE(name||' has same father name');
MESSAGE('WARNING');
end if;
exception
when no_data_found then
null;
end;
it working fine when we insert a new record. but when i query for record, it fires, which should not be

I agree with Manu, rather than use a Post-Change trigger to validate user input, use the When-Validate-Item (WVI) trigger instead. This will allow you to validate the input from a user, but the WVI trigger won't fire when a record is queried into your block.
@Manu
POST-QUERY is kept only for backward compatibility in 10gI think you meant to say "Post-Change" instead of "Post-Query." The Post-Change trigger has been depricated, but the Post-Query trigger is still valid in all Forms versions.
Craig B-)
If someone's response is helpful or correct, please mark it accordingly.

Similar Messages

  • FRM-40735 POST- UPDATE trigger raised unhandled exception ORA- 01403

    FRM-40735 POST- UPDATE trigger raised unhandled exception ORA- 01403
    I am getting the above error when i am trying to change the Assignment Category field of
    an employee from Junior Staff to Senior Staff.
    Navigation People> Enter & Maintain> (B)Assignment.
    Kindly assist me to resolve this error.
    Plz note there is a promotion that is suppose to be given to some employees in our company as of
    01-APR-2010 so i had to open the closed payroll periods and do the changes. I managed to change for all
    the 9 employees but 1 employee's assignment is giving me an error as follows :
    FRM-40735 POST- UPDATE trigger raised unhandled exception ORA- 01403
    The error displays after i try to save the changes made to the Assignment Category from Junior Staff to Senior Staff.
    NB: i have also tried to switch off the custom code...but its giving me same error.
    Also the element links have been defined for employment category on the links window.
    please help!!
    Edited by: 594647 on Jul 20, 2010 10:26 PM

    Release 12.1.1.
    OS is Red Hat Ent Ed 4
    i am trying to change the employee assignment category from Junior to Senior. so when i am updating the assignment details on the assignment screen (Navigation is People >Enter & Maintain> Assignment) and trying to save, the system gives error on the status bar of the application as follows:
    FRM-40735 POST- UPDATE trigger raised unhandled exception ORA- 01403
    NB: Error is appearing on the Assignment screen.
    Please help!!
    Edited by: 594647 on Jul 21, 2010 2:48 PM

  • Post-change trigger alternative

    db and dev 10g rel2 ,
    hi all ,
    i want same functionality of using post-change trigger in 10g ?

    newbi_egy wrote:
    It would be easier to answer, if you would tell us what exactly is your problem. What does not work? What to you want to achieve?i've said before , how to get the same functionality of post-change trigger ?
    and i said that post-change trigger fires under these situations :
    the post-change trigger fires under these situations :
    1- The Validate the Item process determines that an item is marked as Changed and is not NULL.
    2- An operator returns a value into an item by making a selection from a list of values, and the item is not NULL.Above two points also done by When-Validate-Item trigger. so it's an alternative of Post-Change.
    3- Oracle Forms fetches a non-NULL value into an item. In this case, the When-Validate-Item trigger does not fire. If you want to circumvent this situation and effectively get rid of the Post-Change trigger, you must include a Post-Query trigger in addition to your When-Validate-Item trigger. See "Usage Notes" below.
    but when-validate-item trigger does not satisfy all these situations .Only point 3 are not satisfied by When-Validate-Item trigger. for this you need Post-Query trigger.
    It's just another clarification of Andreas answer.
    Hope it's clear now.
    Hamid

  • Post-form trigger raised unhandled exception

    I have enabled TRANSLATION and ATTACHMENTS menu on my oracle form(form customization).
    but if i click on attachment menu the window opens for attachments but when i am going to close a window it throws an exception as
    **FRM-40735: POST_FORM trigger raised unhandled exception ORA-06502**
    and it is not allowing to close an window i have to terminate application every time.
    what shall i do in this situation ????????

    Hello,
    There is a related known issue for the Qualifications form of Oracle Human Resources -
    PERWSQUA Cannot add Attachments to the Qualification Form - FRM-40735: POST-FORM trigger raised unhandled exception ORA-06502 (Doc ID 1470386.1)
    Reference the solution steps and search on your form name as opposed to the PERWSQUA.
    If still not resolved, please open an SR with the owning application of the form or for Forms Developer.
    Thank you,
    Deborah Bourgeois
    Oracle Customer Support

  • Post-change trigger problem

    I have problem with post-change trigger, i'm using Forms 10g
    I have two block, one is database block and the other is non-database block for example A is Nondatabase block and B is Database block, I have written commit_form built-in in Key-Next-Item of a item in B(database) block. When it is getting executed commit_form built-in firing the post-change trigger of a item in A(Non-database) block. I dont know why it is firing and I dont want the post-change trigger to fire (we are not assigning any value to that item in A block during commit_form).
    Can anybody help me on this..
    Regards
    Radha

    when you issue a commit_form, forms will validate all items in all blocks which re not valid at that moment. This also occurs for non-database-block.
    The question is why is the item not valid ? Are you putting something in it in some other trigger? If so, you could explicitly set the itemstate to valid with a
    SET_ITEM_PROPERTY('BLOCK.ITEM', ITEM_IS_VALID, PROPETY_TRUE);btw.. you should not use the POST-CHANGE-trigger for validations etc. its better to use the WHEN-VALIDATE-ITEM-trigger.

  • FRM-40735: illegal restricted procedure COMMIT in POST-CHANGE trigger

    I am using forms6i. I have three text fields FL1 ,*FL2* , FL3 in a form. Cursor passes from FL1 to FL2 and FL2 to FL3. I want when cursor transfers from FL1 to FL2 the form should be saved(commit). On FL1 i put COMMIT; in post-change.
    But when I pressed Enter key on FL1 it gives following error message.
    FRM-40735: illegal restricted procedure COMMIT in POST-CHANGE trigger
    Can you help me doing this.

    Gul wrote:
    I am using forms6i. I have three text fields FL1 ,*FL2* , FL3 in a form. Cursor passes from FL1 to FL2 and FL2 to FL3. I want when cursor transfers from FL1 to FL2 the form should be saved(commit). On FL1 i put COMMIT; in post-change.
    But when I pressed Enter key on FL1 it gives following error message.
    FRM-40735: illegal restricted procedure COMMIT in POST-CHANGE trigger
    Can you help me doing this.You cannot use COMMIT_FORM in post-change trigger. Because post-change only accept UN-restricted procedure. and commit is not.
    try this
    /* Trigger KEY-NEXT-ITEM on every item and write sample code */
    commit_form;
    next_item;Hope this works..
    Hamid
    Mark correct/helpful to help others to get right answer(s).*

  • POST-CHANGE TRIGGER

    Hi,
    I am using Forms Version 9.0.4.0.19.
    I created a form which consists of two blocks. Both blocks have a database field called city_code. I am trying to create a post-change trigger that would display the description and not the code of the city. Unfortunately, I keep getting no records found when I run the form although I now for certain there are records, there are records when I remove both triggers.
    Here is my code for the trigger for block1:
    =======================================================
    BEGIN
         SELECT DESCRIPTION
         INTO :INST.txtCITY
         FROM DICT
         WHERE CODE = :INST.CITY_CODE
    END;
    =======================================================
    Here is my code for the trigger for block2:
    =======================================================
    BEGIN
         SELECT DESCRIPTION
         INTO :CONTACT.txtCITY
         FROM DICT
         WHERE CODE = :CONTACT.CITY_CODE
    END;
    =======================================================
    Thanks in advance.
    VC

    Hi Again,
    I thought it worked, it didn't give me an error when I compiled it, but when I ran the form the data didn't appear. Below is my code, can somebody please help?
    DECLARE
         CURSOR LOOKUP_INST_TYPE IS SELECT DICT.DESCRIPTION
         FROM DICT
         WHERE DICT.CODE = :INSTITUTION.INST_TYPE
         AND DICT.TOPIC = 'INST_TYPE';
    BEGIN
         OPEN LOOKUP_INST_TYPE;
         FETCH LOOKUP_INST_TYPE INTO :INSTITUTION.TXTINST_TYPE;
         CLOSE LOOKUP_INST_TYPE;
    END;

  • Post Change trigger issue

    I placed a post change(Item level) trigger to LOV enable item(deptno) and insert the following code there.
    But as expected other block items (dname, loc) of dept block won't come to the form once change the LOV.
    ------------------ code --------------------
    BEGIN
         SET_BLOCK_PROPERTY('dept',DEFAULT_WHERE, 'deptno = ' || :dept.deptno);
         EXECUTE_QUERY;
    END;
    Any solutions
    thax
    Shabar

    shabar,
    the EXECUTE_QUERY cannot be given in POST-CHANGE Trigger.
    I think your requirement is this.
    some departments were already saved.
    if some one tries to create new department with old deptcode, then the actual department details should retrieve.
    if this is the case, then, give the code in the KEY-NEXT-ITEM Trigger.
    and if the deptno field is varchar, then u have to change the code like this,
    DECLARE
    CURSOR Cur_Dept IS SELECT DEPTNO FROM DEPT WHERE DEPTNO = :DEPT.DEPTNO;
    Str_Deptno VARCHAR2(20);
    BEGIN
    IF :DEPT.DEPTNO IS NOT NULL THEN
    OPEN Cur_Dept;
    FETCH Cur_Dept INTO Str_Deptno;
    IF Str_Deptno IS NOT NULL THEN
    SET_BLOCK_PROPERTY('DEPT', DEFAULT_WHERE, 'DEPTNO = ''' || :DEPT.DEPTNO || '''');
    CLEAR_BLOCK(NO_COMMIT);
    EXECUTE_QUERY;
    END IF;
    END IF;
    END;
    Its better to check whether the DEPTNO is valid or not.
    Regards,
    Manu.

  • JClient equivalent post-change trigger and JTextField issue.

    Hi,
    JClient 10.1.2
    What is the equivalent event listener I could use to obtain the forms post-change functionality?
    With following components:
    JTextField
    JComboBox
    JCheckBox
    For example on a JComboBox I would like to display a warning message dialog if a special value has been selected.
    I've tried using itemStateChanged method on a combo box but the message dialog is displayed everytime the row gains currency.
    Should I use focusGained to store the previous value and in the focusLosted method, check for a change?
    What would you recommend?
    One more question on JTextField, what is the method to track "global changes".
    I've tried using the DocumentListener, but the methods changedUpdate,insertUpdate and removedUpdate are fired on each keyboard action.
    Is there a way to track "global changes" on the whole text?
    Thanks
    Frederic

    You can work at setAttribute (Vo or Entity) level.
    You should be carefull, however, because in a cliente server environment it looks like the forms post-change event but in a 3 tier J2EE environment it's a server event and is not possible to interact with the screen in processing that event.
    Any other comment is wellcome.
    Bye
    Tullio

  • Sir how I avoid I this error FRM-40735: POST-QUERY trigger raised unhandled

    Hi master
    Sir this error crate may problem for me
    FRM-40735: POST-QUERY trigger raised unhandled exception ORA-01403
    sir how I avoid I this error and show my message
    or system not show this error and bypass this error
    please send me code how I avoid this error
    thanks
    aamir

    There may be many causes of this error. You better diagnose and remove them.
    1- A field length may be less than what your query return a data into it.
    2- A POST-CHANGE trigger on any data may return un-desired data (character into numrice field, longer value than a field etc).
    likewise.
    Regards
    Sayeed
    [email protected]

  • What's wrong with "Post-Change" anyway?

    Post-change has been fading out since Forms 4.5 (maybe earlier). We are now supposed to use "WHEN-VALIDATE_ITEM" AND "POST-QUERY" to do the same job.
    Our company uses Post-change a lot to complete description fields (example: "Unit Description" for the "UNIT_CODE" field on "SALE". When the user enters a new UNIT_CODE OR a UNIT_CODE is returned from a query, we use POST-CHANGE on UNIT_CODE to populate the (non-base table) UNIT_DESCRIPTION field). We have hundreds of occurrences like this in our application.
    Now Oracle want to make us use two triggers when one is perfectly sufficient for the job but is now being phased out. This means we will need to either duplicate the code ("select unit_descr into :sale.unit_description from unit where unit_code = :sale.unit_code;") in two triggers or create a separate function and call it from both triggers. Neither of these options sounds good to us.
    Can anyone explain why post-change is being phased out? Will it ever actually go? (It's still there in Forms 9i)
    Cheers,
    Tim.

    Tim,
    From what I remember (it's been a while since I've done any Forms) the Post-Change trigger doesn't fire if the Item is set to NULL.
    This is fine when getting data back from the server; non-database items are populated correctly, and NULL values don't trigger any form of action.
    But, if during data input the user sets and item to NULL the Post-Change trigger does not fire, and so doesn't clear out you non-database item, or do whatever else you wanted.
    If you have the opportunity I would recommend changing the code to use When-Validate-Item and Post-Query. As you say, you don't want to duplicate code, so you'll need some common functions.
    An approach that I favour is to create one package per database block, with one procedure per item, into which you can pass an "Event Name". eg: for the EMP block...
    Post-Query:  begin
        emp_pkg.latest_hire_date('POST-QUERY');
      end;When-Validate-Item:  begin
        emp_pkg.latest_hire_date('WHEN-VALIDATE-ITEM');
      end;emp_pkg Package:  package body emp_pkg
      is
        procedure latest_hire_date
          ( p_event in varchar2 )
        is
        begin
          if (p_event = 'POST-QUERY')
          then
          elsif (p_event = 'WHEN-VALIDA[i][pre]Long postings are being truncated to ~1 kB at this time.

  • Master Detail Relationship and Posting changes!

    I have a "MAster" medical-procedure block, and an "Detail" items block. The items block, being the detail block, in the master detail relationship shows the items used during the medical procedure. Both the master and detaqil blocks are based on stored procedures.
    Problem: I have multiple medical procedures (multi record master) and many items associated with the procedure (multi record detail). If I ask the user to "SAVE" the changes, after every detail entry ( for the correspondin master), it becomes a "PAIN" for the user. He wants to be able to choose a procedure, choose the details(items) associated with that procedure, and move on to the next master record, (the next medical procedure) , select it, if he performed that procedure, choose its corresponding detail items, "WITHOUT SAVING IN BETWEEN" navigation between the master records / "MEDICAL PROCEDURES"!
    1. Is it better to go for a master-detail relationship? If so, how do I prevent the "Please save the changes" when navigating between master records and ALSO save the details, without doing the "SAVE" multiple times. Can I go for a post ?..If so where? When-new_record instance/ any "Form level trigger"?
    2. If I do the go_block('dtl blk name'); execute_query; thing to coordinate between blocks, and "post" changes in the when -new -record-instance of master, the detail complains of a null value when I move from a medical procedure to another medical procedure which is not actually performed.
    I hope I make sense, any suggestions , "Welcome"!
    Thanks!

    Hi,
    I'd suggest to check this tutorial:
    http://www.oracle.com/technology/obe/obe_as_10g/bi/forms/formsmasterdetailobe.htm
    Having a relationship between data blocks, coordinates dml actions in both, so no coding is needed to save/update/delete records, forms built-ins do the work.
    hope this is useful,
    Hugo

  • Cannot use GO_ITEM, GO_BLOCK in POST-CHANGE

    It is quite difficult to control the flow if I cannot use GO_ITEM, GO_BLOCK in POST-CHANGE trigger, is there alternative way?

    This really is an old chestnut. In the days of character mode many people used to put such code in key-triggers, which meant large numbers of triggers, possible loopholes, and a nightmare when it came to conversion to mouse navigation.
    After using various methods in the past, I have now standardised on using a FORM-LEVEL WHEN-NEW-ITEM-INSTANCE trigger in all of my new forms. Although I originally did this because I wanted to highlight the current field, I have since found it very useful for doing other things. If I want to navigate as a result of WHEN-VALIDATE-WHATEVER I set a variable to the name of the item I want to go to (could use a global but I prefer packaged variables). The W-N-I-I trigger reads the variable and does the GO-ITEM (and of course nullifies the variable).
    I also agree with Steve, POST-CHANGE is oldy-fashioned and not really the right thing to use.

  • Posting Changes Issue

    Dear All,
    What are the settings required regarding Posting Changes in WM when I do a transfer posting using Mov.type 309 & 311 in IM inorder to generate Posting changes in WM ?
    Regards,

    Hi Vineet,
    Thanks a lot for the response.
    Actually I am new to WM & now configuring WM in my test server.
    I have already made all the settings which you have mentioned above. The issue is when I do a transfer posting using 309 or 311 I am getting the following error
    ' Storage type 002 not suitable as an interface (SU management is active) '
    For the WM mov type - 309 I tried by assiging the source storage as 002 & bin as well as with 002 only.
    I have mentioned the destination storage type as 922 with dynamic indiactor as D storage bin.
    Note : When I didnt assign any source storage type in my mov.type 309 then I am getting the error  'storage bin 001 (warehouse no) doesnt exist check your entry'
    I.e system is not determing the source storage type using the storage search table.
    Hope its clear.
    Please advise where I am goin wrong & how to solve this issue.
    Regards,

  • Clearing posting change notices

    Hi All,
    I'm trying to close out posting change notices manually by marking the status as U through LU02. Not able to create TO and clear this as the stock is no longer available and these are very old ones.
    The problem is that the source and destination data are the same and its throwing an error.
    Can you suggest any ways to clear these open posting changes
    Regards,
    Ashwin

    Sap provided corrrection program to clear the posting change notices.Develop this program in your system then check.We are using 4.6c version.
    To set the posting change in question to processed (U), please
    implement the following correction program in your system.
    1) Create program 'ZLTEST00' with type '1' and application 'L' with the
    following code:
    report zltest00.
    tables: lubu.
    parameters: w-no like lubu-lgnum, "warehouse number
    post-no like lubu-ubnum, "posting change notice
    status like lubu-statu, "status
    update. "update
    select single * from lubu where lgnum = w-no
    and ubnum = post-no.
    write: / lubu-lgnum,
    lubu-ubnum,
    'Status old >', lubu-statu,
    'Status new >', status.
    if update ne space.
    update lubu set statu = status
    where lgnum = w-no
    and ubnum = post-no.
    if sy-subrc = 0.
    write: / 'Update posting change notice'.
    else.
    write: / 'No update posting change notice'.
    endif.
    else.
    write: / 'No update posting change notice'.
    endif.
    To run above correction program:
    1) You have to indicate warehouse number, posting change number and the
    status which you want to set in the posting change.
    2) Without including the UPDATE-parameter, the program only shows the
    posting change, or
    3) When you mark the parameter UPDATE then the posting change will be
    changed.

Maybe you are looking for

  • Big problem with ipod nano

    It won't switch on unless you plug it into a computer but when you do it flicks between 3 screens before turning itself off. Its brings the apple screen for 1 second, the do not disconnect for 1 second and then then folder and exclamation screen for

  • Problems in File Content Conversion

    Hello,      I am trying to convert a text file to an XML using File Content Conversion in XI 3.0.    The incoming text file gets picked up but no message is sent and hence no message is received in the monitor.I get the following log- <b>Success</b>

  • Apex Migration

    Hi Team. We have this  APEX setup 1. DB 10.2.0.1 - Enterprise Edition 2. Apex 3.2.1 3. RHEL 4 Now we plan to move from Enterprise edtion DB to SE1 DB version . So wanted some help , how should be going about doing this migration Will this plan work 1

  • RMI-IIOP JNDI lookup returns com.sun.corba.se.internal.iiop.CDRInputStream

    I have two different RMI-IIOP java clients, one is working fine and the other is not. Both are using weblogic.jndi.WLInitialContextFactory from wlclient.jar in WLS 8.1sp5 and JDK 1.4.2_6. One java client is a straight-forward java main. JNDI lookup i

  • Why is my GarageBand sound out of editing sync?

    I'm a teacher who's fairly new to GarageBand and a problem keeps popping out for some of my students that's driving me nuts: the regions become out of sync with themselves and start playing/editing before the playhead even reaches the section. I'm ad