What trigger to use?

Hello,
where can i put this code?
declare
     v_cnt integer;
begin
     select count (*) into v_cnt from salarii where an=to_number(to_char(sysdate,'YYYY')) and luna=to_number(to_char(sysdate,'MM')) and id_angajat=:angajati.id;
     if v_cnt>0 then set_item_property('control.btn_salariu',enabled,property_false);
     end if;
end;i need some when-navigate-.... trigger, so when navigating into records i wanna execute that code, to check that 'if'.
Thanks

i wanna set a button disabled if that v_cnt>0. this when navigating into records (when moving to the next record). so everytime i change the current record, i wanna that code being executed and if v_cnt > 0 then that button should be disabled.
Regards.

Similar Messages

  • What trigger to use when wanting to form commit information

    Want to commit information from form to database.
    Only appears I can use when button push
    The on validate record does not facilitate form commit
    In previous forms versions used a post update trigger
    however this one is not valid/recommended anymore.
    THX IN ADVANCE

    Thank you Sanjay for your response. I am currently using When Validate Trigger. It works for all the scenarios except when order line is cancelled.
    When line cancelled I should rewrite the order quantity to 0 and save then only DFF's are updating to 0's.
    Thanks,

  • What trigger fires when a new record is requested?

    I'm trying to clear out a detail block when the user hits the button to enter a new record and cannot figure out what trigger to use or how to clear this block.
    This is a very old application and I don't even know what forms version it is in...
    Thanks, Scott

    If you don't even know the version, how can you modify the form at all?
    Check the code in the on-clear-details trigger if the form is a normal master-detail form. Clearing the detail block should be done automatically. From the manual:
    "Form Builder creates the On-Clear-Details trigger automatically when a Master/Detail block relation is defined. "
    If the form was created with its own logic to synchronize master and detail, you first have to figure out how that was done. Look for key-down, key-up, key-nxtrec etc.

  • What trigger should I use if I want to keep record amendment log?

    I am a newbie to Oracle forms, I would like to raise a simple question here ... hope you won't mind ... I have a form interface which accepts user input to record attributes for an object (e.g. personal information of a user). Now, because the importance of data, I was required to write log records in a journal table for changes made on the data. What trigger am I recommended to place and use?
    Thanks for any replies!

    Duncan, thanks for your reply first. However, I have two queries:
    1) Any generic event state to indicate change of record rather than 'POST-INSERT', 'POST-UPDATE' and 'POST-DELETE'?
    2) Given that I use the 'POST' event, how can I get the pre-update value? (My log record is supposed to record the before-update value)
    Thanks for your reply!

  • Whats is the use of SM64 Tcode?? and about Trigger Event???

    Hi
    Whats is the use of SM64 Tcode?? and about Trigger Event???
    Can anyone tell me??
    Thanks & Regards
    Senthil

    Hi,
    When scheduling a background job, you can specify it to start "after event".
    If you do so, you'll have to create an event in SM62.
    If a job is scheduled after event event and you trigger the event with SM64, the job will start.
    Events can be raised by external systems in SAP by sending a command to a SAP application server. You can also raise event in any program using function mosule BP_EVENT_RAISE.
    hope this helps....
    Olivier.

  • What is he use of TIMED_TRIGGER ui element?

    Hi all,
    can u tell me what is the use of TIMED_TRIGGER ui element and why we will use it. and in which scenarios we will use this ui element
    regards
    naveen
    Moderator Message: I have no idea what you are playing at but you have asked the same question in 3 different threads which is against the forum rules. I am locking this thread and keeping a close eye on your further activities.
    Edited by: Neil Gardiner on Nov 22, 2010 8:50 PM

    Hi,
    As the name suggests, automatically and periodically triggers an event with a specified delay.
    [Timmed trigger|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/da/a6884121a41c09e10000000a155106/content.htm]

  • What is the use of production order without material?

    Hi gurus,
    can anyone plz tell what is the use of production order without material?
    n steps involve to perform this task?

    Dear amnpp,
    It's widely used for capturing the rework activities(components and activity cost),both for final rework and inprocess rework
    activities.
    Check these links,
    Rework order manually (not Trigger)
    rework order
    Rework Order Steps
    Re: Coustomization order type for Rework
    Regards
    Mangalraj.S

  • Firefox keeps asking me what program to use to open file types even though I have selected one and checked "do this for all files of this type" going foward

    I am working in Windows and every time I open an attachment, Firefox asks what program to use to open files of this type. I always select the proper program and then check the box that says use this program for all future files of this type. In spite of that, the program continues to ask for every file. How do I turn off this feature and just have the program remember the correct program to use for each type of file extension?

    Regardless of your download preferences, web servers can trigger a download prompt by sending either the ''Content-Type: application/octet-stream'' or the ''Content-Disposition: attachment'' header. You can check if that's the case by examining the server response headers in the [https://developer.mozilla.org/docs/Tools/Web_Console Web Console].
    For the latter problem install the InlineDisposition add-on and see if it helps.
    * https://addons.mozilla.org/firefox/addon/inlinedisposition/
    If the problem persists, post back here with either an example link or a screenshot of the relevant response headers in the Web Console.
    * [[How do I create a screenshot of my problem?]]

  • What is the use of MAIN WINDOW in SCRIPTS

    what is the use of MAIN WINDOW in SCRIPTS, y we con't create a script w/o main window.
    Title was edited by:
            Alvaro Tejada Galindo

    Hi
    See this
    What are the different types of windows in SAP Scripts?
    Windows are defined in the Layout sets which define the position and the text to displayed.
    The different types of windows are:
    MAIN - Main Window
    The main window is a continous window which can extend over several pages. If the text in the main window fills up a page, a new page is created.
    Only one main window can be defined in the SAP Script whereas upto 100 instances of main window can be created in a page.
    VAR - Variable Window
    This window can have the variable contents displayed on them. The contents of the window cannot exceed the window size. The content can be formatted for each page.
    CONST - Constant Window
    The constant window can have a fixed content and is formatted only once.
    Main Windows (MAIN)
    Each form must have one window of type MAIN. Such a window is called the main window of the form. For SAPscript forms, the main window has a central meaning:
    • It controls the page break.
    • It contains the text body that may cover several pages.
    • It allows to fix text elements at the upper and lower margins of the allocated page window (for example, for column headings).
    As soon as a window of type MAIN is full, SAPscript automatically triggers a page break and continues to output the remaining text in the main window of the subsequent page. Page windows of type MAIN have the same width throughout the form. The SAPscript composer thus avoids reformatting of the text after each page break.
    Variable Windows (VAR)
    The contents of variable windows is processed again for each page, on which the window appears. The system outputs only as much text as fits into the window. Text exceeding the window size is truncated; the system does not trigger a page break. Unlike constant windows, the page windows declared as variable windows may have different sizes on different form pages.
    Constant Windows (CONST)
    Starting with Release 4.0, the system internally processes windows of type CONST similar to windows of type VAR. Therefore, if you create a new window, always use type VAR.
    <b><REMOVED BY MODERATOR></b>
    Anji
    Message was edited by:
            Alvaro Tejada Galindo

  • Digital stimulus-f​requency response: Need to drive with digital output trigger. Using counters for response.

    I need to drive stimulus-response with a software driven digital trigger and NI-TIO counter based response. No analog I/O is really relevant, although I have a PCI-6035E multi-function DAQ as part of my gear. I intend to use the analog, but its timing is non-critical and can be software timed.
    The real trick is that I want to set the basic timing of the system (in the range of 1 - 50Hz) from the timer0 on the 6035E. This signal needs to be replicated to drive a trigger pulse and to route through RTSI (or a PFI) to trigger frequency counts using the four possible groups of counter/timers on the 6602.
    What I need is:
    while( enabled )
    Repeat at (
    software controllable rate = 1-50Hz)
    Trigger Sets a PFI line for 10-20us
    same trigger sets an RTSI line
    - Software Set Delay (usually zero)- stable is more important than the delay time!
    Count for software set time on 4 counters
    analog samples
    Post-process
    I want to do this in LabView. I have checked out the Advanced sychronization demos online, but the examples all use analog triggering and buffered digital I/O. This doesn't really address what I need to do.
    I have made some failed attempts which relied on software to sync up the trigger and the response frequency acquisition. This is definately flawed. I need to start the counting right after setting the digital output trigger, and stop the count after a fixed interval for frequency calculation.
    I am having trouble working through the signal routing to get the timing to trigger off the digital stimulus output pulse.
    Any help would be appreciated
    Thanks,
    Joe

    Joe
    What are you using the trigger from the 6035E for? I do not know what you mean by, "to trigger frequency countes."
    If you are having problems just routing the signal to the 6602, here is a vi that shows you how to route a signal through the RTSI cable to use as the source of a counter.
    Brian
    Attachments:
    Route_RTSI_to_Source.vi ‏67 KB

  • What trigger is called?

    While navigating through my form I get a message
    "One or more blocks have changed would you like to save your changes?"
    I choose [Yes]
    Then another message pops up
    "FRM-40400: Transaction complete: 1 records applied and saved."
    I choose [Ok]
    Then I loose focus on the form. I want to know what trigger is called after those events so I can set the focus back to where I was so I do not need to use the mouse to regain focus.
    Thanks

    When they were running from Oracle Applications 11.5.10.2 - Forms Server 6.0.8.28.0, the focus would return to the field that was selected when the messages popped up.
    Now we are on Oracle Applications 12.1.3 - Forms Server 10.1.2.3.0 and the focus does not return to the field that was selected when the messages pop up.
    I am going to try the trigger you mentioned and report back, let me know if any more information is required.
    EDIT: Adding go_item to the trigger is not giving me any results. I even included a message box to see if the trigger was being executed and nothing happened.
    Thank you.
    Edited by: 948165 on Apr 12, 2013 11:15 AM

  • What trigger?

    Hello,
    on my form i have 2 blocks. what trigger should i use in order to display in the 2nd block(which have a where clause also) records based on the current selected record in the 1st block? i think it's about a block level trigger (of the 1st block) but i don't know which trigger. Maybe you can help me..
    Regards,
    corrected

    Hai,
    In the ON-ERROR Trigger, you will get the error no. so from there u can eliminate the message being displayed for this error.
    And Don't forget to display error messages which are not being checked.
    IF ERROR_CODE = 40350 THEN
    <what you want when query caused no records.......
    ELSE
    MESSAGE(DBMS_ERROR_TEXT);
    END IF;
    Regards,
    Manu.
    If this answer is helpful or correct, please mark it. Thanks.

  • Nextval from trigger without using DUAL

    Hi everyone,
    It is possible to obtain the nextval of a sequence from a trigger without using DUAL?
    I have a table (TABLE1) with column ID NUMBER(10).
    I have a sequence (SEQ1)
    I need a trigger on before insert TABLE1 and I need obtain the nexval of the sequence BUT I CAN NOT use DUAL (it is forbbiden in my project. Don't ask :((( )
    can you help me?
    thanx a lot!

    "So of course using select seq.nextval from dual is
    most of the time unnecessary thing and should be
    banned as much as possible, but I think that simple
    prohibition is quite stupid."
    why do you think using dual ist most of the time
    unnecessary?Because in most scenarious you won't need dual.
    What are the reasons for using dual?
    1) because you need the value later in some other computations. The most elegant, simple and performant solution is just use returning clause of the insert statement.
    2) because the value is not provided. As I'm usually using more or less logic in DB or at least some business logic API (as pl/sql packages/procs) I'm always inserting new rows using sequence.nextval in the very insert statement so absolutely no need for before insert trigger supplying id value.
    If you think that select sysdate/sequence.nextval and similar things are very cheap then it is not true :)
    I've seen some batch procedures processing many rows and for each row:
    1) get sequence.nextval into variable from dual
    2) insert row using variable in id
    And select seq.nextval from dual took more tha 10% of overall time.
    Ok just a simple test case on 9i
    declare
    val number;
    begin
      for i in 1..10000 loop
        select seq1.nextval into val from dual;
        insert into seq2 values (val);
      end loop;
    end;dbms_profiler shows that total time for select into was ~982 msec but insert just took 722 msec. So actual insert took less than select from dual! The overall time was 1.922 secs.
    OK now let's see how it is with following script:
    declare
    val number;
    begin
      for i in 1..10000 loop
        insert into seq2 values (seq1.nextval) returning a into val;
      end loop;
    end;insert row took 931 msec and overall time was 1.094 secs.
    So this is for batch. For OLTP like app the only difference is that resource waste is spread out for many transactions but the overall net result is the same - you are inefficiently wasting resources.
    Ok in 10g results will be better with fast dual, but select anything from dual is very bad habit especially if used extensively.
    Gints Plivna
    http://www.gplivna.eu

  • What SWO1 object uses by std. SAP to send email if OB IDOC get fails?

    Hello,
    We have SWO1 object IDOCAPPL in SWETYPECOU and we can use it to send an emaill to user's inbox, if IDOC get fails at all.
    But, this object is ONLY for inbound IDOCs.
    Am looking for similar object(SWO1) but my IDOCs are outbound, pls. let me know what object i can use from SWETYPECOU table to trigger email if my IDOC get fails? Here IDOC and FM are custom ones.
    or pls. let me know What SWO1 object uses by standard SAP to trigger email if outbound IDOC get fails (sales orders)?
    Thank you

    Changed requirements

  • Which trigger to use?  Please help!

    Hi all,
    I am a bit confuse on which trigger to use when you want the trigger to fire as soon as you leave the item. Could anyone help me? Thanks in advance for your help.

    Harton,
    There are a couple of triggers which fire when leaving an item, WHEN-VALIDATE-ITEM, POST-TEXT-ITEM. Depending on what key is being used for navigation, you also have KEY-NEXT-ITEM, KEY-PREV-ITEM. Each of them are slightly variant as in the sequence of firing and hence are useful for specific purposes. The sequence of firing is clearly mentioned in Forms documentation.
    To validate any values entered in an item when leaving an item, WHEN-VALIDATE-ITEM is the ideal trigger to use and once the item validation is completed POST-TEXT-ITEM fires.
    SEQUENCE : KEY-NEXT-ITEM/KEY-PREV-ITEM
    |
    WHEN-VALIDATE-ITEM
    |
    POST-TEXT-ITEM
    -Aditya

