‎2008 Mar 12 9:29 PM
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??
‎2008 Mar 12 9:40 PM
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
‎2008 Mar 12 10:26 PM
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.