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

Delete a row from the table...

0 Likes
1,130

Hi,

I needed help to delete a row from the table. However it must not get deleted from the database. It should only mark it as deleted and must not show it again when we display those records again.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,101

hi kushaal ,

i got ur peoblem.

you want to delete a record from table control not from database.

In YOUR case you are fillling your internal table in PBO each every time when ur PBO calls.

So you have to take flag variable. On very first time after filling internal table succesfully you have to set flag. and put condition above the select statement where you are filling internal table. if flag is set do not fill again ur internal table.

so , ur internal table remains as it is . what ever you was deleted form table you will not get again.

Give rewards if helpfull.

6 REPLIES 6
Read only

Former Member
0 Likes
1,102

hi kushaal ,

i got ur peoblem.

you want to delete a record from table control not from database.

In YOUR case you are fillling your internal table in PBO each every time when ur PBO calls.

So you have to take flag variable. On very first time after filling internal table succesfully you have to set flag. and put condition above the select statement where you are filling internal table. if flag is set do not fill again ur internal table.

so , ur internal table remains as it is . what ever you was deleted form table you will not get again.

Give rewards if helpfull.

Read only

0 Likes
1,101

Thanks for the help.... Will try it out rite away

Read only

Former Member
0 Likes
1,101

hi Kushal,

In that case take another field zlvorm(deletion indicator) and set the field to 'X' when you want to mark it for deletion and while retrieving the records get the records for which zlvorm = ' '. This way the records will not permanently get deleted from database.

Regards,

Santosh

Read only

Former Member
0 Likes
1,101

hi,

use internal table.

delete/fetch the entries from internal table instead of db table.

hope this helps!!!!

reward if helpful!!!!

regards,

Srishti.

Read only

Former Member
0 Likes
1,101

Hi,

The fields of the control table are taken from an internal table.....

that internal table should have a field as MARK type c.

Whenever user clicks on any row in the control table this field becomes contains 'X'.

So by using this you can do the functionality u need.

Reward if helpful.

Regards,

Syed

Read only

Former Member
0 Likes
1,101

Hi,

That answer was for other question.

You can do like this....

First fetch the data from the dbtable inot an internal table and then if you want to delete from this internal table and when you want to fetch data then fetch from this internal table.

Reward if helpful.

Regards,

Syed