‎2008 Feb 01 10:42 AM
hi experts,
I am working with interactive report using hide statement.for thr first time it is working properly but the next time it is not working properly.Hope some clear statement has to be given ..
Please give some simple progarm for interactiev report in list using hide statement.
regards,
mani
‎2008 Feb 01 10:45 AM
HIDE dobj.
Effect
This statement stores the content of a variable dobj together with the current list line whose line number is contained in sy-linno in the hide area of the current list level. The data type of the variables dobj must be flat and no field symbols can be specified that point to rows of internal tables, and no class attributes can be specified. The stored values can be read as follows:
For each user action in a displayed screen list that leads to a list result, all the row values stored using HIDE - that is, the row on which the screen cursor is positioned at the time of the event - are assigned to the respective variables.
If a list row of an arbitrary list level is read or modified using the statements READ LINE or MODIFY LINE, all the values of this row stored using HIDE are assigned to the respective variables.
Notes
The HIDE statement works independently of whether the list cursor was set. In particular, variables for empty list rows can be stored - that is, rows in which the list cursor was positioned using statements like SKIP.
The HIDE statement should be executed immediately at the statement that has set the list cursor in the row.
Outside of classes, prior to release 7.0, for dobj constants and literals could still be specified. However, it was not possible to read them at list events and in the READ LINE statement.
Example
Storing square numbers and cubic numbers for a list of numbers. The example shows that arbitrary variables can be stored independently of row content. In the real situation, one would more likely store only the number and execute the calculation, when required, in the the event block for AT LINE-SELECTION.
REPORT ...
DATA: square TYPE i,
cube TYPE i.
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.
HIDE f.
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.
The selection can be made using:
AT LINE-SELECTION
AT PFx
AT USER-COMMAND
READ LINE
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).
System fields that are particularly useful in interactive reporting are listed in the system fields for lists documentation.
You cannot save lines or components of lines of an internal table that is addressed using a field symbol to the HIDE area. (Compare the ASSIGNING addition to the READ and LOOP statements). Assign the contents of the line or component to a global variable and save this instead.
You can only write variables to the HIDEarea.
In ABAP Objects, the following statements acause an error message:
CONSTANTS f.
HIDE: '...', f.
Correct syntax:
DATA: f1, f2.
HIDE: f1, f2.
Cause:
Interactive list events cause the fields hidden by the HIDE command to be overwritten with values in the HIDE area, which means that they must be changeable.n.
Reward points if useful.
‎2008 Feb 01 10:47 AM
Hi,
Check demo program
DEMO_LIST_HIDE
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dba42335c111d1829f0000e829fbfe/content.htm
‎2008 Feb 01 10:49 AM
Hi,
hide stores the value of a line in the output list along with the line no...............so when u click on a line the value displayed on that line ll be active u can use them........
try this sample code give in SAP help
DATA: square TYPE i,
cube TYPE i.
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.
Cheers,
Will.
‎2008 Feb 01 10:54 AM
hi,
try lilke this
REPORT zclassical_inter.
TABLES : vbrk.
DATA : off TYPE i,
lin TYPE i,
fld TYPE char10.
DATA : BEGIN OF itab OCCURS 0,
vbeln LIKE vbrk-vbeln,
fkart LIKE vbrk-fkart,
fkdat LIKE vbrk-fkdat,
netwr LIKE vbrk-netwr,
kunag LIKE vbrk-kunag,
END OF itab.
TOP-OF-PAGE.
ULINE AT /1(80).
FORMAT COLOR 3 ON.
WRITE:/1 sy-vline,
3 'Billing Doc.',
18 sy-vline,
20 'Billing Type',
33 sy-vline,
35 'Billing Date',
48 sy-vline,
50 'Net Value',
68 sy-vline,
69 'Customer',
80 sy-vline.
ULINE AT /1(80).
FORMAT COLOR OFF.
START-OF-SELECTION.
SET PF-STATUS 'TEST'.
SELECT vbeln fkart fkdat netwr kunag FROM vbrk
INTO CORRESPONDING FIELDS OF TABLE itab
WHERE vbeln LIKE '00000033%'.
LOOP AT itab.
WRITE:/1 sy-vline,
itab-vbeln UNDER 'Billing Doc.' HOTSPOT ON,
18 sy-vline,
itab-fkart UNDER 'Billing Type',
33 sy-vline,
itab-fkdat UNDER 'billing Date',
48 sy-vline,
itab-netwr UNDER 'Net Value' LEFT-JUSTIFIED,
68 sy-vline,
itab-kunag UNDER 'Customer' HOTSPOT ON,
80 sy-vline.
HIDE : itab-vbeln.
HIDE : itab-kunag.
ENDLOOP.
ULINE AT /1(80).
AT LINE-SELECTION.
IF sy-lsind = 1.
PERFORM cal_vf03.
ENDIF.
AT USER-COMMAND.
CASE sy-ucomm.
WHEN 'BACK' OR 'UP' OR 'CANC'.
LEAVE PROGRAM.
ENDCASE.
&----
*& Form cal_vf03
&----
text
----
FORM cal_vf03.
GET CURSOR FIELD fld. " DISPLAY OFFSET off LINE lin.
IF fld = 'ITAB-VBELN'.
SET PARAMETER ID 'VF' FIELD itab-vbeln.
CALL TRANSACTION 'VF03' AND SKIP FIRST SCREEN.
SET PARAMETER ID 'VF' FIELD space.
ELSEIF fld = 'ITAB-KUNAG'.
CALL TRANSACTION 'MIGO'.
ELSE.
CALL TRANSACTION 'MM03'.
ENDIF.
ENDFORM. "cal_vf03
reward if usefull...