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

Report with input checkbox

Former Member
0 Likes
980

Hi all,

My requirement is to develop a Report where one of the columns can be updated with the help of Checkbox and based on some other information few values in the check box column should not be non editable.

And ultimately on an event these values to be saved in my Z-table.

Can anyone please guide me.

Regards,

Sudipto.

Hi all,

My requirement is to develop a Report where one of the columns can be updated with the help of Checkbox and based on some other information few values in the check box column should not be non editable.

And ultimately on an event these values to be saved in my Z-table.

Can anyone please guide me.

Regards,

Sudipto.

9 REPLIES 9
Read only

Former Member
0 Likes
956

hi ,

//My requirement is to develop a Report where one of the columns can be updated with the help of Checkbox

how u want to update? is this field change in the output list based on the check box?

Still you need to elaborate the query with an example .

regards,

vijay

Read only

Former Member
0 Likes
956

hi

can u jst clarify me which one should not be non editable s the checkbox or the columns tht u diplay n the report

is tht u mean the phrase SHOULD NOT BE NON EDITABLE as editable

Read only

0 Likes
956

Yeah, thanks for ur replies.

Suppose I have a list of employees in my report. Now there I have to put a checkbox column where I can update the table thru report that these employees can apply for loans and for those who have already applied this check-box column should be made non-editable.

Hope I have made myself clear.

Regards,

Sudipto.

Read only

0 Likes
956

Hi Barman,

Check this sample code ...

data vchk1 type c.

data : begin of it_test occurs 0,

vchk(1) type c,

kunnr like kna1-kunnr,

end of it_test.

start-of-selection.

clear it_test.

it_test-kunnr = 2000.

append it_test.

it_test-kunnr = 3000.

append it_test.

it_test-kunnr = 4000.

append it_test.

it_test-kunnr = 5000.

append it_test.

end-of-selection.

loop at it_test.

if it_test-kunnr = 5000.

write 😕 vchk1 as checkbox INPUT OFF,

5(10) it_test-kunnr.

else.

write 😕 vchk1 as checkbox,

5(10) it_test-kunnr.

endif.

endloop.

Regards,

Jayaram..

Read only

0 Likes
956

Yeah u can do that .

1.

First u need to display all the employees with the check box option .

declare a field in ur itab as cb (say ) character for displaying this .

write:/ cb as check box.

will display the result in check boxes .

2.use the logic of screen

to disable the check boxes into non editable where the employess are not allowed to go for a loan .

this will be like

loop at screen .

screen -group

screen input = '0'. "for that check box

or (screen active = '0' )

modify screen.

endloop.

for this effect .

regards,

vijay

Read only

0 Likes
956

Hi Barman,

Check the sample code given above and code your program according to your

requirement.

Create an Update Button in the tool bar. After displaying the report , check the check boxes based on your requirements. Then at the event At User Commnd update the ztable with the values dispalyed in the report.

I think this will definitely fulfill your requirement.

Regards,

Jayaram..

Read only

0 Likes
956

Hi Jayaram,

Thanks for your reply. But I wanted the same in ALV grid format if possible. Or at least that the user selects the repective employees and clicks on some corresponding update button to update the z-table.

Not very conversant with ALV. Can someone guide please.

Regards,

Sudipto.

Read only

0 Likes
956

Hi Vijay,

Thanks for your reply. But if I m using a simple report how can I use a screen flow logic.

Could u plz. elaborate...

Regards,

Sudipto.

Read only

0 Likes
956

Hi,

1.To display checkbox in ALV,declare a field of type char and length 1 in output table.

2.In the field catalog,make checkbox = 'X' for the field.

3.To make the checkbox editable for few cells,use one field called cellstyle of type char and length 4 in output table.Read the particular row.

READ TABLE itab2 INTO wa2 index 2.

IF sy-subrc EQ 0.

w_style-fieldname = 'CHECKBOX'.

w_style-style = cl_gui_alv_grid=>mc_style_enabled.

REFRESH wa2-cellstyles.

APPEND w_style TO wa2-cellstyles.

MODIFY itab2 FROM wa2 TRANSPORTING cellstyles

WHERE matnr = wa2-matnr.

4.In layout,

w_layout-stylefname = 'CELLSTYLES' .

5.Pass the layout in set_table_for_first_display.