<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: how to read archived data into a report program? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-archived-data-into-a-report-program/m-p/5083742#M1180587</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please follow the below function modules and the paramters for reading archived data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'ARCHIVE_OPEN_FOR_READ'
  EXPORTING
    OBJECT                   = archiving object name
 IMPORTING
   ARCHIVE_HANDLE           = archive read handle 

Then in the loop(DO-ENDDO), use this FM:
DO.
  CALL FUNCTION 'ARCHIVE_GET_NEXT_OBJECT'
       EXPORTING
            archive_handle          = archive read handle 

Then records from the data objects using this FM:

  CALL FUNCTION 'ARCHIVE_GET_TABLE'
       EXPORTING
            archive_handle        = archive read handle
            record_structure      = 'TABLENAME'
            all_records_of_object = 'X'
            automatic_conversion  = 'X'
       TABLES
            table                 = internal table for which you want to retrieve records.

ENDDO.

Then close the archive file using this FM:

CALL FUNCTION 'ARCHIVE_CLOSE_FILE'
     EXPORTING
          archive_handle = archive read handle&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will help u in reading archived data from archive file.&lt;/P&gt;&lt;P&gt;may give some idea also on how to code the read prgram.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shamim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Jan 2009 12:09:46 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-01-29T12:09:46Z</dc:date>
    <item>
      <title>how to read archived data into a report program?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-archived-data-into-a-report-program/m-p/5083740#M1180585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need to read archived data when my report fails to fetch data from the database for the give selection fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the selection fields are: cost centre, cost element, year, period, order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have gone through the standard program sbookri_db_ar_multiple and i am not getting a clear understanding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i understood that i need to call 4 FMs in a sequence to read the archived data into a report, but i am not understanding how to pass my selection fields as input to those FMs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can some on help me with this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mano&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2009 18:11:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-archived-data-into-a-report-program/m-p/5083740#M1180585</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-27T18:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to read archived data into a report program?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-archived-data-into-a-report-program/m-p/5083741#M1180586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;U already posted this question in ABAP object&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1212772"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now u r repeating it here.&lt;/P&gt;&lt;P&gt;Cross posting threads is considered as spamming and is against the rules.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Reported!! to the moderator for rules violation&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="16" __jive_macro_name="size"&gt;кu03B1ятu03B9к&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2009 18:17:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-archived-data-into-a-report-program/m-p/5083741#M1180586</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-27T18:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: how to read archived data into a report program?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-archived-data-into-a-report-program/m-p/5083742#M1180587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please follow the below function modules and the paramters for reading archived data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'ARCHIVE_OPEN_FOR_READ'
  EXPORTING
    OBJECT                   = archiving object name
 IMPORTING
   ARCHIVE_HANDLE           = archive read handle 

Then in the loop(DO-ENDDO), use this FM:
DO.
  CALL FUNCTION 'ARCHIVE_GET_NEXT_OBJECT'
       EXPORTING
            archive_handle          = archive read handle 

Then records from the data objects using this FM:

  CALL FUNCTION 'ARCHIVE_GET_TABLE'
       EXPORTING
            archive_handle        = archive read handle
            record_structure      = 'TABLENAME'
            all_records_of_object = 'X'
            automatic_conversion  = 'X'
       TABLES
            table                 = internal table for which you want to retrieve records.

ENDDO.

Then close the archive file using this FM:

CALL FUNCTION 'ARCHIVE_CLOSE_FILE'
     EXPORTING
          archive_handle = archive read handle&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will help u in reading archived data from archive file.&lt;/P&gt;&lt;P&gt;may give some idea also on how to code the read prgram.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shamim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2009 12:09:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-read-archived-data-into-a-report-program/m-p/5083742#M1180587</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-29T12:09:46Z</dc:date>
    </item>
  </channel>
</rss>

