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

Line selection on Dynpro

Former Member
0 Likes
692

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?

3 REPLIES 3
Read only

Former Member
0 Likes
600

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.

Read only

0 Likes
600

I defined it, but it isn't working. I also defined it in the program. I would need a sample program.

Read only

0 Likes
600

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.