/APE/C_ArchivePDoc_UI

DDL: /APE/C_ARCHVIEPDOC_UI SQL: /APE/C_ARPDOCUI Type: view CONSUMPTION

Archived Process Documents

/APE/C_ArchivePDoc_UI is a Consumption CDS View that provides data about "Archived Process Documents" in SAP S/4HANA. It reads from 1 data source (/APE/I_ArchiveDoc) and exposes 63 fields with key field DocumentKey. It has 11 associations to related views.

Data Sources (1)

SourceAliasJoin Type
/APE/I_ArchiveDoc /APE/I_ArchiveDoc from

Associations (11)

CardinalityTargetAliasCondition
[0..1] /APE/C_BusObjTypeOfEExDoc_VH _BOType _BOType.BusinessObjectType = $projection.DocumentType
[0..1] /APE/C_ArchivedDocStatus_VH _DocStatus _DocStatus.Value = $projection.DocumentStatus and _DocStatus.DocumentType = 'PDoc'
[0..1] /APE/C_Process_VH _Process _Process.ProcessKey = $projection.proc_config_uuid
[0..1] /APE/C_PersonalDataInd_VH _PersonalDataInd _PersonalDataInd.Value = $projection.PersonalDataIndicator
[0..1] /APE/C_TestInd_VH _TestInd _TestInd.Value = $projection.Test and _TestInd.Language = $session.system_language
[0..1] /APE/C_HistoricalData_VH _HistoricalData _HistoricalData.Value = $projection.HistoricalData and _HistoricalData.Language = $session.system_language
[0..*] /APE/C_ArchiveLinkedDoc_UI _LinkedDocs _LinkedDocs.DocumentKey = $projection.DocumentKey
[0..*] /APE/C_ArchiveLinkedTDoc _LinkedTDoc _LinkedTDoc.ArchivedPDocKey = $projection.DocumentKey
[1..1] /APE/C_RemoteArchConfigure _ProcessIDConf _ProcessIDConf.config_key = $projection.ProcessIDKeyFt and _ProcessIDConf.config_type = 'PROCID'
[1..1] /APE/C_RemoteArchConfigureText _ProcessIDText _ProcessIDText.arch_config_key = _ProcessIDConf.arch_config_key and _ProcessIDText.language = $session.system_language
[0..*] /ape/C_ProcDataObjectAdd_UI _PdocBOAdd _PdocBOAdd.proc_uuid = $projection.DocumentKey

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName /APE/C_ARPDOCUI view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #MANDATORY view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #MIXED view
EndUserText.label Archived Process Documents view
Metadata.allowExtensions true view
Search.searchable true view
Metadata.ignorePropagatedAnnotations true view
VDM.viewType #CONSUMPTION view

Fields (63)

KeyFieldSource TableSource FieldDescription
KEY DocumentKey doc_uuid UUID
DocumentNumberFlt doc_no Posted Doc. No.
DocumentNumber Posted Doc. No.
DocumentType doc_type VAT Document Type
ProcessDescriptionKey
ProcessDescription
DocumentTypeDescription _BOType BusinessObjectTypeDescription
DocumentStatus doc_status VL Doc Status
DocumentStatusDescription _DocStatus Description Well Code Des.
DocumentKeyDateTS
clientNULLasDocumentKeyDate
clientNULLasProcessKeyDate
CommonAccessUUID com_acc_uuid
BusinessStatus bus_status
BusinessStatusDescription
ProcessClusterKey
ProcessCluster
ProcessClusterDescription
VersionKey
Version
VersionDescription
ProcessIdKey
ProcessIDKeyFt proc_id_uuid
ProcessID _ProcessIDConf semantic_value
ProcessIDDescription
StatusTimestamp
BusinessPartner bu_partner_uuid
BusinessObjectUUID bo_uuid
BusinessObjectTypeUUID bo_type_uuid
BusinessObjectType
BusinessObjectTypeDescription
OwnerUUID
PersonalDataIndicator person_data_ind
PersonalDataIndicatorDescr _PersonalDataInd Description Well Code Des.
Blocked blocked Complaint Locked
Test test Test
TestDescription _TestInd Description Well Code Des.
CreatedAt Uploaded On
CreatedBy created_by Version Created By
ChangedAt Timestamp
ChangedBy changed_by User Name
clientNULLasCreationDate
Tags doc_tags
TechnicalMessageID tech_msg_id
TechnicalMessageVersion tech_msg_version
CommunicationPartnerID com_partner_id
DocCreatedAt
DocChangedAt
DocCreatedAtTMP doc_created_at
client_uuid client_uuid
auth_grp auth_grp AuthorizGroup
doc_type doc_type VAT Document Type
ProcessConfiguration
ExternalTransferReference Data Exchange Reference
TDocBusinessMessageID Business Message ID
TDocBusinessStatus Transfer Business Status
AddBusObjKey
AddBusObjType
AddBusObjCount
_LinkedDocs _LinkedDocs
_LinkedTDoc _LinkedTDoc
_HistoricalData _HistoricalData
_PdocBOAdd _PdocBOAdd

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view /APE/C_ArchivePDoc_UI.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: /APE/C_ARPDOCUI

