2008 Nov 11 12:19 PM
Hi experts,
I have a table-control in screen 100.
I have a line-selector: L_SEL type char.
How can I check wheter a line is selected on the screen or not?
Hi experts,
I have a table-control in screen 100.
I have a line-selector: L_SEL type char.
How can I check wheter a line is selected on the screen or not?
2008 Nov 11 12:32 PM
Hi Mrwhite,
When you create a table control, you need to define a check field in your internal table, so you can control lines selecteds.
2008 Nov 11 12:37 PM
I defined it, but it isn't working. I also defined it in the program. I would need a sample program.
2008 Nov 11 12:56 PM
types: begin of ty_item,
mark(1) type c. " field to control line selected
include structure ekpo.
types end of ty_item.
data t_item type table of ty_item.
PAI
module tc_item_user_command.
case sy-ucomm.
when 'MARK'.
perform check_selected_line.
when 'DMRK'.
perform uncheck_selected_line.
endcase.
module tc_item_user_command input.
endmodule.
form check_selected_line.
field-symbols <tc> type cxtab_control.
field-symbols <table> type standard table.
field-symbols <wa>.
field-symbols <mark_field>.
assign 'T_ITEM' to <tc>.
assign 'T_ITEM[]' to <table>.
loop at <table> assigning <wa>.
assign component 'MARK' of structure <wa> to <mark_field>.
<mark_field> = 'X'.
endloop.
endform.
form unchecked_selected_line.
field-symbols <tc> type cxtab_control.
field-symbols <table> type standard table.
field-symbols <wa>.
field-symbols <mark_field>.
assign 'T_ITEM' to <tc>.
assign 'T_ITEM[]' to <table>. "not headerline
loop at <table> assigning <wa>.
assign component 'MARK' of structure <wa> to <mark_field>.
<mark_field> = space.
endloop.
endform.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |