‎2009 Sep 17 12:21 PM
Dear Experts,
My requirement is that i need to archive and archived files must be fetched using function modules 'ARCHVE_READ_OBJECT', 'ARCHIVE_GET_NEXT_RECORD', 'ARCHIVE_OPEN_FOR_READ', 'ARCHIVE_GET_NEXT_OBJECT'. These function modules are called inside loop statements which 'ARCHIVE_READ_OBJECT' will return handle based on object, archivekey and archiveofs. 'ARCHIVE_GET_NEXT_RECORD' is used to read records based on handle i got from 'ARCHIVE_READ_OBJECT'. Finally using 'ARCHIVE_OPEN_FOR_READ' is used to open all the other objects and 'ARCHIVE_GET_NEXT_OBJECT' inside do enddo statements to read one by one object to get handle to get further records using 'ARCHIVE_GET_NEXT_RECORD'. How to improve the performance of coding inside loop statements when archiving records needs to be fetched based on the function modules above. The problem is that loop statements is time taking and because of it performance issue arises.
Regards,
Nagarajan
‎2009 Sep 17 2:20 PM
I have done something similar, but using a different flow:
ARCHIVE_READ_OBJECT
ARCHIVE_GET_TABLE (for header data)
ARCHIVE_GET_TABLE (for item data)
ARCHIVE_CLOSE_FILE
Rob
‎2009 Sep 18 5:10 AM
Hi Rob,
Thanks for ur immediate reply. Can u send me a sample code as how to use the function modules for retrieving header and items. Or any Standard SAP Programs available.
Regards,
Nagarajan
‎2009 Sep 18 5:59 AM
Dear Rob,
Can u plz send me a sample code as to how to use function modules 'ARCHIVE_READ_OBJECT', 'ARCHIVE_GET_TABLE' for header and item.
Regards,
Nagarajan
‎2009 Sep 18 1:58 PM
These FMs are all documented. You can also do a where used list to see how SAP uses them. So try coding it yourself, and if you still have problems, then get back to the forum.
Rob