Documentos de Académico
Documentos de Profesional
Documentos de Cultura
%&
3URJUDPPLQJ
'LVSOD\)XQFWLRQV
SAP AG 2002
n R/3 System
n Release 4.6C
n 2001, Q3
n Material Number 5004 1363
&RS\ULJKW
&RS\ULJKW6$3$*$OOULJKWVUHVHUYHG
1RSDUWRIWKLVSXEOLFDWLRQPD\EHUHSURGXFHGRUWUDQVPLWWHGLQ
DQ\IRUPRUIRUDQ\SXUSRVHZLWKRXWWKHH[SUHVVSHUPLVVLRQRI
6$3$*7KHLQIRUPDWLRQFRQWDLQHGKHUHLQPD\EHFKDQJHG
ZLWKRXWSULRUQRWLFH
$OOULJKWVUHVHUYHG
SAP AG 2002
7UDGHPDUNV
n Some software products marketed by SAP AG and its distributors contain proprietary software
components of other software vendors.
n Microsoft, WINDOWS, NT, EXCEL, Word, PowerPoint and SQL Server are registered
trademarks of Microsoft Corporation.
n IBM, DB2, OS/2, DB2/6000, Parallel Sysplex, MVS/ESA, RS/6000, AIX, S/390,
AS/400, OS/390, and OS/400 are registered trademarks of IBM Corporation.
n ORACLE is a registered trademark of ORACLE Corporation.
n INFORMIX-OnLine for SAP and INFORMIX Dynamic ServerTM are registered trademarks of
Informix Software Incorporated.
n UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.
n HTML, DHTML, XML, XHTML are trademarks or registered trademarks of W3C, World Wide
Web Consortium, Massachusetts Institute of Technology.
n JAVA is a registered trademark of Sun Microsystems, Inc.
n JAVASCRIPT is a registered trademark of Sun Microsystems, Inc., used under license for
technology invented and implemented by Netscape.
n SAP, SAP Logo, R/2, RIVA, R/3, ABAP, SAP ArchiveLink, SAP Business Workflow, WebFlow,
SAP EarlyWatch, BAPI, SAPPHIRE, Management Cockpit, mySAP.com Logo and mySAP.com
are trademarks or registered trademarks of SAP AG in Germany and in several other countries all
over the world. All other products mentioned are trademarks or registered trademarks of their
respective companies.
%XVLQHVV,QWHJUDWLRQ7HFKQRORJLHV,
/HYHO /HYHO
2 days 5 days 3 days
SAP Business SAP Business Workflow
Workflow - SAP Business
Workflow - Introduction Workflow - Programming
Build and Use
3 days
SAP ArchiveLink
2 days
3 days ADK - Retrieval
programming Archiving
Data Archiving
2 days
Data Archiving Retention
Tool (DART)
2 days
Web connection
SAP Business Connector
SAP AG 2001
%XVLQHVV,QWHJUDWLRQ7HFKQRORJLHV,,
/HYHO /HYHO
%
3 days
Application Link
Enabling (ALE)
Technology
9
2 days 1 day 4 (,)(",5*067(%+/%"
SAP IDoc Interface SAP IDoc Interface -
Technology Development
8:
3 days 4 days *BC619 from 01/2002 BIT300
*BC620 from 01/2002 BIT320
Business Integration EDI Interface
Technology *BC621 from 04/2002 BIT350
5 days
Data Transfer 0
2 days
Communication
- $#0. !/#"%$($'&)1(+*,13" 2 /
5 days Interfaces in ABAP
Programming with 8
BAPIs in Visual Basic 5 days
Programming with
*CA925 from 01/2002 BIT525
BAPIs in JAVA
*CA926 from 01/2002 BIT526
SAP AG 2001
&RXUVH3UHUHTXLVLWHV
l %&
%&
%&
%& RUHTXLYDOHQWNQRZOHGJHRI6$3'DWD
$UFKLYLQJ
SAP AG 2002
7DUJHW*URXS
l 3DUWLFLSDQWV
; 0HPEHUVRIGDWDDUFKLYLQJSURMHFWWHDPVZKRKDYHWR
SURJUDPFXVWRPHUVSHFLILFUHWULHYDOVROXWLRQV
l 'XUDWLRQGD\V
SAP AG 2002
&RXUVH2YHUYLHZ
&RQWHQWV
l &RXUVH*RDOV
l &RXUVH2EMHFWLYHV
l &RXUVH&RQWHQW
l &RXUVH2YHUYLHZ'LDJUDP
l 0DLQ%XVLQHVV6FHQDULR
SAP AG 2002
7KLVFRXUVHZLOOSUHSDUH\RXWR
l 8QGHUVWDQGWKHORJLFRIDUFKLYLQJDQGGHOHWH
SURJUDPV
l &UHDWHFXVWRPHUVSHFLILFVHTXHQWLDOUHDG
SURJUDPV
l 3URJUDPEXVLQHVVYLHZVRIDQDUFKLYLQJREMHFWLQ
6$3$6
l 'LVSOD\LQ6$3$6RULJLQDOGRFXPHQWVEHORQJLQJ
WRDQ5EXVLQHVVREMHFWWKDWKDYHEHHQDUFKLYHG
XVLQJ6$3$5&+,9(/,1.
SAP AG 2002
$WWKHFRQFOXVLRQRIWKLVFRXUVH\RXZLOOEHDEOHWR
l &UHDWHFXVWRPHUVSHFLILFUHDGSURJUDPV
l &UHDWHEXVLQHVVYLHZVLQ6$3$6
l ([SODLQWKHSURFHGXUHUHTXLUHGWRHPSW\
FXVWRPHUVSHFLILFWDEOHVXVLQJFXVWRPHUVSHFLILF
DUFKLYLQJREMHFWV
l ([SODLQWKHSURFHGXUHUHTXLUHGWRH[WHQGH[LVWLQJ
DUFKLYLQJREMHFWVWRDUFKLYHFXVWRPHUVSHFLILF
WDEOHV
SAP AG 2002
3UHIDFH
SAP AG 2002
,QWURGXFWLRQ 67$57
7KH'DWD$UFKLYLQJ3URFHVV
$'.'HYHORSPHQW7RROV
3URJUDP/RJLFLQ'DWD$UFKLYLQJ
6HTXHQWLDO5HDG3URJUDPV
'LUHFW$FFHVVWR$UFKLYHG'DWDLQ6$3$6
SAP AG 2002
l <RXZRUNLQWKHODUJHHQWHUSULVH7DEOHV58V$ODUJHGDWD
DUFKLYLQJSURMHFWKDVEHHQLQVWDOOHGDQG\RXDUHD
PHPEHURIWKHSURMHFWWHDP
7RJHWKHUZLWKWKHXVHUGHSDUWPHQWV\RXKDYHFUHDWHGD
UHTXLUHPHQWVFDWDORJ
l &XVWRPHUVSHFLILFUHDGSURJUDPVPXVWEHZULWWHQ
l %XVLQHVVYLHZVPXVWEHFUHDWHGLQ6$3$6
SAP AG 2002
&RQWHQWV
l 7KH3URFHVVRI'DWD$UFKLYLQJ
l 'DWD2EMHFWDQG$UFKLYLQJ2EMHFW
l $FFHVVWR$UFKLYHG'DWD
SAP AG 2002
$WWKHFRQFOXVLRQRIWKLVXQLW\RXZLOOEHDEOHWR
l 'HVFULEHWKHSURFHVVRI'DWD$UFKLYLQJ
l ([SODLQWKHUHOHYDQWFRPSRQHQWV
S
SAP AG1999
P AG 2002S
&RXUVH2YHUYLHZ
7KH3URFHVVRI'DWD$UFKLYLQJ
$'.'HYHORSPHQW7RROV
3URJUDP/RJLFLQ'DWD$UFKLYLQJ
&XVWRPHU6SHFLILF5HDG3URJUDPV
%XVLQHVV9LHZVLQ6$3$6
$SSHQGL[
SAP AG 2002
l 7KHXVHUGHSDUWPHQW,7GHSDUWPHQWDQGWKH
SURMHFWWHDPPHHWWRGLVFXVVWKHH[LVWLQJGDWD
DUFKLYLQJVROXWLRQZLWKLQWKHLUHQWHUSULVH
l 7KH\DOVROLVWWKHRSWLRQVLQWKHVWDQGDUG6$3
6\VWHPIRUDFFHVVLQJDUFKLYHGGDWD
S
SAP AG1999
P AG 2002S
5
'DWDEDVH
'RFXPHQWV $UFKLYLQJREMHFW $UFKLYH
'DWDREMHFWV ILOHV
'DWDDUFKLYLQJVHVVLRQ
SAP AG 2002
n R/3 documents are made up of records, which are stored in different tables in the R/3 database.
For the purposes of data archiving, a concrete R/3 document is a GDWDREMHFW.
n The data archiving process is composed of two steps.
&UHDWLRQRIDUFKLYHILOHVThe archiving program writes the files for archiving from the R/3
database to archive files.
'HOHWLRQRIGDWD - The delete program first reads the data in the archive files and then deletes the
records from the database.
n The removal of archive files to a tertiary storage medium can be seen as a third step in the archiving
process. This step occurs after the first two steps of the data archiving procedure have been
completed.
You should consider this third step to be part of the archiving process: It is not generally enough to
write the data to be archived to archive files and delete it from the database. The archive files must
be stored and managed to guarantee future access when required.
5EXVLQHVVGRFXPHQWV
5GDWDEDVHWDEOHV
XQLTXHNH\
SAP AG 2002
n R/3 business documents are distributed across different tables in the R/3 database.
n The FI document 1000 1900000 1999 represents a concrete data object in R/3.
n Within the data archiving framework, all table records belonging to a data object are written together
(in context) to an archive file and then deleted from the database tables.
$UFKLYLQJREMHFW
;=<?>A@$B<A@C>ED4F)DGB$>AH*I<?H J=K
LMNO D/PT;RUWV ),B'2&8017
;=<?>A@$B<A@C>ED4F)DGB$>AH*I<?H J=K
LMNCO D/P=XZY $Q$5&+,9,1*2%-(&7LVDVHWRIOLQNHG
EXVLQHVVGDWDZKLFKLVSHULRGLFDOO\H[WUDFWHG
IURPWKHGDWDEDVHDUFKLYHGDQGGHOHWHG
;=<?>A@$B<A@C>ED4F)DGB$>AH*I<?H J=K DFFRUGLQJWRLQGLYLGXDOFULWHULD
LM)N[O D/PT;RUW\ IURPWKHFXUUHQWV\VWHP
SAP AG 2002
n R/3 Release 4.6 contains more than 200 standard archiving objects.
n Archiving objects are defined by the individual applications.
n You can create customer-specific archiving objects for customer-specific Z and Y tables.
6WUXFWXUHGHILQLWLRQ
$UFKLYLQJ
REMHFWV ,QIRUPDWLRQDERXW
WKHSRLQWVOLVWHG $GGLWLRQDOIODJV
),B'2&8017 RQWKHULJKW IRUH[DPSOHVWDUWDWHQG
6'B9%$. LVVWRUHGLQWKH
6'B9%.$ V\VWHPIRUHYHU\ 3URJUDPVIRUDUFKLYLQJ
6'B9%5. DUFKLYLQJREMHFW DQGGHOHWLRQ
59B/,.3
&2B,7(0 7UDQVDFWLRQ$2%- &XVWRPL]LQJ
$0B$66(7 WHFKQLFDOVHWWLQJV
00B(%$1
00B(..2 &XVWRPL]LQJ
,'2& UHVLGHQFHWLPHVDSSOLFDWLRQ
:25.,7(0
36B3/$1
&2B25'(5 $UFKLYLQJFODVVHVXVHG
5HDGSURJUDPV
SAP AG 2002
5 $UFKLYLQJ
'DWDEDVH SURJUDP
$UFKLYH
ILOH
SAP AG 2002
n During the first step, the archiving program creates an (initial) archive file.
The data to be archived is read from the database by a batch process and written to the archive file.
This process continues until one of the following occurs:
1. The archiving is finished: All the data for selection has been read and written
2. The archiving is not yet completed but the archive file has reached the maximum size that was
specified in Customizing.
3. The archiving is not yet completed but the archive file contains the specified number of objects
that was specified in Customizing.
n Only data from completed business processes is archivable.
n Master data can only be archived if a deletion indicator has been set in it.
Some archiving objects set the deletion indicator in a specific preprocessing program within the
framework of data archiving (for example, the archiving object CO_ORDER).
'HOHWLRQMREVVWDUW 3UHUHTXLVLWH
DXWRPDWLFDOO\DIWHUDQDUFKLYH 6WDUWDXWRPDWLVVHOHFWHGLQWHFKQLFDO
ILOHKDVEHHQFORVHG &XVWRPL]LQJIRUWKHDUFKLYLQJREMHFW
$UFKLYLQJ
5 SURJUDP
'DWDEDVH
$UFKLYH
'HOHWH $UFKLYH ILOH
SURJUDP ILOH
'HOHWH $UFKLYH
SURJUDP
ILOH
SAP AG 2002
$GPLQLVWUDWRUVWDUWVWKHGHOHWLRQ 3UHUHTXLVLWH
MREV0$18$//<LQWKHGDWD 6WDUWDXWRPDWLVQRWVHOHFWHG
DUFKLYLQJWUDQVDFWLRQDIWHUWKH LQWHFKQLFDO&XVWRPL]LQJIRU
DUFKLYLQJVHVVLRQLVILQLVKHG WKHDUFKLYLQJREMHFW
5
'DWDEDVH
'HOHWH
SURJUDP
SAP AG 2002
'HOHWHMREVVWDUWHG$8720$7,&$//< 3UHUHTXLVLWH
DIWHUWKHDUFKLYLQJVHVVLRQKDV VWDUWDWHQGLVVHWLQWKH
ILQLVKHG GHILQLWLRQRIWKHDUFKLYLQJREMHFW
5
'DWDEDVH
'HOHWH $UFKLYH
SURJUDP ILOH
'HOHWH $UFKLYH
SURJUDP
ILOH
SAP AG 2002
l ([WHUQDOVWRUDJHV\VWHP
DGGUHVVHGYLD
$UFKLYH
6$3$UFKLYH/LQN
ILOH
$UFKLYH
5 l +60V\VWHPV
ILOH
$UFKLYH
'DWDEDVH l )LOHV\VWHPDYDLODEOHRQO\
ILOH
$UFKLYH
ILOH WR$'.
$UFKLYH
ILOH
&UHDWHDUFKLYHILOH
'HOHWHGDWD
)LQDOVWRUDJH
ORFDWLRQRI
DUFKLYHILOHV
SAP AG 2002
n There are various ways to store and administer archive files on external storage media.
Archive management always knows the exact location of an archive file.
Read/write authorizations are mandatory at UNIX-level for the directories used.
n Connection to a Hierarchical Storage Management system (HSM): An HSM system simulates an
infinitely large file system. The archive files created during an archiving session are stored in the
HSM file system. You just have to enter the HSM file system path in archiving object Customizing
as the target path for the archive files.
n Connection to an external archive system via SAP ArchiveLink: If you want to store the archive files
on an external storage system via SAP ArchiveLink, the archive files can only be passed to the third-
party product archive after the data has been successfully deleted from the database.
n Manual administration: If you do not want to store the archive files on an external archive or in an
HSM System, then the IT department can administer the files on tapes or CDs. There is no interface
to these files from SAP R/3.
n Ensure that backup strategies are in place for the relevant storage medium. It may also be necessary
to make new copies of the contents of CDs or WORMs after a number of years.
<RXQRZNQRZ
l 7KHVWHSVRIWKHDUFKLYLQJSURFHVV
:ULWLQJGDWDWRDUFKLYHILOHV
]
'HOHWLQJGDWDIURPGDWDEDVH
]
)LQDOVWRUDJHRIDUFKLYHILOHVRQ
]
WHUWLDU\VWRUDJHPHGLD
l 7KDWDUFKLYLQJREMHFWVDUHWKHFHQWUDO
FRPSRQHQWVRIGDWDDUFKLYLQJ
SAP AG 2002
8QLW'DWD$UFKLYLQJDQG:RUNLQJZLWK$UFKLYHG'DWD
7RSLF7KH3URFHVVRI'DWD$UFKLYLQJ
$FFHVVXVLQJ6$3$6
1-1 &RQWUROWKHGHOHWHMRE
1-1-1 Which Customizing setting must you implement to prevent the delete jobs from
starting immediately so that you can schedule them manually?
1-1-2 Which setting leads to them starting immediately after an archive file has been
closed?
1-1-3 Which setting enables you to start the delete jobs automatically after the
complete archiving session is finished and all of the archive files have been
closed?
1-2 'DWD2EMHFWDQG$UFKLYLQJ2EMHFW
1-2-2 Where is the definition (within the context of data archiving) of a data object
stored?
8QLW'DWD$UFKLYLQJDQG:RUNLQJZLWK$UFKLYHG'DWD
7RSLF7KH3URFHVVRI'DWD$UFKLYLQJ
$FFHVVXVLQJ6$3$6
&RQWHQWV
l 2YHUYLHZRIWKH$'.SURJUDPPLQJLQWHUIDFH
l 2YHUYLHZRIDUFKLYLQJFODVVHV
SAP AG 2002
$WWKHFRQFOXVLRQRIWKLVXQLW\RXZLOOEHDEOHWR
l /LVWWKHFRPSRQHQWSDUWVRIWKH$'.
SURJUDPPLQJLQWHUIDFH
l 8QGHUVWDQGWKHXVHDQGDSSOLFDWLRQRIDUFKLYLQJ
FODVVHV
SAP AG 1999
2002
&RXUVH2YHUYLHZ
7KH'DWD$UFKLYLQJ3URFHVV
$'.'HYHORSPHQW7RROV
'DWD$UFKLYLQJ3URJUDPPLQJ/RJLF
&XVWRPHU6SHFLILF5HDG3URJUDPV
%XVLQHVV9LHZVLQ6$3$6
$SSHQGL[
SAP AG 2002
l %HIRUHZRUNFDQEHJLQWKHGHYHORSHUVPXVWKDYH
DQRYHUYLHZRIWKH$'.SURJUDPPLQJLQWHUIDFH
SAP AG 1999
2002
l $'.LQFOXGHVDVHULHVRIIXQFWLRQPRGXOHVWKDWDUHDUH
XVHGE\DOOSURJUDPVRQDFURVVDSSOLFDWLRQEDVLVGXULQJ
GDWDDUFKLYLQJ
l 7KHVHIXQFWLRQPRGXOHVZULWHGDWDWRDQGUHDGGDWDIURP
DUFKLYHILOHV
l 7KHVHOHFWLRQRIGDWDIRUDUFKLYLQJRUGHOHWLRQWKDWLV
GDWDEDVHDFFHVVPXVWEHGHILQHGLQDUFKLYLQJDQG
GHOHWLRQSURJUDPVLQWKHUHOHYDQWDSSOLFDWLRQ
SAP AG 2002
n As well as reading and writing data, ADK also undertakes conversion tasks within the framework of
data archiving, for example:
Codepage changes (for example, HP/UX to AS/400)
Format conversion (for example, Compaq/Alpha to HP/UX)
Structure changes (for example, additional table fields)
Data compression and decompression
n Since Release 3.0, ADK is the only means of archiving data from R/3 database tables.
Archived data from Releases 2.1 and 2.2 are readable.
$5&+,9(B&/26(B),/(
&'()#* +#,.-0/,213-* 4#576'89&1* 64
& ':();* +#,.-0/,13-24#,0<1.-06=:>7,?(91
&':();* +#,.-0/,13-24#,0<:1@-2'#,0(#6'#A
&B':()#* +
,.-7/C,213-24#,0<:1.-7D1'#E(#1@-7D9F,2(#* 5
&B':();* +
,.-7/C,213-06CF,42-25?* G7,2D
&';(
)#* +#,@-?/,213-2'#,2(96'#A2-?* 495.6
&':()9* +#,.-0/,13-?D1@&1* D12* (9D
! #" $ % &';()9* +#,@-?/,213-017&=9G0,
&B':(
)#* +#,@-?/,21@-.H* 1)2-0(
E#':D6'
$5&+,9(B1(:B2%-(&7
&';();* +
,3-?6CF,24?-2506'2-0(;6I42+9,:'D:* 64
&':(
)9* +#,.-06F,4?-576'2-?A#,2G?,?12,
&';(
)9* +
,3-06IF,24?-2576C'?-:86#+#,
&'()#* +#,.-06F,42-25J6C'?-2'#,7&BA
$5&+,9(B23(1B)25B:5,7(
&';()9* +#,@-F26FE9FJ-0(
E;D21?6K8* L* 4;/;-2A&1.&
$5&+,9(B387B5(&25'
$5&+,9(B387B7$%/(
&';()9* +#,@-';,0&A2-06=:>7,?(;1
&':(
)#* +#,.-2'#,2/* D21,2'?-0(G.&
D2D
&';(
)9* +#,.-2'#,GJ6#&A0-?6=>0,2(913-2A&1J&
&B':()#* +
,.-?';6G?G7=&
(M?-JHN6C';M
$5&+,9(B6$9(B2%-(&7
&';();* +
,3-?D9,71.-'9,?(96C';A2-0(E9':D6'
$5&+,9(B:5,7(B67$7,67,&6
SAP AG 2002
n The function group ARCH includes the function modules for access to ADK archive files.
n The function group AADM contains function modules for managing ADK archive files.
n The group ARCH is essential for customer developments.
n Archiving programs are created by the respective applications. The application programs selection
and check logic. The application uses the function modules listed above as the interface to ADK.
$5&+,9(B&/26(B),/(
&';(#)#* +#,.-0/C,?1@-* 4#576C'
8#&
1* 64
&'()9* +#,.-0/,21@-?4#,0<:1.-06=:>7,?(91
$5&+,9(B'(/(7(B2%-(&7B'$7$
&':();* +#,.-0/,13-24#,0<:1@-2'#,0(#6'#A
&B':(
)#* +#,@-0/C,21@-?49,0<:1.-?D21'9E;(;1@-?D;F2,2(* 5
OPQ
2
# 2;2P
#9 2
!
" $ % $5&+,9(B*(7B&86720,=,1*B'$7$
&B':();* +
,.-7/C,213-06CF:,?42-25?* G7,2D
&'()9* +#,.-0/,21@-?'#,2(#6'9A2-2* 495J6
&';(
)#* +#,@-?/,213-0D1J* D1* (9D
&';()9* +#,@-?/,213-017&=9G0,
&B':(
)#* +#,@-?/,21@-.H* 1)?-0(
E#':D6'
$5&+,9(B*(7B1(;7B2%-(&7
$5&+,9(B*(7B1(;7B5(&25'
$5&+,9(B*,9(B67$7,67,&6
&';();* +
,3-?6CF,40-2506'2-0(;6I42+9,:'D:* 64
$5&+,9(B23(1B)25B'(/(7(
&'()9* +#,.-06F,4?-5J6'2-86#+#,
&B';(#)#* +#,@-?6F:,?42-2506'?-';,7&A
&'()#* +#,.-2F26FE#FJ-0(
E:D1?6I8* L* 4/#-?A&1.&
&'()9* +#,.-2';,0&A2-06=:>7,?(;1
&':(
)#* +#,.-2'#,2/* D21,2'?-0(G.&
D2D
&';()9* +#,@-';,GJ6#&A2-76C=>7,2(#1@-?A&
1J&
&B';(
)#* +
,.-?';6G?G7=&(
M?-JHN6C'9M
&B';(
)9* +#,@-?D;,01J-2';,?(#6'#A?-7(E#':D6'
$5&+,9(B:5,7(B67$7,67,&6
SAP AG 2002
n Delete programs are created by the relevant applications. The application uses the function modules
listed above as the interface to ADK.
l 3DWK
7RROV!$%$3:RUNEHQFK!2YHUYLHZ!
2EMHFW1DYLJDWRU!)XQFWLRQ*URXS$5&+
l 'LVSOD\WKHIXQFWLRQJURXS
([SDQGWKHIXQFWLRQPRGXOHV
SAP AG 2002
l $UFKLYLQJFODVVHV
)XQFWLRQPRGXOHVDQGIRUPURXWLQHVEHORQJLQJWRD
EXVLQHVVREMHFWZKLFKLVQRWXVXDOO\DUFKLYHGRQLWVRZQEXW
ZKLFKLVXVHGDQGDUFKLYHGPRUHWKDQRQFHDVDVHUYLFH
IXQFWLRQZLWKLQWKHV\VWHP
([DPSOHVRIDUFKLYLQJFODVVHV
6$3VFULSWWH[WV
&KDQJHGRFXPHQWV
9DULDQWFRQILJXUDWLRQV
6$3$UFKLYH/LQNHQWULHV
,'2&V
:RUNLWHPV
+5WLPHGDWD
+5WUDYHOGDWD
&2VHWWOHPHQWGRFXPHQWV
SAP AG 1999
2002
l 8VHRI$UFKLYLQJ&ODVVHV
$UFKLYLQJFODVVHVSURFHVVFRPSOH[FURVVDUFKLYLQJ
REMHFWORJLFDOGDWDREMHFWV
'DWDVWUXFWXUHVDUHXVHGDQGDUFKLYHGE\YDULRXV
DSSOLFDWLRQV
l $UFKLYLQJFODVVHVDUHFUHDWHGE\WKHUHVSRQVLEOH
SHUVRQVIURPWKHGHYHORSPHQWDUHD
SAP AG 2002
n 1RWH Archiving classes are not developed in the ADK develoment environment, which is released to
customers.
l $GYDQWDJHVRIDUFKLYLQJFODVVHV
5HXVDELOLW\ZLWKRXWDGGLWLRQDOZRUNORDG
1HZDUFKLYLQJFODVVHVFDQEHXVHGHDVLO\WRH[WHQG
DUFKLYLQJREMHFWV
9LHZRIWKHREMHFWDQGQRWLWVSK\VLFDOGDWD
5HWHQWLRQRIGDWDLQWHJULW\
&RQWDLQDUFKLYLQJGDWDDQGDUFKLYLQJPHWKRGV
&HQWUDOLPSOHPHQWDWLRQRIDUFKLYLQJIXQFWLRQDOLW\
SAP AG 2002
n Archiving classes reflect an object-oriented approach and encapsulate the methods for accessing
data.
Because of the data encapsulation, the calling program no longer has to know the specific data
structures and heirarchies. By using archiving classes, you can easily archive and read data for
which you have no detailed knowledge.
<RXQRZNQRZ
l 7KHVFRSHRIWKH$'.
SURJUDPPLQJLQWHUIDFHZKLFK
LVUHOHDVHGWRFXVWRPHUV
l $UFKLYLQJFODVVHVSURYLGHWKH
PHDQVWRUHGXFHWKHVL]HRIWDEOHV
ZKLFKDUHVLPXOWDQHRXVO\ILOOHG
E\GLIIHUHQWDSSOLFDWLRQV
SAP AG 2002
8QLW$'.GHYHORSPHQWWRROV
7RSLF$VVLJQ$'.IXQFWLRQPRGXOHV
$VVLJQDUFKLYLQJFODVVHV
1-1 $'.IXQFWLRQPRGXOHV
1-1-1 Which function groups contain function modules released for customers?
1-2 $UFKLYLQJFODVVHV
1-2-1 Why were archiving classes developed? Which data is archived/deleted with
them?
1-2-3 Which archiving classes are used by the archiving object SD_VBKA?
8QLW$'.'HYHORSPHQW7RROV
7RSLF$VVLJQLQJ$'.IXQFWLRQPRGXOHV
$VVLJQLQJDUFKLYLQJFODVVHV
Delete: Archive_get_customizing_data
Archive_close_file
Archive_get_next_object
Archive_get_next_record
Archive_open_for_delete
Archive_delete_object_data
Archive_write_statistics
1-2-1 Archiving classes read and write objects to tables, which are not filled by
a specific business object, but which are used on a cross-application basis by
R/3 .
1-2-2 Archiving classes are created by the responsible application. The development
of archiving classes by customers is NOT supported.
&RQWHQWV
l 'HILQLWLRQRIDUFKLYLQJREMHFWV
l &RQVWUXFWLQJDUFKLYLQJSURJDPV
l )XQFWLRQPRGXOHVLQDUFKLYLQJSURJUDPV
l &RQVWUXFWLQJGHOHWHSURJDPV
l )XQFWLRQPRGXOHVLQGHOHWHSURJUDPV
l ,PSRUWDQWSURFHGXUHVZKHQH[WHQGLQJVWDQGDUGDUFKLYLQJ
REMHFWVH[DPSOH,62,/
SAP AG 2002
$WWKHFRQFOXVLRQRIWKLVXQLW\RXZLOONQRZ
l 7KHORJLFRIDUFKLYLQJSURJUDPV
l 7KHORJLFRIGHOHWHSURJUDPV
l 7KHSURFHGXUHIRUFUHDWLQJDQHZDUFKLYLQJ
REMHFW
l 7KHSURFHGXUHIRUH[WHQGLQJDVWDQGDUG
DUFKLYLQJREMHFW
SAP AG 1999
2002
&RXUVH2YHUYLHZ
7KH'DWD$UFKLYLQJ3URFHVV
$'.'HYHORSPHQW7RROV
'DWD$UFKLYLQJ3URJDPPLQJ/RJLF
&XVWRPHU6SHFLILF5HDG3URJDPV
%XVLQHVV9LHZVLQ6$3$6
$SSHQGL[
SAP AG 2002
l 7KHSURJDPPHUVRIFXVWRPHUVSHFLILF
DUFKLYLQJREMHFWVZDQWWRXQGHUVWDQGWKH
ORJLFEHKLQG6$3GDWDDUFKLYLQJ
SAP AG 1999
2002
l $'.LVDYDLODEOHDVDGHYHORSPHQWWRRO
6$3GHYHORSHUVIRU6$3VWDQGDUGREMHFWV
&XVWRPHUV)RUFXVWRPHUVSHFLILFWDEOHVQRWIRU6$3
VWDQGDUGREMHFWV
&XVWRPHUVFDQXVHDGHYHORSHUVNH\WRH[WHQGWKH6$3
VWDQGDUGV\VWHP
w =DQG<DVDQH[WHQVLRQWRDQ6$3DUFKLYLQJREMHFW
&XVWRPHUVFDQFUHDWHDFFHVVURXWLQHVWRDUFKLYHGGDWD
w $QDO\VLVUHSRUWV
w 'LUHFWDFFHVVWRDVLQJOHGRFXPHQW
w %XVLQHVVYLHZVLQ6$3$6
SAP AG 1999
2002
l $QDUFKLYLQJREMHFWVSURJUDPV
!
$ !"
#
%
$ (')
& ' ! ! !'' !
$ *+-,+.*
/
' !
$!
SAP AG 2002
n The minimum requirements for an archiving object are a write program and a delete program.
n Most archiving objects also contain additional reports and a single-document access function using
SAP AS.
n An archiving object can also contain programs for preprocessing, analysis, reloading and
postprocessing.
Optionally, there is also an index progam for direct access to a single document in an archive file.
However, direct single-document access is controlled using the generic functions of the Archive
Information System (SAP AS). Index programs are therefore unnecessary.
n You can create reload programs, but these should only ever be used immediately after an archiving
session for situations where the wrong data has been selected for archiving.
n The deletion indicator is often set for master data in the preprocessing program.
n Analysis programs make it easier to identify documents for selection and can identify documents that
cannot be archived due to business considerations.
l &UHDWLQJDQDUFKLYLQJREMHFW
n WUDQVDFWLRQ$2%-
n 7KHIROORZLQJHQWULHVDUHPDQGDWRU\
6WHS$UFKLYLQJDQGGHOHWHSURJDPV
6WHS$UFKLYLQJREMHFWSDUDPHWHUV
6WHS7DEOHVZKLFKDUHDUFKLYHG
6WHS&XVWRPL]LQJVHWWLQJV
6WHS:KHUHDYDLODEOH$UFKLYLQJFODVVHVXVHG
6WHS:KHUHDYDLODEOH$YDLODEOHUHDGSURJUDPV
SAP AG 2002
l 7UDQVDFWLRQ $2%-DUFKLYLQJREMHFW
(QWHUWKHDYDLODEOHSURJUDPV
3URJUDPVIRUWKHIROORZLQJSURFHVVHVFDQRUPXVWEH
DYDLODEOHIRUDQDUFKLYLQJREMHFW
3UHSURFHVVLQJRSWLRQDO
&UHDWHDUFKLYHILOHV
'HOHWHGDWDIURPGDWDEDVH
3RVWSURFHVVLQJRSWLRQDO
5HORDGGDWDWRWKHGDWDEDVHRSWLRQDO
SAP AG 1999
2002
The postprocessing progam for the archiving object FI_DOCUMNT (FI documents) for example,
deletes data from the FI indexes.
n You can find SAP Notes on archiving objects in transaction 6$5$ by choosing the i symbol in the
activity screen (schedule archiving, schedule deletion,...).
l 7UDQVDFWLRQ$2%-$UFKLYLQJREMHFW
(QWHULQJGHILQLWLRQIODJV
! %XLOGLQGH[
! 6WDUWDWHQG
! &URVVFOLHQW
! (QGGLDORJ
! ,QYDOLGIODJ
! 1RUHORDGILOHV
SAP AG 1999
2002
n Cross-application: The transaction SARA is client-specific. You can set this indicator if you want to
work on a cross-client basis.
n End dialog: During archiving, R/3 dialog operations should be stopped in order to avoid data
collisions. When scheduling the jobs, the administrator receives a warning that further checks will
not be carried out.
n Invalid: If archiving sessions are incomplete and there is no completed status, you can mark the entry
as invalid in archive administration.
If the invalid indicator is set for an archiving object, the indicator for invalid archive files cannot be
reversed in archive managment.
n no r. files (from Release 4.0A): When reloading data to the database, new archive files are created if
not all of the data from a session was reloaded. If this indicator is set, the system will not create any
new files.
n Prg.generated: Archiving objects that work with statistical or controlling data, generate their
programs based on individual user inputs at runtime. Example: MKIS, COPA1_*
n Build index: The archiving object is usually able to construct an index. There must also be an index
build program stored in AOBJ.
l 7UDQVDFWLRQ$2%-VWUXFWXUHGHILQLWLRQ
(QWHUWKHWDEOHVIURPZKLFK\RXZDQWWRDUFKLYHGDWD
7KHHQWULHVUHSUHVHQWWKHDUFKLYLQJREMHFWVGDWDPRGHO
l 7UDQVDFWLRQ$2%-&XVWRPL]LQJVHWWLQJV
7HFKQLFDOVHWWLQJVVXFKDVILOHVL]HVFRPPLWFRXQWHUGHOHWH
SURJUDPYDULDQWVFRQQHFWLRQWRH[WHUQDOVWRUDJHV\VWHP
7KHWHFKQLFDOVHWWLQJVFDQEHPDLQWDLQHGE\WKHXVHULQ
WUDQVDFWLRQ6$5$
SAP AG 2002
Structure: If a structure name is entered here, this structure will be used for conversions. This is
essential if you are working with logical databases and the structure name entered under segment is
a pseudonym for a real structure. ADK uses the entries in the same way as was described for
segments (see above).
n Technical Customizing:
From 4.6A, the commit counter can only be maintained in transaction AOBJ.
l 7UDQVDFWLRQ$2%-DUFKLYLQJFODVVHVXVHG
(QWHUWKHDUFKLYLQJFODVVHVWKDWWKHDUFKLYLQJREMHFWXVHV
$QHQWU\LQWUDQVDFWLRQ$2%-PHDQVWKDWWKHDUFKLYLQJFODVV
LVXVHGE\WKHDUFKLYLQJREMHFW
l 7UDQVDFWLRQ$2%-UHDGSURJUDPV
LIWKHDYDLODEOHUHDGSURJUDPVDUHHQWHUHGWKHQWKHSURJUDPV
FDQEHFDOOHGIURPWKHFRQWH[WRIWKHDUFKLYLQJWUDQVDFWLRQ
6$5$
SAP AG 2002
n It is necessary to enter the archiving classes in AOBJ so that transaction '% and the Archive
Information System consider the archiving classes.
n Transaction '% determines the tables that belong to an archiving object or, conversely, the
suitable archiving object for a table.
l 7UDQVDFWLRQ$2%-&XVWRPL]LQJWUDQVDFWLRQV
*URXSRIWUDQVDFWLRQVLQZKLFKDSSOLFDWLRQVSHFLILF
&XVWRPL]LQJPXVWEHFDUULHGRXW
,QDSSOLFDWLRQVSHFLILF&XVWRPL]LQJWKHDSSOLFDWLRQVDOORZ
FULWHULDIRUWKHDUFKLYDELOLW\RIGDWDWREHHQWHUHGZKLFKDUH
FKHFNHGGXULQJDQDUFKLYLQJVHVVLRQ
)RUWUDQVDFWLRQGDWDWKLVLVPDLQO\GHILQLQJUHVLGHQFHWLPHV
)RUPDVWHUGDWDWKLVLVPDLQO\VHWWLQJGHOHWLRQLQGLFDWRUV
7KHDSSOLFDWLRQVSHFLILFVHWWLQJVDUHFDUULHGRXWZLWKLQ
DSSOLFDWLRQ&XVWRPL]LQJ
SAP AG 1999
2002
l 5! $([DPSOHDUFKLYLQJREMHFW%&B6%22.ZLWK
SURJDPVIRU
:ULWLQJDUFKLYHILOHV6%22.$
'HOHWLQJDUFKLYHGGDWDIURPWKHGDWDEDVH6%22.'
5HSRUWLQJIURPDUFKLYHILOHV6%22.5
)LOOLQJDQDUFKLYHLQGH[6%22.,
l 5$([DPSOHDUFKLYLQJREMHFW(;$03/(
3URJDPVVLPLODUWR6%22.
56$5&+56$5&+56$5&+56$5&+
6LQJOHGRFXPHQWUHDG56$5&+
SAP AG 1999
2002
n Note: The archiving object EXAMPLE only simulates deletion of data from the database.
n Functionality read single document for SBOOK is realised via SAP AS;
The index construct program has a greater documentation character.
l $XWKRUL]DWLRQFKHFN
l 5HDGVHOHFWLRQ
l 5HDG&XVWRPHU6SHFLILF
&XVWRPL]LQJ
l 'DWDVHOHFWLRQ
l ,PSOHPHQWFKHFNORJLF
IURPDEXVLQHVVORJLFSRLQWRIYLHZ
SAP AG 2002
n In the data selection, the database data is collected according to the selection criteria.
n The check logic establishes whether data records are archivable. It examines the residence times in
application-specific Customizing as well as specific additional internal check logic.
l :ULWHGDWDREMHFW$'.$3,XVHG
$UFKLYHBRSHQBIRUBZULWH
w 'R
w $UFKLYHBQHZBREMHFW
$UFKLYHBSXWBUHFRUG
7(;7B$5&+,9(B2%-(&7
$UFKLYLQJ)0EHORQJLQJWRDQDUFKLYLQJFODVV
w $UFKLYHBVDYHBREMHFW
w (QGGR
$UFKLYHBZULWHBVWDWLVWLFV
$UFKLYHBFORVHBILOH
SAP AG 2002
n ARCHIVE_NEW_OBJECT prepares a data container in the main memory. This function module
also ensures communication with any archiving classes.
n ARCHIVE_PUT_RECORD writes a record in the prepared data container.
n TEXT_ARCHIVE_OBJECT is the archiving function module for the archiving class TEXT. It is
used to collect archiving class data for an object and to store it in its own data area on the main
memory.
n In ARCHIVE_SAVE_OBJECT, ADK takes the records from the data container and compresses it.
From the archiving classes, ADK requests the compressed archiving class data for the object and
writes it to the ADK file. At present, ADK cannot subsequently decompress this data.
n ARCHIVE_CLOSE_FILE releases all resources and starts the delete program if Start autom. has
been selected in Customizing.
If you forget the Archive_Close_File, the last archive file is not closed.
l ,QWHUIDFHSDUDPHWHUH[SRUW
DUFKLYHBKDQGOH
l ,QWHUIDFHSDUDPHWHULPSRUW
FDOOBGHOHWHBMREBLQBWHVWBPRGHFUHDWHBDUFKLYHBILOH
REMHFWFRPPHQWV
l )XQFWLRQPRGXOHIXQFWLRQDOLW\
&UHDWHDUFKLYHILOHLQWKHILOHV\VWHP
&UHDWHDUFKLYHKDQGOH
SAP AG 2002
n ,QWHUIDFHSDUDPHWHULPSRUW
DUFKLYHBKDQGOH
l )XQFWLRQPRGXOHIXQFWLRQV
,QLWLDOL]HVDQHZGDWDREMHFW
'LVFDUGVWKHSURFHVVHGGDWD
SAP AG 2002
n This function module should always be called if a new data object is to be prepared for writing to an
archive.
n There can only be one data object per handle. When this function module is called, all of the data
from the current data object is forgotten, and all of the accompanying archiving classes are informed
that the following operations with this handle belong to a new data object.
n The archiving classes will forget all of the information about the current data object.
n The system does not check whether you have stored the current data object with the function module
ARCHIVE_SAVE_OBJECT.
l ,QWHUIDFHSDUDPHWHULPSRUW
DUFKLYHBKDQGOH
UHFRUGBIODJ
UHFRUGBVWUXFWXUH
UHFRUG
l )XQFWLRQPRGXOHIXQFWLRQV
:LWKWKLVIXQFWLRQPRGXOH\RXFDQWUDQVIHUDGDWD
UHFRUGWRWKHGDWDREMHFWWKDWZDVSUHYLRXVO\
UHTXHVWHGZLWKWKHIXQFWLRQPRGXOH
$5&+,9(B1(:B2%-(&7$OORIWKHGDWDUHFRUGVWKDW
\RXSDVVWRWKHGDWDREMHFWDUHZULWWHQWRJHWKHUWRWKH
DUFKLYHILOHZKHQ\RXFDOOWKHIXQFWLRQPRGXOH
$5&+,9(B6$9(B2%-(&7
SAP AG 2002
n The import parameter record_flag is available for any supplementary information. For example, FI
uses it to mark records that are to be deleted.
n The import parameter record_structure is given the name of the structure that is to be transferred.
This name must be stored in the structure definition in AOBJ.
n The actual transferred data is transferred to the import parameter record.
If the structure named under record_structure is not the same as the record in record_real, the
system may issue the runtime error Archive cannot be read
n For complex data objects, you might have to first read and analyse all of the data records, before you
can decide whether this data object is to be archived.
n You do not have to remember the data records, or even re-read the data records from the database.
You can use the function mode to transfer the data records to the data object immediately.
n If you realize that the data records that you transferred should not be archived, call the function
module ARCHIVE_NEW_OBJECT. This ensures that the data that you transferred is discarded.
The data that you transferred to the archiving classes for archiving is also discarded.
l ,QWHUIDFHSDUDPHWHULPSRUW
archive_handle
record_structure
l ,QWHUIDFHWDEOH
table
l )XQFWLRQPRGXOHIXQFWLRQDOLW\
With this function module, you transfer an internal table to the data
object that was called previously with the function module
ARCHIVE_NEW_OBJECT.
Each line of the internal table is placed in the data object as a
separate data record. All transferred data records are written
together to the archive file when you call the function module
ARCHIVE_SAVE_OBJECT
SAP AG 2002
n In the record_structure parameter, you enter the name of the name of the structure/table whose
objects are to be written.
n The data is transferred to an internal table via the table interface.
n If required, an archiving program typically selects all line items for one document in an internal
table. This internal table can be transferred, record by record, in its entirety to ADK.
l :ULWHVRQHUHFRUGHDFK l :ULWHVDUUD\RIUHFRUGV
l 0RUHFRGLQJ l /HVVFRGLQJUHTXLUHGDVQRORRS
FRQVWUXFWLRQ
l /RZHUSHUIRUPDQFHDVUHFRUGV
DUHSURFHVVHGSHUUHFRUG l %HWWHUSHUIRUPDQFHDVUHFRUGVQRW
ZULWWHQLQGLYLGXDOO\
SAP AG 2002
l ,QWHUIDFHSDUDPHWHUH[SRUW
DUFKLYHBQDPH
REMHFWBRIIVHW
l ,QWHUIDFHSDUDPHWHULPSRUW
DUFKLYHBKDQGOH
l )XQFWLRQPRGXOHIXQFWLRQDOLW\
7KLVIXQFWLRQPRGXOHZULWHVDGDWDREMHFWWRWKH
DUFKLYHILOH$VZHOODVWKHGDWDWUDQVIHUUHGZLWKWKH
IXQFWLRQPRGXOH$5&+,9(B387B5(&25'WKHGDWD
WKDWZDVWUDQVIHUUHGYLDWKHDUFKLYLQJFODVVHVZLOODOVR
EHWDNHQLQWRDFFRXQW
SAP AG 2002
n The export parameter object_offset enables you to find the object in the ADK archive file.
n The parameter archive_name returns the key for the ADK archive file.
n If the data object does not fit into the current archive file, the system closes the archive file and
opens a new archive file. The system then automatically calls the delete progam, unless this option
was switched off in transaction AOBJ "Customizing settings".
l ,QWHUIDFHSDUDPHWHULPSRUW
DUFKLYHBKDQGOH
VWDWLVWLFVBRQO\BSHUBUXQ
VWDWLVWLFVBRQO\BSHUBILOHIURP5HOHDVH
l )XQFWLRQPRGXOHIXQFWLRQDOLW\
:LWKWKLVIXQFWLRQPRGXOH\RXFDQFUHDWHVWDWLVWLFV
DERXWGDWDREMHFWVWKDW\RXKDYHZULWWHQWRDQDUFKLYH
ILOHXVLQJIXQFWLRQPRGXOH$5&+,9(B6$9(B2%-(&7
7KHVHVWDWLVWLFVDUHZULWWHQDVDOLVWDQGWKHUHIRUHDSSHDU
LQWKHDUFKLYLQJSURJUDPORJ
SAP AG 2002
n You can use the import parameter statistics_only_per_run to request totals statistics for the whole
arhiving session. The parameter statistics_only_per_file provides statistics for one archive file and
is, for this reason, only useful when used with a delete program.
n You must call this function module immediately before the function module
ARCHIVE_CLOSE_FILE , otherwise you will obtain incorrect values in the number fields.
n The size of the archive file in MB also appears in the output. If you run the archiving program for a
limited selection in test mode, you can use this output to estimate the required disk space.
l ,QWHUIDFHSDUDPHWHULPSRUW
DUFKLYHBKDQGOH
l )XQFWLRQPRGXOHIXQFWLRQDOLW\
7KHIXQFWLRQPRGXOHFORVHVWKHDUFKLYHILOH
7KHUHVRXUFHVZKLFKZHUHDOORFDWHGIRUDKDQGOHDUH
UHOHDVHG7KHKDQGOHLVWKHQLQYDOLGDQGFDQQRORQJHUEH
XVHG(YHU\DGGLWLRQDORSHUDWLRQZLWKWKLVKDQGOHWULJJHUV
WKHH[FHSWLRQ:521*B$&&(66B72B$5&+,9(
SAP AG 2002
n This function module is not only called when writing archives, but also within every ADK function.
REPORT sbooka.
* data declaration
TABLES: sbook.
DATA: button(1) TYPE c,
create(1) TYPE c VALUE X,
no_delete(1) TYPE c VALUE X,
handle LIKE sy-tabix,
sbook_itab TYPE TABLE OF sbook WITH HEADER LINE,
data_object_id LIKE arch_idx_s-obj_id.
SAP AG 2002
SAP AG 2002
LOOP AT sbook_itab.
CONCATENATE sy-mandt sbook_itab-carrid sbook_itab-bookid
INTO data_object_id.
SAP AG 2002
SAP AG 2002
l $UFKLYHBJHWBFXVWRPL]LQJBGDWD
l $UFKLYHBRSHQBIRUBGHOHWH
l 'R
Archive_get_next_object
Do
w Archive_get_next_record
Enddo
Archive_delete _object_data call archiving classes
If cut = cust_cut check commit counter
Perform Delete
endif
l (QGGR
l ,IFXW! SRVVLEOHUHPDLQLQJDPRXQWSURFHVVLQJ
3HUIRUP'HOHWH
HQGLI
l $UFKLYHBFORVHBILOH
SAP AG 1999
2002
n Function module ARCHIVE_GET_NEXT_OBJECT transfers the ADK data to the main memory.
n Form DELETE: Delete data from the database according to the read structure.
l ,QWHUIDFHSDUDPHWHUH[SRUW
FRPPLWBFRXQWBIRUBGHOHWHBSUJ
PDLQWDLQBLQGH[
l ,QWHUIDFHSDUDPHWHULPSRUW
REMHFWDUFKLYLQJREMHFW
l )XQFWLRQPRGXOHIXQFWLRQDOLW\
7KLVIXQFWLRQPRGXOHGHOLYHUVVHWYDOXHVIURPWKH
DUFKLYLQJREMHFW&XVWRPL]LQJWRWKHDUFKLYLQJSURJDP
&XUUHQWO\RQO\WKRVHYDOXHVDUHSDVVHGZKLFKDUH
LPSRUWDQWIRUWKHGHOHWHSURJUDP+RZHYHUWKH
FRXQWHUIRUWKH&RPPLW:RUNFDQDOVREHXVHGIRUWKH
UHORDGSURJDP
SAP AG 2002
l ,QWHUIDFHSDUDPHWHUH[SRUW
DUFKLYHBKDQGOH
l ,QWHUIDFHSDUDPHWHULPSRUW
REMHFW
WHVWBPRGH
l )XQFWLRQPRGXOHIXQFWLRQV
7KLVIXQFWLRQPRGXOHRSHQVDUFKLYHVWRGHOHWHIURP
WKHGDWDEDVHWKHGDWDWKH\FRQWDLQ7KHVWDWXVRIWKH
DUFKLYHILOHVLVPRGLILHGDFFRUGLQJO\LQDUFKLYH
DGPLQLVWUDWLRQ
SAP AG 2002
n The import parameter object specifies the name of the archiving object containing records for
deletion.
n The parameter test_mode specifies whether it is a live or test run. The parameter copies the
indicator from the relevant delete program variant that was specified on the selection screen of the
delete program.
n The parameter aindflag controls the interaction with the archive information system. All active
archive information structures are updated during the deletion run.
n Within the scope of the delete job, the function module ARCHIVE_CLOSE_FILE transfers, on
request, (technical settings in Customizing for the relevant archiving object) the archive files that
have been created using SAP ArchiveLink for storage to an external storage system.
l ,QWHUIDFHSDUDPHWHUH[SRUW
REMHFW$UFKLYLHUXQJVREMHNW
REMHFWBRIIVHW
DUFKLYHBQDPH
l ,QWHUIDFHSDUDPHWHULPSRUW
DUFKLYHBKDQGOH
l )XQFWLRQPRGXOHIXQFWLRQV
7KLVIXQFWLRQPRGXOHUHDGVWKHQH[WGDWDREMHFWIRUD
KDQGOHIURPDQDUFKLYHWKDWKDVEHHQRSHQHGIRU
UHDGDFFHVV
SAP AG 2002
n The import parameter object contains the name of the archive objects processed.
n The parameters archive_offset and archive_name are relevant for writing an index.
n The data belonging to an archiving class is automatically passed on to the relevant archiving class.
This means that the data can be called by the archiving class immediately after the function module
has been called. Long texts and change documents are typical archiving classes.
You can only use function modules ARCHIVE_GET_NEXT_RECORD and
ARCHIVE_GET_NEXT_STRUCT_SPECIF to access data once a data object has been read from an
archive.
n The same functions are present in this function module as in the function module
ARCHIVE_OPEN_FOR_READ , because a new archive file is automatically opened for read access
when the current file has been read completely. This means that the same exceptions can be triggered
as in the function module ARCHIVE_OPEN_FOR_READ. You should take this into account when
writing your programs.
l ,QWHUIDFHSDUDPHWHUH[SRUW
UHFRUG
UHFRUGBVWUXFXUH
l ,QWHUIDFHSDUDPHWHULPSRUW
DUFKLYHBKDQGOH
DXWRPDWLFBFRQYHUVLRQ
SAP AG 2002
n The export parameter record contains the name of the work area into which the data is to be
imported.
n Record_structure contains the name of the table or structure that is being processed.
n The data record that is returned by the ADK is unstructured and must be copied into a suitable work
structure.
n When ARCHIVE_GET_NEXT_RECORD is called, temporary automatic conversion takes place, if
required, such as adjustment of structure changes; adjustments to heterogeneous system
environments (codepage), and so on.
l )XQFWLRQPRGXOHIXQFWLRQDOLW\
7KLVIXQFWLRQPRGXOHDOORZV\RXWRUHDGVHTXHQWLDOO\WKH
GDWDUHFRUGVFRQWDLQHGLQDGDWDREMHFW
$WWKHILUVWFDOODIWHUWKHIXQFWLRQPRGXOH
$5&+,9(B*(7B1(;7B2%-(&7KDVEHHQFDOOHGWKHILUVW
GDWDUHFRUGLVDXWRPDWLFDOO\UHWXUQHGDQGIURPWKHQRQ
HDFKIXUWKHUUHFRUGLVUHWXUQHGXQWLOWKHUHDUHQRPRUH
UHFRUGVWREHUHDGIURPWKHGDWDREMHFW
SAP AG 2002
n To read an archive file sequentially, it is sufficient to read the next data object in an external DO-
loop using function module ARCHIVE_GET_NEXT_OBJECT so that function module
ARCHIVE_GET_NEXT_RECORD can read the data object in an internal DO-loop.
l ,QWHUIDFHSDUDPHWHULPSRUW
DUFKLYHBKDQGOH
l )XQFWLRQPRGXOHIXQFWLRQDOLW\
7KLVIXQFWLRQPRGXOHFDOOVWKHGHOHWHPHWKRGVIRU
DOORIWKHUHJLVWHUHGDUFKLYLQJFODVVHVEHORQJLQJWR
WKHDUFKLYLQJREMHFW7KHDUFKLYHGGDWDIURPDOO
FODVVHVLVWKHQDXWRPDWLFDOO\GHOHWHGIURPWKH
GDWDEDVH
SAP AG 2002
n The function module ARCHVE_GET_NEXT_OBJECT must be called for each object - GLUHFWO\LQ
WKHORRS
n The ADK API of the archiving objects themselves does not provide any delete methods. You must
progam and call this functionality yourself.
This means that you must use the delete program to delete from the database all of the data that was
written to data objects in the archiving progam by ARCHIVE_PUT_RECORD.
REPORT sbookd.
* data declaration
CONSTANTS:
object LIKE arch_obj-object VALUE BC_SBOOK.
DATA:
handle LIKE sy-tabix,
buffer TYPE arc_buffer,
sel_files_itab TYPE TABLE OF arch_files,
sbook_wa LIKE sbook,
sbook_itab TYPE TABLE OF sbook,
commit_cnt LIKE arch_usr-arch_comit,
object_cnt TYPE i,
arkey LIKE arch_idx_s-archivekey,
object_id LIKE arch_idx_s-obj_id,
offset LIKE arch_idx_s-obj_offset,
index_tab TYPE TABLE OF arch_idx_s WITH HEADER LINE,
index_flag LIKE arch_usr-arch_index,
sum_objects TYPE i VALUE 0,
stat_itab TYPE TABLE OF arch_stat,
tabfield LIKE arch_stat.
SAP AG 2002
SAP AG 2002
* loop to get the next data object from the archive file(s)
CLEAR object_cnt.
DO.
ADD 1 TO object_cnt.
CALL FUNCTION ARCHIVE_GET_NEXT_OBJECT
EXPORTING
archive_handle = handle
IMPORTING
object_id = object_id
object_offset = offset
archive_name = arkey
EXCEPTIONS
end_of_file = 01.
SAP AG 2002
IF sy-subrc = 1.
EXIT.
ENDIF.
IF index_flag IS INITIAL.
* no index is to be built according to customizing
ELSEIF testrun IS INITIAL.
MOVE: object_id TO index_tab-obj_id,
arkey TO index_tab-archivekey,
offset TO index_tab-obj_offset.
APPEND index_tab.
PERFORM save_index_tab ON COMMIT.
ENDIF.
SAP AG 2002
* provide statistics
tabfield-tabname = .
tabfield-count = sum_objects.
APPEND tabfield TO stat_itab.
tabfield-tabname = SBOOK.
APPEND tabfield TO stat_itab.
CALL FUNCTION ARCHIVE_GIVE_STATISTICS
EXPORTING
archive_handle = handle
TABLES
table = stat_itab.
SAP AG 2002
* write statistics
CALL FUNCTION ARCHIVE_WRITE_STATISTICS
EXPORTING
archive_handle = handle
statistics_only_per_file = X.
SAP AG 2002
*---------------------------------------------------------------------*
* FORM DELETE_FROM_TABLE *
*---------------------------------------------------------------------*
* global: sbook_itab, sum_objects
*---------------------------------------------------------------------*
FORM delete_from_table.
DATA: tabcount TYPE i VALUE 0.
DELETE sbook FROM TABLE sbook_itab. " delete job restartable
COMMIT WORK.
SAP AG 2002
n Commit Work then triggers the actual deletion of data from the archiving classes.
The delete routine belonging to the archiving classes is called via a Perform ... On Commit, that is
the actual deletion only takes place at a database commit.
n The collection of data belonging to an archiving class which is to be deleted, occurs via a call of
ARCHIVE_DELETE_OBJECT_DATA. This function module is started once per call of
ARCHIVE_GET_NEXT_OBJECT .
*---------------------------------------------------------------------*
* Form SAVE_INDEX_TAB *
*---------------------------------------------------------------------*
* global: index_tab *
*---------------------------------------------------------------------*
FORM save_index_tab.
DELETE arch_idx_s FROM TABLE index_tab.
INSERT arch_idx_s FROM TABLE index_tab.
REFRESH index_tab.
ENDFORM. " SAVE_INDEX_TAB
SAP AG 2002
l $UFKLYHBJHWBLQIRUPDWLRQ
l $UFKLYHBRSHQBIRUBPRYH
SAP AG 1999
2002
n Archive_get_information
This function module enables you to determine the latest information about an archive handle. This
includes the question of when the archive files were written, what their underlying structure is, and
so on.
This data is important, for example, for tailoring your own reporting programs if a table s data
structure has changed.
n Archive_open_for_move
This function module enables you to read archive files in order to write data objects from these
archive files to new archive files. You must call it if you want to reload individual data objects from
archive files to the R/3 System.
FXVWRPHU
VSHFLILF
$ =WDEOH
3 FXVWRPHU =&
VWDQGDUG VWDQGDUG VWDQGDUG
3 VSHFLILF LQGHSHQGHQW
WDEOH WDEOH WDEOH
( =WDEOH RI
$ % &
1 === VWDQGDUG
' WDEOH&
([WHQVLRQQRW
&UHDWHFXVWRPHUVSHFLILF ([WHQVLRQQHFHVVDU\
DOZD\VQHFHVVDU\
DUFKLYLQJREMHFW FRQWDFW\RXU6$3
FRQVXOWDQW
SAP AG 2002
n 1RWH
In R/3 standard tables, you are only allowed to delete using R/3 standard programs!
l /LVWWKHPRGLILFDWLRQVWKDWKDYHEHHQFDUULHGRXW
l $QDO\VHWKHPRGLILFDWLRQVWRVHHZKHWKHUFKDQJHVDUH
UHTXLUHGWRH[LVWLQJDUFKLYLQJREMHFWVRUDUFKLYLQJFODVVHV
l &DWHJRUL]HWKHFXVWRPHUVSHFLILFWDEOHVZLWKWKHKHOSRIWKH
GDWDPRGHOXVHG
ZKHUHGRHVWKHWDEOHVLWLQWKHGDWDPRGHO
l &KHFNZKHWKHUGHSHQGHQFLHVRQRWKHUDUFKLYLQJREMHFWV
KDYHEHHQFUHDWHG
SAP AG 1999
2002
n 1RWH:
To ensure that the standard archiving progams continue to function correctly, the extensions must be
carried out in the customer namespace in a new progam.
n 1RWH:
When extending a standard archiving object, ensure that the performance of the standard archiving
progam is not reduced.
l 6WDUWLQJSRLQW
New dependencies by introducing new documents
New dependencies due to customer-specific requirements
l 3RVVLEOHFRQVHTXHQFHV
Maintain new checks in existing archiving programs:
User exits possible for SD archiving objects
Update the network graphic for documentation
SAP AG 2002
n Some industry-specific requirements call for modifications to the transport process. For example, in
IS-OIL, it was necessary, to introduce a new delivery-related document. Delivery documents must
not be archived until the new subsequent document has been closed.
n User exits in SD are discussed in course BC660.
l 6WDUWLQJSRLQW
New fields were inserted into the standard tables using the
Append/Include technique
l &RQVHTXHQFHV
As long as the archiving object or archiving classes write the
original table entries, no changes are required to write or delete
programs.
Analysis programs must be adjusted in case the fields have to be
displayed.
Check whether dependencies have arisen.
SAP AG 2002
n Check the archiving program to see whether structures are written instead of the original tables. If so,
the archiving program transfers the table entries to these structures. In this case, the archiving
program and the structures must be adjusted in line with the changed data.
l 6WDUWLQJSRLQW
Information on standard documents is stored in customer-specific
tables
l &RQVHTXHQFHV
Use transaction AOBJ to extend the archiving object structure to
include customer-specific tables
Copy and adjust the write- and delete progams
Copy and adjust the reporting progam (optional)
Monitor potential new dependencies
SAP AG 2002
l $GGRQ,62,/
)RUJRRGVPRYHPHQWVLQWKHRLOLQGXVWU\\RXPXVWHQWHU
WHPSHUDWXUHDQGGHQVLW\GDWDLQWKHGDWDEDVHIRUHYHU\
PDWHULDOLWHP
7KLVGDWDLVVWRUHGLQLWVRZQWDEOHZKLFKPXVWEHDUFKLYHG
DQGGHOHWHGWRJHWKHUZLWKWKHVWDQGDUGWDEOHV0.3)DQG
06(*
SAP AG 1999
2002
l 6WDQGDUGGDWDPRGHO
0.3)
!06(*
l ([WHQGHGGDWDPRGHO,62,/
0.3)
!06(*
!06(*2
!06(*2
SAP AG 2002
n In the above data model of MM-data, there is also NAST data. Within the context of data archiving,
this data is deleted only.
l $QDO\]HGHSHQGHQFLHV
SAP AG 2002
1999
l $QDO\]HWKHVWDQGDUGDUFKLYLQJSURJUDPZLWKUHIHUHQFHWR
IORZORJLFDQGSHUIRUPDQFHRSWLPL]DWLRQ
3URJUDPVHDUFKHVIRUWKHRSWLPXPVWUDWHJ\WRVHOHFWWKH
GRFXPHQWVWREHDUFKLYHG
VHOHFWLRQYLDKHDGHURULWHPGDWD
,IWKHVHOHFWLRQXVHVLWHPGDWDWKHV\VWHPXVHVDGDWDEDVH
YLHZ
3URJUDPZRUNVZLWKG\QDPLF64/
3URJUDPUHGHWHUPLQHVWKHVHOHFWLRQFULWHULDWRNHHSWKHGDWD
IRUVHOHFWLRQWRDPLQLPXP
3URJUDPZRUNVZLWKFHQWUDODXWKRUL]DWLRQFKHFNLQJWRUHVWULFW
WKHDPRXQWRIGDWDWREHVHOHFWHGDQGSURFHVVHG
3URJUDPZULWHVKHDGHUGDWDLQGLYLGXDOO\ZLWK
$5&+,9(B387B5(&25'DQGDOOLWHPGDWDIURPDGRFXPHQW
ZLWK$5&+,9(B387B7$%/(
SAP AG 1999
2002
n 1RWH: From a check logic viewpoint, MM_MATBEL should be seen as a simply structured
archiving object.
l $GMXVWPHQWVWRVWDQGDUGDUFKLYLQJSURJUDP
,QVHUWUHTXLUHGGDWDGHILQLWLRQ
,QVHUWSURFHVVLQJORJIRUQHZGDWD
,QVHUWVHOHFWLRQRIQHZGDWD
,QVHUWDUFKLYDELOLW\FKHFNV
,QVHUWWKHZULWLQJRIWDEOHUHFRUGVLQWKHDUFKLYHILOHVDIWHUWKH
DVVLJQHGWDEOHVKDYHEHHQZULWWHQLQWKHVWDQGDUGV\VWHP
SAP AG 1999
2002
l $GMXVWPHQWVWRVWDQGDUGGHOHWHSURJUDP
,QVHUWUHTXLUHGGDWDGHFODUDWLRQ
)LOOWKHLQWHUQDOWDEOHVIRUQHZGDWDDIWHUGDWDKDVEHHQUHDG
IURPWKHDUFKLYHILOHV
w 3URJUDPPLQJVLPLODUWRVWDQGDUGWDEOHSURFHVVLQJ
w 7KHQHZSURJDPFRGHLVLQVHUWHGEHKLQGWKHSURFHVVLQJRI
WKHPDVWHUWDEOH
,QVHUWDGHOHWHVHTXHQFHIRUWKHQHZGDWD
w 3URJUDPPLQJVLPLODUWRVWDQGDUGWDEOHSURFHVVLQJ
w 7KHQHZSURJDPFRGHLVLQVHUWHGEHKLQGWKHSURFHVVLQJRI
WKHPDVWHUWDEOH
SAP AG 1999
2002
n In some cases, data has to be deleted only. Such data is not transferred to the archive file, but simply
deleted from the database. An example of this is the message control data for MM and SD
documents.
l $GMXVWLQJWKHDUFKLYLQJSURJUDPV
&RS\WKHVWDQGDUGSURJUDPLQWKHFXVWRPHUQDPHVSDFH
$QDO\]HWKHDUFKLYLQJSURJUDPFDUHIXOO\
'HWHUPLQHWRZKLFKDOUHDG\DUFKLYHGWDEOHWKHQHZWDEOH
ORJLFDOO\EHORQJV
'HWHUPLQHZKHUHLQWKHDUFKLYLQJSURJUDPWKHPDVWHUWDEOHLV
SURFHVVHG
([WHQGWKHGHILQLWLRQRIWKHUHTXLUHGGDWDVWUXFWXUHV
([WHQGWKHVHOHFWLRQRIGDWDIURPWKH=WDEOH
,IQHFHVVDU\H[WHQGWKHDUFKLYDELOLW\FKHFNV
([WHQGWKHWUDQVIHURIGDWDIURPWKH=WDEOHWR$'.
SAP AG 1999
2002
n 1RWH A careful analysis of the archiving program is essential, because the programs are generally
optimized with regard to performance.
To avoid problems in future, check that the performance of the write and delete programs is still
satisfactory after the new tables have been added.
n User exits are not offered so that performance can be further optimized and new structures can be
included in the standard system at any time.
n New developments may lead to future changes in the underlying program logic of the standard
archiving objects. For example, the SD document programs have already been redesigned.
l $GMXVWLQJWKHGHOHWHSURJUDP
'HWHUPLQHWKHSRLQWDWZKLFKWKHGDWDUHFRUGVDUHWREH
GHOHWHG
w &$6(VWUXFWXUHDIWHUFDOOLQJWKHIXQFWLRQPRGXOH
$5&+,9(B*(7B1(;7B5(&25'
w /LVWRIGHOHWHFDOOV
([WHQGWKHGHOHWHFDOOVWRLQFOXGH\RXURZQWDEOHV
SAP AG 1999
2002
l $GMXVWLQJDUHSRUWLQJSURJUDPRSWLRQDO
([WHQGLQJWKHRXWSXWVWUXFWXUH
([WHQGLQJWKHRXWSXWRIWKHGDWD
SAP AG 1999
2002
l :HUHFRPPHQGWKDW\RXGRQRWH[WHQGDVWDQGDUG
DUFKLYLQJREMHFW
l ,IWKLVLVXQDYRLGDEOHFRQWDFW\RXU6$3FRQVXOWDQW
l 5HFRPPHQGHGSURFHGXUH
8VHDFXVWRPHUVSHFLILFDUFKLYLQJREMHFWWRDUFKLYH\RXURZQ
<RU=WDEOHVWKDWEHORQJWRDVWDQGDUGDUFKLYLQJREMHFW
:ULWHUHSRUWVWKDWUHDGDQGPHUJHWKHDUFKLYHILOHVEHORQJLQJ
WRWKHVWDQGDUGREMHFWDQGWRFXVWRPHUVSHFLILFREMHFW
SAP AG 1999
2002
n After modifying a standard archiving object, you should check whether the same level of throughput
performance can be maintained as before you made the modification.
<RXQRZNQRZ
l 7KHORJLFRIDQDUFKLYLQJSURJDP
l 7KHORJLFRIDGHOHWHSURJDP
l 3URFHGXUHIRUFUHDWLQJDQHZ
DUFKLYLQJREMHFW
l 3URFHGXUHIRUH[WHQGLQJDQ
DUFKLYLQJREMHFW
SAP AG 2002
8QLW3URJUDP/RJLFLQ'DWD$UFKLYLQJ
7RSLF$UFKLYLQJ67,&.(7
1-1 Create an archiving program for STICKET. Use program SBOOKA as template.
Program name: ZBCSTICKxxA. XX stands for your group number.
Type: Executable program
Status: Test program
Application: Basis
1-1-1 Create an archiving program that archives records from the table STICKET.
1-1-3 Write an archive file only if the parameter has been set as follows.
Sequence of function modules:
Open archive file for write job
Initialize new data object
Transfer data record
Save data object
1-1-4 Ensure that the statistics are written with the standard statistics module before
you close the archive file.
2-1-1 Enter a parameter that determines whether the deletion run is to be a test run, or
whether data is really to be deleted.
8QLW'DWD$UFKLYLQJ3URJUDPPLQJ/RJLF
7RSLF&XVWRPL]LQJDQG7HVWLQJ%&67,&.[[
1-1 Create the archiving object ZBCSTICKxx. (XX represents your group number.)
1-1-3 Publicize the structure definitions: You are processing the table STICKET
1-1-4-2 Enter the file size 100 MB and leave the number of objects blank
1-1-4-3 After data archiving, the file is not going to be stored in an external
optical archive.
1-1-4-4 Do not start the delete program immediately, but rather manually.
Create 2 delete program variants: TESTxx for a test delete run and
PRODxx for the production delete run
2-2-1 In the Archive Information System, create an archive information structure for
your newly created archiving object.
Fill your archive information structure with the data from your archiving
session.
8QLW'DWD$UFKLYLQJ3URJUDPPLQJ/RJLF
7RSLF$UFKLYLQJ67,&.(7
GDWDGHFODUDWLRQ
7$%/(667,&.(7
'$7$%877217<3(&
&5($7(7<3(&9$/8(
;
12B'(/(7(7<3(&9$/8(
;
+$1'/(/,.(6<7$%,;
67,&.(7B,7$%7<3(7$%/(2)67,&.(7:,7++($'(5/,1(
VHOHFWLRQFULWHULDDQGSDUDPHWHUV
6(/(&7,216&5((1%(*,12)%/2&.$5&+B%22.,1*:,7+)5$0(7,7/(7(;7
6(/(&7237,2162B&$55,')2567,&.(7&$55,'
'()$8/7
/+
2B%22.,')2567,&.(7%22.,'
6(/(&7,216&5((1(1'2)%/2&.$5&+B%22.,1*
6(/(&7,216&5((1%(*,12)%/2&.$5&+B&21752/:,7+)5$0(7,7/(7(;7
3$5$0(7(5612B),/(/,.(%877215$',2%87721*52835$',
'(/B7(67/,.(%877215$',2%87721*52835$','()$8/7
;
'(/B352'/,.(%877215$',2%87721*52835$',
6(/(&7,216&5((1(1'2)%/2&.$5&+B&21752/
3$5$0(7(56&200(1767<3($'0,B7(;7/2:(5&$6(
'()$8/7
7KLVLVWHVWGDWDIRUDUFKLYLQJZLWK%&B6%22.
FUHDWHFXUVRUIRUGDWDVHOHFWLRQ
'$7$'%B&856257<3(&85625
23(1&85625:,7++2/''%B&85625)25
6(/(&7
)52067,&.(7
:+(5(&$55,',12B&$55,'$1'
%22.,',12B%22.,'
EXLOG$'.SDUDPHWHUVIURPFKRVHQEXWWRQ
,)12B),/(
;
&5($7(
12B'(/(7(
(1',)
,)'(/B7(67
;
&5($7(
;
12B'(/(7(
;
(1',)
,)'(/B352'
;
&5($7(
;
12B'(/(7(
(1',)
RSHQDQHZDUFKLYHVHVVLRQWRDUFKLYHGDWD
&$//)81&7,21
$5&+,9(B23(1B)25B:5,7(
(;3257,1*
&$//B'(/(7(B-2%B,1B7(67B02'( 12B'(/(7(
&200(176 &200(176
&5($7(B$5&+,9(B),/( &5($7(
2%-(&7
=%&67,&.
LQLWLDOL]HDQHZGDWDREMHFW
&$//)81&7,21
$5&+,9(B1(:B2%-(&7
(;3257,1*
$5&+,9(B+$1'/( +$1'/(
SXWGDWDUHFRUGVLQWR$'.
VGDWDFRQWDLQHU
&$//)81&7,21
$5&+,9(B387B7$%/(
(;3257,1*
$5&+,9(B+$1'/( +$1'/(
5(&25'B6758&785(
67,&.(7
7$%/(6
7$%/( 67,&.(7B,7$%
ZULWHGDWDREMHFWLQWRWKHDUFKLYHILOH
&$//)81&7,21
$5&+,9(B6$9(B2%-(&7
(;3257,1*
$5&+,9(B+$1'/( +$1'/(
(1''2
FORVHGDWDEDVHFXUVRU
&/26(&85625'%B&85625
FUHDWHWKHGHIDXOWVSRROOLVW
&$//)81&7,21
$5&+,9(B:5,7(B67$7,67,&6
(;3257,1*
$5&+,9(B+$1'/( +$1'/(
FORVHWKHDUFKLYHVHVVLRQ
&$//)81&7,21
$5&+,9(B&/26(B),/(
(;3257,1*
$5&+,9(B+$1'/( +$1'/(
GDWDGHFODUDWLRQ
&2167$176
2%-(&7/,.($5&+B2%-2%-(&79$/8(
=%&67,&.
'$7$
+$1'/(/,.(6<7$%,;
%8))(57<3($5&B%8))(5
67,&.(7B:$/,.(67,&.(7
67,&.(7B,7$%7<3(7$%/(2)67,&.(7
5(&25'B,7$%7<3(7$%/(2)67,&.(7
&200,7B&17/,.($5&+B865$5&+B&20,7
2%-(&7B&177<3(,
680B2%-(&767<3(,9$/8(
67$7B,7$%7<3(7$%/(2)$5&+B67$7
7$%),(/'/,.($5&+B67$7
3$5$0(7(567(67581'()$8/7
;
$6&+(&.%2;GRQRWGHOHWH
IURPGDWDEDVH
RSHQDQHZDUFKLYHVHVVLRQWRGHOHWHGDWD
&$//)81&7,21
$5&+,9(B23(1B)25B'(/(7(
(;3257,1*
2%-(&7 2%-(&7
7(67B02'( 7(67581
,03257,1*
$5&+,9(B+$1'/( +$1'/(
(;&(37,216
27+(56
,)6<68%5&!
:5,7(
1RILOHFDQEHDFFHVVHG
(;,7
(1',)
JHWFXVWRPL]LQJGDWDIURPWKHDUFKLYHREMHFW
&$//)81&7,21
$5&+,9(B*(7B&86720,=,1*B'$7$
(;3257,1*
2%-(&7 2%-(&7
,03257,1*
&200,7B&2817B)25B'(/(7(B35* &200,7B&17
ORRSWRJHWWKHQH[WGDWDREMHFWIURPWKHDUFKLYHILOHV
&/($52%-(&7B&17
'2
$''722%-(&7B&17
&$//)81&7,21
$5&+,9(B*(7B1(;7B2%-(&7
&$//)81&7,21
$5&+,9(B*(7B7$%/(
(;3257,1*
$5&+,9(B+$1'/( +$1'/(
5(&25'B6758&785(
67,&.(7
$//B5(&25'6B2)B2%-(&7
;
7$%/(6
7$%/( 5(&25'B,7$%
$33(1'/,1(62)5(&25'B,7$%7267,&.(7B,7$%
,)7(67581,6,1,7,$/$1'2%-(&7B&17 &200,7B&17
3(5)250'(/(7(B)520B7$%/(DFWXDOGHOHWHIURPGDWDEDVH
&/($52%-(&7B&17UHVWDUWFRXQWLQJXSWR
(1',)YDOXHRIFRPPLWFRXQWHU
(1''2
,)7(67581,6,1,7,$/$1'2%-(&7B&17!
3(5)250'(/(7(B)520B7$%/(GHOHWLQJODVWSDFNDJH
(1',)
SURYLGHVWDWLVWLFV
7$%),(/'7$%1$0(
7$%),(/'&2817 680B2%-(&76
$33(1'7$%),(/'7267$7B,7$%
7$%),(/'7$%1$0(
67,&.(7
$33(1'7$%),(/'7267$7B,7$%
&$//)81&7,21
$5&+,9(B*,9(B67$7,67,&6
(;3257,1*
$5&+,9(B+$1'/( +$1'/(
7$%/(6
7$%/( 67$7B,7$%
ZULWHVWDWLVWLFV
&$//)81&7,21
$5&+,9(B:5,7(B67$7,67,&6
(;3257,1*
$5&+,9(B+$1'/( +$1'/(
67$7,67,&6B21/<B3(5B),/(
;
(;3257,1*
$5&+,9(B+$1'/( +$1'/(
)250'(/(7(B)520B7$%/(
JOREDO67,&.(7BLWDEVXPBREMHFWV
)250'(/(7(B)520B7$%/(
'$7$7$%&28177<3(,9$/8(
'(/(7(67,&.(7)5207$%/(67,&.(7B,7$%GHOHWHMREUHVWDUWDEOH
&200,7:25.
'(6&5,%(7$%/(67,&.(7B,7$%/,1(67$%&2817
680B2%-(&76 680B2%-(&767$%&2817
5()5(6+67,&.(7B,7$%
(1')250'(/(7(B)520B7$%/(
Productive: no entry
Button <Spoolparameter>
Printer: LP01
Hardware type: printer
Save and return to initial screen Create archive files
Button <execute>
The system will create the archiving jobs.
Monitor jobs with button <Job overview>
Return to screen: Archive management: entry screen
&RQWHQWV
l /RJLFRIVHTXHQWLDOUHDGSURJDPV
l /RJLFRIUHDGLQJIURPDUFKLYLQJFODVVHV
l &UHDWLQJDVHTXHQWLDOUHDGSURJUDPZLWKDQGZLWKRXW
DUFKLYLQJFODVVHV
SAP AG 2002
$WWKHFRQFOXVLRQRIWKLVXQLW\RXZLOOEHDEOHWR
l &UHDWHDVHTXHQWLDOUHDGSURJUDP
l 'LVSOD\DUFKLYLQJFODVVHVLQDUHDGSURJUDP
SAP AG 1999
2002
&RXUVH2YHUYLHZ
7KH'DWD$UFKLYLQJ3URFHVV
$'.'HYHORSPHQW7RROV
'DWD$UFKLYLQJ3URJUDPPLQJ/RJLF
&XVWRPHU6SHFLILF5HDG3URJUDPV
%XVLQHVV9LHZVLQ6$3$6
$SSHQGL[
SAP AG 2002
l <RXKDYHWRFUHDWHFXVWRPHUVSHFLILFUHDG
SURJUDPVIRU\RXURZQDUFKLYLQJREMHFWVDVZHOO
DVIRUVWDQGDUG5DUFKLYLQJREMHFWV
l 7KHSURJUDPPHUVKDYHWROHDUQWKHORJLFRIUHDG
SURJUDPV
l 7KHQHZUHDGSURJUDPVPXVWDOVREHDEOHWRUHDG
DQGGLVSOD\DUFKLYLQJFODVVHV
SAP AG 1999
2002
l 'LUHFWDFFHVVWRDGRFXPHQWIURPWKHDSSOLFDWLRQ
),B'2&8017DQG00B0$7%(/
l $UFKLYH,QIRUPDWLRQ6\VWHP6$3$6
l $%$3(YDOXDWLRQUHSRUWV
UHWULHYHGIURPWKHDSSOLFDWLRQ
FXVWRPHUVSHFLILFUHSRUWV
SAP AG 1999
2002
n Single document access from the application is available for FI DOCUMNT, and from Release 4.0,
from MATBEL.
n Programs for reporting archive files are provided by the application and are available in transaction
SARA.
l $UFKLYHBRSHQBIRUBUHDG
l $UFKLYHBJHWBQH[WBREMHFW
Archive_get_next_record
l $UFKLYHBFORVHBILOH
SAP AG 1999
2002
n The read logic in delete programs is similar to that in read programs. The function module
ARCHIVE_OPEN_FOR_DELETE is replaced with ARCHIVE_OPEN_FOR_READ.
l ,QWHUIDFHSDUDPHWHUH[SRUW
object (archiving object)
l ,QWHUIDFHSDUDPHWHULPSRUW
archive_handle (pointer to the selected archiving sessions)
l )XQFWLRQPRGXOHIXQFWLRQDOLW\
Authority-Check on S_ARCHIVE
Prepares and dsiplays a dialog box that displays all archiving
sessions: The user selects the relevant archiving session.
Creates Archive_handle
SAP AG 2002
l ,QWHUIDFHSDUDPHWHUH[SRUW
archive_handle (pointer to the selected archiving sessions)
l ,QWHUIDFHSDUDPHWHULPSRUW
object_offset (where is the object in the archive file)
archive_name (key to the archive file)
l )XQFWLRQPRGXOHIXQFWLRQV
Reads the first or next data object and transfers the data
from the archive to ADK.
l ([FHSWLRQ(QGRIILOH
SAP AG 2002
n The function module reads the next data object in the archive file.
n Information such as object_offset and archive_name are necessary if SAP AS is to be able to access
a document directly.
n The information defined here is relevant for direct access to a document using the function module
ARCHIVE_READ_OBJECT (see unit Direct access via SAP AS).
n The function module operates in the same way, regardless of whether it is called from a read, delete
or reload program.
l ,QWHUIDFHSDUDPHWHUH[SRUW
archive_handle (pointer to the selected archiving sessions)
l ,QWHUIDFHSDUDPHWHULPSRUW
record (content of an individual table record in the object)
record_structure (table name, from which record is taken)
l )XQFWLRQPRGXOHIXQFWLRQDOLW\
Retrieves the table records belonging to an object in a buffer
area
l ([FHSWLRQ(QGRIREMHFW
SAP AG 2002
l ,QWHUIDFHSDUDPHWHULPSRUW
archive_handle
record_structure
all_records_of_object
automatic_conversion
l ,QWHUIDFH7DEOH
Table
l Function module functions
This function module was developed to simplify the implementation of
the read operation. Several data records are read for the structure that
is specified with record_structure and then stored in an internal table.
SAP AG 2002
n The parameter record_structure transfers the name of the structure or table containing the objects to
be read.
n ALL_RECORDS_OF_OBJECT = ''
In this case, the function module functions in a similar way to the function module
ARCHIVE_GET_NEXT_STRUCT_SPECIF.
All records are simply read sequentially for the specified structure until the structure changes. All
read data records are placed in the internal table TABLE.
Reading continues with ARCHIVE_GET_NEXT_RECORD. This automatically reads the next
unread data record. Similarly, when the function module ARCHIVE_GET_TABLE is called, it reads
from the next unread data record.
n ALL_RECORDS_OF_OBJECT =X
In this case, the function module reads all data records for the specified structure in the whole data
object. The data objects read are stored in table TABLE. It does not matter if between the data
records with the specified structure RECORD_STRUCTURE there are data records with other
structures. All data records for the specified structure are collected in the current data object,
regardless of their place in the current data object.
Further reading is possible with ARCHIVE_GET_NEXT_RECORD. In this case, regardless of the
data records that were read with ARCHIVE_GET_TABLE; the next data record is read from when
ARCHIVE_GET_NEXT_RECORD was called. If ARCHIVE_GET_NEXT_RECORD was not yet
called, the first data record is read.
l 5HDGVRQHUHFRUG l 5HDGVDUUD\RIUHFRUGV
l 0RUHFRGLQJUHTXLUHGVLQFH l %\GHIDXOWVXSSOLHVDOOUHFRUGVRI
&$6(TXHU\PXVWEHSURFHVVHG WKHVDPHW\SHWKDWRFFXULQ
VHTXHQFHLQWKH$'.ILOHLQDILOH
l 2SHUDWLRQVLQPDLQPHPRU\
!/HVVFRGLQJ
0RYHGDWDWRZRUNDUHD
!ORZHUVSHUIRUPDQFH l 3HUIRUPDQFHLPSURYHGZLWKPDVV
SURFHVVLQJ
SAP AG 2002
n The parameter DOOUHFRUGV enables all records to be read that belong to a specific type, regardless of
whether they are arranged sequentially in the ADK file or not.
n The records are made available to the read program in the same sequence as they were transferred by
PUT_RECORD or PUT_TABLE.
l ,QWHUIDFHSDUDPHWHUH[SRUW
archive_handle (pointer to the selected archiving sessions)
l )XQFWLRQPRGXOHIXQFWLRQDOLW\
Closes the archive file
Releases the resources of an archive handle
SAP AG 2002
n The archive handle is invalid after the function module is run and cannot be reused. Each additional
operation with this handle triggers the exception WRONG_ACCESS_TO_ARCHIVE .
$7DEOH
%7DEOH
&7DEOH
[
/02143 576'89 :46;$8<- /8/6=
$%$3SURJUDP
ZLWKLQWHUQDO ^ 'DWDFRQWDLQHUZLWK
WDEOHV
> 4> K @LCM NOQPSRGOTUP'V9O+WT+P K OX@Y K9Z FXUUHQWGDWDREMHFW
$
^ %
? 4> K @LCM NOQPSRGOTUP'V9O+WT+P K XO @Y 9K Z $UFKLYH
% ILOH
^ % F/021G3 576C8HF6$I-8;6".4I-8 J
960GI
4> K @LCM NOQPSRGOTUP'V9O+WT+P K XO @Y 9K Z &
@ \
&
] /A0B13 576C890
D- 2E6C8<"3%D96
SAP AG 2002
n Step 1: Check whether the named archive file is available. Open files.
n Step 2: The first object is transferred from the archive file to an area in the main memory that
is only accessible to ADK.
n Step 3: From the main memory area, the object is transferred record by record to a variable of
the read program. The contents of the variables of the read program. The contents of the
variables can then be processed as required.
n You can work with ARCHIVE_GET_TABLE as well as with ARCHIVE_GET_NEXT_RECORD.
'HFODUDWLRQ
,QWHUQDOWDEOHVLWDE$LWDE%LWDE&
RSHQH[LVWLQJDUFKLYHILOHVIRUUHDGDFFHVV
$5&+,9(B23(1B)25B5($'
H[SRUWDUFKLYLQJREMHFW
LPSRUWDUFKLYHBKDQGOH
UHDGQH[WREMHFWIURPDUFKLYHILOHLQ$'.GDWDFRQWDLQHU
$5&+,9(B*(7B1(;7B2%-(&7
H[SRUWDUFKLYHBKDQGOH
>LPSRUWDUFKLYHBNH\RIIVHW@ _ `Jab
_ '&(ab
UHDGQH[WUHFRUGIURPFRQWDLQHULQ$%$3UHSRUW d"a- a)e* -fb
_ `ab a gaS#'a"_ a")_
$5&+,9(B*(7B1(;7B5(&25' _ C&cab
H[SRUWDUFKLYHBKDQGOH --,dCbca"
LPSRUWUHFRUGBVWUXFWXUHUHFRUG aX#'a"%_ a9)_
ZULWHUHFRUGLQOLVW
FORVHDUFKLYHILOHV
$5&+,9(B&/26(B),/(
H[SRUWDUFKLYHBKDQGOH
SAP AG 2002
n The function module ARCHIVE_OPEN_FOR_READ supplies the data sequentially according to the
order in which they are stored in the ADK archive file.
If you want a different order, you must sort them in the main memory.
report sbookr.
* data declaration
data: handle like sy-tabix,
buffer like arc_buffer,
sbook_wa like sbook,
number_of_records_read type i.
if sy-subrc <> 0.
write: / File open error.
SAP AG 2002
exit.
endif.
clear number_of_records_read.
* loop to get the next data object from the archive file(s)
do.
call function ARCHIVE_GET_NEXT_OBJECT
exporting
archive_handle = handle
exceptions
end_of_file = 1
others = 2.
if sy-subrc <> 0.
exit.
endif.
SAP AG 2002
n If the last archive file was read to the end, end of file is triggered.
add 1 to number_of_records_read.
enddo.
enddo.
SAP AG 2002
n In step 3, the data from the main memory is transferred to a work area in the program using
ARCHIVE_GET_NEXT_RECORD.
The data in one object belongs to various tables.
n The work area in our example is arc_buffer. Arc_buffer is split into buffer_rname, which contains
the name of the table to which the transferred record belongs, and buffer_segment, in which the data
is to be stored.
n Up to Release 4.6C, the segments have a size of 8K.
SAP AG 2002
n Buffer_segment is an unstructured area from which the data must be transferred to a structured work
area.
How the work area is defined depends on the table record that is currently being read.
n If you are working with the function module ARCHIVE_GET_TABLE, the transfer to a work area is
omitted since the internal table forms the work area and includes the correct records from the table
for an object.
SAP AG 2002
l $UFKLYHBRSHQBIRUBUHDG
$UFKLYHBJHWBQH[WBREMHFW
w Archive_get_next_record
w CU_CONFIG_READ_ARCHIVE_OBJECT
(Archiving class Variant configuration)
w TEXT_SELECT_ ARCHIVE_OBJECT
(Archiving class TEXT)
w READ_TEXT
(Archiving class TEXT)
l $UFKLYHBFORVHBILOH
SAP AG 1999
2002
n The data that was stored together with an archiving object using the archiving module or an
archiving class cannot be accessed directly by ADK.
n The data is transferred to ADK by the read module in the archiving class.
l )URP5HOHDVH*0DQDJHPHQWLQ7UDQVDFWLRQ$&/$
l )URP5HOHDVH&5HSRUW&ODVVB%URZVHU
l 1DPLQJ FRQYHQWLRQIRUDUFKLYLQJIXQFWLRQPRGXOH
<archiving class>_archive_object
l 1R QDPLQJFRQYHQWLRQIRUUHDGIXQFWLRQPRGXOH
Possible name
<archiving class>_read_archive_object
Identical to the read function module, which also reads the
database: For example: Read_text for archiving class texts
SAP AG 1999
2002
l 'HWHUPLQLQJWKHIXQFWLRQJURXSRIWKHDUFKLYLQJFODVV
Release 3.0: Transaction AOBJ
Release 3.1 bis 4.6: Transaction ACLA
l 'HWHUPLQLQJWKHUHDGPRGXOHRIWKHUDFKLYLQJFODVV
Transaction SE80, enter function group
Display function modules
Read documentation
SAP AG 2002
n 1RWH: The Archive_handle must also be included with the function modules for the archiving classes.
l &ODULI\ZKLFKILHOGVDUHWREHGLVSOD\HG
What fields does the used structure contain?
l $QDO\]HWKHDUFKLYHGGDWDXVLQJWKHDUFKLYLQJSURJDP
l 'HWHUPLQHZKHUHGDWDLVWREHUHDG
Logical assignment of contents to the archived tables
l 'HWHUPLQHZKHUHGDWDLVWREHGLVSOD\HG
Logical assignment of contents to the archived tables
SAP AG 2002
1999
n There is a link to the function module documentation which explains the interface.
The function module must be released.
The interfaces can be complex - for example, the archiving class TEXT supplies data for headers and
line items.
n Logical assignment of data: Position texts from orders can, for example, only be read if the relevant
order positions are available in the program.
l %XLOGWKHDUFKLYLQJFODVVLQWRWKHUHOHYDQWUHSRUW
SAP AG 1999
2002
n You can use the documentation to determine which data structures are to be created and the interface
for the read module.
n You are advised to make archiving class data available as an option by adding a checkbox, rather
than having to process it in the read program, since, generally, this data is not of interest to all users.
* DEFINITION DATA
* Texts / Classes
tables: thead, tline.
SAP AG 2002
SAP AG 2002
SAP AG 2002
sort xvbbp.
loop at xvbbp.
SAP AG 2002
l 6HOHFWLRQDQGRXWSXWRIGDWDIURPWKHRQOLQHGDWDEDVH
l &UHDWHFKHFNER[
'R\RXZDQWWRHGLWDUFKLYHGGDWDLQWKHUHSRUW"
l 2SWLRQDO
h &DOO$'.IXQFWLRQPRGXOHWRUHDGDUFKLYHGGDWD
h 2XWSXWDUFKLYHGGDWD
SAP AG 2002
n You can use check boxes to make processing as sophisticated as you want.
N ?ij
L"kml+nkSo
pQq l qsrQp
N ? O'tV
N ?j>
u'lSv k p
l+w qsx ySx qz
N ? O'tV
@9k q o%lSv
+l nen'o%k pUp
l+l k k q
SAP AG 2002
"
VBELV Preceding sales and distribution document
POSNV Preceding item of an SD document
VBELN Subsequent sales and distribution document
POSNN Subsequent item of an SD document
VBTYP_N Document category of subsequent document
RFMNG Referenced quantity in base unit of measure
MEINS Base unit of measure
SAP AG 2002
<RXDUHQRZDEOHWR
l &UHDWHVHTXHQWLDOUHDG
SURJUDPVIRUDQDUFKLYLQJ
REMHFW
l 5HSRUWDUFKLYLQJFODVVHV
EHORQJLQJWRDQDUFKLYLQJ
REMHFWLQUHDGSURJUDPV
SAP AG 2002
8QLW&XVWRPHU6SHFLILF5HSRUWLQJ
7RSLF3URJUDPIRUDUFKLYHGVDOHVDFWLYLWLHV
5HDGZLWKRXWDUFKLYLQJFODVVHV
You have archived sales activities and want to create a reporting program
for them.
1-2 8VHWKHOLVWKHDGHUWRIDPLOLDUL]H\RXUVHOIZLWKWKHOLVWOD\RXW
/RRNDWWKH6'B9%.$GDWDPRGHORQWKHODVWSDJHLQWKLVXQLW
+HUH\RXFDQDOVRILQGWKHGHILQLWLRQVWUXFWXUHIRUWDEOHV9%.$9%3$9%)$
Call the function module 3 times with each new Record_structure. (Export parameter
record_structure)
Process all of the records belonging to an object (export parameter all_record_of_object).
Pass the archive_handle (export parameter archive_handle).
Import a table with the hitlists of the individual table records. The table, to which the
data is transferred, is for VBFA and VBPA the internal table X<original table name>.
For VBKA, the structure YVBKA is imported. YVBKA is then assigned to XVBKA.
1-6 Close the archive file with the function module ARCHIVE_CLOSE_FILE
1-7-1 Output the data from XVBKA: the required names can be found in the appendix.
document no. starting at position 2
sales activity type starting at position 14
creation date starting at position 21
created by starting at position 40
change date starting at position 56
3-1 If the data is output correctly, enter your program in transaction AOBJ as a read program
for SD_VBKA and test it again by calling it from transaction SARA.
You have archived sales activities and want to create a reporting program
for them.
1-2 Build into the program (in the output form routine after the output of the last table) the
reporting of texts that have been archived with a sales activity.
1-2-1 First collect the texts belonging to an object by calling the function module
SELECT_TEXT_ARCHIVE_OBJECT
Export parameter: Archive_handle
A table (lines) is returned containing the texts found. It is read according to text lines.
8QLW&XVWRPHU6SHFLILF5HSRUWLQJ
7RSLF3URJUDPIRUDUFKLYHGVDOHVDFWLYLWLHV
5HDGZLWKRXWDUFKLYLQJFODVVHV
Mark SD_VBKA
Dialog structure read progams
Enter ZxxSDVBKA
Save
DUFKLYHUHDGSURJUDPIRUVDOHVDFWLYLWHV
7$%/(69%.$9%)$9%3$
'$7$;9%.$/,.(9%.$2&&856:,7++($'(5/,1(
<9%.$/,.(9%.$2&&856:,7++($'(5/,1(
;9%)$/,.(9%)$2&&856:,7++($'(5/,1(
<9%)$/,.(9%)$2&&856:,7++($'(5/,1(
;9%3$/,.(9%3$2&&856:,7++($'(5/,1(
%(*,12);9%.$
,1&/8'(6758&785(9%.$
'$7$(1'2);9%.$
'$7$$5B+$1'/(7<3(6<7$%,;
&$//)81&7,21
$5&+,9(B23(1B)25B5($'
(;3257,1*
2%-(&7
6'B9%.$
,03257,1*
$5&+,9(B+$1'/( $5B+$1'/(
(;&(37,216
27+(56
,)6<68%5&!
:5,7(
HUURURSHQILOH
6723
(1',)
:5,7(
'2
&$//)81&7,21
$5&+,9(B*(7B1(;7B2%-(&7
(;3257,1*
$5&+,9(B+$1'/( $5B+$1'/(
(;&(37,216
27+(56
7DEOH9%.$KDVRQO\RQHUHFRUGIRUHDFKVDOHVDFWLYLW\,QWKHGDWD
VWUXFWXUH\RXILQG9%.$$)7(59%8.7KHUHIRUH\RXPXVWUHDGVHYHUDO
UHFRUGVLP\RXXVHIXQFWLRQPRGXOH
$5&+,9(B*(7B1(;7B5(&25'
7KHSURJUDPSHUIRUPDQFHZLOOEHEHWWHULI\RXXVHIXQFWLRQPRGXOH
$5&+,9(B*(7B7$%/(WRILQGDQGUHDGWKH9%.$UHFRUG
&$//)81&7,21
$5&+,9(B*(7B7$%/(
(;3257,1*
$5&+,9(B+$1'/( $5B+$1'/(
5(&25'B6758&785(
9%.$
$//B5(&25'6B2)B2%-(&7
;
7$%/(6
7$%/( <9%.$
(;&(37,216
27+(56
5($'7$%/(<9%.$,1'(;,172;9%.$
&$//)81&7,21
$5&+,9(B*(7B7$%/(
(;3257,1*
$5&+,9(B+$1'/( $5B+$1'/(
5(&25'B6758&785(
9%)$
$//B5(&25'6B2)B2%-(&7
;
7$%/(6
7$%/( ;9%)$
(;&(37,216
27+(56
&$//)81&7,21
$5&+,9(B*(7B7$%/(
(;3257,1*
$5&+,9(B+$1'/( $5B+$1'/(
5(&25'B6758&785(
9%3$
$//B5(&25'6B2)B2%-(&7
;
7$%/(6
7$%/( ;9%3$
(;&(37,216
27+(56
3(5)250287387B'2&B,1)2
(1''2
(;3257,1*
$5&+,9(B+$1'/( $5B+$1'/(
)250287387B'2&B,1)2
:5,7(;9%.$9%(/1;9%.$.7$$5;9%.$(5'$7
;9%.$(51$0;9%.$$('$7
/223$7;9%3$
:5,7(;9%3$3$59:;9%3$3$515;9%3$$'515
(1'/223
/223$7;9%)$
:5,7(;9%)$9%(/1;9%)$9%7<3B1
(1'/223
(1')250
DUFKLYHUHDGSURJUDPIRUVDOHVDFWLYLWHV
7$%/(69%.$9%)$9%3$
3$5$0(7(56$86*7(;7$6&+(&.%2;
'$7$<9%.$/,.(9%.$2&&856:,7++($'(5/,1(
;9%)$/,.(9%)$2&&856:,7++($'(5/,1(
<9%)$/,.(9%)$2&&856:,7++($'(5/,1(
;9%3$/,.(9%3$2&&856:,7++($'(5/,1(
%(*,12);9%.$
,1&/8'(6758&785(9%.$
'$7$(1'2);9%.$
'$7$7;7B7$%/,.(7+($'2&&856:,7++($'(5/,1(
'$7$7(;7B/,1(6/,.(7/,1(2&&856:,7++($'(5/,1(
'$7$7(;7B(175,(6/,.(6<7),//
'$7$$5B+$1'/(7<3(6<7$%,;
&$//)81&7,21
$5&+,9(B23(1B)25B5($'
(;3257,1*
2%-(&7
6'B9%.$
,03257,1*
$5&+,9(B+$1'/( $5B+$1'/(
(;&(37,216
27+(56
,)6<68%5&!
:5,7(
QRDUFKLYHILOHV
6723
(1',)
:5,7(
'2
(;3257,1*
$5&+,9(B+$1'/( $5B+$1'/(
(;&(37,216
27+(56
,)6<68%5&!
:5,7(
QRREMHFW
(;,7
(1',)
7DEOH9%.$KDVRQO\RQHUHFRUGIRUHDFKVDOHVDFWLYLW\,QWKHGDWD
VWUXFWXUH\RXILQG9%.$$)7(59%8.7KHUHIRUH\RXPXVWUHDGVHYHUDO
UHFRUGVLP\RXXVHIXQFWLRQPRGXOH
$5&+,9(B*(7B1(;7B5(&25'
7KHSURJUDPSHUIRUPDQFHZLOOEHEHWWHULI\RXXVHIXQFWLRQPRGXOH
$5&+,9(B*(7B7$%/(WRILQGDQGUHDGWKH9%.$UHFRUG
&$//)81&7,21
$5&+,9(B*(7B7$%/(
(;3257,1*
$5&+,9(B+$1'/( $5B+$1'/(
5(&25'B6758&785(
9%.$
$//B5(&25'6B2)B2%-(&7
;
7$%/(6
7$%/( <9%.$
(;&(37,216
27+(56
;9%.$ <9%.$
&$//)81&7,21
$5&+,9(B*(7B7$%/(
(;3257,1*
$5&+,9(B+$1'/( $5B+$1'/(
5(&25'B6758&785(
9%)$
$//B5(&25'6B2)B2%-(&7
;
7$%/(6
7$%/( ;9%)$
(;&(37,216
27+(56
&$//)81&7,21
$5&+,9(B*(7B7$%/(
(;3257,1*
$5&+,9(B+$1'/( $5B+$1'/(
5(&25'B6758&785(
9%3$
$//B5(&25'6B2)B2%-(&7
;
7$%/(6
3(5)250287387B'2&B,1)2
(1''2
&$//)81&7,21
$5&+,9(B&/26(B),/(
(;3257,1*
$5&+,9(B+$1'/( $5B+$1'/(
)250287387B'2&B,1)2
)250287387B'2&B,1)2
'$7$;67$'0B/,1(67<3(1
'$7$7(;71$0(/,.(7+($'7'1$0(
:5,7(;9%.$9%(/1;9%.$.7$$5;9%.$(5'$7
;9%.$(51$0;9%.$$('$7
/223$7;9%3$
:5,7(;9%3$3$59:;9%3$3$515;9%3$$'515
(1'/223
/223$7;9%)$
:5,7(;9%)$9%(/1;9%)$9%7<3B1
(1'/223
,)$86*7(;7
;
6HOHFWWH[WEHORQJLQJWRWKHFXUUHQWGRFXPHQW
&$//)81&7,21
7(;7B6(/(&7B$5&+,9(B2%-(&7
(;3257,1*
$5&+,9(B+$1'/( $5B+$1'/(
,03257,1*
(175,(6 7(;7B(175,(6
7$%/(6
6(/(&7,216 7;7B7$%
,)7(;7B(175,(6!$1'6<68%5&
ORRSWKURXJKDOOWH[WHQWULHV
/223$77;7B7$%
5HDGWKHWH[W
&$//)81&7,21
7(;7B5($'B$5&+,9(B2%-(&7
(;3257,1*
$5&+,9(B+$1'/( $5B+$1'/(
,' 7;7B7$%7','
/$1*8$*( 7;7B7$%7'635$6
1$0( 7;7B7$%7'1$0(
2%-(&7 7;7B7$%7'2%-(&7
7$%/(6
/,1(6 7(;7B/,1(6
(;&(37,216
27+(56
'LVSOD\WKHWH[WRQVFUHHQ
/223$77(;7B/,1(6
:5,7(7(;7B/,1(67'/,1(
(1'/223
6.,3
(1'/223
(1',)
(1',)
(1')250
&RQWHQWV
l /RJLFRIGLUHFWUHDGDFFHVVXVLQJ6$3$6
l &UHDWLQJDEXVLQHVVYLHZIRU00B0$7%(/LQ6$3$6
SAP AG 2002
$WWKHFRQFOXVLRQRIWKLVXQLW\RXZLOOEHDEOHWR
l &UHDWHEXVLQHVVYLHZVIRUDUFKLYLQJREMHFWVLQ
6$3$6
SAP AG 1999
2002
&RXUVH2YHUYLHZ
7KH'DWD$UFKLYLQJ3URFHVV
$'.'HYHORSPHQW7RROV
'DWD$UFKLYLQJ3URJUDPPLQJ/RJLF
&XVWRPHU6SHFLILF5HDG3URJUDPV
%XVLQHVV9LHZVLQ6$3$6
$SSHQGL[
SAP AG 2002
l <RXKDYHWRFUHDWHDEXVLQHVVYLHZIRUDQ
DUFKLYLQJREMHFWLQ6$3$6
SAP AG 1999
2002
l 0HWKRGVLQGHSHQGHQWRIDUFKLYLQJREMHFW
l *HQHULFVROXWLRQIRUSUHVHQWLQJDUFKLYHGGDWD
l 'LUHFWVLQJOHGRFXPHQWDFFHVV
l &RQILJXUDEOH
SAP AG 2002
1999
n The archived data can always be presented in a technical view. Business views are available in the
standard system for selected objects and customers can create their own additional business views.
The available function modules can serve as frameworks.
n Specific archiving sessions can be selected for reporting purposes.
Also, specific archive information structures can be selected as reporting inputs.
n At technical view level, additional functions such as search, sort and summarize are provided.
l )LHOGFDWDORJ
&RQWDLQVIURPWKHDUFKLYLQJREMHFWVGDWDEDVHWDEOHV
w .H\ILHOGV
w )LHOGVWKDWDUHLPSRUWDQWIRUFXVWRPHUVVHDUFK
IXQFWLRQDOLW\
)LHOGFDWDORJILHOGVDUHDYDLODEOHWRWKH$UFKLYH,QIRUPDWLRQ
6\VWHP
)LHOGFDWDORJVDUHSURYLGHGE\WKHDSSOLFDWLRQV
&XVWRPHUVFDQGHILQHWKHLURZQILHOGFDWDORJVWRPHHWWKHLU
VSHFLILFUHTXLUHPHQWV
SAP AG 1999
2002
l )LHOGFDWDORJIRU00B0$7%(/
l &UHDWHILHOGFDWDORJ
SAP AG 2002
l )LHOGVHOHFWLRQLQFOXGHVDOOILHOGVWKDW\RXZDQWWRXVHIRU
\RXUVHDUFK
l :KHQWKHILHOGFDWDORJLVFUHDWHGWKHNH\ILHOGVIURPWDEOH
06(*PXVWEHDVVLJQHGWRWDEOH0.3)XVLQJWKHIXQFWLRQ
DGGLWLRQDOVRXUFHILHOGV
SAP AG 1999
2002
n This field catalog contains fields from table MKPF and fields from table MSEG. If more than one
table is used, the function additional source fields is used.
n The field catalog key fields from table MSEG must also be present in table MKPF and are assigned
to table MKPF using the function additional source fields.
l 7KHPDWHULDOQXPEHULV\RXUVHDUFKFULWHULRQ
l 3RVVLEOHILHOGVHOHFWLRQIRUWKHILHOGFDWDORJ
l 7KHSRLQWHUWRDGGLWLRQDOVRXUFHILHOGVLVRPLWWHG
SAP AG 2002
6$35DSSOLFDWLRQ FXVWRPHU
VHWVXS
QILHOGFDWDORJVSHUDUFKLYLQJREMHFW
FDUU\ILHOGVRYHUWR
QDUFKLYHLQIRUPDWLRQVWUXFWXUHV
EDVHGRQDILHOGFDWDORJ
5HSRUWLQJ
SURJUDP
SAP AG 2002
n The field catalogs are assigned to archiving objects. They contain fields from the archiving object
tables. These fields can be incorporated in archive information structures. Standard field catalogs are
delivered with the archive information system. You should only create customer-specific field
catalogs as exceptions.
n Archive information structures are the foundation for reporting within the Archive Information
System. They are defined using the Archive Retrieval Configurator and are based on the field
catalogs. Customers incorporate into the archive information structures the key fields that uniquely
identify an object and the data fields that meet their information requirements.
These fields are filled with the archived data and thereby allow the archive files to be reported.
n Archive information structures must be activated. When they are activated, a transparent table with
defined data structures is created in R/3. A reporting program is also generated.
The table is filled with data during the deletion part of the archiving session. The table can also be
filled in a separate process as an administrative function. Reporting is based on this data.
l $UFKLYHLQIRUPDWLRQVWUXFWXUH
SAP AG 2002
1999
5
'DWDEDVH
9DULDQW 9DULDQW
ILOOGXULQJ ILOODIWHUH[SOLFLW
GHOHWHUXQ LQVWUXFWLRQIURP6$3$6
SAP AG 2002
l 5HSRUWLQJGDWDIURPWKHDUFKLYHLQIRUPDWLRQVWUXFWXUH
The structure table entries are displayed on the screen as in
SE16.
No access to the ADK file is required for this display.
l 'RXEOHFOLFNDWDEOHOLQHIRUGLUHFWDFFHVVWRWKHGDWD
REMHFWLQWKH$'.DUFKLYH
The data display is possible for all archiving objects in a technical
view. This view lists the individual tables with their values.
You can program a business view of the data.
SAP AG 2002
n The standard system in Release 4.6 contains business views for 14 objects.
Further business views are planned.
Customer-specific business views can also be created by the customer.
"!$#$#&%('*)% l 7KHV\VWHPJHQHUDWHVD
UHSRUWLQJSURJUDPIRUHDFK
#+-,"
!$
0.$. . . . . .1
. . . . . . . . . ./
......
..........
LQIRUPDWLRQVWUXFWXUH
2 3-"45 ....................
.................... l $UFKLYHDFFHVVLVQRW
UHTXLUHGIRUWKLVVWHS
67
5" 898:" - ;<<
UkVg>l@lg$Vmh-^ [3]@g
SAP AG 2002
The system displays the table records from the archive information structure table.
The display is the same as the table view in transaction SE16.
n 1RDFFHVVWRDUFKLYHILOHVLVUHTXLUHGIRUWKLVOLVWRIVWUXFWXUHUHFRUGVFRQWDLQLQJDQH[WUDFWRI
DUFKLYHGGDWD
n From this list you can branch to an objects technical view. This view is possible for all objects that
can be accessed in SAP AS.
"
= 38+
77!*#$"#?%*'()% '( >0K
CD,"
E
? qsr@ 8t
"4" u
qK &> v
#?4," '3
4 Z)BCHD 2 >4C5 <<<FswQM-<<FC!(#$"#7%$'$)B%
FC<<<<< FCG. FE<. FCIIJ 2 " >
FC<<<<F FCG. FE<. FCIIJ %Z0
LNCOAJCPHNL7IJM-;
qK &Oyx$zR F{#y,">8+
4,
4
FC<<<<G FCG. FE<. FCIIJ 2 " >
qK +!$#7|$%3O F 2 -.@K 7 3 -,""C-@K 8
FC<<<<Q FCG. FE<. FCIIJ ")>,SROon IJp
qK +!$#7|$%(| G}'* .@K C+C4.K ," 2 4.
.... +^ [**h X"ZX>]@X`Ag3\"]
qK +!$#7R>O F{!*#kM4#&q~r4Cu!* @ >K,"
E
aygZh g3\>]*]m3gZg[*^V@g3
A^ [**h X"li*YB\"]m^ `AY
+^ [**h X"X[>]@g$V(ZX]X
U*g\B*Y*^H\XZh(^ g"
SAP AG 2002
n By double clicking, you can access the archived document directly from the list display.
n You access individual data record in the offset, which is stored in the archive information structure.
The relevant archive file is read directly.
n For direct access to the archived data, the system checks the authorization objects S_ARCHIVE and
S_TABU_DIS.
For more information on the creation of customer-specific authorization objects, refer to SAP Note
175901.
SAP AG 2002
n The business view of a data record is created using function modules. They are listed in table
AIND_STR5.
l $UFKLYHBUHDGBREMHFW
Archive_get_next_record
READ_TEXT (Archiving class TEXT)
l $UFKLYHBFORVHBILOH
SAP AG 1999
2002
This function module reads a specific data object from an archiving object in an
archiving file and returns a handle for further processing. If the archive file was
stored using ArchiveLink, it is also possible to read the data object using this
function module. The different forms of processing are dealt with by this
function module.
After the data object has been read by ARCHIVE_READ_OBJECT, you can
access the data using the function module ARCHIVE_GET_NEXT_RECORD or
using the handle.
SAP AG 2002
n The name of the archiving object is transferred in the interface parameter object. The archive key
supplies the archive file and the offset of the required doucment in the arhcive file.
n In turn, the information for offset and archive key are copied from the archive information structure
table from SAP AS.
n Note:
The function module is intended for interactive reporting - that is - for the display on screen of a
specific document.
It is not intended for reading documents in archive files in the context of sequential evaluations.
'HFODUDWLRQ
,QWHUQDOWDEOHVLWDE$LWDE%LWDE&
'HWHUPLQH$UFKLYHNH\DQG2IIVHW
VHOHFWVLQJOHDUFKLYHBNH\RIIVHWIURP,QGH[7DEOH
ZKHUH
LPSRUWDUFKLYHBNH\RIIVHW
,QFOXGHREMHFWLQWKH$'.ZRUNDUHD
$5&+,9(B5($'B2%-(&7
H[SRUWDUFKLYHBNH\RIIVHW
LPSRUWDUFKLYHBKDQGOH
,QFOXGHLQSURJDPWKHQH[WUHFRUGEHORQJLQJWRREMHFW
$5&+,9(B*(7B1(;7B5(&25' 3`*`WB[`h `AYoX[
H[SRUWDUFKLYHBKDQGOH V@g3\>`V@B[XZV@g*V@g[BgZY>]
LPSRUWUHFRUGBVWUXFWXUHUHFRUG
2XWSXWUHFRUG
&ORVHDUFKLYHILOHV
$5&+,9(B&/26(B),/(
H[SRUWDUFKLYHBKDQGOH
SAP AG 2002
z K ,jp OkK 4
7
qK !A
KC,"
Ok (' 2 %Z;
!k@-"CD '*)>6
#?4,">
C D F
SAP AG 2002
n The business view of a data record is created using function modules. They are listed in the table
AIND_STR5.
l &UHDWHDGLDORJER[WH[WIRUVHOHFWLQJWKHEXVLQHVVYLHZ
SAP AG 2002
1999
n Create entries:
2) Button CREATE
SAP AG 2002
n Note:
As soon as an application-specific display function has been entered in table aind_str5, the technical
view no longer appears.
If you want to provide both options, you must also create an entry for the technical view in
aind_str5. This entry has the value space for the function. Text can also remain empty.
l &UHDWHIXQFWLRQPRGXOHLQFXVWRPHUQDPHVSDFH
SAP AG 2002
1999
n Create function group: Tools -> ABAP Workbench -> Overview -> Object Browser
l ,QWHUIDFHVLPLODUWRIXQFWLRQPRGXOH
.$6+B$5&+,9(B'$7$B2%-(&7B6+2:
l 3DVVLQJSDUDPHWHUV
I_ARCHIVEKEY
Name of archive file as it appears in archive management
I_OFFSET
Offset of data object in the archive for direct access
SAP AG 2002
1999
l 2XWSXWFRQWURORSWLRQV
The list output is programmed directly in the function module.
Display on the customer-specific screen, which switches to list
processing.
You can use an existing program for the list processing.
SAP AG 2002
1999
l &RQWURORXWSXWZLWKRXWDVFUHHQ
The list output occurs directly in the function module.
Create a list structure using WRITE statements.
SAP AG 1999
2002
n As soon as there is more than one function module in the function group, the globally used tables and
data must be present in the global area.
function mm_matbel_display_data.
*"----------------------------------------------------------------------
*"*"Local interface:
*" IMPORTING
*" VALUE(I_ARCHIVEKEY) LIKE ADMI_FILES-ARCHIV_KEY
*" VALUE(I_OFFSET) LIKE ARCH_IDX-OFFSET
*" EXCEPTIONS
*" OBJECT_NOT_FOUND
*"----------------------------------------------------------------------
SAP AG 2002
case arc_buffer-rname.
when MKPF.
mkpf = arc_buffer-segment.
write: / , mkpf-mblnr, mkpf-mjahr.
write: / sy-uline(105).
format color col_heading intensified.
skip 2.
SAP AG 2002
35 Material,
55 Plant,
60 Loc.
skip 1.
when 'MSEG'.
mseg = arc_buffer-segment.
write: /5 mseg-zeile, mseg-matnr.
write: /4 mseg-zeile,
10 mseg-erfmg,
30 mseg-erfme,
35 mseg-matnr,
55 mseg-werks,
60 mseg-lgort.
SAP AG 2002
endcase.
enddo.
SAP AG 2002
l &RQWRORXWSXW
Create screen for function group
Screen-call in function module with switch to list function
Fill and output lists
SAP AG 2002
1999
function mm_matbel_display_data_dyn.
*"----------------------------------------------------------------------
*"*"Local interface:
*" IMPORTING
*" VALUE(I_ARCHIVEKEY) LIKE ADMI_FILES-ARCHIV_KEY
*" VALUE(I_OFFSET) LIKE ARCH_IDX-OFFSET
*" EXCEPTIONS
*" OBJECT_NOT_FOUND
*"----------------------------------------------------------------------
do.
call function ARCHIVE_GET_NEXT_RECORD
exporting
archive_handle = handle
importing
record = arc_buffer-segment
record_structure = arc_buffer-rname
exceptions
end_of_object = 1.
if sy-subrc = 1.
exit.
endif.
SAP AG 2002
case arc_buffer-rname.
when MKPF.
i_mkpf = arc_buffer-segment.
append i_mkpf.
when MSEG.
i_mseg = arc_buffer-segment.
append i_mseg.
endcase.
enddo.
module display_list_materialdocuments.
IORZORJLF
%
,P- >@0
VFUHHQ
4
"KE4
qK
," P
8,
4
SAP AG 2002
suppress dialog.
leave to list-processing and return to screen 0.
SAP AG 2002
loop at i_mseg.
write: /4 i_mseg-zeile,
10 i_mseg-erfmg,
30 i_mseg-erfme,
35 i_mseg-matnr,
55 i_mseg-werks,
60 i_mseg-lgort.
SAP AG 2002
l 'HWHUPLQHZKLFKEXVLQHVVREMHFWW\SHWKHGRFXPHQWLV
DVVLJQHGWR
l &UHDWHNH\YDULDEOHLQSURJUDP
l &RQVWUXFWNH\YDULDEOHFRUUHVSRQGLQJWRNH\RIWKHEXVLQHH
REMHFWW\SH
7KHNH\LVGHILQHGLQWKH%XVLQHVV2EMHFW5HSRVLWRU\%25
l &DOO)XQFWLRQ0RGXOH
$5&+,9B',63/$<B0(7$
Export: Name of the business object type
Key varialbe
Result: Display the archived originals, or a hit list of the originals
SAP AG 2002
1999
l 'HWHUPLQHZKLFKEXVLQHVVREMHFWW\SHWKHGRFXPHQWLV
DVVLJQHGWR
Report assignment of archived document to object type
w Path: Tools -> Business Documents -> Basic Settings -> Links
(transaction 2$&)
w Examples:
Doc. type Description Object type
FIIINVOICE incoming invoice BKPF
FIIINVPREL invoice preliminary posting BKPF
SDOORDER order acknowledgement VBAK
MMOORDER order EKKO
......
SAP AG 1999
2002
n If the object type is not found in ArchiveLink, you can set a breakpoint in the display transaction for
the object at SWU_OBJECT_PUBLISH and debug so that the correct object type is transferred to
OBJTYPE.
n It is also possible to analyze link tables in ArchiveLink. By default, tables TOA01, TOA02, and
TOA03 are used. The R/3 key for the object is stored here together with the object type and the
document type.
l &UHDWHNH\GHILQLWLRQV
YDULDEOHZLWKNH\RIWKHEXVLQHVVGRFXPHQW!
data: <variable name> like sapb-sapobjid. key to be passed
data: begin of objectid, variable constructed
according to the key of the
business object type
end of objectid.
l &RQVWUXFWNH\DFFRUGLQJWREXVLQHVVREMHFW
move <database field 1> to objectid-<xxx>.
move <database field 2> to objectid-<zzz>.
......
Object_id = objectid.
SAP AG 2002
1999
l &DOOIXQFWLRQPRGXOH$5&+,9B',63/$<B0(7$
call function ARCHIV_DISPLAY_META
exporting
sap_object = <Business object type>
object_id = <variable with key to business document >
exceptions
others = 1.
l 7KHIXQFWLRQPRGXOHGLVSOD\VWKHDUFKLYHGRULJLQDO
,IPRUHWKDQRQHGRFXPHQWLVDUFKLYHGSHU5GRFXPHQW
WKHXVHUREWDLQVDKLWOLVWIURPZKLFKWRVHOHFWWKHGHVLUHG
RULJLQDO
SAP AG 2002
function fi_documnt_display_data_originale.
*"----------------------------------------------------------------------
*"*"Local interface:
*" IMPORTING
*" VALUE(I_ARCHIVEKEY) LIKE ADMI_FILES-ARCHIV_KEY
*..........
*"----------------------------------------------------------------------
..........
data: begin of objectid,
oidbukrs like bkpf-bukrs,
oidbelnr like bkpf-belnr,
oidgjahr like bkpf-gjahr,
end of objectid.
data: object_id like sapb-sapobjid.
..........
call function 'ARCHIVE_READ_OBJECT
..........
SAP AG 2002
do.
call function 'ARCHIVE_GET_NEXT_RECORD
........
case arc_buffer-rname.
when 'BKPF'.
bkpf = arc_buffer-segment.
........
endcase.
enddo.
..........
* Output data
write: / ' ', bkpf-bukrs, bkpf-belnr, bkpf-gjahr.
write: / sy-uline(105).
format color col_heading intensified.
write: / sy-vline,
2 Posting date,
16 sy-vline,
17 Local currency,
..........
SAP AG 2002
write: / sy-vline,
2 bkpf-budat,
16 sy-vline,
17 bkpf-hwaer,
..........
* Output archived original of document
* Construct key
move bkpf-bukrs to objectid-oidbukrs.
move bkpf-belnr to objectid-oidbelnr.
move bkpf-gjahr to objectid-oidgjahr.
object_id = objectid.
l 'LVSOD\LQJDUFKLYLQJFODVVHVLVSRVVLEOHLQ6$3$6IURP
5HOHDVH$
l ,Q5HOHDVH%GLVSOD\RI33B25'(5LQ6$3$6LVDOUHDG\
LPSOHPHQWHG
l 3URJUDPPDEOHGLVSOD\IXQFWLRQVIRUDUFKLYQJFODVVHVZLWK
GLUHFWDFFHVVZLWKRXWXVLQJ6$3$6
Fill an index for the archived data or use a table in SAP AS
Implement a reporting program that accesses an individual document
in the archiving class using the index.
SAP AG 2002
1999
n For more information on the previous development of PM_ORDER, refer to SAP Note 135784.
Compare also Note 195425 for development regarding PM_ORDER, PM_QMEL,
SM_QMEL, and QM_QMEL.
n Further Notes on archiving classes in SAP AS:
183774, 181598, 156780
l 3URJUDP)LOO$'.LQGH[WDEOH
l )LOO
$UFKLYHBRSHQBIRUBUHDG
'R
w $UFKLYHBJHWBQH[WBREMHFW
w )XQFWLRQPRGXOHIRUUHDGLQJWKHFODVV!
)LOODFXVWRPHUVSHFLILFWDEOHZLWK$'.LQGH[YDOXHV
(QGGR
$UFKLYHBFORVHBILOH
SAP AG 1999
2002
n With the function module Archive_get_next_object, you can determine the archive key and the
offset of the document. Both of these are required for direct access to a document.
n With the help of the function module, which reads the archiving class, you obtain the information
that is required for an ADK-index.
n You then store the ADK-index information in a customer-specific table.
l 3URJUDP'LUHFWDFFHVVWRDGRFXPHQW
l )LOO
5HDGWKH$'.LQGH[WDEOH
$UFKLYHBUHDGBREMHFW
w )XQFWLRQPRGXOHIRUUHDGLQJWKHFODVV!
$UFKLYHBFORVHBILOH
SAP AG 1999
2002
<RXDUHQRZDEOHWR
l ,QWHJUDWHDEXVLQHVVYLHZIRUDQ
DUFKLYLQJREMHFWLQ6$3$6
l ,QWHJUDWHGLVSOD\RIDUFKLYHGRULJLQDOV
IRUDQ5GRFXPHQWLQ6$3$6
SAP AG 2002
8QLW6$3$6%XVLQHVV9LHZV
7RSLF&UHDWLQJD%XVLQHVV9LHZIRU00B(%$1
1-1 Create new function group ZBC670_xx. Here, create function module
ZZMM_EBANxx, using as a template ZZMM_EBAN00.
The function is part of Basis (Application S).
Table arc_buffer
Field handle like sy-tabix
Internal table i_eban like eban
Field ok-code like sy-ucomm
1-1-5 In a CASE structure, query the contents of ARC_BUFFER_RNAME and fill the
internal table i_eban with the data from ARC_BUFFER_SEGMENT.
1-1-8 Declare in PBO Module status_0300 that you want to make a list output, not
screen processing (suppress screen dialog and leave to list processing).
Line 1:
Position 2: Text Purchase requisition
Position 23: BANFN from table EBAN
Position 40: Text Document type
Position 50: BSART from table EBAN
Line 4:
Position 2: Text Purchase requisition items
Line 7
Position 4: Text Pos
Position 20: Text Material
Line 8
Position 20: Text Requested quantity
Line 10:
Position 4: BNFPO from table EBAN
Position 20: MATNR from table EBAN
Line 11:
Position 20: MNGE from table EBAN
2-1 Create an entry in table aind_str5 for your business view. Enter your function module.
Name your view View_xx , where xx is your group number.
3-1 Call the Archive Information System. Select as object MM_EBAN and view the
archived documents from the structure table.
Branch to the detail view by double clicking, and try to select your business view.
The user department wants to see not only the purchase requisition, but
also the optically archived original document
2-1 Determine which business object in ArchiveLink belongs to a purchase requisition. The
document type used is called MYLETTER.
3-1 In the list output module, create a variable that reflects the key of the business object.
Create a second variable object_id , that links to sapb-sapobjid.
4-1 Supply your variable of the business object key with the field BANFN from table
EBAN and assign the variable to the variables object_id
Export parameter:
sap_object = <business object type defined >
object_id = Variable <object_id>
8QLW%XVLQHVV9LHZVLQ6$3$6
7RSLF&UHDWLQJD%XVLQHVV9LHZIRU00B(%$1
GDWDKDQGOHOLNHV\WDEL[
UHIUHVKLBHEDQ
FDOOIXQFWLRQ
$5&+,9(B5($'B2%-(&7
H[SRUWLQJ
REMHFW
00B(%$1
DUFKLYNH\ LBDUFKLYHNH\
RIIVHW LBRIIVHW
LPSRUWLQJ
DUFKLYHBKDQGOH KDQGOH
H[FHSWLRQV
RWKHUV
LIQRWV\VXEUFLVLQLWLDO
PHVVDJHLGV\PVJLGW\SH
,
QXPEHUV\PVJQR
ZLWKV\PVJYV\PVJYV\PVJYV\PVJY
H[LW
HQGLI
GR
FDOOIXQFWLRQ
$5&+,9(B*(7B1(;7B5(&25'
H[SRUWLQJ
DUFKLYHBKDQGOH KDQGOH
LPSRUWLQJ
UHFRUG DUFBEXIIHUVHJPHQW
UHFRUGBVWUXFWXUH DUFBEXIIHUUQDPH
H[FHSWLRQV
HQGBRIBREMHFW
LIV\VXEUF
H[LW
HQGLI
FDVHDUFBEXIIHUUQDPH
ZKHQ
(%$1
LBHEDQ DUFBEXIIHUVHJPHQW
DSSHQGLBHEDQ
FDOOIXQFWLRQ
$5&+,9(B&/26(B),/(
H[SRUWLQJ
DUFKLYHBKDQGOH KDQGOH
$XVJDEHGHU'DWHQEHU'\QSURPLW/LVWSURFHVVLQJ
FDOOVFUHHQ
(1')81&7,21
352&(66%()25(287387
02'8/(67$786B
02'8/(GLVSOD\BOLVWHBPPBHEDQ
352&(66$)7(5,1387
02'8/(86(5B&200$1'B
02'8/(67$786B287387
VXSSUHVVGLDORJ
OHDYHWROLVWSURFHVVLQJDQGUHWXUQWRVFUHHQ
6(73)67$786
,1/,
6(77,7/(%$5
[[[
(1'02'8/(67$786B287387
0RGXOH',63/$<B/,67(B00B(%$1287387
WH[W
02'8/(',63/$<B/,67(B00B(%$1287387
ZULWH
%HVWHOODQIRUGHUXQJ
LBHEDQEDQIQ
%HOHJDUW
LBHEDQEVDUW
VNLS
ZULWH
%HVWHOODQIRUGHUXQJVSRVLWLRQHQ
VNLS
ZULWH
3RV
0DWHULDO
ZULWH
$QIRUGHUXQJVPHQJH
VNLS
ZULWHLBHEDQEQISR
LBHEDQPDWQU
ZULWHLBHEDQPHQJH
(1'02'8/(',63/$<B/,67(B00B(%$1287387
(1'02'8/(86(5B&200$1'B,1387
0RGXOH86(5B&200$1'B,1387
WH[W
02'8/(86(5B&200$1'B,1387
(1'02'8/(86(5B&200$1'B,1387
The user department wants to see not only the purchase requisition, but
also the optically archived original document
2-1 Determine which business object in ArchiveLink belongs to a purchase requisition. The
document type used is called MYLETTER.
(QWHUWUDQVDFWLRQ6(7DEOH72$6HDUFKIRUGRFXPHQWW\SH0</(77(5
7KHREMHFWW\SHWKDWLVVWRUHGLQWKHUHFRUGLVWKHRQHEHLQJVHDUFKHGIRU
UHIUHVKLBHEDQ
GDWDEHJLQRIREMHFWLG
RLGEDQIQOLNHHEDQEDQIQ
HQGRIREMHFWLG
GDWDREMHFWBLGOLNHVDSEVDSREMLG
FDOOIXQFWLRQ
$5&+,9(B5($'B2%-(&7
H[SRUWLQJ
REMHFW
00B(%$1
DUFKLYNH\ LBDUFKLYHNH\
RIIVHW LBRIIVHW
LPSRUWLQJ
DUFKLYHBKDQGOH KDQGOH
H[FHSWLRQV
RWKHUV
LIQRWV\VXEUFLVLQLWLDO
PHVVDJHLGV\PVJLGW\SH
,
QXPEHUV\PVJQR
ZLWKV\PVJYV\PVJYV\PVJYV\PVJY
H[LW
HQGLI
GR
FDOOIXQFWLRQ
$5&+,9(B*(7B1(;7B5(&25'
H[SRUWLQJ
DUFKLYHBKDQGOH KDQGOH
LPSRUWLQJ
UHFRUG DUFBEXIIHUVHJPHQW
UHFRUGBVWUXFWXUH DUFBEXIIHUUQDPH
H[FHSWLRQV
HQGBRIBREMHFW
LIV\VXEUF
HQGFDVH
HQGGR
FDOOIXQFWLRQ
$5&+,9(B&/26(B),/(
H[SRUWLQJ
DUFKLYHBKDQGOH KDQGOH
PRYHLBHEDQEDQIQWRREMHFWLGRLGEDQIQ
REMHFWBLG REMHFWLG
FDOOIXQFWLRQ
$5&+,9B',63/$<B0(7$
H[SRUWLQJ
VDSBREMHFW
%86
REMHFWBLG REMHFWBLG
H[FHSWLRQV
RWKHUV
LIV\VXEUFQH
H[LW
HQGLI
$XVJDEHGHU'DWHQEHU'\QSURPLW/LVWSURFHVVLQJ
FDOOVFUHHQ
(1')81&7,21