Go on link..

link us with ...

Friday, December 31, 2010

atevent used in report

REPORT ZATEVENT .
***** SYSTEM DEFINED REPORT VARIABLES ********
System field Information

SY-LSIND
Index of the list created during the current event (basic list = 0)

SY-LISTI
Index of the list level from which the event was triggered

SY-LILLI
Absolute number of the line from which the event was triggered

SY-LISEL
Contents of the line from which the event was triggered

SY-CUROW
Position of the line in the window from which the event was triggered
(counting starts with 1)

SY-CUCOL
Position of the column in the window from which the event was triggered
(counting starts with 2)

SY-CPAGE
Page number of the first displayed page of the list from which the
event was triggered

SY-STARO
Number of the first line of the first page displayed of the list from
which the event was triggered (counting starts with 1). This line may
contain the page header.

SY-STACO
Number of the first column displayed in the list from which the event
was triggered (counting starts with 1)

SY-UCOMM
Function code that triggered the event

SY-PFKEY
Status of the list currently being



*START-OF-SELECTION.
* WRITE 'CLICK HERE!' HOTSPOT COLOR 5 INVERSE ON.
WRITE : / .
WRITE : ' TEST HERE '.
*
*AT LINE-SELECTION.
* WRITE 'CLICK TO GET NEXT LIST !' HOTSPOT COLOR 5 INVERSE ON.
* WRITE : / 'LIST INDEX ', SY-LSIND.
*
****** EXAMPLE FOR SY-LSIND & SY-UCOMM *********


*START-OF-SELECTION.

* SET PF-STATUS 'TEST'.
*
* WRITE: 'STANDARD LIST, SY-LSIND =', SY-LSIND.
*
*AT LINE-SELECTION.
*
* WRITE: 'LINE-SELECTION, SY-LSIND =', SY-LSIND.
*
*AT USER-COMMAND.
*
* CASE SY-UCOMM.
* WHEN 'TEST'.
* WRITE: 'TESTED, SY-LSIND =', SY-LSIND.
* WHEN 'OTHER'.
* WRITE : / ' OTHERS TESTED ', SY-LSIND.
* ENDCASE.
*
*

*************** AT FIRST AND AT LAST AS HEADER & FOOTER *******
*TABLES: ZCOUNTRY.
*DATA ITAB LIKE ZCOUNTRY OCCURS 25 WITH HEADER LINE.
*SELECT * FROM ZCOUNTRY INTO TABLE ITAB.
*LOOP AT ITAB.
*AT FIRST.
*WRITE : / 'CNT CODE ', 10 'CNT POS', 25 'CNT NAME '.
*ULINE.
*ENDAT.
*
*WRITE : / ITAB-CNTCODE , 10 ITAB-CNTPOS, 25 ITAB-CNTNAME.
*AT LAST.
*WRITE : / , 10 '-------', 25 '--------'.
*ENDAT.
*ENDLOOP.
*FREE ITAB.


*DATA: BEGIN OF ITAB OCCURS 0,
* NUM TYPE I, NAME(20),
* SAL TYPE P DECIMALS 2,
* END OF ITAB.
*
* ITAB-NUM = 10.
* ITAB-NAME = 'RAJU'.
* ITAB-SAL = '455.55'.
* APPEND ITAB.
*
* ITAB-NUM = 20.
* ITAB-NAME = 'KIRAN'.
* ITAB-SAL = '232.45'.
* APPEND ITAB.
*
* ITAB-NUM = 30.
* ITAB-NAME = 'SWAMY'.
* ITAB-SAL = '67.89'.
* APPEND ITAB.
*
* ITAB-NUM = 40.
* ITAB-NAME = 'BHARATH'.
* ITAB-SAL = '567.89'.
* APPEND ITAB.
*
* ITAB-NUM = 50.
* ITAB-NAME = 'KALAYAN'.
* ITAB-SAL = '647.29'.
*
* APPEND ITAB.
*
* ITAB-NUM = 60.
* ITAB-NAME = 'SRAVAYA'.
* ITAB-SAL = '267.59'.
*
* APPEND ITAB.
*
* LOOP AT ITAB.
*
* AT FIRST.
* WRITE ' *** STATRT OF INFORMATION *** '.
* ULINE.
* SKIP 2.
* WRITE : ' NUMBER ', 20 'NAME ', 45 'SAL'.
* SKIP 2.
* ENDAT.
*
* WRITE : / ITAB-NUM, 20 ITAB-NAME, 45 ITAB-SAL.
* ULINE.
* AT LAST.
* SUM.
* WRITE : /30 'TOTAL SALARY ',ITAB-SAL.
*
* SKIP 2.
* WRITE : / ' END OF INFORMATION '.
* ULINE.
* ENDAT.
*
* ENDLOOP.
*
************ AT NEW AND AT END EVENTS *************

*DATA: BEGIN OF LINE,
* CARRID TYPE SBOOK-CARRID,
* CONNID TYPE SBOOK-CONNID,
* FLDATE TYPE SBOOK-FLDATE,
* CUSTTYPE TYPE SBOOK-CUSTTYPE,
* CLASS TYPE SBOOK-CLASS,
* BOOKID TYPE SBOOK-BOOKID,
* END OF LINE.
*
* DATA ITAB LIKE LINE OCCURS 0 WITH HEADER LINE.
*SELECT CARRID CONNID FLDATE CUSTTYPE CLASS BOOKID
* FROM SBOOK INTO CORRESPONDING FIELDS OF TABLE ITAB.
*
*LOOP AT ITAB. "INTO LINE.
*
* AT FIRST.
* WRITE / 'TRAVEL BOOKING INFROMATION '.
* ULINE.
* ENDAT.
*
* AT NEW CARRID.
* WRITE: / 'Carrid:', ITAB-CARRID.
* ENDAT.
*
* AT NEW CONNID.
* WRITE: / 'Connid:', ITAB-CONNID.
* ENDAT.
*
* AT NEW FLDATE.
* WRITE: / 'Fldate:', ITAB-FLDATE.
* ENDAT.
*
* AT NEW CUSTTYPE.
* WRITE: / 'Custtype:', ITAB-CUSTTYPE.
* ENDAT.
*
* WRITE: / ITAB-BOOKID, ITAB-CLASS.
*
* AT END OF CLASS.
* ULINE.
* ENDAT.
*
*ENDLOOP.
*
*

No comments:

link us...

For Visitors

if you want to publish or Add something on ERP, SAP , SAP FUNCTIONAL, SAP ABAP then mail us along with your email-id. contain must be yours

email-id :- avinashkr_raj@yahoo.com(any email)

email-id :- avinaskr_raj.abap@blogger.com ( use only gmail)