I_PreAgrmtContrItmDocAmt

DDL: I_PREAGRMTCONTRITMDOCAMT Type: view_entity COMPOSITE

Linked amount for contract Item to PPMG

I_PreAgrmtContrItmDocAmt is a Composite CDS View that provides data about "Linked amount for contract Item to PPMG" in SAP S/4HANA. It reads from 1 data source (I_PrepaymentAssignedDocument) and exposes 6 fields with key fields DocNumber, DocumentItemNumber.

Data Sources (1)

SourceAliasJoin Type
I_PrepaymentAssignedDocument AssignedDocuments from

Parameters (2)

NameTypeDefault
P_Currency waers
P_Date dats

Annotations (7)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Linked amount for contract Item to PPMG view
Metadata.ignorePropagatedAnnotations true view
VDM.viewType #COMPOSITE view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view

Fields (6)

KeyFieldSource TableSource FieldDescription
KEY DocNumber I_PrepaymentAssignedDocument PrepaymentAgrmtRefDocument Linking Document No.
KEY DocumentItemNumber I_PrepaymentAssignedDocument PrepaymentAgrmtRefDocItem Linking Docu No. Itm
SAPBusinessObjectTypeCode I_PrepaymentAssignedDocument PrepaymentAgrmtRefBusObject Business Object Type
PrepaymentAgrmtLinkType I_PrepaymentAssignedDocument PrepaymentAgrmtLinkType Link Type
curr232asPrepaymentAgrmtLinkAmount
PrepaymentAgreementCurrency

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_PreAgrmtContrItmDocAmt.
-- 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.
-- Parameters: P_Currency : waers, P_Date : dats

CREATE VIEW I_PreAgrmtContrItmDocAmt AS
SELECT
  AssignedDocuments.PrepaymentAgrmtRefDocument AS DocNumber,
  AssignedDocuments.PrepaymentAgrmtRefDocItem AS DocumentItemNumber,
  AssignedDocuments.PrepaymentAgrmtRefBusObject AS SAPBusinessObjectTypeCode,
  AssignedDocuments.PrepaymentAgrmtLinkType AS PrepaymentAgrmtLinkType,
  cast( case when AssignedDocuments.PrepaymentAgreementCurrency <> $parameters.P_Currency then currency_conversion( amount => curr_to_decfloat_amount(AssignedDocuments.PrepaymentAgrmtLinkAmount), source_currency => AssignedDocuments.PrepaymentAgreementCurrency, target_currency => $parameters.P_Currency, exchange_rate_date => $parameters.P_Date, error_handling => 'SET_TO_NULL' ) when AssignedDocuments.PrepaymentAgreementCurrency = $parameters.P_Currency then curr_to_decfloat_amount(AssignedDocuments.PrepaymentAgrmtLinkAmount) else 0 end as abap.curr(23,2)) as PrepaymentAgrmtLinkAmount AS curr232asPrepaymentAgrmtLinkAmount,
  $parameters.P_Currency AS PrepaymentAgreementCurrency
FROM I_PrepaymentAssignedDocument AS AssignedDocuments
;