Alv grid: how to set cursor to the next field

Hi Abapers,
When I input the data in first cell and do a tab for coming to next cell to give the input it is coming back to my first cell in the ALV grid.
Any idea's on how do I deal with this.
Many Thanks,
Jagan.

Hi Group,
Finally I got the solution for this, here is the stuff we need to do:
***********04/03/2010
*----Get the current cell
            CALL METHOD wa_grid->get_current_cell
              IMPORTING
                es_col_id = li_col
                es_row_no = li_rows.
**--Get Scroll Position
            CALL METHOD wa_grid->get_scroll_info_via_id
              IMPORTING
                es_col_info = ls_col
                es_row_no   = ls_num.
***********04/03/2010
            CALL METHOD wa_grid->refresh_table_display.
           CLEAR: wa_profile1.     ", wa_pro_new.
********04/03/2010
*--Set Scroll Position
            CALL METHOD wa_grid->set_scroll_info_via_id
              EXPORTING
                is_col_info = ls_col
                is_row_no   = ls_num.
*----Set the cell information
            ls_row-index = li_rows-row_id.
            CALL METHOD wa_grid->set_current_cell_via_id
              EXPORTING
                is_row_id    = ls_row
                is_column_id = li_col
                is_row_no    = li_rows.
********04/03/2010
Hope this info might be useful to anyone facing the similar issue.
Cheers,
Jagan.

