‎2008 Apr 07 5:58 AM
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
‎2008 Apr 07 7:22 AM
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.
‎2008 Apr 07 7:29 AM
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..
‎2008 Apr 07 7:32 AM
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.
‎2008 Apr 07 7:29 AM
‎2008 Apr 07 7:39 AM
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
‎2008 Apr 07 7:52 AM
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