Execute a function after event

Hi experts,
i want to execute a function after a event. I give you an example:
Zprogram1call function zfct1.
While execution of function zfct1is running, zprogram2 call function same function zfct1.
But it's possible that function execution  from zprogram2 to run only after function execution from zprogram1 is finished? I mean , function execution from zprogram2 to sart delayed...only when zfct1 is available,when it's not running in other process.
Many thanks.
Dan M.

you can go for
CALL FUNCTION func STARTING NEW TASK task
and in the task id pass the same task name(any char variable of length max 8 chars).
so, what happens here is :
prog1 calls fct1 with task T1. (keeps running)
prog2 calls fct1 with task T1.(same T1, so the second call can also access the global variables from first call).
hence, you can have a global variable set to X in the fct1 before the update lines... and at the beginning of fct1 you can check that this global variable NE X. then only continue. else wait until that becomes blank
i have never tried this, but giving you a theory. try implementing it..

Similar Messages

  • Execute a command after 3 seconds...

    hey guys... there´s a way on AS to execute a command like.... menu2items.selectedIndex = 2; after some seconds?
    cya....

    Example code:
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    // create a timer that executes after 3 seconds, only once
    public var timer:Timer = new Timer( 3*1000, 1 );
    public function init():void
         // add event listeners
         timer.addEventListener( TimerEvent.TIMER, handleTimerEvent );
         // start the timer
         timer.start();
    public function handleTimerEvent( event:TimerEvent ):void
         menu2items.selectedIndex = 2;
    Let me know if that helps...
    Ben Edwards

  • Re-executing a function in IP web: buffer problem

    Hello everybody,
    we have performed 2 changes to our application:
    1. for performance reasons we replaced a FOX function with an IP exit function and
    2. to limit the number of entires appearing in F4 (000's) in the web application when selecting mater data for filtering we inserted a new InfoObject for the selection with only a few (about 10) master data entries and then passed the variable values to the original infoobject
    Both changes work well but there is a nasty side effect.
    The INITIAL execution of the query (variable pop-up) and filtering in the web application works fine. The user enters data manually and executes a function performing some caluculations (was FOX, is now an IP exit function).
    After this initial execution of the function it is not possible to re-execute the function. If e.g. the user performs a few more manual changes and then tries to execute the function again nothing happens. Only be logging off and on again (i.e. a new session) the user can execute the function again.
    Cache mode for the query (in RSRT) is set to 0 (=inactive).
    It is obviously a  buffer problem (some sort of delta/plan buffer conflict) and I have had this before but I cannot recall how to solve it ... its the age!
    Grateful for any assistance
    Edited by: Martin Helmstein on Nov 10, 2010 11:07 AM
    Clarification: if the user repeats inputting data under the INITIAL filter selection state and executes the function again it works. The problem only occurs if the user changes the filters (drop down boxes in the web application), inputs data and attempts to execute the function with this new selection.

    Hi Martin,
    One easy way of solving is to include the WAD command TRANSFER_STATE at the end of all the Planning function / Sequence commands attached to the Button.
    This will refresh the WAD layout without having to reenter the variable values if any.
    The other Option is to reset all the variables associated with the execution of Planning function after every execution.
    This can be included under Web template Properties so this happens after every refresh of the layout.
    Hope this helps.
    Regards.
    Shafi.

  • RSCRM_BAPI and Start Condition after Event

    Hello all
    I have a process chain set up that loads data to cubes. I wish to run RSCRM_BAPI after a certain cube has loaded.
    I create the extract in RSCRM_BAPI and for the START condition I use 'After Event' does anyone know if this is correct and if it is how do I identify the event that I want the job to run after or do I use 'After Job' and agin if so how do I idntify job etc.
    Thanks
    George

    Hi,
    Using Customer Exit Variables we can work with RSCRM_BAPI. See some example. If you need differnet reports i.e. formates then create the copy of the same reports an dchange the selection variables with Month, Week , Day like that using Customer exit variable.
    Re: Running Quaries automatically and saving them in as a Excel file in Server
    Re: Data transfer to external systems
    Re: Loading from a Custom R/3 Table
    Re: How can I schedule my Bex report to execute in background
    Re: How can I insert the RSCRM_BAPI into Process chain?
    See the help abt Customer Exits variables in Reports.
    https://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
    How to transfer the Data from SAP-System to Non-SAP system without additional Cost/License
    /people/surendrakumarreddy.koduru/blog/2009/03/11/how-to-transfer-the-data-from-sap-system-to-non-sap-system-without-additional-costlicense
    Thanks
    Reddy

  • ORA-28112: failed to execute policy function - Error in Application Builder

    Hey all,
    I've added a policy function to one of my tables and now I'm getting this error when I try to update a report region that references that table.
    "Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the ''generic columns'' checkbox below the region source to proceed without parsing. ORA-28112: failed to execute policy function"
    If I remove the policy then everything works fine. My application also runs fine with the policy in place. I just get these errors in the application builder when updating a report or an LOV that references the secure table.
    The parsing schema is APPL_USER.
    Here is the policy function:
    FUNCTION DOCUMENT_TABLE_POLICY (object_schema IN VARCHAR2 DEFAULT NULL
    ,object_name IN VARCHAR2 DEFAULT NULL)
    RETURN VARCHAR2 IS
    v_nt_seq NUMBER;
    BEGIN
    IF user = 'APPL_USER' OR INSTR(user, 'ITFC_') = 1 THEN
    RETURN NULL;
    END IF;
    IF V('APP_USER') IS NOT NULL THEN
    IF V('F_NT_SEQ') IS NOT NULL THEN
    v_nt_seq := V('F_NT_SEQ');
    ELSE
    SELECT NT_SEQ
    INTO v_nt_seq
    FROM APPL_USERS
    WHERE UPPER(NT_ID) = UPPER(V('APP_USER'));
    END IF;
    RETURN '(DOCUMENT_TYPE, MANAGED_BY_ELEMENT, PROGRAM_CODE, CONTRACT_NUMBER) IN (SELECT DISTINCT R.DOCUMENT_TYPE, USL.ELEMENT, USL.PROGRAM_CODE, USL.CONTRACT_NUMBER FROM IPRACA_USERS_SECURITY_LINK USL, IPRACA_SECURITY_ROLES R WHERE R.SECURITY_ROLE_SEQ = USL.SECURITY_ROLE_SEQ AND USL.NT_SEQ = ' || TO_CHAR(v_nt_seq) || ')';
    END IF;
    --UNAUTHORIZED USERS CAN SEE NO DATA
    RETURN '1=0';
    END;
    This is how I setup the policy:
    BEGIN
    DBMS_RLS.ADD_POLICY(
    object_schema => 'APPL_USER'
    ,object_name => 'APPL_DOCUMENT'
    ,policy_name => 'APPL_DOCUMENT_POLICY'
    ,function_schema => 'APPL_USER'
    ,policy_function=> 'APPL_SECURITY.DOCUMENT_TABLE_POLICY'
    END;
    Any help would be greatly appreciated!
    Thanks,
    Jonathan Hart
    APEX 3.1.1

    Thanks.
    After looking at it again, I think that may be the problem, too. I guess the APP_USER is set when in the application builder and the Builder is running the report query as it is being parsed which is causing the error. I added a Begin - Exception block around that query and everything seems to work now.
    Thanks again!

  • Call javascript function after submit process

    Hi,
    How can I call javascript function after my submit process ?
    Thanks.

    Hi Carl,
    You say that I must have an Item or region that contains my js with conditionnal display. With this method I can execute my js with specific request value.
    My problem is that I tried to integrate the "save large value workaround" in my application with the APEX wysiwyg (fckeditor). To do that I have to call the javascript function clob_submit on the save button. This function save the value of my field but if I want to save other item value, how can I do that ?
    If I use your method, I will submit the page, save the other field and after that, I will branch on the same page. At this moment, I will execute my javascript file.
    Is it what did you said ?
    Sylvain Michaud
    Homepage : http://www.insum.ca
    InSum Solutions' blog : http://insum-apex.blogspot.com

  • Trigger a function after LinearAxis.maximum is calculated?

    I have two charts side-by-side and I want the Y-Scale of each to be the same. This simply means setting the LinearAxis.maximum property to the same value in both charts.
    At compile time I don't know what values will be in the charts, so I can't hard-code the maximum. Instead I need both charts to calculate their maximum values automatically (the default behaviour) and then I will simply find which of the maximums is greater and set that to be the maximum on the other chart as well.
    The problem: I can't figure out how to call a function directly after the maximum is calculated on a chart.
    My non-working (psuedo) code:
    function receiveValuesForChart1(event:ResultEvent) {
      chart1Values = event.result as ArrayCollection;
      applyNewMaximumIfNecessary();
    // another similar function for chart2
    The problem with this code is that the function applyNewMaximumIfNecessary() is called BEFORE Flash calculates the automatic maximum! Must be something to do with the binding of the chart datasource to chart1Values. I need this function to be called after Flash calculates the automatic maximum.
    So currently I'm using an AWFUL HACK:
    function receiveValuesForChart1(event:ResultEvent) {
      chart1Values = event.result as ArrayCollection;
      var t:Timer = new Timer(100, 1);
      t.addEventListener('timer', applyNewMaximumIfNecessary);
      t.start();
    This actually works here in my dev environment, but you're probably feeling ill just from reading that code. Sorry. So is there a way I can hook into some event or otherwise when LinearAxis.maximum is calculated in order to call my applyNewMaximumIfNecessary() function?
    Thanks for any help...
    Fletch.

    I figured it out.
    validateNow();
    this forces the automatic calculation of the Y scales, after that I can do my magic.

  • Execute a process after delay

    Dear all,
    I have a Stored Procedure using a function performing some tasks in Oracle 9i DB. All I would like to do is to find a way to be executed repeatedly every T minutes, where T could be customizeable..
    Any ideas, examples or documentation available?
    Thanx in advance..

    Maybe is helpful...could you send me some examples or a documentationOne of the reasons why this newfangled interwebnet thing has taken off is the concept of hypertext. This is text with an embedded URL or link, which means if you click on it it will take you another web page.
    It is unfortunate that the forum software does not use the de facto standard for indicating links, (i.e. underlining) but instead colours them Execute a process after delay.
    Cheers, APC

  • Auto Execute a function on a panel automaticaly! Newb help

    Hi,
    I would like to automaticaly execute a function on a popup panel when the panel loads
    have tried
    panel
    <mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" initialize="initialised(event)" layout="absolute" title="Settings" width="300" height="400"  backgroundAlpha="0.8" backgroundColor="#FFFFFF" fontWeight="normal">
            <mx:Script>
    function
    private function initialised(event:FlexEvent):void {
                    loadJSON();
    this does not seem to work though
    Thanks
    pur3forlyphe!

    my Code now (baring in mind this panel is pulled by the main app mxml, it's just hidden)
        <dynamicannotator:Settings id="settingsPanel" visible="false" useHandCursor="true">
        </dynamicannotator:Settings>
    Panel Code
        <mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="(event)" layout="absolute" title="Settings" width="300" height="400"  backgroundAlpha="0.8" backgroundColor="#FFFFFF" fontWeight="normal">
    Function
                private function initialised(event:Panel):void {
                    Alert.show("this is a test");
                    loadJSON();

  • Execute an adapter after a scheduled task

    Hi guys,
    How do I execute an adapter after scheduled task??
    I have a gtc recon trusted, but doesn't has the user login, I need generate this login. I have created an adapter that genate this login, but I don't know what time to run this adapter and I don't know where I need insert the call to this adapter.
    Thanks

    If it is 9i write an pre-insert event handler instead of adapter. and attach on user data object
    for above you have to write a java class which has to extends tcBaseEvent class and then override the implementation method
    here you can generate your user login as per your logic and then set the usr_login.
    finally build the jar and put this under <IDM_HOME>/server/EventHandler folder

  • Process Chain after EVENT - More than once

    Hi all, I would like to run a process chain after an event; everything works fine with the following model...
    PC1 >>
         >> some processes
         >> EVENT TRIGGER
    PC2 >>
         (after EVENT) runs ok after event ONLY if I SCHEDULE it
    After succesfully run, I've tried to run again immediatly PC1 again and it runs ok, even triggers mentioned EVENT, but PC2 never runs again until I manually SCHEDULE it.
    The answer is: how should I SCHEDULE the process chain PC2 so I'll "never" need again to SCHEDULE it when I want it to run after event triggered on PC1?
    Hope you can help me.
    Thanks a lot!
    Bernardo

    Hello,
    Both process chains are separated. At the model I described, at the end of PC1 event is succesfully triggered. After event is triggered at PC1, PC2 triggers correctly due it is scheduled as "after event".
    Everything works fine, then, if I trigger PC1 again it runs correctly; event is triggered succesfully but PC2 (that is scheduled as "after event") doesn't runs; this is because I haven't SCHEDULED it again (after the first succesfully run).
    What I want is not schedule PC2 after a succesfully run. Is there any way to reach that purpose?
    Thanks again!
    Bernardo

  • Error while executing the function module BAPI_RE_CN_CREATE

    Dear All
    I was using the the function module BAPI_RE_CN_CREATE.  When I am trying to execute the function module I am getting the error message u201CBusiness transaction RECN doest existu201D. While inputting the parameters for the function module I have given RECN   In the input field TRANS. Requesting you to please kindly suggest.
    Regards.
    Varaprasad

    Hi Varaprasad,
    please try the following.
    1. Create a contract manually in the system
    2. Use BAPI_RE_CN_GET_DETAIL to show how the fields and structures are filled.
    3. Check and change the parameters for BAPI_RE_CN_CREATE accordingly.
    Hope that helps.
    Regards, Franz

  • Error while executing the function

    hi,
    I have a table with the following data.
    T_1          T_2 T_3        T_4
    a.1            1 aa         ff
    a.1            2 ab         ff
    a.2            1 ba         ff
    a.2            2 bb         ff
    a.2            3 bc         ff
    a.2            4 bd         ff
    a.3            1 ca         ff
    a.3            3 cc         ff
    a.4            2 db         ffi want the data in the following way.
    col_1       col_2         col3
    a.1         1,2             aa ,ab
    a.2         1,2 ,3,4       ba,bb,bc,bd
    a.3         1,3             ca,cc
    a.4         2                db         For this , i have written a package as shown below.
    create or replace package t_emp_pkg as
    type typ_emp is record
    tv_t_1 t_Emp.t_1%type,
    tv_t_2 varchar2(20),
    tv_t_3 varchar2(20));
    type typ_emp_tab is table of typ_emp;
    function t_emp_func(pv_value in varchar2) return typ_emp_tab;
    end t_emp_pkg;
    create or replace package body t_emp_pkg as
    function t_emp_func(pv_value in varchar2) return typ_emp_Tab is
    cursor c1(v_value varchar2) is
    select distinct t_1 from t_emp where t_4 = v_value ;
    cursor c2(pv_t_1 varchar2) is
    select t_2,t_3 from t_emp
    where t_1 = pv_t_1;
    typ_emp_table typ_emp_tab := typ_emp_tab();
    t_count number := 0;
    c1_cur_rec c1%rowtype;
    c2_cur_rec c2%rowtype;
    v_temp_value1 varchar2(30);
    v_temp_value2 varchar2(30);
    begin
    open c1(pv_value);
    loop
    fetch c1 into c1_cur_rec;
    exit when c1%notfound;
    v_temp_value1 := null;
    v_temp_value2 := null;
    open c2(c1_cur_rec.t_1);
    loop
    fetch c2 into c2_cur_rec;
    exit when c2%notfound;
    v_temp_value1 := v_temp_value1||','||c2_cur_rec.t_2;
    v_temp_value2 := v_temp_value2||','||c2_cur_rec.t_3;
    end loop;
    --close c2;
    t_count := t_count+1;
    typ_emp_table(t_count).tv_t_1 := c1_cur_rec.t_1;
    typ_emp_table(t_count).tv_t_2 := v_temp_value1;
    typ_emp_table(t_count).tv_t_3 := v_temp_value2;
    --dbms_output.put_line(typ_emp_table(t_count).tv_t_1);
    --dbms_output.put_line(typ_emp_table(t_count).tv_t_2);
    --dbms_output.put_line(typ_emp_table(t_count).tv_t_3);
    end loop;
    close c1;
    return typ_emp_table;
    end;
    end;
    When i executed the function , i got the following error.
    SQL> declare
    2 v t_emp_pkg.typ_emp_tab := t_emp_pkg.typ_emp_tab();
    3 begin
    4 v := t_emp_pkg.t_emp_func('ff');
    5 for i in v.first..v.last loop
    6 dbms_output.put_line(v(i).tv_t_1 ||', '||v(i).tv_t_2||', '||v(i).tv_t_3);
    7 end loop;
    8 end;
    9 /
    declare
    ERROR at line 1:
    ORA-06533: Subscript beyond count
    ORA-06512: at "SCOTT.T_EMP_PKG", line 30
    ORA-06512: at line 4
    but when i am running this queries in anonymous block (i.e) using declare,begin,end , i am getting the data correctly.
      1  declare
      2  pv_value varchar2(5) := 'ff';
      3   cursor c1(v_value varchar2) is
      4  select distinct t_1 from t_emp where t_4 = v_value ;
      5  cursor c2(pv_t_1 varchar2) is
      6  select t_2,t_3 from t_emp
      7  where t_1 = pv_t_1;
      8  --typ_emp_table typ_emp_tab := typ_emp_tab();
      9  t_count number := 0;
    10  c1_cur_rec c1%rowtype;
    11  c2_cur_rec c2%rowtype;
    12  v_temp_value1 varchar2(300);
    13  v_temp_value2 varchar2(300);
    14  begin
    15  open c1(pv_value);
    16  loop
    17  fetch c1 into c1_cur_rec;
    18  exit when c1%notfound;
    19  v_temp_value1 := null;
    20  v_temp_value2 := null;
    21  open c2(c1_cur_rec.t_1);
    22  loop
    23  fetch c2 into c2_cur_rec;
    24  exit when c2%notfound;
    25  v_temp_value1 := v_temp_value1||','||c2_cur_rec.t_2;
    26  v_temp_value2 := v_temp_value2||','||c2_cur_rec.t_3;
    27  end loop;
    28  close c2;
    29  t_count := t_count+1;
    30  --typ_emp_table(t_count).tv_t_1 := c1_cur_rec.t_1;
    31  --typ_emp_table(t_count).tv_t_2 := v_temp_value1;
    32  --typ_emp_table(t_count).tv_t_3 := v_temp_value2;
    33  dbms_output.put_line(c1_cur_rec.t_1);
    34  dbms_output.put_line(v_temp_value1);
    35  dbms_output.put_line(v_temp_value2);
    36  end loop;
    37  close c1;
    38* end;
    39  /
    a.2
    ,1,2,3,4
    ,ba,bb,bc,bd
    a.3
    ,1,3
    ,ca,cc
    a.4
    ,2
    ,db
    a.1
    ,1,2
    ,aa,ab
    PL/SQL procedure successfully completed.So can anybody tell me why it is not executing correctly when executing as a function.
    Thanks in advance.

    hi devmiral,
    I am not sure exactly where i am making the mistake. I have modified the package but still i am getting the error.
    create or replace package body t_emp_pkg as
    function t_emp_func(pv_value in varchar2) return typ_emp_Tab is
    cursor c1(v_value varchar2) is
    select distinct t_1 from t_emp where t_4 = v_value ;
    cursor c2(pv_t_1 varchar2) is
    select t_2,t_3 from t_emp
    where t_1 = pv_t_1;
    typ_emp_table typ_emp_tab ;
    --:= typ_emp_tab();
    t_count number := 0;
    c1_cur_rec c1%rowtype;
    c2_cur_rec c2%rowtype;
    v_temp_value1 varchar2(30);
    v_temp_value2 varchar2(30);
    begin
    open c1(pv_value);
    loop
    fetch c1 into c1_cur_rec;
    exit when c1%notfound;
    v_temp_value1 := null;
    v_temp_value2 := null;
    open c2(c1_cur_rec.t_1);
    loop
    fetch c2 into c2_cur_rec;
    exit when c2%notfound;
    v_temp_value1 := v_temp_value1||','||c2_cur_rec.t_2;
    v_temp_value2 := v_temp_value2||','||c2_cur_rec.t_3;
    end loop;
    --close c2;
    t_count := t_count+1;
    typ_emp_table(t_count).tv_t_1 := c1_cur_rec.t_1;
    typ_emp_table(t_count).tv_t_2 := v_temp_value1;
    typ_emp_table(t_count).tv_t_3 := v_temp_value2;
    typ_emp_table := typ_emp_tab(c1_cur_rec.t_1,v_temp_value1,v_temp_value2);
    typ_emp_table.extend;
    end loop;
    close c1;
    return typ_emp_table;
    end;
    end;
    SQL> @t_emp_pkg_body.sql
    Warning: Package Body created with compilation errors.
    SQL> sho err
    Errors for PACKAGE BODY T_EMP_PKG:
    LINE/COL ERROR
    36/1     PL/SQL: Statement ignored
    36/18    PLS-00306: wrong number or types of arguments in call to
             'TYP_EMP_TAB'
    36/18    PLS-00306: wrong number or types of arguments in call to
             'TYP_EMP_TAB'
    36/18    PLS-00306: wrong number or types of arguments in call to
             'TYP_EMP_TAB'Thanks in advance.

  • Error while executing planning Function

    Hi All,
    I'm getting some error while executing planning function. Below are errors. Please check and provide solution.
    Errors occurred when executing planning function RTFMPF01/RTFMPG01
    Value 08 of chara Region does not correspond to the attrib.val MI of chara Store
    Value 10 of chara Region does not correspond to the attrib.val RM of chara Store
    Value 11 of chara Region does not correspond to the attrib.val NA of chara Store
    Thanks,
    Vamsi

    Hi,
    Value 08 of chara Region does not correspond to the attrib.val MI of chara Store
    Looks like there is a characteristics relationship which derives the attribute store from Region.
    Check the master data for Region for attribute Store and the corresponding values.
    The values that are maintained in the master data will only be allowed to enter in the cube.
    Thanks
    pratyush

  • Macro Error while executing planning functions or saving data

    Dear All,
    I am getting following error in BEx Analyzer while executing planning function or pressing a save button.
    Note: Excel is 2007 version.
    Cannot run the macro "XXXXXX.xlsx". The macro may not be available in this workbook or all macros may be disabled.
    I changed the settings in Macro Settings (Office Button -> Excel Options -> Trust Center -> Trust Center Settings-> Macro Settings) eventhough it is showing that above message.
    selected ->
    Enalble all macros
    Trust access to VBA project object model.
    If anybody faced this issue kindly reply to this.
    Best Regards,
    SG

    Hello everybody,
    i am facing exactlythe same issue! I am currently running GUI Patch Level 14 and BI Add on Patch Level 10.
    I have also adjusted all necessary settings in Excel Options like Activate all Macros and Trust VBA Coding.
    Does anybody have another Solution.
    As mentioned before Gui Patch 13 and BI Add On Patch 10 obviously arent the solutiuon.
    Best regards
    Janos

Maybe you are looking for

  • Oracle 8i installation problem on Win XP pro, Pentium 4

    I am trying to install oracle 8i on Pentium 4 PC, Win XP professional Operating system, 512MB RAM. When I run setup.exe then it is silent, no response. I installed java J2SDk1.4.0 standard edition, and Java runtime environment. It is still the same p

  • Invoice Not Created for STO

    We have an STO between 2 plants where no invoice was ever created. GI posted, the GR posted, but now the GR cannot clear because there is no invoice. Also, it does not show in WE02. All other STO's work for us, it is just this combination of specific

  • BEx Analyzer 7.1 Issue after upgrade to MS Office 2007

    Hi We upgraded MS Office 2003 to 2007 and installed SAP GUI 7.10 (Patch 9). The OS is Windows XP (SP3). We have also applied "BI AddOn Patch for GUI 7.10" When we run BEx Analyser from Windows start menu or RRMX , we notice the error message: "A crit

  • SAML assertion was used to sign a message, the verification of signature us

    CR325776, CR301621, CR331147 When SAML assertion was used to sign a message, the verification of signature used to fail with NullPointerException. This problem has been resolved. We have 9.2 MP2 as our ALDSP weblogic server. Is there any way to do a

  • Book format lost

    My wife has successfully created and printed a book using Aperature 2.1 - love it! Now a few months later she wants to modify and reprint the book. But when she opens the project, there is just all the photos used, displayed in the browser/viewer vie