Similar Messages

  • Set Cursor to the next field after scanning first field in RF programming

    Hi,
    I have requirement where i need to set the cursor to the second field i.e. Purchase order after scanning the first field i.e. Material
    in RF programming with out user interaction.
    I kept the material visible length to 6 chars instead of 18 on the screen as user is having material length is occupying 6 chars.
    Thanks in advance.
    Regards,
    Suvarchala

    Hi Group,
    Finally I got the solution for this, here is the stuff we need to do:
    ***********04/03/2010
    *----Get the current cell
                CALL METHOD wa_grid->get_current_cell
                  IMPORTING
                    es_col_id = li_col
                    es_row_no = li_rows.
    **--Get Scroll Position
                CALL METHOD wa_grid->get_scroll_info_via_id
                  IMPORTING
                    es_col_info = ls_col
                    es_row_no   = ls_num.
    ***********04/03/2010
                CALL METHOD wa_grid->refresh_table_display.
               CLEAR: wa_profile1.     ", wa_pro_new.
    ********04/03/2010
    *--Set Scroll Position
                CALL METHOD wa_grid->set_scroll_info_via_id
                  EXPORTING
                    is_col_info = ls_col
                    is_row_no   = ls_num.
    *----Set the cell information
                ls_row-index = li_rows-row_id.
                CALL METHOD wa_grid->set_current_cell_via_id
                  EXPORTING
                    is_row_id    = ls_row
                    is_column_id = li_col
                    is_row_no    = li_rows.
    ********04/03/2010
    Hope this info might be useful to anyone facing the similar issue.
    Cheers,
    Jagan.

  • How to set cursor in the beginning of a test in a JTextField in Java Swings

    hi
    I am new to Swing.I have to display a large text in a text field.Whenever I am displaying it is showing the tale of the text.To see the beginning of the text I have to move the cursor using keys.How can I set the cursor in the beginning of the text or how can I display the text with its beginning characters.

    You're practically there...
    You usually put all the jars in the same directory and then specify the class-path attribute in your manifest:
    Class-Path: other.jarYou can of course specify a relative path to another jar:
    Class-Path: lib/other.jarBut that's up to you how you want to package these things.
    I don't think that jars in jars are permitted.
    Hope this helps.

  • How to set cursor at the first line in a table control?

    Hi,
           I have a customized infotype screen where a table control is being used to input new values.The tab control has 30 lines.Now, the problem is that when the screen is displayed, the cursor always starts at 8th or 4th line.The behaviour is not very consistent.I tried the following statement in the PBO, but no effect.
    SET CURSOR FIELD P9417-ZCOUNTRY LINE 1.  ( P9417-ZCOUNTRY is the name of the tab control field where i want to set the cursor ).This is the last statement in the PBO.
    Can someone please tell me why still I am not able to set the cursor at the first line? I have infact noticed that , in the debugging mode , sometimes the cursor starts at the first line.Please help. Thanks

    I have got a new requirement on this now. If the table control does not have any records , then the cursor position should be on the first row.Otherwise, if it already has some records, then the cursor should be at the first empty row.I wrote the code like below.
    if sy-ucomm = 'INSERT'.
    set cursor 'P9714-ZCOUNTRY'  line 1.
    else if sy-ucomm eq 'CHANGE'.
    describe table itab lines fill.
    fill = fill + 1.
    set cursor 'P9714-ZCOUNTRY'  line fill.
    endif.
    I am facing a strange problem now.The table control has some 10 rows when you see the screen for the first time.If the number of records already present is less than 10, I am able to position the cursor on the first empty row.But if the number is say 15, then the cursor position goes to eighth or fourth line or sometimes the first line.
    Is there any way to display the last few records , ie, if there are 15 records , is there any way to display the last five rows when I see the screen for the first time, rather than showing the first 10 records?How can I position the cursor at the first empty row, when there are more records?
    Thanks in advance..good answers will be rewarded.
    Mahesh

  • How to set cursor at the end of text item?

    If I use Go_Item, it will go to the item but select the whole content of the item(displayed in blue color). How can I set the cursor at the end of the text item and not to make the content selected?

    You may be seeing <Bug:1186653> which is fixed in 6.0.5.36 however if running on windows awprkaoutnd may be to use d2kwutil.
    Place the following code within a when-new-item-instance trigger on the
    item(s) you wish to disable highlighting:
    DECLARE
    v_handle pls_integer;
    BEGIN
    win_api_shell.sendkeys(V_HANDLE,'{home}',FALSE);
    END;
    The above code will result in no highlighting occurring and the cursor will be
    placed on the first character of the item. If you wish the cursor to appear at
    the end of the item, replace the word home to end. For more information,
    please refer to the d2kwutil documentation.
    Note that this solution will only work on windows in a client server environment.
    For a web solution you will have to create a java bean that will perform the
    necessary functionality.
    Regards
    Grant Ronald

  • How to send the ALV GRID output to spool by using the print button in std t

    How to send the ALV GRID output to spool by using the print button in standard tool bar.
    We have created a button in the va02 transaction.  If user click on the button the new screen will be display on that screen we are populating the alv grid output using the oops concept.  But i am unable to send the output to spool using the print button in the standard tool bar.
    I am able to display the Print parameter dialog box but i am not able to send it to spool.
    Kindly help.
    Thanks In Advance.
    G.V.Ramana

    Hi Shaik,
    There is not properties button in my print screen.
    MODULE user_command_0900 INPUT.
        WHEN 'EXCEL'.
          PERFORM excel_download.                              
        WHEN 'PRI'.
          PERFORM print_output.
    form Print_output.
    CALL FUNCTION 'RSPO_LIST_LAYOUT_FITS'
               EXPORTING
                    columns        = 80
                    device         = 'ANY '
                    lines          = 65
                    maxpenality    = 1999
               TABLES
                    layouts        = lt_layouts1
               EXCEPTIONS
                    unknown_device = 1
                    OTHERS         = 2.
          IF sy-subrc = 0.
            LOOP AT lt_layouts1.
              IF lt_layouts1-penality < 1000        AND
                 lt_layouts1-penality < l_min_penality.
                l_layout       = lt_layouts1-layout.
                l_min_penality = lt_layouts1-penality.
              ENDIF.
            ENDLOOP.
            IF NOT l_layout IS INITIAL.
              CALL FUNCTION 'GET_PRINT_PARAMETERS'
                   EXPORTING
                        mode                   = 'CURRENT'
                        line_size              = 80             "#EC *
                new_list_id            = l_new_list_id
                        no_dialog              = l_no_dialog
                        layout                 = l_layout
                   IMPORTING
                        out_archive_parameters = rs_arc_params
                        out_parameters         = rs_pri_params
                        valid                  = l_valid
                   EXCEPTIONS
                        archive_info_not_found = 1
                        invalid_print_params   = 2
                        invalid_archive_params = 3
                        OTHERS                 = 4.
              IF sy-subrc NE 0.                                 " INS SLIN
              ENDIF.                                            " INS SLIN
              IF rs_pri_params-linsz LT 80 OR
                 rs_pri_params-linsz LT gt_stack-s_lprint-width.
                gt_stack-print_line_break = 'X'.
              ELSE.
                CLEAR gt_stack-print_line_break.
              ENDIF.
              IF l_valid NE 'X'.
                rs_pri_params = ls_pri_params_sav.
                rs_arc_params = ls_arc_params_sav.
              ENDIF.
            ENDIF.
          ENDIF.
    endform.                    " Print_output
        CALL METHOD gv_cost_tot_alv_grand->set_table_for_first_display
                EXPORTING
                   is_layout         = gs_layout_cost_tot_grand
                CHANGING
                   it_fieldcatalog   = gt_fcat_cost_tot_grand[]
                   it_outtab         = gt_cost_tot_grand[].
    Please check my code

  • How to SET CURSOR FIELD my_field in my_REPORT_PROG.?

    Hi Experts,
    If the user do not enter a value in one field( NOT mandatory field) on the selection screen of my_report_prog. I wanna,
    1- To throw message - am getting by throwing as STATUS message
    2 - wanna keep CURSOR on that particlar field in order to input the value by the user - am using SET CURSOR FILED my_filed----
    > but NOT working????????
    So, pls. let me know that How to get it done?
    thanq

    hi,
    try the following code.you will get the cursor in the same field if you use status message or information message.
    selection-screen:begin of block b with frame title text-001.
    parameters:a type i.
    selection-screen:end of block b.
    at selection-screen.
    if a <> 3.
    message s000(0) with 'hi this is chaitu'.
    endif.
    after showing the message the cursor is at a.
    please rewards points if useful.

  • How to programmatically move the cursor to the "To" field of a new AppointmentItem?

    I need to move the cursor to the "To" field of all new AppointmentItems which are created through my Outlook Addin. How I can achieve this?
    Thanks in advance.
    Thanks Prasad

    Hello Prasad,
    The Outlook object model doesn't provide anything for that. You need to use Windows API functions or use
    Accessibility API to set the cursor programmatically.

  • How to set cursor in perticular field Table Maintence generator?

    Hi
    All
    I have created a table with 2 fields  Start_date and End_date. Now my requirement is i have to validate the both date field as Start_Date must be LESS than or EQUAL to End_Date. In table maintenance maintenance generator i have created a event VALIDATE_DATE in event 21. Its validating perfectly. The issue is after the ERROR message the Cursor is going to the key field. I want to set the cursor at End_Date field.
    I used
    data:ly_pos type i.
    IF NOT start_date LE end_date.
        SET CURSOR FIELD 'TABLE_NAME-END_DATE' LINE sy-linno OFFSET lv_pos.
        MESSAGE exxx(MsgClass).
    ENDIF.
    Its working for the FIRST time i am entering the new data. Next time the cursor going to the KEY field.  I have been asked not to write code in SE80. Anyhow i have to set the cursor in table maintenance maintenance generator event.
    Can anybody help?

    Hi Sourav,
    Please follow the below method:
    Go to Maintainance Screen (where you want the cursor setting). Goto Status - > Remember the screen name -> Double click on Program name.. Open Object list and expant Screen Tree -> double click on the same screen Number -> Go to its first tab attributs -> Change Mode -> Do F4 on Cursor Position field -> Choose the field where you want the cursor.
    But this way will always set the cursor at the HardCoded Field Name.
    Thanks,
    Preyansh

  • How to set and retrive the index log path stored by parameter LOG_DIRECTORY

    how to set and retrive the index log path stored by parameter LOG_DIRECTORY.

    http://download-west.oracle.com/docs/cd/B19306_01/network.102/b14213/lsnrctl.htm#sthref72
    http://download-west.oracle.com/docs/cd/B19306_01/network.102/b14213/cmctl.htm#sthref239

  • How to set values to the structure containing a node with cardinality 0..n

    Hello.
    I 'm trying to set values for the node with cardinality 0..n. The node type is "Fields".
    <xsd:complexType name="Field">
       <xsd:sequence>
          <xsd:element name="fieldCode" type="xsd:string"></xsd:element>
          <xsd:element name="displayValue" type="xsd:string" minOccurs="0"></xsd:element>
       </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="Fields">
       <xsd:sequence>
          <xsd:element name="field" type="tns:Field" minOccurs="0" maxOccurs="unbounded"></xsd:element>
       </xsd:sequence>
    </xsd:complexType>
    I  need to set several values for the element "fieldCode" but it has cardinality 0..1 and BPM does not allow it but I did not find any option about how to set values for the structure of type "Fields". Could you help me?
    Best regards,
    Timur Semenchuk

    Hi Marcus,
    If there is no way you could change the cardinality of the node, and thus it can contain 0..n items, I think you should create-and-add a new element programmatically.
    Since the collection can contain zero elements, I would add a 'new' button, which upon clicking adds one new element via:
    IYourNodeElement yourNodeElem = wdContext.nodeYourNode().createYourNodeElement();
    wdContext.nodeYourNode().addElement(yourNodeElem);
    Hope this explains a bit!
    Best,
    Robin van het Hof

  • Does anyone know how to set alerts in the iCloud calendar of Outlook 2010 for PC?

    Does anyone know how to set alerts in the iCloud calendar on Microsoft Outlook 2010 for a PC?  Outlook gives me a warning message and does not allow me to save alerts for calendar events created in iCloud calendar.  It will allow me to save events in the non-iCloud calendars.

    Ignore what office says, when the warning comes up saying that the reminder will not work click on yes,
    I just tested it and i had the reminder on my ihpone in outlook and also as i had the calendar open in safari it popped up on there too ( I wasn't aware it did that)

  • ALV GRID  - how to handle scrollbar click

    Hello,
    Is it possible to handle scrollbar movment/click
    in alv grid control?
    Thanks in advance for your help.
    Harry

    Hello vijay,
    I'am implementing a calendar with the alv grid control.
    Since I do not want to process all the data at one time
    I need to know when the scrollbar reach the upper or lower extremity so that I can populate + other processes the alv grid.
    Something very similar to the actual behaviour of "F4_DATE" function module displaying the Calendar control.
    Hope you can help me
    Thanks

  • How to submit a page and set the focus on the next field?

    Hello,
    I have a form with some fields and below this a report with a column link. If I change values in the form fields and I click the on a column link the changes in the fields are lost because the page is not submitted.
    I try this: I set on the fields in HTML Form Element Attributes the following:
    onchange="doSubmit('AENDERUNG_UEBERNEHMEN');"
    And I create a branch to the same page. This works great, I dont lost the changes in the fields and I can use the column links.
    But: If I want to walk through the form with the key "TAB" I have to press the key 2 times to come to the next field.
    How can I submit the page and go to the next field?
    Regars,
    Mark

    Hello Mark,
    how about submitting the page when the column link in the report is clicked. To do this, create a column link with an URL target and specify a target like
    javascript:doSubmit('#ID#_AENDERUNG_UEBERNEHMEN').After that I would create a process, that checks if
    substr(:REQUEST,instr(:REQUEST,'_')+1) (or something like that)
    equals 'AENDERUNG_UEBERNEHMEN'. If so, save the change, set the PK value of your target page to
    substr(:REQUEST,1,instr(:REQUEST,'_'))  (to extract the ID)
    Afterwards, create a branch that jumps to the target page.
    Hope that helps
    Stephan

  • How to set focus on the last row of JTextPane

    how to set focus on the last row of JTextPane?
    import javax.swing.*;
    import javax.swing.text.html.*;
    import java.awt.*;
    import java.awt.event.*;
    public class MyGUITest extends JPanel implements ActionListener
    {   public static void main(String[] args)
        {   SwingUtilities.invokeLater(new Runnable()
             {   public void run()
              {    JFrame f = new JFrame("My GUI");
                  MyGUITest GUI = new MyGUITest();
                  GUI.setOpaque(true);
                  f.setContentPane(GUI);
                  f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                  f.pack();
                  f.setLocationRelativeTo(null);
                  f.setVisible(true);
        JTextPane txtP;
        JButton add;
        HTMLEditorKit hek;
        HTMLDocument hd;
        String txt;
        MyGUITest()
        {     this.setLayout(new BorderLayout());
         this.setPreferredSize(new Dimension(400,200));
         txtP = new JTextPane();
         txtP.setEditable(false);
         txtP.setContentType("text/html");
         txtP.setText("");
         hek = new HTMLEditorKit();
         txtP.setEditorKit(hek);
         hd = new HTMLDocument();
         txtP.setDocument(hd);
         JScrollPane sTxtA = new JScrollPane(txtP);
         add = new JButton("add");
         add.addActionListener(this);
         sTxtA.setBorder(BorderFactory.createTitledBorder(""));
         this.add(sTxtA, BorderLayout.CENTER);
         add(add, BorderLayout.SOUTH);
         new Thread(new Runnable()
         {   public void run()
             {   while(true)
              {   try
                  {     Thread.sleep(100);
                  }catch(InterruptedException ex)
                  {     ex.printStackTrace();
                  appendText("This is <b>HTML</b> text");
                  //add.doClick();
         }).start();
        public void actionPerformed(ActionEvent e)
        {     txt = "<b>asd</b>";
         try
         {   hek.insertHTML(hd, hd.getLength(), txt, 0, 0, null);
         }catch(Exception ex){   ex.printStackTrace();   }
        public void appendText(String txt)
        {     try
         {   hek.insertHTML(hd, hd.getLength(), txt, 0, 0, null);
         }catch(Exception ex){   ex.printStackTrace();   }
    }thanks~

    anIdiot wrote:
    im not sure what is the caret location...So don't youthink you should have looked for it in the API?
    anyway, i want the scroll bar to scrolled down automatically when the output is displayed.
    normally, the scroll bar is scrolled down automatically when a new text is inserted, but it doesnt work on this timeGo through camockr's http://tips4java.wordpress.com/2008/10/22/text-area-scrolling/
    db

Maybe you are looking for

  • How to remove apple id from iphone 3G

    Hi,  My husband and I have shared an apple id for sometime.  It has just caused complications because he is in Europe and Facetime and Imessage are not working properly on our phones because we have the same id.  AT&T advised me to sign up for a new

  • Problem using payloadZipBean to unzip a file

    I would like to run OS command to zip large amount of xml into one zip file before XI pick it up, then use unzip option in payloadZipBean to unzip all the xml files so XI can process them one by one from memory, this will reduce lots file I/O time. B

  • Newby question on syncing/updating

    If I change some of the column data for a song (or songs) in my iTunes library on my iBook will it (or they) be recognized as same or different from the copies already on the iPod? Better: What is the best way to sync columnar data between my iBook a

  • How to use setLookAndFeel method?

    May i know how to implement the UIManager.setLookAndFeel()? and can we write out our own look and feel themes? if possible, plz attach the codes for me, thx a lot

  • Robohelp vs Webworks

    Hi All, I am the lone writer at a startup and I need to pick the online help tool. I showed my manager Webworks (she has no documentation background) and she thought it was very cool. Since then I have gone to the STC conference and learned that Webo