<?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 Archiving Table Data in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/archiving-table-data/m-p/5376032#M1236593</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am working on a report which archives data of a ztable. the report is using a function module ARCHIVE_OPEN_FOR_DELETE to archive the same. when i execute the fm independently, it is working perfect... but it doesnt work in my program.... on debugging the code, i could find the area which is causing trouble.... but i am unable to figure out whr the problem is.... the problem code is as below :&lt;/P&gt;&lt;P&gt;FORM process_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA : lv_jobcount LIKE tbtcm-jobcount,&lt;/P&gt;&lt;P&gt;         lv_jobname  LIKE tbtcm-jobname,&lt;/P&gt;&lt;P&gt;         lv_key      LIKE admi_jobs-archiv_key,&lt;/P&gt;&lt;P&gt;         lt_file     LIKE admi_files OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If data is not given on selection screen,&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;populate one month older date than current date&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF s_zdats[] IS INITIAL.&lt;/P&gt;&lt;P&gt;    s_zdats-sign = 'I'.&lt;/P&gt;&lt;P&gt;    s_zdats-option = 'LT'.&lt;/P&gt;&lt;P&gt;    s_zdats-low = sy-datum.&lt;/P&gt;&lt;P&gt;    s_zdats-low = s_zdats-low - 30.&lt;/P&gt;&lt;P&gt;    APPEND s_zdats.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get data from History table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  SELECT * FROM zchm_history&lt;/P&gt;&lt;P&gt;          INTO TABLE gt_history&lt;/P&gt;&lt;P&gt;          WHERE lenum IN  s_lenum&lt;/P&gt;&lt;P&gt;            AND ztote IN  s_ztote&lt;/P&gt;&lt;P&gt;            AND zdats IN  s_zdats.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;open a new archive run to archive data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'ARCHIVE_OPEN_FOR_WRITE'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            call_delete_job_in_test_mode = p_test&lt;/P&gt;&lt;P&gt;            comments                     = p_coment&lt;/P&gt;&lt;P&gt;            create_archive_file          = p_create&lt;/P&gt;&lt;P&gt;            object                       = 'ZCHM_HIST'&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            archive_handle               = gv_handle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get Job Info&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'GET_JOB_RUNTIME_INFO'&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            jobcount        = lv_jobcount&lt;/P&gt;&lt;P&gt;            jobname         = lv_jobname&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            no_runtime_info = 1&lt;/P&gt;&lt;P&gt;            OTHERS          = 2.&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Get Archive Key&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    SELECT * FROM admi_files&lt;/P&gt;&lt;P&gt;          INTO TABLE lt_file&lt;/P&gt;&lt;P&gt;          WHERE creat_date = sy-datum&lt;/P&gt;&lt;P&gt;            AND pathintern = 'ZCHM_HIST_ARCHIV'.&lt;/P&gt;&lt;P&gt;    IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      SORT lt_file BY creat_time DESCENDING.&lt;/P&gt;&lt;P&gt;      READ TABLE lt_file INDEX 1.&lt;/P&gt;&lt;P&gt;      MOVE lt_file-archiv_key TO lv_key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Lock Table ADMI_JOBS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CALL FUNCTION 'ENQUEUE_EZ_ADMI_JOBS'&lt;/P&gt;&lt;P&gt;           EXPORTING&lt;/P&gt;&lt;P&gt;                mode_admi_jobs = 'E'&lt;/P&gt;&lt;P&gt;                jobname        = lv_jobname&lt;/P&gt;&lt;P&gt;                jobcount       = lv_jobcount&lt;/P&gt;&lt;P&gt;           EXCEPTIONS&lt;/P&gt;&lt;P&gt;                foreign_lock   = 1&lt;/P&gt;&lt;P&gt;                system_failure = 2&lt;/P&gt;&lt;P&gt;                OTHERS         = 3.&lt;/P&gt;&lt;P&gt;      IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Update Table ADMI_JOBS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      UPDATE admi_jobs SET archiv_key = lv_key&lt;/P&gt;&lt;P&gt;                       WHERE jobname  = lv_jobname&lt;/P&gt;&lt;P&gt;                         AND jobcount = lv_jobcount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    UnLock Table ADMI_JOBS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CALL FUNCTION 'DEQUEUE_EZ_ADMI_JOBS'&lt;/P&gt;&lt;P&gt;           EXPORTING&lt;/P&gt;&lt;P&gt;                mode_admi_jobs = 'E'&lt;/P&gt;&lt;P&gt;                jobname        = lv_jobname&lt;/P&gt;&lt;P&gt;                jobcount       = lv_jobcount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT gt_history.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;initializing a new data object&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CALL FUNCTION 'ARCHIVE_NEW_OBJECT'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              archive_handle = gv_handle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;putting data records into the data container&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CALL FUNCTION 'ARCHIVE_PUT_RECORD'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              archive_handle   = gv_handle&lt;/P&gt;&lt;P&gt;              record_structure = 'ZCHM_HISTORY'&lt;/P&gt;&lt;P&gt;              record_flags     = ' '&lt;/P&gt;&lt;P&gt;              record           = gt_history.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;writing data object into the archive file&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CALL FUNCTION 'ARCHIVE_SAVE_OBJECT'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              archive_handle = gv_handle.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;creating a statistic list&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'ARCHIVE_WRITE_STATISTICS'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            archive_handle = gv_handle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;closing the archive run&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'ARCHIVE_CLOSE_FILE'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            archive_handle = gv_handle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " process_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can someone tel whr the error is in this code. i have already spent lot of time on this perticular part by commenting certain area, uncommenting it and so on.... kindly help....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Mar 2009 04:08:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-03-25T04:08:30Z</dc:date>
    <item>
      <title>Archiving Table Data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/archiving-table-data/m-p/5376032#M1236593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am working on a report which archives data of a ztable. the report is using a function module ARCHIVE_OPEN_FOR_DELETE to archive the same. when i execute the fm independently, it is working perfect... but it doesnt work in my program.... on debugging the code, i could find the area which is causing trouble.... but i am unable to figure out whr the problem is.... the problem code is as below :&lt;/P&gt;&lt;P&gt;FORM process_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA : lv_jobcount LIKE tbtcm-jobcount,&lt;/P&gt;&lt;P&gt;         lv_jobname  LIKE tbtcm-jobname,&lt;/P&gt;&lt;P&gt;         lv_key      LIKE admi_jobs-archiv_key,&lt;/P&gt;&lt;P&gt;         lt_file     LIKE admi_files OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If data is not given on selection screen,&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;populate one month older date than current date&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF s_zdats[] IS INITIAL.&lt;/P&gt;&lt;P&gt;    s_zdats-sign = 'I'.&lt;/P&gt;&lt;P&gt;    s_zdats-option = 'LT'.&lt;/P&gt;&lt;P&gt;    s_zdats-low = sy-datum.&lt;/P&gt;&lt;P&gt;    s_zdats-low = s_zdats-low - 30.&lt;/P&gt;&lt;P&gt;    APPEND s_zdats.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get data from History table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  SELECT * FROM zchm_history&lt;/P&gt;&lt;P&gt;          INTO TABLE gt_history&lt;/P&gt;&lt;P&gt;          WHERE lenum IN  s_lenum&lt;/P&gt;&lt;P&gt;            AND ztote IN  s_ztote&lt;/P&gt;&lt;P&gt;            AND zdats IN  s_zdats.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;open a new archive run to archive data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'ARCHIVE_OPEN_FOR_WRITE'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            call_delete_job_in_test_mode = p_test&lt;/P&gt;&lt;P&gt;            comments                     = p_coment&lt;/P&gt;&lt;P&gt;            create_archive_file          = p_create&lt;/P&gt;&lt;P&gt;            object                       = 'ZCHM_HIST'&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            archive_handle               = gv_handle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get Job Info&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'GET_JOB_RUNTIME_INFO'&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            jobcount        = lv_jobcount&lt;/P&gt;&lt;P&gt;            jobname         = lv_jobname&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            no_runtime_info = 1&lt;/P&gt;&lt;P&gt;            OTHERS          = 2.&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  Get Archive Key&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    SELECT * FROM admi_files&lt;/P&gt;&lt;P&gt;          INTO TABLE lt_file&lt;/P&gt;&lt;P&gt;          WHERE creat_date = sy-datum&lt;/P&gt;&lt;P&gt;            AND pathintern = 'ZCHM_HIST_ARCHIV'.&lt;/P&gt;&lt;P&gt;    IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      SORT lt_file BY creat_time DESCENDING.&lt;/P&gt;&lt;P&gt;      READ TABLE lt_file INDEX 1.&lt;/P&gt;&lt;P&gt;      MOVE lt_file-archiv_key TO lv_key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Lock Table ADMI_JOBS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CALL FUNCTION 'ENQUEUE_EZ_ADMI_JOBS'&lt;/P&gt;&lt;P&gt;           EXPORTING&lt;/P&gt;&lt;P&gt;                mode_admi_jobs = 'E'&lt;/P&gt;&lt;P&gt;                jobname        = lv_jobname&lt;/P&gt;&lt;P&gt;                jobcount       = lv_jobcount&lt;/P&gt;&lt;P&gt;           EXCEPTIONS&lt;/P&gt;&lt;P&gt;                foreign_lock   = 1&lt;/P&gt;&lt;P&gt;                system_failure = 2&lt;/P&gt;&lt;P&gt;                OTHERS         = 3.&lt;/P&gt;&lt;P&gt;      IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    Update Table ADMI_JOBS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      UPDATE admi_jobs SET archiv_key = lv_key&lt;/P&gt;&lt;P&gt;                       WHERE jobname  = lv_jobname&lt;/P&gt;&lt;P&gt;                         AND jobcount = lv_jobcount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;    UnLock Table ADMI_JOBS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      CALL FUNCTION 'DEQUEUE_EZ_ADMI_JOBS'&lt;/P&gt;&lt;P&gt;           EXPORTING&lt;/P&gt;&lt;P&gt;                mode_admi_jobs = 'E'&lt;/P&gt;&lt;P&gt;                jobname        = lv_jobname&lt;/P&gt;&lt;P&gt;                jobcount       = lv_jobcount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT gt_history.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;initializing a new data object&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CALL FUNCTION 'ARCHIVE_NEW_OBJECT'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              archive_handle = gv_handle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;putting data records into the data container&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CALL FUNCTION 'ARCHIVE_PUT_RECORD'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              archive_handle   = gv_handle&lt;/P&gt;&lt;P&gt;              record_structure = 'ZCHM_HISTORY'&lt;/P&gt;&lt;P&gt;              record_flags     = ' '&lt;/P&gt;&lt;P&gt;              record           = gt_history.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;writing data object into the archive file&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CALL FUNCTION 'ARCHIVE_SAVE_OBJECT'&lt;/P&gt;&lt;P&gt;         EXPORTING&lt;/P&gt;&lt;P&gt;              archive_handle = gv_handle.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;creating a statistic list&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'ARCHIVE_WRITE_STATISTICS'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            archive_handle = gv_handle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;closing the archive run&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'ARCHIVE_CLOSE_FILE'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            archive_handle = gv_handle.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " process_data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can someone tel whr the error is in this code. i have already spent lot of time on this perticular part by commenting certain area, uncommenting it and so on.... kindly help....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 04:08:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/archiving-table-data/m-p/5376032#M1236593</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T04:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: Archiving Table Data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/archiving-table-data/m-p/5376033#M1236594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;where's this FM in your code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ARCHIVE_OPEN_FOR_DELETE&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 05:34:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/archiving-table-data/m-p/5376033#M1236594</guid>
      <dc:creator>former_member222860</dc:creator>
      <dc:date>2009-03-25T05:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: Archiving Table Data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/archiving-table-data/m-p/5376034#M1236595</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 have managed to find a workaround for the same. But it is not gud enough... lemme explain the issue again...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we are upgrading from 4.6 to 6.0 in 4.6, we were doing archiving and deletion of data in the same program and it was working fine.... but in 6.0, we are not allowed to use archiving and deletion in the same program (see &lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/2a/fa043a493111d182b70000e829fbfe/frameset.htm)" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/2a/fa043a493111d182b70000e829fbfe/frameset.htm)&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest a way to use the two in the same program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 08:59:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/archiving-table-data/m-p/5376034#M1236595</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T08:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: Archiving Table Data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/archiving-table-data/m-p/5376035#M1236596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Prem,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Deletion of Ztables you need to use the following statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. ARCHIVE_GET_CUSTOMIZING_DATA.&lt;/P&gt;&lt;P&gt;2. ARCHIVE_OPEN_FOR_DELETE.&lt;/P&gt;&lt;P&gt;3. ARCHIVE_GET_NEXT_OBJECT&lt;/P&gt;&lt;P&gt;4. ARCHIVE_GET_NEXT_RECORD&lt;/P&gt;&lt;P&gt;5. ARCHIVE_WRITE_STATISTICS&lt;/P&gt;&lt;P&gt;6. ARCHVE_CLOSE_FILE&lt;/P&gt;&lt;P&gt;7. ARCHIVE_ADMIN_SET_STATUS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try these function modules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As advised by Archiving Experts, It is not fair to use both archving and deletion in the same program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards - Swarna.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2009 15:27:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/archiving-table-data/m-p/5376035#M1236596</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-25T15:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: Archiving Table Data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/archiving-table-data/m-p/5376036#M1236597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;working with the workaround...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2009 04:29:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/archiving-table-data/m-p/5376036#M1236597</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-15T04:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Archiving Table Data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/archiving-table-data/m-p/5376037#M1236598</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;This is for your information:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We must not create write and delete functionalities in a single program as we have to define the same with a custom archiving object in the transaction code AOBJ and also it will create a lot of inconsintencies in number of archived entries later.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the creation of custom write program, please follow the below function modules in sequence:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ARCHIVE_OPEN_FOR_WRITE:&lt;/P&gt;&lt;P&gt;This is the first function module that is called in the write program to create a new archive file. The parameter ARCHIVE_HANDLE gives us the handle to pass in write operations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ARCHIVE_NEW_OBJECT:&lt;/P&gt;&lt;P&gt;This function module should always be called when a new data object is to be prepared for writing to an archive. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ARCHIVE_PUT_RECORD:&lt;/P&gt;&lt;P&gt;This function module is used to pass a data record to the data object requested beforehand with the function module ARCHIVE_NEW_OBJECT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ARCHIVE_SAVE_OBJECT:&lt;/P&gt;&lt;P&gt;All data records you pass to the data object are written to the archive file together when you call this function module. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ARCHIVE_WRITE_STATISTICS :	&lt;/P&gt;&lt;P&gt;This function module is used in both the write and delete programs to write and display the statistics as the final output when the archive handle is passed an input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ARCHIVE_CLOSE_FILE:&lt;/P&gt;&lt;P&gt;This function module is used in both the write and delete programs to close the archiving session when the archive handle is passed in this as an input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And for delete program, please use the below FM in sequnce:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ARCHIVE_GET_CUSTOMIZING_DATA:&lt;/P&gt;&lt;P&gt;This functional module is used in the delete which reads the customizing data of an archiving object&lt;/P&gt;&lt;P&gt;ARCHIVE_OPEN_FOR_DELETE:&lt;/P&gt;&lt;P&gt;This function module opens the eDDAR storage system to delete their data in the database by providing us the archive handle and the selected archived files that we would compare and delete with the SAP data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ARCHIVE_GET_NEXT_OBJECT:&lt;/P&gt;&lt;P&gt;This function module reads the next data object for an archive handle from the eDDAR storage system which has been opened for reading. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ARCHIVE_DELETE_OBJECT_DATA:&lt;/P&gt;&lt;P&gt;The delete program must use this function module every time after calling the function ARCHIVE_GET_NEXT_OBJECT within the same loop for the same handle to delete the last data object that was read from the archive file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ARCHIVE_GET_NEXT_RECORD	This function module is used to read the data records of a data object for an archive handle sequentially. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ARCHIVE_WRITE_STATISTICS:&lt;/P&gt;&lt;P&gt;This function module is used in both the write and delete programs to write and display the statistics as the final output when the archive handle is passed an input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ARCHIVE_GIVE_STATISTICS:&lt;/P&gt;&lt;P&gt;This function module is used in delete programs for data archiving to transfer statistical data to the Archive Development Kit (ADK).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ARCHIVE_CLOSE_FILE:&lt;/P&gt;&lt;P&gt;This function module is used in both the write and delete programs to close the archiving session when the archive handle is passed in this as an input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will solve the issue.&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>Wed, 15 Apr 2009 10:56:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/archiving-table-data/m-p/5376037#M1236598</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-15T10:56:43Z</dc:date>
    </item>
  </channel>
</rss>

