Read current line

Hi Friends ,
In my table control if i click any line then i have to go to next screen based on the line i have clicked.
so, I need to capture the key fields to read the internal table for the get the value in next screen .
i am tring to do with
READ CURRENT LINE.
Addition:
... FIELD VALUE f1 INTO g1
                 fn INTO gn                        ...
which is not helping me ....
Can any one guide me  how to read those values apart from get cursor values keyword
Thanks
Poornima

Hi,
first you have to find the current position of the cursor:
GET CURSOR { { FIELD  field [field_properties] }
           | { LINE line } }.
then you read your internal table with that information
READ TABLE int_table index line.
Read [the rules|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement] if found helpful!!!
Edited by: Julius Bussche on Aug 11, 2008 10:36 AM

Similar Messages

  • How to read current line number in function module sourrce code?

    Hi All,
    How to read current line number in function module sourrce code?
    regards,
    Anuj

    If you have new editor you would be able to see the line number. 
    Or in the Dump screen - there is a button called Debugger - click that you would be able to see the code where dump has occured..  you would be able to find the line number from there.
    To get the new editor with line number , you need to change the settingsin SE38.
    Regards
    Vivek

  • Read Current line PRoblem

    Dear All ,
    I am using Read Current line sattement as follows .
    read current line field value
                      t_type4-bukrs into t_temp-bukrs
                      t_type4-belnr into t_temp-belnr
                      t_type4-NETCODE into t_temp-NETCODE
                      t_type4-UMSKZ into t_temp-umskz
                      t_type4-waers into t_temp-WAERS .
       t_type4-WRBTR into t_temp-WRBTR
      t_type4-UKURS into t_temp-UKURS .
    I have commented the marked line it works fine . But I want to read WRBTR and UKURS also but it gives short DUmp.
    These fields are frim BSID table . PLease Help me .

    The problem surely lies in terms of variable definition... Change the defn of t_temp-wrbtr and ukurs to character...think it should work fine after that.
    Regards
    Anurag

  • Read current line of structure

    Hi,
    I have need to read a structure (non internal tables) at the current line.
    With internal tables I use :
    DATA: riga_corrente  LIKE sy-stepl.
      GET CURSOR LINE riga_corrente.
      READ TABLE itab  INDEX riga_corrente.
    but with the structure don't work.
    Is it possible?
    Thanks!

    Hi Prabhu Das         
    I try it but I have this error:  "." expected after "PT9653".
      DATA: riga_corrente  LIKE sy-stepl.
      DATA: wa_doc TYPE pt9653.
      GET CURSOR FIELD pt9653-ztipo_docente LINE riga_corrente.
      READ TABLE pt9653 INTO wa_doc INDEX riga_corrente.
    After GET CURSOR FIELD statement, in the field pt9653-ztipo_docente, I always have value 'PT',      
    but on  the screen I  enter other values.

  • How to read a current line in table control in dialoug program ?

    How to read a current line in table control in dialoug program ?
    this code required to provide F4 help.

    Hi,
    You can use the variable <tablecontrol>-Currentline as Ebus says but there is a problem with this.Suppose there are 10 records in the table control with only 5 records visible then when u press a page down and press F4 the first record in page 2,  <tablecontrol>-Currentline will have value of 1 instead of 6.So you will need to write a small logic for that.
    index = ( <tablecontrol>-topline - <tablecontrol>-currentline ) + 1.
    read internal table itab at index.
    Hope this helps.
    Regards,
    Vivek

  • SapScript, How do I read the current line number?

    I have sections of text - each in it's own element with an 'include' of the standard text.
    These sections are variable in size.
    All elements are in the MAIN window.
    I do not want a paragraph to split over two pages.
    How do I read the current line number within the sapscript before the section prints so I can issue a new-page command at the beginning of the paragraph?
    Thanks!

    Yes, that does work for paragraphs.
    If I have multiple elements to print from within a loop where "at first, at each and at last" each call the Sapscript funtcion write_form - how can I keep the whole section together.  protect/endprotect will keep each element together but not the group of elements.
    There must be a way to find the current line number.

  • Can the current line be highlighted using a background color or have the cursor flash?

    I use the split screen and left click in the Design pane to jump to where I want to be in the Code pane in Dreamweaver CS6. The problem is that it can be very hard to tell where the cursor is in the Code pane since the cursor doesn't flash.
    Is there a way to force Dreamweaver CS6 to change the background color of the currently selected line or at least have the cursor flash in both panes? There must be some way to make it easier to find the current line of code.
    Thanks.

    John Waller wrote:
    The cursor does not flash in Code View only when Code View is not in focus i.e. you're working in the Design View window in Split View.
    In those caases, I just highlight a word or two in Design View and the corresponding words are highlighted by DW in Code View (even when Code view is not in focus).
    Thanks. I've been doing that, but sometimes there is no text to highlight. I hoped Dreamweaver might have a hidden setting that I could enable. That's a lot of extra sliding of the hand/wrist for no good reason when it would be easy for the Dreamweaver programmers to change the background color of the current line or make the cursor flash or do something else to indicate where you are in the code besides making the user constantly make a smearing action with the mouse. All of those extra movements add up the wear and tear when you're trying to avoid getting a repetitive stress injury, especially if you already use mouse gestures in a browser.

  • Statusbar displaying current line number?

    Hi,
    I am building a swing application where I have one text editor and one status bar. I want to display current line no in status bar. I tried with getCaretPosition() but it does not returns line number, is there any other way to get current line number to display it on status bar? Thanks.

    is there any other way to get current line number Did you search the forum?
    How about the keywords "current line number", taken directly from your question. So you can see its really not that hard to think of keywords to use in a search.

  • Get the index of the current line in use

    Dear All,
    Well how can i get the index of the current line in use?
    this the code I am using :
    Dim i As Integer
    Set oBatchForm = SBO_Application.Forms.GetForm(Form_Id, 1)
    Set oMainMatrix = oBatchForm.Items.Item(Matrix_Id).Specific
    For i = 1 To oMainMatrix.VisualRowCount
        If oMainMatrix.IsRowSelected(i) = True Then
           GB_SelRow = i
            Exit For
        End If
    Next
    Exit Sub
    This code is not working when there is a line in the document type texte.
    please advice.

    Hi Mary,
    this is code in C#.NET which is working fine, try to do same in your code:
    for(int irow=1; irow<=oMatrix.RowCount; irow++)
         if(oMatrix.IsRowSelected(irow))
         SelectRow = irow;
                    break;
    Hope it helps.

  • Goods despatched against to future schedule line rather than a current line

    Hi Guys,
    We have a problem with future schedule line in PSA  being ordered in the same time once previous lines is still open ( not yet issued and received).I thought it is related with Delivery creation where in VL10f you can select future line rather than any current lines.Even though when I selected any future entries, goods were despatched against to first open lines on delivery schedule therefore I has nothing in common.
    Have you seen it before and know what could cause that?
    Regards,
    JG

    .

  • Help Needed on Read/Modify Line Statement

    Hi,
    I am writing a report which is having a check box as first column, followed by sales data. I am giving F4 Key to user to Select ALL the check box. I have used Modify Line to do this, but it is not working for me.
    Here is the pseudo code which i am using.
    Report <report name>.
    data cb1 value SPACE.
    Write :/ cb1 as CHECKBOX, 'X'.
    Write :/ cb1 as CHECKBOX, 'Y'.
    Write :/ cb1 as CHECKBOX, 'Z'.
    AT PF04.
       DO 3 times.
          MODIFY LINE sy-index field value cb1 from 'X'.
       ENDDO.
    This is not working and giving weird results.
    I tried the following things too.
    Trial a:
    cb1 = 'X'.
    modify line sy-index field value cb1.
    Trial b:
    modify line sy-index of current page value cb1 from 'X'.
    Trial c:
    read line sy-index....
    modify line sy-index..
    But none of them were working.
    Please let me know if my approach to select all check box is correct. Is there any alternate way to select all the checkbox in the list?..What is wrong with my modify line statement.
    Regards
    Mitesh

    Hi Anand,
    Thanks for throwing a light on the "Read Statement". This cleared up my concept of modify line too.
    When I dont use Read Line, the output will be:
    Checked X
    Checked X
    Checked X
    Let me try to answer the question as "Why it is happening".Correct me if i am wrong as i am only 15 days Old for ABAP ;-((.
    Here is how I will now defining modify line statement. Modify Line Statement modify the current line or line number n with the value of sy-lisel. With Field Addition in Modify line, you change the content of sy-lisel.
    So in our case, the sy-lisel value is (Checked,'X').
    So if we dont use read line, only first column will get updated , whereas second field will remain in the sy-lisel.
    So to get the value of other lines, we use read line. This will fill up the sy-lisel with the the line content of sy-index and so modify will work.
    So, if we are using AT LINE-SELECTION event to select line, in that case, there is no need to do a read line as sy-lisel is already in the buffer.
    Please correct me if i am wrong.
    Regards
    Mitesh

  • How to find the current line in the table control in module pool ?

    How to find the current line in the table control in module pool ?
    This is an urgent requirement? please do help me.

    refer to this example
    REPORT demo_dynpro_tabcont_loop_at.
    CONTROLS flights TYPE TABLEVIEW USING SCREEN 100.
    DATA: cols LIKE LINE OF flights-cols,
    lines TYPE i.
    DATA: ok_code TYPE sy-ucomm,
          save_ok TYPE sy-ucomm.
    DATA: itab TYPE TABLE OF demo_conn.
          TABLES demo_conn.
    SELECT * FROM spfli INTO CORRESPONDING FIELDS OF TABLE itab.
    LOOP AT flights-cols INTO cols WHERE index GT 2.
      cols-screen-input = '0'.
      MODIFY flights-cols FROM cols INDEX sy-tabix.
    ENDLOOP.
    CALL SCREEN 100.
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
    DESCRIBE TABLE itab LINES lines.
    flights-lines = lines.
    ENDMODULE.
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE read_table_control INPUT.
      MODIFY itab FROM demo_conn INDEX<b> flights-current_line.</b>
    ENDMODULE.
    MODULE user_command_0100 INPUT.
      save_ok = ok_code.
      CLEAR ok_code.
      CASE save_ok.
        WHEN 'TOGGLE'.
          LOOP AT flights-cols INTO cols WHERE index GT 2.
            IF  cols-screen-input = '0'.
              cols-screen-input = '1'.
            ELSEIF  cols-screen-input = '1'.
              cols-screen-input = '0'.
          ENDIF.
      MODIFY flights-cols FROM cols INDEX sy-tabix.
    ENDLOOP.
        WHEN 'SORT_UP'.
          READ TABLE flights-cols INTO cols WITH KEY selected = 'X'.
          IF sy-subrc = 0.
            SORT itab STABLE BY (cols-screen-name+10) ASCENDING.
            cols-selected = ' '.
      MODIFY flights-cols FROM cols INDEX sy-tabix.
          ENDIF.
        WHEN 'SORT_DOWN'.
          READ TABLE flights-cols INTO cols WITH KEY selected = 'X'.
          IF sy-subrc = 0.
            SORT itab STABLE BY (cols-screen-name+10) DESCENDING.
            cols-selected = ' '.
      MODIFY flights-cols FROM cols INDEX sy-tabix.
          ENDIF.
        WHEN 'DELETE'.
          READ TABLE flights-cols INTO cols
                                  WITH KEY screen-input = '1'.
          IF sy-subrc = 0.
            LOOP AT itab INTO demo_conn WHERE mark = 'X'.
              DELETE itab.
    ENDLOOP.
          ENDIF.
    ENDCASE.
    ENDMODULE.

  • Current line highlighting in editor

    In JDev 9.0.4.0, build 1419 there is a bug in highlighting of current line. The color of current line is always default, regardless to the color set in preferences. When you turn off highlighting of current line, it behaves even worse.

    I assumed you were using the built-in Highlighter classes to do the coloring. If you aren't, you're doing a lot more work than you need to. Here's what I use:import java.awt.Color;
    import javax.swing.event.ChangeEvent;
    import javax.swing.event.ChangeListener;
    import javax.swing.text.*;
    * Usage: new CurrentLineHighlighter(myColor).install(myTextComponent);
    public class CurrentLineHighlighter implements ChangeListener
      static final Color DEFAULT_COLOR = new Color(0, 0, 0, 15);
      private Highlighter.HighlightPainter painter;
      private Object highlight;
      private JTextComponent comp;
      public CurrentLineHighlighter()
        this(null);
      public CurrentLineHighlighter(Color highlightColor)
        Color c = highlightColor != null ? highlightColor : DEFAULT_COLOR;
        painter = new DefaultHighlighter.DefaultHighlightPainter(c);
      public void install(JTextComponent tc)
        comp = tc;
        comp.getCaret().addChangeListener(this);
      public void stateChanged(ChangeEvent evt)
        if (highlight != null)
          comp.getHighlighter().removeHighlight(highlight);
          highlight = null;
        int pos = comp.getCaretPosition();
        Element elem = Utilities.getParagraphElement(comp, pos);
        int start = elem.getStartOffset();
        int end = elem.getEndOffset();
        try
          highlight = comp.getHighlighter().addHighlight(start, end, painter);
        catch (BadLocationException ex)
          ex.printStackTrace();
    }

  • JTextPane current line end

    hi guys!
    How to get the end position of current line?
    I've tried Utilities.getRowEnd(textPane, textPane.getCaretPosition()), but it seems it's not what i need.
    thanks

    If I have a text pane with the following:
    123
    456
    and the caret is on the 5, then using your code I get 8 as the end of line.
    Each line contains 3 characters plus and EOL character, so 8 would seem to be the correct answer, what are you expecting?

  • New MBP Speed vs. Current Line Up?

    How much faster do we expect the new arrandale based MBP's to be compared to the current line up, at comparable points in the line up? I though I read someplace that the speed increase was only in the 10 to 15% range. Is that right?

    Whatever you read and wherever you read it, it was nothing but rumor. Speculation about unreleased models isn't allowed here, and Apple has always been very good at keeping them under wraps until they're released.

Maybe you are looking for

  • How do I delete the search feature from the bookmarks section (left side of the window when open)? Just the search feature in bookmarks.

    I don't know if it's always been there, but there is a search box now at the top of my Bookmarks toolbar that opens on the left side of my window. When the Bookmarks toolbar is open the first thing is Bookmarks and the X to close bookmarks. Just belo

  • This PDF form requires a newer version of Adobe reader !?

    Hi there I use LiveCycle 8 and I design forms for a target audience using Acrobat Reader 7.. My problem is whatever I put in a form, I get a really annoying message when opened in Acrobat reader 7 This PDF form requires a newer version of Adobe reade

  • Update Error in nokia e5

    HI i have nokia E5.whenever i want to install skype & nimbuzz software it shows update error.i dont know how to over come on this problem.if any one can help me i will be thankfull to him. thanks

  • Worklist send-xml-to-client functionality

    Hi there Quick question on wli 8.1. I have made extensive use in the past of the send xml to client business operation in WLI 7. Is there any sort of equivalent/how would this be achieved. Does the new worklist actually support this kind of functiona

  • Best piece of advice for "New to COLOR"...

    Sort of like a position statement: I have been monitoring this forum since it started, having used FT for a bit more than a year now... and having been a dedicated daVinci/telecine colorist for 13 years...and an on-line editor for nearly 20 years bef