Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

difference bet. Hide and Get cursor.

Former Member
0 Kudos

Can anyone give me an example program for Hide statement. Can u also tell me the difference in using get cursor and Hide statement.

5 REPLIES 5

Former Member
0 Kudos

Hi

Hide

To prevent the user from selecting invalid lines, ABAP/4 offers several possibilities. At the end of the processing block END-OF-SELECTION, delete the contents of one or more fields you previously stored for valid lines using the HIDE statement. At the event AT LINE-SELECTION, check whether the work area is initial or whether the HIDE statement stored field contents there. After processing the secondary list, clear the work area again. This prevents the user from trying to create further secondary lists from the secondary list displayed.

GetCursor

If the hidden information is not sufficient to uniquely identify the selected line, the command GET CURSOR is used. The GET CURSOR command returns the name of the field at the cursor position in a field specified after the addition field, and the value of the selected field in a field specified after value.

Regards

Anji

Former Member
0 Kudos

Hi,

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).

Regards,

Omkar.

Former Member
0 Kudos

hi

hide

when you click on the record, it will take field value from the memory not from basic list, it will take positon of the data from basic report

get cursor

when you click on the record, it will take field value from basic list,

regards,

pavan

Former Member
0 Kudos

Hi,

Please try to search the forum as questions like this have been asked and answered countless times before. Also look at the on-line help for ABAP as commands are explained there with examples.

Gareth.

Former Member
0 Kudos

Hi

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).

<b>Reward if usefull</b>