How do I the Force F8 / PAI event to execute

Hi,
I have a screen that I enter a criteria on; next it brings up another screen with a table grid.  I select from the list the items that I am interested in then I hit the F8 key (execute) to bring up the selected data on another screen.
If the table grid only has one record, I want to selected the one record and hit the F8 key via code instead of having the user have to do it.  I think I have figured out how to get the one item selected via code (at least while I am in debug mode) but I do not know how to have the F8 executed via code so that the PAI event will trigger allowing all the rest of the necessary code to execute.
I appreciate your help.
Tom

Hi All,
Below is the final code that I used to occomplish my task.  I want to thank everyone of you for your help.  All of you triggered thought in this solution.  I had to use a memory parm id to help prevent a looping effect that I was getting when I went back to the transaction.  In addition, I reset the parm id to spaces in the 'BACK' button part of code so that I can get into the IF statement.
MODULE check_for_single_row OUTPUT.
  CONCATENATE 'SingleRowFlag' sy-uname sy-modno INTO g_parm_single_row_flag.
  GET PARAMETER ID g_parm_single_row_flag FIELD g_single_row_flag.
  IF sy-subrc <> 0.
    MESSAGE 'Parameter not found' TYPE 'I'.
  ENDIF.
  IF g_single_row_flag = '1'.
    EXIT.
  ENDIF.
  IF g_zrt_cnt = 1.
    temp_zrt = wa_zrt.
    temp_zrt-chkbx = 'X'.
    MODIFY i_zrt
      FROM temp_zrt
      INDEX 1
      TRANSPORTING chkbx.
    SET PARAMETER ID g_parm_Single_Row_Flag FIELD '1'.
    PERFORM zcart_transaction_art.
  ENDIF.
ENDMODULE.                 " check_for_single_row  OUTPUT
P.S.
I could not get this code to work but it helped get to what I have above.
Thanks again.
Tom
READ TABLE i_zrt INDEX 1.
i_zrt-chkbx = 'X'.
MODIFY i_zrt INDEX 1 TRANSPORTING chkbx.

