48
Data Archiving in Sales and Distribution (SD) PDF download from SAP Help Portal: http://help.sap.com Created on August 19, 2016 The documentation may have changed since you downloaded the PDF. You can always find the latest information on SAP Help Portal. Note This PDF document contains the selected topic and its subtopics (max. 150) in the selected structure. Subtopics from other structures are not included. © 2016 SAP SE or an SAP affiliate company. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE. The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors. National product specifications may vary. These materials are provided by SAP SE and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE in Germany and other countries. Please see www.sap.com/corporate-en/legal/copyright/index.epx#trademark for additional trademark information and notices. Table of content PUBLIC © 2014 SAP SE or an SAP affiliate company. All rights reserved. Page 1 of 48

Data archiving in sales and distribution (sd)

Embed Size (px)

Citation preview

Page 1: Data archiving in sales and distribution (sd)

Data Archiving in Sales and Distribution (SD)PDF download from SAP Help Portal:http://help.sap.com

Created on August 19, 2016

The documentation may have changed since you downloaded the PDF. You can always find the latest information on SAP HelpPortal.

Note

This PDF document contains the selected topic and its subtopics (max. 150) in the selected structure. Subtopics from other structures are not included.

© 2016 SAP SE or an SAP affiliate company. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purposewithout the express permission of SAP SE. The information contained herein may be changed without prior notice. Some software products marketed by SAPSE and its distributors contain proprietary software components of other software vendors. National product specifications may vary. These materials areprovided by SAP SE and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAPGroup shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are setforth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additionalwarranty. SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE inGermany and other countries. Please see www.sap.com/corporate-en/legal/copyright/index.epx#trademark for additional trademark information and notices.

Table of content

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 1 of 48

Page 2: Data archiving in sales and distribution (sd)

