Skip to Content
1
Former Member
Jul 09, 2007 at 03:49 PM

INTERACTIVE REPORTS WITH CHECKBOX

23 Views

HY FRIENDS

I HAVE TWO SELECT OPTION INTIALLY BASED ON WHICH I GET MORE THEN ONE RESULTS FROM PURCHASE ORDER TABLE.

I HAVE DISPLAYED WITH EACH A CHECK BOX.

NOW FOR FURTHER INFORMATION I HAVE CHECKED ONE OF THEM AND I NEED INFORMATION OF THAT ONLY FOR THIS I HAVE WRITTEN A CODE LIKE THIS.

&----


*& Report YTEST_REP9 *

*& *

&----


*& *

*& *

&----


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 TYPE C,

END OF IT_EBELN.

DATA: BEGIN OF IT_EBELN1 OCCURS 0,

EBELN TYPE EKKO-EBELN,

BEDAT TYPE EKKO-BEDAT,

END OF IT_EBELN1.

DATA CHK TYPE C.

SELECT-OPTIONS: S_PO FOR EKKO-EBELN DEFAULT '4500000000'.

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

*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.

HIDE IT_EBELN-EBELN.

ENDLOOP.

AT LINE-SELECTION.

*WRITE:/ IT_EBELN-EBELN .

AT USER-COMMAND.

CASE SY-UCOMM.

WHEN 'CANCEL'.

LEAVE TO SCREEN 0.

WHEN 'DISPLAY'.

LOOP AT IT_EBELN.

IF IT_EBELN-CHECK = 'X'.

SELECT EBELN BEDAT

FROM EKKO

INTO TABLE IT_EBELN1

WHERE EBELN = IT_EBELN-EBELN.

LOOP AT IT_EBELN1.

WRITE:/ IT_EBELN1-EBELN , IT_EBELN1-BEDAT.

ENDLOOP.

ENDIF.

ENDLOOP.

ENDCASE.

TOP-OF-PAGE.

WRITE:/ 'THIS IS THE PURCHASE ORDER'.

SKIP.

BUT THIS IS NOT WORKING PLEASE SUGGEST.