CREATE VIEW /APE/C_ArchivePDoc_UI AS
SELECT
  doc_uuid AS DocumentKey,
  doc_no AS DocumentNumberFlt,
  cast(doc_no as /ape/de_doc_no) AS DocumentNumber,
  doc_type AS DocumentType,
  cast('' as /ape/de_config_db_key) AS ProcessDescriptionKey,
  cast('' as /ape/de_description) AS ProcessDescription,
  _BOType.BusinessObjectTypeDescription AS DocumentTypeDescription,
  doc_status AS DocumentStatus,
  _DocStatus.Description AS DocumentStatusDescription,
  cast( doc_key_date as timestampl ) AS DocumentKeyDateTS,
  tstmp_to_dats( doc_key_date, abap_user_timezone($session.user, $session.client,'NULL' ), $session.client, 'NULL' ) as DocumentKeyDate AS clientNULLasDocumentKeyDate,
  tstmp_to_dats( doc_key_date, abap_user_timezone($session.user, $session.client,'NULL' ), $session.client, 'NULL' ) as ProcessKeyDate AS clientNULLasProcessKeyDate,
  com_acc_uuid AS CommonAccessUUID,
  bus_status AS BusinessStatus,
  cast('' as /ape/de_description) AS BusinessStatusDescription,
  cast('' as /ape/de_config_db_key) AS ProcessClusterKey,
  cast('' as /ape/de_proc_cluster) AS ProcessCluster,
  cast('' as /ape/de_description) AS ProcessClusterDescription,
  cast('' as /ape/de_config_db_key) AS VersionKey,
  cast('' as /ape/de_version) AS Version,
  cast('' as /ape/de_description) AS VersionDescription,
  cast('' as /ape/de_config_db_key) AS ProcessIdKey,
  proc_id_uuid AS ProcessIDKeyFt,
  _ProcessIDConf.semantic_value AS ProcessID,
  cast('' as /ape/de_description) AS ProcessIDDescription,
  cast( doc_status_tstmp as timestampl ) AS StatusTimestamp,
  bu_partner_uuid AS BusinessPartner,
  bo_uuid AS BusinessObjectUUID,
  bo_type_uuid AS BusinessObjectTypeUUID,
  cast('' as /ape/de_bo_type) AS BusinessObjectType,
  cast('' as /ape/de_description) AS BusinessObjectTypeDescription,
  cast('' as /ape/de_owner_uuid) AS OwnerUUID,
  person_data_ind AS PersonalDataIndicator,
  _PersonalDataInd.Description AS PersonalDataIndicatorDescr,
  Blocked,
  Test,
  _TestInd.Description AS TestDescription,
  cast( created_at as timestampl ) AS CreatedAt,
  created_by AS CreatedBy,
  cast( changed_at as timestampl ) AS ChangedAt,
  changed_by AS ChangedBy,
  tstmp_to_dats( created_at, abap_user_timezone($session.user, $session.client,'NULL' ), $session.client, 'NULL' ) as CreationDate AS clientNULLasCreationDate,
  doc_tags AS Tags,
  tech_msg_id AS TechnicalMessageID,
  tech_msg_version AS TechnicalMessageVersion,
  com_partner_id AS CommunicationPartnerID,
  cast( doc_created_at as timestampl ) AS DocCreatedAt,
  cast( doc_changed_at as timestampl ) AS DocChangedAt,
  doc_created_at AS DocCreatedAtTMP,
  client_uuid,
  auth_grp,
  doc_type,
  cast('' as /ape/de_description) AS ProcessConfiguration,
  cast('' as /ape/de_tech_msg_id_ext) AS ExternalTransferReference,
  cast('' as /ape/de_bus_msg_id_ext) AS TDocBusinessMessageID,
  cast('' as /ape/de_bus_status) AS TDocBusinessStatus,
  cast( '' as abap.char( 70 ) ) AS AddBusObjKey,
  cast( '' as abap.char( 40 ) ) AS AddBusObjType,
  cast( 0 as abap.int2 ) AS AddBusObjCount
FROM /APE/I_ArchiveDoc
LEFT OUTER JOIN /APE/C_BusObjTypeOfEExDoc_VH AS _BOType ON _BOType.BusinessObjectType = DocumentType  -- association [0..1]
LEFT OUTER JOIN /APE/C_ArchivedDocStatus_VH AS _DocStatus ON _DocStatus.Value = DocumentStatus AND _DocStatus.DocumentType = 'PDoc'  -- association [0..1]
LEFT OUTER JOIN /APE/C_Process_VH AS _Process ON _Process.ProcessKey = proc_config_uuid  -- association [0..1]
LEFT OUTER JOIN /APE/C_PersonalDataInd_VH AS _PersonalDataInd ON _PersonalDataInd.Value = PersonalDataIndicator  -- association [0..1]
LEFT OUTER JOIN /APE/C_TestInd_VH AS _TestInd ON _TestInd.Value = Test AND _TestInd.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN /APE/C_HistoricalData_VH AS _HistoricalData ON _HistoricalData.Value = HistoricalData AND _HistoricalData.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN /APE/C_ArchiveLinkedDoc_UI AS _LinkedDocs ON _LinkedDocs.DocumentKey = DocumentKey  -- association [0..*]
LEFT OUTER JOIN /APE/C_ArchiveLinkedTDoc AS _LinkedTDoc ON _LinkedTDoc.ArchivedPDocKey = DocumentKey  -- association [0..*]
LEFT OUTER JOIN /APE/C_RemoteArchConfigure AS _ProcessIDConf ON _ProcessIDConf.config_key = ProcessIDKeyFt AND _ProcessIDConf.config_type = 'PROCID'  -- association [1..1]
LEFT OUTER JOIN /APE/C_RemoteArchConfigureText AS _ProcessIDText ON _ProcessIDText.arch_config_key = _ProcessIDConf.arch_config_key AND _ProcessIDText.language = $session.system_language  -- association [1..1]
LEFT OUTER JOIN /ape/C_ProcDataObjectAdd_UI AS _PdocBOAdd ON _PdocBOAdd.proc_uuid = DocumentKey  -- association [0..*]
;