2008 Jun 12 11:54 AM
hi....
plz tell how to delete data from selected row in table control
hi....
plz tell how to delete data from selected row in table control
2008 Jun 12 12:09 PM
Hi Brahamji
Person:
LastName FirstName Address City
Nilsen Fred Kirkegt 56 Stavanger
Rasmussen Nina Stien 12 Stavanger
-
Delete a Row
"Nina Rasmussen" is going to be deleted:
Syntax
*DELETE FROM Person WHERE LastName = 'Rasmussen' *
Result
LastName FirstName Address City
Nilsen Fred Kirkegt 56 Stavanger
if you have a delete button in your module pool program.using the FCT code of that buttonyou can do a follows
when 'FCT Code for delete button'.
DELETE FROM Person WHERE LastName = 'Rasmussen' .
or
DELETE FROM TABLE <TABLE NAME> INDEX <INDEX>.
regards
<REMOVED BY MODERATOR>
lakshman
Edited by: Alvaro Tejada Galindo on Jun 12, 2008 4:12 PM
2008 Jun 12 12:12 PM
HI,
delete TABLE <table> index <INDEX>.vamshi.
Edited by: vamshi naini on Jun 12, 2008 4:52 PM
2008 Jun 12 12:17 PM
you should append column selection field for table control. then you will know
using CXTAB_CONTROL-LINE_SELECTOR which line of table control was selected. and analyzing it you will able to delete row from internal table that fill
your table control.
2008 Jun 12 12:18 PM
hi brahamji,
you have to put check box on table control
in table control attributed
check w/selcolumn
give some name here like ch1
in the structure you are using on Table control you have to add a field
with name ch1
when you select any row here
ch1 will be 'x'.
so delete the row where ch1 = 'x'.
so whatever no of rows are selected will get deleted
Regards,
Ani
2008 Jun 12 12:20 PM
Hiii..
in table control wizard ensure that there will be a with selfiled in the attributes of the table control and that is checked .
take a seperate column in the internal table as box .
when u select the selection column on the table control then the X will be refelcting the internal table column(BOX).
now in PAI module loop the internal table where the BOX is X and the delete the record and modify the internal table ...
PBO.
loop at itab with control.
module <module_pbo>.
endloop.
PAI.
Loop at itab.
module <module_pai.
endloop.
module<module_pai>.
itab-data = tablecontrol-data.
endmodule.
module <module_pai>.
if BOX = 'X'.
delete the record.
and modify the internal table.
endif.
endmodule.
regards
chandu reddy
2008 Jun 12 1:09 PM
Hi Brahamji,
Refer program RSDEMO_TABLE_CONTROL.
Regards,
Charumathi.B