Similar Messages

  • How to populate dropdown without triggering PAI event ?

    Hi,
    I have a screen with two fields- One input field and one drop down list field which has to be populated based on the value given in the first field. 
    How can I populate the drop down list dynamically based on first input field without pressing enter ( i.e with out triggering PAI event ) .  I tried using DYNP_VALUES_READ in value request event.
    Please give me your suggestions .

    Hhhhmm, I thought initially it should work, but I must admit I couldn't get it to work with a listbox. I just tried a simple report with selection screen, see below. Just enter something for the first parameter and then choose the value help for the second field. You will see that it will pick up the value from the first field, if we don't use a listbox.
    Once you comment in the coding the LISTBOX and replace it with the normal field, you can see that the value help works as one would hope. It seems that the problem is that the values for the dropdown list get populated too early (i.e. start-up of the report). I don't have the time at the moment to check this out further, but I'm assuming others must have tried this before. Any comments?
    REPORT zvaluehelp.
    PARAMETERS:
      p_statva TYPE stacust-statva,
      p_status TYPE stacust-status AS LISTBOX VISIBLE LENGTH 3. " Doesn't work
    *  p_status TYPE char1. " Value-help works for this
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_status.
      PERFORM value_help.
    FORM value_help.
      DATA:
        dynpread TYPE dynpread,
        dynpread_tab TYPE STANDARD TABLE OF dynpread,
        stacust TYPE stacust,
        stacust_tab TYPE STANDARD TABLE OF stacust.
      dynpread-fieldname = 'P_STATVA'.
      APPEND dynpread TO dynpread_tab.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname                   = sy-repid
          dynumb                   = sy-dynnr
          perform_conversion_exits = 'X'
        TABLES
          dynpfields               = dynpread_tab
        EXCEPTIONS
          OTHERS                   = 1.
      CHECK sy-subrc = 0.
      READ TABLE dynpread_tab INTO dynpread INDEX 1.
      CHECK dynpread-fieldvalue IS NOT INITIAL.
      SELECT * FROM stacust INTO TABLE stacust_tab
               WHERE statva = dynpread-fieldvalue.
      CHECK sy-subrc = 0.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          ddic_structure = 'STACUST'
          retfield       = 'STATUS'
          dynpprog       = sy-repid
          dynpnr         = sy-dynnr
          dynprofield    = 'P_STATUS'
          value_org      = 'S'
        TABLES
          value_tab      = stacust_tab
        EXCEPTIONS
          OTHERS         = 0.
    ENDFORM.
    The coding above was just intended as a quick test - so I know it's not proper (i.e. check of return codes, etc.).
    Cheers, harald

  • How to access screen field in pai event

    Hi All,
    I have created a custom screen it has the field say matnr selected from the dictionay.NOw  how will I should access this field in PAI event module?
    Thanks in advance
    Mahesh

    just declare the same variable in your abap editor as per your layout field name.
    suppose in your layout input field name is matnr just declare
    data : matnr like mara-matnr.
    in pai module if you are using matnr it will give you the screen data.
    like
    module pai input.
    if matnr ne '1000'.
    message 'Error matnr is not 1000' type 'E'.
    endif.
    endmodule.
    reagards
    shiba dutta

  • How to finetune the force control of an AC Motor Linear Actuator?

    Hello,
    I
    am hoping to find some help here with the following problem, which I am trying
    to solve for several days now....
    I
    am using the UMI-7774 and an AC servo-motor-driven linear actuator to do
    force control. Basically, I need the actuator to apply a constant force and
    react quickly to force changes. My system setup is as follows: I am using
    a PCI-7344 Motion Control Card to provide the analogue command signal
    (0-10V). This signal is supplied to the actuator controller (through a
    UMI-7774), which transforms the command signal to an amperage command signal
    (0-2.17Arms). This is the signal controlling the actuator’s torque. The actuator controller is working in torque mode. I use
    a Kistler PZT force sensor (ring type) and a Kistler amplifier as my feedback
    source. The signal from the sensor amplifier is directly connected to the ADC of the
    UMI. I am using MAX to tune my system and define a PID controller that gives
    me a good step response.
    (1)
    The results so far show that it works in principle, but I believe my system is
    not yet tuned optimally. However, the best step response results I have
    obtained and the PID parameters I used are shown in the attached files. As I am
    relatively new to this area, could you please advise me on how I could further
    improve the step response of the system? The current rise time and
    overshoot values are very good (a 3% overshoot would also be acceptable),
    but the observed undershoot is causing delayed settling. Also, the oscillation
    observed during undershoot is something I would like to remove.
    (2)
    I have tried increasing Kp and Kd values. Increased Kd does not seem to correct
    the oscillation problem. On the contrary, it destabilises the system. Increasing
    Kp causes an unwanted overshoot.  I have also tried to reduce the
    Derivative Sampling Period but that gave even worse results (System Inertia: J
    = 1.8629*10^-5 Kgm^2).
    At
    Td=2 the actuator was retracting on its own to its home position when I set Ki>=8.
    I got the most stable behaviour using Td=4. Is there any other way I could
    improve the actuator’s response?
    (3)
    I have seen that in some cases people have used a “double PID loop” one
    for the encoder feedback and one for the force feedback. Do you believe that
    this would improve system behaviour? If so, how could
    I implement two PID loops? I mean, MAX only allows me to enter
    one set of PIDs....or is there a possibility to set up a second PID-loop
    somewhere?....I have seen that the "Force Control Using Monitoring
    Force" example essentially works with two Closed-loops, but one of them is
    implemented in the application software and this would result in a
    non-deterministic and comparatively slow response of the system, right??
    Sorry for the long post and thanks
    a lot in advance for help and advice.
    Attachments:
    Force Conrtol Loop Settings Actuator-BEST.JPG ‏41 KB
    Step Responce Actuator-Force Feedback-BEST.JPG ‏58 KB

    Hello Jochen and thank you for your very nice reply.
    The past few days I have been trying to implement your advice, but unfortunately I did not have much success. Let me start by saying that explanations to my problem, the 2nd one looked more probable, as I always make sure that there is contact between my actuator and the workpiece I am pushing against. So, I unmapped my DAC by setting up the axis as a stepper axis with no feedback and I used the Load DAC to apply voltage and see when my actuator starts moving. That gave me the upper and lower limits for the Static Friction Compensation filter (please refer to attached image). I then implemented this filter and tried to retune the PID parameters, but the results I got were poor.
    I can now adjust the parameters so that there is no initial spike and undershoot, but now the force ramps up fast to a specific value and then keeps rising slowly. Vibration is observed at the point of transition from fast to slow ramp-up (ref. Step Responce Actuator-Force Feedback-WITH FILTER_v2).
    I could not eliminate the steady state error. When I tried to eliminate the steady state error by increasing Ki, or tried to create an initial overshoot by increasing Kp, I always ended up with an unstable system or a system with a response similar to the one shown in attached figure “Step Responce Actuator-Force Feedback-WITH FILTER_v1”.
      Do you perhaps have an explanation or comments for this behaviour? As for your other questions:
    Sensor Bandwidth: N/A, Charge Amplifier Bandwidth: 200 kHz, Low pass filter: No (Amplifier has the capability though)
    PID Update Period: 250 microseconds (fastest available)
    NI Motion Version 2.3
    Labview Version 8.5.1
      Thank you,
    Thomas
    Attachments:
    Step Responce Actuator-Force Feedback-Filter Settings.JPG ‏28 KB
    Step Responce Actuator-Force Feedback-WITH FILTER_v2.JPG ‏69 KB
    Step Responce Actuator-Force Feedback-Filter Settings.JPG ‏28 KB

  • How to edit the date in an event

    Help please, I uploaded some pictures into iphoto (I'm new to it). However they were uploaded and dated in an event automatically as 2004 and they are supposed to be 2009. Does anyone know how to change the date for events manually? I cannot figure it out. Thanks!!!

    Check your camera set up - the dates iPhoto use come from it
    to correct dates select the photo(s) you want to correct and adjust the time and date - iphoto menu ==> adjust date and time
    You may find the iPhoto tutorials worth watching - http://www.apple.com/findouthow/photos/ - as simple and intuitive as iPhoto is there is a learning curve and there are lots of features to learn
    LN

  • How to change the user for an event job as SAP_MONITORING_STARTUP_DISPATCH

    Hi experts!
    We change the user that execute all our jobs. I can change the user JOB-BW for JOB-BI for this job SAP_CCMS_MONI_BATCH_STARTUP_DP, but the problem is when this job is executed by event for this other job SAP_MONITORING_STARTUP_DISPATCH, but i can't change the user JOB-BW for JOB-BI for this event
    Could you tell me, how i do the change user for this job.
    Best Regards
    Ramon Sanchez

    Hi!
    My problem have been solved. The job SAP_CCMS_MONI_BATCH_STARTUP_DP is automatically created by
    Job SAP_CCMS_MONI_BATCH_DP. It is an event triggered job to handle the startup-methods which are to be processed in batch.
    The event is SAP_MONITORING_STARTUP_DISPATCH; I only select the job in SM37 and specify this event and after made the search the job  SAP_CCMS_MONI_BATCH_STARTUP_DP i only change the user.
    Thank you all for your help!
    Ramon Sanchez

  • How to stop the FORCED Firefox 29 update?

    I am testing with Palemoon and so on but for now I still have Firefox 28 and that is what I want.
    I did disable everything to prevent the automatic updating (Advanced / Updates / Never controle). In about:config is also says:
    app.update.service.enabled = false
    app.update.auto = false
    app.update.enabled = false
    app.update.silent = false
    Yet Firefox 29 keeps on being forced down my throat? Now again: I get a little pop-up saying that version 29.0.1 is available and downloaded. And when checking under Help / About Firefox it says I have to restart Firefox to do the update? And sure enough: I close Firefox 28 and start it again and it is updating to version 29. And this is not an incident: when searching for it, many people have the same problem.
    So, how to stop this forced update?

    @ guigs2
    I know, thanks :)
    But without wanting to start another discussion (I did that with this topic https://support.mozilla.org/en-US/questions/998106 which is closed now after many views and votes), I am one of the many many people who refuse to go to FF29 because of numerous reasons of which amongst are the fact that it looks hideous, way less customizable in default state (have to use way more add-ons to get it the we want), feeling Mozilla is stabbing the users who made Firefox big, in the back with FF29, and so on.
    So still at FF28 until I find a good replacement and say goodbye to Firefox after using it from version 1 till now :(

  • How to control the tab control using event structure?

    Hi,
    I am using tab control and event structure in the program.
    When i run the application event is not happening for the active page.
    When user switches from active page to the other page then event is taking place for all pages
    So, how to get the event trigger for the active page when the application is started
    For more clarification i am attaching the code "Test Control Tab using Event Structure.vi"
    Attachments:
    Test Control Tab using Event Structure.vi ‏52 KB

    You have a basic misunderstanding of dataflow. Maybe you should start with some tutorials or study some of the examples that ship with LabVIEW.
    The event structure belongs inside the while loop, and not vice versa. RIght now, the event structure only runs exactly once and never again.
    If the stop is pressed first, the VI will stop. Game over.
    If the tab control is changed (from any state to any other state!), the inner loop will spin forever as fast as the CPU allows, either executing one or the other case. It just reads the tab terminal to decide which case to execute. Changing tab never triggers any events. The VI is trapped inside the event until stop is pressed to stop the VI.
    you were closer to a reasonable program in the other thread:
    http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=287905
    Have you tried execution highlighting? Maybe things would become more clear of you do.
    LabVIEW Champion . Do more with less code and in less time .

  • How to determine the execution order of event structure

    Hi everyone,
    I have an event structure were it contains four events. All the four events has separate buttons to execute. Here, three events will generate numeric output, remaining one event (Finder) should find the order of those three events. For example, Three events namely A, B and C. I execute the events in the order of B, C and A. The finder event should find the order of previously executed events(B, C and A). 
    Thanks in advance.
    Solved!
    Go to Solution.

    Hello Vij@y,
    I could not look in to your VI because I dont have LabVIEW 2013 (I have 2010) but i tried to understand the situation you are explaining.
    Please find attached image of front panel I made for your reference.
    Here I generated two events sequently, no 3 first followed by no 1 and the same is displayed in sequence array. now you can use the build array function to actually add each event to this array as explained by many people in this forum.
    regarding the timeout event, either you can display the sequencer array in that event or you can display it in finder event and then you can reset the sequencer in finder event (I used reset button click event to reset sequencer back to zero value)
    regarding getting zero when you press finder/reset button before triggring any other event:- Is it not correct to have empty array when you have not trigger any event?
    I hope I put it well and may help you to find solution. 
    With Regards
    Miraz
    Kudos is better option to thank somebody on this forum
    Attachments:
    Sequence.png ‏70 KB

  • How to recieve the value in subscribe event??

    Hi, I have to pass selected data in publish event and recieve the value in subscribe event..
    e.g:-publish event----
    data : {
              context : evt.getSource().getBindingContext(),
              selectedValue : model [
                                                  evt.getSource().getBindingContext()

    Hi Kelvin,
    I suppose you select one list item and you want to pass that selected list item to another view.
    Follow these steps:
    1. Create a variables like "var selectedListItem,bindingContext,itemTitle;"
    2. Your list( I suppose you are using StandardListItem) must have an evenhandler for list "select" event like following:
         <List id="yourList"
              select="onListSelect"
              mode="SingleSelectMaster"
              items="{/yourbindingpath}">
         <items>
              <StandardListItem
                   title="{titleBinding}" />
         </items>
         </List>
    3. Create "onListSelect" event handler in your view controller which will give you selected item. Store that value in variable "selectedListItem" and pass it to your publish method.
         onListSelect : function(oEvent){
              bindingContext= oEvent.getSource().getBindingContext();
              itemTitle= listItem.getTitle();
    Regards,
    Rauf

  • How to catch the Ctrl-V (paste) event in TextEdit UI element

    Hello Experts,
                        I want to track the Ctrl-V event in the TextEdit UI element . Is there any possibility to do this .
    Please help .
    Regards
    Vivek

    >
    Abhimanyu Lagishetti wrote:
    > Hi
    >
    > Web Dynpro as of now does not provide control over some events like onPress Key, on Mouse over etc..
    > May be in future we expect this kind of functionality.
    >
    > Abhi
    The upcomming release of NetWeaver 7.0 (Q3 of 2008) has support for HotKeys and Keyboard Access.  We also added Drag and Drop event handlers. I have my doubts if any sort of onMouse* events will ever be added to WD because they could be potential performance problems.  Remember even now that we have AJAX based events, all the eventing in WD does require communication with the server. So events that are triggered very frequently and are typically only handled on the frontend in web programming probably won't come to Web Dynpro - at least in the forseable future.

  • Flex addEventListener - how to refresh the screen during called event?

    I can't seem to find the answer to what I would have thought was a common problem.
    What I want to do this is:
    1. Show the Open File Dialog
    2. Process the file selected
    3. During processing the file, report progress to the User
    I have a file defined, and am using the browseForOpen and AddEventListener:
        public var fileInput:File = new File();
        fileInput.browseForOpen("Open file",[filter]);
        fileInput.addEventListener(Event.SELECT, onFileSelect);
        // Step 2 - function gets called to process the file
        private function onFileSelect(e:Event):void
            // Step 3 - do some processing, and at intervals report progress to the screen
    My issue is - any changes to the screen within the event listener do not get done until the function is complete.
    Any help would be appreciated,
    Thanks

    Hi Neal,
    I'd suggest breaking up your processing in Step 3 so that the player has a chance to step in and update the screen. Take a look at articles on "green threads" for the basic concept:
    http://blog.generalrelativity.org/?s=green
    http://code.google.com/p/greenthreads/
    Off the top of my head, some ways to break your processing up into chunks:
    set up a Timer that fires every n milliseconds, and a listener on the Timer events that processes a chunk of the file on each event
    set up an ENTER_FRAME event handler that processes a chunk of the file on each event
    chain the processing of your chunks of the file with callLater() calls
    Also, you may want to take a look at the ProgressBar component for reporting the progress of your processing.
    HTH,
    -- Tom Kraikit
    Flex SDK engineer

  • How to set the session using onClick event?

    Dear All,
    I have a link, which once the user click on it, I want to set the session.
    <a href="link.jsp" > Link </a>How to set the session? Where should I put <%session1.setAttribute ("test", "1234"); %>?
    Any idea?
    Thanks

    when u click on Link
    the control goes to link.jsp/.
    and in this page u can write the session related code.

  • How to trap the document window activate event?

    Hi All,
    I am working with a plugin development application. My requirement is, at any time I may have more than one document opened. The plugin window what I have designed gets populated with data from the xml file attached with the current document. Therefore whenever I switch between the document window, I need the plugin window to be refreshed so that it will load/display the contents from the current xml file.
    For this I need to trap the activate document window event. So whenever a window is selected from the current list of opened windows, then the plugin should get refreshed automatically.
    Actually, I tried inheriting the CWindowEH class and I used the kDocWindowBoss class for the same. But the event is not firing as expected. Help/tips from anyone could be appreciated.
    Thanks in advance.
    JR.

    Hi, <br /><br />I don't think having observers on kDocBoss and kDocumentListBoss should be a problem. We do exactly that.<br /><br />Just running with a couple of break points in your code, do you hit the DocListObserver::AutoAttach and not the Update().<br /><br />If you don't hit the AutoAttach breakpoint then it's probably the resource is not set up right. Ours is like this..<br /><br />/** Observes document list actions.<br /> */<br />AddIn<br />{<br />     kDocumentListBoss,<br />     kInvalidClass,<br />     {<br />      IID_IMYDOCLISTOBSERVER, kMyDocListObserverImpl,<br />     }<br />},<br /><br />If you're getting to the AutoAttach but not the Update then it may be that you're not specifying what notifications you wish to receive.<br /><br />Our AutoAttach is like this..<br /><br />     do<br />     {<br />          InterfacePtr<ISubject> subject( this, UseDefaultIID());<br />          if (subject != nil)<br />          {<br />               if ( subject->IsAttached(this, IID_IDOCUMENTLIST, IID_IMYDOCLISTOBSERVER) == kFalse )<br />                    subject->AttachObserver(this, IID_IDOCUMENTLIST, IID_IMYDOCLISTOBSERVER);<br />          }<br />     }<br />     while ( kFalse );<br /><br />with equivalent DetachObserver code in the AutoDetach of course.

  • How to know the User name and date, who executed the report last time.

    Hi All,
    We are collecting a list of reports which are not executed for past 3 months. Can anybody tell me how to know the username and date they executed the report last time.
    Is there any table to look ? or is there any process ?
    Thanks,
    Ravi.

    Ravi,
    Use SE16 - then look at rszcompdir.
    We look up Version = 13 for queries.
    Regards
    Gill

Maybe you are looking for