1. Tips & Tricks to successfully ArchivePurchasing & Financial Data Venu Kumar Nalabothula & Melodi Warren Miller Brewing Company
2. Agenda• About Miller Brewing Company• Miller SAP Implementation / Archiving Timeline• Issues with PO/PR Documents Archiving• Tips and Tricks to make PO Documents archivable• PO Image Archiving• Tips and Tricks to make PR Documents archivable• Tips to make Purchase Info Records Archivable• Issues with FI Documents Archiving• Tricks to enable FI Documents Archivable• PO Archiving - MM_EKKO - Sample Configurations Steps• Tips for managing a successful Archiving Project• Summary
3. About Miller Brewing Company
4. Miller SAP Implementation FI-GL General Ledger Billing FI-AR Accounts Receivable Purchasing Pricing FI-AP Accounts Payable Receiving FI-SL Special Purpose Ledger Inventory Management CO-CCA Cost Center Acctg CO-OM Internal Orders CO-PA Profitability Analysis CO-PC Product CostingPurchasing Online Initial ImplementationRequisition, approval - Build Trust - Establish minimum data retention periods Bills of Material - Share benefits of Routings Archiving Production Orders Profitability Analysis Sales Orders, Purchase Orders, Production Orders, Special Purpose Ledger
5. Miller SAP Archiving Timeline Archiving Year Object Description 2000 IDOC Intermediate Docs 2000 PP_ORDER Production Orders 2001 MM_ACCTIT MM - Accounting Interface Posting Data 2001 COPA1_XXXX Profitability Analysis - Planning Data 2001 CO_CCTR_PL Cost Center Planning Data 2001 FI_SL_DATA Special Purpose Ledger Data 2002 FI_DOCUMNT Financial Accounting Docs 2002 MM_MATBEL Material Docs 2002 RV_LIKP Delivery Docs 2002 SD_VBAK Sales Order Docs 2002 SD_VBRK Billing Docs 2003 MM_EKKO Purchasing Order Docs - Purchase Orders 2003 MM_EKKO Purchasing Order Docs - Contracts 2003 MM_EBAN Purchasing Requisition Docs 2003 MM_EINA Purchasing Info. RecordsCurrent year Planned Archiving Objects include:CO_ITEM - CO Line Items, CO_ORDER - Internal Orders,COPA1_XXXX - CO-PA Actual Line Items
6. Miller PO related tables approx.sizes Purchase orders Contracts SAP Table Name Year Approximate Number of records approx. approx. EKKO 1999 244,000 240,000 4,000 EKKO 2000 240,000 235,000 5,000 Total EKKO - Purchasing Document Header = 1.2 Million Rows upto year 2003 EKPO 1999 563,000 550,000 13,000 EKPO 2000 567,000 555,000 12,000 Total EKPO - Purchasing Document Item = 3 Million Rows upto year 2003 EKBE 1999 1,250,000 1,250,000 0 EKBE 2000 1,129,000 1,129,000 0 Total EKBE - History per Purchasing Document = 5.8 Million Rows upto year 2003 EKET 1999 555,000 555,000 0 EKET 2000 600,000 600,000 0 Total EKET - Scheduling Agreement Schedule Lines = 3 Million Rows upto year 2003 EKKN 1999 262,000 260,000 2,000 EKKN 2000 254,000 250,000 4,000 Total EKKN - Account Assignment in PO Line Item = 1.4 Million Rows upto year 2003 EKPA 1999 211,000 200,000 11,000 EKPA 2000 185,000 175,000 10,000 Total EKPA - Partner Roles in Purchasing = 1 Million Rows upto year 2003In addition to the above tables large number of Purchasing Document related entries will be stored inCDHDR - Change Doc. Header, CDPOS - Change Doc. Item,STXH - STXD SAPscript text file header, STXL - STXD SAPscript text file lines
7. SAP Archiving - Purchasing Data• Purchasing Documents - use the Archiving Object MM_EKKO• Purchase Requisitions - use the Archiving Object MM_EBAN• Purchasing Info Records - use the Archiving Object MM_EINA• Source Lists - No archiving Possible. Deleted using Program RM06WRE0.• Quota arrangement records - No archiving Possible. Deleted using Program RM06QREQ.• Service Master Records - use the Archiving Object MM_ASMD
8. Issues with PO Documents Archiving• SAP system automatically checks the Business completeness of Purchase Order Documents before archiving• For Purchase Orders - Delivery complete indicator / Final invoice indicator needs to be set• For Purchase Orders - Goods Receipt Qty must be equal to Invoiced Quantity• For Purchase Orders - If there are 10 line items, and 9 items satisfy the criteria, the PO can’t be archived as SAP archives only Business complete Documents.
9. Tips and Tricks to make PO Documents archivable• Companies would have thousands of old Open Purchase orders, that were not closed as manual closing will take at least few minutes each.• Custom ABAP BDC program can be developed to close these Purchase orders with following dynamic selection conditions • Purchase orders older than ‘X’(Selection value e.g.: 550) number of days, that is PO date, Latest GR/IR Activity, Latest Schedule delivery date is older than ‘X’ days • Percentage GR/IR (Selection value e.g.: 90%) should be met to close the PO • Internal order specific Purchase orders can be closed by having Internal order as a selection screen field. This additional benefit of closing the related PO will allow the users to close the Internal order after closing the POs. • Blocked PO Line items can be Unblocked and set deletion indicator to enable PO closing. • Closing can be done by either setting Final GR/IR Flag, reducing Order quantity to be equal to GR/IR quantity. • Closing can be done by deleting the item if there is no GR/IR activity at all.
10. PO Automatic Close - Custom ProgramClose PO exceeding days means logic in the program will check whether the PO date, Latest GR/IRactivity or Latest delivery date is older than that many days.Percentage GR/IR Received is useful to make sure we close only PO’s with certain percentage of activity
11. PO Automatic Close Program- OutputProgram will list the Purchase orders and item details with check box againstthem. Users can select Purchase orders and can opt for Close PO Option.
12. PO Automatic Close Program- Close flagOnce the Close program is run Purchase orders are set with Goods receiptcomplete/Final invoice.
13. PO Automatic Close Program withInternal Order - Output This custom program can be run for an Internal order that is if Internal order is used in the selection screen it will display all the Purchase orders related to that internal order and can be closed.
14. Issues with Automatic Closing of Purchase orders When processing old purchase orders for closing, it is possible that Purchase orders get assigned with output type and there is possibility that those output types will get processed and sent out to the Vendors. To overcome this issue, assign requirement routine and logic to message type configuration. In the requirement routine we can add logic like - Do not create new message type if this is for closing PO and PO date is older than 30 days. Above screen shows requirement 902 is assigned to Access sequence.
15. PO Requirements Routine - Sample logicshows requirement 902 is assigned to Access sequence.
16. PO Image Archiving For some companies it is necessary to keep the Purchase document sent out to vendor for Audit/Legal purposes. When the Purchase orders are archived it is not possible to re produce the PO copy sent out to Vendors. To over come this issue Purchase orders Optical imaging can be implemented. Optical imaging is the process of storing the PO document in Third party storage system, so that these can retrieved even after archiving Purchasing data.When Archive Option is activated Archive Link configuration is required tothird party storage system or Unix system.
17. PO Output Processing for ImagingProcess the Output type relevant for imaging using ME9F transactionThis is SAP standard transaction to process the output of Purchase orders. Asthis output type(ZIM1) is configured for Archiving SAP automatically stores theSAP Script output to storage system instead of Printing.
18. Issues with PR Documents Archiving• SAP system automatically checks the Business completeness of Purchase Requisition Documents before archiving• For Purchase Requisitions - Requested quantity or more has been ordered by PO, or Deletion Indicator was set by line item or Closed PR Flag has been set in the PR.• For Purchase Requisitions - If there are 10 line items, and 9 items satisfy the criteria, the PR can’t be archived as SAP archives only Business complete Documents.
19. Tips and Tricks to make PR Documents archivable• Custom ABAP BDC program can be developed , similar to automatic PO closing Program, to close these Purchase Requisitions with following dynamic selection conditions • Purchase Requisitions older than ‘X’(Selection screen value) number of days, that is PR date is older than ‘X’ days • Percentage PO Qty (Selection screen value) should be met to close the PR. Ideally PR qty = PO qty for all the Line items in PR • Internal order specific Purchase Requisitions can be closed by having Internal order as a selection screen field. • Closing can be done by either setting PR Closed Flag in the PR document or Reduce the PR Quantity = Cumulative PO Quantity.
20. PR Closing program output & Close flagAbove output shows list of Purchase requisitions to be closed and once theclose PR option is executed Program will set the Closed flag in thePurchase requisition at item level.
21. Tips to make Purchasing Info Recordsarchivable• To archive Purchase Info.Records it is necessary that Info. Record should be set with deletion flag.
22. Purchase info records Mass Maintenance• SAP provided a Mass Maintenance Program (MEMASSIN) for maintaining certain field values including setting of the deletion flags.
23. Archiving FI Documents- Issues• Documents posted to Open Item Managed Accounts are not archivable unless the documents are cleared.• At Miller top 5 Open Item(OI)managed Accounts had documents ranging from 750,000 to 1.5 Million records for a period of 4 years• Clearing the documents by year at times was timing out in the foreground.• There is no background process available in SAP to close these documents.• Reversal of FI documents not possible when Archive Delete job is running• FI Documents archiving vs. Post processing of FI documents needs to be handled appropriately.
24. Tricks to make FI Documents archivable• Program can be developed in such a way that user can enter the G/L account and posting date range. Program will use BDC logic and clear the documents in background.• There may be cases where users want to change the O/I managed account to Non open item managed account. It is not possible to Change the Open item managed account to Non Open managed account with the balance on the account.• In that case clear all the documents for that account and transfer the final balance to the dummy account, change the O/I flag and post back the balance to Original account.• It is observed that if the volume to be archived is very low for a period, Post Processing Job may get cancelled due to memory related problems. In that case, run the Post Processing step for several periods in a single run.
25. FI - GL Account Clearing Custom Program• Selection Screen needs company code, GL Account and the Posting Date Range• Depending on Company policy, Posting date of Clearing Doc. can be User defined or Run Date. If it is user defined, ensure that posting period is open
26. FI - GL Account Clearing Custom Program • This program can be developed to clear G/L account FI documents by Line item in Background. • This program uses standard SAP transaction F-04 with Options like choose open items. Additional selection posting date range(fill with selection screen posting date range) and process open items. • Depending on volume of data run this program for 6 months or 1 year period. • Once this program is run for several periods one residual line item will remain as open item for each run. • Save new clearing document option is provided to store these new documents in custom table and once the multiple runs are complete using this table we can find the final balance which needs to be transferred to Dummy account for changing Open item flag. • If you need to change this Open item managed account to Non open item managed account there can not be any balance on the account. To over come this either you can manually or through another custom program transfer this balance to Dummy account using same transaction F-04 with option of transfer posting with clearing. • Once the balance is transferred to Dummy account change the Open item managed account to Non open item managed account and post back the balance to original account.
27. FI- Document archiving vs. Post processing • There are 3 steps involved in FI Document archiving. •Archiving, Deleting and Post processing. • In the first two steps, data from major table BKPF and BSEG is archived, deleted,stored in file system and Archive info structures will get populated. That means we are deleting data from BSEG-Cluster table and populating a transparent table(Archive info structure) which may not yield good results in terms of storage space. But this will help in improving SAP performance. • SAP provided index tables BSAS- Cleared items, BSIK- Vendor accounts, BSAK-Vendor account clearing items, BSID - Customer accounts and BSAD- Customer account cleared items. These tables get archived only when the Post processing step is executed. • After Post processing step is executed it is most likely that G/L Balances(FS10N) , Vendor account balances(FK10N) and Customer account balances(FD10N) in Summary screen will not match with details list balance. This is because Summary balances are shown from different tables which are not in the scope of FI-DOCUMNT archiving. • Two ways to overcome this issue - •Option 1: In the selection screen of Post processing step there is an option to Keep the balances. Option 2: Delay the Post processing step by another year or two. Second option is advised as first option will keep lot of data in the system to maintain the balances.
28. MM_EKKO - Sample Configuration Steps• Configuration to archive Purchase Orders data is relatively simple• Use SARA transaction• DB tables will indicate tables from which data will be Archived
29. MM_EKKO - Configuration • Use naming standards for Logical File Name • Keep the size of the File to about 50 MB or 100 MB
30. MM_EKKO-Configuration- File Path • Work with Basis Team to configure Physical File Location • Use Tcode. FILE to create Logical File path • Use SARA transaction
31. MM_EKKO- Configuration- Files • Define Logical File name Parameters • Work with Basis Team to name the Physical File
32. MM_EKKO - Configuration -Residence Times • Define Residence Time details for Each Purchasing Doc. Type based on company requirements
33. MM_EKKO - Configuration - Maintain variant • Need to maintain Archive Variant for Archive Run • Indicate PO Date Range/ Doc. Type for Archive • Need to Schedule Archiving Run / Maintain Spool Parameters / Execute
34. MM_EKKO - Run Statistics • Spool file will provide details on the Tables from which data was archived
35. MM_EKKO - Run Session Overview • From Archive Management ensure Deletions are complete
36. MM_EKKO - Archive File StorageUse Archive Link to Store Archive Files in the 3rd Party storage system.
37. Tips for managing a successful Archiving Project • Review ASUG Archiving Forum, Download previous ASUG Archiving presentations to review experiences of other companies • Review Documentation of Archiving Object • Involve Business Super User(s) to Champion the Archiving • Review and Apply all applicable OSS notes (important) • Get doc. residence time details • Archiving Object Configuration • Build archiving File Parameters • Perform Archiving in Sandbox System • Analyze impact to Custom Programs/Reports • Build changes for AS structure (if needed) • Demo to Users • Get user acceptance for Archiving from the Demo
38. Tips for managing a successful Archiving Project • Custom Programs / Reports modifications • Testing STG/QAS • User acceptance and Sign Off • Documentation and Training on Retrieval of Archived Documents • Implementation of Archiving Objects in Production • Coordinate with Basis Team to eliminate competition among scheduled jobs for system resources • Perform Archiving and Delete runs • Try to archive 100% of the documents so that number ranges could be reused later • Ensure that Archiving runs occur regularly (monthly or quarterly) • Document and discuss specific archiving benefits • Tables / Indexes / Table Spaces should be reorganized / rebuilt after archiving to ensure optimal database performance
39. Summary• Ensure Documents are business complete. The discipline of Business Process Complete should be requested from various users utilizing the relevant documents and transactions.• Archiving of Purchasing Documents, Imaging of PO Documents need to be tested very thoroughly. While PO’s are archived ensure that no additional documents are generated for the old PO’s.• Work with business end-users to ensure Archiving runs do not interfere with their normal SAP processing.• Train business end-users the retrieval of Archived documents and the challenges with FI Post Processing impact.• Discuss Archiving accomplishments with the Business.