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

Make table control editable on screen

0 Likes
6,059

Hello,

     I have a table control on screen.

     Now when I have an entry in the table and I change the mode to editable only the row which has data get editable and not all the rows.

     Is there a way I can have all the columns editable when I click edit, and not just the row which has data.

     Thanks,

     Nandan

7 REPLIES 7
Read only

Former Member
0 Likes
3,050

Hi Nandan,

Please refer the program given.

SALV_DEMO_HIERSEQ_SELECTIONS

Read only

Former Member
0 Likes
3,050

Hi Nandan,

When you click edit, I think you need create some blank rows into your itab, then make them editable.

regards,

Archer

Read only

Former Member
0 Likes
3,050

1.Assign the common group name in properties of all columns.

2. Set the no of rows to <Table_control>-lines.

3. Write the below logic in PBO module of the screen.

Module tbc_editor output.

Loop at screen.

if screen-group1 = 'A'.

Screen-input = 1.

Modify screen.

Endloop.

Read only

0 Likes
3,050

Hello,

I tried the suggestion but it does not work with the columns of the table. Table control still remains in display mode.

Read only

0 Likes
3,050

Hi Nandan,

In your screen PBO, write the below code and check,

Loop at I_ITEM into WA_ITEM

with control TC_ITEM

cursor TC_ITEM-CURRENT_LINE

   Module TBC_EDITOR.

Endloop.

Read only

0 Likes
3,050

Hi Nandan,

You need to add blank entries to the internal table that is used for table control display. Just add blank records for eg 10 blank records and you will have 10 rows as editable in table control.

Thanks,

Naveen

Read only

0 Likes
3,050

Hi Nandan,

Assuming that your table control name is 'TC_TABCNTRL', Just add following statement in one of the module in PBO( Before the PBO loop statement ).

TC_TABCNTRL-LINES = < N>.

This will make <N> lines in editable. If you want to have this functionality only when 'EDIT' is clicked then add this statement in PAI's user_command MODULE.

Note: <N> is any interger value other than zero.