07-24-2010 2:01 PM
HI All,
I have a problem with Delete query.
I have designed one Report, which will delete records from standard table.
The working of REport are as follows:-
1] I have moved the records to be deleetd in one internal table.
2] I have used delete syntax as "Delete Table from it_table".
But the problem is that there are around 1,50,000 records in internal table it_table.
so 1,50,000 will be deleted at a time. Hoe can i avoid this performance issue.
It would be good, if the code is sent throght forum.
Thnaks in Advance,
07-24-2010 2:33 PM
Hi Deepali Warkar,
If you want to DELETE ALL the records from the Table,
I would suggest you to use tcode SE14, the "Activate and Adjust Table" option with "Delete data" radiobutton checked. It's quite easy and fast and you'll not need to login to the database.
BUT DO NOT TRY THIS WAY IF YOU DO NOT WANT TO DELETE ALL THE DATA, OTHERWISE YOU WILL LOOSE YOUR ALL THE DATA, SO TAKE CARE .
try any of these ways.
Hope it'll help you.
Thanks and regards,
Sachin.
07-24-2010 2:33 PM
Hi Deepali Warkar,
If you want to DELETE ALL the records from the Table,
I would suggest you to use tcode SE14, the "Activate and Adjust Table" option with "Delete data" radiobutton checked. It's quite easy and fast and you'll not need to login to the database.
BUT DO NOT TRY THIS WAY IF YOU DO NOT WANT TO DELETE ALL THE DATA, OTHERWISE YOU WILL LOOSE YOUR ALL THE DATA, SO TAKE CARE .
try any of these ways.
Hope it'll help you.
Thanks and regards,
Sachin.
07-24-2010 5:51 PM
Hi Sachin,
My requirement is different and so i need to add logic according t my requirement in the program.
The logic is added and records needs to be deleted from progarm itself.
Could you pease suggest how to delete the records from standard table without any performance issues?
07-25-2010 11:26 AM
Hi,
Generally it is not recommended to delete any entries from the standard table directly using a query. Try to use some standard function module or BAPI which will take care of the performance. Alternatively try to lock the entry and then delete it.
Vijay v
07-26-2010 6:05 AM
Hi Vijay,
I tried to search BAPI for the standard table, but this standard table belongs to BW requirement and i havn't found any BAPI for this. I will use ENQUEUE and DEQUEUE for locking and unlocking reasons.
But could you please suggest how can i reduce performance isses for the same?
07-26-2010 1:09 PM
Hi , Firstly u cannot(should not) delete or modify records from standard table using delete,update,modify statement.I dont see any issue(performance) in delete tabnme from it_table , and more over this is one time requirement i hope.
Ram.
07-26-2010 5:33 PM
Hi,
I know it is not a good practice to delete entries from standard tables.
But since we don't have a BAPI for that BW relevant standard table so not other option left with us.
I guess that there can be performance issue, because there are all around 1,6000 entries in internal table.
So could you please suggest how to reduce performance issue?
07-27-2010 6:06 AM
Hi,
Regarding performance this is not at all an issue , however u can run this program when the user traffic is less...consult ur administrator.Again i am afraid why r u deleting these many entries in production environment.
Ram.