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

Adding a Row in Table Control when clicking a Button

Former Member
0 Likes
2,810

Hi all,

I have a scenario where initially I am loading the data from the table into the table control on the screen. I have a button for adding new records into the table control. Initially the table control in diabled for editing . My requirement is that when I press the "ADD" button a new row should be available for editing and after entering the data into that row I should save the data into the table...

Waiting for reply..

1 ACCEPTED SOLUTION
Read only

former_member673464
Active Contributor
0 Likes
1,395

hi..

welcome to sdn..

check the demo program <b>demo_dynpro_tabcont_loop_at.</b> for your requirement.

regards,

veeresh

8 REPLIES 8
Read only

Former Member
0 Likes
1,395

hi

for the button click wtite the code in pai

append intial line to internal table which displays data in table control

also in pbo of that screen write the following

describe table it_list lines z_tc_list-lines .

it_list is internal table

z_tc_list-lines is table control

reagrds

navjot

reward if helpfull

feel free to revert

Message was edited by:

navjot sharma

Read only

former_member673464
Active Contributor
0 Likes
1,396

hi..

welcome to sdn..

check the demo program <b>demo_dynpro_tabcont_loop_at.</b> for your requirement.

regards,

veeresh

Read only

Former Member
0 Likes
1,395

Hi

You would have to add an initial line to the internal table. It would appear as a row for editing, where you could add data and save.

Regards

Dinesh

Read only

0 Likes
1,395

Hi Dinesh,

I am trying that only but still I am not getting it ... Can u elaborate on your suggestion .. Thank You

Read only

Former Member
0 Likes
1,395

hi premal

boss in pai write the following code

case sy-ucomm

when 'add'.

appent intial line to itab.

endcase.

this will add a blank line to ur internal table

after this the screen will again be called at table control will again be filled from ur internal table so a blank line will appear.

regards

navjot

Read only

Former Member
0 Likes
1,395

this in line with my last post

after writing the aboce code also write this in the pbo

describe table it_list lines z_tc_list-lines .

it_list is internal table

z_tc_list-lines is table control

regards

navjot

Read only

0 Likes
1,395

Thank You all ...

My Problem is solved... Thanks for your gr8 help ...

Read only

Former Member
0 Likes
1,395

Awarded Points to all friends for help..

Thank You