‎2008 May 05 11:33 AM
Hi Friends,
How can we decide which tables to archive for specific archiving object? Example for MM_EBAN (Purchase Requisitions) archiving object from which database tables we will do archivin?
whats the decision factor for this?
Regards,
Chandu.
‎2008 May 05 12:08 PM
hii,
first you have to chalk out the important tables used in mm and their fields used in the programs.use the tcode sara,there you would find the data base tables options and a where used list.for eg if you use mkpf and mseg tables from mm module,create a archiving object mm_matbel. then specify the time period for which you want to archive the data from.
use tcode sare to create the object.
then by creating a function module you can use the arciving object.
specimen code :-
1. OBJECT : MM_MATBEL
TABLE :ZARIXMM1
CALL FUNCTION: ASH_MM_MATBEL_READ
EXPORTING
i_archivekey = it_zarixmm1-archivekey
i_offset = it_zarixmm1-archiveofs
TABLES
et_mkpf = mkpf_wa
et_mseg = mseg_wa
DECLARATION: DATA: xmkpf LIKE mkpf OCCURS 0 WITH HEADER LINE,
xmseg LIKE mseg OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF IT_ZARIXMM1 OCCURS 0,
ARCHIVEKEY LIKE ZARIXMM1-ARCHIVEKEY,
ARCHIVEOFS LIKE ZARIXMM1-ARCHIVEOFS,
END OF IT_ZARIXMM1.
DATA:mkpf_wa TYPE mkpf OCCURS 0 WITH HEADER LINE.
DATA:mseg_wa TYPE mseg OCCURS 0 WITH HEADER LINE.
DATA:mseg_ARC TYPE mseg OCCURS 0 WITH HEADER LINE.
DATA:mkpf_ARC TYPE mkpf OCCURS 0 WITH HEADER LINE
hopefully it will hepl you.
reward if helpful.
thanks.............
‎2008 May 05 12:27 PM
Hi Sen,
Thanks for u r reply, Still iam nor clear , How can we find out which tables do we need to archive for MM_EBAN archiving object? Is there any guidelines for deciding tables to do archiving?
Thank in advance,
Chandu.
‎2008 May 05 12:32 PM
Hi Chandu,
To see the tables, you have to use FM ADK_CCMS_GET_TABLES by passing the archive object name. For each archive object, there will be a write, reload, delete and read program. Once you run these program it will use all the tables related to archive object to fetch the data. Also you can check the network graphics from transaction SARA to see the dependencies of archive objects.
Hope this helps
Thanks
Lakshman
‎2008 May 05 1:35 PM
Hi,
Thanks for u r reply, Still i am not clear what are the tables will get archived for the archiving object MM_EBAN?
Where we will specify these table should undergone for archiving?
Thanks in advance
Chandu.
‎2008 May 06 9:32 PM
Hi,
T-code DB15 will help to find the relevant tables for a particular archiving object, also the relevant archiving objects for a particular table.Depends upon the option you select.
Go to t-code DB15 and give the archive object name, you will get all the table name.
Hope this helps you.
Thanks,
PriyamVada.
‎2008 May 05 12:15 PM
Hi Chandu,
Check FM ADK_CCMS_GET_TABLES to find out the tables specific to an archive object and similary check FM ADK_CCMS_GET_OBJECTS to find out archive objects specific to tables.
Also check tcode archguide.
Hope this helps
Thanks
Lakshman