Go on link..

link us with ...

Monday, December 13, 2010

INTERACTIVE Report first time

*&---------------------------------------------------------------------*
*& Report ZTR_DEMO_REPORT11 *
*& *
*&---------------------------------------------------------------------*
*& *
*& *
*&---------------------------------------------------------------------*

* Report : CHECK BOX
REPORT ZTR_DEMO_REPORT11 NO STANDARD PAGE HEADING LINE-SIZE
100 LINE-COUNT 7(3).

TABLES : YEMP , YSAL .


TYPES : BEGIN OF ST_EMP,

EMP_NO TYPE YEMP-EMP_NO,
EMP_NAME TYPE YEMP-EMP_NAME ,
CITY TYPE YEMP-CITY ,

END OF ST_EMP.

DATA : WA_EMP TYPE ST_EMP .

DATA : IT_EMP LIKE STANDARD TABLE OF WA_EMP.

DATA : CHK TYPE C.

SELECT-OPTIONS : S_EMP_NO FOR YEMP-EMP_NO.

INITIALIZATION .

AT SELECTION-SCREEN.

IF S_EMP_NO-LOW IS INITIAL OR S_EMP_NO-HIGH IS INITIAL.
MESSAGE W001(ZMSG).
ENDIF.

START-OF-SELECTION .

SELECT * FROM YEMP INTO TABLE IT_EMP.

END-OF-SELECTION .

BREAK-POINT .

LOOP AT IT_EMP INTO WA_EMP .

WRITE:/5 CHK AS CHECKBOX ,
15 WA_EMP-EMP_NO.

HIDE WA_EMP-EMP_NO.

ENDLOOP.


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

DATA : LINE TYPE I .

LINE = SY-LINNO .

AT LINE-SELECTION.

BREAK-POINT.

IF SY-LSIND = 1 .

WINDOW STARTING AT 10 10 ENDING AT 100 50.


DO LINE TIMES .


READ LINE SY-INDEX FIELD VALUE CHK .

IF CHK = 'X' .

LOOP AT IT_EMP INTO WA_EMP
WHERE EMP_NO EQ WA_EMP-EMP_NO.

WRITE :/20 WA_EMP-EMP_NAME .

HIDE WA_EMP-EMP_NO.
HIDE WA_EMP-EMP_NAME.

ENDLOOP.

ENDIF.

ENDDO.

CLEAR : LINE .


ENDIF.


IF SY-LSIND = 2 .

WINDOW STARTING AT 10 10 ENDING AT 100 50.

LOOP AT IT_EMP INTO WA_EMP
WHERE EMP_NO EQ WA_EMP-EMP_NO AND
EMP_NAME EQ WA_EMP-EMP_NAME.


WRITE :/20 WA_EMP-CITY .

ENDLOOP.

ENDIF.



TOP-OF-PAGE .

WRITE :/5 'TOP OF PAGE '.

END-OF-PAGE.

SKIP 2 .

WRITE :/5 'END OF PAGE '.

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)