2007 Aug 09 8:54 AM
hi experts,
plz let me know the difference between set cursor and get cursor in your own words dnt copy it from net..etc........thnx in advance...
2007 Aug 09 9:02 AM
Hi Ravi ,
These two commands are used while creating interactive lists , as the name SET CURSOR suggests , it is used to set the cursor on a line or a feild in a line and the command SET CURSOR is used to get the feild name on which the cursor is placed.
Here is a sample code for the same
do 10 times.
write / 'test'.
enddo.
data : v_test(10).
set cursor line 5.
at line-selection.
get cursor VALUE v_test.
break-point.
check the value of v_test to see how get cursor works to understand set cursor , first comment the line set <b>cursor line 5.</b> execute the program , in the output you will not see the cursor , but when you execuete the program after uncommenting the line , you can see the cursor placed on line 5
Regards
Arun
Message was edited by:
Arun R
hi experts,
plz let me know the difference between set cursor and get cursor in your own words dnt copy it from net..etc........thnx in advance...
2007 Aug 09 9:00 AM
Hi,
GET CURSOR.
If this statement is specified during PAI processing, depending on the specification for FIELD or LINE, it transfers either the name of the screen element or the number of the row of a table control or of the group of a step loop (on which the screen cursor is positioned after a user action) into the data objects field or line. For field, a character-type (before Release 6.10 flat) variable is expected. For line, a variable of the type i is expected. In field_properties, further properties of the screen element can be defined.
If the cursor is in the input field of the standard toolbar or on a pushbutton in the screen, the statement is ignored and the specified variables remain unchanged. If the cursor in the first variant is not in a screen element of the current screen but on a bar in the GUI status, the contents of field and the variables specified in field_properties are initialized. If the cursor in the second variant is not on a screen element that is part of a table control or a step loop, the variable line is initialized.
SET CURSOR.
During PBO processing, this statement sets the cursor in the screen layout of the current screen. The cursor can be positioned by entering a screen element after FIELD or by entering a specific position using col and lin. Outside of PBO processing, the cursor is positioned in the next list displayed on the screen.
If the SET CURSOR statement is not specified, depending on the definition of the screen, the cursor is set according to the following hierarchy:
On the cursor position determined statically in the screen properties,
On the first input field of the screen,
On the first screen element of the screen,
On the input field in the systemtoolbar.
The latter also applies if the input field in the system toolbar is not displayed.
Hope it was useful.
Thanks,
Sandeep.
2007 Aug 09 9:02 AM
Hi Ravi ,
These two commands are used while creating interactive lists , as the name SET CURSOR suggests , it is used to set the cursor on a line or a feild in a line and the command SET CURSOR is used to get the feild name on which the cursor is placed.
Here is a sample code for the same
do 10 times.
write / 'test'.
enddo.
data : v_test(10).
set cursor line 5.
at line-selection.
get cursor VALUE v_test.
break-point.
check the value of v_test to see how get cursor works to understand set cursor , first comment the line set <b>cursor line 5.</b> execute the program , in the output you will not see the cursor , but when you execuete the program after uncommenting the line , you can see the cursor placed on line 5
Regards
Arun
Message was edited by:
Arun R
2007 Aug 09 9:06 AM
Hi Ravi,
Set cursor is knothing but placing the cursor on a particular fields in a screen,
Get cursor is capturing the field value in a specified cursor position,
reward points to all helpful answers
kiran.M
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |