1.1.11

SAP Note 16572 - Deleting totals records/memo records in Cash Mgmt

Symptom:

Deleting totals records and memo records in Cash Management (for production start)

Additional key words

Cash management and forecast, totals record, delete, reset, initialize

Cause and prerequisites

Customer wants to delete test data or initialize all data because it is inconsistent, in order to be able to reorganize it.
Note:
As of Release 4.5A, Transaction FDFD is available, which can be used for user-friendly data reconstruction and data correction including deleting the legacy data. The deletion report executed below is then irrelevant for you.
Also refer to Note 65309.

Solution

To delete the totals records or memo records, you have to write a minor program, that deletes the appropriate tables. All tables are cash management and forecast tables.

Sample program:
REPORT ZZFDDEL.
TABLES: FDSB, "Totals record table for G/L accounts
FDSR, "Totals record table for customers/vendors
FDES, "Payment advices and planning items (manually "entered memo records)
FDM1, "Line items from Materials Management (pur. orders)
FDM2, "As of release 3.0B
FDS1, "Line items from Sales and Distribution (orders)
FDS2, "2nd table from Sales & Distribution"as of Release 4.0A
FDT1, "Treasury
FDW1, "Securities
FDD1, "Loans
FDLF, "agency businesses/vendor billing documents "as of 4.5A
FDSBDIST, "distributed TR-CM "as of 4.5A
FDSRDIST, "distributed TR-CM "as of 4.5A
FDESDIST, "distributed TR-CM "as of 4.5A
FDI1, "Real estate "as of 4.6A
FDTL, "Telephone list "as of 4.0A
FDZA. "Payment requests "in the standard system as of 4.0A

DELETE FROM FDSB WHERE BUKRS = '0001' OR BUKRS NE '0001'.
DELETE FROM FDSR WHERE BUKRS = '0001' OR BUKRS NE '0001'.
DELETE FROM FDES WHERE BUKRS = '0001' OR BUKRS NE '0001'.
DELETE FROM FDM1 WHERE BUKRS = '0001' OR BUKRS NE '0001'.
DELETE FROM FDM2 WHERE BUKRS = '0001' OR BUKRS NE '0001'. "as of 3.0B
DELETE FROM FDS1 WHERE BUKRS = '0001' OR BUKRS NE '0001'.
DELETE FROM FDS2 WHERE BUKRS = '0001' OR BUKRS NE '0001'. "as of 4.0A
DELETE FROM FDT1 WHERE BUKRS = '0001' OR BUKRS NE '0001'.
DELETE FROM FDW1 WHERE BUKRS = '0001' OR BUKRS NE '0001'.
DELETE FROM FDD1 WHERE BUKRS = '0001' OR BUKRS NE '0001'.
DELETE FROM FDLF WHERE BUKRS = '0001' OR BUKRS NE '0001'. "as of 4.5A
DELETE FROM FDSBDIST WHERE BUKRS = '0001' OR BUKRS NE '0001'. "fr.4.5A
DELETE FROM FDSRDIST WHERE BUKRS = '0001' OR BUKRS NE '0001'. "fr.4.5A
DELETE FROM FDESDIST WHERE BUKRS = '0001' OR BUKRS NE '0001'. "fr.4.5A
DELETE FROM FDI1 WHERE BUKRS = '0001' OR BUKRS NE '0001'. "fr. 4.6A
DELETE FROM FDTL WHERE BUKRS = '0001' OR BUKRS NE '0001'. "fr. 4.0A
* FDZA: in standard from 4.0A; Treasury customers from Release 2.2x
DELETE FROM FDZA WHERE BUKRS = '0001' OR BUKRS NE '0001'.
COMMIT WORK.

If you want to keep the payment advices and planned items, leave out the DELETE command "DELETE FROM FDES WHERE BUKRS ...". You then also have to execute program RFFDZZ00 after the totals record tables are deleted. This program adds the payment advices and planned items to the totals record tables in summary form. You cannot access this program in Customizing. You must use transaction SE38 to access it. Please read the program documentation before executing it.
To keep the MM and SD line items, leave out the DELETE commands belonging to tables FDM1, FDM2, FDS1 und FDS2 and run program RFFDZZ00 to set up the totals records that belong to them.
Once you have run the above delete program, delete it from the system in order to prevent any accidental or unauthorized access.

To delete all transaction data in a company code, you can execute program SAPF020. As of Release 3.0B, this program includes the cash management tables too. For more information on SAPF020 see the related program documentation for it.

1 comment: