03-30-2011 6:13 AM
Hi Experts,
My Z report is picking records from BKPF table and showing in ALV display. There are some document numbers which are archieved and Z report is not picking those. Client has requirement to show archieved records also.
Can anyone help me with the procedure to read archieved records. Other words how to establish link between archieved records.
Thanks in Advance !
Regards,
Mayank
03-30-2011 6:43 AM
Hi,
you can find a list of archived documents in table ARIX_BKPF.
You can read it from archive with
call function 'FI_DOCUMENT_READ_SINGLE'
This should work upt to SAP Release 4.7.
In ECC there is a new technology. Which SAP Release do you have?
Regards,
Klaus
Edited by: Klaus Babl on Mar 30, 2011 7:50 AM
03-30-2011 8:07 AM
That's what standard report RFBUEB00 does, why are you re-inventing the wheel?
Thomas
03-30-2011 8:25 AM
I don't know, Thomas, which version of this report you have, but in our systems from 4.6C to ECC 6.0 it's without reading archive documents ...
03-30-2011 8:27 AM
In ECC 6.0 I have a button "data sources" on the selection screen, that allows you to select archived documents as well if required.
Thomas
03-30-2011 8:31 AM
03-30-2011 8:34 AM
Maybe that was really added just lately, our version is SAP_APPL 602 SAPKH60207, I don't have previous versions available to check.
OK, please continue
Thomas
03-30-2011 8:35 AM
OK, found
Note 1415591 - FB03 - doc. list: Sel. of archive not previously possible
Not available for older releses!
03-30-2011 9:36 AM
Thanks for reply !
I am using 4.6 version. I want to filter records based on selection criteria provided by user. These records should also fetch archieved records.
03-30-2011 2:09 PM
Hi Klaus,
I tried checking ARIX_BKPF table but it doesnt have document number I am looking for. Still it does have same year other document number. Is there any possibility of settings where some company code are not stored in this table.
The FM will fetch one record at a time which is not useful in this case as I need to get all the records which are archieved.
any other possibility ?
03-30-2011 3:11 PM
Use a custom archive infostructure for a fast read of all fields in a custom program. This increases data storage but storage is cheap these days. You'll need access to the archived records in order to fill the info structure. The records that go into any infostructure can be filtered.
Also, your access to the archived data should be fast with ARIX_BKPF if you have used the correct selection criteria because a pointer will exist in the standard infostructure if it's populated.
Edited by: Brad Bohn on Mar 30, 2011 9:12 AM
05-05-2011 2:52 PM
Hi Guys,
I discovered that our system using 3rd party software PBS for archieving. We can fetch the records which are archieved by using following method.
CALL FUNCTION '/PBS/SELECT_INTO_TABLE'
EXPORTING
ARCHIV = 'CFI'
OPTION = ''
TABNAME = 'BKPF'
SCHL1_NAME = 'BUKRS'
SCHL1_VON = so_bukrs-low
SCHL1_BIS = so_bukrs-high
SCHL2_NAME = 'BLDAT'
SCHL2_VON = SO_BLDAT-LOW
SCHL2_BIS = SO_BLDAT-HIGH
TABLES
I_TABELLE = ITBKPF
EXCEPTIONS
EOF = 4
OTHERS = 2.
Where as BKPF is table name. ARCHIV is the file name. For FI it will be CFI, for MM CMM etc.