Using key strokes as command in AT LINE SELECTION section.

Hi all,
I created a small report which do a refresh every X seconds. In every refresh, the form "print_panel" is performed. In this form I used some icons as buttons of my user interface in this way:
..."skipping code that's not relevant w.r.t to the question.
SKIP TO LINE myline.
WRITE AT mycolumn(2) ICON_COLUMN_LEFT AS ICON NO-GAP.
This allows in my report to use such an expression to associate a dbl click on that icon to a certain block of code:
AT LINE-SELECTION.
    DATA: FIELD(30).
    GET CURSOR FIELD FIELD.
    IF FIELD = 'ICON_COLUMN_LEFT'.      
       PERFORM myformthatdoessomething.
I'm wondering if there's a way to associate this behaviour also to a key stroke. For example, pressing the "A" key is equivalent to do a double click on that icon. How can i manage this  ?
Thanks in advance

Hi Ravi,
Ravi,
Thanks for the response.
The requirement is :
When the START OF SELECTION section is executed a write statement displaying the number of incomplete sales Orders is displayed. When you click on that output statement(as in drill down repoting) the code below comes into picture:
AT LINE-SELECTION.
PERFORM disp_blkd_bill.
PERFORM start_of_selection.
LEAVE SCREEN.
Now the alv list displays incomplete Sales Orders. The user using the HOTSPOT feature completes/processes the sales Order and wants the ALV report to refresh when she hits the back button and returns to the ALV list which I do so. Now when she again hits the back button she wants to view the updated statement displaying the number of incomplete Sales orders which happens when the routine 'start_of_selection' is excuted again. But then If I do not use the LEAVE SCREEN command it takes her back to the old displaing the previous incomplete number of sales orders and then back to the selection screen. We do not want that old statement to be displayed on the way back to the selection screen.
Please let me know if you still need further clarifications.
Thanks,
ALAM.

