Preface – This post is part of the Differences in ABAP for Interviews series.
Table of Contents
Before discussing the differences between GET CURSOR and HIDE, let’ have a quick introduction of the two.
Interactive report in SAP ABAP is a report which displays the basic information on the basic list and the detailed information on the secondary list.
Among various list events in the interactive report, the AT LINE-SELECTION is an event that is triggered when the user clicks on any list item. To know the selected list contents, there are 2 keywords or statements, GET CURSOR and HIDE.
GET CURSOR statement is used to read the name of the output field or the number of the list line on which the screen cursor in the displayed list is positioned and store the value into the variables field or line depending on how the FIELD or LINE is specified.
HIDE statement is used to hide the content of the current output line into a temporary memory called hide area for further processing. HIDE statement is used withing loop…end loop to hide the values in the hide area.
On double click on any list line, an event AT LINE-SELECTION is triggered and the system automatically identifies the line number and stores the corresponding record into the hide variable.
This statement places the contents of the dobj for the current output line (system field SYLINNO) into the HIDE area. The data type of the dobj must be flat and no filed symbol or class attributes can be specified.
Differences between GET CURSOR and HIDE
Now, let’s have a look at their difference.
|GET CURSOR||HIDE AREA|
|It is used to store the value of the selected field name.||It is used to store the line with line number.|
|It responds for a particular field||It responds for a particular line.|
|Interactive reports can be generated using field name and field value||Interactive report cannot be generated using this.|