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

Single selection in TABLE CONTROL.

Former Member
0 Likes
1,486

Hi all,

i hope there is someone that can help me.

My problem is:

in a custom ABAP repot i've a table control declared as CONTROLS tbc_tab TYPE TABLEVIEW USING SCREEN 100.

i've to not able to select more tha one record(line) in the table control tbc_tab: i've setted field LINE_SELECTOR = '1' but when go on with scrool mouse i can continue to select more than one record.

How can i solve this problem?

Thanks,

Alex.

1 ACCEPTED SOLUTION
Read only

former_member191735
Active Contributor
0 Likes
1,248

On the screen 100 for table control (control) - You can set an option for selecting one row or column

Double click on the control - choose lone sel - single. same for column sel.

11 REPLIES 11
Read only

Former Member
0 Likes
1,248

Hi,

You could follow these steps

In PAI of screen with table control

LOOP AT itab_contract.

MODULE append_select.

ENDLOOP.

MODULE append_select INPUT.

IF table_flag = 'X'.

APPEND zspusercont TO itab_select.

ENDIF.

ENDMODULE. " append_select INPUT

Where itab_select is a table defined exactly the same as itab_contract in

the TOP include. Table_flag is the name I gave to w/selcol.

Hope this helps.

Thanks,

Harini

Read only

0 Likes
1,248

Hi Harini,

sorry, but how do i declare zspusercont?

Thanks,

Alex.

Read only

0 Likes
1,248

Hi,

zspusercont is the work area of itab_select.

So declare it as,

DATA: zspusercont type itab_select.

Thanks,

Harini

Read only

former_member191735
Active Contributor
0 Likes
1,249

On the screen 100 for table control (control) - You can set an option for selecting one row or column

Double click on the control - choose lone sel - single. same for column sel.

Read only

0 Likes
1,248

Hi Sampath Kumar,

I've set that option and it's OK for list of max 10 records but when i go on in the table control with the scroll of mouse, for example, in a list of more than 10 records, i able to select one record in the first block of 10 record and another record in the follow block: my problem is this selected only one record always.

Sorry,

i hope that someone can help me.

Thanks,

Alex

Read only

0 Likes
1,248

What is the meaning of field V_SCROLL of table controll?

Can it help me?

Read only

0 Likes
1,248

What system are you in?

If you set select row to one - you will not be able to select more than one row. Well, if you scroll down, the first selected line will be unselected.

Alright, try one more time, Line sel (for control) - single, Check w/sel column (enter some value i mean single character field) and fixed columns to 0.

Let me know if you can't solve this. I am 100% sure as it is working on my machine

Read only

0 Likes
1,248

V_SCROLL may be the value of W/Sel column. search in your program

Read only

0 Likes
1,248

Alessandro ,

I think you would need to modify the internal table associated with the table control for the line selected with a value of X for the selection column.That ways next time the PBO is loaded the line shows up a selected on the screen.What could be happening is that since the selection field is not marked as X,the loop logic for the internal table just writes the values on screen and allows you to select another value.

regards

Raina

Read only

0 Likes
1,248

uhh..this is should be done in addition to the layout changes suggested in the earlier posts.

regards

Raina

Read only

0 Likes
1,248

Hi Sampath Kumar,

thanks a lots, i've solved my porblem with your suggest.

I've given you 10 points...!!!

Bye,

Alessandro.