Application Development 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: 

delete row usingTable Control

Former Member
0 Kudos
81

Hi To all,

i have a problem in table control.

i want to delete a certain row from table control,

which will also deleted from table which i was used for that table control.

i was used "w/ sel column" in my table control . only those records have to delete where "w/sel column" is selected.

please help.

thanks.

Edited by: VipulKumar Darji on Apr 7, 2008 8:11 AM

6 REPLIES 6

Former Member
0 Kudos
60

hi vipul,

y dont u use table control wizard.... its very handy in these cases...

moreover, if u still want to execute without wizard, then use chain end chain in ur PAI. in it, on user command, chk wat button is pressed and on the pressing of delete button, simply check the row in the internal table used for the table control for the row in the work area . the work area will hold the selected row. wen the row in wa match the row in internal table, delete it from the internal table and immidiately, update the external table.

Do reward if helpful or get bak for further assistance.

0 Kudos
60

hi prem,

i have still problem ur answer.

i was used a w/ line selection property.

at runtime when i will select one row using that only those records will

be deleted from table and table control also.

how can i fetch which row is selected or not using the w/line selection.

please give me reply..

0 Kudos
60

i was used table control , not a table control wizard.

please give me information for table control only.

i am still searching a solution for that.

Former Member
0 Kudos
60

hi vipul,

Refer this thread.it may be helpful to u

revert back for any queries

regards,

sravanthi

Former Member
0 Kudos
60

Hi,

First select the record in the table control,

create a button on the application tool bar.

after selecting the record select the pushbutton DELETE.

process after input.

case sy-ucomm.

when ' DELETE'.

loop at it_table where it_table-selfield = 'X'. ( First field in your internal table i.e is char 1 field )

it_table1 = it_table.

delete it_table index sy-tabix..

endloop.

delete ztable from it_table1.

commit work.

regards,

Madhavi

0 Kudos
60

HI,

i was tried ur solution but it does'nt work.

my table control name is " TC_INCl_COVER"

in the property of w/ lineselection i was mentioned name in_sel.

that i will give me facility to select one or more row in table control

at runtime.

now i want to delete a selected row. is there any solution.

my internal table name is IT_IN_COV.

my database table name is ZINRISINC.

and i was used

LOOP AT IT_IN_COV WHERE IT_IN_COV-SELFIELD = 'X'.

ENDLOOP.

which gives me an error.

i made table control using dictionary/programs fields windows F6.

and its name is also zinrisinc.

please help me .

thanks