Skip to Content
2
Former Member
Jul 10, 2007 at 07:10 AM

INTERACTIVE REPORT

12 Views

HI FRIENDS

YESTERDAY I HAVE CREATED AN INTERACTIVE LIST.

FIRST I HAVE TWO SELECT OPTIONS ACCORDING TO WHICH WITH CHECKBOXES LIST GENERATED THEN ON PRESSING APPLICATION BUTTON DISPLAY IT DISPLAY'S ACCORDING INFORMATION.

AFTER THAT NOW I WANT THAT FOR THAT RESULTS WHEN I DOUBLE CLICK ON THAT PARTICULAR RECORD IT SHOULD GO TO A TRANSACTION.

I TRIED USING LINE SELCTION BUT IT IS NOT WORKING.

MY CODE.

REPORT YTEST_REP9 NO STANDARD PAGE HEADING.

TABLES: EKKO , EKPO.

DATA: BEGIN OF IT_EBELN OCCURS 0,

EBELN TYPE EKKO-EBELN,

LIFNR TYPE EKKO-LIFNR,

CHECK(1) TYPE C,

END OF IT_EBELN.

DATA: BEGIN OF IT_EBELN1 OCCURS 0,

EBELN TYPE EKKO-EBELN,

LIFNR TYPE EKKO-LIFNR,

END OF IT_EBELN1.

DATA: CHK TYPE C,

W_LINES TYPE I,

W_RECORD TYPE I VALUE 6.

SELECT-OPTIONS: S_PO FOR EKKO-EBELN.

SELECT-OPTIONS: S_DATE FOR EKKO-BEDAT DEFAULT '20060912'.

*PARAMETERS PO(10) TYPE C.

*PARAMETERS PO_DATE TYPE D.

START-OF-SELECTION.

SET PF-STATUS '100_S'.

SELECT EBELN LIFNR

FROM EKKO

INTO TABLE IT_EBELN

WHERE EBELN IN S_PO

AND BEDAT IN S_DATE.

END-OF-SELECTION.

LOOP AT IT_EBELN.

AT FIRST.

WRITE:/ 'CHK' , 15 'PO_NUMBER' , 30 'ACCOUNT_NUMBER'.

ULINE.

SKIP.

ENDAT.

WRITE:/ IT_EBELN-CHECK AS CHECKBOX, 15 IT_EBELN-EBELN , 30

IT_EBELN-LIFNR.

ENDLOOP.

*AT LINE-SELECTION.

*WRITE:/ IT_EBELN-EBELN .

AT USER-COMMAND.

IF SY-LSIND LT 2.

CASE SY-UCOMM.

WHEN 'CANCEL'.

LEAVE TO SCREEN 0.

WHEN 'DISPLAY'.

DESCRIBE TABLE IT_EBELN LINES W_LINES.

DO W_LINES TIMES.

READ LINE W_RECORD : FIELD VALUE IT_EBELN-CHECK INTO CHK,

FIELD VALUE IT_EBELN-EBELN INTO IT_EBELN1-EBELN,

FIELD VALUE IT_EBELN-LIFNR INTO IT_EBELN1-LIFNR.

IF SY-SUBRC NE 0.

EXIT.

ENDIF.

IF CHK EQ 'X'.

APPEND IT_EBELN1.

ENDIF.

CLEAR : CHK , IT_EBELN1.

ADD 1 TO W_RECORD.

ENDDO.

LOOP AT IT_EBELN1.

SET PF-STATUS '101_S'.

AT FIRST.

WRITE:/ 'EBELN' , 15

'BEDAT'.

ULINE.

SKIP.

ENDAT.

WRITE:/ IT_EBELN1-EBELN , 15 IT_EBELN1-LIFNR.

HIDE IT_EBELN1-EBELN.

ENDLOOP.

ENDCASE.

ENDIF.

IF SY-LSIND EQ 2.

CASE SY-UCOMM.

WHEN 'CANCEL'.

LEAVE TO SCREEN 0.

ENDCASE.

ENDIF.

AT LINE-SELECTION.

WRITE:/ IT_EBELN1-EBELN.

*SET PARAMETER ID: 'BES' FIELD IT_EBELN1-EBELN.

*CALL TRANSACTION 'ME23'.

TOP-OF-PAGE.

WRITE:/ 'THIS IS THE PURCHASE ORDER'.

SKIP.