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

Reading multiple rows from table control

Former Member
0 Likes
1,120

Hi all,

I am working on a table control. I am retrieving data from database tables and passing that internal table to the table control. Table control is gettting displayed successfully. Now, i need to select some rows from this table control and check in my program which rows are selected.

I am using field 'SEL' which works as a selection column. It is defined in my internal table as well with same name. But when i try and read my internal table in PAI with sel eq 'X', it is not giving any values as no table entries has 'SEL' column equal to 'X'.

Can anybody help me with this problem?

Thanks,

Archana

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
877

Hi Archana,

First declare the field SEL in the internal table,

Then in the table control screen attributes , check the with selection column and specify the column name there ( like wa-sel ).

Only providing the variable as SEL will not work, if you are doing it independently with a variable then you have modify the itab in PAI before reading the itab with value X..

I hope you have followed this steps.

Go through this link:[http://www.sapdev.co.uk/dialog/tabcontrol/tc_mark.htm]

6 REPLIES 6
Read only

Former Member
0 Likes
877

You have so many posts, so probably I am not going to tell something you wouldn't know already. Do you loop the internal able and modify it in PAI? Just in case you forgot. There is a neat example SAP provides.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
878

Hi Archana,

First declare the field SEL in the internal table,

Then in the table control screen attributes , check the with selection column and specify the column name there ( like wa-sel ).

Only providing the variable as SEL will not work, if you are doing it independently with a variable then you have modify the itab in PAI before reading the itab with value X..

I hope you have followed this steps.

Go through this link:[http://www.sapdev.co.uk/dialog/tabcontrol/tc_mark.htm]

Read only

0 Likes
877

why dont you try this : demo_dynpro_tabcont_loop_at

and check the SYNTAX for DELETE

Read only

0 Likes
877

DEMO_DYNPRO_TABCONT_LOOP_AT and all other demo programs are available in ABAPDOCU transaction.

Don't forget it, they are so useful !

Read only

0 Likes
877

Hi Keshav,

I am followed both the approaches, but in any case selection field indicator was never 'X'. So, i am unable to read the table control.

Can you please guide me on this?

Thanks,

Archana

Read only

0 Likes
877

hi Keshav,

Earlier i was using same variable SEL in internal table and as a selection column as well. In that case, it was marking SEL as 'X' even when document was selected.

Today, i tried making selection column name as 'MARK' and internal table field name as 'SEL', it is working fine. I am able to read table control lines where MARK equals 'X'.

[http://www.sapdev.co.uk/dialog/tabcontrol/tc_mark.htm]

I followed this link provided by you. Its really useful. Thanks for your help.

Thanks to others as well.

Thanks,

Archana