SAPTechno

Note 547748 - FAQ: Archiving sales documents

Header
Version / Date 14 / 2010-02-24
Priority Recommendations/additional info
Category FAQ
Primary Component SD-SLS-GF-AR Archiving Sales
Secondary Components BC-CCM-ADK Archive Development Kit,BC-CCM-ADK-AS Archive Information System

Summary
Symptom
    1. Question: Which application-specific archiving Customizing do I have to carry out to archive sales documents or why, during the early delivery or write run, does the system display the termination message VB 801 "Internal error:  DYNSQL_GENERATE_WHERE_CLAUSE(4)", or VB 720 " The application table for archiving control is not maintained."?
    2. Question: How do I archive sales documents?
    3. Question: Why is it not possible to archive some sales documents?
    4. Question: Can I reload archived sales documents?
    5. Question: How can I also carry out user-defined checks for the archivability of sales documents?
    6. Question: When I display an archived sales document in transaction VA03 or transaction SARI or SARE, the system issues error message VP 194, VP 198 or VP 199 ("No master record exists ..."). What is the cause of this problem?
    7. Question: The write run with program S3VBAKWR terminates with error "DBIF_RSQL_SQL_ERROR". How can I avoid this error?
    8. Question: In my archive information structure for the archiving object SD_VBAK, I use fields of the table ADRC (for example, NAME1). These fields are no longer filled in releases after 4.6C. What should I do?

Other terms

FAQ, SARA, SD_VBAK, S3VBAKPT, S3VBAKWR, S3VBAKDL, S3VBAKPTS, S3VBAKWRS, S3VBAKDLS, S3VBAKRL, VP 194, VP 198, VP 199, VB 801, Internal error: DYNSQL_GENERATE_WHERE_CLAUSE(4), VB720, VB 720, DBIF_RSQL_SQL_ERROR, ADDRESS, field catalog, ADRC, ADDR1_VAL, SARI, SARE

Reason and Prerequisites

FAQ

Solution
    1. Question: Which application-specific archiving Customizing do I have to carry out to archive sales documents or why, during the early delivery or write run, does the system display the termination message VB 801 "Internal error:  DYNSQL_GENERATE_WHERE_CLAUSE(4)", or VB 720 " The application table for archiving control is not maintained."?


Answer: In the SAP Implementation Guide under "Sales and Distribution -> Data Transfer and Archiving -> Archiving Data -> Archiving Control for Sales Documents" (transaction VORA), set the residence time of sales documents. Do this depending on sales organization and sales document type.
If required, you can also assign additional FORM routines to implement additional checks of the documents during archiving.
Without this Customizing, during the early delivery or write run, the system displays the termination message VB 801 "Internal error: DYNSQL_GENERATE_WHERE_CLAUSE(4)"

    2. Question: How do I archive sales documents?


Answer: In the SAP standard menu, select "Tools -> Administration -> Administration -> Data Archiving" (transaction SARA). Enter the object name "SD_VBAK" and choose "Enter".
Transaction SARA is the central transaction for archiving. From here, you can reach all required functions (for example, Customizing, tables and archiving objects, archiving and Archive Information System (SAP AS)). In this context, see also the online documentation.

    3. Question: Why is it not possible to archive some sales documents?


Answer: For a list of the criteria under which a sales document can be archived, see Note 481577.

    4. Question: Can I reload archived sales documents?


Answer: You should only reload sales documents using the S3VBAKRL program in case of emergency.
Certain data is not reloaded (for example, CO data).
If, for example, the number range of an archived sales document was reset after the archiving, a reload must not occur.
Reloading is not officially supported by SAP. See Notes 373568 and 520475.

Additional information: To enable you to reload sales documents in the background using transaction SARA in cases when it is absolutely necessary, you must enter the S3VBAKRL reload program for the SD_VBAK archiving object in transaction AOBJ.

    5. Question: How can I also carry out user-defined checks for the archivability of sales documents?


Answer: For more information, see Note 507365.

    6. Question: When I display an archived sales document in transaction VA03 or transaction SARI or SARE, the system issues error message VP 194, VP 198 or VP 199 ("No master record exists ..."). What is the cause of this problem?


Answer: The customers (partners) used in the archived sales document were also archived. This means the system cannot find the partner data and issues a relevant error message. This is standard behavior.
You can display the technical view for the sales document affected in transactions SARI or SARE.

    7. Question: The write run with program S3VBAKWR terminates with error "DBIF_RSQL_SQL_ERROR". How can I avoid this error?


Answer: This problem occurs if the ABAP statement 'OPEN CURSOR'/'FETCH NEXT CURSOR' is used to select the sales document header data to be archived. In general, you should set the "Alternative DB access" indicator on the selection screen or in the variants to avoid this error.

    8. Question: In my archive information structure for the archiving object SD_VBAK, I use fields of the table ADRC (for example, NAME1). These fields are no longer filled in releases after 4.6C. What should I do?


Answer: As of Release 4.70, use ADDR1_VAL and not ADRC as the source table in your field catalog of your archive information structure.

Related Notes
577162Display of archived sales orders using VA03
520475SD archiving: Reloading documents not supported
507365User exits for check on archivability in Sales and Distribtn
488970Archivability criteria for billing docs S3VBRKWR/S3VBRKPT
481577Archivability criteria for sales documents
460620Migrating archive files
373568Archiving SD: Reloading documents not supported
373478Archiving SD_VBAK: Read program S3VBAKAU
355944SD_VBAK: Sales documents cannot be reloaded
314330Enhancements for the selection criteria SD_VBAK