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

checkboxes

Former Member
0 Likes
347

hi, i have been requested to create a program that calculates some sort of bonus payment....

the thing is that in the output of this report i have to write the list of employees that fullfill the conditions ( easy) but every single one of them has to have a checkbox to the right so the user can decide to check or uncheck the employees ....

after that "all the checked" employees will be proceesed for the payment

how can i work with variable checkboxes??

2 REPLIES 2
Read only

Former Member
0 Likes
332

For each record, write a one character field as a checkbox:

WRITE: /001 f1 AS CHECKBOX.

You then have to read the report back in and process the checkbox.

Rob

Read only

Former Member
0 Likes
332

Hi,

Try this to get all checked records in to intarnal table.

DESCRIBE TABLE gt_zitab LINES lv_cnt.

DO lv_cnt TIMES.

lv_index = sy-index + 4. // your index will depend on heading no of lines

READ LINE lv_index FIELD VALUE chbox.

IF chbox = 'X'.

READ TABLE gt_zitab INTO gs_zitab INDEX sy-index.

IF sy-subrc EQ 0.

gs_zitab-index = sy-index.

APPEND gs_zitab TO gt2_itab.

CLEAR gs_itab.

ENDIF.

ENDIF.

CLEAR chbox.

ENDDO.

gt2_itab will contain all checked records. You can write your program on this table.

If you have any questions please let me know.

Thanks,

Veni.