Sap archiving 407_nalabothula

40
Tips & Tricks to successfully Archive Purchasing & Financial Data Venu Kumar Nalabothula & Melodi Warren Miller Brewing Company

description

 

Transcript of Sap archiving 407_nalabothula

Page 1: Sap archiving 407_nalabothula

Tips & Tricks to successfully Archive Purchasing & Financial Data

Venu Kumar Nalabothula & Melodi Warren

Miller Brewing Company

Page 2: Sap archiving 407_nalabothula

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

Page 3: Sap archiving 407_nalabothula

About Miller Brewing Company

Page 4: Sap archiving 407_nalabothula

Purchasing

Receiving

Inventory Management

FI-GL General Ledger

FI-AR Accounts Receivable

FI-AP Accounts Payable

FI-SL Special Purpose Ledger

CO-CCA Cost Center Acctg

CO-OM Internal Orders

CO-PA Profitability Analysis

CO-PC Product Costing

Billing

Pricing

Bills of Material

Routings

Production Orders

Miller SAP Implementation

Purchasing OnlineRequisition, approval

- Build Trust

- Establish minimum

data retention periods

- Share benefits of

ArchivingProfitability Analysis Sales Orders, Purchase Orders, Production Orders, Special Purpose Ledger

Initial Implementation

Page 5: Sap archiving 407_nalabothula

Current year Planned Archiving Objects include:

CO_ITEM - CO Line Items, CO_ORDER - Internal Orders,

COPA1_XXXX - CO-PA Actual Line Items

Year

Archiving

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. Records

Miller SAP Archiving Timeline

Page 6: Sap archiving 407_nalabothula

In addition to the above tables large number of Purchasing Document related entries will be stored in

CDHDR - Change Doc. Header, CDPOS - Change Doc. Item,

STXH - STXD SAPscript text file header, STXL - STXD SAPscript text file lines

SAP Table Name Year Approximate Number of records

Purchase

orders

approx.

Contracts

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 2003

Miller PO related tables approx.sizes

Page 7: Sap archiving 407_nalabothula

• 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

SAP Archiving - Purchasing Data

Page 8: Sap archiving 407_nalabothula

• 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.

Issues with PO Documents Archiving

Page 9: Sap archiving 407_nalabothula

• 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.

Tips and Tricks to make PO Documents archivable

Page 10: Sap archiving 407_nalabothula

Close PO exceeding days means logic in the program will check whether the PO date, Latest GR/IR

activity 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

PO Automatic Close - Custom Program

Page 11: Sap archiving 407_nalabothula

Program will list the Purchase orders and item details with check box against

them. Users can select Purchase orders and can opt for Close PO Option.

PO Automatic Close Program- Output

Page 12: Sap archiving 407_nalabothula

Once the Close program is run Purchase orders are set with Goods receipt

complete/Final invoice.

PO Automatic Close Program- Close flag

Page 13: Sap archiving 407_nalabothula

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.

PO Automatic Close Program with Internal Order - Output

Page 14: Sap archiving 407_nalabothula

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.

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.

Issues with Automatic Closing of Purchase orders

Page 15: Sap archiving 407_nalabothula

PO Requirements Routine - Sample logic

shows requirement 902 is assigned to Access sequence.

Page 16: Sap archiving 407_nalabothula

PO Image Archiving

When Archive Option is activated Archive Link configuration is required to

third party storage system or Unix system.

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.

Page 17: Sap archiving 407_nalabothula

PO Output Processing for Imaging

This is SAP standard transaction to process the output of Purchase orders. As

this output type(ZIM1) is configured for Archiving SAP automatically stores the

SAP Script output to storage system instead of Printing.

Process the Output type relevant for imaging using ME9F transaction

Page 18: Sap archiving 407_nalabothula

• 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.

Issues with PR Documents Archiving

Page 19: Sap archiving 407_nalabothula

• 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.

Tips and Tricks to make PR Documents archivable

Page 20: Sap archiving 407_nalabothula

PR Closing program output & Close flag

Above output shows list of Purchase requisitions to be closed and once the

close PR option is executed Program will set the Closed flag in the

Purchase requisition at item level.

Page 21: Sap archiving 407_nalabothula

• To archive Purchase Info.Records it is necessary that Info. Record should be set

with deletion flag.

Tips to make Purchasing Info Records archivable

Page 22: Sap archiving 407_nalabothula

• SAP provided a Mass Maintenance Program (MEMASSIN) for maintaining certain

field values including setting of the deletion flags.

Purchase info records Mass Maintenance

Page 23: Sap archiving 407_nalabothula

• 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.

Archiving FI Documents- Issues

Page 24: Sap archiving 407_nalabothula

• 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.

Tricks to make FI Documents archivable

Page 25: Sap archiving 407_nalabothula

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

Page 26: Sap archiving 407_nalabothula

• 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.

FI - GL Account Clearing Custom Program

Page 27: Sap archiving 407_nalabothula

• 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.

FI- Document archiving vs. Post processing

Page 28: Sap archiving 407_nalabothula

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

Page 29: Sap archiving 407_nalabothula

MM_EKKO - Configuration

• Use naming standards for Logical File Name

• Keep the size of the File to about 50 MB or 100 MB

Page 30: Sap archiving 407_nalabothula

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

Page 31: Sap archiving 407_nalabothula

MM_EKKO- Configuration- Files

• Define Logical File name Parameters

• Work with Basis Team to name the Physical File

Page 32: Sap archiving 407_nalabothula

MM_EKKO - Configuration -Residence Times

• Define Residence Time details for Each Purchasing Doc. Type

based on company requirements

Page 33: Sap archiving 407_nalabothula

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

Page 34: Sap archiving 407_nalabothula

• Spool file will provide details on the Tables from which data was archived

MM_EKKO - Run Statistics

Page 35: Sap archiving 407_nalabothula

• From Archive

Management ensure

Deletions are complete

MM_EKKO - Run Session Overview

Page 36: Sap archiving 407_nalabothula

Use Archive Link to Store Archive Files in the 3rd Party storage system.

MM_EKKO - Archive File Storage

Page 37: Sap archiving 407_nalabothula

• 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

Tips for managing a successful Archiving Project

Page 38: Sap archiving 407_nalabothula

• 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

Tips for managing a successful Archiving Project

Page 39: Sap archiving 407_nalabothula

• 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.

Summary

Page 40: Sap archiving 407_nalabothula

407

Session Code: