“Image/data in this blog is from SAP internal system. Any resemblance to real data is purely coincidental.”
In this blog post I would like to suggest a solution/workaround to solve “expiration_date403 Forbidden” error during ILM Store phase (Report RSARCH_STORE_FILE).
First let’s see how to recreate error “expiration_date403 Forbidden” with shortening the retention period. Points 1-9 shows the steps. I used archiving/ILM object BC_SFLIGHT for the demonstration.
For solution/workaround please check point 10 and 11.
- Transaction IRM_POL:
Live policy with a rule where Min. Retention Period has value 90 days (Max. Retention Period 100 days).
- Archive file/resource created with above rule.
Transaction SARA -> Management:
- Check applied rule for archive file 000007-001BC_SFLIGHT in SARA.
Right mouse click on the archive file and use „Rules Applied”
(mind MinRetPer with value 90 days):
- Check created collection and resource in ILM Store Browser (transaction ILM_SB):
Mind that the condition field (Airline Carrier with value LH) AND Reference date (start_of_retention) with value 2020.01.14 is part of the collection URI:
Mind that the collection „/…/100/ad/bc_sflight/lh/20200114” and resource „/…/100/ad/bc_sflight/lh/20200114/000007/000007-001bc_sflight.adk” has same expiration date 2020.04.13.
- Shortening the Min. Retention Period from 90 to 85 in transaction IRMPOL:
- After rule was changed (retention period shortened in already used rule) launch new archiving, where the archived data object(s) has same condition field (in this case Airline Carrier with value LH) AND same reference date (start_of_retention) as previously archived data (archive file 000007-001BC_SFLIGHT).
As a result new archive file is created considering the shorter Min. Retention Period with value 85 days. Mind expiration date with value 2020.04.08.
- Check applied rule for new archive file 000008-001BC_SFLIGHT in SARA.
Right mouse click on the archive file and use „Rules Applied”
(mind the shorter MinRetPer with value 85 days):
- Store job of the new archive file 000008-001BC_SFLIGHT failed with error message
Cause of this error:
The archive file 000008-001BC_SFLIGHT has expiration date with value 2020.04.08 (due to shortened Min. Retention Period value 85 days in rule), which is shorter than expiration date of already existing parent collection „/…/100/ad/bc_sflight/lh/20200114/”, which is 2020.04.13.
- Check created collection in ILM Store Browser (transaction ILM_SB).
New collection „/…/100/ad/bc_sflight/lh/20200114/000008” has same expiration date as it’s parent collection „/…/100/ad/bc_sflight/lh/20200114/”, which is 2020.04.13.—-What can be done now to be able to archive data with shorter Min. Retention Period?Here the goal is to create new collection where the archived data with a shorter expiration date can be stored. As collection URI contains condition field(s) and reference date (start_of_retention), a new collection can be created by adding new condition field to the already existing one(s). For more info, see point 10.The steps depend on the status of archive file, e.g. the sequence of store and delete steps based on the customizing in Archive Administration.
Transaction SARA -> Enter Archiving Object -> Button „Customizing” -> Archiving Object-Specific Customizing: Technical Settings:
- Store Before Deleting: See point 10
- Delete Before Storing: See point 11
- „Store Before Deleting” scenario
Storage failed (with error „Cause:expiration_date403 Forbidden”) and delete can not be executed due to unsuccessful storage step. This means archived data is still in database and new archiving can be executed with same selection.
In IRMPOL create new live policy with new rule by adding a new condition field.
Mind the new condition field „Flight Number” after the already used condition field „Airline Carrier”.
Mind also the shorter Min. Retention Period with value 85.
Suggestion: change status of all other policies to „Not Live”:
Execute new archiving with previously used same selection critera (in this example used for archive session 000008). Result:
Mind the newly created collection URI „/…/100/ad/bc_sflight/lh/2402/20200114/” which contains the previously added condition field (Flight Number = 2402) as of point 10a.
Mind also the shorter expiration date 2020.04.08 based on the new policy with shorter Min. Retention Period with value 85 days.
Check newly created collection and resource in ILM Store Browser (transaction ILM_SB):
Mind that now two collections exist containing value 20200114, which refers to the reference date (start_of_retention). The first collection with value 20200114 was created with one condition field „Airline Carrier” (LH) and Min. Retention Period with value 90 days (as of point 1 and 4). the second collection with value 20200114 was created with two condition fields „Airline Carrier” (LH) and „Flight Number” (2402) and with a shorter Min. Retention Period with value 85 days.
Mind that content of resource 000008-001bc_sflight.adk and resource 000009-001bc_sflight.adk are the same, but 000008-001bc_sflight.adk could not be stored in ILM Store due to the error „Cause:expiration_date403 Forbidden” shown in point 8. Content can be compared in Archive File Browser (transaction AS_AFB).
Suggestion for session invalidation:
-if check has been done, that content of session 000008 and 000009 are the same
-if no completed archive file exists in previous (000008) session
In SARA transaction invalidate previous session 000008, which can not be stored due to error „Cause:expiration_date403 Forbidden”.
- „Delete Before Storing” scenario
As the archive data was deleted successfully, no new archiving with same selection can be executed (as it was done in point 10b).Transaction SARA:
Failed store job:a)
In IRMPOL create new live policy with new rule by adding a new condition field. For details check point 10a.
In SARA transaction execute ILM file conversion (or with report RSARCH_CONVERT_TO_ILM) for the session with storage error „Cause:expiration_date403 Forbidden”.
(mind the checkbox „Automatic Destruction of Replaced Files” in tr. SARA -> Customizing -> Archiving Object-Specific Customizing: Technical Settings)
Right mouse click on the session and choose „File Conversion”. Or execute report RSARCH_CONVERT_TO_ILM:
Converted archive file:
As a result new archive session with new archive file(s) will be created, and parallel new collection will be created considering the changes made in policy as of point 11a. For the new archive file (000011-001BC_SFLIGHT) execute delete and store steps as well.
Check result in Archive Administration (SARA) and in ILM Store Browser (ILM_SB).
Mind the difference between the new collection (which contains the new condition field as of point 11a)
versus the collection of the converted archive file (000010-001BC_SFLIGHT)
- —-Please bear in mind that within a policy maximum four condition fields can be used at once.
For more information please visit the SAP Online Help in this topic.SAP Online Help:”Note that when editing an ILM policy (IRMPOL) a maximum of four conditions can be included for each policy.”