Application Development 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: 

problem with Delete quesry with performance issue

Former Member
0 Kudos

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,

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

7 REPLIES 7

Former Member
0 Kudos

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.

0 Kudos

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?

0 Kudos

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

0 Kudos

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?

0 Kudos

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.

0 Kudos

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?

0 Kudos

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.