Similar Messages

  • How to use both At USER-COMMAND and AT LINE-SELECTION in one abap program

    I am trying out a program where I need to use both line selection and user command events in one program. Suggest me how to do it.

    USE the okcode 'PICK'. (I mean add a 'PICK' in the GUI staus or the menu.) When ever u use both the events u have to use PICK to trigger the at line selection.
    U just need to add the PICK in the GUI status and ofcourse write code in the program.
    AT LINE-SELECTION.
    CASE sy-ucomm.
    WHEN 'PICK'.
    write:/ 'HELLO WORLD'.
    ENDCASE.

  • Processing of code in AT LINE-SELECTION section

    Hello,
    AT LINE-SELECTION.
    PERFORM disp_blkd_bill.
    PERFORM start_of_selection.
    LEAVE SCREEN.
    In the code above the first FORM routine displays an ALV list. The second FORM routine needs to display a WRITE statement. What happens is the first FORM routine is executed successfully. When I hit the BACK button I want the second FORM routine to execute and then the LEAVE SCREEN command, but it never executes the second FORM routine , it directly executes the  LEAVE SCREEN command.
    Is there a way to execute the second FORM routine before the LEAVE SCREEN command?
    Thanks,
    ALAM.

    Hi Ravi,
    Ravi,
    Thanks for the response.
    The requirement is :
    When the START OF SELECTION section is executed a write statement displaying the number of incomplete sales Orders is displayed. When you click on that output statement(as in drill down repoting) the code below comes into picture:
    AT LINE-SELECTION.
    PERFORM disp_blkd_bill.
    PERFORM start_of_selection.
    LEAVE SCREEN.
    Now the alv list displays incomplete Sales Orders. The user using the HOTSPOT feature completes/processes the sales Order and wants the ALV report to refresh when she hits the back button and returns to the ALV list which I do so. Now when she again hits the back button she wants to view the updated statement displaying the number of incomplete Sales orders which happens when the routine 'start_of_selection' is excuted again. But then If I do not use the LEAVE SCREEN command it takes her back to the old displaing the previous incomplete number of sales orders and then back to the selection screen. We do not want that old statement to be displayed on the way back to the selection screen.
    Please let me know if you still need further clarifications.
    Thanks,
    ALAM.

  • How to use AT LINE-SELECTION and AT USER-COMMAND in one report????

    Dear all,
    I have a problem in reports I want to use AT USER-COMMAND.and AT LINE-SELECTION.both in the one report.
    But as soon as I use SET PF-STATUS my AT LINE-SELECTION event stop workingand only AT USER-COMMAND is working.
    How can I use both of them in one report for your reference I am giving my test program below.
    REPORT ZTEST111 .
    SET PF-STATUS '100'.
    DO 10 TIMES.
    WRITE:/ SY-INDEX.
    HIDE SY-INDEX.
    ENDDO.
    START-OF-SELECTION.
    AT LINE-SELECTION.
    MESSAGE I002(SY) WITH SY-INDEX.
    AT USER-COMMAND.
    MESSAGE I002(SY) WITH 'USER COMMAND'.
    END-OF-SELECTION.
    Thanks in advance
    Sachin Gautam

    hi
    Syntax
    AT USER-COMMAND.
    Effect
    This statement defines an event block whose event is triggered by the ABAP runtime environment if, during the display of a screen list, a function with a self-defined function code was chosen.
    Note
    Self-defined function codes are all those that include character combinations, except for the following:
    The function codes PICK and PF## ("##" stands for 01 to 24) do not cause the event AT USER-COMMAND, but the events AT LINE-SELECTION and AT PF##.
    All function codes that start with the character "%" are interpreted as system functions and do not cause the event AT USER-COMMAND. The system functions for lists are listed in the following table 1.
    The function codes in the following table 2, likewise, do not cause the event AT USER-COMMAND, but are handled by the list processor.
    Table 1
    Function code Function
    %CTX Call a context menu
    %EX Exit
    %PC Save to file
    %PRI Print
    %SC Search for ...
    %SC+ Find next
    %SL Search in office
    %ST Save to report tree
    Table 2
    Function code Function
    BACK Back
    P- Scroll to previous page
    P-- Scroll to first page
    P+ Scroll to next page
    P++ Scroll to last page
    PFILE name Store list lines in a text file named abap.lst in standard character representation in the standard directory of the application server. If a name is entered using name, this is converted to lowercase letters and used as the file name.
    PL- Scroll to first line of the page
    PL-n Scroll n lines back
    PL+ Scroll to last line of the page
    PL+n Scroll n lines up
    PNOP No effect
    PP- Scroll back one page
    PP-n Scroll n pages back
    PP+ Scroll one page forward
    PP+n Scroll n pages forwad
    PPn Scroll to beginning of page n
    PRI, PRINT Print
    PS-- Scroll to first column
    PS++ Scroll to last column
    PS- Scroll one column to the left
    PS-n Scroll n columns to the left
    PS+ Scroll one column to the right
    PS+n Scroll n columns to the right
    PSn Scroll to column n
    PZn Scroll to line n
    RW Cancel

  • Navigating using simple key strokes

    Hey
    I am creating a multimedia piece that will be presented
    during an award ceremony. I need the speaker to be able to move
    back and forward using key strokes. I have been looking through the
    forums for a solution but everything appears so complex.
    Is there a way to do this so that I an novice can make it
    work???

    Create a marker for each section. In the frame before each
    marker, place the following behavior in the Script channel of the
    Score window:
    on exitFrame()
    go loop
    end
    This will keep the playback head looping between the previous
    marker and the frame with your "go loop" script.
    In a Movie Script, paste the following handler:
    on keyUp(me)
    case the keyCode of
    123:
    go #previous
    124:
    go #next
    end case
    end
    Run your movie and click on the Stage to give it keyboard
    focus. Now press the left and right arrow keys. The playback head
    should jump from marker to marker.

  • Refresh Report and At Line-Selection and At User-Command

    Hi All
    I have 2 querries
    1) I want to use At Line-selection and At user-command in the same report. But At line-selection is not getting triggered why? When I remove Set pf-status 'xxx' and at user command , then at line selection works . I want to user both at a time.
    2) I am giving user ability to edit the report shown and when he comes back by exiting the editing I want to refresh the report which is shown already to him to give effect of his editing.
    Thanks in anticipation
    pM.

    i just tried, and no problem at all.
    In the <b>Recommended Function Key Settings</b>  for  F2 key add command "PICK"
    Regards
    Raja
    since you are new to the forum, have a look at this weblog.
    /people/mark.finnern/blog/2004/08/10/spread-the-love

  • At user-command & At Line-selection

    Hi,
    I am using ECC5 ver. of ABAP.
    Can I use AT USER-COMMAND and AT LINE-SELECTION
    in the same report?
    I have used it but only At user command works, not At line selection.
    When I remove Set pf-Status, At line selection works.
    Here is my code.
    REPORT PF&ATLINE.
    AT LINE-SELECTION.
      MESSAGE 'Line Selected' TYPE 'I'.
    AT USER-COMMAND.
      IF sy-ucomm = 'PUSH'.
        MESSAGE 'Button Pushed' type 'I'.
      elseif sy-ucomm = 'EXIT'.
        LEAVE PROGRAM.
      ENDIF.
    START-OF-SELECTION.
      SET PF-STATUS 'ZRND3'.
      DO 10 TIMES.
        WRITE:/01 SY-INDEX HOTSPOT.
      ENDDO.
    END-OF-SELECTION.

    Hi Rajiv,
    Setting the PICK function code to F2 will definitely solve it..
    and it triggers the at user-command and at line-selection event as per user interaction...
    If it is not working properly... then there might me something wrong in your code...
    can you place the code... so that we can know the exact problem
    regards
    padma

  • Set PF Status and At-Line Selection & At User-Command

    Hi All
    I've used set PF status, at user command and at-line selection in my program. initially when i click on the material number it was not drilling further that is it was not taking to secondary list. i commented the PF status and tried. then it was working fine. Later, after checking on couple of doc i added F.code PICK in my PF status and uncommented the set-PF status in my program it was working fine. Now my question is why this kind of behaviour. When i uncomment the PF status  and run the program without the f.code PICK in my PF status(se41)  it was not working but after inlcuding the F.code in my PF it is working. Any good explanation?
    thks   
    Prabhu

    hi,
    generally fuction code is useful for the system to find on which button or in which area the user has clicked in. based on the function code the system executes the satatements that are in user command.  in your case i think u didnt gave any functionality in user-command. when at-user command is a event in interactive reporting which is triggered based on the button u had clicked.
    at line-selection event uses two system variables
       1. sy-lsind [ current list index number ]
       2. sy-lisel  [ contains the current area in which user ckicked ].
       3. sy-ucomm [ function code of clicked button ].
    using these 3 vars we can drill down to 21 lists [ including 1st list ]
    if helpful reward some points.
    with regards,
    suresh.

  • In interactive how to use AT LINE-SELECTION WITH SET PF-STATUS

    Hi all,
             I am developing an interactive report in which i am using gui status (pf-status ) for AT USER-COMMAND and AT LINE-SELECTION  event .But when i used at line-selection event is  not working with pf-status even though i use PICK function code .
    plz help me to work with both the event i.e.
    AT USER-COMMAND.
    AT LINE-SELECTION.
    Thanks a lot in Advance .
    Regards,
    Tarak

    hi,
      In PBO of Module Pool, Please Write in this way
    MODULE status_9001 OUTPUT.
    Set the PF-STATUS
      SET PF-STATUS '9001'.
    To Set the Title of Screen
      SET TITLEBAR 'TITLE'.
    ENDMODULE
    Setting PF status to the (SAP) system default
    set pf-status 'BASIC'.
    How to check for pf-status
    AT USER-COMMAND.
    CASE SY-UCOMM.
    WHEN 'ART'.
    PERFORM STYR_ARTSKONTI.
    WHEN 'PST'.
    PERFORM STYR_POSTER.
    WHEN 'BIL'.
    PERFORM VIS_BILAG.
    ENDCASE..

  • Oracle Apps 11i key strokes

    Hi,
    can someone tell me how to use key strokes to close the current open window in oracle apps?
    assume I have a parent window and a child window opened , currently i am on the child window and i would like to close it and return back to the parent window.
    Thanks

    it's ctrl + F4:
    http://oracle.ittoolbox.com/groups/technical-functional/oracle-apps-l/oracle-apps-11i-key-strokes-3468093
    Thanks

  • Hlep in deleting Componantes using Key event listeners.

    Hi All,
    I am tring to write a GUI program. I am dragging componets from the left side of the panel to the right side of the panel. Everything works well as of now. But i am tring to delete the componets which i placed on the right side of the paenl using key stroke events. Can anyone tell how this can be done. I have like labels and textfield componeets.
    Please help
    Smitha

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.Border;
    public class KeyDeletion extends JPanel {
        JComponent selectedComponent;
        public KeyDeletion(JFrame f) {
            setLayout(null);
            Dimension d = new Dimension(65,25);
            for(int j = 0; j < 4; j++) {
                JLabel label = new JLabel("label " + (j+1),
                                           JLabel.CENTER);
                label.setBorder(BorderFactory.createEtchedBorder());
                int x = 20 + j*(d.width + 25);
                int y = 20 + j*(d.height + 75);
                label.setBounds(x, y, d.width, d.height);
                add(label);
            addMouseListener(ma);
            registerKey(f);
        /** Press the "x" key to delete selected label. */
        private void registerKey(JFrame f) {
            JRootPane jrp = f.getRootPane();
            int c = JComponent.WHEN_IN_FOCUSED_WINDOW;
            jrp.getInputMap(c).put(KeyStroke.getKeyStroke("X"), "DELETE");
            jrp.getActionMap().put("DELETE", deleteAction);
        public static void main(String[] args) {
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            KeyDeletion panel = new KeyDeletion(f);
            f.add(panel);
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
        private MouseAdapter ma = new MouseAdapter() {
            Border etched = BorderFactory.createEtchedBorder();
            Border select = BorderFactory.createLineBorder(Color.red);
            JComponent lastSelection;
            public void mousePressed(MouseEvent e) {
                Point p = e.getPoint();
                Component[] c = getComponents();
                boolean haveSelection = false;
                for(int j = 0; j < c.length; j++) {
                    Rectangle r = c[j].getBounds();
                    if(r.contains(p)) {
                        setSelection(c[j]);
                        haveSelection = true;
                        break;
                if(!haveSelection && selectedComponent != null) {
                    setSelection(null);
            private void setSelection(Component c) {
                selectedComponent = (JComponent)c;
                if(c != null)
                    selectedComponent.setBorder(select);
                if(lastSelection != null)
                    lastSelection.setBorder(etched);
                lastSelection = selectedComponent;
        private Action deleteAction = new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                if(selectedComponent != null) {
                    remove(selectedComponent);
                    selectedComponent = null;
                    repaint();
    }

  • ITS URGENT QUES ON AT LINE-SELECTION AND AT USER-COMMAND

    ITS URGENT...WHEN I SELECT MULTIPUL VALUES IN BASIC LIST ,I HAVE TO GET THOSE SELECTED MULTIPUL VALUES IN SECONDARY LIST THAT CAN BE AFTER(AT LINE-SELECTION OR AT USER-COMMAND)............?

    hey
    this code modify's simlarly u can read n  display secondary window
        DO .
    Reading the internal table whose data is displayed into wrk area.....
          READ LINE SY-INDEX FIELD VALUE INT_DISPLAY-SHIPMENT_ID INTO WF_SHIPMENT_ID.
    Reading the check box value
          READ LINE SY-INDEX FIELD VALUE WG_CHK.
    If all the records are read and there is no code left to read
          IF SY-SUBRC <> 0 .
            EXIT.
          ENDIF.
    To highlight the line which is selected by the user
          IF WG_CHK = WL_X.
            MODIFY CURRENT LINE
            LINE FORMAT COLOR COL_NEGATIVE INVERSE
            FIELD VALUE WG_CHK FROM WL_SPACE.
            MODIFY CURRENT LINE
            LINE FORMAT INPUT OFF.
    Also append the record read into new internal table which u will display in secondary window.......
          ENDIF.
        ENDDO.
    AT USER-COMMAND. or AT LINE SELECTION . u can write this code.........
    DISPLAYING A POP-UP WINDOW .
          WINDOW STARTING AT 10 50
                 ENDING AT 120 70.
    and then write the table into which u have stored the read entry which user had selected
    reward points if useful

  • Command-Shift-K stopped selecting highlighted emails

    This was a very handy shortcut. Every now and again I have to sort through hundreds of emails. Mail highlights related emails. I used to be able to use the keyboard shortcut Command-Shift-K to select the ones highlighted. It does not do this anymore. Its been a while since I used this shortcut so I do not know when it stopped working. Does anyone know how to debug this and get it working again?

    Okay, just one other thing that happened in the past couple of days (also have a tab-closing issue with Safari). I presented an iPhoto slideshow on my laptop to a group on Monday night. It took some closing/restarting for the projector to recognize the signal from my laptop. When I got back home, I had to reset the screen aspect on my MacBook because it was still all ugly stretched VGA.
    I don't see how this is related, but just wanted to throw it into the mix, since it happened shortly before this current behavior.

  • What is use of INCLUDE in command line statement?

    Pls. explain following line. How this works and what is expected output for this line.
    /: INCLUDE &VBDKA-ZTERM& OBJECT TEXT ID SDTP PARAGRAPH L
    Thanks
    Harshada

    hi Harshada,
    INCLUDE: Include other texts
    With the command INCLUDE, you can include the contents of another text into your text. The text to be included exists separately from yours and is only copied at the time of the output formatting.With the INCLUDE command, you always get the most current version of the required text, since this is only read and inserted during the output formatting.
    Syntax:
    /: INCLUDE name [OBJECT o] [ID i] [LANGUAGE l] [PARAGRAPH p] [NEW-PARAGRAPH np]
    The name of the text to be inserted must be specified and can have up to a maximum of 70 characters. If the text name contains blanks, then you must put it in quotes as a literal. It can also be specified via a symbol. All further parameters of the INCLUDE command are optional. If they are missing, SAPscript uses default values for them which are based on the respective call environment.
    Examples:
    /: INCLUDE MYTEXT
    The text MYTEXT is included in the language of the calling text.
    /: INCLUDE MYTEXT LANGUAGE ‘E’ PARAGRAPH ‘A1’
    The text with the name MYTEXT and the language E is included, regardless of in which language the calling text is created. The paragraph format A1 is valid as the standard paragraph for this call.
    Optional specifications:
    •&#61472;LANGUAGE If a language is not specified, the language of the calling text or the layout set is set for the text to be included. If a language is specified, the text is always loaded in this language, regardless of the language of the calling text.
    •&#61472;PARAGRAPH The text to be included is formatted with the style allocated to it. With this parameter, the standard paragraph of this style can be redefined for the current call. All * paragraphs of the inserted text are then formatted with the paragraph specified here.
    •&#61472;NEW-PARAGRAPH The first line of the included text has this format flag, provided it is not a command or comment line. If the optional entry PARAGRAPH (see above) is empty, all * paragraphs of the included text are formatted with the paragraph np specified with
    NEW-PARAGRAPH.
    •&#61472;OBJECT To specify a text completely, you must make further specifications regarding the text object. There are different rules and restrictions for this which depend on the object type of the calling text: All texts can be included in a layout set. If no object is entered here, TEXT is used (standard texts).With a documentation text (object DOKU), you can only include documentation texts. This object is assumed even if no object is specified in this environment. Only hypertext or documentation text can be included into a hypertext (object DSYS). If the OBJECT specification is missing, DSYS is set as a default value.
    Only standard text (object TEXT), documentation text or hypertext can be included in any other type of text. The default object is TEXT if nothing is entered.
    •&#61472;ID The text ID, which allows further text types within an object, is a further part of the text key. If the ID is not entered, the default Include ID from table TTXID is used for the calling text. If the specification is not in this table, the text ID of the calling text is used.
    The ID together with the object are now the basis of a further consistency check:
    •&#61472;All text IDs are allowed for a layout set.
    •&#61472;Only documentation texts with the text IDs TX (general texts), UO (authorization objects), and documentation texts which have the same text ID as the calling documentation text may be included in documentation texts.
    •&#61472;All DSYS texts may be included in DSYS texts, regardless of their ID. Documentation texts to be inserted may only have IDs TX and UO.
    •&#61472;Standard texts with all the allowed text IDs, DSYS texts with all IDs, and documentation texts with Ids TX and UO may be included in the other types of texts.
    Regards,
    Santosh
    Message was edited by:
            Santosh Kumar Patha

  • F4 key in the command line

    F4 key in the command line would display the history of commands used.Would it display the commands used by all the other sessions on the instance or mine alone??If so how does it update those values and where does it get stored on my machine??
    Thanks

    F4 key does not mean showing history. The function of F4 key is showing possible input values. It shows what possible entries can be given in some of the options. Not in all cases it shows the possible entries. It shoes possible entries on certain cases. For example if u want to start a background job and u had several application servers u can choose the application server on which u want. If u hit F4 key in the tab it shows all the servers available and u can choose one from tht. Thts how it works. This is equal to possible entries option when u right click in an entry box
    http://help.sap.com/saphelp_nw70/helpdata/en/9f/dba99935c111d1829f0000e829fbfe/content.htm
    For further info u can read this.
    Reward points if useful

Maybe you are looking for