Table [VBFA][1]
(SAP Sales Document Flow Table and data) contains two fields that track when a record was created (ERDAT
) and when it was last changed (AEDAT
).
The way you describe the requirement, I understand it like this:
the table from which the data should be deleted is a replicated (via SLT replication) table in a HANA database that is not the actual transactional system.
all records that have been last changed before (but not including) October, 1st 2017 should be deleted from this table.
If this is correct, you could run a DELETE
statement like this:
DELETE FROM "VBFA" WHERE "AEDAT" < '20171001'
Note that this does only affect this table and not any related records in other tables. Also, if the table is partitioned, be aware that this command does not remove partitions that may be empty after the deletion.