Go on link..

link us with ...

Monday, December 13, 2010

First INTERACTIVE REORT

*&---------------------------------------------------------------------*
*& Report ZTR_DEMO_REPORT7 *
*& *
*&---------------------------------------------------------------------*
*& *
*& *
*&---------------------------------------------------------------------*





*&---------------------------------------------------------------------*
*& Report ZSANDEEP_INTERACTIVE_REORT *
*& *
*&---------------------------------------------------------------------*
*& *
*& *
*&---------------------------------------------------------------------*

REPORT ZTR_DEMO_REPORT7 NO STANDARD PAGE HEADING LINE-SIZE
100 LINE-COUNT 10(5).

*/------------DECLARATION ---------------------------------------------

TABLES : MARA.
DATA : ITAB LIKE MARA OCCURS 0 WITH HEADER LINE.

SELECTION-SCREEN : BEGIN OF BLOCK ABC.
SELECT-OPTIONS : MAT_NUM FOR MARA-MATNR.
SELECTION-SCREEN : END OF BLOCK ABC.


*/----------------INITIALIZATION-------------------------------
INITIALIZATION.
MAT_NUM-LOW = '38'.
MAT_NUM-HIGH = '5000'.
APPEND MAT_NUM.



AT SELECTION-SCREEN.
IF MAT_NUM-LOW IS INITIAL OR MAT_NUM-HIGH IS INITIAL.
MESSAGE E003(ZJ_MSG).
ENDIF.


START-OF-SELECTION.
SELECT * FROM MARA INTO TABLE ITAB WHERE MATNR IN MAT_NUM.

LOOP AT ITAB .
WRITE :/ ITAB-MATNR UNDER 'MAT NUM' , ITAB-MEINS UNDER 'UNITS' ,50
ITAB-ERNAM .
HIDE ITAB-MATNR.
HIDE ITAB-MEINS.
ENDLOOP.

BREAK-POINT.

*---AT LINE SELECTION ON SECONDARY LIST WHOSE LIST INDEX IS 1--------

AT LINE-SELECTION.

IF SY-LSIND = 1 .

SELECT * FROM MARA INTO TABLE ITAB WHERE MATNR = ITAB-MATNR .
WINDOW STARTING AT 10 10 ENDING AT 130 50.

LOOP AT ITAB .
WRITE :/ ITAB-MATNR UNDER 'MAT NUM(MATNR)' , ITAB-MEINS UNDER
'UNITS(MEINS)' .

ENDLOOP.

ENDIF.


*------TOP-OF-PAGE FOR SECONDARY LIST WHOSE LIST INDEX IS 1--------

TOP-OF-PAGE DURING LINE-SELECTION.
IF SY-LSIND = 1 .

WRITE :/ 'PAGE HEADING FOR SECOND LIST'.
WRITE :/6 'MAT NUM(MATNR)', 35 'UNITS(MEINS)'.
ULINE.

ENDIF .



*-----AT LINE SELECTION ON SECONDARY LIST WHOSE LIST INDEX IS 2--------

AT LINE-SELECTION .

IF SY-LSIND = 2 .

SELECT * FROM MARA INTO TABLE ITAB WHERE MATNR = ITAB-MATNR .

WINDOW STARTING AT 10 10 ENDING AT 100 50.


LOOP AT ITAB .
WRITE :/ ITAB-MEINS , 35 ITAB-ERNAM , 55 ITAB-MATNR.
ENDLOOP.


ENDIF.

*------TOP-OF-PAGE FOR SECONDARY LIST WHOSE LIST INDEX IS 2--------


TOP-OF-PAGE DURING LINE-SELECTION.

IF SY-LSIND = 2 .


WRITE :/ 'PAGE HEADING FOR THIRD LIST'.
WRITE : / 'MEINS' , 35 'ERNAM' , 55'MATNR' .
ULINE.

endif.



END-OF-PAGE.
ULINE.
WRITE :/ 'REPORT CREATED BY',SY-UNAME, 'ON' , SY-DATUM .

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)