FRM-40737: Illegal restricted procedure (Ver 9.0.2.7.0)

My form updates State code data. I get state from the from, perform query and populate the form myself. After the last field is entered I perform the update query, then a commit. This error is on the commit.
Help!

Jose,
Some built-ins cannot be called during other processing (such as in the Pre- and Post- commit related triggers). All built-ins are labelled as "Restricted" or "Un-Restricted" This determines if they can be used when Forms is doing something else such as committing or executing a query.
See the topic "Restricted Built-in Subprograms" in the help

Similar Messages

  • FRM-40737: illegal restricted procedure COMMIT in POST-TEXT-ITEM trigger

    Hi All,
    I tried to execute an insert statement in a POST-TEXT-ITEM trigger and use commit to save data in the db but this error appeared:
    FRM-40737: illegal restricted procedure COMMIT in POST-TEXT-ITEM trigger
    How to solve it? OR how to save every text item value entered in the database?

    I don't fully understand, why you need to insert records on post-text-item, but the possible solution is:
    Write a DB procedure which does insert and commits it.
    Call this procedure in post-text-item.
    Problems will occur if your procedure is modifying the table columns, which are used in form. Form will notice that values in DB have changed and you will have "Record has been changed by another user. Please requery to see changes" error. But if records, affected by DB procedures, are not used in form, the wverything will be OK.

  • FRM-40737:illegal restricted procedure COMMIT in WHEN-VALID_RECORD trigger

    Hello,
    I added the following code in Custom.pll, Event procedure. When Internet Expenses responsibility is added to a user on the User form in System Administrator repsonsibility, his default account will be populated from costing. I received error, "FRM-40737:illegal restricted procedure COMMIT in WHEN-VALID_RECORD trigger",
    when enter Internet Expenses in the Responsibility field and tab. Even though the account was populated right, the responsibility is not able to save to the form.
    /* When the employee id given Internet Expense responsibility, create appropriate expense account for the employee from costing */
    if(event_name='WHEN-VALIDATE-RECORD') then
    if(form_name ='FNDSCAUS' and block_name ='USER_RESP') then
    p_responsibility_id := to_number(name_in('USER_RESP.RESPONSIBILITY_ID'));
    --p_responsibility_name := name_in('USER_RESP.RESPONSIBILITY_NAME');
    p_user_id := to_number(name_in('USER_RESP.USER_ID'));
    if (p_responsibility_id = 22918) then
    select employee_id
    into p_person_id
    from fnd_user
    where user_id = p_user_id;
    apps.cov_oie_pkg.update_emp_exp_act(p_person_id);
    commit;
    end if;
    end if;
    end if;
    Any suggestion will be highly appreciated!
    Yan

    You are calling 'COMMIT' after your custom package. You cannot use COMMIT in when-validate triggers. Did you try taking out COMMIT and save the record?

  • FRM 40737: Illegal Restricted Procedure   in !!! HELPPP

    Hi:
    I have to use a program unit in Pre-Insert/ Pre-update triggers. That program unit calls some restricted built ins. Hence whenever I am using that program unit in validation triggers its giving
    FRM 40737 - Illegal restricted procedure FIRST_RECORD in PRE-INSERT/PRE-UPDATE
    Can somebody help.
    came to know that using timer can help. can somebody explain what is the alternative or how to use the timer in this case(if its of any help)?????
    thanks

    I don't fully understand, why you need to insert records on post-text-item, but the possible solution is:
    Write a DB procedure which does insert and commits it.
    Call this procedure in post-text-item.
    Problems will occur if your procedure is modifying the table columns, which are used in form. Form will notice that values in DB have changed and you will have "Record has been changed by another user. Please requery to see changes" error. But if records, affected by DB procedures, are not used in form, the wverything will be OK.

  • FRM:40737 Illegal restricted procedure ERASE in WHEN VALDATE-RECORD trigger

    Hi
    I am getting this error when I enter the Sales Order and try to save it sometimes.
    Can anyone please tell me how I can avoid this and what is the reason for this error?
    Sachin

    ok, then it is an apps problem.
    can you copy the question in the EBS-Forum ?
    General

  • 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).*

  • ON-VALIDATE-ITEM 40737: Illegal restricted procedure COMMIT in WHEN-VALIDAT

    Dear All Expersts,
    In a form we want to update another table ON-VALIDATE-ITEM Or POST-UPDATE or POST-INSERT Event
    Could you please guide us can we do this without any error message i.e
    ON-VALIDATE-ITEM
    40737: Illegal restricted procedure COMMIT in WHEN-VALIDATE-ITEM trigger.
    Please guide.
    Thanks & Best Regards
    Eidy

    Eidy,
    Ok, for one thing, the Post-Update and Post-Insert triggers fire during the Post and Commit Transaction processing so it doesn't make any sense that you would attempt to issue a COMMIT in either of these triggers because it is already in the process of COMMITING.
    I think it would be best if you explain what it is you what to accomplish rather than how you are trying to accomplish the task. Then we will know why you are attempting a COMMIT (Restricted Built-in) in a When-Validate-Item trigger (will allows DML, Select, and Unrestricted calls).
    If you intent is to update/insert a record into a seperate table (say for auditing purposes) when a user changes a value in a different block (table) item - perhaps an After Update/Insert trigger on the database table would be a better option. This makes the secondary update/insert automatic and you don't have to code it in all of your forms.
    Again, like I said - if you tell us what you are trying to do, we can tell you if you are going about it the right way.
    @DanielB - All I can says is HUH?
    Craig...

  • Illegal restricted procedure Synchronize - error in webforms

    Hi All,
    When trying to open a webform (Oracle 9i/10g) with a field having synchronize built-in in the when-validate-item trigger, I am getting an error "Frm-40737:Illegal restricted procedure SYNCHRONIZE in WHEN-VALIDATE-ITEM trigger".
    Is Synchronize restricted procedure in webform (Oracle manual shows as unrestricted procedure)?
    This happens in some other forms while committing, but transaction is saved.
    Your suggestions on this will be highly appreciated.
    Gopalakrishnan.

    We had the same issue after converting from 6i to 10g. Sometimes 10g is blocking a SYNCHRONIZE in a WHEN-VALIDATE-ITEM as restricted. Forms 10g is wrong as SYNCHRONIZE is not (and has never been) a restricted built-in.
    I could never make it into a simple reproducable testcase to show to Oracle. In our case we could safely remove the SYNCHRONIZE built-ins from the code. Most of the times they were added in the past to workaround bugs in Forms 4.5 or 5.x.
    On MetaLink you can find a couple of bugs in Oracle Applications running into the same issue and they were also resolved by removing the call to SYNCHRONIZE. I also find bug 1577072 (open since 2001)
    If you need further assistance you'll probably have to log an iTAR at http://metalink.oracle.com

  • FRM40737: Illegal restricted procedure SET_WINDOW_PROPERTY in...

    FRM40737: Illegal restricted procedure SET_WINDOW_PROPERTY in WHEN_VALIDATE_ITEM trigger
    the code inside my when-validate is as follows:
    declare
         button number;
    begin
    if :gse_packing_list_edit.carton_ref is null then
         button :=show_alert('carton_ref');
    else
    delete from A
    where
    PL_NO = :block.PL_NO AND
    CARTON_REF = :block.CARTON_REF AND
    ITEM = :block.ITEM;
    show_window('pop_up_window');
    go_block('pop_up');
    go_block('B');
    execute_query;
    end if;
    end;
    this was originally a code for a button that worked perfectly, when i decided that i would call the window automatically when text was entered in it.
    how can i do this now?

    thanks fro the reply francois
    but the bit that still puzzles me is the fact that oracle_forms gives me the feedback that im calling SET_WINDOW_PROPERTY
    since i'm not calling it directly, i am assuming that it is being called by something else in my code and the show_window(..) seems to be the one. Oracle documentation however tells me that this is a unrestricted procedure.
    anyways.... the go_item/block will cause a problem anyway.. I've heard about the timer thing.. but not too sure how to go about doing it..
    will appreciate your response in this regards
    thanks

  • I am getting frm :40737 because go_block

    Hello World,
    I have a form with master block and details , the detail block as a tabular.
    I want the detail block to track the changes on the master , like if the user updated on a particular item on the master the detail keep the username and date.
    i put the below code as a POST-TEXT-ITEM trigger on the item on the master
    DECLARE
    V_TOT_RECORD NUMBER := 1;
    V_COUNT NUMBER := 1;
    BEGIN
    V_TOT_RECORD := GET_BLOCK_PROPERTY('BLK2', QUERY_HITS);
    GO_BLOCK('BLK2');
    FIRST_RECORD;
    WHILE V_COUNT <= V_TOT_RECORD LOOP
    IF :BLK2.CFT_PROC_STATUS IS NULL THEN
         :blk2.cft_serial:=V_COUNT;
         :BLK2.CFT_PROC_STATUS:=:BLK1.CFU_STATUS;
         :BLK2.CFT_USER_ID:=:BLK1.CFU_USER_ID;
         :BLK2.CFT_DATE:=:BLK1.CFU_DATE;
    END IF ;
    IF V_COUNT = V_TOT_RECORD THEN
    EXIT;
    END IF;
    IF V_COUNT = V_TOT_RECORD THEN
    EXIT;
    ELSE
    NEXT_RECORD;
    END IF;
    V_COUNT := V_COUNT + 1;
    END LOOP;
    END;
    but i am getting this error
    FRM:40737 illegal restricted procedure GO_BLOCK in POST-TEXT-ITEM trigger.
    Help please

    but i am getting this errorFRM:40737 illegal restricted procedure GO_BLOCK in POST-TEXT-ITEM trigger.>
    Take a look at the Forms Help on the Post-Text-Item trigger to see which built-ins are allowed. Calling a Restricted built-in like GO_BLOCK in certain triggers could cause endless loops and other adverse side-affects. You could use a Zero (0) millisecond Timer to execute the restricted built-in(s) as this is a common work-around, but I would recommend you look into other alternatives to tracking these changes that don't required you to navigate between blocks.
    Why do you need to have the Detail block keep track of changes in the Master block? Also, it is always helpful to at least include your Forms version when asking a question. :)
    Craig...

  • ISSUE_ROLLBACK gives FRM-40737 in 10g

    Hi,
    I'm in the process of migrating to the new version of Appserver from 9.03 to 10.1.2
    I got the application running fine except for this error.
    In a form we have ISSUE_ROLLBACK('bysave') in ON_ROLLBACK trigger. It gives the error FRM-40737 Illegal restricted procedure ROLLBACK_NR in ON_ROLLBACK trigger.
    Online help says that ISSUE_ROLLBACK is not a restricted procedure.
    It works fine in the previous version of Application server environment which is 9.0.3.
    Any workaround?
    Thanks in advance
    Lakshmi

    In addition to the ISSUE_ROLLBACK the trigger had the plain ROLLBACK statement.
    I think the new version of forms did not like that. I changed the rollback statement to forms_ddl('rollback') and the error went away.
    Thanks for your responses

  • Go_item(:detail.item) after query(F7) in master, frm-40737

    Dear friends,
    I have a master block and a detail block. When the master block ist queried, I want to go to a disticnt item in detail block, if there are records. Therefore I tried to put code in the post_query of the detail_block, which caused error frm-40737:
    if :evm_jn_lief_artikel_lagort.lagort_id is null then
    go_item('evm_a_liefrant.liefrant_uk');
    else
    go_item('lieferschein.belegnr')
    end if;
    error message says, that I cannot call the restricted procedure go_item in post_query.
    okay, but where can I put this code that it is called automatically after query?
    Thanks
    Silke

    Thank you I tried it, principally it works, but there is a problem left. This is my code in key_exeqry of detail:
    execute_query;
    message('execute_query, lagort_id: ' || :evm_jn_lief_artikel_lagort.lagort_id);
    message('execute_query, lagort_id: ' || :evm_jn_lief_artikel_lagort.lagort_id);
    if :evm_jn_lief_artikel_lagort.lagort_id is null then
         -- keine Artikel am lagerort
         go_item('evm_a_liefrant.liefrant_uk');
         message('evm_a_liefrant.liefrant_uk');
         message('evm_a_liefrant.liefrant_uk');
    else
         go_item('lieferschein.belegnr');
         message('lieferschein.belegnr');
         message('lieferschein.belegnr');
    end if;     
    When t´here are records in the detail block else is choosen, but forms doesn't go the item!
    The 'old' item (from where F8 was pressed) stays activated.

  • FRM-40737 Error, While using COMMIT_FORM

    Hi,
    Please guide for the following:
    In a form, I have two data blocks,namely master and detail.
    In PRE-INSERT trigger of master block, I am using GO_BLOCK('detail').
    The form has a SAVE_BTN also, in save_btn i am using COMMIT_FORM.
    When user clicks save-btn , FRM-40737 error is generating.
    Please help.
    Regards,

    You can't use go_block in a pre-insert trigger - it is a restricted built-in.
    When you commit, the Form will save all the changes regardless of which block they are in.
    Steve

  • Restrictive and non-restrictive procedures!

    Hi all,
    Wanted to knwo what are restrictive and non-restrictive procedures in oracle forms.
    Thanks and Regards

    I think where Frank said "one-time triggers" he meant "non_repeating TIMERS".
    Here is an alternative way to get around the restricted built-in problem which does not seem to be widely known:
    Create two numeric control fields, say TRIGGERING_FIELD and TRIGGERED_FIELD.
    TRIGGERED_FIELD has a formula calculation property of
    MY_FUNCTION(:TRIGGERING_FIELD)
    MY_FUNCTION is created in the form program units and can do anything you want, including restricted built-ins. The value it actually returns is irrelevant (although you could use it as a return code if you want).
    Then all you need to do is modify the value of TRIGGERING_FIELD (perhaps multiply it by -1 ) which you can do in a trigger that does not allow restricted built-ins. The calculation will see that its input parameter has changed and will recalculate, thus running the function and doing all the restricted stuff.

  • Why are there restricted procedures in forms?

    I accept it as a fact that they exist. But it would be a lot less annoying to me when I am restricted by them to understand the reason for there existence.
    Would somebody please point me to some resource that explains the reason for the existence of restricted procedures in Oracle Forms.

    Honestly, we didn't put that restriction in just for the hell of it ;o)
    The reason is actually very sound. Many triggers involve internal navigation by Forms. If you override this you can "break" where Forms thinks the current item is and where it infact really is...It also stops you jumping out of places where you need to stay..
    Having said that there is a work around - if you need to use a restriced built in, instead create a trigger that fired and then put the code in the WHEN-TIMER-EXPIRED trigger.
    Hope that helps
    Regards
    Grant Ronald
    Oracle Product Management

Maybe you are looking for