Journal Preview fires FORM_DATA_ADD event

Hi
I've got some code behind the FORM_DATA_ADD within the FormDataEvent which opens a new form once the user adds a new delivery. The problem is, is that the FORM_DATA_ADD event also seems to be thrown when clicking on the Journal Preview button before adding a delivery, which causes the form to fall over.
Should this be happening? If it should is there any way to identify whether the event is being fired from the Add click or Journal Preview button?
Steve

Are you using event filtering to make sure that the DATA_ADD event you are intercepting is generated by the Delivery form, and not by another one? What you describe definetely looks like a bug and should be reported to the Support.
Even so, you can work around it by intercepting ITEM_PRESSED on both Add and Journal preview buttons on the Delivery form, update some global boolean flags to remember which button was pressed and check those in your DATA_ADD handler, ignoring processing in case of the Jounal preview button. Do not forget also to reset both flags at the end of the handler.
Another way could be not to use DATA_ADD but, rather, intercept ITEM_PRESSED on the Add button in AfterAction with ItemEvent.ActionSucceess. From there, you can get the Code of the document that has just been added:
SELECT TOP 1 DocEntry
FROM ODLN
WHERE UserSign = <SAPbobsCOM.Company.UserSignature>
ORDER BY DocEntry DESC
and do your stuff...
But again, I should recommend sticking with the DATA_ADD event because it is the best and most reliable method, just ask the Support fix the bug.

