‎2006 Dec 07 7:32 AM
‎2006 Dec 07 7:51 AM
1.HIDE will have storage like Internal table, but not in case of GET CURSOR .
Regards
Prabhu
‎2006 Dec 07 7:51 AM
1.HIDE will have storage like Internal table, but not in case of GET CURSOR .
Regards
Prabhu
‎2006 Dec 07 7:52 AM
hi Sunil,
When we use Get cursor statement, we get the contents of line (clicked by user).
Based on our requirement, we can get offset of the contents captured in sy-lisel.
EX: to get matnr on a line..
v_matnr = sy-lisel+0(18).
As we are making use of offset, we need to know the position of the field displayed on the output screen.
If we use HIDE, the field gets back into the HIDE variable.
position of the field doesnt matter.
Check the programs to understand how to make use of hide and get cursor statements.
<b>demo_list_hide
DEMO_LIST_GET_CURSOR
</b>
Regards,
Santosh
‎2006 Dec 07 7:53 AM
GET CURSOR : Transfers the name of the field at the cursor position to the field f.
DATA: CURSORFIELD(20),
GLOB_FIELD(20) VALUE 'global field',
REF_PARAMETER(30) VALUE 'parameter by reference',
VAL_PARAMETER(30) VALUE 'parameter by value',
FIELD_SYMBOL(20) VALUE 'field symbol'.
FIELD-SYMBOLS: <F> TYPE ANY.
PERFORM WRITE_LIST USING REF_PARAMETER VAL_PARAMETER.
ASSIGN GLOB_FIELD TO <F>.
AT LINE-SELECTION.
GET CURSOR FIELD CURSORFIELD.
WRITE: / CURSORFIELD, SY-SUBRC.
FORM WRITE_LIST USING RP VALUE(VP).
DATA: LOK_FIELD(20) VALUE 'local field'.
ASSIGN FIELD_SYMBOL TO <F>.
WRITE: / GLOB_FIELD, / LOC_FIELD,
/ RP, / VP,
/ 'literal', / FIELD_SYMBOL.
ENDFORM.
HIDE : The contents of f related to the current output line are stored. If this line is selected, f is filled automatically with the stored value.
You do not have to output the field with WRITE in order to be able to store its value.
The HIDE statement does not support structures that contain tables (deep structures).
Message was edited by:
chandrasekhar jagarlamudi
‎2006 Dec 07 7:55 AM
Hi,
HIDE: hide statement buffers the record temporarily that is selected by the user in the previous list,which is then compared at the next level for corresponding details to be displayed.
GET CURSOR: stores the value in the variable we declare in our code.
Check this for HIDE.
http://www.sap-img.com/abap/a-sample-hide-get-cursor-in-interactive-programming.htm
‎2006 Dec 07 7:59 AM
Hi
Hide:
This statement stores - in the current list level - the content of the variable dobj together with the current list line whose line number is contained in sy-linno.
START-OF-SELECTION.
FORMAT HOTSPOT.
DO 10 TIMES.
square = sy-index ** 2.
cube = sy-index ** 3.
WRITE / sy-index.
HIDE: square, cube.
ENDDO.
AT LINE-SELECTION.
WRITE: square, cube.
GET CURSOR:
GET CURSOR { {FIELD field [field_properties]}
| {LINE line [line_properties]} }.
If this statement is specified during list processing, it will transfer - depending on the specification of FIELD or LINE - the name of the output field or the number of the list line on which the screen cusor in the currently displayed list is positioned (after the user action) into the variables field or line. For field, a character-type (prior to Release 6.10 flat) variable is expected; for line, a variable of the type i is expected. With the additions field_properties and line_properties, further information on the cursor position can be imported.
With the FIELD addition, only the names of global data objects of the ABAP program can be determined. If the cursor is positioned on the output of a data object that is not visible in the current context or a literal, field will be initialized. The latter has no influence on the other additions or on sy-subrc
regrs
Rakesh