I_MaterialLedgerDocument

DDL: I_MATERIALLEDGERDOCUMENT SQL: IMLDOCHEADER Type: view BASIC Package: FINS_ML_DOCUMENT

Material Ledger Document Header

I_MaterialLedgerDocument is a Basic CDS View that provides data about "Material Ledger Document Header" in SAP S/4HANA. It reads from 1 data source (P_MaterialLedgerDocumentHeader) and exposes 19 fields with key fields MaterialLedgerDocument, MaterialLedgerDocumentYear. It has 1 association to related views. Part of development package FINS_ML_DOCUMENT.

Data Sources (1)

SourceAliasJoin Type
P_MaterialLedgerDocumentHeader P_MaterialLedgerDocumentHeader from

Associations (1)

CardinalityTargetAliasCondition
[0..*] I_MatlPrChgAcctDetnDiffntnRsnT _Text $projection.MatlPrChgAcctDetnDiffntnRsn = _Text.MatlPrChgAcctDetnDiffntnRsn

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName IMLDOCHEADER view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #BASIC view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
EndUserText.label Material Ledger Document Header view

Fields (19)

KeyFieldSource TableSource FieldDescription
KEY MaterialLedgerDocument belnr SD Document
KEY MaterialLedgerDocumentYear kjahr Year
MaterialLedgerTransactionType vgart Transactn Type
LedgerGroup ldgrp Target Ledger Group
ReferenceDocumentType awtyp Reference Document Type
ReferenceDocument awref Reference Doc.
ReferenceDocumentContext Refer. Org.Unit
ReferenceDocumentLogicalSystem Logical System
IsReversalDocument storno Reversal
DocumentDate Journal Entry Date
CreationDate Imported On
CreationTime Time
CreatedByUser User Name
ExecutedTransaction tcode Undefined range (can be used for patch levels)
BusinessTransactionType Bus.transaction
LogicalSystem logsys Source system
DocumentHeaderText bktxt Header Text
MatlPrChgAcctDetnDiffntnRsn kongr Reason
_Text _Text

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 I_MaterialLedgerDocument.
-- 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: IMLDOCHEADER

CREATE VIEW I_MaterialLedgerDocument AS
SELECT
  belnr AS MaterialLedgerDocument,
  kjahr AS MaterialLedgerDocumentYear,
  vgart AS MaterialLedgerTransactionType,
  ldgrp AS LedgerGroup,
  awtyp AS ReferenceDocumentType,
  awref AS ReferenceDocument,
  cast(aworg as fis_aworg preserving type) AS ReferenceDocumentContext,
  cast(awsys as fis_awsys preserving type) AS ReferenceDocumentLogicalSystem,
  storno AS IsReversalDocument,
  cast(bldat as fis_bldat preserving type) AS DocumentDate,
  cast(cpudt as fis_cpdat preserving type) AS CreationDate,
  cast(cputm as ttet_dt_cr_time preserving type) AS CreationTime,
  cast(usnam as vdm_createdbyuserid preserving type) AS CreatedByUser,
  tcode AS ExecutedTransaction,
  cast(glvor as fins_custbttype preserving type) AS BusinessTransactionType,
  logsys AS LogicalSystem,
  bktxt AS DocumentHeaderText,
  kongr AS MatlPrChgAcctDetnDiffntnRsn
FROM P_MaterialLedgerDocumentHeader
LEFT OUTER JOIN I_MatlPrChgAcctDetnDiffntnRsnT AS _Text ON MatlPrChgAcctDetnDiffntnRsn = _Text.MatlPrChgAcctDetnDiffntnRsn  -- association [0..*]
;