SAP Program SAPF056 - FI: Archiving Program for Customer Master Data

Description
The SAPF056 program archives customer master records and writes thearchivable master records to an archiving file.
The number of master records to be archived depends on the followingselections:

  • Customer numbers

  • Company codes (if FI data is to be taken into consideration)

  • Sales organization (if SD data is to be taken into consideration)

  • System conditions (see criteria below).

  • Note that company code data and sales area data cannot be archived inone program run. When you make your selections, you can only chooseeither company code or sales area data.
    Note that only that master data is taken into account that is markedfor deletion (see below).

    Precondition

    Program Modes
    This program can be run in three different modes:
    Only general master data is archived
    Only application-specific data is archived
    Both general data and application-specific data is archived.

    Check on Whether Data can be Archived
    Mode 1: The selected general data must have been marked for deletion.There must be no accompanying company code data. For example, companycode data for a customer must not still exist if the general data is tobe archived.
    Furthermore, you cannot archive the general data if the customer is abusiness partner of another customer or one of his contact persons isalso assigned to another customer as a contact person (table KNVP:Customer Master Partner Functions)
    Mode 2: The selected application-specific data must fulfill thefollowing application criteria:

    • FI: You can delete company code data provided the following do not
    • exist:
      Special G/L figures
      Transaction figures
      Open items
      Cleared items.
      The deletion flag must also be set at company code level.
      • SD: You can delete sales area data if the customer for the sales area
      • is not active in a customer hierarchy (table KNVH) and the customer andhis contact person are not active as a partner in sales documents(VBPA). The sales document check can also be switched off forperformance reasons.
        Mode 3: The general data or company-code specific segments selectedmust be flagged for deletion. Both the general data and the companycode-specific data will be deleted if the deletion flag is set in thegeneral data part of the record. You may only delete companycode-specific data if the deletion flag is set in the company code datasection of the master record (in which case the general data is simplycopied into the archive). The application-specific data must alsofulfill the criteria for mode 2.
        The general data is archived after all accompanying companycode-specific data has been archived and the customer is not referencedelsewhere. If this is not the case, the general data is copied into thearchive.

        Precondition

        Customizing for the Object
        As for any archiving object, SAP supplies a default setting for theobject in question FI_ACCRECV. You can implement modifications, such asnew archive file names, file paths, maximum size of the files, etc.using transaction "SARA".

        Output

        Detail log
        If you have selected "Detail log" on the selection screen, severallists will be output displaying all non-archived master records sortedaccording to general data and application-specific data. The reason asto why each record could not be archived is also displayed.
        A warning message is also possible for general data: In this case, thegeneral data record will not deleted from the database but copied intothe new archive. This can lead to multiple versions of a customer inthe database and in the archive and must therefore be borne in mindduring subsequent reloading. The application-specific entries cannormally shed further light on errors within the general data.
        The archiveable entries are then listed.

        Summarized log
        An additional summarized log is always output. Its first sectionprovides information regarding the number of files read and those whichcan be archived, followed by statistics on the various differentapplications. General data on the archiving run, such as user name andselection, are provided at the end of the list.

        Miscellaneous
        The archiving function (SAPF056) is separated from deletion (SAPF056D)as is the case with other archiving objects. SAPF056 automaticallystarts the deletion process if this was specified in technicalCustomizing. You can also start the deletion process separately,especially after a system termination.
        (Note: If you start program SAPF056 using transaction SE38, theSAPF056D deletion program will not be started automatically because thesystem will assume you are running a test case).
        If you start this program for the first time and have carried out thelink check (default setting), you need to start program SAPF047 priorto archiving in order to generate the link information.