I_CADocumentUI is a Composite CDS View that provides data about "Document UI enhancements" in SAP S/4HANA. It reads from 1 data source (R_CADocumentTP) and exposes 55 fields with key field CADocumentNumber. It has 10 associations to related views.
@EndUserText.label: 'Document UI enhancements'
@AccessControl.authorizationCheck: #CHECK@AccessControl.personalData.blocking: #REQUIRED@ObjectModel.usageType.dataClass: #TRANSACTIONAL@ObjectModel.usageType.sizeCategory: #XXL@ObjectModel.usageType.serviceQuality: #C@ObjectModel.representativeKey: 'CADocumentNumber'
@VDM.viewType: #COMPOSITEdefineviewentity I_CADocumentUI
asselectfrom R_CADocumentTP
association [1..1] to P_CADocumentOpenAmountInTC as _OpenAmount on $projection.CADocumentNumber = _OpenAmount.CADocumentNumber
association [1..1] to P_CADocumentDueAmountInTC as _DueAmount on $projection.CADocumentNumber = _DueAmount.CADocumentNumber
association [1..1] to P_CADocumentClearedAmountInTC as _ClearedAmount on $projection.CADocumentNumber = _ClearedAmount.CADocumentNumber
association [0..1] to P_CADocumentBPItemCount as _DocBPItemCount on $projection.CADocumentNumber = _DocBPItemCount.CADocumentNumber
association [0..1] to P_CADocumentGLItemCount as _DocGLItemCount on $projection.CADocumentNumber = _DocGLItemCount.CADocumentNumber
association [0..1] to P_CADocumentPaytInfoPaymentLot as _PayInfoLot on $projection.CADocumentNumber = _PayInfoLot.CADocumentNumber and $projection.CADocumentOriginCode = '05'
association [0..1] to P_CADocumentPaytInfoPaymentRun as _PayInfoRun on $projection.CADocumentNumber = _PayInfoRun.CADocumentNumber and $projection.CADocumentOriginCode = '06'
association [0..1] to P_CADocumentPaytInfoReturn as _PayInfoReturn on $projection.CADocumentNumber = _PayInfoReturn.CAPaymentDocument and $projection.CADocumentOriginCode = '08'
association [0..1] to P_CADocumentPaytInfoPaytOrder as _PayInfoOrder on $projection.CADocumentNumber = _PayInfoOrder.CAPaymentDocument and $projection.CADocumentOriginCode = '45'
association [0..1] to P_CADocumentPaytInfoRpaytReq as _PayInfoRepayReq on $projection.CADocumentNumber = _PayInfoRepayReq.CAPaymentDocument and $projection.CADocumentOriginCode = '35'
{
key CADocumentNumber,
CADocumentOriginCode,
@Semantics.amount.currencyCode: 'TransactionCurrency'
_OpenAmount.CAOpenAmountInTransactionCrcy,
@Semantics.amount.currencyCode: 'TransactionCurrency'
_DueAmount.CADueAmountInTransactionCrcy,
@Semantics.amount.currencyCode: 'TransactionCurrency'
_ClearedAmount.CAClrdAmountInTransactionCrcy,
@ObjectModel.foreignKey.association: '_Currency'
TransactionCurrency,
_DocBPItemCount.NumberOfCADocumentBPItems,
_DocGLItemCount.NumberOfCADocumentGLItems,
//Payment Info Common fields
casewhen CADocumentOriginCode = '05' then _PayInfoLot._BkClrgAcct.HouseBank
when CADocumentOriginCode = '06' then _PayInfoRun.HouseBank
when CADocumentOriginCode = '08' then _PayInfoReturn.HouseBank
when CADocumentOriginCode = '45' then _PayInfoOrder.HouseBank
endas HouseBank,
casewhen CADocumentOriginCode = '05' then _PayInfoLot._BkClrgAcct.HouseBankAccount
when CADocumentOriginCode = '06' then _PayInfoRun.HouseBankAccount
when CADocumentOriginCode = '08' then _PayInfoReturn.HouseBankAccount
when CADocumentOriginCode = '45' then _PayInfoOrder.HouseBankAccount
endas HouseBankAccount,
casewhen CADocumentOriginCode = '06' then _PayInfoRun.CAMassRunDate
when CADocumentOriginCode = '45' then _PayInfoOrder.CAMassRunDate
endas CAMassRunDate,
casewhen CADocumentOriginCode = '06' then _PayInfoRun.CAMassRunID
when CADocumentOriginCode = '45' then _PayInfoOrder.CAMassRunID
endas CAMassRunID,
casewhen CADocumentOriginCode = '06' then _PayInfoRun.CAMassRunDateAndID
when CADocumentOriginCode = '45' then _PayInfoOrder.CAMassRunDateAndID
endas CAMassRunDateAndID,
casewhen CADocumentOriginCode = '35' then _PayInfoRepayReq.CAPaymentDocument
when CADocumentOriginCode = '45' then _PayInfoOrder.CAPaymentDocument
endas CAPaymentDocument,
casewhen CADocumentOriginCode = '06' then _PayInfoRun.CAPaymentMethod
when CADocumentOriginCode = '35' then _PayInfoRepayReq.CAPaymentMethod
when CADocumentOriginCode = '45' then _PayInfoOrder.CAPaymentMethod
endas CAPaymentMethod,
casewhen CADocumentOriginCode = '35' then _PayInfoRepayReq.CABankClearingAccount
when CADocumentOriginCode = '05' then _PayInfoLot.CABankClearingAccount
endas CABankClearingAccount,
casewhen CADocumentOriginCode = '35' then _PayInfoRepayReq.CompanyCode
when CADocumentOriginCode = '45' then _PayInfoOrder.CompanyCode
endas CompanyCode,
casewhen CADocumentOriginCode = '35' then _PayInfoRepayReq.CABankAccountHolderName
when CADocumentOriginCode = '05' then _PayInfoLot.CABankAccountHolderName
endas CABankAccountHolderName,
//Payment Info Payment Lot
_PayInfoLot.CAPaymentLot,
_PayInfoLot.CAPaymentLotItem,
_PayInfoLot.BankNumber,
_PayInfoLot.BankAccount,
_PayInfoLot.BankCountry,
_PayInfoLot.BankDetailReference,
_PayInfoLot.CANoteToPayeeInPayment,
//Payment Info Payment Run
_PayInfoRun.LastName,
_PayInfoRun.FirstName,
_PayInfoRun.CAPaymentDocumentReference,
//Payment Info Payment Order
_PayInfoOrder.CAPaymentOrder,
_PayInfoOrder.CAPaymentOrderExternalRef,
_PayInfoOrder.CAPaymentOrderStatus,
_PayInfoOrder.CANetAmountInTransCurrency,
_PayInfoOrder.PaidItemDueDate,
_PayInfoOrder.ValueDate,
_PayInfoOrder.CAPaymentOrderExpirationDate,
_PayInfoOrder.BusinessPartner,
//Payment Info Return
_PayInfoReturn.CAReturnLot,
_PayInfoReturn.CAItemNumberInReturnLot,
_PayInfoReturn.CAReturnReasonOfHouseBank,
_PayInfoReturn.CAReturnCharge1,
_PayInfoReturn.TaxCodeForFirstReturnCharge,
_PayInfoReturn.CATaxAmountForReturnCharge1,
_PayInfoReturn.CAChargeAmountFromBank1,
_PayInfoReturn.TaxCodeForFirstBankCharge,
_PayInfoReturn.CATaxAmountOfBankCharge1,
//Payment Info Repayment Request
_PayInfoRepayReq.CARepaymentRequest,
_PayInfoRepayReq.CAStatusOfRepaymentRequest,
_PayInfoRepayReq.CAAmountInTransactionCurrency,
_PayInfoRepayReq.CANetDueDate,
_PayInfoRepayReq.CAPaymentCompanyCode,
_PayInfoRepayReq.ProfitCenter,
_PayInfoRepayReq.CARepaymentRequestDocument,
_PayInfoRepayReq.CAPostingDate,
_PayInfoRepayReq.PayeeBankNumber,
_PayInfoRepayReq.PayeeBankCountry,
_PayInfoRepayReq.PayeeBankAccount,
_PayInfoRepayReq.PayeeIBAN,
_PayInfoRepayReq.PayeeSWIFTCode,
_Currency
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_CABANKCLEARINGACCOUNT",
"P_CADOCUMENTBPITEMCOUNT",
"P_CADOCUMENTCLEAREDAMOUNTINTC",
"P_CADOCUMENTDUEAMOUNTINTC",
"P_CADOCUMENTGLITEMCOUNT",
"P_CADOCUMENTOPENAMOUNTINTC",
"P_CADOCUMENTPAYTINFOPAYMENTLOT",
"P_CADOCUMENTPAYTINFOPAYMENTRUN",
"P_CADOCUMENTPAYTINFOPAYTORDER",
"P_CADOCUMENTPAYTINFORETURN",
"P_CADOCUMENTPAYTINFORPAYTREQ",
"R_CADOCUMENTTP"
],
"ASSOCIATED":
[
"I_CURRENCY"
],
"BASE":
[
"R_CADOCUMENTTP"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/