SAP Knowledge Base Article - Public

3762579 - DRC Peru: Inventory and Balance ledger report shows unexpected values for the fields Document Type, Document Serial Number, Official Document Number

Symptom

DRC Peru: Inventory and Balance ledger report shows unexpected values for the fields Document Type, Document Serial Number, Official Document Number.

The report shows the values: 
Document Type = 00
Document Serial Number = 0000
Official Document Number = 00000000

Environment

SAP S/4HANA Cloud Public Edition.

Reproducing the Issue

  1. Run Statutory reports app.
  2. Execute the Peru Inventory and Balance Ledger (PE_INVENTORY_BALANCE_LEDGER).
  3. Open the report file and observe the report shows the below values:
    Document Type = 00
    Document Serial Number = 0000
    Official Document Number = 00000000

Cause

The Document Reference ID in journal entries does not conform to the official document number (ODN) format for Peru, so the report's parsing logic cannot extract type/series/number and falls back to default values (00/0000/00000000).

Resolution

Adjust the Document Reference ID of the affected documents in accordance with the Official Document Numbering for Peru.

Format for Official Document Numbers
There are two formats for official document numbers in Peru. These formats are assigned to different types of documents. Document types for these documents are provided as sample data for data in the configuration environment.

The components of the official document numbers are as follows:

  • T - the document type, as defined in the configuration environment. Example: DR - Customer Invoice.
  • S - the document series, as defined in the configuration environment. Example: F001 - Invoice Series.
  • Y - year
  • D - the document ID, taken from the number range associated with the company code and series, as defined in the configuration environment.
  • () - optional characters in the ODN format.

For these document types:

  • 50 - Customs declaration
  • 51
  • 52
  • 53
  • 54 - Collection settlement

The ODN format is this: TT-S(SSSSS)-YYYY-D(DDDDD). The optional characters allow the ODN format to conform to the 16-character length of the BKPF-XBLNR Reference Document Number field. If the series is four characters long, then the ID number may be only three characters long.
For other document types, the ODN format is this: TT-SSSS-DDDDDDDD

The hyphenation in these formats is required for the BKPF-XBLNR field, which displays the reference document number. The hyphenation shows the component parts of the ODN.

See Also

Help: Official Document Numbering

Keywords

peru, sunat, inventory and balance ledger, statutory reporting, document type 00, document serial number 0000, initial document number 00000000, assignment reference, document reference id, odn, cds view, c_pe_strpjournalentryitemcube, p_pe_strpjournalentryitem, pe_inventory_balance_ledger , KBA , FI-LOC-FI-PE-ACR , Statutory Reporting , Problem

Product

SAP S/4HANA Cloud Public Edition all versions