第 204 页 / 共 273 页
Unit4: ArchivingFI AC202
For thecustomer and vendor accounts, specifyrun timesof 90 daysfor all the
companycodesand60daysfortheG/Laccounts. Theaccountsforpromotional
giftsarealwayscheckedbyauditors. Fortheseaccounts,specifyalongerruntime
(360 days) so that the associated documents are available online at the end of
the year.
Company code 0001 contains customer accounts whose accounts should be
availableforalongerperiodinthesystem. Specifyaruntimeof180daysforthe
associated reconciliation account 140100.
Youcanspecifytheminimumruntimein daysdependingonthedocument
typeinCustomizing. Whendocumentsarearchived,acheckismadewhetherthis
minimum run time has been maintained.
Inaddition,youcanspecifythearchiveindexruntimesfordocumenttypes. The
archiveindicesprovidetheconnectionbetweentheFinancialAccountingdataand
thearchives. Aslongasthesedocument-orientedarchiveindicesarestillknown
tothesystem,thedocumentcanstillbedisplayedfromthearchive,forexample.
Thisfunctionalsoappliestodisplayinglineitemsfromthearchive.
Ifthere isno entryor ifarun timevalueisempty, thesystemusesa minimum
run time of 9999 days.
Figure 84: Customizing: Document Run Time
190
©2009SAPAG.Allrightsreserved. 2009
第 205 页 / 共 273 页
AC202 Lesson: Preparatory Activities – System Settings
Thedatarelevantforspecifyingthedocumentruntimearethepostingdate(the
clearingdate in the caseof open item-managed accounts) andthe keydate for
thearchivingprocedure. Thecorrespondinglylongerdefinitionof theruntime
(documenttypes/accounttypes)determineshowlongthedocumentresidesinthe
system.
Example for document type run time:
Specify a general document type run time of 30 days for all company codes.
Thevendorinvoices(documenttypeKR)forcompanycode0001aretoremain
availableinthesystemforalongertime,namely90days. Thedocumentsforthe
closingentriesforallcompanycodesaretoremainavailableforatleast120days.
Executethesepostingswithyourowndocumenttype(ABforclosingentries).
Thetableforthedocumenttyperuntimewouldlooklikethis:
Company code Document type Run time (in days)
* * 30
0001 KR 90
* SB 120
191
2009 © 2009 SAP AG. All rights reserved.
| Company code | Document type | Run time (in days) |
|---|---|---|
| * | * | 30 |
| 0001 | KR | 90 |
| * | SB | 120 |
第 206 页 / 共 273 页
Unit4: ArchivingFI AC202
192
©2009SAPAG.Allrightsreserved. 2009
第 207 页 / 共 273 页
AC202 Lesson: Preparatory Activities – System Settings
Exercise 12: Archiving – Basis
Customizing / FI-Specific Customizing –
OPTIONAL
Exercise Objectives
After completingthisexercise, youwillbeableto:
• Displaythebasissettingsforthearchivingareainthesystem
Business Example
BasisSupporthasexecutedthebasicsettingsfordataarchiving. Theresponsible
FinancialAccountingemployeewouldliketogainanoverviewofthesettings.
Task 1:
PutyourknowledgeofArchivingObjectsinFinancialAccountingintopractice
anddeterminewhichdatabasetablesbelongtothecorrespondingobjects.
1. DisplaytheFIarchivingobjectsbychoosingSAPEasyAccess→Tools→
CCMS→DB Administration→DataArchiving.
2. DisplaythedatabasetablesforFIarchivingobjectsusingSAPEasyAccess
→Tools→CCMS→DBAdministration→DataArchiving.
Task 2:
Provide yourself with a rough overview of the settings specified by Basis
administrators in the area of Basis Customizing within the framework of
archiving.
1. In Basis Customizing, ensure that a logical path exists as a global
path for data archiving, note its name and assign the physical path
<P=DIR_GLOBAL>\<FILENAME>toit(fortheWindowsNToperating
system;useacorrespondingpathnameifyourSAPsystemisnotrunningon
a Windows NT computer).
2. In Basis Customizing, ensure that the physical file name
R<PARAM_1>_<MONTH>_<DAY>_<PARAM_2>.<TIME>.<F=EXAM-
PLE>andthelogicalpathARCHIVE_GLOBAL_PATHareassignedtothe
logical filename ARCHIVE_DATA_FILE.
Continued on next page
193
2009 © 2009 SAP AG. All rights reserved.
第 208 页 / 共 273 页
Unit4: ArchivingFI AC202
Task 3:
Provide yourself with a rough overview of the settings specified by Basis
administrators in the area of cross-archiving object Customizing within the
framework of archiving. Then display the archiving object-specific Basis
Customizingfor archiving object FI_DOCUMNT.
1. Display cross-archiving object Customizing by choosing IMG: SAP
NetWeaver → Application Server → System administration → Data
Archiving
2. Display archiving object-specific Customizingby choosing IMG: SAP
NetWeaver → Application Server → System administration → Data
Archiving
Task 4:
Execute the Customizing settings for archiving documents in Financial
Accounting or check the current settings.
1. Determine the basic settings for archiving accounting documents
(FI_DOCUMNT) with IMG: Financial Accounting (New)→ Financial
Accounting Global Settings (New) → Tools → Archiving → Accounting
Document Archiving.
2. Displaythesettingsfortheaccounttypelifeinthesystem.
3. Displaythesettingsforthedocumenttypelifeinthesystem.
194
©2009SAPAG.Allrightsreserved. 2009
第 209 页 / 共 273 页
AC202 Lesson: Preparatory Activities – System Settings
Solution 12: Archiving – Basis
Customizing / FI-Specific Customizing –
OPTIONAL
Task 1:
PutyourknowledgeofArchivingObjectsinFinancialAccountingintopractice
anddeterminewhichdatabasetablesbelongtothecorrespondingobjects.
1. DisplaytheFIarchivingobjectsbychoosingSAPEasyAccess→Tools→
CCMS→DB Administration→DataArchiving.
a) Select the menu path SAP Easy Access → Tools → CCMS → DB
Administration→DataArchiving(DB15transaction).
SettheswitchforTablesfromwhichDatacanbeArchived
IntheTablesinObjectfield, enterFI*andthenchoosesearchhelp
(F4).
→All archiving objectsare displayed
2. DisplaythedatabasetablesforFIarchivingobjectsusingSAPEasyAccess
→Tools→CCMS→DBAdministration→DataArchiving.
a) SelectSAPEasyAccess→Tools→CCMS→DBAdministration→
DataArchiving(DB15transaction)andenterFI_DOCUMNTinthe
TablesforObjectfield(orselecttheobjectusingtheF4searchhelp).
Set theswitch forTableswith Deletion.
Select Enter.
→The correspondingtablesaredisplayed.
Continued on next page
195
2009 © 2009 SAP AG. All rights reserved.
第 210 页 / 共 273 页
Unit4: ArchivingFI AC202
Task 2:
Provide yourself with a rough overview of the settings specified by Basis
administrators in the area of Basis Customizing within the framework of
archiving.
1. In Basis Customizing, ensure that a logical path exists as a global
path for data archiving, note its name and assign the physical path
<P=DIR_GLOBAL>\<FILENAME>toit(fortheWindowsNToperating
system;useacorrespondingpathnameifyourSAPsystemisnotrunningon
a Windows NT computer).
a) SelectthetransactionArchiveAdministration(SARAtransaction,menu
path: Tools→Administration→Administration→DataArchiving)
andselectCustomizing. Onthenextscreen,selectthelineCross-Client
FileNames/PathsintheBasisCustomizing: areaandchooseExecute
totheleftoftheline. Confirmthefollowingscreen.
This opens the FILE transaction. Double-click Logical File Path
Definition on the left side of the Change View "Logical File Path
Definition": Overviewscreen. Thencheckwhetheranentrywiththe
name Global path for archiving exists on theright side.
ThisshouldincludethelogicalfilepathARCHIVE_GLOBAL_PATH.
Mark this line and, in the tree structure on the left, select the path
LogicalFilePathDefinition→AssignmentofPhysicalPathtoLogical
Path by double-clicking onAssignment ofPhysical Path toLogical
Path. Then, on the right side, double-click the entry WINDOWS
NT and ensure (if necessary, by modifying the entry) that the entry
<P=DIR_GLOBAL>\<FILENAME>islocatedinfieldphys. path.
Do not exit the FILE transaction!
2. In Basis Customizing, ensure that the physical file name
R<PARAM_1>_<MONTH>_<DAY>_<PARAM_2>.<TIME>.<F=EXAM-
PLE>andthelogicalpathARCHIVE_GLOBAL_PATHareassignedtothe
logical filename ARCHIVE_DATA_FILE.
a) On the left side of the FILE transaction, double-click on the
folder Logical File Name Definition, Cross-Client. Then, in
the table on the right of the screen, double-click the entry
ARCHIVE_DATA_FILE.Inthenextscreen,checkthatthephysicalfile
R<PARAM_1>_<MONTH>_<DAY>_<PARAM_2>.<TIME>.<F=EX-
AMPLE>andthelogicalpathARCHIVE_GLOBAL_PATHareassigned
to the logical file ARCHIVE_DATA_FILE; if not, make the
appropriateentries. Youcanviewanexplanationoftheparametersthat
areusedbyactivatingtheF1helpforthephys. fileentryfield.
Continued on next page
196
©2009SAPAG.Allrightsreserved. 2009
第 211 页 / 共 273 页
AC202 Lesson: Preparatory Activities – System Settings
Task 3:
Provide yourself with a rough overview of the settings specified by Basis
administrators in the area of cross-archiving object Customizing within the
framework of archiving. Then display the archiving object-specific Basis
Customizingfor archivingobject FI_DOCUMNT.
1. Display cross-archiving object Customizing by choosing IMG: SAP
NetWeaver → Application Server → System administration → Data
Archiving
a) Choose IMG: SAP NetWeaver → Application Server → System
administration → Data Archiving → Cross-Archiving Object
Customizing.
2. Display archiving object-specific Customizingby choosing IMG: SAP
NetWeaver → Application Server → System administration → Data
Archiving
a) Choose IMG: SAP NetWeaver → Application Server → System
administration → Data Archiving → Archiving Object-Specific
Customizing(youcanalsofindthesesettingsusingtransactionSARA
- object name: FI_DOCUMNT (Customizing button –> Archiving
Object-Specific Customizing)).
SelectobjectFI_DOCUMNTbydouble-clickingit.
Continued on next page
197
2009 © 2009 SAP AG. All rights reserved.
第 212 页 / 共 273 页
Unit4: ArchivingFI AC202
Task 4:
Execute the Customizing settings for archiving documents in Financial
Accounting or check the current settings.
1. Determine the basic settings for archiving accounting documents
(FI_DOCUMNT) with IMG: Financial Accounting (New)→ Financial
Accounting Global Settings (New) → Tools → Archiving → Accounting
Document Archiving.
a) ChooseIMG:FinancialAccounting(New)→FinancialAccounting
BasicSettings(New)→Tools→Archiving→AccountingDocument
Archiving
(YoucanalsofindthesesettingsusingtheSARAtransaction–object
name: FI_DOCUMNT(Customizingbutton–>Application-Specific
Customizing))
Youcandeleteandarchivedocumentsthatyounolongerrequireinthe
onlinesystem. Inthefollowingsteps,specifytheminimumnumberof
daysthat an accountingdocument andthecorresponding secondary
indicesshouldresideinthesystembeforetheycanbearchived. You
canspecifythisdependingonthedocumenttypeandtheaccounttype.
2. Displaythesettingsfortheaccounttypelifeinthesystem.
a) ChooseIMG:FinancialAccounting(New)→FinancialAccounting
BasicSettings(New)→Tools→Archiving→AccountingDocument
Archiving →Archiving, AccountTypeLife.
3. Displaythesettingsforthedocumenttypelifeinthesystem.
a) ChooseIMG:FinancialAccounting(New)→FinancialAccounting
BasicSettings(New)→Tools→Archiving→AccountingDocument
Archiving→Archiving, Document TypeLife.
198
©2009SAPAG.Allrightsreserved. 2009
第 213 页 / 共 273 页
AC202 Lesson: Preparatory Activities – System Settings
Lesson Summary
You should now be able to:
• DescribethebasicconfigurationofFinancialAccountingarchivingfunctions
• Perform/CheckbasicCustomizingofFinancialAccountingarchiving.
199
2009 © 2009 SAP AG. All rights reserved.
第 214 页 / 共 273 页
Unit4: ArchivingFI AC202
Lesson: Executing Archiving in Financial Accounting
Using Examples
Lesson Overview
ThislessonusesconcreteexamplestodescribearchivinginFinancialAccounting.
Lesson Objectives
After completingthislesson, you will beable to:
• CarryoutarchivingforcertainobjectsinFinancialAccounting
Business Example
AftervalueshavebeendefinedinCustomizing,FinancialAccountingarchiving
can be performed in companies on a regular basis in consultation with the
department.
Generally, thedocumentsarearchivedfirst(duetothechecksexecutedduring
archiving). If these are removed from the system, the transaction figures are
archived, followed by the master data. However, you can also archive only
documentsover the long term, for example.
Archiving Procedure
Thespecificarchivingprocedureisscheduledandprocessedasabackgroundjob.
Itselectsthedataobjectsfromthedatabase. Theconstraintsthatcharacterizea
dataobjectareconsideredhere. Theneverydataobjectischeckedwhetheritmay
bearchived. Ifso,thedataobjectiswrittentothearchivefile. IfCustomizingis
setsothatthatthedeletionprogramistorunautomatically,theassociateddeletion
procedureisstartedautomaticallywhenafileisclosed.
Thedeletionprocedurecanbescheduledseparatelyifthedeletionprogramisnot
executedautomaticallybythesettingsinarchivingobject-specificCustomizing.
Inthiscase,thearchivefilesfromwhichthedataobjectscanbereadinthecurrent
deletionprocedureandthendeletedinthedatabasemustbeselected.
An archiving procedure is scheduled using transaction SARA by pressing the
Writepushbutton. This is divided into 4 steps:
• Create an archiving variant
• Specify the execution user
• Specify the start time
• Define the spool parameters
200
©2009SAPAG.Allrightsreserved. 2009
第 215 页 / 共 273 页
AC202 Lesson: ExecutingArchivinginFinancialAccountingUsingExamples
Thedatathataretobearchivedfortheselectedarchivingobjectarespecifiedin
the archiving variants. Asarule, archivingvariantscanbereusedonlyif the
associatedjobsaredeleted. Thedefinitionofthevariantmustalsoincludewhether
a test run or a productive run is involved.
The user under which the archiving program is started requires at least one
suitableauthorization for theauthorization object. S_ARCHIVE. S_ARCHIVE
is the most important authorization object for data archiving. The archiving
objectstobeusedcanbelimitedbyselectingthecorrespondingfieldentriesfor
this authorization object. In addition, the corresponding authorizations of the
transactionwhosedataaretobearchivedarerequired. Sincedataarchivingruns
inthebackground, authorizationsforbackground processing (archivingobject
S_BTCH_JOB) are also required.
Thestarttimesforarchivingjobsthataretobespecifiedcorrespondtothoseof
the scheduling of standard jobs.
Since job logs can become larger, it is a good idea to set that logs not be
immediately sent to the output device under theSpool parameter item . The
selection options here correspond to those of the default backgound printing
parameters.
Financial Accounting - Objects and Programs
Thefollowingtableprovidesanoverviewofthearchivingobjectsandprograms
used in Financial Accounting.
Figure 85: Archiving: FI Objects and Programs
In FI, you can archive master records, documents and transaction figures, for
example. Youcanmakethearchiveddataavailableagainusingretrievalprograms.
Duringeveryarchivingprocedure,thesystemgeneratesadministrationdatawith
informationabout the archived/regenerated data. If you enter transaction code
201
2009 © 2009 SAP AG. All rights reserved.
第 216 页 / 共 273 页
Unit4: ArchivingFI AC202
AOBJ,youobtainanoverviewoftheobjectsrelevantforarchiving. Byentering
thistransactioncode,youcanseethearchivedordeletedtablesforeacharchiving
object. Example: Based on archiving object FI_DOCUMNT, tables BSAD,
BSAK,BSASandBSISwereonlydeleted, notarchived.
Monitoring an Archiving Procedure
Varioussystemadministrationtoolsareavailabletomonitorarchivingprocedures:
• Background processing tools
– Job logs
– Spool lists (if generated)
• System monitoring tools
– MonitorfordataarchivingintheCCMSmonitorsets
Alogisgeneratedduringanarchivingprocedure. Iftheapplicationgeneratesa
specificlog, thislogisused; otherwise,thedefaultlogisused. Thedefaultlog
containsthenumberofarchiveddataobjects,theaffectedtables, thenumberof
processedtableentriesandthefilesizes. Inapplication-specificlogs,thearchiving
contentscanbedefineddowntothedocument level.
Note: Archiving logs are deleted due to the regular cleaning of spool
jobs;therefore,youmustconsiderwheretheselogsaretobestored. For
example,logscanbesavedtoanexternalstoragesystem.
The sequence of an archiving procedure can also be traced by monitoring
backgroundworkprocessesusingtheSimplejobselectiontransaction(transaction
codeSM37). PresstheJoboverviewpushbuttontojumpfromtheinitialscreen
of the SARA transaction directly to the SM37 transaction. If you press the
Administrationpushbutton(afteryouhavemaintainedasuitablearchivingobject
intheinitialscreenoftheSARAtransaction),youcandisplayashortlogfileof
thearchivingprocedurefromtheSARAtransaction.
Archiving Documents
IfdocumentsarenolongerrequiredinAccountingafteracertaintimehaselapsed,
youcanremovethemfromthedatabase. Certainconditionsarerequiredforthis;
thesearecheckedbythesystem. ArchivingisexecutedbyBasisSupportandFI
SystemSupportinconsultationwiththedepartment.
202
©2009SAPAG.Allrightsreserved. 2009
第 217 页 / 共 273 页
AC202 Lesson: ExecutingArchivinginFinancialAccountingUsingExamples
Figure 86: Financial Accounting - Documents
The desired document type and account type run times are specified for each
companycodeinCustomizing. Forexplanations,seethepreviouslesson.
Toensurethatonlydocumentsthatarenolongerrequiredarearchivedfromthe
system,anumberofconditionsmustbefulfilled. Thearchivingprogramchecks
thearchivabilityforthedocumentheaderanddocumentpositionlevels. Ifoneof
therequirementsforadocumentisnotfulfilledinthechecks,theentiredocument
is not archived.
Thedocumentheadermustfulfillthefollowingcriteriabeforeitcanbearchived:
• Thedocumenttyperuntimemusthavebeenexceeded.
• Thedocumentmusthavebeeninthesystemforlongerthantheminimum
number of days (minimum duration).
• Documentwithawithholdingtaxremaininthesystemforatleast455days.
• Recurring,parkedorsampledocumentsarenottakenintoaccount.
Thedocumentpositionmustfulfillthefollowingcriteriabeforeitcanbearchived:
• The documentmust nolonger contain openitems. Thesystemtakesinto
accountonlycleareditemsorthosewithoutopenitemmanagement.
• Theaccounttyperuntimemusthavebeenexceeded.
Fortheruntimes,akeydateisusedasareferencedate;thiscanbespecifiedfor
every program run. If no explicit key data is provided, it is set to the current
execution date.
203
2009 © 2009 SAP AG. All rights reserved.
第 218 页 / 共 273 页
Unit4: ArchivingFI AC202
Access to Archived Data
Themostimportantrequirementforarchivinguserdataisthatthesedatabelong
to completed transactions/periods and are thus no longer required for current
businessprocesses. However,itmayhappenthatthesedataneedtobeaccessed
even after archiving, such as in the case of a complaint, for evaluations or for
internal or external revisions.
TheArchiveDevelopmentKit(ADK)storesthedatainsuchamannerthatread
accessispossibleatanytime. Arequirementforthisistheexistenceofsuitable
readingprogramsthatareprovidedbythecorrespondingarchivingobject. They
areusedtoreadthearchiveddataobjectsaccordingtotheselectioncriteriaand
to display them in a form suitable for the user. FI provides very user-friendly
accessto previouslyarchiveddata. Theuser isaskedwhether healso wantsto
view the archived data. If so, the display is as user-friendly as access to data
located in the system.
Intheprocessingoptions,itispossibletospecifythesearchstrategytoindividual
documentsearchessothat they canbedisplayed.
Withthearchivesearchstrategy,youcancontrolhowthesearchforthedesired
datainthearchiveisto be executed. Variousmethodscompetetoincrease the
search speed and hit accuracy.
Archiving Transaction Figures
A transaction figureis the total number of postingsonanaccount indebit or
credit. IntheSAPsystem,onetransactionfigureisusuallymaintainedforcredit
andonefordebitforeachaccount. Thefinancialstatementofthecompanycodeis
created according to thesetransaction figures.
204
©2009SAPAG.Allrightsreserved. 2009
第 219 页 / 共 273 页
AC202 Lesson: ExecutingArchivinginFinancialAccountingUsingExamples
Figure 87: Portraying transaction figures / balances
Transactionfiguresgenerallyremainintherunningsystemfor at least2years.
Thedepartmentmustdecidehowlongthedataaretoremainaccessibleonline.
Dataarchivingin Financial Accounting ispresented hereusingtheexampleof
transaction figures.
Transactionfigurescanbearchivedonlyifperiodsopenforpostingarenolonger
intheperiodtobearchived. Theperiodsforpostingmustbeclosedfortheentire
period to be archived.
Archiving Financial Accounting Master Data
G/L accounts, customers, vendors and bank data can be archived in Financial
Accountingifthedepartmentagreesandthelegalrequirementshavebeenfulfilled.
Ifamasterrecordisnolongerrequiredforpostingsbythedepartment,aposting
blockisusuallysetasafirststep. Ifthismasterrecordisnotrequiredforalong
time,thedeletionflagisset. Thedeletionflagshowsauserwhoisprocessingthe
masterrecordthatthismasterrecordhasbeenflaggedfordeletion.
Thedeletionflagisoneoftherequirementsthatarecheckedbythesystembefore
master data are archived. This ensures that the department has no objections
againstarchivingthemasterdata. Therefore,itshouldbecarefullycheckedwhich
employeescanreceivetheauthorizationfor settingdeletionflagswhenissuing
these authorizations.
205
2009 © 2009 SAP AG. All rights reserved.
第 220 页 / 共 273 页
Unit4: ArchivingFI AC202
Figure88: Flow/inspectionlogicwhenarchivingmasterdata
206
©2009SAPAG.Allrightsreserved. 2009
第 221 页 / 共 273 页
AC202 Lesson: ExecutingArchivinginFinancialAccountingUsingExamples
Exercise 13: Archiving Documents
Exercise Objectives
After completingthisexercise, youwillbeableto:
• Archivedocuments inFinancial Accounting.
Business Example
IfdocumentsarenolongerrequiredinAccountingafteracertaintimehaselapsed,
youcanremovethemfromthedatabase. Certainconditionsarerequiredforthis;
thesearecheckedbythesystem. ArchivingisexecutedbyBasisSupportandFI
SystemSupportinconsultationwith thedepartment.
Task 1:
First execute the preparatorystepstoarchivedocuments. Thesearearchiving
object-specificCustomizingandapplication-specificCustomizing.
1. Execute archiving object-specific Customizing for the FI_DOCUMNT
archiving object.
Inarchivingobject-specificCustomizingfortheFI_DOCUMNTarchiving
object, define one variant each for the deletion program (test mode /
productivemode,withthenameTEST_##orPROD_##,where##isyour
groupnumber)andmaintaintheprocessingoptionsforthesevariants. Then
maintaintheattributesofthevariantsandsavethevariants. Makesurethat
the delete jobhasbeenscheduled. Also ensure that thelogical filename
ARCHIVE_DATA_FILEisassignedtoobjectnameFI_DOCUMNT.
2. Executeapplication-specificCustomizingfortheFI_DOCUMNTarchiving
object.
Continued on next page
207
2009 © 2009 SAP AG. All rights reserved.
第 222 页 / 共 273 页
Unit4: ArchivingFI AC202
Task 2:
In account 1112## of your company code AC##, you will find a Financial
Accountingdocumentforthecurrentfiscalyear;thisdocumentistobearchived
asanexample. Firstdeterminethedocument'snumber.
Fortestingpurposes,executeatestruntoarchiveyourdocument.
Evaluatethespool list and examine thejob log.
Archivethegivendocumentusingthewritingprogram(productiverun).
Checkwhetheryoucandisplaythedocumentusingtheapplication(FB03).
1. Inaccount1112##ofyourcompanycodeAC##,youwillfindaFIdocument
for thecurrent fiscalyear; thisdocumentistobearchivedasanexample.
Firstdeterminethedocument'snumberusingthelineitemreport.
2. Fortestingpurposes,executeatestruntoarchiveyourdocument.
Createavariantforthewriteprogram(archivingobject: FI_DOCUMNT).
Name the variant Write_B_T## (## = your group number). Maintain
thesequentialcontrol of thevariant insuchamanner thatArchiving with
Deletionisexecuted. Thenschedulethewriteprogram(withastartdateof
Immediate) andthepredefinedspool parameters.
3. Evaluatethespoollistand examinethejoblog.
4. Archivethegivendocumentusingthewritingprogram(productiverun).
Nowexecutethewritingprogramagain, thistimeinaproductiverunand
withthegenerationofadetaillog. Checkthespoollistandthejoblog.
Todo this, create anewvariant Write_B_P##.
5. Checkwhetheryoucandisplaythedocumentusingtheapplication(FB03).
208
©2009SAPAG.Allrightsreserved. 2009
第 223 页 / 共 273 页
AC202 Lesson: ExecutingArchivinginFinancialAccountingUsingExamples
Solution 13: Archiving Documents
Task 1:
First execute the preparatorystepstoarchivedocuments. Thesearearchiving
object-specificCustomizingandapplication-specificCustomizing.
1. Execute archiving object-specific Customizing for the FI_DOCUMNT
archiving object.
Inarchivingobject-specificCustomizingfortheFI_DOCUMNTarchiving
object, define one variant each for the deletion program (test mode /
productivemode,withthenameTEST_##orPROD_##,where##isyour
groupnumber)andmaintaintheprocessingoptionsforthesevariants. Then
Continued on next page
209
2009 © 2009 SAP AG. All rights reserved.
第 224 页 / 共 273 页
Unit4: ArchivingFI AC202
maintaintheattributesofthevariantsandsavethevariants. Makesurethat
the delete job has been scheduled. Also ensure that thelogical filename
ARCHIVE_DATA_FILEisassignedtoobjectnameFI_DOCUMNT.
a) ChooseSAPEasyAccess→Accounting→FinancialAccounting→
GeneralLedger→PeriodicProcessing→Archiving→Documents.
ThedefaultobjectnameisFI_DOCUMNT.Alternatively,youcanuse
theSARAtransaction(FI_DOCUMNT entry).
Press the Customizing pushbutton. On the next screen, choose the
TechnicalSettingslineintheArchivingObject-SpecificCustomizing:
area and choose Execute to the left of the line. Ensure that value
ARCHIVE_DATA_FILEisintheLogicalFileNameentryfield. Also
ensurethat theStart Automaticallybuttonin the DeleteJobsareais
marked.
EnterTEST_B_## in the Test modevariantfield (## isyour group
number),selecttheVariantpushbuttonforthisentrylineandconfirm
the following display with Continue after you have set the “for All
Selection Screens”. On the next screen, select the Test Run radio
button. Choosethecompletedetaillog. Thelogshouldbeoutputasa
listandanapplicationlog. ChoosetheAttributespushbutton. Inthe
followingscreen,enterameaningfulshortdescriptionofyourvariant
in the Meaning field and select Save.
Choose Back (green arrow) to go back to the “Change View
"CustomizingViewforArchiving": Detail”screen.
EnterPROD_B_##intheProductionModeVariantfield(##isyour
groupnumber) and select theVariantpushbuttonfor this entryline.
Onthefollowingscreen(seethetitlebar)MaintainVariant: Report
FI_DOCUMENT_DEL,VariantPROD_B_##chooseCompleteforthe
DetailLog(TestModeshouldnotbeselectedsinceitisaproduction
run) and choose theAttributes pushbutton.In the following screen,
enter ameaningful short descriptionof your variant intheMeaning
field and select Save.
ThenpressBack(greenarrow)tojumpbacktotheCustomizingData
Archiving pop-up menu.
Youhavenowmaintainedthearchivingobject-specificCustomizing
settings. You can now execute application-specific Customizing
directly from here.
Continued on next page
210
©2009SAPAG.Allrightsreserved. 2009
第 225 页 / 共 273 页
AC202 Lesson: ExecutingArchivinginFinancialAccountingUsingExamples
2. Executeapplication-specificCustomizingfortheFI_DOCUMNTarchiving
object.
a) Execute application-specific Customizing for the FI_DOCUMNT
archiving object as follows.
In the Customizing Data Archiving popup, select the lineMaintain
account type life in the Application-SpecificCustomizing: area and
choose Execute to the left of the line.
ChoosetheNewentriespushbuttonandcreateanewentryfor your
company codewith thefollowing values:
Company code AC##
Account type S
From acct 1
To acct 999999
Life 5
SecondaryIdxRunTime 5
Save your entries.
Choose Back until you return to the Customizing Data Archiving
popup menu.
In the Customizing Data Archiving popup, select the lineMaintain
documenttypelifeintheApplication-SpecificCustomizing: areaand
choose Execute to the left of the line.
ChoosetheNewentriespushbuttonandcreateanewentryfor your
company codewith thefollowing values:
Company code AC##
Account type SA
Life 5
Save your entries.
ChooseBackuntilyoureturntothe“ArchiveAdministration”initial
screen.
You have now maintained the application-specific Customizing
settings.
Continued on next page
211
2009 © 2009 SAP AG. All rights reserved.
| Company code | AC## |
|---|---|
| Account type | S |
| From acct | 1 |
| To acct | 999999 |
| Life | 5 |
| SecondaryIdxRunTime | 5 |
| Company code | AC## |
|---|---|
| Account type | SA |
| Life | 5 |
第 226 页 / 共 273 页
Unit4: ArchivingFI AC202
Task 2:
In account 1112## of your company code AC##, you will find a Financial
Accountingdocumentforthecurrentfiscalyear;thisdocumentistobearchived
asanexample. Firstdeterminethedocument'snumber.
Fortestingpurposes,executeatestruntoarchiveyourdocument.
Evaluatethespool list and examine thejob log.
Archivethegivendocumentusingthewritingprogram(productiverun).
Checkwhetheryoucandisplaythedocumentusingtheapplication(FB03).
1. Inaccount1112##ofyourcompanycodeAC##,youwillfindaFIdocument
for thecurrent fiscalyear; thisdocumentistobearchivedasanexample.
Firstdeterminethedocument'snumberusingthelineitemreport.
a) Choose SAP Easy Access → Accounting → Financial Accounting
→GeneralLedger→Account→Display/ChangeLineItems(New)
and enter the following values:
G/L account 1112##
Company code AC##
All items X
Ledger 0L
Choose Execute.
Nowdeterminethedocumentnumber,thepostingperiodandthefiscal
year of the FI document.
2. Fortestingpurposes,executeatestruntoarchiveyourdocument.
Createavariantforthewriteprogram(archivingobject: FI_DOCUMNT).
Name the variant Write_B_T## (## = your group number). Maintain
thesequentialcontrol of thevariant insuchamanner thatArchiving with
Deletionisexecuted. Thenschedulethewriteprogram(withastartdateof
Immediate) andthepredefinedspool parameters.
a) ChooseSAPEasyAccess→Accounting→FinancialAccounting→
GeneralLedger→PeriodicProcessing→Archiving→Documents.
The FI_DOCUMNT object name is preassigned in the archive
adminstration initial screen. Press the Write pushbutton. In the
followingscreen,enterthevalueWrite_B_T##intheVariantfield
(##isyourgroupnumber)andselecttheMaintainpushbutton. Confirm
the following screen with Continue. On the subsequent Maintain
Variant: ReportFI_DOCUMENT_WRI,VariantWrite_B_T##screen,
enterthefollowingvaluesintheArchivingquantityselectionarea:
Continued on next page
212
©2009SAPAG.Allrightsreserved. 2009
| G/L account | 1112## |
|---|---|
| Company code | AC## |
| All items | X |
| Ledger | 0L |
第 227 页 / 共 273 页
AC202 Lesson: ExecutingArchivinginFinancialAccountingUsingExamples
Company codes AC##
Documentnumbers The document number
that you determined
Fiscal year/period The fiscal year/period
that you determined
Document type SA
Minimum number of days in 0
system
Key date Current date
MarkthefollowingareasintheProgramcontrolarea:
Test mode X
Detail log complete
Log output List and application
logs
Whenthequery“Functionlossthrougharchiving?”appears,choose
the Archive pushbutton.
Then select Attributes. Enter a meaningful short description in the
Meaning field and choose Save. You then go back to the overview
screen for variant maintenance.
ChooseBack(greenarrow). OntheArchiveAdministration: Create
ArchiveFilesinitialscreen,choosetheStartDatepushbutton. Onthe
followingscreen,selectImmediateandthenSave(diskettepushbutton).
NowconfirmthespoolparametersbyselectingtheSpoolparameters
pushbutton,enteringLP01astheoutputdeviceonthefollowingscreen
and then selecting Continue.
Finally,chooseExecuteontheinitialscreen(ArchiveAdministration:
Create Archive Files); the system issues the following feedback in
the status bar:
New archive job scheduled.
Continued on next page
213
2009 © 2009 SAP AG. All rights reserved.
| Company codes | AC## |
|---|---|
| Documentnumbers | The document number that you determined |
| Fiscal year/period | The fiscal year/period that you determined |
| Document type | SA |
| Minimum number of days in system | 0 |
| Key date | Current date |
| Test mode | X |
|---|---|
| Detail log | complete |
| Log output | List and application logs |
第 228 页 / 共 273 页
Unit4: ArchivingFI AC202
3. Evaluatethespoollistand examinethejoblog.
a) OntheinitialscreenofArchiveAdministration,theArchivingObject
fieldhasbeenpreassignedthevalue FI_DOCUMNT.Here, selectJob
overview(JOBsymbolintheapplicationtoolbar). Thesystemdisplays
anoverviewofthearchivingjobsthatyouhavescheduled. Markthe
linewithjobARV_FI_DOCUMNT_WRI<timestamp>andselectShow
Spool List. In thenext screen, mark the line with the spool list and
selectDisplay content (glassessymbol).
(Ifnecessary, youcanincreasethenumberofpagesshownusingthe
Settings pushbutton.)
4. Archivethegivendocumentusingthewritingprogram(productiverun).
Nowexecutethewritingprogramagain, thistimeinaproductiverunand
withthegenerationofadetaillog. Checkthespoollistandthejoblog.
Continued on next page
214
©2009SAPAG.Allrightsreserved. 2009
第 229 页 / 共 273 页
AC202 Lesson: ExecutingArchivinginFinancialAccountingUsingExamples
To do this, create anewvariant Write_B_P##.
a) Press theWrite pushbutton. Inthefollowing screen, enter thevalue
Write_S_P## in the Variant field (## is your group number)
and select the Maintain pushbutton. Confirm the following screen
with Continue. On the subsequent Maintain Variant: Report
FI_DOCUMENTS_WIR, Variant Write_S_P## screen, enter the
followingvaluesintheArchivingquantityselectionarea:
Company codes AC##
Documentnumbers The document number
that you determined
Document type SA
Fiscal year/period The fiscal year/period
that you determined
Minimum number of days in 0
system
Key date Current date
MarkthefollowingareasintheProgramcontrolarea:
Production mode Check
Deletewithtestvariant Do not select
Detail log X
Then select Attributes. Enter a meaningful short description in the
Meaning field and choose Save. You then go back to the overview
screen for variant maintenance.
ChooseBack(greenarrow). OntheArchiveAdministration: Create
ArchiveFilesinitialscreen,choosetheStartDatepushbutton. Onthe
followingscreen,selectImmediateandthenSave.
NowconfirmthespoolparametersbyselectingtheSpoolparameters
pushbutton,enteringLP01astheoutputdeviceonthefollowingscreen
and then selecting Continue.
Select Execute.
Display the spool list for this job.
Thenjumpbacktothejoboverview,leavethejobmarkedandselect
Display job log.
Continued on next page
215
2009 © 2009 SAP AG. All rights reserved.
| Company codes | AC## |
|---|---|
| Documentnumbers | The document number that you determined |
| Document type | SA |
| Fiscal year/period | The fiscal year/period that you determined |
| Minimum number of days in system | 0 |
| Key date | Current date |
| Production mode | Check |
|---|---|
| Deletewithtestvariant | Do not select |
| Detail log | X |
第 230 页 / 共 273 页
Unit4: ArchivingFI AC202
5. Checkwhetheryoucandisplaythedocumentusingtheapplication(FB03).
a) ChooseSAPEasyAccess→Accounting→FinancialAccounting→
GeneralLedger→Document→Display. Enterthefollowingvalues:
Documentnumber The document number that you
determined
Companycode AC##
Fiscal year Thefiscalyearthatyouhavedetermined
The document is displayed and the message “Document AC##
xxxxxxxx20xxhasalreadybeenarchived”appearsatthebottomof
the screen.
Confirm the message.
The document is displayed.
216
©2009SAPAG.Allrightsreserved. 2009
| Documentnumber | The document number that you determined |
|---|---|
| Companycode | AC## |
| Fiscal year | Thefiscalyearthatyouhavedetermined |
第 231 页 / 共 273 页
AC202 Lesson: ExecutingArchivinginFinancialAccountingUsingExamples
Exercise 14: Archiving G/L Account
Transaction Figures
Exercise Objectives
After completingthisexercise, youwillbeableto:
• ArchiveG/LaccounttransactionfigureswiththesupportofaBasiscolleague
Business Example
AfterseveralyearsofFIproductionoperationintheSAPsystem,theG/Laccount
transaction figures are to be archived.
Task:
ArchivetheG/Laccounttransactionfiguresandchecktheresults.
1. CheckwhethertransactionfiguresexistinyourcompanycodeAC##(for
exampleG/Laccount113101)forthecurrentfiscalyearminus2years.
2. Nowexecutearchivingobject-specificCustomizingforthearchivingof
transactionfiguresforthefiscalyears-uptoandincludingthecurrentone
minus2years-fortheG/Laccountsofyourcompanycode.
In archiving object-specific Customizing for the FI_TF_GLF archiving
object, define one variant each for test mode and for production mode
(withthenameTEST_##orPROD_##, where##isyourgroupnumber)
andmaintain theprocessing optionsfor thesevariants accordingly. Then
maintaintheattributesofthevariantsandsavethevariants. Makesurethat
thedeletejobhasnotbeenscheduled. Alsoensurethatthelogicalfilename
ARCHIVE_DATA_FILEisassignedtoobjectnameFI_TF_GLF.
3. Now use the write program to execute a test run for the archiving of
transactionfiguresforthefiscalyearsuptoandincludingthecurrentyear
minus2 yearsfor theG/L accountsof your company code. Then usethe
spool list to check the procedure.
Inthenextstep,usetransactionSARAtogenerateanarchivefilefromthe
SAPsystemfortheFI_TF_GLFarchivingobject. Thewriteprogrammust
be scheduled, executed and monitored.
Continued on next page
217
2009 © 2009 SAP AG. All rights reserved.
第 232 页 / 共 273 页
Unit4: ArchivingFI AC202
Createavariantforthewriteprogram. NamethevariantWrite_##(##=
yourgroupnumber). Maintainthesequentialcontrolofthevariantinsucha
mannerthatArchivingwithDeletionisexecuted. Thenschedulethewrite
program(withstartdateImmediate)andthepredefinedspoolparameters.
Note: Ifpostingperiodsarestillopenfortheyeartobearchived,
archiving is not possible. SAP Easy Access → Accounting →
Financial Accounting → General Ledger → Environment →
Current Settings → Open and Close Posting Periods. Close the
fiscalyearto bearchivedforvariant9000.
4. Nowusethewriteprogramtoexecuteaproductiverunforthearchiving
of transactionfiguresforthefiscal yearsuptoandincludingthecurrent
yearminus2yearsfortheG/Laccountsofyourcompanycode. Alsodisplay
a detail log in this case.
To do this, create anew variant Write_##_P.
Thenusethespool list to check the procedure.
5. DisplaythetransactioncodesforG/Laccount113101ofyourcompanycode
forthefollowingfiscalyears: currentFYminus2andcurrentFYminus1.
218
©2009SAPAG.Allrightsreserved. 2009
第 233 页 / 共 273 页
AC202 Lesson: ExecutingArchivinginFinancialAccountingUsingExamples
Solution 14: Archiving G/L Account
Transaction Figures
Task:
ArchivetheG/Laccounttransactionfiguresandchecktheresults.
1. CheckwhethertransactionfiguresexistinyourcompanycodeAC##(for
exampleG/Laccount113101)forthecurrentfiscalyearminus2years.
a) ChooseSAPEasyAccess→Accounting→FinancialAccounting→
GeneralLedger→Account→DisplayBalances(New).
Enter the following values:
Account Number 113101
Company Code AC##
Fiscal Year Currentfiscalyearminus2
Ledger 0L
Execute the transaction (F8).
Thetransactionfiguresforyourcompanycodearedisplayed.
2. Nowexecutearchivingobject-specificCustomizingforthearchivingof
transactionfiguresforthefiscalyears-uptoandincludingthecurrentone
minus2years-fortheG/Laccountsofyourcompanycode.
In archiving object-specific Customizing for the FI_TF_GLF archiving
object, define one variant each for test mode and for production mode
(withthenameTEST_##orPROD_##, where##isyourgroupnumber)
andmaintain theprocessing optionsfor thesevariants accordingly. Then
Continued on next page
219
2009 © 2009 SAP AG. All rights reserved.
| Account Number | 113101 |
|---|---|
| Company Code | AC## |
| Fiscal Year | Currentfiscalyearminus2 |
| Ledger | 0L |
第 234 页 / 共 273 页
Unit4: ArchivingFI AC202
maintaintheattributesofthevariantsandsavethevariants. Makesurethat
thedeletejobhasnotbeenscheduled. Alsoensurethatthelogicalfilename
ARCHIVE_DATA_FILEisassignedtoobjectnameFI_TF_GLF.
a) On the initial screen of the Archive Administration transaction
(SARA),enterthevalueFI_TF_GLFintheArchivingObjectinput
field and then choose Customizing. On the next screen, choose the
TechnicalSettingslineintheArchivingObject-SpecificCustomizing:
area and choose Execute to the left of the line. Ensure that value
ARCHIVE_DATA_FILEisintheLogicalFileNameentryfield. Also
ensurethattheStartAutomaticallyradiobuttonisselectedintheDelete
Jobs area.
EnterTEST_##intheTestModeVariantfield(where##isyourgroup
number),selecttheVariantpushbuttonforthisentrylineandconfirm
thefollowingdisplaywithContinueafteryouhaveselectedthe“For
AllSelectionScreens”switch. Inthefollowingscreen,selecttheTest
Modebuttonandselect"Complete"fromthedropdownlistforDetail
LogandselecttheAttributespushbutton. Inthefollowingscreen,enter
ameaningfulshortdescriptionofyourvariantintheMeaningfieldand
chooseSave. ThenchooseBack(greenarrow)togobacktoChange
View"CustomizingViewforArchiving": Detail(seethetitlebar).
Enter PROD_## in the Production mode variant field (## is your
groupnumber)andchoosetheVariantpushbuttonforthisentryline.
In the following screen (see thetitle bar)Maintain Variant: Report
FI_TF_GLC_DEL,VariantPROD_##choose"Complete"underDetail
Log (test mode should not be selected since it is a production run)
and choose Attributes. In the following screen, enter a meaningful
short description of your variant in the Meaning field and choose
Save. Finally,chooseBack(greenarrow)togobacktoChangeView
"CustomizingViewforArchiving": Detail(seethetitlebar)andchoose
Saveagain. You havenow maintainedthearchivingobject-specific
Customizing settings.
3. Now use the write program to execute a test run for the archiving of
transactionfiguresforthefiscalyearsuptoandincludingthecurrentyear
minus 2yearsfor theG/L accounts of your company code. Then usethe
spool list to check the procedure.
Inthenextstep,usetransactionSARAtogenerateanarchivefilefromthe
SAPsystemfortheFI_TF_GLFarchivingobject. Thewriteprogrammust
be scheduled, executed and monitored.
Continued on next page
220
©2009SAPAG.Allrightsreserved. 2009