Maybe you are looking for

  • HELP!! Mail won't open, keeps crashing!

    Hi Guys, All of a sudden when I open mail it opens up, I see a screen, then 1 sec later it crashes. I can't get to my mail now. I did an archive and a reinstall and nada. I also removed spam sieve and still it crashes, repaired permission, ran script

  • HP Officejet Pro 8600 not able to connect to internet ip setting disabled

    My printer has been connected and working in wireless mode for 2 months. now not able to connect and printer is locked and shows "IP no link".

  • Iphone back up space on PC Hard Drive

    Hi, just wondering how much space the back ups take on hard drive. That is, I have iPhone with approx 5GB videos, 3GB music, 2GB pictures and some applications (say 1GB for sake of simplicity). If I take back up say five times in five months, will it

  • Target a child Symbol whith TweenMax

    Hello everybody, I need help. I placed a symbol on the stage: sym.stop(); var eins = sym.createChildSymbol("eins", "Stage"); eins.getSymbolElement().css({           'position': 'absolute',           'left': 100,           'top': 0 Now I want to move

  • FTP adapter on BPEL

    I am using Oracle AS 10.1.3.1 on windows. My FTP server is also on Windows. But during invoke of outbound FTP adapter i am getting following error I am able to do FTP from AS machine to FTP server (Window) through command prompt and it is working fin