Events being triggered more than once

HI All,
I am using SAP Business One 2007 A SP:01 PL:07
I have created a form using SAP Business One UI API Version 2007 A 8.0.When i open the form first time all item events and menu events are working properly..
When i close the form and open it again all the menu and items events get fired twice.Again i close and reopen the form all Item and Menu events are triggered thrice on a single click.
Any help to solve this problem will be highly appreciated.
Warm Regards,
Prerna

Hello,
Maybe You using a global variable for the form. Try to swicth to local variable and use sbo_application.form.GetForm(pval.formtypeex, pval.formtypeCount), or check you application really closes the window (window menü, and see the list of opened forms).
Try to use EventSpy, which is a part of the SDN tools, you can download from /docs/DOC-8857#section6
Regards,
J

Similar Messages

  • Terminating Event Getting triggered more than once

    Hi All,
    I am facing a very peculiar problem in PR release workflow(item wise release, business object BUS2009).
    One of the requirements of the workflow is to send a mail to PR initiator once it is rejected by any of the approvers(4, in my case). The event associated with the cancellation of the workflow is REJECTION_START.
    The problem is that this event is being triggered more than once. One thing that i have observed is that if eg. second level of approver cancels it, the event is triggered twice. Likewise if third level of approver cancels it, it is being triggered thrice. Which leads to sending of 2 and 3 mails respectively to the PR initiators mailbox.
    Why is this happening? Ideally, only one event should have been triggered, and the triggering of the event should have been independent of PR approver's level. I am at my wits end regarding this.
    Any suggestions in this regard will be highly appreciated
    Regards
    Varsha Agarwal.

    If you check for 2nd level rejjection two release Code is associated so it triggers 2 times and same for 3rd level approval.
    I think you have to put some sort of filter using FM SAP_WAPI_WORKITEM_OBJECT
    in the attribute portion of yopur custom BO.
    The attribjute will check this FM and if it has entries that means already a Workflow has been triggered it should set the flag as X.
    Make use of this attribute in defining the start condition of this task thru
    SWB_COND.
    Thanks
    Arghadip

  • Custom Events and Scheduling more than once

    Hi,
    in BO 4.1, I successfully triggered WebI Report instance generation by a "Custom Event" through scheduling.
    Now, we have the requirement that the report should not be triggered only once but always when the event is triggered.
    At first glance, this looks tricky bc. in order that the report "reacts" to the event, the report itself must be scheduled with the event (it gets an instance "pending" that "wait + reacts" to the event). So it looks like we need schedule the report always manually with "event" before it is ready to react to the event specified in the scheduling.
    Is there any user-friendly trick to make the report react upon every fired event without having to "schedule" the report manually with the event?
    (Similar to schedule daily, just that the event is the trigger, note a daytime...)
    Best Regards

    Hi Florian,
    What is the frequency set under Recurrence option for the report instance?
    Can you give an idea like after how much time the event can be triggered?
    For example, if you are expecting the event to change in an hour, you can schedule the recurrence as hourly or you can specify something like 0 hours and 15 minutes or something like that.
    In that case, once the event is fired, your report instance will be ready to trigger after 15 minutes for the next run.
    Would suggest you to sync with the BO administrator as concurrent triggering of large number of instances can give load on Job Servers.
    Hope it will help in some way.
    Regards,
    Yuvraj

  • How to  check customer reference no. not  being use more than once

    I have the following situation and appreciate if  some one could show me a simple solution.
    “On the Sales order window, when user enter a value for Customer Ref. No”, check if the entered value has already  been used on any existing Sales Order, and give message eg. “this Ref. No already been used in SO. 257”
    What is the easiest way of implementing the validation?
    Using Formatted Search?
    Triggers or Stored Procedure?
    Or one must go about doing this simple task using SDK, DIAPI?
    sample code illustrating solution would be much appreciated.
    I tried to create a query and used it with Formatted search on the Field, but failed on an error.
    the code using temporary hard coded value instead of $[$x.0.0] looks like this
    if (SELECT    COUNT(*)
    FROM         dbo.ORDR
    WHERE     (NumAtCard = 'AAA' and CardCode ='1234')
    ) =0     
         Begin
                       select 'AAA' --redisplay value
         end
    else
                  begin
    SELECT     TOP 1 'already used in SO '+ Convert(Char(3),DocEntry)
    FROM        dbo.ORDR
    WHERE     (NumAtCard = 'AAA')    
             end
    where 'AAA' is the reference no. to check for customer '1234', this code works when I run it in SQL query analyser, but failed when I run it as query in Business one. the idea was to redisplay the entered No. 'AAA' if it is not found in any existing SO for cust ='1234'
    can anyone point out what the error is or show  alternative code for the query.
    thanks

    Hi Andy,
    I believe the best way to do this is probably to use the SDK as (to my knowledge) this is the only way you can get a message to be displayed and to stop the actual processing of the document.
    If you want to go the formatted search route I would suggest you change your query a bit. I have played with your query and the following is an example as I got it working in SBO. I think SBO gets confused if there is more than one select statement that returns a result and I have started using variables to save the results of the select statements in.
    [code]Declare @Val varchar(100)
    declare @Count integer
    set @Val = $[$14.0.0]
    if (SELECT COUNT(*) FROM dbo.ORDR WHERE (NumAtCard = @Val and CardCode = $[$4.0.0])) > 0
    begin
    SELECT TOP 1 @Val = 'already used in SO '+ Convert(Char(3),DocEntry) FROM dbo.ORDR WHERE (NumAtCard = @Val)
    end
    select @Val[/code]
    I hope it helps a bit,
    Adele

  • Regarding activation job triggering more than once

    hi all,
    i have designed a process chain in which there are 5 info packages (same info source) loading into same ods.I have then clubbed these 5 info packages steps in one OR condition.however,there are multiple activations which are triggered i.e. as soon as one of the load is completed one activation job is triggering and similarly it happens with other loads also.
    this multiple triggering of activation causes subsequent processes in the chain to trigger multiple times which is not required.
    is there way that we can trigger this activation only once.
    Please note that OR condition is required and AND cannot be placed in its place.

    HI Parth,
    I think you cannot do away with AND.
    You will have to use it just when the 5 different process complete.
    I am not sure how did you make it but i would suggest to go like this:
    Loading1     
    Loading 2 
    Loading 3
    Loading 4          
    Loading 5
    Then you can have the Activation step. after the loading is completed.
    Do assign points if it helps.
    Do iterate your problem in more descriptive manner if this doesnt helps :).
    Regds,
    Den

  • QuickTime DOM Events called more than once?

    I am in the process of writing code in JavaScript that will track the interaction on a embedded QuickTime video.
    function ew_addImage(v) {
    trackImg=new Image(1,1);
    trackImg.src=v;
    function ew_pauseTrk() {
    var imgStr='http://www.sldkfjsldfjk.com/200125/EWTRACKNEW_VINT?ewadid=751801&ewbust='ewbust'&eid=1078554&file=$VIDEO$&bw=56&vlen=3:00&vint=PAUSED';
    ew_addImage(imgStr);
    if (document.addEventListener)
    document.getElementById("mov1").addEventListener("qt_pause", ew_pauseTrk, false);
    Everything works correctly. I am able to see the image being called when I am looking at Wireshark. The problem is when I click pause more than once.. It seems like the QuickTime DOM Events can only be called once.. Is that true?
    Thanks

    -(void) flipToEditView {
    [self populateTheList]; // populate an array
    EditViewController *anEditVC = [[EditViewController alloc] initWithNibName:@"EditView" bundle:nil];
    [self setEditVC:anEditVC];
    [viewController.view removeFromSuperview];
    [self.window addSubview:[editVC view]];
    [anEditVC release]; }
    }<---- is this } matched elsewhere?

  • CRS Install hostname being used by more than once for the same node.

    Hi, we're installing The Oracle Clusterware and on the Cluster Configuration screen of the universal Installer (the one were you specify the clustername and clusternodes) we get the following error message in a dialog box when the next button is clicked:
    "You must enter unique values for the public node name, the private node name and the virtual hostname for all nodes in the cluster. The name, node1, that you entered is being used by more than once for the same node."
    Has anyone experienced this error message before and know what the cause is?
    Could it be a problem with the /etc/hosts file?
    Thanks in advance,
    M

    Make sure you allocate separate IP addresses on your network for the VIP addresses on each RAC node (this is not the same as the machine IP already configured on the OS).
    Also, the installer may complain if your private and public IPs are configured under the same subnet.
    Finally, as mentioned before, check that name resolution for all the IPs to be used. On all RAC nodes, your /etc/hosts file should be configured with:
    - public name and IP addresses of ALL nodes
    - private name and IP addresses of ALL nodes
    - VIP name and IP addresses of ALL nodes
    Hope that helps
    B.

  • Triggering workflow more than once during wait hrs

    Dear All,
    We have implemented two Z (ZAPFI_INV, & ZFI_INV_PARK) workflows for FI
    park invoice. ZFI_INV_PARK is the query workflow and ZAPFI_INV is the
    approval workflow.
    Both workflow start with checking whether if image (i.e. FI invoice) is
    attached with the document or not. If the image is not attached, the
    workflow will wait 3 hrs for the image attachment. If the image gets
    attached within 3 hrs, workflow will move further for approval or query
    process.
    But if the same document is "parked" or "save-as-completed" more than
    once within the waiting time frame of 3 hrs, then more than one
    workflow process starts & resulting same WI more than once in the useru2019s inbox.
    Kindy advice.

    Is it possible to put the Validation at Application Level (rather that doing changes in Workflows as they are working correctly)?
    May be you can log the Invoices in ZTABLE when they are parked and Flag them as marked once processing is complete.
    Regards
    Shital

  • Document contains some order item more than once - invoice verification

    Hi,
    we have one cross company stock transfer process in which when a billing is created in SD side, an IDOC will be triggered automatically and create an invoice verification at the MM side.
    The problem is some of our billing of this process having an IDOC application error that said.
    Document contains same order item more than once
    Message no. M8321
    Diagnosis
    Under the following circumstances, you can settle an order item in an invoice received via EDI more than once:
    - Goods-receipt-based Invoice Verification has been defined for the order item.
    - The IDoc contains the delivery note numbers of the goods receipts.
    System Response
    If this is not the case, the system cancels posting of the IDoc.
    Question:
    1 - The funny thing is IDOC showing 51 IDOC error code message on status record of INVOIC. But the invoice verfication get created in PO history.
    2 - I think this error is because we need to make the PO as GR-based Inverifcation. We have flagged it in Vendor master, and Info record, but this indicator is not flag automatically in the PO (and we cannot manually change the PO as this indicator is grey-out). How?
    3 - how to solve this error?
    Thanks

    Once PO history is created, you cannot change the "GR-based-IV" flag. Two options are there before you.
    1. Cancel all the GRs & Invoices posted in the STO then system will allow you to update the GR-based-IV flag. After updating this flag repost the GRs and invoices.
    2. Create a new STO, now since you have updated the vendor maser & info-record, this flag will automatically get updated during the STO creation itself.
    First option is tedious and should be selected only if you can go option 2 is not at all feasible

  • AddOn: Prevent from loading more than once

    Good Afternoon
    Experts:
    I appreciate you patience as I resurrect this topic since it has become an
    increasing concern here.  We need a way to restrict our AddOn from "being in"
    Task.mgr more than once.  We are working with Terminal Services.  A couple ways we have found more than one instance in TM is the User just opening another session or opening another session after a "problem/Issue/Crash". 
    I have this code which restricts the AddOn from starting more than once here on my local machine:
    Public Sub Main()
            Try
                Dim x As Integer = 0
                Dim Ctr As Integer = 0
                Dim som() As System.Diagnostics.Process
                som = System.Diagnostics.Process.GetProcesses
                Dim Name As String
                For x = 0 To som.Length - 1
                    Name = som(x).ProcessName.ToUpper
                    If som(x).ProcessName = "Test.Enhance" Then
                        Ctr += 1
                    End If
                Next x
                If Ctr > 0 Then
                    MsgBox("LBSI.Enhance AddOn is already started...Exiting application.", MsgBoxStyle.Critical)
                    Exit Try
                Else
                    ReInitializeAddOn()
                    Application.Run()
                End If
            Catch ex As Exception
                HandleException("Main", ex, True)
            End Try
        End Sub
    Is there a better more elegant way to do this? How about for Terminal Services?
    Thanks in advance for your insight,
    EJD

    Not answered...so I will close.

  • Round Trip form Preiemer to Audition more than Once

    Hoping someone can help.  I am struggling to work out how to send a project back to Audition more than once?  Basically I have a job that I sent from Premiere to Audition already but the client has come back with some further edits.  What I can't work out is how I can send that project back from Premiere to Audition for a second time once I have made the various edits requested Premiere so that I can just tidy up those bits back in audtion again.  At the moment it seems like I will have to try and re do all the work I had originally done in Audition or try and copy and paste clips form one Audition project to another and re align all the wave forms.
    I am sure I am being stupid and missing something really basic so if someone can shed any light on how I can do this that would be great.
    Thanks in advance.
    Mark

    Hi Alan
    Your right the files are there but all as separate wav files that were created when the Audition project was first created and I have the original Audition timeline that was created when I first sent the project back to Premiere. What I can't seem to figure out though is that when you send the project back from Premiere to Audition the new audio tracks that were created don't link back to the originally extracted wav files or the Audition Project that created them.  Instead Audition creates a new wav file for each complete track (for those tracks that came from Audition first time round).  However if you click on one of the single track clips from the original Audition to Premiere round trip and choose edit original it opens the original Audition project with all the clips in that created. Which isn't the behaviour I was expecting  I was hoping for something a bit like the dynamic link relationship between after effects and premiere so if you have round tripped your audio any further changes in premiere are reflected in the audition project or a copy of the audition project. Is there away of doing this?
    Thanks

  • Calling thread.start() more than once concurrently

    Hi, I got a simple doubt that may feel awkward or absurd to people who are well versed in the java threading concepts. I just thought of it and as I couldn't get an easy answer I am posting this.
    Consider a class that implements the runnable interface. The run() method of the class is implemented with just a System.out.println(). If I make an instance of this class, say 't' in the main method and calling t.start() susequently twice or thrice; an illegal ThreadStateException will be thrown. The code snippet is as follows:
    ThreadTest t = new ThreadTest();
    t.start();
    t.start();
    It is understood that state of the thread object is changed to run state and so, if it is again started, it must be thrown. So if I put a Thread.sleep() inbetween these two subsequent calls assuming that the main method thread will be sleeping. So there is sufficient time for the first thread to terminate and then only the second will start - still the same exception is being thrown. I tried putting the synchronized qualifier for run too, still no effect - the same only happening. Why the java thread object is made in such a way that once the thread changes it state from Runnable to Running and then finally to dead state, it can be restated back to Runnable state, such that the start() method can be called again. Is it possible or not? Please post your comments.

    As ejp says you can't start a thread more than once - even if it has already terminated after the first start.
    By making threads a one-shot it simplifies reasoning about them: you don't have to wonder whether a second start() will work or not, depending on whether the thread has completed its first "incarnation". It also makes it easier to ensure thread resources are reclaimed. It also avoids semantic issues like whether anything about the thread is "carried over" across incarnations.
    This might seem a limitation but there are many ways around it - simply don't let the thread terminate. Whatever control structure you would enforce by re-starting the thread can be emulated without letting the thread terminate in between "executions".

  • Use mouse click trigger option more than once?

    Hi, is there some way to use the "mouse click" trigger option more than once in the project? I am trying to build a menu button animate where the users click the (menu grid icon) once, and it transforms into the (x icon) and stays there until they click it again ONCE to change it back to the (menu grid icon). Other trigger actions aren't ideal, and I find that if I used the "double mouse click", the response gets a bit messy as clicking once would replay the whole sequence again. Thanks!

    At CreationComplete make a var as:
    button = -1;
    At click event of the button write:
    if (button == -1){
    sym.getSymbol("nmnmnmn").play("xicon");   // if you have a trigger in timeline to make this action that you want
    button++;
    else {
    sym.getSymbol("nmnmnmn").play("returnedicon");
    button = -1;
    Somehow like the above you'll have to do it.
    Or else you can use boolean , TRUE/FALSE

  • Error : Document contains same order item more than once in IDOC

    We have Intercompany IDOCs getting created in our system. The
    trigger for this is the Billing Document in the same system in
    differenct company code. The MEssage type being used is INVOIC and the
    basic type is INVOIC01.
    The IDOC is in the status of 51 with the error message
    Document contains same order item more than once
    Message No : M8 321.
    Can anyone tell me why raise this error and how to resolve it?
    Thanks.

    What I have recently learned is that in 6.0 SAP allows the same line item to be on an idoc multiple times.  However, the item has to be GR-based-IV and there has to be a unique entry in the delivery note of the GR.   I have successfully tested this in my development system.  
    What I can't get to work is if the GRs have the same delivery note value.   What I think is happening is these GRs are not unique so SAP cannot match a GR with an IR so it fails with this error. 
    Here are the examples:
    Works 
    GR# A           deliverynote/BOL    "abcd"
    GR# B           deliverynote/BOL     "efgh"
    Invoice idoc
    e1edp02    qualifier 016          abcd
    e1edp02    qualifier 016          efgh
    Doesn't work:
    GR# A           deliverynote/BOL    "abcd"
    GR# B           deliverynote/BOL     "abcd"
    Invoice idoc
    e1edp02    qualifier 016          abcd
    e1edp02    qualifier 016          abcd
    If anyone knows of a way to make the second scenario work, I'd like to hear your solution.
    Thanks
    Sandra

  • WDDOMODIFYVIEW and WDDOPOSTPROCESSING is called more than once!

    Hello everybody,
    maybe someone can help me. Our WDA application consist of 5 Components. One main and 4 components embedded in it. We instantiate the components in the WDDOINIT of the main component and use them between themselves.
    I suppose that's the reason that the events in the views and componentcontrollers of each component is called so often.
    With a break point in a WDDOMODIFYVIEW an the debugger I find out that the  HANDLE_REQUEST methos from the CL_WDR_CLIENT_ABSTRACT_HTTP  class is startet also more than once.
    1.  if m_ucf is not bound -> yes and  m_request_type = suspend
    2.  if m_ucf is not bound -> initial and  m_request_type = suspend
    3.  if m_ucf is not bound -> initial and  m_request_type = suspend
    4.  if m_ucf is not bound -> initial and  m_request_type = refresh
    Maybe someone has expierence with it an can give a hint or explanations for this.
    I hope so
    Thanks for any answer
    Best regards
    Christian Breitenbach

    hi christian.......
         a wddomodifyview view method will be called even if there is a little change in your view. it will b e called more times than your normal pbo in a dynpro application. the wddoinit will be called only before the view is loaded... but the modify willbe called even for popups nad any event.
    ---regards,
       alex b justin

Maybe you are looking for