‎2007 May 14 7:07 AM
Hi,
Suppose u created a classical report...suppose u want to make it interactive after the output comes...how can u do it????
‎2007 May 14 7:17 AM
Hi,
Foll. is the sample code:
SELECT MATNR MTART MATKL FROM MARA INTO CORRESPONDING FIELDS OF TABLE ITAB FROM MARA WHERE MATNR IN S_MATNR.
LOOP AT ITAB.
WRITE : /1 ITAB-MATNR.
HIDE ITAB-MATNR.
WRITE : 20 ITAB-MTART,
30 ITAB-MATKL.
ENDLOOP.
AT LINE-SELECTION.
SELECT SINGLE * FROM MARA INTO TABLE ITAB2 FROM MARA
WHERE MATNR = ITAB-MATNR.
LOOP AT ITAB2.
WRITE statement.
ENDLOOP.
Regards,
Himanshu.
‎2007 May 14 7:09 AM
Hi,
U can do it by using <b>hide</b>.
There r many other ways. it depends on what output u want.
Thanks.
‎2007 May 14 7:12 AM
Hi Pritha,
Thanks for the reply...but can u please tell me the syntax???
‎2007 May 14 7:15 AM
Hi Reema,
Syntax
HIDE dobj.
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. 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.
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, constants and literals that cannot be read in list results and in the statement READ LINE can be specified for dobj outside of classes.
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.
reward if helpful.
thanks,
‎2007 May 14 7:12 AM
you have to use hide : fields name what you want to show in next list...after writting the data in basic list..
you have to use AT line-selection event to show the next list(or at user-command).
regards
shiba dutta
‎2007 May 14 7:17 AM
Hi,
Foll. is the sample code:
SELECT MATNR MTART MATKL FROM MARA INTO CORRESPONDING FIELDS OF TABLE ITAB FROM MARA WHERE MATNR IN S_MATNR.
LOOP AT ITAB.
WRITE : /1 ITAB-MATNR.
HIDE ITAB-MATNR.
WRITE : 20 ITAB-MTART,
30 ITAB-MATKL.
ENDLOOP.
AT LINE-SELECTION.
SELECT SINGLE * FROM MARA INTO TABLE ITAB2 FROM MARA
WHERE MATNR = ITAB-MATNR.
LOOP AT ITAB2.
WRITE statement.
ENDLOOP.
Regards,
Himanshu.