2007 Jun 08 9:45 PM
I have data in table control and when the user selects a row, modified data and clicks on sav ebutton, the cursor should be set back to the selected line.
here the cursor defaults to the first row of the table.
Plz let me know how i can set cursor to the first selected row...
I have data in table control and when the user selects a row, modified data and clicks on sav ebutton, the cursor should be set back to the selected line.
here the cursor defaults to the first row of the table.
Plz let me know how i can set cursor to the first selected row...
2007 Jun 08 9:50 PM
You can write simple if condition,
where you are writing cursor position ? then write the code :
if sy-ucomm ne 'SAVE'.
here mentioned default set cursor position
endif.
2007 Jun 08 10:01 PM
HI,
TOP_LINE -->Also set by the SAPgui through the vertical scroll bar slider.
CURRENT_LINE---> Read only, set by the system ( TOP_LINE + SY-STEPL - 1 )
LEFT_COL -
>Also set by the SAPgui through the horizontal scroll bar slider.
COLS-INDEX --->Also set by the SAPgui after moving columns.
COLS-SELECTED --->Also set by the SAPgui after column selection.
tese all are the fields of structure TABLEVIEW, using these fields we can palce the cursor position.
<u><b>U Follow this code ...</b></u>
CONTROLS ctrl TYPE TABLEVIEW USING SCREEN scr.PROCESS BEFORE OUTPUT.
LOOP AT itab WITH CONTROL ctrl CURSOR ctrl-CURRENT_LINE.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP AT itab WITH CONTROL ctrl.
MODULE ctrl_pai.
ENDLOOP.regards,
Ashokreddy.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |