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

how to delete data from selected row in table control

Former Member
0 Likes
1,170

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

6 REPLIES 6
Read only

Former Member
0 Likes
786

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

Read only

Former Member
0 Likes
786

HI,

delete TABLE <table> index <INDEX>.

vamshi.

Edited by: vamshi naini on Jun 12, 2008 4:52 PM

Read only

Former Member
0 Likes
786

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.

Read only

Former Member
0 Likes
786

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

Read only

Former Member
0 Likes
786

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

Read only

Former Member
0 Likes
786

Hi Brahamji,

Refer program RSDEMO_TABLE_CONTROL.

Regards,

Charumathi.B