SAP Program RWVKPAW1 - Archiving: Write Program for Object W_KALK (Pricing Documents)

Description
Archiving write program for archiving object W_KALK
The archiving object W_KALK (pricing documents) comprises entries fromthe following tables:
WKBK, WKBP, KONV, KONH, condition tables as per KONH entry, KONP (withKONW, KONM: archiving class CONDS), CDHDR, CDPOS (archiving classCHANGEDOCU), S111
You can narrow down the selection of pricing documents you want toarchive by material and organizational level. You can also narrow downthe selection further by material group, vendor (and vendor sub-range),season and/or purchasing organization. You can also restrict yourselection to documents created by a particular user and on a particulardate.
The archiving key date is an additional selection criterion. You caneither enter this directly, or define the key date using a past period(see example). The document item status is also an important parameterin archiving. The following details apply:

  • Documents items whose "valid to" date is before the key date, are
  • always archived, no matter their status.
    • Document items with status A or B whose "valid to" date is after the
    • key date are not archived (as the price can still be archived).
      • Document items with status D are usually archived no matter their
      • status.
        • Canceled document items (status E): If the archiving indicator
        • independently of the date is set, these are treated as items withstatus D and therefore archived no matter the key date. Otherwise, theyare not archived. (This is because canceled items can be converted toitems with status B in pricing document processing.)
          • Items with status C are only archived if there are no relevant
          • condition records valid after the key date. In carrying out this check,the system differentiates between documents including the conditionrecord number for the sales price (as of Release 4.5A) and documentswithout condition record number. In the former case, the check isrestricted to the condition record for the sales price. In the lattercase, the system takes all condition records into account for the maincondition types of application V (defined in the sales pricecalculation control parameters). The performance involved in the firstcheck is considerably better. Old pricing documents can be updated forarchiving using report RWVKP05U. This adds the condition record numberfor the sales price.
            The information in the pricing document header (table WKBK) is alwaysincluded in the archive file for the pricing document items (tableWKBP). The pricing document header is only flagged as being able to bedeleted after all the relevant pricing document items have beenarchived.

            Precondition

            Example
            Example of past period:
            Today's date: 20.01.1998
            Past period: 10 days
            Resulting key date for archiving: 10.01.1998

            Further information
            Information on deletion of the table entries belonging to the archiveddocuments and on reading archived documents can be found in the programdocumentation:

            • RWVKPAD1: Archiving deletion program for object
            • W_KALK
              • RWVKPAR1: Archiving read program for object W_KALK

              • Information on including the condition record number in pricingdocuments for documents created before Release 4.5A is found in theprogram documentation:
                RWVKP05U: Conversion of pricing documents: fillingfield WKBP-KNUMH_V