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: 

To delete records from the standard database table .

Former Member
0 Kudos

Please can any body help me to delete the database records from the table bseg and bkpf using the username.

4 REPLIES 4

Former Member
0 Kudos

Hi,

use statement :

delete bkpf where usnam = p_name.

same applies to bseg...

Also, I don't think deleting entries from these 2 tables is advisable or even legal...

Regards,

Nicolas.

Former Member
0 Kudos

<b>Do not <i>under <i>any</i> circumstances</i> do this.</b>

Rob

Clemenss
Active Contributor
0 Kudos

Just to let you know:

entries in BKPF and BSEG means entries in an unknown number of dependent tables - secondary index tables, general ledger tables, just to name a few.

You can do a mass reversal on the documents posted by a certain user. Afterwards everything is fine.

Except from this: Ever heard of the ENRON scandal? Maybe you feel like 'See you next time in Jail'.

Regards,

Clemens

Former Member
0 Kudos

Hello jhon.

Inconsistencies in SAP tables can arise from various sources. It is sometimes difficult to find them. I see that many of your questions here relate to scripting.

Irrespective of whether you found this "problem" via any of a number of obscure reports, or the accountants have reconciled the database tables manually in Excel or Access to check that everything is okay, or you might have used transaction F190 to check consistency of all the dependent tables => you will hopefully be able to reconstruct the problem using that transaction (F190).

For more information, read the documentation on the transaction (or report SAPF190 from SE38). Use "classic mode" for more details (to the line item).

It will mention a SAP note (I am not logged on, but it is in the docs) which will help you further in analysing, and also contains 4 reports which you can use to correct inconsistencies, if I remember correctly. Might be more by now because it has been a while.

As mentioned before, do not manually or directly delete from those tables.

If the above procedure does not work for you, contact SAP via "OSS". They might need to logon to your system, and might even give you a little report to delete the entries.

Kind regards and good luck,

Julius