Application Development and Automation 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: 
Read only

interactive report with check boxes

Former Member
0 Likes
1,367

i want to create a report in which there should be check boxes for every record & when i'll check those check boxes it should show me the sublist of the checked records.

8 REPLIES 8
Read only

Former Member
0 Likes
1,099

hi,

u need in classical or ALV?

Read only

Former Member
0 Likes
1,099

Hi Santosh ,

which type of report you want to develop.

classical or alv

Talwinder

Read only

0 Likes
1,099

i want it in classical not in alv

Read only

0 Likes
1,099

hi,

try like this

DATA : BEGIN OF wi_cust OCCURS 0 ,

kunnr LIKE kna1-kunnr,

name1 LIKE kna1-name1,

adrnr LIKE kna1-adrnr,

END OF wi_cust.

DATA : BEGIN OF wi_adrc OCCURS 0 ,

kunnr LIKE kna1-kunnr,

name1 LIKE adrc-name1,

city1 LIKE adrc-city1,

END OF wi_adrc.

DATA : chk1 TYPE c,

lines TYPE i,

lines1 TYPE i..

DATA: c TYPE c, ind TYPE c.

DATA : v_line TYPE sy-index.

SELECT kunnr name1 adrnr UP TO 10 ROWS FROM kna1 INTO TABLE wi_cust.

LOOP AT wi_cust .

WRITE : / chk1 AS CHECKBOX ,sy-vline, wi_cust-kunnr,wi_cust-name1,wi_cust-adrnr.

HIDE : wi_cust-kunnr, chk1.

ENDLOOP.

END-OF-SELECTION.

lines = sy-linno - 1.

AT LINE-SELECTION.

CHECK sy-lsind = 1.

WINDOW STARTING AT 5 4

ENDING AT 85 20.

DO lines TIMES.

CLEAR chk1.

READ LINE sy-index FIELD VALUE chk1.

IF chk1 = 'X'.

ind = sy-index - 2.

READ TABLE wi_cust INDEX ind.

SELECT name1 city1 FROM adrc INTO CORRESPONDING FIELDS OF TABLE wi_adrc

WHERE addrnumber = wi_cust-adrnr.

READ TABLE wi_adrc INDEX 1.

WRITE : / wi_adrc-name1, wi_adrc-city1.

ENDIF.

ENDDO.

Read only

Former Member
0 Likes
1,099
Read only

Former Member
0 Likes
1,099

Hi,

It is possible in Interactive Report.

data: A type c.

In the basic List use WRITE: A as Checkbox.

automatically it will create check box.

Then use READ Current line and MODIFY CURRENT LINE statement u can achieve the result.

Hope it Helpful.

- Selvapandian Arunachalam

Read only

Former Member
0 Likes
1,099

Hi,

Follow These Steps.

Take one variable as follows:

DATA : gv_chk(1) VALUE 'X' .

Display this value along ur records in the same line of ur record as follows:

LOOP AT itab.

WRITE 😕 gv_chk AS checkbox, itab-fields ... .

ENDLOOP.

This will display checkboxes .

To read the selected checkboxes follow these steps given under:

DO <No.of Records> TIMES.

READ LINE sy-index FIELD VALUE gv_chk.

IF gv_chk = 'X'.

Do required Action.

endif.

Hope this is useful to u.

awrd Points

Bhupal

Read only

Former Member
0 Likes
1,099

try this...

REPORT zdrill_down NO STANDARD PAGE HEADING.

TABLES : eban, makt.

DATA : BEGIN OF itab OCCURS 100,

matnr LIKE eban-matnr,

menge LIKE eban-menge,

END OF itab.

DATA : pick.

SELECT-OPTIONS : s_matnr FOR eban-matnr.

PERFORM get_data.

PERFORM write_list.

AT LINE-SELECTION.

DO.

READ LINE sy-index FIELD VALUE pick.

IF sy-subrc NE 0.

EXIT.

ENDIF.

IF pick EQ 'X'.

PERFORM second_list.

CLEAR : itab-matnr, itab-menge.

ENDIF.

ENDDO.

&----


  • to get data from datbase table EBAN

----


FORM get_data.

SELECT matnr menge INTO CORRESPONDING FIELDS OF TABLE

itab FROM eban UP TO 20 ROWS WHERE matnr IN s_matnr .

SORT itab BY matnr.

ENDFORM. "get_data

&----


*& Main list

&----


FORM write_list.

LOOP AT itab.

WRITE 😕 pick AS CHECKBOX,

(18) itab-matnr.

HIDE : itab-matnr, itab-menge.

WRITE : sy-vline.

ENDLOOP.

ENDFORM. "write_list

&----


*& Form second_list drill down list

&----


FORM second_list.

WRITE :/(18) itab-matnr,

sy-vline,

(13) itab-menge DECIMALS 0,

sy-vline.

ENDFORM. "second_list