Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

check boxes in reports

Former Member
0 Kudos
93

hi..

i am told to prepare a report which must contain the account numbers in the basic list along with check box for each account number. when the user selects one or more check box the secondary list must contain the other details of the account numbers selected. i got the basic list in which even i select one or two check box i am getting the details of all account numbers in the secondary list.

please help me.

thanks in advance..

1 ACCEPTED SOLUTION

Former Member
0 Kudos
61

try this sample report and modify acording to your requirements..

TABLES : makt.

DATA : itab LIKE makt OCCURS 0 WITH HEADER LINE.

DATA : pick.

AT LINE-SELECTION.

DO. "lines times.

READ LINE sy-index FIELD VALUE pick.

IF pick EQ 'X'.

PERFORM second_list USING itab-matnr .

MOVE space TO pick.

MODIFY CURRENT LINE FIELD VALUE pick.

ENDIF.

IF sy-subrc NE 0.

EXIT.

ENDIF.

ENDDO.

START-OF-SELECTION.

SELECT * INTO CORRESPONDING FIELDS OF TABLE itab FROM marc UP TO 100 ROWS.

LOOP AT itab .

WRITE 😕 pick AS CHECKBOX, itab-matnr, itab-maktx.

hide : itab-matnr, itab-maktx.

ENDLOOP.

&----


*& Form second_list

&----


FORM second_list USING matnr.

" you can add your code here using parameters..

WRITE:/ itab-matnr, itab-maktx.

ENDFORM. "second_list

Edited by: Perez C on Dec 27, 2007 2:49 PM

1 REPLY 1

Former Member
0 Kudos
62

try this sample report and modify acording to your requirements..

TABLES : makt.

DATA : itab LIKE makt OCCURS 0 WITH HEADER LINE.

DATA : pick.

AT LINE-SELECTION.

DO. "lines times.

READ LINE sy-index FIELD VALUE pick.

IF pick EQ 'X'.

PERFORM second_list USING itab-matnr .

MOVE space TO pick.

MODIFY CURRENT LINE FIELD VALUE pick.

ENDIF.

IF sy-subrc NE 0.

EXIT.

ENDIF.

ENDDO.

START-OF-SELECTION.

SELECT * INTO CORRESPONDING FIELDS OF TABLE itab FROM marc UP TO 100 ROWS.

LOOP AT itab .

WRITE 😕 pick AS CHECKBOX, itab-matnr, itab-maktx.

hide : itab-matnr, itab-maktx.

ENDLOOP.

&----


*& Form second_list

&----


FORM second_list USING matnr.

" you can add your code here using parameters..

WRITE:/ itab-matnr, itab-maktx.

ENDFORM. "second_list

Edited by: Perez C on Dec 27, 2007 2:49 PM