"new object" event in JDI?

I'm surprised that there seems to be no "new object" event in the JDI. As far as I can tell, the only way to identify a new instance of a class is by requesting MethodExitEvent, checking Method.isConstructor(), and then iterating over ClassType.instances() for objects you haven't seen before. This seems really inefficient. Is there no better way?

Weak. NO DUKE STARS FOR YOU!!!

Similar Messages

  • Subscribing to new mail event of multiple impersonated user through one ExchangeService object

    I am able to subscribe to push notifications by specifying impersonating users' credentials and then specifying impersonated user's email in ExchangeService' ImpersonatedUserId property.
    However want to know how can I handle new email events on multiple email ids that are impersonated by one email id, since there is no collection as such on ExchangeService to specify multiple Impersonation Ids. In fact I think we can handle only one email
    id by using single ExchangeService object. And to subscribe to multiple user mail events, even through impersonation, I have to create multiple instances of ExchangeService. And also multiple callback listeners too. This is what I want confirmation about:
    Q. Do I need to create multiple instances of ExchangeService and callback listeners to handle new mail event on multiple user id with impersonation?
    Q. Without impersonation?
    Q. Also want to know given credentials of impersonating user, can I retrieve list of all users impersonated by that user.

    > Without impersonation?
    You don't need a separate instance in this case (you need separate subscriptions for each mailbox). However there are throttling limitations around the total number of subscriptions one particular user can make see http://msdn.microsoft.com/en-us/library/office/dn458788(v=exchg.150).aspx
    For
    subscribing to mailbox of same user id, we can use same object of ExchangeService. However I did asked for subscribing to mailboxes of
    different user ids (or simply multiple mailboxes) without impersonation.
    I cannot find how can I specify credentials for multiple mailboxes on single instance of ExchangeServer. Just following:
    service.Credentials = new WebCredentials(userid, password);
     Is it really possible to use same instance ExchangeService to subscribe to multiple mailboxes?

  • Getting ORA-20001: Creation of new object is not allowed: !!

    Hi Am getting ORA-20001: Creation of new object is not allowed while enabling constraints after importing the dumps from source to target datbase,can anyone assist me to fix this issue.

    Hi Osama/Mustafa,Thanks for your quick response,can you please explain me the following things-
    1)As i don't have privilege to run the DBA_XX views,am not able to run those queries-
    SELECT OWNER, TRIGGER_NAME, TRIGGER_BODY FROM DBA_TRIGGERS WHERE TRIGGER_TYPE IN ('AFTER EVENT', 'BEFORE EVETN') AND TRIGGERING_EVENT LIKE '%CREATE%';
    can you tell me what output it'll throw,based on this output how will we fix the issue.
    2)SELECT * FROM dba_sys_privs WHERE privilege = 'UNLIMITED TABLESPACE';
    why we need to check this privilege?as i don't have privilege to run this one in my db.
    3)select * from dba_source where upper(text) like upper('%Creation of new object is not allowed%');
    as i don't have privilege to run this one in my db,already i got the object name from my logfile
    and more you have quoted"This is an error of someone that coded purposely on your database, probably dba or a developer who has privilege and again it is in a database event trigger"
    4)can you explain me much more deeper about the root cause and as already sent note to my DBA,can you explain me the solution to fix this issue ?

  • Re: Service Object events and LockMgr

    On the option that you have considered, I have implemented the same model
    in my previous project (using Java/RMI), but I felt that it is more than
    what is normally needed for concurrency protection.
    I can suggest another option that is worth considering which is in place in
    our app for concurrency.
    Almost every table in our db has created By, created On, modifed By,
    modified On columns. The parent class of all business objects has
    attributes that correspond to these four columns. In addition to these
    four, there is a fifth attribute (introduced when concurrency was built)
    called originalModifiedOn. Upon retrieval from the db, it is set to
    modifiedOn value (from the db), during UPDATE, the value in this column is
    added part of the WHERE clause. So when the second user tried to do save
    the same object, the underlying db update will get a 'zero rows updated'
    which is translated into an application error 'possible concurrency
    error'. The user re-retreives the now 'stale' object before applying their
    edits.
    A lot of these things are and can be built into the framework imposing very
    little work that each Object needs to do to have concurrency protection.
    I am not sure if there is a mention in the Patterns paper of this model,
    but it is very easy to implement and supports what is needed.
    Kishore Puvvada's Mail
    [email protected] on 07/28/99 01:47:00 AM
    To: [email protected]@INTERNET
    cc: (bcc: Kishore Puvvada/HQ-IS/TAL)
    Subject: Service Object events and LockMgr
    Hi folks,
    We're currently looking at strategies for dealing with the simultaneous
    updates to the database from multiple clients (concurrency
    management). That is when two (or more) clients load the same object to
    edit it, then make different changes and save them to the database.
    We have a copy of a Forté document (from the "Patterns" course, I
    think) which describes three methods of dealing with this:
    1) Lock the database table row as soon as a client select it for editing
    and hold the lock until it is saved.
    2) Immediately before 'saving' check that the database hasn't changed
    (either by reading what's there before updating, or by using a huge
    'where' clause that contains all unchanged fields)
    3) The Forté "LockMgr" pattern, which uses a service object with notifier
    proxies to allow locking and updating notification between the clients.
    Option 3 is obviously the most robust method, but it requires a fair
    amount of coding and could also be a bottleneck for database reads and
    writes.
    But I have another option for which I was looking for opinions. What if
    we had a "Change Event manager" which broadcast an event every time
    a change is made to the database. Each business class would have its
    own event. If the event had the object's primary key as a parameter, then
    clients editing that particular object type could check to see if the object
    currently on screen is the one that changed. That way you could disable
    the 'save' until they had refreshed their on-screen data.
    It's not particularily elegant, but it's reasonably simple to implement. It
    also deals with changes sent across our WAN from other database
    servers.
    But this option is only worthwhile if you can replicate the "Change Event
    manager" SO and still register for an event on the client. Can clients
    register for SO events and receive an event generated by any of the SO's
    replicates? Or when you register for an SO's event do you register for
    only one instance of the SO?
    Thanks in advance for any answers.
    Cheers,
    Duncan Kinnear,
    McCarthy and Associates, Email:
    [email protected]
    PO Box 764, McLean Towers, Phone: +64 6 834 3360
    Shakespeare Road, Napier, New Zealand. Fax: +64 6 834 3369
    Providing Integrated Software to the Meat Processing Industry for over 10
    years
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:
    http://pinehurst.sageit.com/listarchive/forte>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/forte>

    On the option that you have considered, I have implemented the same model
    in my previous project (using Java/RMI), but I felt that it is more than
    what is normally needed for concurrency protection.
    I can suggest another option that is worth considering which is in place in
    our app for concurrency.
    Almost every table in our db has created By, created On, modifed By,
    modified On columns. The parent class of all business objects has
    attributes that correspond to these four columns. In addition to these
    four, there is a fifth attribute (introduced when concurrency was built)
    called originalModifiedOn. Upon retrieval from the db, it is set to
    modifiedOn value (from the db), during UPDATE, the value in this column is
    added part of the WHERE clause. So when the second user tried to do save
    the same object, the underlying db update will get a 'zero rows updated'
    which is translated into an application error 'possible concurrency
    error'. The user re-retreives the now 'stale' object before applying their
    edits.
    A lot of these things are and can be built into the framework imposing very
    little work that each Object needs to do to have concurrency protection.
    I am not sure if there is a mention in the Patterns paper of this model,
    but it is very easy to implement and supports what is needed.
    Kishore Puvvada's Mail
    [email protected] on 07/28/99 01:47:00 AM
    To: [email protected]@INTERNET
    cc: (bcc: Kishore Puvvada/HQ-IS/TAL)
    Subject: Service Object events and LockMgr
    Hi folks,
    We're currently looking at strategies for dealing with the simultaneous
    updates to the database from multiple clients (concurrency
    management). That is when two (or more) clients load the same object to
    edit it, then make different changes and save them to the database.
    We have a copy of a Fort&eacute; document (from the "Patterns" course, I
    think) which describes three methods of dealing with this:
    1) Lock the database table row as soon as a client select it for editing
    and hold the lock until it is saved.
    2) Immediately before 'saving' check that the database hasn't changed
    (either by reading what's there before updating, or by using a huge
    'where' clause that contains all unchanged fields)
    3) The Fort&eacute; "LockMgr" pattern, which uses a service object with notifier
    proxies to allow locking and updating notification between the clients.
    Option 3 is obviously the most robust method, but it requires a fair
    amount of coding and could also be a bottleneck for database reads and
    writes.
    But I have another option for which I was looking for opinions. What if
    we had a "Change Event manager" which broadcast an event every time
    a change is made to the database. Each business class would have its
    own event. If the event had the object's primary key as a parameter, then
    clients editing that particular object type could check to see if the object
    currently on screen is the one that changed. That way you could disable
    the 'save' until they had refreshed their on-screen data.
    It's not particularily elegant, but it's reasonably simple to implement. It
    also deals with changes sent across our WAN from other database
    servers.
    But this option is only worthwhile if you can replicate the "Change Event
    manager" SO and still register for an event on the client. Can clients
    register for SO events and receive an event generated by any of the SO's
    replicates? Or when you register for an SO's event do you register for
    only one instance of the SO?
    Thanks in advance for any answers.
    Cheers,
    Duncan Kinnear,
    McCarthy and Associates, Email:
    [email protected]
    PO Box 764, McLean Towers, Phone: +64 6 834 3360
    Shakespeare Road, Napier, New Zealand. Fax: +64 6 834 3369
    Providing Integrated Software to the Meat Processing Industry for over 10
    years
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:
    http://pinehurst.sageit.com/listarchive/forte>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/forte>

  • Dynamic Variables and New-Object - in a GUI

    so, i have not found anything that i can parlay into a solution for what i am attempting to do.  
    Basically i am using powershell to build a GUI to manage websites on various servers.  
    in a nutshell:
    - i have an array with the servers i want to query
    - a foreach loop gets me the site names for each server (number of sites can vary on a server).
    - need put checkboxes on a GUI for every site to do something (25-30 sites across 8 servers).
    currently i am passing the $dir.name variable to a function that will create the new variable using this command:
    $pName = $dir.name New-variable -name $pName -value (New-Object System.Windows.Forms.CheckBox)
    $pName.Location -value (New-Object System.Drawing.Size(10,$i))
    $pName.Size -value (New-Object System.Drawing.Size(100,20))
    $Pname.Text -value $dir.name
    $groupBox.Controls.Add($pName) 
    Problem is i am not able to do anything with my newly created variable.  I am trying to use the following code to position the new checkbox but i get nothing (same for text, size, etc.)  I am not seeing any errors, so i don't know what i have going
    wrong.  
    is this even possible?
    I am able to create static checkboxes, and i can create dynamic variables.  But i can't mix the two...

    Here is how we normally use listboxes to handle form situations like this one.  The listboxes can automatically select subgroups.
    The hash of arrays can be loaded very easily with a script or the results of the first list can be used to lookup and set the contents of the second.
    Notice how little code is actually used.  This is all of the setup code needed aside from the from definition:
    $FormEvent_Load={
    $global:serversToSites=@{
    Server1=@('S1_SITE1','S1_SITE2','S1_SITE3')
    Server2=@('S2_SITE1','S2_SITE2','S2_SITE3')
    Server3=@('S3_SITE1','S3_SITE2','S3_SITE3')
    $listbox1.Items.AddRange($serversToSites.Keys)
    $listbox1_SelectedIndexChanged={
    $listbox2.Items.Clear()
    $listbox2.Items.AddRange($global:serversToSites[$listbox1.SelectedItem])
    $listbox2_SelectedIndexChanged={
    [void][System.Windows.Forms.MessageBox]::Show($listbox2.SelectedItem,'You Selected Site')
    Here is the complete demo form:
    [void][reflection.assembly]::Load("System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")
    [void][reflection.assembly]::Load("System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
    [System.Windows.Forms.Application]::EnableVisualStyles()
    $form1 = New-Object 'System.Windows.Forms.Form'
    $listbox2 = New-Object 'System.Windows.Forms.ListBox'
    $listbox1 = New-Object 'System.Windows.Forms.ListBox'
    $buttonOK = New-Object 'System.Windows.Forms.Button'
    $InitialFormWindowState = New-Object 'System.Windows.Forms.FormWindowState'
    $FormEvent_Load={
    $global:serversToSites=@{
    Server1=@('S1_SITE1','S1_SITE2','S1_SITE3')
    Server2=@('S2_SITE1','S2_SITE2','S2_SITE3')
    Server3=@('S3_SITE1','S3_SITE2','S3_SITE3')
    $listbox1.Items.AddRange($serversToSites.Keys)
    $listbox1_SelectedIndexChanged={
    $listbox2.Items.Clear()
    $listbox2.Items.AddRange($global:serversToSites[$listbox1.SelectedItem])
    $listbox2_SelectedIndexChanged={
    [void][System.Windows.Forms.MessageBox]::Show($listbox2.SelectedItem,'You Selected Site')
    $Form_StateCorrection_Load=
    #Correct the initial state of the form to prevent the .Net maximized form issue
    $form1.WindowState = $InitialFormWindowState
    $form1.Controls.Add($listbox2)
    $form1.Controls.Add($listbox1)
    $form1.Controls.Add($buttonOK)
    $form1.AcceptButton = $buttonOK
    $form1.ClientSize = '439, 262'
    $form1.FormBorderStyle = 'FixedDialog'
    $form1.MaximizeBox = $False
    $form1.MinimizeBox = $False
    $form1.Name = "form1"
    $form1.StartPosition = 'CenterScreen'
    $form1.Text = "Form"
    $form1.add_Load($FormEvent_Load)
    # listbox2
    $listbox2.FormattingEnabled = $True
    $listbox2.Location = '237, 26'
    $listbox2.Name = "listbox2"
    $listbox2.Size = '120, 134'
    $listbox2.TabIndex = 2
    $listbox2.add_SelectedIndexChanged($listbox2_SelectedIndexChanged)
    # listbox1
    $listbox1.FormattingEnabled = $True
    $listbox1.Location = '13, 26'
    $listbox1.Name = "listbox1"
    $listbox1.Size = '120, 134'
    $listbox1.TabIndex = 1
    $listbox1.Sorted = $true
    $listbox1.add_SelectedIndexChanged($listbox1_SelectedIndexChanged)
    # buttonOK
    $buttonOK.Anchor = 'Bottom, Right'
    $buttonOK.DialogResult = 'OK'
    $buttonOK.Location = '352, 227'
    $buttonOK.Name = "buttonOK"
    $buttonOK.Size = '75, 23'
    $buttonOK.TabIndex = 0
    $buttonOK.Text = "OK"
    $buttonOK.UseVisualStyleBackColor = $True
    #Save the initial state of the form
    $InitialFormWindowState = $form1.WindowState
    #Init the OnLoad event to correct the initial state of the form
    $form1.add_Load($Form_StateCorrection_Load)
    #Clean up the control events
    $form1.add_FormClosed($Form_Cleanup_FormClosed)
    #Show the Form
    $form1.ShowDialog()
    You can easily substitute  CheckedListbox if you like checkboxes.
    ¯\_(ツ)_/¯

  • Example programs on abap object events?

    Hi Experts,
    I need some example programs on abap object events.
    regards,
    vijay

    Hi,
    go thru the below program. hope it could help you.
       REPORT sapmz_hf_alv_grid .
    Type pool for icons - used in the toolbar
       TYPE-POOLS: icon.
       TABLES: zsflight.
    To allow the declaration of o_event_receiver before the
    lcl_event_receiver class is defined, decale it as deferred in the
    start of the program
       CLASS lcl_event_receiver DEFINITION DEFERRED.
    G L O B A L   I N T E R N  A L   T A B L E S
       *DATA: gi_sflight TYPE STANDARD TABLE OF sflight.
    To include a traffic light and/or color a line the structure of the
    table must include fields for the traffic light and/or the color
       TYPES: BEGIN OF st_sflight.
               INCLUDE STRUCTURE zsflight.
          Field for traffic light
       TYPES:  traffic_light TYPE c.
          Field for line color
       types:  line_color(4) type c.
       TYPES: END OF st_sflight.
       TYPES: tt_sflight TYPE STANDARD TABLE OF st_sflight.
       DATA: gi_sflight TYPE tt_sflight.
    G L O B A L   D A T A
       DATA: ok_code         LIKE sy-ucomm,
        Work area for internal table
             g_wa_sflight    TYPE st_sflight,
        ALV control: Layout structure
             gs_layout       TYPE lvc_s_layo.
    Declare reference variables to the ALV grid and the container
       DATA:
         go_grid             TYPE REF TO cl_gui_alv_grid,
         go_custom_container TYPE REF TO cl_gui_custom_container,
         o_event_receiver    TYPE REF TO lcl_event_receiver.
       DATA:
    Work area for screen 200
         g_screen200 LIKE zsflight.
    Data for storing information about selected rows in the grid
       DATA:
    Internal table
         gi_index_rows TYPE lvc_t_row,
    Information about 1 row
         g_selected_row LIKE lvc_s_row.
    C L A S S E S
       CLASS lcl_event_receiver DEFINITION.
         PUBLIC SECTION.
           METHODS:
            handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
              IMPORTING
                e_object e_interactive,
            handle_user_command FOR EVENT user_command OF cl_gui_alv_grid
              IMPORTING e_ucomm.
       ENDCLASS.
          CLASS lcl_event_receiver IMPLEMENTATION
       CLASS lcl_event_receiver IMPLEMENTATION.
         METHOD handle_toolbar.
    Event handler method for event toolbar.
           CONSTANTS:
    Constants for button type
             c_button_normal           TYPE i VALUE 0,
             c_menu_and_default_button TYPE i VALUE 1,
             c_menu                    TYPE i VALUE 2,
             c_separator               TYPE i VALUE 3,
             c_radio_button            TYPE i VALUE 4,
             c_checkbox                TYPE i VALUE 5,
             c_menu_entry              TYPE i VALUE 6.
           DATA:
               ls_toolbar  TYPE stb_button.
      Append seperator to the normal toolbar
           CLEAR ls_toolbar.
           MOVE c_separator TO ls_toolbar-butn_type..
           APPEND ls_toolbar TO e_object->mt_toolbar.
      Append a new button that to the toolbar. Use E_OBJECT of
      event toolbar. E_OBJECT is of type CL_ALV_EVENT_TOOLBAR_SET.
      This class has one attribute MT_TOOLBAR which is of table type
      TTB_BUTTON. The structure is STB_BUTTON
           CLEAR ls_toolbar.
           MOVE 'CHANGE'        TO ls_toolbar-function.
           MOVE  icon_change    TO ls_toolbar-icon.
           MOVE 'Change flight' TO ls_toolbar-quickinfo.
           MOVE 'Change'        TO ls_toolbar-text.
           MOVE ' '             TO ls_toolbar-disabled.
           APPEND ls_toolbar    TO e_object->mt_toolbar.
         ENDMETHOD.
         METHOD handle_user_command.
      Handle own functions defined in the toolbar
           CASE e_ucomm.
             WHEN 'CHANGE'.
               PERFORM change_flight.
           LEAVE TO SCREEN 0.
           ENDCASE.
         ENDMETHOD.
       ENDCLASS.
    S T A R T - O F - S E L E C T I O N.
       START-OF-SELECTION.
         SET SCREEN '100'.
       *&      Module  USER_COMMAND_0100  INPUT
       MODULE user_command_0100 INPUT.
         CASE ok_code.
           WHEN 'EXIT'.
             LEAVE TO SCREEN 0.
         ENDCASE.
       ENDMODULE.                 " USER_COMMAND_0100  INPUT
       *&      Module  STATUS_0100  OUTPUT
       MODULE status_0100 OUTPUT.
         DATA:
      For parameter IS_VARIANT that is sued to set up options for storing
      the grid layout as a variant in method set_table_for_first_display
           l_layout TYPE disvariant,
      Utillity field
           l_lines TYPE i.
    After returning from screen 200 the line that was selected before
    going to screen 200, should be selected again. The table gi_index_rows
    was the output table from the GET_SELECTED_ROWS method in form
    CHANGE_FLIGHT
         DESCRIBE TABLE gi_index_rows LINES l_lines.
         IF l_lines > 0.
           CALL METHOD go_grid->set_selected_rows
               EXPORTING
                 it_index_rows = gi_index_rows.
           CALL METHOD cl_gui_cfw=>flush.
           REFRESH gi_index_rows.
         ENDIF.
    Read data and create objects
         IF go_custom_container IS INITIAL.
      Read data from datbase table
           PERFORM get_data.
      Create objects for container and ALV grid
           CREATE OBJECT go_custom_container
             EXPORTING container_name = 'ALV_CONTAINER'.
           CREATE OBJECT go_grid
             EXPORTING
               i_parent = go_custom_container.
      Create object for event_receiver class
      and set handlers
           CREATE OBJECT o_event_receiver.
           SET HANDLER o_event_receiver->handle_user_command FOR go_grid.
           SET HANDLER o_event_receiver->handle_toolbar FOR go_grid.
      Layout (Variant) for ALV grid
           l_layout-report = sy-repid. "Layout fo report
    Setup the grid layout using a variable of structure lvc_s_layo
      Set grid title
           gs_layout-grid_title = 'Flights'.
      Selection mode - Single row without buttons
      (This is the default  mode
           gs_layout-sel_mode = 'B'.
      Name of the exception field (Traffic light field) and the color
      field + set the exception and color field of the table
           gs_layout-excp_fname = 'TRAFFIC_LIGHT'.
           gs_layout-info_fname = 'LINE_COLOR'.
           LOOP AT gi_sflight INTO g_wa_sflight.
             IF g_wa_sflight-paymentsum < 100000.
          Value of traffic light field
               g_wa_sflight-traffic_light = '1'.
          Value of color field:
          C = Color, 6=Color 1=Intesified on, 0: Inverse display off
               g_wa_sflight-line_color    = 'C610'.
             ELSEIF g_wa_sflight-paymentsum => 100000 AND
                    g_wa_sflight-paymentsum < 1000000.
               g_wa_sflight-traffic_light = '2'.
             ELSE.
               g_wa_sflight-traffic_light = '3'.
             ENDIF.
             MODIFY gi_sflight FROM g_wa_sflight.
           ENDLOOP.
      Grid setup for first display
           CALL METHOD go_grid->set_table_for_first_display
             EXPORTING i_structure_name = 'SFLIGHT'
                       is_variant       = l_layout
                       i_save           = 'A'
                       is_layout        = gs_layout
             CHANGING  it_outtab        = gi_sflight.
       *-- End of grid setup -
      Raise event toolbar to show the modified toolbar
           CALL METHOD go_grid->set_toolbar_interactive.
      Set focus to the grid. This is not necessary in this
      example as there is only one control on the screen
           CALL METHOD cl_gui_control=>set_focus EXPORTING control = go_grid.
         ENDIF.
       ENDMODULE.                 " STATUS_0100  OUTPUT
       *&      Module  USER_COMMAND_0200  INPUT
       MODULE user_command_0200 INPUT.
         CASE ok_code.
           WHEN 'EXIT200'.
             LEAVE TO SCREEN 100.
             WHEN'SAVE'.
             PERFORM save_changes.
         ENDCASE.
       ENDMODULE.                 " USER_COMMAND_0200  INPUT
       *&      Form  get_data
       FORM get_data.
    Read data from table SFLIGHT
         SELECT *
           FROM zsflight
           INTO TABLE gi_sflight.
       ENDFORM.                    " load_data_into_grid
       *&      Form  change_flight
    Reads the contents of the selected row in the grid, ans transfers
    the data to screen 200, where it can be changed and saved.
       FORM change_flight.
         DATA:l_lines TYPE i.
         REFRESH gi_index_rows.
         CLEAR   g_selected_row.
    Read index of selected rows
         CALL METHOD go_grid->get_selected_rows
           IMPORTING
             et_index_rows = gi_index_rows.
    Check if any row are selected at all. If not
    table  gi_index_rows will be empty
         DESCRIBE TABLE gi_index_rows LINES l_lines.
         IF l_lines = 0.
           CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
                EXPORTING
                     textline1 = 'You must choose a line'.
           EXIT.
         ENDIF.
    Read indexes of selected rows. In this example only one
    row can be selected as we are using gs_layout-sel_mode = 'B',
    so it is only ncessary to read the first entry in
    table gi_index_rows
         LOOP AT gi_index_rows INTO g_selected_row.
           IF sy-tabix = 1.
            READ TABLE gi_sflight INDEX g_selected_row-index INTO g_wa_sflight.
           ENDIF.
         ENDLOOP.
    Transfer data from the selected row to screenm 200 and show
    screen 200
         CLEAR g_screen200.
         MOVE-CORRESPONDING g_wa_sflight TO g_screen200.
         LEAVE TO SCREEN '200'.
       ENDFORM.                    " change_flight
       *&      Form  save_changes
    Changes made in screen 200 are written to the datbase table
    zsflight, and to the grid table gi_sflight, and the grid is
    updated with method refresh_table_display to display the changes
       FORM save_changes.
         DATA: l_traffic_light TYPE c.
    Update traffic light field
    Update database table
         MODIFY zsflight FROM g_screen200.
    Update grid table , traffic light field and color field.
    Note that it is necessary to use structure g_wa_sflight
    for the update, as the screen structure does not have a
    traffic light field
         MOVE-CORRESPONDING g_screen200 TO g_wa_sflight.
         IF g_wa_sflight-paymentsum < 100000.
           g_wa_sflight-traffic_light = '1'.
      C = Color, 6=Color 1=Intesified on, 0: Inverse display off
           g_wa_sflight-line_color    = 'C610'.
         ELSEIF g_wa_sflight-paymentsum => 100000 AND
                g_wa_sflight-paymentsum < 1000000.
           g_wa_sflight-traffic_light = '2'.
           clear g_wa_sflight-line_color.
         ELSE.
           g_wa_sflight-traffic_light = '3'.
           clear g_wa_sflight-line_color.
         ENDIF.
         MODIFY gi_sflight INDEX g_selected_row-index FROM g_wa_sflight.
    Refresh grid
         CALL METHOD go_grid->refresh_table_display.
         CALL METHOD cl_gui_cfw=>flush.
         LEAVE TO SCREEN '100'.
       ENDFORM.                    " save_changes
    regards
    -Rakesh

  • Painting new objects without repainting old objects

    Halle you
    I am a no- vice in this branch. Help me
    THe problem is I am drawing some rectangle and lines inside the canvas
    but I have to repaint the existing geometrical images along with the new one, but but but
    I want to only draw the new object ONLY without redrawing the older ones. that is when I draw some object say RECTANGLE after drawing the CIRCLE and repaint the CIRCLE vanishes.
    I AM TRYING TO AVOID VECTORS.
    HELP ME FRIENDS

    Why don't you keep an area object (Shape) that will contains all your previous as well as the new shapes so that you need not to draw all shapes everytime.
    See this demo if you like...
    import java.awt.*;
    import javax.swing.*;
    import java.awt.geom.*;
    import java.awt.event.*;
    public class MyCanvas extends Canvas {
         Area area = new Area();
         static MyCanvas canvas = new MyCanvas();
         public MyCanvas(){
              draw(new Ellipse2D.Double(10,10,50,50));
         public void draw(Shape shape){
              area.add(new Area(shape));
              repaint();
         public void paint(Graphics g) {
              super.paint( g);
              Graphics2D g2 = (Graphics2D)g;
              g2.draw(area);
         public static void main(String[] args) {
              JFrame f = new JFrame("Shape demo");
              f.getContentPane().add(canvas, BorderLayout.CENTER);
              JButton button = new JButton("add rectangel");
              button.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent e) {
                        Rectangle r = new Rectangle(10,100, 100,50);
                        canvas.draw(r);
              f.getContentPane().add(button, BorderLayout.SOUTH);
              f.setSize(500,300);
              f.setLocation(200,200);
              f.show();
    }

  • Execute powershell command (new-object -comObject ...) in management pack

    Hello everyone
    I have a COM Object that want to use it in my management pack. When I write the powershell command "new-object -comObject ... " to create it outside of MP and in a ps1 file it works without any error. However when I write it in my MP, this
    error is showed in event viewer: "Retrieving the COM class factory for component with CLSID {clsID} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))."
    I have to mention that when I use vb script in my MP and using "CreateObject()", I don't have any problem.
    How can I use "new-object -comObject ... " in my management pack?
    thank you all
    Alireza

    Hi Marthijn,
    Actually I don't have any problem with powershell in my management packs. For example I can use "MOM.ScriptAPI"
    to create $oBag and return it to next module. My problem is only with that custom COM object. Interesting thing is that, it
    works fine when I create it in powershell file outside of MP, but when I create it in my MP, that error occures.
    thank you so much
    Alireza

  • What exactly is Object Event Repository?

    Hello,
    I´ve just read a marketing article about the new SAP Object Event Repository.      Precisely because it is a marking article the key-facts and functions are missing. It sounds like a reduced AII with extended database functions for Tag-tracking. Can somebody explain the benefit, technology and functions of the OER? What is the different between AII and OER?
    Thank you, Bastian

    Hi,
    SAP OER serves as a system of record for uniquely identified objects (like EPCs). So you are right in saying it like an extended database functions for tag tracking.
    But it will not reduce the AII functionalities. AII will still remain as the data capturing application (tag read) and the repository of these reads for the tags will be maintained in the OER. So these two are two different applications.
    OER allows for tracking any id or document for which information has been sent from AII. OER will also have the capability of generating reports (business intelligence) for these data reads maintained in its repository.
    SAP has recently unveiled is PTA (Product Tracking & Authentication) feature in OER. Read at http://www.sap.com/company/press/press.epx?PressID=7440
    Since this product has not come in the market yet, we need to wait till the time of its release for documents on the product. Then we might know the exact benefits/technology on OER.
    Thanks,
    Ashish

  • Doubt in creation of a new object

    Hi All,
                 I have one doubt in creation of a new object.If a new object is to be created and it is not a subtype
    of any existing object, then what should we enter in the Program field for creating the object?
    I hope I am clear with my question.
    Thanks in Advance,
    Saket.

    Hi Saket,
    Following will be required for created a custom business object.
    1. Object Type - ZTEST (Internal Techincal Key)
    2. Object Name - ZTESTNAME (Technical Key Name)
    3. Name - TEST (Name of BO, it is used while selecting the object type)
    4. Description - (Short Description of BO)
    5. Program - ZTESTPROGRAM (ABAP program in which the methods of the object type are implemented)
    6. Application - A or B.. etc (Area to which your BO is related)
    Please remember that you can learn these basic things by giving F1 help on those fields and in HELP.SAP.COM.
    Regards,
    Gautham Paspala

  • What is the diffrence between extends and creating new object?

    HI ALL,
    what is the diffrence between extends and creating new object?
    meaning
    class base{
    class derived extends base{
    class base{
    class derived {
    derived(){
    base var = new base();
    can u people tell me diffence from the above examples.
    THANKS.
    ANANDA

    When you create a new object you have to supply the class to which that
    object belongs. A class can extend from another class. If it does so
    explicitly you can define the 'parent' class from which the class extends.
    If you don't explicitly mention anything, the class will implicitly extend
    from the absolute base class named 'Object'.
    Your example is a bit convoluted: when you create a Derived object,
    its constructor creates another object, i.e. an object from the class from
    which the Derived class extends.
    Extending from a class and creating an object don't have much in common.
    kind regards,
    Jos

  • Creating a new object at runtime

    What I want to do is dynamically change the name of a object
    everytime I create a new one, what I mean excatly is like make it
    so that I can some how increment a value of a variable and apply it
    to an object anme... so I get something like this
    objectName0, objectName1, objectName2, objectName3 and so on.
    I basically want to make it so that I always have a new object to
    use... how would I go about doing this?

    You don't need exec, the api provides this functionality for you. Look at the java.util.jar package.

  • Cannot add new iCal events on my iPhone 3G.

    My iPhone 3G has stopped saving new iCal events. I can still set up new events in iCal on my laptop, and they'll sync over to my iPhone, but new events won't save when entered into iCal on my iPhone. Any idea what's wrong and how to fix this?
    BTW, I just got rid of a MobileMe account. I never ended up using MobileMe, so it doesn't seem like that should be the issue here, but I noticed that some other folks have had iCal sync issues with MobileMe, so I thought I'd add that info.

    In other words, it's hacked.
    Sorry, you can't get help here.
    Say for an instance, that it wasn't hacked. Would you suggest to just wipe and restore it?

  • Create new iCal event from contents of mail uses wrong date

    I received an email today with an appointment using the date "6/3/2010 at 4PM". Being from the US, it is obvious to me that this meeting should occur on June 3, 2010, but when I attempt to create a new iCal event with this date it creates the event on March 6, 2010. Even more confusing is that when I choose "Show this date in iCal" it highlights March 7, 2010!
    My question is:
    Shouldn't the system default to a month/day/year date preference everywhere when I've selected US English in the internationalization preferences pane?

    have a very similar question: is there somewhere an application where I can, when receiving an email, put it into iCal so that I am reminded about it in a week or something?

  • In mail "create new ical event" has stopped appearing in ical

    Please help! I love clicking on data in email to bring up the "Create New iCal Event" box, and using it to put new events into my ical calendar. But recently when I "Create New iCal Event" from an email, and click "add to iCal" the window closes but the event doesn't show up in iCal. I can still add events by clicking on a calendar date in iCal and typing them in, but the link between Mail and iCal seems to be broken. How can I fix it?
    Could this be related to how Firefox recently broke? Foxfire will not save bookmarks any more, either, I click on "Bookmarks," then "Bookmark this page". The window closes but the bookmark does not save. Also, the forward/backward browser arrows no longer work on Foxfire.

    Could you be more specific? What happens (or fails to happen?)

Maybe you are looking for

  • How to clear the delivery group in sales order?

    Dear All:        My sales order is auto created from CRM by BAPI, but in vbap table, the GRKOR field is 001, only one order ,  how to clear the delivery group in the sales order ? Regards Peter.

  • Planned delivery time field in sale order

    Dear All, During creation of  STO at item level under delivery TAB "planned delivery time" field is showing with edit mode, I want to activate this field for sale order creation / change also. Plz advice how I can do this. regards, sps.

  • Generate XML document

    Hi, My problem is about generating XML document. I'd like to be able to generate automaticaly (like what we can get at this kind of URL http://xdbserver:8080/oradb/USER/table_name) XML documents for any relational tables, I want the document being sc

  • Value Mapping and Dynamic Value Mapping

    Hi Experts, Could you please give a example for Value Mapping and Dynamic Value Mapping? Regards Sara

  • Employee Discount Rate on second lines

    I know that the employee discount is $34.99 and data is $29.99 as others have mention. For my secondary lines @ $9.99, Can I add, $15 texting $5.99 insurance ...some other feature to equal or above $34.99 to get the discount?