Table of content1 Data Archiving in Sales and Distribution (SD)1.1 Application-Specific Features (SD)1.2 Dependencies (SD)1.3 Technical Data (SD)1.4 Archiving Sales Documents (SD-SLS)1.4.1 Special Archiving-Object-Specific Features (SD-SLS)1.4.2 Archiving of Returns (SD-SLS-RE-SR)1.4.3 Creating Additional Customer-specific Checks1.4.3.1 Defining a Customer-Specific Additional Check (SD-SLS)1.4.3.2 Define Preconditions for Customer-Specific Additional Checks (SD1.4.4 Checks (SD-SLS)1.4.5 Variant Settings for Archiving (SD-SLS)1.4.6 Variant Settings for the Check (SD-SLS)1.4.7 Variant Settings for Reloading (SD-SLS)1.4.8 Application Customizing (SD-SLS)1.4.9 Analyzing an Existing Archive (SD-SLS)1.4.10 Display Function for Archived Sales Documents (SD-SLS)1.4.10.1 Authorizations (SD-SLS)1.5 Archiving Billing Documents (SD-BIL)1.5.1 Special Archiving-Object-Specific Features (SD-BIL)1.5.2 Checks (SD-BIL)1.5.3 Variant Settings for Archiving (SD-BIL)1.5.4 Variant Settings for the Check (SD-BIL)1.5.5 Variant Settings for Reloading (SD-BIL)1.5.6 Application Customizing (SD-BIL)1.5.7 Analyzing an Existing Archive (SD-BIL)1.5.8 Display Function for Archived Billing Documents (SD-BIL)1.5.8.1 Authorizations (SD-BIL)1.5.9 Archiving of Empties Management (SD-BIL-EM)1.5.9.1 Archiving of Monthly Empties Stock (SD-BIL-EM)1.5.9.1.1 Variant Settings for Writing (SD-BIL-EM)1.5.9.2 Archiving of Empties Update (SD-BIL-EM)1.5.9.2.1 Variant Settings for Writing (SD-BIL-EM)1.5.10 Archiving of Pendulum List Indirect Sales (SD-BIL-RB-PL)1.5.10.1 Archiving of Request Data (SD-BIL-RB-PL)1.5.10.1.1 Variant Settings for Writing (SD-BIL-RB-PL)1.5.10.1.2 Displaying Archived Request Data (SD-BIL-RB-PL)1.5.10.2 Archiving Converted Request Table with Reporting Period (SD-BIL-1.5.10.2.1 Variant Settings for Writing (SD-BIL-RB-PL)1.5.10.2.2 Displaying Archived Converted Request Tables (SD-BIL-RB-PL)1.5.10.3 Archiving of Request Table with Reporting Period (SD-BIL-RB-PL)1.5.10.3.1 Variant Settings for Writing (SD-BIL-RB-PL)1.5.10.3.2 Displaying Archived Requests Table with Reporting Period (SD-BIL1.5.10.4 Archiving of Logs for Pendulum List Sales (SD-BIL-RB-PL)1.5.10.4.1 Variant Settings for Writing (SD-BIL-RB-PL)1.5.10.4.2 Displaying Archived Logs for Pendulum List Sales (SD-BIL-RB-PL)1.6 Archiving Sales Activities (SD-CAS-SA)1.6.1 Checks (SD-CAS-SA)1.6.2 Variant Settings for Archiving (SD-CAS-SA)1.6.3 Variant Settings for Reloading (SD-CAS-SA)1.6.4 Application Customizing (SD-CAS-SA)1.7 Archiving Agreements (SD-MD-AM)1.7.1 Checks (SD-MD-AM)1.7.2 Variant Settings for Archiving (SD-MD-AM)1.7.3 Variant Settings for Reloading (SD-MD-AM)1.8 Archiving of Condition Records (SD-MD-CM)1.8.1 Variant Settings for Writing (SD-MD-CM)1.8.2 Variant Settings for Reloading (SD-MD-CM)1.8.3 Application-Specific Customizing (SD-MD-CM)1.9 Archiving Revenue Recognition Data with SD_VBREV

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 2 of 48

Page 3: Data archiving in sales and distribution (sd)

1.10 Archiving INTRASTAT Statistics Data with FT_VEIAV1.11 Archiving EXTRASTAT Statistics Data with FT_VEXAV1.12 Archiving Customs Log Data with MM_PREF1.13 Archiving Customer Master Data (FI-AR, SD)1.13.1 Checks (FI-AR, SD)1.13.2 Application Customizing (FI-AR, SD)1.13.3 Variant Settings for Writing (FI-AR, SD)1.13.4 ILM-related Information for FI_ACCRECV1.14 Archiving Object CPE_PRQUOT1.14.1 Archiving of Price Quotations1.15 Archiving Checklist

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 3 of 48

Page 4: Data archiving in sales and distribution (sd)

1 Data Archiving in Sales and Distribution (SD)

Data archiving is used to remove mass data from the database that is no longer required in the system but must be kept in a format that can be analyzed. Formost of the archiving objects, the SAP data archiving concept is based on the Archive Development Kit (ADK).

For more information, see the SAP NetWeaver Library on SAP Help Portal at http://help.sap.com/nw . Choose SAP NetWeaver Platform ApplicationHelp Function-Oriented View Solution Life Cycle Management Data Archiving.

For more information about which archiving objects in Sales and Distribution (SD) are enabled for ILM, see the documentation for the relevant archivingobjects.

For more information about managing and destroying archived data, search for SAP Information Lifecycle Management.

The following table shows the available archiving objects:

Objects in Sales and Distribution Archiving object

Sales documents SD_VBAK

Billing documents SD_VBRK

Sales activities SD_VBKA

Agreements and associated conditions SD_AGREEM

Conditions SD_COND

Revenue recognition data SD_VBREV

INTRASTAT statistics data FT_VEIAV

EXTRASTAT statistics data FT_VEXAV

Customs log data MM_PREF

Customer master data FI_ACCRECV

Pendulum List Indirect Sales

Objects in Sales and Distribution Archiving object

Request data /BEV4/PL01

Converted request table with declaration period /BEV4/PL02

Request table with declaration period /BEV4/PL03

Logs sales pendulum list /BEV4/PL04

Empties Management

Objects in Sales and Distribution Archiving object

Archiving monthly empties stock BEV1_EMBD

Archiving empties update BEV1_EMFD

1.1 Application-Specific Features (SD)You can specify in Customizing for Sales and Distribution under Data Transfer and Archiving which document types are to be archived.

The following objects are archived with the documents:

TextsChange documentsCondition records

The following objects are deleted from the database:

MatchcodesIndicesTable contents

For additional information on archiving in Sales and Distribution, refer to the Implementation Guide (IMG) for Sales and Distribution under Data Transfer andArchiving .

1.2 Dependencies (SD)You can archive data in Sales and Distribution independently of other archiving programs. Before archiving, the system checks whether the Sales andDistribution data is used elsewhere in the system. If this is the case, a dependency exists and the data cannot be archived.

For example, before archiving a customer master, the system automatically checks whether the customer master is contained in a customer hierarchy orwhether B segments still exist for it in Sales and Distribution or Financial Accounting. If this is the case, the customer master is not archived.

Change documents and texts are archived with Sales and Distribution documents. They do not influence whether or not a document can be archived.

Two factors determine whether or not a document can be archived:

The overall processing status of the document

Documents marked Completed (meaning that the GBSTK field in the VBUK table has the value c or blank) can be archived.

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 4 of 48

Page 5: Data archiving in sales and distribution (sd)

The residence time

1.3 Technical Data (SD)The following points will be followed in this section

estimating the program runtimecarrying out your own checksCarrying Out a Test Runsetting parameters for the program run

Estimating RuntimeIt is difficult to estimate how long it will take to archive data because it depends on so many different factors such as amount of data, computer capacity, andso on.

The following example presents the results of an archiving run carried out in a real-time system at a customer. This will allow you to make a rough estimate ofprogram runtime and conclude how different factors influence program runtime.

ExampleTechnical data:

Orders and billing documents200,000 items25 items per document10 condition records per itemno customer-specific check implemented in the user exit

The total runtime was five hours. About 40,000 items were archived per hour.

If you are testing archiving for the first time, we recommend that you first set the commit counter to 10.

If, for example, you want to archive a lot of sales and distribution documents with configurable materials or that are make-to order, you should considerwhether you want to set the commit counter to 1. Otherwise, deadlocks or similar database problems could occur.

If there are no problems during archiving, you can then set the commit counter higher, until database problems occur. In this way, you can optimizeperformance.

You set the commit counter in Customizing via Sales and Distribution Data transfer and Archiving Archiving data Define control parameters forArchiving runs . Select the corresponding archiving object and enter the value for the Commit counter .

For further information on the commit counter, see the cross-application documentation in CA - Archiving Application Data under Customizing: Settings forthe deletion program .

Carrying Out a Test RunYou can carry out a test run for archiving. You may also do this in a productive system. The system issues a standard log, just as in a production run.

NoteDuring the test run

No data is deletedNo archive files are created

For this reason the performance of a test run is better than that of a production run.

To start a test run, deselect the field Create archive .

Setting Parameters in the Variant for the Archiving RunYou can set certain parameters for the archiving run, for example:

Whether an archive file is to be createdNo archive files are created in test mode.Whether a standard or detailed log is to be issuedThe log records documents that could not be archived.Whether the preceding document is to be checked

When you start the program, you can carry out one of the following functions:

Select an existing variantCreate and use a new variant

1.4 Archiving Sales Documents (SD-SLS)

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 5 of 48

Page 6: Data archiving in sales and distribution (sd)

Archiving object SD_VBAK for archiving sales documents.

Before using the archiving object for the first time, you should check Application Customizing (SD-SLS).Check whether table VBREVC Revenue Recognition: Worklist of Changed Sales Documents still contains relevant entries for the documents to bearchived and update the documents concerned.You have completed the entire revenue recognition process for the document concerned. This means that table VBREVK contains only entries withstatus C Completely processed .

Structure

Tables

When you use the archiving object SD_VBAK, data is archived from the following tables:

Table reference

Table Table name

AUSP Characteristic Values

CMFK Storage Structure for the Error Log Header

CMFP Storage Structure for Errors Collected

FMSU FI-FM Totals Records

FPLA Billing Plan

FPLT Billing Plan: Dates

INOB Link Between Internal Number and Object

JCDO Change Documents for Status Object (Table JSTO)

JCDS Change Documents for System/User Statuses (Table JEST)

JEST Individual Status per Object

JSTO Status Object Information

KANZ Assignment of Sales Order Items - Costing Objects

KEKO Product Costing - Header Data

KEPH Product Costing: Cost Components for Cost of Goods Mfd

KNKO Assignment of Cost Est. Number to Config. Object

KOCLU Cluster for conditions in purchasing and sales

KSSK Allocation Table: Object to Class

NAST Message Status

SADR Address Management: Company Data

VBAK Sales Document: Header Data

VBAP Sales Document: Item Data

VBEH Schedule line history

VBEP Sales Document: Schedule Line Data

VBEX SD Document: Export Control: Data at Item Level

VBFCL Sales Document Flow Cluster

VBLB Sales document: Release order data

VBSN Change status relating to scheduling agreements

VBUK Sales Document: Header Status and Administrative Data

VBUP Sales Document: Item Status

VBUV Sales Document: Incompletion Log

VEDA Contract Data

The following archiving classes are also archived:

Tables for Archiving Class K_TOTALTables for Archiving Class TEXTTables for Archiving Class CHANGEDOCUTables for Archiving Class K_UNITCOSTTables for Archiving Class CU_CONFIG

Programs

The following programs are delivered with SD_VBAK:

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 6 of 48

Page 7: Data archiving in sales and distribution (sd)

Program Function

S3VBAKWRS Write

S3VBAKDLS Delete

S3VBAKAU Analyze

S3VBAKPTS Check

S3VBAKRL Reload

Write Program

The write program supports the ADK interruption concept, that is, you can interrupt the write phase and continue at a later point. For more information, see theapplication documentation for data archiving under Data Archiving in the ABAP Application System Data Archiving with Archive Development Kit (ADK) Archive Administration Interrupting and Continuing Archiving Sessions . A compact log with information about the data processed is written in both the

write and delete runs. Alternatively, you can enable the output of a detailed log containing additional information.

Deletion Program

The standard variants SAP&PROD (production mode) and SAP&TEST (test mode) are delivered for the delete program. Progress confirmation is output in thejob log and in the dialog (status line) at regular intervals in both the write run and delete run.

ILM-Based Information for the Archiving Object

You can use this archiving object with the SD_VBAK ILM object as part of SAP Information Lifecycle Management. In order to do so, you must activate theassociated business function Information Lifecycle Management (ILM) (transaction SFW5). The system then also displays the ILM Actions frame. You canuse these actions to archive documents with the retention periods defined in the Information Retention Manager . You can also make snapshots (copies) ofdata or delete data that fulfills the prerequisites.

For more information about the Relevance business functions for SAP ILM, see Activating SAP ILM.For more information about ILM Enhancements in data archiving, see ILM-Specific Enhancements in Archive Administration.

The following fields for SD_VBAK are defined in the ILM policy and are visible when processing ILM policies (transaction IRMPOL):

Available Time BasesEnd of Year (END_OF_YEAR)

Available Condition FieldsDate of Last Change (AEDAT)Sales Document Type (AUART)Company code to be billed (BUKRS_VF)Date on Which Record Was Created (ERDAT)Valid-From Date (Outline Agreements, Product Proposals) (GUEBG)Valid-To Date (Outline Agreements, Product Proposals) (GUEEN)Sales Document Item Category (PSTYV)Sales Document Category (VBTYP)Sales Organization (VKORG)Distribution Channel (VTWEG)Plant (WERKS)

Available Policy CategoriesRTP: Retention Rules

For more information, see SAP Information Lifecycle Management.

Call

To call sales document archiving, go to the Sales Screen Environment Archive Documents. .

Alternatively, you can call archive administration under Tools Administration Administration Data Archiving and enter object name SD_VBAK.

Authorization Objects

You need the following authority objects:

Authorization object Description

V_VBAK_AAT Sales document type

V_VBAK_VKO Sales area (sales organization, distribution channel, division)

More InformationAnalyzing an Existing Archive (SD-SLS)Variant Settings for the Check (SD-SLS)Variant Settings for Reloading (SD-SLS)

For more information about the archiving object, see the application documentation for data archiving under Data Archiving Data Archiving in the ABAPApplication System Data Archiving with Archive Development Kit (ADK) Archiving Object .

1.4.1 Special Archiving-Object-Specific Features (SD-SLS)

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 7 of 48

Page 8: Data archiving in sales and distribution (sd)

Archivability ChecksFor sales documents you can use program S3VBAKPTS, which carries out an archivability check before documents are selected.

See also:

Variant Settings for the Check (SD-SLS)

1.4.2 Archiving of Returns (SD-SLS-RE-SR)The returns document is based on the standard sales document.The Returns component does not have its own archiving objects.It is important to ensure theconsistency of the data in the returns documents, however, in connection with the standard archiving object SD_VBAK (sales documents). If you use theReturns component and want to archive sales documents, the system uses the following BAdIs to ensure the consistency of the data in all relevantdocuments:

ARC_SD_VBAK_CHECK (sales document)ARC_MM_MATBEL_CHECK (material document)ARC_RV_LIKP_CHECK (delivery note)

Analysis documents play an important role in the Returns component.In the analysis documents, you record the analysis results that have been determined forthe returned goods in the laboratory.The system archives the results of the analysis documents with the returns document.Since the retention periods dependon the material and its shelf life, SAP recommends a residence time of two years before you delete the analysis documents.You need the analysis documentsto show how the analysis result has come about.

See also:

Sales Returns

Archiving Object

1.4.3 Creating Additional Customer-specific Checks

PurposeUser exits allow you to integrate additional customer-specific checks into the checking logic. You can control processing of the enhanced code viaCustomizing. There, you can configure the combination of sales organization and sales document type to be used for the additional check. The check routineis called at the end of the write program.

Process FlowImplementation of an additional check is carried out in two steps.

1. Definition of the check2. Definition of preconditions for execution

Definition of the check is also split up into three stages:

1. Select the archiving object for which an additional check is to be carried out.2. Copy the reference check supplied (or start from scratch).3. Activate the check.

See also:

Defining a Customer-specific Additional Check (SD-SLS)

Define Preconditions for Execution of a Customer-specific Additional Check (SD-SLS)

1.4.3.1 Defining a Customer-Specific Additional Check (SD-SLS)

Procedure1. Choose Tools ABAP Workbench and then Development ABAP Editor .2. Start report SDCLVOFM.3. Enter the class of the check in the report selection screen. The following table shows the assignments for class and archiving object.

Class Archiving object

REAK Sales document (SD_VBAK)

RERK Billing document (SD_VBRK)

REKA Sales activities (SD_VBKA)

To create a customer enhancement for the order, you must enter class REAK. The Change mode checkbox must also be selected.4. Choose Execute .

You reach the maintenance screen. The first line contains the reference routine which you can copy and modify.

Example

FORM routine Description Active

1 SD_VBAK_SAP_1 √

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 8 of 48

Page 9: Data archiving in sales and distribution (sd)

1. Place the cursor in the formroutine field, enter a new number, i.e. 999, and press the entry button.

The copied routine appears as follows:

************************************************************

*** Attention: Copied routine ! ***

*** Please note : ***

*** 001 replaced everywhere by 999 ! ***

************************************************************

form sd_vbak_999

using sv_archbar.

endform.

You can enter the customer-specific check in the this routine.

ExampleIf you do not want the documents created by processor JDOE to be archived, then you need to add the following coding.

if vbak-ernam = 'JDOE'

sv_archbar = no.

Endif.

The whole check appears as follows:

form sd_vbak_999

using sv_archbar.

if vbak-ernam = 'JDOE'

sv_archbar = no.

endif.

endform.

1. Save the check.

After completing the programming, the check must be activated. Procedure:

1. To do this, place the cursor on the line containing the name of your check routine.2. Choose Edit Activate.

The√symbol appears in the Active column. You routine has now been activated.

See also:

Define Preconditions for Customer-Specific Additional Checks (SD-SLS)

1.4.3.2 Define Preconditions for Customer-Specific AdditionalChecks (SD-SLS)

ProcedureYou enter the restrictions for the check in Customizing for the application as follows:

From the initial menu choose Tools Business Engineer Customizing .

The Customizing screen appears.

Choose Basic functions EnterpriseIMG Display .

The Enterprise IMG screen appears.

Choose Data Transfer and Archiving Archiving data Archiving control for sales documents .

The Choose activity dialog-box appears.

Choose the function A rchiving control for sales documents .

The Change View “Archiving Control for Sales Documents: Overview” appears.

Sls organization SaTy Residence time (days) RNo

0001 TA 200

Define the sales organization and the sales document type that you want to be considered in the check. When selecting the routine, you can use F4 help tolist all the activated routines.

NoteIf, for example, you wanted to define routine 999 for sales organization 0001 and a search of all sales document types, then your entry would appear asfollows:

Sls organization SaTy Resid. time (days) RNo

0001 * 999

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 9 of 48

Page 10: Data archiving in sales and distribution (sd)

Save your entries.

See also:

Defining a Customer-Specific Additional Check (SD-SLS)

1.4.4 Checks (SD-SLS)

The following mandatory and optional checks are carried out on sales documents before they can be archived:

Residence time (mandatory)Flow (mandatory)Purchase order (optional)Accounting document (optional)Check residence of flow documents (optional)Residence time change date (optional)

CautionWhen make-to-order and individual purchase orders are involved, then the corresponding CO data is also archived, meaning the individual items thatbelong to this order. Note that if you reload the order, then the CO data is not also reloaded.

Residence Time

The residence time is set per sales document type. The residence time for sales documents can be calculated optionally according to the following:

Current data minus creation dateCurrent data minus last change date

To select the second option, mark Residence Time Change Date . For sales documents that were not modified, the change date is identical to the creationdate.

The system first checks whether the residence time set in Customizing for the sales document has been exceeded.

You can use the Check Residence Flow Documents checkbox on the selection screen for variants to set the basis for the calculation of the residence time.

If the checkbox is not set, then the residence time is calculated on the basis of the creation date or the change date of the document.If the checkbox is set, then the residence time is calculated on the basis of the creation date of the last flow document.

Flow

The flow check is then carried out. That is, the system checks that all the subsequent documents for the current sales document have an overall status ascompleted. The individual stages are as follows:

Selection of Subsequent Documents in Table VBFADuring selection, the system ignores cancellation invoices, credit memos, and debit memos (as the sales order has none of these documents as a directsubsequent document).Check Selected Subsequent Documents for Overall Processing Status ‘Completed’ (in Table VBUK)

NoteA standard order is only archived if the goods issue has been posted and billed in the delivery.A quotation is archived if the corresponding order has been completed. In this case, the delivery is not checked.

Purchase Order

The selection screen of the variant contains checkboxes in which you can activate or deactivate further system checks. If the checkbox Check purchaseorder is selected, then the system carries out the following:

Checks existence of a purchase order for current order in table EKKOCheck existence of a purchase requisition for current order in table EBAN

NoteFor direct external procurement (third-party order or individual purchase order) the check should be activated. Otherwise, there is a danger that thevendor invoice (invoice entry) can no longer be entered.

Accounting Documents

If the checkbox Check FI document is set, the system checks whether the billing document is settled in financial accounting (for example, by payment)

More InformationCreating Additional Customer-Specific Checks (SD-SLS)

1.4.5 Variant Settings for Archiving (SD-SLS)

When you schedule the write program, you need to enter an existing variant or create a new one. The variant contains the selection criteria for the sales

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 10 of 48

Page 11: Data archiving in sales and distribution (sd)

documents that you want to archive.

Features

Document Selection Criteria

You can select the sales documents to be archived in both the Sales Documents and Constraints frame in accordance with the following criteria:

Sales and Distribution Document NumberSales Document TypeCreation DateSales Organization

Options

Change Date: Residence TimeIf this indicator is set, the residence time is calculated using the date on which the sales document was last changed, rather than the creation date. (Forsales documents that have not been changed, the change date is identical to the creation date.)Check residence of flow documents

If the indicator is not set, the residence time is calculated on the basis of the creation date or change date of the sales document.If the indicator is set, the residence time is calculated on the basis of the creation date or change date of the last flow document.

Check Purchase OrderIf you want to check whether the purchase order and the associated purchase requisition still exist, select this option.Check FI Document

If you want to check whether all accounting documents that exist for an order have been cleared, select this option.

Process Control

If the write program for the selection criteria you entered is to perform a simulation only, select Test Mode . The system reads the data but does notgenerate an archive file. The system outputs statistics for the number of data records read during the test run. You can delete the data at a later point ina separate step using the production mode variant of the delete program.If you want to start the write program and generate archive files for the selection criteria you entered, select Production Mode .If the automatic start function has been enabled for the delete program in archiving object-specific Customizing, you can also set the Delete with TestVariant indicator (default setting). This starts the delete program for the archiving object with the test mode variant defined in archiving object-specificCustomizing. If the indicator is not set, the delete program starts with the production mode variant; the data is deleted from the database.

Detailed Log

You can use this indicator to define whether a compact or detailed log is to be output when the write program is executed. In addition to the information in thecompact log, the detailed log also contains all objects processed, including the associated messages.

Archiving Run Comment

Here, you can enter a text describing the content of the archiving run. This makes it easier to select the archiving run in archive administration at a later point,for example during the delete phase.

See also:

For more information, see the application documentation for data archiving under Data Archiving in the ABAP Application System Data Archiving withArchive Development Kit (ADK) Archive Administration Archiving Procedure Create Archive Files .

1.4.6 Variant Settings for the Check (SD-SLS)

UseWhen you schedule the check a preprocessing program you must enter an already existing variant or create a new one. The variant contains the selectioncriteria for the sales documents you want to check.

NoteYou can also start the preprocessing program directly in the ABAP editor via report S3VBAKPTS.

Features

Document selection criteria

You can choose the following selection criteria for the sales documents you want to check under Sales Documents and Restrictions :

Sales document numberSales document typeCreation dateSales organization

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 11 of 48

Page 12: Data archiving in sales and distribution (sd)

Options

Residence time change date If this indicator is set the residence time is calculated based on the last change date of the sales document not the creation date. (For sales

documents that were not modified, the change date is identical to the creation date.) Check residence of flow documents

If the checkbox is not set, then the residence time is calculated on the basis of the creation date of the document.If the checkbox is not set, then the residence time is calculated on the basis of the chronologically last flow document.

Check purchase orderIf you want to check whether the purchase order and the corresponding purchase requisition still exist, then choose this option. Check accounting document

If you want to check whether all existing accounting documents that belong to an order have been balanced, then choose this option.

Detail log

Set this indicator if you want the system to display the check log for every sales document that is not archivable. The check log is divided into two sections –the header and the detail display. The header contains the statistical data of the check; in the detail display shows the check status of each sales document.By clicking on a line that contains a document number you can call up the order display transaction.

1.4.7 Variant Settings for Reloading (SD-SLS)

UseYou can set reloading criteria in variant settings for reloading.

CautionWhen reloading sales documents, the corresponding CO data is not simultaneously reloaded into the system. Therefore, you should reload salesdocuments only in case of emergency, for example, if documents were wrongly selected.

For this reason, you cannot call this function up with the menu. Please contact your system administrator.

FeaturesThe following options are available:

Entry Fields

Document selection

Select the documents to be reloaded

Check boxes

Test run

Select this option if you only want to simulate reloading, for example, to check possible errors

See also:

Reloading Archived Data

1.4.8 Application Customizing (SD-SLS)

UseIn application-specific customizing, you can set the order-specific requirements for archiving.

FeaturesThe following input fields are available:

Sales organizationSales document typeResidence time for a sales document in days

You use these parameters to set the residence time for every combination of sales organization and sales document type.

FORM routine number

If you have defined an additional check routine for a combination of sales organization and sales document type, you can enter the number of the checkroutine here.

Entry Options in Application Customizing (V_TVARA)

The following table displays possible value combinations that you can use when maintaining views V_TVARA:

SOrg SaTy Document date

1. * *

2. 0001 * 40

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 12 of 48

Page 13: Data archiving in sales and distribution (sd)

3. * OR 20

4. 00* O* 100

5. 0001 OR 1

The examples can be understood as follows:

1. The standard residence time (30 days) is used for all sales document types for all sales organizations.2. A residence time of 40 days is used for all sales document types for sales organization 0001.3. A residence time of 20 days is used for sales document type OR for all sales organizations.4. A residence time of 100 days is used for all sales document types starting with O for all sales organizations starting with 00.5. A residence time of 1 day is used for sales document type OR for sales organization 0001.

Note: If you do not maintain the views, the system cannot archive the documents.

Calling Up CustomizingTo call up application-specific customizing, go to Customizing for Sales and Distribution and choose Data Transfer and Archiving Archiving data Archiving control for sales documents .

Alternatively, you can call up application-specific customizing as follows:

1. In the Sales Screen choose Environment Archive documents. 2. Choose Goto Customizing. 3. Under Application-specific customizing choose Archiving Conditions V_T681H.

See also:

Defining a Customer-specific Additional Check (SD-SLS)

Customizing

1.4.9 Analyzing an Existing Archive (SD-SLS)

UseThe Analyze function allows you to view a list of the most important header and item data for archived sales documents from a number of archiving runsspecified by you.

Entry Fields

Document selection

Select the documents that you want to display.

1.4.10 Display Function for Archived Sales Documents (SD-SLS)

UseYou can use the Archive Information System (Transaction SARI) to display archived sales documents in single document display. Other functions fordisplaying documents is the original document display via ArchiveLink and other linked documents via the Document Relationship Browser (DRB).

PrerequisitesArchiving object SD_VBAK has at least one information structure, which is based on the standard field catalogs SAP_SD_VBARK_001 orSAP_SD_VBARK_002 delivered as part of the SAP System.

The information structure was activated and filled.The information structure contains the field VBELN as a key field.

NoteFor you to be able to display the linked documents via DRB (see below), information structures for archiving objects RV_LIKP and SD_VBRKhave to be active and filled.

The Authorizations for displaying archived sales documents have been maintained.

Features

Single document display

You can display single documents in the original display transaction (VA03), which is also used to display documents in the database. The single documentdisplay of archived sales documents is no different from the display of documents in the database. However, archived sales documents can no longer bemodified.

Certain documents, such as WM transport orders or shipping units, do not have a display function and can therefore not be displayed if they are in thedatabase.

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 13 of 48

Page 14: Data archiving in sales and distribution (sd)

NoteAs of SAP R/3 Enterprise (Support Package 08) it is possible for you to directly display archived sales documents via the transaction VA03. Messages,texts and document flow are not displayed. For more information see SAP Note 577162.

Displaying linked documents via DRB

Via the Document Relationship Browser (DRB) you can display the entire process chain in which a specific document is embedded. It does not matter whetherthe preceding or subsequent document you want to display is still in the database or was already archived. The following prerequisites must be fulfilled todisplay linked documents:

The preceding or subsequent document you want to display must have an online display function.

§ If it has been archived, a preceding or subsequent document must be part of an active information structure of the archive information system.

For more information see Sales Documents in DRB (SD-SLS) .

Displaying the Original Documents via ArchiveLink

From the single document display you can call up the original document of the archived sales document by using ArchiveLink via Environment Originals. This is also true for linked Work Items and IDocs.

NoteYou can only display documents via ArchiveLink if you are properly connected to ArchiveLink. This includes, for example, that the ArchiveLink Viewer hasbeen configured correctly, and that the function for accessing optical archives has been activated properly. In addition, the link entries in the correspondingtables for ArchiveLink, Work Item and IDocs have to exist in the database.

From the list of the archive information structure you can call up this function via Original display . This is also true for linked work items and IDocs.

NoteThe same prerequisites apply for displaying original documents as for the individual document display (see above).

ActivitiesFrom the Archive Information System you can call up the functions for single document display ( Sales document ), original document display ( Displayoriginals ) and DRB ( DRB: SD order ) via the selection screen Display data object , which appears when you select a document from the list of the archiveinformation structure.

For more information about the Archive Information System see Archive Information System (AS) .

1.4.10.1 Authorizations (SD-SLS)To display individual documents from archived sales documents via the archiving information system, you must have at least the following authorizations:

1. Reading archives:2.

Object S_ARCHIVE Value Description

APPLIC SD Application

ARCH_OBJ SD_VBAK Archiving Objects

ACTVT 03 Displaying archives

3. Displaying archived sales documents:4.

Object V_VBAK_AAT Value Description

AUART * Sales document type; can be specified

ACTVT 03 Displaying the sales documents

Object V_VBAK_VKO Value Description

VKORG * Sales organization; can be specified

VTWEG * Distribution channel; can be specified

SPART * Division; can be specified

ACTVT 03 Displaying the sales documents

5. Displaying documents set up via ArchiveLink:

Object S_WFAR_OBJ Value Description

OAARCHIV * Access to a physical archive: can be specified

OAOBJEKTE * Object category access; can be specified

OADOKUMENT * Document type access; can be specified

ACTVT 03 Displaying archived originals

1.5 Archiving Billing Documents (SD-BIL)PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 14 of 48

Page 15: Data archiving in sales and distribution (sd)

1.5 Archiving Billing Documents (SD-BIL)

Archiving object SD_VBRK for archiving billing documents.

Prerequisites

Before using the archiving object for the first time, check Application Customizing.You have completed the entire revenue recognition process for the document concerned. This means that table VBREVK contains only entries withstatus C Completely processed .

Structure

Tables

When you use the archiving object SD_VBRK, data is archived from the following tables:

Table reference

Table Table name

EIKP Foreign Trade: Export/Import Header Data

EIPO Foreign Trade: Export/Import: Item Data

FPLA Billing Plan

FPLT Billing Plan: Dates

FPLTC Payment Cards: Transaction Data - SD

KOCLU Cluster for conditions in purchasing and sales

NAST Message Status

SADR Address Management: Company Data

VBFCL Sales Document Flow Cluster

VBPA Sales Document: Partner

VBRK Billing Document: Header Data

VBRL Sales Document: Invoice List

VBRP Billing Document: Item Data

VBUK Sales Document: Header Status and Administrative Data

The following archiving classes are also archived:

Tables for Archiving Class TEXT

Programs

The following programs are delivered with SD_VBRK:

Program Function

S3VBRKWRS Write

S3VBRKDLS Delete

S3VBRKAU Analyze

S3VBRKPTS Check (preliminary)

S3VBRKRL Reload

The write program supports the ADK interruption concept, that is, you can interrupt the write phase and continue at a later point. To be able to use thisfunction, the Interruption Possible indicator must be set in Customizing (transaction AOBJ). This parameter is not set by default. For more information, seethe application documentation for data archiving under Data Archiving in the ABAP Application System Data Archiving with Archive Development Kit(ADK) Archive Administration Interrupting and Continuing Archiving Sessions

The standard variants SAP&PROD (production mode) and SAP&TEST (test mode) are delivered for the delete program. Progress confirmation is regularlyoutput in the job log and in the dialog (status line) in both the write run and delete run.

ILM-Based Information for the Archiving Object

You can use this archiving object with the SD_VBRK ILM object as part of SAP Information Lifecycle Management. In order to do so, you must activate theassociated business function Information Lifecycle Management (ILM) (transaction SFW5). The system then also displays the ILM Actions frame. You canuse these actions to archive documents with the retention periods defined in the Information Retention Manager . You can also make snapshots (copies) ofdata or delete data that fulfills the prerequisites.

For more information about the Relevance business functions for SAP ILM, see Activating SAP ILM.For more information about ILM Enhancements in data archiving, see ILM-Specific Enhancements in Archive Administration.

The following fields for SD_VBRK are defined in the ILM policy and are visible when processing ILM policies (transaction IRMPOL):

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 15 of 48

Page 16: Data archiving in sales and distribution (sd)

Available Time BasesEnd of Fiscal Year (END_OF_FISCAL_YEAR)End of Year (END_OF_YEAR)

Available Standard Condition FieldsStandard Field Country from Company Code ((BS_COUNTRY_OF_BUKRS)Available Condition Fields

Date of Last Change (AEDAT)Company Code (BUKRS)Date on Which Record Was Created (ERDAT)Billing Type (FKART)Billing Document Date (FKDAT)Sales Organization (VKORG)Distribution Channel (VTWEG)

Available Policy CategoriesRTP: Retention Rules

For more information, see SAP Information Lifecycle Management.

Call

To call SD billing document archiving, go to the Billing Screen and Environment Archive Documents.

Alternatively, you can also call archive administration under Tools Administration Administration Data Archiving and enter object name.

Authorization Objects

You need the following authority objects:

Authorization object Description

V_VBRK_FKA Billing Type

V_VBRK_VKO Sales Organization

IntegrationThe deliveries should be archived before the billing documents. The sequence results from the linking of the documents through the flow. There is nodependency to the sales documents.

More InformationVariant Settings for Writing (SD-BIL)

Variant Settings for the Check (SD-BIL)

Variant Settings for Reloading (SD-BIL)

Analyzing an Existing Archive (SD-BIL)

Billing Documents in the DRB (SD-BIL)

For more information about the archiving object, see the application documentation for data archiving under Data Archiving Data Archiving in the ABAPApplication System Data Archiving with Archive Development Kit (ADK) Archiving Object .

1.5.1 Special Archiving-Object-Specific Features (SD-BIL)

Archivability ChecksFor billing documents you can use program S3VBRKPTS, which carries out an archivability check before documents are selected.

See also:

Variant Settings for the Check (SD-BIL)

1.5.2 Checks (SD-BIL)The following checks are carried out on a billing document before it can be archived:

Residence time (mandatory)Residence time change date (optional)Flow (mandatory)Accounting document (optional)

Residence time

The residence time is set per billing document type.

The system first checks whether the residence time set in Customizing for the billing document has been exceeded.The residence time refers to the creationdate of the document.

SD_VBKA

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 16 of 48

Page 17: Data archiving in sales and distribution (sd)

Residence time change date

If this indicator is set, the system checks whether the residence time based on the last change date of the billing document, not the creation date, has beenexceeded. (For billing documents that were not modified, the change date is identical to the creation date.)

Flow

If the billing document has a subsequent document (e.g. credit memo request with reference to billing document) then the system checks whether thesubsequent document has an overall status of completed .

Accounting documents

If in application-specific customizing the field Check FI document is set, the system checks whether the billing document is settled in Financial Accounting(e.g. via payment)

NoteIf the documents contain Subsequent Settlement conditions, you cannot archive the documents until settlement accounting has been performed for thearrangements in question, and the retention period that you maintained for the document in Customizing for Subsequent Settlement has expired. Forfurther information see Archiving Agreements (SD-MD-AM) .

1.5.3 Variant Settings for Archiving (SD-BIL)

When you schedule the write program, you need to enter an existing variant or create a new one. The variant contains the selection criteria for the billingdocuments that you want to archive.

Features

Document Selection Criteria

You can select the billing documents to be archived in both the Billing Documents and Constraints frame in accordance with the following criteria:

Sales and distribution document numberBilling typeCreation dateSales organizationCompany code

Options

Change Date: Residence TimeIf this indicator is set, the residence time is calculated using the date on which the billing document was last changed, rather than the creation date. (Forbilling documents that have not been changed, the change date is identical to the creation date.)Check residence of flow documents

If this indicator is not set, the residence time is calculated on the basis of the creation date or change date of the billing document.If the indicator is set, the residence time is calculated on the basis of the creation date or change date of the last flow document.

Process Control

If the write program for the selection criteria you entered is to perform a simulation only, select Test Mode . The system reads the data but does notgenerate an archive file. The system outputs statistics for the number of data records read during the test run. You can delete the data at a later point ina separate step using the production mode variant of the delete program.If you want to start the write program and generate archive files for the selection criteria you entered, select Production Mode .If the automatic start function has been enabled for the delete program in archiving object-specific Customizing, you can also set the Delete with TestVariant indicator (default setting). This starts the delete program for the archiving object with the test mode variant defined in archiving object-specificCustomizing. If the indicator is not set, the delete program starts with the production mode variant; the data is deleted from the database.

Detailed Log

You can use this indicator to define whether a compact or detailed log is to be output when the write program is executed. In addition to the information in thecompact log, the detailed log also contains all objects processed, including the associated messages.

Archiving Run Comment

Here, you can enter a text describing the content of the archiving run. This makes it easier to select the archiving run in archive administration at a later point,for example during the delete phase.

See also:

For more information, see the application documentation for data archiving under Data Archiving in the ABAP Application System Data Archiving withArchive Development Kit (ADK) Archive Administration Archiving Procedure Create Archive Files .

1.5.4 Variant Settings for the Check (SD-BIL)PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 17 of 48

Page 18: Data archiving in sales and distribution (sd)

1.5.4 Variant Settings for the Check (SD-BIL)

UseWhen you schedule the check a preprocessing program you must enter an already existing variant or create a new one. The variant contains the selectioncriteria for the billing documents you want to check.

NoteYou can also start the preprocessing program directly in the ABAP editor via report S3VBRKPTS.

Features

Document selection criteria

You can choose the following selection criteria for the billing documents you want to check under Billing Documents and Restrictions :

SD document numberBilling typeCreation dateSales organizationCompany code

Options

Residence time change dateIf this indicator is set the residence time is calculated based on the last change date of the billing document not the creation date. (For billing documentsthat were not modified, the change date is identical to the creation date.) Check residence of flow documents

If the checkbox is not set, then the residence time is calculated on the basis of the creation date of the billing document.If the checkbox is not set, then the residence time is calculated on the basis of the chronologically last flow document.

Detail log

Set this indicator if you want the system to display the check log for every billing document that is not archivable. The check log is divided into two sections –the header and the detail display. The header contains the statistical data of the check; in the detail display shows the check status of each billing document.By clicking on a line that contains a billing document number you can call up the order display transaction.

1.5.5 Variant Settings for Reloading (SD-BIL)You can set reloading criteria in variant settings for reloading.

CautionWhen reloading billing documents, the corresponding CO data is not simultaneously reloaded into the system. Therefore you should reload billingdocuments only in case of emergency, for example, if documents were wrongly selected.

For this reason you cannot call this function up with the menu. Please contact your system administrator.

FeaturesThe following options are available:

Entry Fields

Document selection

Select the documents to be reloaded.

Checkboxes

Test run

Select this option if you only want to simulate reloading, for example, to check possible errors.

See also:

Reloading Archived Data

1.5.6 Application Customizing (SD-BIL)

UseIn application-specific customizing, you can set the archiving requirements specific for billing.

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 18 of 48

Page 19: Data archiving in sales and distribution (sd)

FeaturesThe following input fields are available:

Sales organizationBilling typeResidence time for a billing document in days

You use these parameters to set the residence time for every combination of sales organization and billing type.

Check completion in Financial Accounting

If you set this parameter, the system checks whether all existing accounting documents have been cleared.

FORM routine number

If you have defined an additional check routine for a combination of sales organization and sales document type, you can enter the number of the checkroutine here.

Entry Options in Application Customizing (V_TVARR)

The following table displays possible value combinations that you can use when maintaining views V_TVARR:

SOrg BillType Document date

1. * *

2. 0001 * 40

3. * F2 20

4. 00* F* 100

5. 0001 F2 1

The examples can be understood as follows:

1. The standard residence time (30 days) is used for all billing document types for all sales organizations.2. A residence time of 40 days is used for all billing document types for sales organization 0001.3. A residence time of 20 days is used for billing document type F2 for all sales organizations.4. A residence time of 100 days is used for all billing document types starting with F for all sales organizations starting with 00.5. A residence time of 1 day is used for billing document type F2 for sales organization 0001.

NoteIf you do not maintain the views, the system cannot archive the documents.

Activities

NoteCreation of a customer-specific additional check is identical for billing documents and sales documents.

Calling Up CustomizingTo call up application-specific customizing, go to Customizing for Sales and Distribution and choose Data Transfer and Archiving Archiving data Archiving control for sales documents .

Alternatively, you can call up application-specific customizing as follows:

1. In the Billing Screen choose Environment Archive documents. 2. Choose Goto Customizing. 3. Under Application-specific Customizing choose Archiving Control for Billing Docs

See also:

Customizing

1.5.7 Analyzing an Existing Archive (SD-BIL)

UseThe Analyze function allows you to view a list of the most important header and item data for archived billing documents from a number of archiving runsspecified by you.

Entry Fields

Document selection

Select the documents that you want to display.

1.5.8 Display Function for Archived Billing Documents (SD-BIL)

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 19 of 48

Page 20: Data archiving in sales and distribution (sd)

UseYou can use the Archive Information System (transaction SARI) to display archived billing documents in single document display. Other functions fordisplaying documents is the original document display via ArchiveLink and other linked documents via the Document Relationship Browser (DRB).

PrerequisitesArchiving object SD_VBRK has at least one information structure, which is based on the standard field catalogs SAP_SD_VBRK_001 orSAP_SD_VBRK_002 delivered as part of the SAP System.

The information structure was activated and filled.The information structure contains the field VBELN as a key field.

NoteFor you to be able to display the linked documents via DRB (see below), information structures for archiving objects RV_LIKP and SD_VBAKhave to be active and filled.

The Authorizations for displaying archived billing documents have been maintained.

Features

Single document display

You can display single archived billing documents via transaction VF07. This corresponds to the original display transaction for billing documents in thedatabase (VF03). However, archived billing documents can no longer be modified.

Certain documents, such as WM transport orders or shipping units, do not have a display function and can therefore not be displayed if they are in thedatabase.

Displaying linked documents via DRB

Via the Document Relationship Browser (DRB) you can display the entire process chain in which a specific document is embedded. It does not matter whetherthe preceding or subsequent document you want to display is still in the database or was already archived. The following prerequisites must be fulfilled todisplay linked documents:

The preceding or subsequent document you want to display must have an online display function.

§ If it has been archived, a preceding or subsequent document must be part of an active information structure of the archive information system.

For more information, see Billing Documents in DRB (SD-BIL) .

Displaying the Original Documents via ArchiveLink

From the list of the archive information structure you can call up this function via Original display . This is also true for linked work items and IDocs.

NoteThe same prerequisites apply for displaying original documents as for the individual document display (see above).

You can only display documents via ArchiveLink if you are properly connected to ArchiveLink. This includes, for example, that the ArchiveLink Viewer hasbeen configured correctly, and that the function for accessing optical archives has been activated properly. In addition, the link entries in the correspondingtables for ArchiveLink, Work Item and IDocs have to exist in the database.

ActivitiesFrom the Archive Information System you can call up the functions for single document display ( Billing document ), original document display ( Displayoriginals ) and DRB ( DRB: SD billing document ) via the selection screen Display data object , which appears when you select a document from the list ofthe archive information structure.

For more information about the Archive Information System see Archive Information System (AS) .

1.5.8.1 Authorizations (SD-BIL)To display individual documents from archived sales documents via the archiving information system, you must have at least the following authorizations:

1. Reading archives:2.

Object S_ARCHIVE Value Description

APPLIC SD Application

ARCH_OBJ SD_VBRK Archiving object

ACTVT 03 Displaying archives

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 20 of 48

Page 21: Data archiving in sales and distribution (sd)

3. Displaying archived billing documents:4.

Object V_VBAK_FKA Value Description

FKART * Billing type; can be specified

ACTVT 03 Displaying the sales documents

Object V_VBRK_VKO Value Description

VKORG * Sales organization; can be specified

ACTVT 03 Displaying the sales documents

5. Displaying documents set up via ArchiveLink:

Object S_WFAR_OBJ Value Description

OAARCHIV * Access to a physical archive: can be specified

OAOBJEKTE * Object category access; can be specified

OADOKUMENT * Document type access; can be specified

ACTVT 03 Displaying archived originals

1.5.9 Archiving of Empties Management (SD-BIL-EM)

DefinitionThe following Empties Management business objects can be archived:

Objects Archiving objects

Archiving of Monthly Empties Stock BEV1_EMBD

Archiving of Empties Update BEV1_EMFD

Use

NoteYou should coordinate empties data archiving with billing document archiving, since the billing documents provide basic information for the empties data.

Before you use the archiving objects for the first time, you should check the application customizing.

You can use the archive administration transaction (SARA), or call archiving from the SAP Easy Access screen by choosing Logistics Sales andDistribution Empties Management Archiving .

For information about how to archive objects, see the descriptions for the individual archiving objects with the title Archiving of <Object Type>.

IntegrationEmpties Management takes account of empties for sales documents (SD) and for purchasing documents (purchase orders, MM). The system determines theassignment of full products and empties automatically in both cases, for example, the empties that belong to a full product. You use the archiving objectMM_EKKO to archive purchasing documents. When the system archives purchasing documents, it no longer needs the assignment between full products andempties. The system uses the BAdI ARC_MM_EKKO_WRITE to delete the link to the tables in Empties Management.

For more information about the archiving object MM_EKKO, see Archiving of Purchasing Documents (MM-PUR) .

See also:

Archiving Object

1.5.9.1 Archiving of Monthly Empties Stock (SD-BIL-EM)

DefinitionMonthly empties stocks are archived, deleted, and reloaded using the archiving object BEV1_EMBD.

UseMonthly empties stocks are only archived if they are not used in the Empties Management component.

You can display the logs for the write programs in one of two forms:

Log (summary)Grouped display based on analog message texts with reference to a sample data record from a related archiving object. Log (detail)

Individual display of all archiving objects belonging to an archiving run, including message texts.

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 21 of 48

Page 22: Data archiving in sales and distribution (sd)

For more information about the logs generated during archiving, see Logs .

Structure

Tables

If you use the archiving object BEV1_EMBD, data is archived from the following tables:

Table Table name

/BEV1/EMLGBSD Customer Empties Stock per Month

Text (archiving class) SAPscript texts

Programs

The following programs are delivered for BEV1_EMBD:

Program Function

/BEV1/EMBSDWR Write

/BEV1/EMBSDRL Reload

/BEV1/EMBSDDL Delete

Integration

Displaying monthly empties stock

To display the monthly empties stock using the Archive Information System, you need an archive information structure and a field catalog.

NoteIf you want to display the monthly empties stock, you must define the archive information structure and field catalog, since they are not part of thestandard delivery.

The archive information structure must be set up and active before the system can use it.

For more information about archive information structures, see Using the Archive Information System .

1.5.9.2.1 Variant Settings for Writing (SD-BIL-EM)

UseWhen you schedule the write program, you must enter an existing variant or create a new one.The variant contains the selection criteria for the monthlyempties stock that you want to archive.

Features

Document selection criteria

The selection criteria for the data records are the characteristics and key figures of the aspect. You can enter individual values or value intervals as selectioncriteria.

You can use the selection criterion Period . The system only archives empties stocks within the interval of the specified period.

NoteEnter the required period or periods in the same month format in which the system posted the empties record.

See also:

Creating Archive Files

1.5.9.2 Archiving of Empties Update (SD-BIL-EM)

DefinitionThe empties update is archived, deleted, and reloaded using the archiving object BEV1_EMFD.

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 22 of 48

Page 23: Data archiving in sales and distribution (sd)

UseThe empties update is only archived if it is not used in the Empties Management component.

You can display the logs for the write programs in one of two forms:

Log (summary)Grouped display based on analog message texts with reference to a sample data record from a related archiving object. Log (detail)

Individual display of all archiving objects belonging to an archiving run, including message texts.

For more information about the logs generated during archiving, see Logs .

Structure

Tables

If you use the archiving object BEV1_EMFD, data is archived from the following tables:

Table Table name

/BEV1/EMLGBWDP Empties Movement Account Customer

/BEV1/EMLGFAD Empties Movement - Customer Billing Status

/BEV1/EMLGOFS Empties - Billing Document Without Update

Text (archiving class) SAPscript texts

If you use the archiving object BEV1_EMFD, data is deleted from the following table:

Table Table name

/BEV1/NELINKTPO Linkage Table in the Purchase Order

Programs

The following programs are delivered for BEV1_EMFD:

Program Function

/BEV1/EMFADWR Write

/BEV1/EMFADRL Reload

/BEV1/EMFADDL Delete

Integration

Displaying archived empties update

To display an archived empties update using the Archive Information System, you need an archive information structure and a field catalog.

NoteIf you want to display the archived empties update, you must define the archive information structure and field catalog, since they are not part of thestandard delivery.

The archive information structure must be set up and active before the system can use it.

For more information about archive information structures, see Using the Archive Information System .

1.5.9.2.1 Variant Settings for Writing (SD-BIL-EM)

UseWhen you schedule the write program, you must enter an existing variant or create a new one.The variant contains the selection criteria for the EmptiesUpdate that you want to archive.

Features

Document selection criteria

The selection criteria for the data records are the characteristics and key figures of the aspect. You can enter individual values or value intervals as selectioncriteria.

You can use the following selection criterion:

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 23 of 48

Page 24: Data archiving in sales and distribution (sd)

Created onThe system only archives empties stocks that were added during the empties update interval.

See also:

Creating Archive Files

1.5.10 Archiving of Pendulum List Indirect Sales (SD-BIL-RB-PL)

DefinitionThe following Pendulum List Indirect Sales business objects can be archived:

Objects Archiving objects

Request Data /BEV4/PL01

Converted Request Table with Reporting Period /BEV4/PL02

Request Table with Reporting Period /BEV4/PL03

Logs for Pendulum List Sales /BEV4/PL04

NoteThe archiving of the pendulum list is split into four archiving objects for easier organization.

Use

NoteBefore you use the archiving objects for the first time, you should check the application customizing.

You call archive administration using transaction SARA and enter the relevant archiving object manually.

For information about how to archive objects, see the descriptions for the individual archiving objects with the title Archiving of <Object Type> .

See also:

Archiving Object

1.5.10.1 Archiving of Request Data (SD-BIL-RB-PL)

DefinitionRequest data is archived and deleted using the archiving object /BEV4/PL01.

UseRequest data is only archived if it is not used in the Pendulum List Indirect Sales component.

NoteRequest data contains data records in which a wholesaler provides value-based and quantity-based information about sales with third parties, with therelevant materials or assortments.

You can display the logs for the write programs in one of two forms:

Log (summary)Grouped display based on analog message texts with reference to a sample data record from a related archiving object. Log (detail)

Individual display of all archiving objects belonging to an archiving run, including message texts.

For more information about the logs generated during archiving, see Logs .

Structure

Tables

If you use the archiving object /BEV4/PL01, data is archived from the following tables:

Table Table name

/BEV4/PLDANFABH Sales Request History

/BEV4/PLDANFABS Sales Request - Header

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 24 of 48

Page 25: Data archiving in sales and distribution (sd)

/BEV4/PLDANFART Sales Request - Items

NoteYou can archive master data with status 0003 Deleted and 0004 Processed .

Programs

The following programs are delivered for /BEV4/PL01:

Program Function

/BEV4/PLP01 Preparation program

/BEV4/PLW01 Write

/BEV4/PLD01 Delete

Integration

Displaying archived request data

To display archived request data using the archive information system, you need an archive information structure created on the basis of the following SAPstandard field catalog: /BEV4/PL01_1 (requests header data)

The archive information structure must be set up and active before the system can use it.

For more information about archive information structures, see Using the Archive Information System .

1.5.10.4.1 Variant Settings for Writing (SD-BIL-RB-PL)

UseWhen you schedule the write program, you must enter an existing variant or create a new one.The variant contains the selection criteria for the request datathat you want to archive.

Features

Document selection criteria

NoteYou make the required selections in the preparation program. When the system starts the write program, it copies the result from the preparation program.

Other possible settings

The settings for the flow control, log options, and the note on the archiving run are options that are also valid for other archiving objects. For more information,see the general archiving documentation under Variant Maintenance for Archiving Jobs .

See also:

Creating Archive Files

1.5.10.1.2 Displaying Archived Request Data (SD-BIL-RB-PL)

UseYou can display specific request data from the archive. The table can be displayed using the Archive Information System, for example.

NoteThe system can only find documents for which there is a suitable archive index.

FeaturesTo display archived request data using the Archive Information System , you need the archive information structure /BEV4/PL01_1 (requests header), whichhas been created on the basis of the SAP standard field catalog /BEV4/PL01_1 (message requests – header).

The archive information structure must be set up and active before the system can use it.

For more information about using archive information structures, see Using the Archive Information System .

1.5.10.2 Archiving Converted Request Table with ReportingPUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 25 of 48

Page 26: Data archiving in sales and distribution (sd)

1.5.10.2 Archiving Converted Request Table with ReportingPeriod (SD-BIL-RB-PL)

DefinitionThe converted request table is archived and deleted using the archiving object /BEV4/PL02.

UseOnly archive the converted request table with reporting period data if it is not used in the Pendulum List Indirect Sales component.

You can display the logs for the write programs in one of two forms:

Log (summary)Grouped display based on analog message texts with reference to a sample data record from a related archiving object. Log (detail)

Individual display of all archiving objects belonging to an archiving run, including message texts.

For more information about the logs generated during archiving, see Logs .

Structure

Tables

If you use the archiving object /BEV4/PL02, data is archived from the following tables:

Table Table name

/BEV4/PLDANFKON Converted Request Table with Reporting Period

Programs

The following programs are delivered for /BEV4/PL02:

Program Function

/BEV4/PLP02 Preparation program

/BEV4/PLW02 Write

/BEV4/PLD02 Delete

Integration

Displaying archived converted request tables

To display archived converted request tables using the Archive Information System, you need an archive information structure created on the basis of thefollowing SAP standard field catalog: BEV4/PL02_1 (converted requests).

The archive information structure must be set up and active before the system can use it.

For more information about archive information structures, see Using the Archive Information System .

1.5.10.4.1 Variant Settings for Writing (SD-BIL-RB-PL)

UseWhen you schedule the write program, you must enter an existing variant or create a new one.The variant contains the selection criteria for the ConvertedRequest Table with Reporting Period that you want to archive.

Features

Document selection criteria

The selection criteria for the data records are the characteristics and key figures of the aspect. You can enter individual values or value intervals as selectioncriteria.

You can use the following selection criteria under Converted Requests :

Reporting date Sales organization Distribution channel Division

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 26 of 48

Page 27: Data archiving in sales and distribution (sd)

Wholesaler Object number Customer Material External object number External customer number External article number Request status Confirmation received

The system only archives pendulum lists if the selection criteria under Converted Requests are within the selected interval.

Other possible settings

The settings for the flow control, log options, and the note on the archiving run are options that are also valid for other archiving objects.For more information,see the general archiving documentation under Variant Maintenance for Archiving Jobs .

See also:

Creating Archive Files

1.5.10.2.2 Displaying Archived Converted Request Tables (SD-BIL-RB-PL)

UseYou can display a converted request table from the archive. The table can be displayed using the Archive Information System, for example.

NoteThe system can only find documents for which there is a suitable archive index.

FeaturesTo display an a rchived converted request table using the Archive Information System , you need the archive information structure BEV4/PL02_1 (convertedrequests), which has been created on the basis of the SAP standard field catalog BEV4/PL02_1 (converted requests).

The archive information structure must be set up and active before the system can use it.

For more information about using archive information structures, see Using the Archive Information System .

1.5.10.3 Archiving of Request Table with Reporting Period (SD-BIL-RB-PL)

DefinitionRequest tables are archived and deleted using the archiving object /BEV4/PL03.

UseRequest tables are only archived if they are not used in the Pendulum List Indirect Sales component.

You can display the logs for the write programs in one of two forms:

Log (summary)Grouped display based on analog message texts with reference to a sample data record from a related archiving object. Log (detail)

Individual display of all archiving objects belonging to an archiving run, including message texts.

For more information about the logs generated during archiving, see Logs .

Structure

Tables

If you use the archiving object /BEV4/PL03, data is archived from the following tables:

Table Table name

/BEV4/PLDANFMEL Request Table with Reporting Period

/BEV4/PLDANFZEIT Request Update

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 27 of 48

Page 28: Data archiving in sales and distribution (sd)

Programs

The following programs are delivered for /BEV4/PL03:

Program Function

/BEV4/PLP03 Preparation program

/BEV4/PLW03 Write

/BEV4/PLD03 Delete

Integration

Displaying archived request tables

To display archived request tables using the Archive Information System, you need an archive information structure created on the basis of the following SAPstandard field catalog: BEV4/PL03_1 (requests with reporting period).

The archive information structure must be set up and active before the system can use it.

For more information about archive information structures, see Using the Archive Information System .

1.5.10.4.1 Variant Settings for Writing (SD-BIL-RB-PL)

UseWhen you schedule the write program, you must enter an existing variant or create a new one.The variant contains the selection criteria for the Request Tablewith Reporting Period that you want to archive.

Features

Document selection criteria

The selection criteria for the data records are the characteristics and key figures of the aspect. You can enter individual values or value intervals as selectioncriteria.

You can use the following selection criteria under Requests with Reporting Period :

Reporting date Sales organization Distribution channel Division Wholesaler Object number Customer Material Request status

The system only archives pendulum lists if the selection criteria under Requests with Reporting Period are within the selected interval.

Other possible settings

The settings for the flow control, log options, and the note on the archiving run are options that are also valid for other archiving objects.For more information,see the general archiving documentation under Variant Maintenance for Archiving Jobs .

See also:

Creating Archive Files

1.5.10.3.2 Displaying Archived Requests Table with ReportingPeriod (SD-BIL-RB-PL)

UseYou can display a requests table with reporting period from the archive. The table can be displayed using the Archive Information System, for example.

NoteThe system can only find documents for which there is a suitable archive index.

FeaturesTo display an archived requests table with reporting period using the Archive Information System , you need the archive information structure BEV4/PL03_1

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 28 of 48

Page 29: Data archiving in sales and distribution (sd)

(requests with reporting period), which has been created on the basis of the SAP standard field catalog BEV4/PL03_1 (requests with period).

The archive information structure must be set up and active before the system can use it.

For more information about using archive information structures, see Using the Archive Information System .

1.5.10.4 Archiving of Logs for Pendulum List Sales (SD-BIL-RB-PL)

DefinitionLogs are archived and deleted using the archiving object /BEV4/PL04.

UseLogs are only archived if they are not used in the Pendulum List Indirect Sales component.

You can display the logs for the write programs in one of two forms:

Log (summary)Grouped display based on analog message texts with reference to a sample data record from a related archiving object. Log (detail)

Individual display of all archiving objects belonging to an archiving run, including message texts.

For more information about the logs generated during archiving, see Logs .

Structure

Tables

If you use the archiving object /BEV4/PL04, data is archived from the following tables:

Table Table name

/BEV4/PLPROT Logs for Pendulum List Sales (Master Data)

/BEV4/PLPROT_2 Log File with Error Messages

/BEV4/PLPROT_ALL Customers and Material Records

Programs

The following programs are delivered for /BEV4/PL04:

Program Function

/BEV4/PLW04 Write

/BEV4/PLD04 Delete

Integration

Displaying archived log for pendulum list sales

To display archived logs for pendulum list sales using the Archive Information System, you need an archive information structure created on the basis of thefollowing SAP standard field catalog: BEV4/PL04_1(logs for pendulum list sales).

The archive information structure must be set up and active before the system can use it.

For more information about archive information structures, see Using the Archive Information System .

1.5.10.4.1 Variant Settings for Writing (SD-BIL-RB-PL)

UseWhen you schedule the write program, you must enter an existing variant or create a new one.The variant contains the selection criteria for the Logs forPendulum List Sales that you want to archive.

Features

Document selection criteria

The selection criteria for the data records are the characteristics and key figures of the aspect. You can enter individual values or value intervals as selection

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 29 of 48

Page 30: Data archiving in sales and distribution (sd)

criteria.

You can use the following selection criteria under Logs for Pendulum List Sales :

Transfer number File name Default path Stored on Time Simulation

The system only archives pendulum lists if the selection criteria under Logs for Pendulum List Sales are within the selected interval.

Other possible settings

The settings for the flow control, log options, and the note on the archiving run are options that are also valid for other archiving objects. For more information,see the general archiving documentation under Variant Maintenance for Archiving Jobs .

See also:

Creating Archive Files

1.5.10.4.2 Displaying Archived Logs for Pendulum List Sales (SD-BIL-RB-PL)

UseYou can display individual logs for pendulum list sales from the archive. The table can be displayed using the Archive Information System, for example.

NoteThe system can only find documents for which there is a suitable archive index.

FeaturesTo display archived logs for pendulum list sales using the Archive Information System , you need the archive information structure BEV4/PL04_1 (logs forpendulum list sales), which has been created on the basis of the SAP standard field catalog BEV4/PL04_1 (logs for pendulum list sales).

The archive information structure must be set up and active before the system can use it.

For more information about using archive information structures, see Using the Archive Information System .

1.6 Archiving Sales Activities (SD-CAS-SA)

Archiving object SD_VBKA for archiving sales activities.

Prerequisites

Before using the archiving object for the first time, you should check Application Customizing.

Structure

Tables

When you use the archiving object SD_VBKA, data is archived from the following tables:

Table Table name

NAST Message Status

SADR Address Management: Company Data

VBFA Sales Document Flow

VBKA Sales Activities

VBPA Sales Document: Partner

VBUK Sales Document: Header Status and Administrative Data

VBUV Sales Document: Incompletion Log

Programs

The following archiving programs are delivered with SD_VBKA:

Program Function

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 30 of 48

Page 31: Data archiving in sales and distribution (sd)

SDVBKAWR Write

SDVBKADL Delete

SDVBKARL Reload

ILM-Based Information for the Archiving Object

You can use this archiving object with the SD_VBKA ILM object as part of SAP Information Lifecycle Management. In order to do so, you must activate theassociated business function Information Lifecycle Management (ILM) (transaction SFW5). The system then also displays the ILM Actions frame. You canuse these actions to archive documents with the retention periods defined in the Information Retention Manager . You can also delete data that fulfills theprerequisites.

For more information about the Relevance business functions for SAP ILM, see Activating SAP ILM.For more information about ILM Enhancements in data archiving, see ILM-Specific Enhancements in Archive Administration.

The following fields for SD_VBKA are defined in the ILM policy and are visible when processing ILM policies (transaction IRMPOL):

Available Time BasesEnd of Year (END_OF_YEAR)Available Condition Fields

Date of Last Change (AEDAT)Date on Which Record Was Created (ERDAT)Sales Activity Type for Sales Support (KTAAR)Transaction Group (TRVOG)Sales Office (VKBUR)Sales Organization (VKORG)Distribution Channel (VTWEG)

Available Policy CategoriesRTP: Retention Rules

For more information, see SAP Information Lifecycle Management.

Call

To call sales activity archiving, go to the Sales Support Screen Environment Archive Documents. .

Alternatively, you can also call archive administration under Tools Administration Administration Archiving and enter object name .

IntegrationSales activities can be archived independently of other SD documents.

More InformationSales Activities in the DRB (SD-CAS-SA)

Variant Settings for Archiving (SD-CAS-SA)

Variant Settings for Reloading (SD-CAS-SA)

For more information about the archiving object, see the application documentation for data archiving under Data Archiving Data Archiving in the ABAPApplication System Data Archiving with Archive Development Kit (ADK) Archiving Object .

1.6.1 Checks (SD-CAS-SA)The following checks are carried out on a sales activity before it can be archived:

Residence timeSales activity end date

Residence time

The residence time is set per sales activity type.

The system first checks whether the residence time set in Customizing for the sales activity has been exceeded. The residence time refers to the creationdate of the document.

Sales Activity End Date

You can have the system check whether the sales activity has expired (sales activity end-date)

You can make this setting in Customizing for Sales and Distribution under Data Transfer and Archiving Archiving Data .

1.6.2 Variant Settings for Archiving (SD-CAS-SA)

UseYou can set the archiving criteria in variant settings for archiving.

Features

SD_VBKA

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 31 of 48

Page 32: Data archiving in sales and distribution (sd)

The following options are available.

Entry Fields

Document selection

Select the documents to be archived.

Checkboxes

Create archive

Select this option, if you want to create archive files.

Deletion program in test mode

If you do not want the archived data to be deleted automatically after the archive files have been created, select this option.

This option is ignored if the Write archive has been deactivated.

Issue log texts

Select this option if you need a detailed log.

Check flow

Select this option if you want to check the document flow.

See also:

Checks (SD-CAS-SA)

Creating Archive Files

1.6.3 Variant Settings for Reloading (SD-CAS-SA)

UseYou can set the reloading criteria in variant settings for reloading.

FeaturesThe following options are available.

Entry Fields

Document selection

Select the documents to be reloaded.

Checkboxes

Test run

Select this option if you only want to simulate reloading, to check possible errors, for example.

Issue log texts

If you need a detailed log, select this option.

See also:

Reloading an Archive

1.6.4 Application Customizing (SD-CAS-SA)

UseIn application Customizing, you can set the archiving requirements specific to sales activities.

FeaturesSales organization

Sales activity typeResidence time (days)

You use these parameters to set the residence time for every combination of sales organization and sales activity type.

FORM routine number

If you have defined an additional check routine for a combination of sales organization and sales activity type, then you can enter the number of the checkroutine here.

CallTo call application Customizing, go to Customizing for Sales and Distribution and select Data Transfer and Archiving Archiving data Archiving controlfor sales documents .

Alternatively, you can call application Customizing as follows:

1. Logistics Sales and Distribution Sales support.

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 32 of 48

Page 33: Data archiving in sales and distribution (sd)

2. Environment Archive documents 3. Customizing4. Application-specific Customizing

See also:

Defining a Customer-specific Additional Check (SD-SLS)

Customizing

1.7 Archiving Agreements (SD-MD-AM)

Archiving object SD_AGREEM for archiving agreements and associated conditions in purchasing and sales.

The following agreements can be archived:

In salesRebate AgreementPromotionSales Deal

In purchasingPurchasing arrangement

The associated data, for example conditions, indexes, and texts, are also archived.

StructureWhen you use the archiving object SD_AGREEM, data is archived from the following tables:

Table reference

Table Table name

EBOX Index of Settlement Documents for Subsequent Settlement (for purchasingarrangements only)

EKBO Index of Docs. for Price Determ./Updating, Subsequent Sett. (for purchasingarrangements only)

KONA Agreements

KONH Conditions (Header)

KONAIND Index: Groups of Conditions/Header Record Conditions

SDKONDARCH SD Archiving of Conditions: Object Structure for Condition Tables

WAKHIND Promotion header data IS-R: index table for conditions

The following archiving class is also archived:

Tables for Archiving Class CONDS

Functionality

The following functionality is available for SD_AGREEM:

Functionality/report assignment

Functionality Report

Archive RV130005

Delete RV130006

Reload RV130007

See also:

Variant Settings for Archiving (SD-MD-AM)

Variant Settings for Reloading (SD-MD-AM)

ILM-Based Information for the Archiving Object

You can use this archiving object with the ILM object SD_AGREEM as part of SAP Information Lifecycle Management. In order to do so, you must activate theassociated business function Information Lifecycle Management (ILM) (transaction SFW5). The system then also displays the ILM Actions frame. You canuse these actions to archive documents with the retention periods defined in the Information Retention Manager . You can also make snapshots (copies) ofdata or delete data that fulfills the prerequisites.

For more information about the Relevance business functions for SAP ILM, see Activating SAP ILM.For more information about ILM Enhancements in data archiving, see ILM-Specific Enhancements in Archive Administration.

The following fields for SD_AGREEM are defined in the ILM policy and are visible when processing ILM policies (transaction IRMPOL):

Available Time BasesEnd of Validity Period (END_OF_VALIDITY)End of Year (END_OF_YEAR)

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 33 of 48

Page 34: Data archiving in sales and distribution (sd)

Available Condition FieldsRebate Agreement Type (ABTYP)Agreement Type (BOART)Purchasing Organization (EKORG)Application (KAPPL)Division (SPART)Sales Organization (VKORG)Distribution Channel (VTWEG)

Available Policy CategoriesRTP: Retention Rules

For more information, see SAP Information Lifecycle Management.

Call

To call agreement archiving, go to the Sales Master Data Screen and Agreements Archiving Create Archive .

Alternatively, you can call archiving under Tools Administration and then Administration Data Archiving and enter object name .

IntegrationAssociated conditions may have already been archived when the condition records were archived.

More InformationFor more information about the archiving object, see the application documentation for data archiving under Data Archiving Data Archiving in the ABAPApplication System Data Archiving with Archive Development Kit (ADK) Archiving Object .

1.7.1 Checks (SD-MD-AM)The following checks are carried out on an agreement before it can be archived:

Archiving Key DateRebate agreement - SalesPromotionSales dealPurchasing arrangement

Archiving Key Date

Only agreements whose termination dates fall before the archiving key date are archived.

Rebate agreement - Sales

Only fully settled rebate agreements are taken into account. The archiving key date is also considered. Only fully settled agreements can be archived,otherwise settlement with the customer would no longer be possible.

Promotion

With every promotion that is archived, all assigned sales deals are also archived. No key date check is made for the assigned sales deals. The validityperiods for a promotion and the assigned sales deals are generally identical.

Sales deal

Only sales deals that are not assigned to a promotion can be archived.

Purchasing Arrangement

Only fully settled purchasing agreements are taken into account. The archiving key date is also considered. Only fully settled arrangements can be archived,otherwise settlement with the vendor would no longer be possible.

1.7.2 Variant Settings for Archiving (SD-MD-AM)

UseYou can set the archiving criteria in the variant settings for archiving.

FeaturesThe following options are available:

Comment for archiving run

In this field you can enter any text you like to identify your archiving runs. If you delete or evaluate the data for the archives created at a later point in time, theexisting archives are listed and you can find the respective archiving run again with the help of this text.

Program selections

Entry Fields

Agreement

Select the agreements to be archived.

Agreement type

SD_AGREEM

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 34 of 48

Page 35: Data archiving in sales and distribution (sd)

Here you can enter one or more agreement types to be archived.

Agreements in Sales

Entry Fields

Sales organization

Distribution channel

Division

Here you can restrict agreements by sales organization, distribution channel, and division.

Checkboxes

Rebate agreement - Sales

Promotion including assigned sales deals

Sales deals not assigned to promotions

Here you can choose which agreements are to be archived.

Agreements in Purchasing

Checkboxes

Vendor agreement

Here you can choose whether vendor agreements are to be archived in purchasing.

Sales quote

If you are working with settlement requests and sales quotes (for example, agency business), you can choose whether sales quotes are to be archived.

Entry Fields

Purchasing organization

Here you can restrict agreements by purchasing organization.

Sales organization

Distribution channel

Division

Here you can restrict sales quotes by sales organization, distribution channel, and division.

Archiving Key Date

Entry Fields

Residence time

Here you can enter a residence time in days.

Key date

You can specify your own, alternative key date. In the standard system, the current date is proposed automatically as the key date.

Data for Document Creation

Checkboxes

Archiving as test run, no archive file will be created

Select this option if you do not want to create archive files.

Deletion program only as test run

If you do not want the archived data to be deleted automatically after the archive files have been created, select this option.

The system ignores this option if the option Archiving as test run, no archive file will be created is deactivated.

Create log for archiving run

If you need a detailed log, select this option.

See also:

Checks (SD-MD-AM)

Archiving Data

1.7.3 Variant Settings for Reloading (SD-MD-AM)Use

You can set reloading criteria in variant settings for reloading.

Range of Functions

The following options are available:

Program Restrictions

Entry Fields

Agreements

Select the agreements to be reloaded.

Agreement type

Here you can enter one or more agreement type to be reloading.

Agreements in Sales

Entry Fields

Sales organizationDistribution channel:

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 35 of 48

Page 36: Data archiving in sales and distribution (sd)

Division

Here you can limit agreements according to sales organization, distribution channel, and division.

Checkboxes

Rebate agreement - SalesPromotion incl. assigned sales dealsSales deals without promotion assignment

Here you can choose which arrangements are to be reloaded.

Agreements in Purchasing

Checkboxes

Vendor agreements

Here you can choose whether vendor agreements are to be reloading in Purchasing.

Customer agreements

If you are working with settlement requests and customer agreements (for example, agency business), you can choose whether customer agreements are tobe reloaded.

Entry Fields

Purchasing organization

This is where you can restrict agreements by purchasing organization.

Sales organizationDistribution channel:Division

Here you can limit customer agreements by sales organization, distribution channel, and division.

Parameters for the Program Run

Checkboxes

Test run, data not reloaded

Select this option if you only want to simulate reloading, to check possible errors, for example.

Include agreement data in log

If you need a detailed log, select this option.

See also:

Reloading an Archive

1.8 Archiving of Condition Records (SD-MD-CM)

Condition records are archived using archiving object SD_COND.

To call condition archiving, go to the Sales Master Data screen and choose Conditions Archiving Create Archive.

Alternatively, you can call archiving using Tools Administration Administration Data Archiving and enter object name SD_COND. Before using thearchiving object for the first time, you should check Application Customizing.

See also Application-Specific Customizing (SD-MD-CM)

Structure

Tables

With SD_COND, data from various tables is archived and deleted. To find out how to display the table names, see the application documentation for dataarchiving under Data Archiving in the ABAP Application System Data Archiving with Archive Development Kit (ADK) Archive Administration Tablesand Archiving Objects . In addition, table entries are archived together with the condition data by means of the following archiving classes:

CHANGEDOCUTEXT

Customer-Specific Tables

You can extend the archiving scope of SD_COND without modification with the aid of Business Add-In (BAdI) ARC_SD_COND_WRITE, which is integrated intothe write program.

Programs

The following programs are delivered with SD_COND:

Program Function

SD_COND_ARCH_WRITE Write

SD_COND_ARCH_DELETE Delete

SD_COND_ARCH_RELOAD Reload

Write Program

The write program supports the ADK interruption concept, that is, you can interrupt the write phase and continue at a later point. For more information, see the

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 36 of 48

Page 37: Data archiving in sales and distribution (sd)

application documentation for data archiving under Data Archiving in the ABAP Application System Data Archiving with Archive Development Kit (ADK) Archive Administration Interrupting and Continuing Archiving Sessions .

A compact log with information about the data processed is written in both the write and delete runs. Alternatively, you can enable the output of a detailed logcontaining additional information. For more information, see Archive Administration Logs .

Logging Non-Archivable Data

During condition archiving, the detailed log provides a list of records that cannot be archived according to the archivability check. The reason for this is alsoshown.

Reasons why a condition record cannot be archived:

The condition is still being used.The deletion flag has not been set for the condition.The residence time for the condition has not yet expired.

Customer-Specific Archivability Checks

You can extend the archivability check without modification with the aid of BAdI ARC_SD_COND_CHECK, which is integrated into the write program. For moreinformation about implementing BAdIs in archiving programs, see SAP Note 673030 .

Deletion Program

The standard variants SAP&PROD (production mode) and SAP&TEST (test mode) are delivered for the delete program.

ILM-Based Information for the Archiving Object

You can use this archiving object with the SD_COND ILM object as part of SAP Information Lifecycle Management. In order to do so, you must activate theassociated business function Information Lifecycle Management (ILM) (transaction SFW5). The system then also displays the ILM Actions frame. You canuse these actions to archive documents with the retention periods defined in the Information Retention Manager . You can also make snapshots (copies) ofdata or delete data that fulfills the prerequisites.

For more information about the Relevance business functions for SAP ILM, see Activating SAP ILM.For more information about ILM Enhancements in data archiving, see ILM-Specific Enhancements in Archive Administration.

The following fields for SD_COND are defined in the ILM policy and are visible when processing ILM policies (transaction IRMPOL):

Available Time BasesEnd of Validity Period (END_OF_VALIDITY)Available Condition Fields

Application (KAPPL)Condition Type (KSCHL)Usage of the Condition Table (KVEWE)

Available Policy CategoriesRTP: Retention Rules

For more information, see SAP Information Lifecycle Management.

Authorization Objects

You need the following authority object:

Authorization object Description

V_KONG_VWE Condition generation: Use and application of the condition table

See also:

Variant Settings for Reloading (SD-MD-CM)Variant Settings for Writing (SD-MD-CM)

For more information about the archiving object, see the application documentation for data archiving under Data Archiving Data Archiving in the ABAPApplication System Data Archiving with Archive Development Kit (ADK) Archiving Object .

1.8.1 Variant Settings for Writing (SD-MD-CM)

When you schedule the write program, you need to enter an existing variant or create a new one. The variant contains the selection criteria for the conditionrecords that you want to archive.

Features

Conditions and Constraints

You can restrict the condition records to be archived in both the Conditions and Constraints frame in accordance with the following criteria:

Condition record no.Number that uniquely identifies a condition record.Application

Subdivides the usage of a condition (for example, pricing) in individual subareas (for example, sales & distribution or purchasing).Condition Type

Used for various functions. For example, it can be used to define different discounts in pricing, different message types (such as orderacknowledgements or delivery notes) in message determination, or different search strategies in batch determination.Table

A combination of particular fields which form the key of a condition record.

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 37 of 48

Page 38: Data archiving in sales and distribution (sd)

Options

In addition to the criteria mentioned above, you can choose from the following options for selecting the condition records to be archived:

Validity End Before Ret. TimeWhether the deletion indicator is set for a condition record plays no role in archiving. In this case, the system archives all records whose validity enddate is before the start of the residence time or corresponds to it, irrespective of whether the deletion indicator is set.Deletion flag set

All records for which the deletion flag is set are taken into account during archiving. The system archives all records for which a deletion flag has beenset.Include Both Criteria

With this option, all records are archived that fulfil one of the two criteria mentioned above.

Further Settings Options

In process control, the log options and the archiving run comment are settings options that also apply to other archiving objects.

For more information, see the application documentation for data archiving under Data Archiving in the ABAP Application System Data Archiving withArchive Development Kit (ADK) Archive Administration Archiving Procedure Create Archive Files or Variant Maintenance for Archiving Jobs .

See also:

Checks (SD-MD-CM)

1.8.2 Variant Settings for Reloading (SD-MD-CM)

UseIn the reload variant you can set the criteria based on which archived conditions records are to be reloaded into the database.

CautionThe reload function should only be used if absolutely necessary, for example when the wrong data was archived due to an error in Customizing or dataselection. Archived data should therefore only be reloaded immediately after the incorrect archiving session. If you reload later you run the risk of datainconsistencies in your database.

FeaturesThe processing control, log, and archiving session note options are also valid for other archiving objects. Therefore, the information for these options isavailable in the general data archiving documentation under Variant Maintenance for Archiving Jobs .

See also:

Reloading an Archive

1.8.3 Application-Specific Customizing (SD-MD-CM)

UseIn application-specific customizing, you can set the archiving requirements specific for conditions.

Before an archiving session can run successfully, you must make the necessary entry in application-specific customizing. If this is not the case, the archivingsession is terminated and you are requested to make the necessary entry.

FeaturesThe following input fields are available:

U (Use of condition table)Determines the area in which the condition is to be used (currently only for pricing)App (Application)

Subdivides the use of a condition (e.g. pricing) into separate areas (e.g. sales and distribution or purchasing)RetPer (Residence time) You use these parameters to set the residence time for every combination of sales organization and condition type. DocChk (Check against transaction data)

You can have the system check whether documents still exist that refer to the conditions to be archived (table KONV).

ActivitiesTo call up application-specific customizing, go to Customizing for Sales and Distribution and choose Data Transfer and Archiving Archiving data Control archiving for conditions .

Alternatively, you can call up application-specific customizing as follows:

1. In the Sales Master Data Screen choose Conditions Archiving Create archive .

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 38 of 48

Page 39: Data archiving in sales and distribution (sd)

2. Choose Goto Customizing. 3. Under Application-specific customizing choose Archiving Conditions V_T681H.

This function is also available from within Archive Administration via Customizing Application-Specific Customizing.

See also:

Customizing

1.9 Archiving Revenue Recognition Data with SD_VBREV

Archiving revenue recognition data with the archiving object SD_VBREVYou can use the archiving object SD_VBREV to archive and delete revenue recognition data. The data in the revenue tables refer to data from sales ordersand billing documents (revenue recognition data).

PrerequisitesBefore you archive the revenue recognition data, you must first archive the associated sales documents and billing documents with the archiving objectsSD_VBAK and SD_VBRK.

With revenue recognition based on billing documents (types D and E), the billing document must be archived before you can archive the correspondingrevenue recognition tables.With all other types of revenue recognition, you must first archive the sales document (SD_VBAK) before you can archive the corresponding revenuerecognition tables.

Archiving then takes place independent of the sales document or billing document once the original objects have been archived.

Whenever you archive sales documents with the archiving object SD_VBAK, you must take the following additional checks into consideration:

You can archive the sales document only if the status of the revenue determination is completely processed or not relevant (VBUK-RRSTA must beC or " " ).

Table VBREVC ( Revenue Recognition: Worklist of Changed Sales Documents ) must not contain any entries for the sales document to be archived.Table VBREVK (Revenue Recognition: Control Lines) must not contain any entries for the sales document to be archived where the revenuedetermination status is not completely processed (VBREVK-RRSTA must be C so that the document can be archived).

Whenever you archive billing documents with the archiving object SD_VBRK, you must take the following additional checks into consideration:

Table VBREVC ( Revenue Recognition: Worklist of Changed Sales Documents ) must not contain any entries for the billing document to be archived.Table VBREVK (Revenue Recognition: Control Lines) must not contain any entries for the billing document to be archived where the revenuedetermination status is not completely processed (BREVK-RRSTA must be C so that the billing document can be archived).

Tables

The following table shows the programs that exist for the archiving object SD_VBREV. (You define archiving objects with transaction AOBJ).

Program Function

S3VBREVPTS Analysis (archivability check)This report generates a log that shows which documents can be archived.

S3VBREVWRS Write

S3VBREVDLS Delete

S3VBREVRL Reload

When you use the archiving object SD_VBREV, data is archived from the following tables (transaction SARA):

Table Table Name

VBREVE Revenue Recognition: Revenue Recognition Lines

VBREVK Revenue Recognition: Control Lines

VBREVR Revenue Recognition: Reference Document Lines

ILM-Based Information for the Archiving Object

You can use this archiving objects with the ILM object SD_VBREV as part of SAP Information Lifecycle Management. In order to do so, you must activate theassociated business function Information Lifecycle Management (ILM) (transaction SFW5). The system than also displays the ILM Actions frame. You canuse these actions to archive documents with the retention periods defined in the Information Retention Manager . You can also make snapshots (copies) ofdata or delete data that fulfills the prerequisites.

For more information about the Relevance business functions for SAP ILM, see Activating SAP ILM.For more information about ILM Enhancements in data archiving, see ILM-Specific Enhancements in Archive Administration.

The following fields for SD_VBREV are defined in the ILM policy and are visible when processing ILM policies (transaction IRMPOL):

Available Time BasesThe retention period for revenue recognition data archived with archiving object SD_VBREV begins with the posting date of the record (this is thePOSTING_DATE in ILM).Available Condition Fields

Order Type (AUART)Company Code (BUKRS)Sales Document (VBELN)

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 39 of 48

Page 40: Data archiving in sales and distribution (sd)

Available Policy CategoriesRTP: Retention Rules

For more information, see SAP Information Lifecycle Management.

ProcedureYou can use the archiving object SD_VBREV (Revenue Recognition Tables: Write Program) to write the revenue result table entries from the database toarchive files.

To launch archive administration from the SAP Easy Access menu, choose Tools Administration Administration Data Archiving and enterSD_VBREV as the object name.

Enhancements for SD_VBREV

The following Business Add-Ins (BAdIs) are available for the archiving object SD_VBREV:

ARC_SD_VBREV_CHECKYou can use this BAdI to check your own archivability criteria.ARC_SD_VBREV_WRITEYou can use this BAdI to write and delete data from additional custom tables.

For more information, use transaction se18 in the SAP system.

Authorization Objects

To use the archiving object SD_VBREV, you need the authorization object V_VBAK_AAT Sales Document: Authorization for Sales Documents Types , whichchecks whether you are authorized to process the relevant sales documents.

Displaying Archived Revenue Recognition Data

If you use an archive information structure (such as the standard archive information structure SAP_SD_VBREV_01), you can read data from the archive.

For more information about archive information structures, see the application documentation for data archiving under Data Archiving with ArchiveDevelopment Kit (ADK) Archive Information System Using the Archive Information System .

More InformationFor more information about the archiving object, see the application documentation for data archiving under Data Archiving Data Archiving in the ABAPApplication System Data Archiving with Archive Development Kit (ADK) Archiving Object .

1.10 Archiving INTRASTAT Statistics Data with FT_VEIAV

Archiving object FT_VEIAV for archiving INTRASTAT statistics data.

You can use archiving object FT_VEIAV (INTRASTAT Receipt/Dispatch) to archive, delete, and reload the data written to database table VEIAV through theINTRASTAT selection runs.

PrerequisitesThere is no Application Customizing for this archiving object.An archivability check is not performed because table VEIAV is simply a temporary store for creating INTRASTAT notification files and the data recordsit contains are not dependent on other data objects.

Tables

The following table shows the programs that exist for the archiving object FT_VEIAV. (You define archiving objects with transaction AOBJ). To display theprograms used, use transaction AOBJ.

Program Function

RVEXAIWR Write

RVEXAIDL Delete

RVEXAIRL Reload

The standard variants SAP&PROD (production mode) and SAP&TEST (test mode) are delivered for the delete program.

ILM-Based Information for the Archiving Object

You can use this archiving object with the ILM object FT_VEIAV as part of SAP Information Lifecycle Management. In order to do so, you must activate theassociated business function Information Lifecycle Management (ILM) (transaction SFW5). The system then also displays the ILM Actions frame. You canuse these actions to archive documents with the retention periods defined in the Information Retention Manager . You can also make snapshots (copies) ofdata or delete data that fulfills the prerequisites.

For more information about the Relevance business functions for SAP ILM, see Activating SAP ILM.

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 40 of 48

Page 41: Data archiving in sales and distribution (sd)

For more information about ILM Enhancements in data archiving, see ILM-Specific Enhancements in Archive Administration.

The following fields for FT_VEIAV are defined in the ILM policy and are visible when processing ILM policies (transaction IRMPOL):

Available Time BasesThe retention period for INTRASTAT data archived with archiving object FT_VEIAV begins with the creation date of the record (this is theCREATION_DATE in ILM).Available Condition Fields

Reporting year of declaration to authorities (DATUMJAHR)Reporting month of declaration to authorities (DATUMMONA)Company Code (NUMMBUKRS)Sales Organization (VERKAUFOR))Declaration to authorities: Country of Plant (WERKSLAND)

Available Policy CategoriesRTP: Retention Rules

For more information, see SAP Information Lifecycle Management.

ProcedureTo call archive administration (transaction SARA) with archiving object FT_VEIAV from the SAP Easy Access menu, choose Logistics Sales andDistribution Foreign Trade/Customs Periodic Declarations Periodic Declarations Operative Archiving INTRASTAT .

Alternatively, you can also call archive administration under Tools Administration Administration Data Archiving and enter object nameFT_VEIAV.

Choose Write . Define a variant for the archiving write run. The archiving write run imports all data in accordance with the selection criteria chosen and writesthis to one or more archive files without further checks.

You can select the INTRASTAT data to be archived in accordance with the following criteria:

Company codeReporting yearReporting monthDeclaration country

Choose Delete . Define a variant for the archiving delete run. The archiving delete run selects the file generated in the write run and deletes the data for thevalidity periods to be archived.

Choose Goto Reload to access the reload program for FT_VEIAV . We recommend that archived data be reloaded in exceptional cases only.

More InformationFor more information about the archiving object, see the application documentation for data archiving under Data Archiving Data Archiving in the ABAPApplication System Data Archiving with Archive Development Kit (ADK) Archiving Object .

1.11 Archiving EXTRASTAT Statistics Data with FT_VEXAV

Archiving object FT_VEXAV for archiving EXTRASTAT statistics data.

You can use archiving object FT_VEXAV (EXTRASTAT Receipt/Dispatch) to archive, delete, and reload the data written to database table VEXAV through theEXTRASTAT selection runs.

PrerequisitesThere is no Application Customizing for this archiving object.The system does not perform an archivability check because table VEXAV is simply a temporary store for creating EXTRASTAT notification files and thedata records it contains are not dependent on other data objects.

Tables

The following table shows the programs that exist for the archiving object FT_VEXAV (you define archiving objects using transaction AOBJ). To display theprograms used, use transaction AOBJ.

Program Function

RVEXAEWR Write

RVEXAEDL Delete

RVEXAERL Reload

The standard variants SAP&PROD (production mode) and SAP&TEST (test mode) are delivered for the delete program.

ILM-Based Information for the Archiving Object

You can use this archiving object with the FT_VEXAV ILM object as part of SAP Information Lifecycle Management. In order to do so, you must activate theassociated business function Information Lifecycle Management (ILM) (transaction SFW5). The system then also displays the ILM Actions frame. You canuse these actions to archive documents with the retention periods defined in the Information Retention Manager . You can also make snapshots (copies) of

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 41 of 48

Page 42: Data archiving in sales and distribution (sd)

data or delete data that fulfills the prerequisites.

For more information about the Relevance business functions for SAP ILM, see Activating SAP ILM.For more information about ILM Enhancements in data archiving, see ILM-Specific Enhancements in Archive Administration.

The following fields for FT_VEXAV are defined in the ILM policy and are visible when processing ILM policies (transaction IRMPOL):

Available Time BasesThe retention period for EXTRASTAT data archived with archiving object FT_VEXAV begins with the creation date of the record (this is theCREATION_DATE in ILM).Available Condition Fields

Reporting year of declaration to authorities (DATUMJAHR)Reporting month of declaration to authorities (DATUMMONA)Company Code (NUMMBUKRS)Sales Organization (VERKAUFOR)Declaration to authorities: Country of Plant (WERKSLAND)

Available Policy CategoriesRTP: Retention Rules

For more information, see SAP Information Lifecycle Management.

ProcedureTo call archive administration (transaction SARA) with archiving object FT_VEXAV from the SAP Easy Access menu, choose Logistics Sales andDistribution Foreign Trade/Customs Periodic Declarations Periodic Declarations Operative Archiving EXTRASTAT .

Alternatively, you can also call archive administration under Tools Administration Administration Data Archiving and enter object nameFT_VEXAV.

Choose Write . Define a variant for the archiving write run. The archiving write run imports all data in accordance with the selection criteria chosen and writesthis to one or more archive files without further checks.

You can select the EXTRASTAT data to be archived in accordance with the following criteria:

Company codeReporting yearReporting monthDeclaration country

Choose Delete . Define a variant for the archiving delete run. The archiving delete run selects the file generated in the write run and deletes the data for thevalidity periods to be archived.

Choose Goto Reload to access the reload program for FT_VEXAV . We recommend that archived data be reloaded in exceptional cases only.

More InformationFor more information about the archiving object, see the application documentation for data archiving under Data Archiving Data Archiving in the ABAPApplication System Data Archiving with Archive Development Kit (ADK) Archiving Object .

1.12 Archiving Customs Log Data with MM_PREF

Archiving object MM_PREF for archiving customs log data.

You can use archiving object MM_PREF to archive and delete the logs written by the preference determination programs.

PrerequisitesThere is no Application Customizing for this archiving object. The system determines whether a data record can be archived by comparing its time stamp withthe date of parameter Archivable until on the selection screen.

Tables

When you use the archiving object MM_PREF, data is archived from the following tables:

Table Table name

MMPREF_PRO_01 Logging table for archiving object MM_PREF

MMPREF_PRO_01_B Log table - Preference - Information from rules

MMPREF_PRO_02 Log table - Main component - Information

MMPREF_PRO_03 Log table - Component - Information

The following table shows the programs that exist for the archiving object MM_PREF. To display the programs used, use transaction AOBJ.

Program Function

RMPREFWR Write

RMPREFDL Delete

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 42 of 48

Page 43: Data archiving in sales and distribution (sd)

The standard variants SAP&PROD (production mode) and SAP&TEST (test mode) are delivered for the delete program.

ILM-Based Information for the Archiving Object

You can use this archiving object with the MM_PREF ILM object as part of SAP Information Lifecycle Management. In order to do so, you must activate theassociated business function Information Lifecycle Management (ILM) (transaction SFW5). The system then also displays the ILM Actions frame. You canuse these actions to archive documents with the retention periods defined in the Information Retention Manager . You can also make snapshots (copies) ofdata or delete data that fulfills the prerequisites.

For more information about the Relevance business functions for SAP ILM, see Activating SAP ILM.For more information about ILM Enhancements in data archiving, see ILM-Specific Enhancements in Archive Administration.

The following fields for MM_PREF are defined in the ILM policy and are visible when processing ILM policies (transaction IRMPOL):

Available Time BasesTime at which log record was created (CREATION_DATE)Available Condition Fields

Material number (MATNR)Plant (WERKS)

Available Policy CategoriesRTP: Retention Rules

For more information, see SAP Information Lifecycle Management.

ProcedureTo call archive administration (transaction SARA) with archiving object MM_PREF from the SAP Easy Access menu, choose Logistics Sales andDistribution Foreign Trade/Customs Preference Preference Processing Archiving Archive Administration .

Alternatively, you can also call archive administration under Tools Administration Administration Data Archiving and enter object name MM_PREF.

Write

You can select the customs logs to be archived in both the Preference f. and Constraints frame in accordance with the following criteria:

MaterialPlantArchiving until date

To display the customs logs from the SAP Easy Access menu, choose Logistics Sales and Distribution Foreign Trade/Customs Preference Preference Processing Customs Log . You can also display archived customs logs.

For more information about archive information structures, see the application documentation for data archiving under Data Archiving with ArchiveDevelopment Kit (ADK) Archive Information System Using the Archive Information System .

More InformationFor more information about the archiving object, see the application documentation for data archiving under Data Archiving Data Archiving in the ABAPApplication System Data Archiving with Archive Development Kit (ADK) Archiving Object .

1.13 Archiving Customer Master Data (FI-AR, SD)

DefinitionArchiving object FI_ACCRECV is used to archive and delete customer master data in the FI and SD components.

UseCustomer master data is stored and archived in three different areas:

General data

FI data (for a specific company code)

SD data (for a specific sales organization)

The term "customer master data" is used in the following for both the FI and SD area.

To archive master data, you must setthedeletion flag in the master record. You can set this flag for a complete customer or for individual company codes andsales organizations.

For more information about how to set the deletion flag, see:

Archiving and Deleting a Customer Master Record

Application Customizing (FI-AR, SD)

In addition to the deletion flag, a series of other prerequisites must be met so that you can archive customer master data. For more information about thechecks performed by the system during archiving, see Checks (FI-AR, SD) .

Calling the Archiving Function

You can call the archiving function for customer master data under Tools → Administration → Administration → Data Archiving . The ArchiveAdministration screen is displayed. Enter FI_ACCRECV as the archiving object. Alternatively, you can call the archiving function within each application:

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 43 of 48

Page 44: Data archiving in sales and distribution (sd)

FI: Choose Customers → Periodical Tasks → Archiving → Customers .

SD: You have the following options depending on your system settings:

System Menu Path

ERP system Logistics → Sales and Distribution → Master Data

SAP for Retail Master Data

On the Master Data Sales and Distribution screen, choose Business Partners → Customers Archiving .

Structure

Tables

Archiving object FI_ACCRECV is used to archive data from different tables. For more information about how to display the table names for individual archivingobjects, see Tables and Archiving Objects .

Function/Report Assignment

Function Report

Write FI_ACCRECV_WRI

Delete FI_ACCRECV_DEL

Integration

You can use archiving object AM_ASSET in Information Lifecycle Management . You must have activated the corresponding business functions to do this.The system then also shows the ILM Actions group box. You can use these actions to carry out archiving, for example, where the retention periods stored inthe Information Retention Manager can be evaluated. Additionally, you can create snapshots (copies) of data or destroy data that matches the requirements.For more information, see ILM Enhancements for Data Archiving , ILM Actions in the Write Program .

Displaying Archived Customer Master Data

To display individual documents for archiving object FI_ACCRECV u sing the Archive Information System,sapurl_link_0001_0003_0010you require aninformation structure that has been created based on one of the following standard SAP field catalogs:

SAP_FI_ACCREC_1 (FI customer master data)

SAP_FI_ACCREC_2 (SD customer master data)

Each information structure must be active and configured correctly.

For more information about information structures, see Using the Archive Information System

See also:

Archive Information System

Checks ( FI-AR , SD )In order for the system to only archive data that is no longer needed in current business processes, this data must meet certain conditions. To make sure thedata to be archived meets these conditions, the write program performs several checks.

Master data is only eligible for archiving if you have set the deletion flag in the master record in each area.

When you archive general data for customer master records, the system automatically checks whether the following conditions have been met:

The deletion flag is set.The vendor is not locked for deletion.Dependent data of the following types no longer exists in the system:

Business partner of the customerPlants of the customerCustomer/Vendor linksCompany code-specific data (FI data)Sales data (SD data)

Additional checks may be implemented in your system via the BAdI FI_ACCRECV_CHECK.

When you archive FI data for customer master records, the system automatically checks whether the following conditions have been met:

The deletion flag is set.The vendor is not locked for deletion.Dependent data of the following types no longer exists in the system:

Transaction figuresSpecial general ledger transaction figuresOpen itemsCleared itemsStore items

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 44 of 48

Page 45: Data archiving in sales and distribution (sd)

Customer/Vendor linksParked documents

Additional checks may be implemented in your system via the BAdI FI_ACCRECV_CHECK_FI.

When you archive SD data for customer master records the system automatically checks whether the following conditions have been met:

The deletion flag is set.Dependent data of the following types no longer exists in the system:

Customer hierarchies

Customer Partner Functions

Additional checks may be implemented in your system via the BAdI FI_ACCRECV_CHECK_SD.

1.13.2 Application Customizing (FI-AR, SD)

UseYou can set the deletion indicator for a customer in application Customizing.

FeaturesFor more information see also Archiving Customer Master Data (FI-AR, SD) .

ActivitiesYou have the following options for accessing application Customizing:

To access archive management choose Tools Administration Administration Archiving . Enter as object name FI_ACCRECV. ChooseCustomizing and then Application-specific customizing .

SD : Choose Logistics Sales and Distribution Master Data Business partners Customer archiving , then Customizing and thenApplication-specific customizing .

FI : Choose Accounting Financial Accounting Accounts Receivable Periodic processing Archiving Customers, then Customizing andthen Application-specific customizing .

Variant Settings for Writing ( FI-AR , SD )

UseWhen you schedule the write program you must either enter an already existing variant or create a new one. The variant contains the selection criteria for thecustomer master data you want to archive.

FeaturesIn the Data To Be Archived dropdown list box you can choose the areas from which you want to archive master data. You can choose from the followingareas:

General DataThe system archives only general data (not chart of account-specific). FI Data

The system archives only company code-specific master data. SD Data

The system archives only sales organization-specific master data.

Document Selection Criteria

In the Account Payable Master Data frame you can choose the following selection criteria:

VendorThe system archives only the master data of accounts that fall within the range covered by the selection criteria you enter. Company Code

The system archives only the master data of company codes that fall within the range covered by the selection criteria you enter.This selection option is only offered if you are archiving FI data. Purchasing Organization

The system archives only the master data of accounts that fall within the range covered by the selection criteria you enter.This selection option is only offered if you are archiving MM data.

Additional Selections and Options

In the Selections frame you can make the following setting:

Minimum Number of Days in the System

This function is identical for customers and vendors. For a detailed description of this option see Variant Settings for Writing (FI-AP) in the section on vendors.

In the Options frame you can make the following settings:

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 45 of 48

Page 46: Data archiving in sales and distribution (sd)

FI Link Validation Off

This function is identical for customers and vendors. For a detailed description of this option see Variant Settings for Writing (FI-AP) in the section on vendors.

SD Document Validation OffIf this flag is set, the systems checks in SD whether sales documents still exist for the master record that is to be archived. This check generates longruntimes and may not always be necessary. You can therefore switch off this check and herewith reduce the runtime of the write program. In thestandard system, this check is always switched on.This option is only relevant if you are archiving SD data. Take Deletion Flag Into Account

This function is identical for customers and vendors. For a detailed description of this option see Variant Settings for Writing (FI-AP) in the section on vendors.

Additional Settings

The settings you make under Processing Options, for Log Settings, and Archiving Session Note are standard settings that are also valid for other archivingobjects. They are therefore described in the general archiving documentation under Variant Maintenance for Archiving Jobs .

See also:

Create Archive Files

1.13.4 ILM-related Information for FI_ACCRECV

To create and use policies and rules for the archiving object FI_ACCRECV in Retention Management of ILM, an ILM object is available. FI_ACCRECV is theILM object associated with the archiving object FI_ACCRECV.

For more information, see Archiving Customer Master Data (FI-AR, SD)

PrerequisitesYou have activated the business function Activating SAP ILM (ILM).For more information, see Activating SAP ILMYou have activated the business function ILM-Based Deletion of Customer and Vendor Master Data (ERP_CVP_ILM_1).For more information, see ILM-Based Deletion of Customer and Vendor Master Data.

Features

Condition Fields and Time References

To define retention rules using ILM policies (transaction IRMPOL), you can use the following condition fields and time references (start time for determiningthe retention duration) for the ILM object.

Condition Fields

Condition Fields Description

APPL_NAME Application Name

APPL_RULE_VARIANT Application Rule Variant

KTOKD Customer Account Group

BUKRS Company Code

VKORG Sales Organization

BS_COUNTRY_OF_BUKRS Country of Company Code

WERKS Plant Table for National (Centrally Agreed) Contracts

Time Reference

Start Retention Time Description

START_RET_DATE Start Date of Retention

END_OF_FISCAL_YEAR End of Fiscal Year

END_OF_YEAR End of Year

Object Category and Policy Category

You define policies for FI_ACCRECV in the BOR object category (data BUS1007) with the Retention Rules policy category RST and RTP.

1.14 Archiving Object CPE_PRQUOT

DefinitionCPE_PRQUOT is used to write price quotation data from the Price Quotation table CPED_PRICEQUOT to the archive.

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 46 of 48

Page 47: Data archiving in sales and distribution (sd)

UseYou can set the residence timefor price quotations in Customizing under Integration with Other mySAP.com Components Customer RelationshipManagement Basic Functions Commodity Pricing Commodity Pricing Engine Definition of CPE Quotations Define Quotation Name .

The business units using the CPE function define the residence time. Price quotations must not be archived if there are still references to open salesdocuments. For example, if the oldest open sales contract still uses price quotations from last year, you can only archive price quotations from two years ago.There is no technical tool to check whether or not a price quotation is still in use.

All steps are triggered when you carry out the relevant reports in the Archive Development Kit. To do this, on the SAP Easy Access screen, choose Tools Administration Administration Data Archiving . You can also run these reports in the background. To check subsequent changes orproblems, use the application log (on the SAP Easy Access screen, choose Tools Business Workflow Development Utilities Application Log Application Log: Display Logs ).

Run the CPE_ARC_PRICEQUOT_SAVE report in test mode to check which price quotations will be archived in the system. If you run the same report inproduction mode, it will actually archive price quotation data to data files.

To display archived data, run the CPE_ARC_PRICEQUOT_READ program. Alternatively, you can activate the SAP_PRICE_QUOT archive infostructure toenable reading of data from archive files (onthe SAP Easy Access screen, choose Logistics Agency Business Environment Archive Display) .

See also:

Archiving Object

StructureArchiving object CPE_PRQUOT has the following archiving programs:

Program Name Function

CPE_ARC_PRICEQUOT_SAVE Check program

CPE_ARC_PRICEQUOT_SAVE Write program

CPE_ARC_PRICEQUOT_DELETE Delete program

CPE_ARC_PRICEQUOT_READ Read program

NoteYou can run the CPE_ARC_PRICEQUOT_SAVE report program in test mode to check the data.

See also:

Archiving of Price Quotations

1.14.1 Archiving of Price Quotations

UseYou can remove price quotation data that is no longer required from the database and store it in archive files. This reduces the volume of data and improvesperformance.

To start archiving of price quotations, chooseon the SAP Easy Access screen Tools Administration Administration Data Archiving and fill in thearchiving object ( CPE_PRQUOT). Before using the archiving object, you should maintain the application-specific Customizing .

PrerequisitesYou must have enabled commodity pricing engine functionality and have used price quotation data to compute the prices of commodities.

NoteYou have to ensure that the price quotations in the ERP system and in SAP CRM are archived at the same time. If not, the data exchange might recreatethe entries you have already archived in one system.

You must have entered residence times for price quotations in Customizing under Integration with Other mySAP.com Components CustomerRelationship Management Basic Functions Commodity Pricing Commodity Pricing Engine Definition of CPE Quotations Define Quotation Name.

Only price quotations with valid residence times will be considered for archiving.

1.15 Archiving Checklist

This checklist helps to ensure that you complete the necessary archiving steps and that you perform them in the correct order.

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 47 of 48

Page 48: Data archiving in sales and distribution (sd)

Procedure

Before the first archiving session

1. In Basis Customizing, check that the logical file names are entered.2. In cross-archiving object Customizing, check that the Central Repository for storage is maintained using the SAP Content Management Infrastructure.3. In application-specific Customizing, check that the residence times are defined.

Before using an archiving object for the first time

Check archiving object-specific Customizing settings:

Was the file name correctly assigned?Are the deletion program variants maintained? (Note that the variants are client-specific)Is the maximum archive file size correctly set?Is the delete program set to run automatically?Is index creation scheduled?

For each archiving session

1. Ensure that the user department and system administration coordinate their activities.2. Check the network graphic to determine whether interdependencies exist (do other data objects have to be archived first?)3. Schedule the archiving session (create variant).4. If the delete program does not start automatically, start it manually.5. If the archive files are not to be stored automatically by the Content Management Infrastructure, , trigger storage manually.

PUBLIC© 2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 48 of 48