‎2011 Jun 15 8:07 AM
Hello Friends,
We have a requirement of creating a custom Archiving Object to archive data from 3 custom tables. We have created the Object and executed it. The Write program works fine as per our requirement, but the Deletion program is not picking the data for deletion.
We have execute the Archiving Object manually. Write program has successfully created a session in the file system. Store job was also successful. But when we execute the deletion job, the job status shows successful. But when we see the spool of the deletion job, it shows '0' objects selected. The data is still present in the SAP database.
If you guys have any ideas on this issue please guide us.
With Regards,
Ravi
‎2011 Jun 15 8:14 AM
Did you use a guide like [Archive Development Kit|http://help.sap.com/saphelp_nw04s/helpdata/en/2a/fa0391493111d182b70000e829fbfe/frameset.htm] - [Developing Delete Programs|http://help.sap.com/saphelp_nw04s/helpdata/en/2a/fa0495493111d182b70000e829fbfe/frameset.htm] to develop the archive object and related programs ?
Regards,
Raymond
‎2011 Jun 15 8:20 AM
Hi
Go to tcode AOBJ and take it the object BC_SBOOK as a template. Delevelop your own reports for archiving and deletion from this object. The objective is to take the reports SBOOKA and SBOOKD as templates. You use the same function-modules and set your own tables instead 'SBOOK'. Add in the archiving reports your verifications with ABAP and write your own messages. With AOBJ do the settings for your objects and you will call with tcode SARA.
I hope this helps you
Regards
Eduardo
‎2011 Jun 16 3:09 AM
Hello Ravi,
You have to check your deletion program:
- Check whether deletion program can read the archived file
- Check whether the dataset selected in the archive files are considered under deletion internal table...
Based on your inputs further comments will be followed.
-Thanks,
Ajay
‎2011 Jun 16 11:23 AM
Helle Friends,
Thanks a lot for your valuable inputs. We did some changes to the delete program based on the standard delete program for Archiving object BC_SFLIGHT. Now we were able to execute the delete program successfully and the spool was able to give us the correct count of the records to be deleted.
But unfortunately, those records were not actually deleted from the custom tables. We debugged the program and found that, data was not getting populated in one Functional module "ARCHIVE_READ_OBJECT_BY_HANDLE". This FM gives us the table names from which the data has to be deleted and the number of records deleted respectively.
Kindly help us in fixing this...
With Regards,
Ravi