Similar Messages

  • How to set fire action event for particular rows in a table

    HI All,
    I have a requirement in which I want to set fire action event for particular rows in a table based on some condition.
    The table has columns like fullname,employee id etc.
    So i want to set fire action event for particulars rows only which will saisfy some condition.

    Atanu,
    Your approach(setting fire action for few rows) seems not possible. Better to go ahead with workaround.
    Do you want this functionality in processRequest(while page loading) or processFromRequest(on some event) method ? Give more explanation regd. your requirement ?
    In either case loop through the rows and when your condition is met write the action to be performed in controller.
    Regards,
    Anand

  • How can I fire an event case on the value change of an indicator, or a network variable?

    Hi!  I have an event structure setup to look for a value change of an indicator on the front panel.  The indicator is updated by the value of a boolean network-published shared variable through a seperate parallel loop that is polling all of the network-published shared variables.  The event, however, does not fire when the indicator changes value.  I have switched the indicator to a control and tested it with user interaction and that works just fine.
    I want to use the event structure space for my code exectution because it seems logical that that is where it would go, and it will help keep my block diagram tity.  The code is also something I would like executed with the front pannel temperarily disabled.  I would rather not have the code in my network-variable polling loop because again the tity issue.   I would also rather not use a notification VI wired to an independent loop for this particular code.
    Is there a way to have an event structure fire an event with the value change of an indicator, or a network variable directly?
    Thanks for your input.
    LV 8.5
    -Nic

    Thanks for the reply.
    I went about things a little differently, but got them to work so..... .  It really was not my desire to have a boolean indicator on the front panel.  As previously stated, my ultimate goal was to have an event fire on the change of a network variable, which I had to poll for anyway but that is tucked away in a section where I am handling all my network variables.  I ended up using that Create User Event, Register User Event, and Generate User Event SubVIs to handle the task.
    I've read the help for all of those SubVI's and it is not entirely clear to me if the event fires every time the "Generate User Event" receives some inputs, or if it only fires when the value changes.  I could do a test to find out.  It wouldn't be too difficult to add a shift register or a feedback node and place the Generate User Event in a case structure so that it is only fired when the input changes state.

  • How to fire an event dynamically in JSF Page

    Hi All
    How to fire an event dynamically in JSF Page?
    Thanks
    Sudhakar

    Hi,
    Thanks for the response. I mean to say, if I create the components dynamically then how can I fire events for those components.
    In otherwords,
    If I create the Button dynamically with particular ID being set to that component, then how can I call button action event when the button is clicked??
    Hope you understand
    What is the role of MethodBinding mechanism here??
    Thanks
    Sudhakar Chavali

  • Possible to highlight a row in text area which in turn would fire an event?

    I'm making a GUI of which the main portion consists of a large text area. The text area would list problems that our company is experiencing - each row would represent a problem. Each row would give a problem ID and a description of the problem. I want to make it so that when the user clicks on a row (a problem), another dialog box would open which would present possible solutions to the user regarding the problem at hand. How would I write code to highlight a row which in turn would fire an event opening up another box?
    I thought about going about this another way - have a drop down (jcombobox) integrated into each row which the user can choose from but I'm not sure if you can insert a drop down into a text area (and neatly into a row at that!) so I think the former way may be preferable.
    Thanks in advance.
    Regards,
    Paul

    If a java application is required (as opposed to a web-based solution using HTML's linking capabilities) the best approach might be a JList implementation. It could go something like this...
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class ListFrame extends JFrame
       public ListFrame()
          super("JList example frame");
          getContentPane().add(getListPanel(), BorderLayout.CENTER);
          setDefaultCloseOperation(EXIT_ON_CLOSE);
          pack();
          setVisible(true);
       private Component getListPanel()
          JPanel panel = new JPanel(new BorderLayout());
          final JList list = new JList(new Object[]
             "List option 1...",
             "List option 2...",
             "List option 3..."
          // This will make sure only one item can be checked at a time.
          list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
          // Handle the selection here.
          list.addListSelectionListener(new ListSelectionListener()
             public void valueChanged(ListSelectionEvent e)
                // No need to go on if this was a deselection.
                if (e.getValueIsAdjusting() || list.isSelectionEmpty())
                   return;
                // This is where you would have to convert the value that's selected into whatever
                // it is you want to display to the user.  This example just puts the text of the
                // selected item into a messagebox.
                Object selectedItem = list.getSelectedValue();
                JOptionPane.showMessageDialog(ListFrame.this, selectedItem);
          list.setVisibleRowCount(5);
          // The scrollpane will control the scrolling of the list (so you can have as many options
          // as you want).  Standard JScrollPane functionalities can be used to control various
          // visual aspects of the list.     
          JScrollPane scroll = new JScrollPane(list);
          scroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
          panel.add(scroll, BorderLayout.CENTER);
          return panel;
       public static void main(String[] args)
          new ListFrame();
    }I know this is quite after-the-fact, but I hope it helps (if you hadn't already solved the problem :) )

  • Web dynpro to fire an event automatically via url in iview

    Hi expert,
    I create an iview, and would like to via the application parameter: 'auto = true' to fire an event in htmlb (bsp java) application.
    I have already successful calling the service in my wdDoInit() method.
    but next step is how to fire the event automatically in init method ? any code snippets will be appriciated.
    Ben.J.

    Hi,
    I have 2 main DCs bound. Now from DC2 I have to read the Context of DC1 (which is bounded to another application).
    To bind your context from DC1 to DC2
    Copy the context that you want to expose from the component controller to interface controller of DC1.
    Once this is done you will be able to see the context in DC2.
    Based on your requirement you can set the Input type property of the context node.
    Regards
    Ayyapparaj

  • JComboBox fires an event only after changed selection?!

    I have added a JComboBox to my application, combined with an ActionListener which is added to the combobox just after initialization. It works fine, but there is one problem left:
    Generally, an event for the ActionListener is initially only fired by a combobox, if the user selects a different item than the last selected one. But I need an event that is fired by the combobox each time an item will be selected, even if it is the same item as the last selected one.
    I tried to use an ItemChangeListener, but it gave no success (and sense), it fires an event each time the user wants to select an item from the combobox' item list, that is no solution.
    Best way to solve this problem? I thought about a adding a MouseListener, but that might be the longest way. There seems to be no special method in JComboBox class to set this desired property?
    Any suggestions?

    Hello,
    thank you for your answer so far. Well, here is a trivial source code with the problem that still exists (see also my text at the end of this post). This one has been tested using Java 2 SDK V1.4, even using the newest SDK version did not change anything on the behaviour:
    import javax.swing.*;
    import java.awt.Container;
    import java.awt.FlowLayout;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    * JComboBox-Test: using Java 2 SDK V1.4, ActionEvent is only fired by combobox, if
    * a different item than the previous one is selected from combobox;
    public class Forum3 extends JFrame implements ActionListener {
        String[] CB_ITEMS = {
            "item 1",
            "item 2",
            "item 3",
        public Forum3 () {
            super();
            setDefaultCloseOperation(EXIT_ON_CLOSE);
            setLayout(new FlowLayout());
            JComboBox cb = new JComboBox(CB_ITEMS);
            cb.addActionListener(this);
            getContentPane().add(cb);
        public void actionPerformed (ActionEvent e) {
            System.out.println("action!");
        public static void main (String[] argv) {
            Forum3 test = new Forum3();
            test.setSize(300,200);
            test.setVisible(true);
    }If you start this program (I am also using Windows XP), you see the JFrame window including the JComboBox. "item 1" is selected by default. If you click again on "item 1", no event will be fired. An event will be fired only, if you choose "item 2" or "item 3". You can try this with any other of the given items. An event will be only fired, if you choose a different item than the last one.
    What I need, is a routine that fires an event each time any item is selected!
    I would be grateful for a helpful hint, how to solve this in a "clean" way :-)

  • Programmat​ically fire an event in a subvi

    I have a subvi with an event structure in a while loop. The event I'm interested in is controlled by a boolean. I want to have a boolean in my top level vi fire the event in the subvi. Can this be done?
    I have attached an example.
    Attachments:
    example.zip ‏16 KB

    In your sub-vi, you need to open a vi reference to the toplevel vi. Then use the GetControlValue method to get the value of the boolean. Put this in your loop to constantly get the control's value. Now for the problem. Normally you wire the value to the value(Signaling) property to fire the event. However, since you are constantly looping and reading the value, the event fires on every loop. You may have to replace the event structure with the old time poll method. Use a case structure to execute the desired code when the boolean is TRUE. Or just put a case structure inside the event. The event will fire on every loop, but the desired code would only execute on TRUE. Since you have to poll for the toplevel boolean, there is no other way that I can think of to set off the event. Why not put the event structure in the toplevel vi, and call the sub-vi from there.
    - tbob
    Inventor of the WORM Global

  • Adobe Pro fires validation event when new page is created

    Adobe Pro fires validation event when a new page is created on many fields.
    When testing in Livecycle, I can add a new page fine, but with Adobe Pro a large list of errors appears and the fields are highlighted in red.
    The errors don't happen in other versions of Adobe.
    These are valid errors if the user tried to submit a field that is required and has not been entered yet, but the error happens when the page is initially created (added).

    I was able to get my role processor to work.
    EventHandlers.xml
    >
    <?xml version="1.0" encoding="UTF-8"?>
    <eventhandlers xmlns="http://www.oracle.com/schema/oim/platform/kernel"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.oracle.com/schema/oim/platform/kernelorchestration-handlers.xsd">
    <action-handler class="oim11g.code.eventhandler.RoleProcessor" entity-type="Role" operation="ANY" name="RoleProcessor" order="9999" stage="postprocess" sync="TRUE"/>
    </eventhandlers>
    >
    plugin.xml
    >
    <?xml version="1.0" encoding="UTF-8"?>
    <oimplugins xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <plugins pluginpoint="oracle.iam.platform.kernel.spi.EventHandler">
    <plugin pluginclass="oim11g.code.eventhandler.RoleProcessor" version="1.0" name="RoleProcessor"/>
    </plugins>
    </oimplugins >
    >
    Code:
    >
    public EventResult execute(long l, long l2, Orchestration orchestration) {
    String operation=orchestration.getOperation().trim().toString();
    HashMap<String, Serializable> parameters = orchestration.getParameters();
    System.out.println("<---------- Calling " + getClass().getName() + ": Operation[" + operation + "] Execute ---------->");
    System.out.println("<---------- Ending " + getClass().getName() + " Operation[" + operation + "] Execute ---------->");
    return new EventResult();
    >
    When i modified one of my roles, it output the following:
    >
    <---------- Calling oim11g.code.eventhandler.RoleProcessor: Operation[MODIFY] Execute ---------->
    <---------- Ending oim11g.code.eventhandler.RoleProcessor Operation[MODIFY] Execute ---------->
    >
    Hope this helps.
    -Kevin

  • How to click on an Image and fire an event

    Is there anybody who can tell me how to click on an image and fire an event, so I can programmatically use the object? Can the image be used as an object?
    Thanks in advance
    Mario Bagnara
    Chile

    Why don't you just use a mouse listener and check (by getting the x,y coordinates of the click) whether the guy has clicked on the picture?
    That would be an easy way to see if some one has clicked on something.
    Regards
    Jiby.

  • JDev 10.1.3 ADF: How to fire an event when clicking a Radio Button

    I have a <af:table> component with the following code for my radio button
    <af:tableSelectOne text="Select and"
    binding="#{backing_viewFees.tableSelectOne1}"
    id="tableSelectOne1"
    attributeChangeListener="#{backing_viewFees.tableSelectOne1_attributeChangeListener}"
    autoSubmit="false">
    When I click the radio button it does not fire up my event in my backing bean?

    Thank you for the suggestion...it does work and fires the event, but it is still not selecting the current record when I try to perform an Update or Delete.
    I had to modify your code a bit in order for it work in JDev 10...used the JUCtrlValueBindingRef instead of the FacesCtrlHierNodeBinding.
    Here is what my af:table tag looks like:
    <af:table value="#{bindings.FeesView1.collectionModel}"
    var="row" rows="#{bindings.Fees001View1.rangeSize}"
    first="#{bindings.FeesView1.rangeStart}"
    emptyText="#{bindings.FeesView1.viewable ? \'No rows yet.\' : \'Access Denied.\'}"
    selectionListener="#{backing_viewFees.tableSelectOne1_attributeChangeListener}"
    binding="#{backing_viewFees.table1}" id="table1">
    If I put back my 2 original attributes, then my Delete and Updates work.
    selectionState="#{bindings.FeesView1.collectionModel.selectedRow}"
    selectionListener="#{bindings.FeesView1.collectionModel.makeCurrent}"
    Here is my code in the backing bean:
    public void tableSelectOne1_attributeChangeListener(SelectionEvent selectionEvent) {
    JUCtrlValueBindingRef binding = (JUCtrlValueBindingRef)this.getTable1().getSelectedRowData();
    if (binding != null) {
    Row currentRow = binding.getRow();
    if (currentRow != null) {
    System.out.println(currentRow.getAttribute("CurrentRecordInd")); // this does print my selected value!!!!
    }

  • Is it possible to fire an event when radio buttons are clicked in a report?

    Hi All,
    I have got a requirement. In the selection screen i have certain input fields and three radio buttons. When radio buttons are clicked i have to grey out certain input fields. Is it possible to fire an event when i write program through se38??
    Thanks
    Rakesh

    Hi Rakesh,
    Check this code.
    SELECTION-SCREEN BEGIN OF BLOCK FINPUT WITH FRAME TITLE TEXT-001.
    PARAMETERS  : FILENAME(132) TYPE C LOWER CASE  NO-DISPLAY,
                  FDLOAD RADIOBUTTON GROUP RAD1
                  USER-COMMAND R1 ,
                  FUPLOAD RADIOBUTTON GROUP RAD1 .
    SELECTION-SCREEN END OF BLOCK FINPUT.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-002.
    PARAMETERS : FUNAME(132) TYPE C LOWER CASE MODIF ID AA.
    SELECTION-SCREEN PUSHBUTTON /33(30) ACTION USER-COMMAND
                     BTNACT MODIF ID AA VISIBLE LENGTH 8 .
    SELECTION-SCREEN PUSHBUTTON 43(30) CANCEL USER-COMMAND
                     BTNCAN MODIF ID AA VISIBLE LENGTH 8  .
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
    PARAMETERS : FDNAME(132) TYPE C LOWER CASE MODIF ID BB.
    SELECTION-SCREEN PUSHBUTTON /33(30) ACTIONS USER-COMMAND
                     BTNACT1 MODIF ID BB VISIBLE LENGTH 8.
    SELECTION-SCREEN PUSHBUTTON 43(30) CANCELS USER-COMMAND
                     BTNCAN1 MODIF ID BB VISIBLE LENGTH 8.
    SELECTION-SCREEN END OF BLOCK B2.
    DATA : ACTNAME(8) TYPE C,SCRGRUP(2) TYPE C.
    INITIALIZATION.
    ACTIONS = 'Download'.
    CANCEL = 'Cancel'.
    ACTION = 'Upload'.
    CANCELS = 'Cancel'.
    ACTNAME = 'Download'.
    SCRGRUP = 'AA'.
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP RAD1.
    IF FUPLOAD = 'X'.
         MOVE 'Upload' TO ACTION.
         MOVE 'Upload' TO ACTNAME.
    ELSEIF FDLOAD = 'X'.
         MOVE 'Download' TO ACTION.
         MOVE 'Download' TO ACTNAME.
    ENDIF.
    AT SELECTION-SCREEN.
    IF SY-UCOMM = 'R1'.
        IF ACTION = 'Download'.
          SCRGRUP = 'AA'.
         MESSAGE S007(ZMESSAGE).
        ELSEIF ACTION = 'Upload'.
          SCRGRUP = 'BB'.
         MESSAGE S008(ZMESSAGE).
       ENDIF.
    ELSEIF SY-UCOMM = 'BTNCAN' OR SY-UCOMM = 'BTNCAN1'.
      LEAVE PROGRAM.
    ENDIF.
    *AT USER-COMMAND.
    CASE SY-UCOMM.
       WHEN 'ACTIONS'.
         LOOP AT SCREEN.
           IF SCREEN-NAME = 'FUNAME'.
           ENDIF.
         ENDLOOP.
    ENDCASE.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR FUNAME.
      PERFORM call_filedialog CHANGING FUNAME.
    PERFORM call_filedialog CHANGING FUNAME.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF SCREEN-GROUP1 = SCRGRUP AND ACTNAME = 'Download' .
      SCREEN-ACTIVE = 0.
      MODIFY SCREEN.
    ENDIF.
    IF SCREEN-GROUP1 = SCRGRUP AND ACTNAME = 'Upload'.
      SCREEN-ACTIVE = 0.
      MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    FORM call_filedialog CHANGING fname.
      DATA: li_filetable TYPE STANDARD TABLE OF file_table,
        lv_return TYPE i,
        lw_filetable TYPE file_table.
      CALL FUNCTION 'TMP_GUI_FILE_OPEN_DIALOG'
        TABLES
          file_table = li_filetable
        EXCEPTIONS
          cntl_error = 1
          OTHERS     = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      READ TABLE li_filetable INDEX 1 INTO lw_filetable.
      fname = lw_filetable-filename.
    ENDFORM.                    "call_filedialog
    Reward Points, if useful.
    Regards,
    Manoj Kumar

  • Programatically fire an event

    Hi,
    is it programatically possible to fire an event (not an action)? I want to simulate an user click.
    Best regards
    Roman

    Hi,
    It is very straightforward.
    You should call the event, the same way you would call a fire-outbound-plug method.
    The only difference is that, events are parameterised methods.
    So, to call them programatically, pass null as the parameter.
    So, your cod will be:
    wdThis.onActiona_GO(null);
    here, a_GO is an event that normally gets triggered onAction of a button. But using the above code, i call call this method anywhere i want, thereby programatically triggering the event.
    I have used this several times, & it has worked beautifully.
    Regards,
    Hanoz

  • How to Fire an Event whenever clicking to Tab A, B, C on the JTabbedPane

    I have created a screen by using JTabbedPane having A,B,C Tabs on it. I need to fire one event whenever I will be clicking on Tab B or C or vice-versa. So that I can display some values from database automatically whenever I will choose Tab B or C.

    What's wrong with the events that are already fired when that happens? Add a ChangeListener to the JTabbedPane and it will receive a ChangeEvent every time a different tab is selected.

  • How to fire an event  with a non-AWT/Swing class?

    Hi, Everybody,
    I have an object that parse an XML file. When I meet an element with the value "true", I would like to fire an event, for instance a KeyEvent, just like a special key is pressed.
    Could you provide me an example?
    Thanks.
    Youbin

    use the firepropertychange methods as you do in beans.
    iam giving an eg.
    class abc
        MyListener lis;
        addMyListener(MyListener lis)
            this.lis = lis;
        abc()
            lis.fireEvent(new MyEvent("Class Instantiated"));
    class MyEvent extends EventObject
        String e;
        MyEvent(Object src)
            super(src);
        MyEvent(String e)
            this.e = e;
    interface MyListener
        public void fireMyEvent(MyEvent e);
    }You can use this methedology.Any class implementing MyListener will the be notified of the event and your class abc can now generate events wherever it wants just like i fired an event during initialization.
    you can also use observable/observer to achieve the same.

Maybe you are looking for