P_DirectDebitMandate

DDL: P_DIRECTDEBITMANDATE Type: view_entity TRANSACTIONAL Package: ODATA_FIN_DDM_MANDATE

Direct Debit Mandate Private

P_DirectDebitMandate is a Transactional CDS View that provides data about "Direct Debit Mandate Private" in SAP S/4HANA. It reads from 1 data source (I_SEPAMandateBasic) and exposes 100 fields with key field DirectDebitMandateUUID. It has 28 associations to related views. Part of development package ODATA_FIN_DDM_MANDATE.

Data Sources (1)

SourceAliasJoin Type
I_SEPAMandateBasic I_SEPAMandateBasic from

Associations (28)

CardinalityTargetAliasCondition
[1..1] I_SEPAApplication _Application $projection.MandateApplication = _Application.SEPAMandateApplication
[0..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode
[0..1] I_CompanyCode _PayingCompanyCode $projection.PayingCompanyCode = _PayingCompanyCode.CompanyCode
[0..1] I_CompanyCode _CAStandardCompanyCode $projection.CAStandardCompanyCode = _CAStandardCompanyCode.CompanyCode
[0..1] I_BusinessPartner _BusinessPartner $projection.BusinessPartner = _BusinessPartner.BusinessPartner
[0..1] I_Customer _Customer $projection.Customer = _Customer.Customer
[1..1] I_SEPAMandateStatus _SEPAMandateStatus $projection.MandateStatus = _SEPAMandateStatus.SEPAMandateStatus
[1..1] I_SEPAMandateStatusChgReason _MandateChangeReason $projection.MandateApplication = _MandateChangeReason.SEPAMandateApplication and $projection.MandateStatus = _MandateChangeReason.SEPAMandateStatus and $projection.MandateStatusChangeReason = _MandateChangeReason.SEPAMandateStatusChangeReason
[1..1] I_SEPAMandateStsChgRsnText _MandateChangeReasonText $projection.MandateApplication = _MandateChangeReasonText.SEPAMandateApplication and $projection.MandateStatus = _MandateChangeReasonText.SEPAMandateStatus and $projection.MandateStatusChangeReason = _MandateChangeReasonText.SEPAMandateStatusChangeReason and _MandateChangeReasonText.Language = $session.system_language
[0..*] I_ManageSEPASenderTypeText _SenderTypeText $projection.MandateSenderType = _SenderTypeText.SEPAMandateSenderType
[0..*] I_BusinessObjTypeText _ReferenceTypeText $projection.MandateReferenceType = _ReferenceTypeText.BusinessObjectType
[0..*] I_BusinessObjTypeText _RecipientTypeText $projection.MandateRecipientType = _RecipientTypeText.BusinessObjectType
[1..1] I_SEPAPaymentType _PaymentType $projection.MandatePaymentType = _PaymentType.SEPAPaymentType
[0..*] I_BusinessObjTypeText _FirstUseObjTypeText $projection.MandateFirstUseObjTypeCode = _FirstUseObjTypeText.BusinessObjectType
[0..*] I_BusinessObjTypeText _LastUseObjTypeText $projection.MandateLastUseObjTypeCode = _LastUseObjTypeText.BusinessObjectType
[1..1] I_User _CreatedByUser $projection.MandateCreatedByUser = _CreatedByUser.UserID
[1..1] I_User _OriglCreatedByUser $projection.IDOriginalMandateCreatedByUser = _OriglCreatedByUser.UserID
[0..1] I_CountryText _PayerBankCountryText _PayerBankCountryText.Country = $projection.BankCountry and _PayerBankCountryText.Language = $session.system_language
[0..1] I_CountryText _SenderCountryText _SenderCountryText.Country = $projection.SenderCountry and _SenderCountryText.Language = $session.system_language
[0..1] I_CountryText _PayerCountryText _PayerCountryText.Country = $projection.BankCountry and _PayerCountryText.Language = $session.system_language
[0..1] I_CountryText _RecipientCountryText _RecipientCountryText.Country = $projection.RecipientCountry and _RecipientCountryText.Language = $session.system_language
[0..1] I_ContractAccountHeader _ContractAccountHeader _ContractAccountHeader.ContractAccount = $projection.ContractAccount
[0..1] I_ContractAccountPartner _ContractAccountText _ContractAccountText.ContractAccount = $projection.ContractAccount and _ContractAccountText.BusinessPartner = $projection.BusinessPartner
[0..1] I_ProviderContract _ProviderContractText _ProviderContractText.ProviderContract = $projection.CAContract
[1..1] I_CASubApplication _CASubApplicationText _CASubApplicationText.CASubApplication = $projection.CASubApplication
[1..1] I_SEPAApplicationText _MandateApplicationText $projection.MandateApplication = _MandateApplicationText.SEPAMandateApplication and _MandateApplicationText.Language = $session.system_language
[1..1] I_SEPAPaymentTypeText _MandatePaymentTypeText $projection.MandatePaymentType = _MandatePaymentTypeText.SEPAPaymentType and _MandatePaymentTypeText.Language = $session.system_language
[1..1] I_SEPAMandateStatusText _SEPAMandateStatusText $projection.MandateStatus = _SEPAMandateStatusText.SEPAMandateStatus and _SEPAMandateStatusText.Language = $session.system_language

Annotations (9)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
AccessControl.personalData.blocking #REQUIRED view
EndUserText.label Direct Debit Mandate Private view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.sizeCategory #M view
ObjectModel.usageType.dataClass #MASTER view
VDM.viewType #TRANSACTIONAL view
VDM.private true view

Fields (100)

KeyFieldSource TableSource FieldDescription
KEY DirectDebitMandateUUID SEPAMandateUUID Mandate ID
DirectDebitMandate SEPAMandate SEPA Mandate
MandateVersion SEPAMandateVersion Meas.plan.vers.
MandateSignatureLocation SEPASignatureCityName Location
MandateSignatureDate SEPASignatureDate Signature
MandatePaymentType SEPAPaymentType Payment Type
MandateValidityDateStartDate ValidityStartDate Validity Start Date
MandateValidityEndDate ValidityEndDate ValidTo
MandateStatusName
MandateStatus SEPAMandateStatus Workflow Status
MandateIsB2BMandate SEPAMandateIsB2BMandate B2B Mandate
MandateStatusChangeReasonName
MandateStatusChangeReason SEPAMandateStatusChangeReason Return/Change Reason
MandateCreatedByUser User Name
MandateCreationDate SEPAMandateCreationDate Entered On
MandateCreationTime SEPAMandateCreationTime Time
DirectDebitMandateChangeReason SEPAMandateChangeReason ReasonForChange
OriginalMandateCreditor OriginalSEPAMandateCreditor Origin. Cred.
OriginalMandate OriginalSEPAMandate Orig. Mandate
MandateIsLocked SEPAMandateIsLocked Global Lock
MandateApplication SEPAMandateApplication Application
TemporaryMandateApplication SEPAMandateApplication Application
IDOriginalMandateCreatedByUser OriglSEPAMandateCreatedByUser Created (Orig)
OriglMandateCreationDate OriglSEPAMandateCreationDate Created On
OriglMandateCreationTime OriglSEPAMandateCreationTime Created At
MandateReferenceType SEPAMandateReferenceType SettlmtRefDocCat
MandateReference SEPAMandateReference Technical Object
MandateReferenceDesc SEPAMandateReferenceDesc Explanation
MandateSenderType SND/RCV type
MandateSender SEPAMandateSender ID of Sender
SenderLastName SenderLastName Last Name
SenderFirstName SenderFirstName First Name
SenderStreetName SenderStreetName Street
SenderHouseNumber SenderHouseNumber House Number
SenderPostalCode SenderPostalCode Postal Code
SenderCityName SenderCityName City
SenderCountry SenderCountry Country/Reg.
MandateSenderIBAN SEPAMandateSenderIBAN IBAN
MandateSenderBankSWIFTCode SEPAMandateSenderBankSWIFTCode SWIFT/BIC
SenderLanguage SenderLanguage Language
MandateAlternativeDebtor SEPAMandateAlternativePayer ID Alt. Debtor
MandateRecipientType SEPAMandateRecipientType Totals rec.type
MandateRecipient SEPAMandateRecipient Record ID
RecipientName1 RecipientName1 Name 1
RecipientName2 RecipientName2 Name 2
MandateCreditor SEPAMandateCreditor Creditor ID
RecipientStreetName RecipientStreetName Street
RecipientHouseNumber RecipientHouseNumber House Number
RecipientPostalCode RecipientPostalCode Postal Code
RecipientCityName RecipientCityName City
RecipientCountry RecipientCountry Country/Reg.
MandateAlternativePayeeName SEPAMandateAlternativePyeName Name Alt. Payee
MandateAlternativePayee SEPAMandateAlternativePayee ID Alt. Payee
MandateFirstUseDate SEPAMandateFirstUseDate Date
MandateFirstUseObjTypeCode SEPAMandateFirstUseObjTypeCode Type of First Usage
MandateFirstUseInPaymentDoc SEPAMandateFirstUsePaymentDoc Key
MandateLastUseDate SEPAMandateLastUseDate Date
MandateLastUseObjTypeCode SEPAMandateLastUseObjTypeCode Type of Last Usage
MandateLastUseInPaymentDoc SEPAMandateLastUsePaymentDoc ID of Last Usage
MandateFirstUsePaymentRun SEPAMandateFirstUsePaymentRun First Payment Run
MandateOrganizationalUnit1 SEPAMandateOrganizationalUnit1 Organization ID
MandateOrganizationalUnit2 SEPAMandateOrganizationalUnit2 Organization ID
MandateOrganizationalUnit3 SEPAMandateOrganizationalUnit3 Organization
MandateOrganizationalUnit4 SEPAMandateOrganizationalUnit4 Organization
SenderCountryOrRegion SenderCountryOrRegion Country/Reg.
MandateDirectDebitProcedure MandateDirectDebitProcedure DD Procedure
BankCountry BankCountry Bank Ctry/Rgn. Key
PayingBankKey PayingBankKey Bank Key
BankAccount BankAccount Bank acct
BankControlKey BankControlKey Control Key
ReferenceBankDetails ReferenceBankDetails Reference
ShortKeyHouseBank ShortKeyHouseBank House Bank
AccountDetails AccountDetails Account ID
_Application _Application
_CompanyCode _CompanyCode
_PayingCompanyCode _PayingCompanyCode
_BusinessPartner _BusinessPartner
_Customer _Customer
_CreatedByUser _CreatedByUser
_SEPAMandateStatus _SEPAMandateStatus
_OriglCreatedByUser _OriglCreatedByUser
_LastUseObjTypeText _LastUseObjTypeText
_FirstUseObjTypeText _FirstUseObjTypeText
_MandateChangeReason _MandateChangeReason
_PaymentType _PaymentType
_SenderTypeText _SenderTypeText
_RecipientTypeText _RecipientTypeText
_ReferenceTypeText _ReferenceTypeText
_SenderCountryText _SenderCountryText
_PayerCountryText _PayerCountryText
_RecipientCountryText _RecipientCountryText
_ContractAccountHeader _ContractAccountHeader
_ContractAccountText _ContractAccountText
_ProviderContractText _ProviderContractText
_CASubApplicationText _CASubApplicationText
_PayerBankCountryText _PayerBankCountryText
_MandateApplicationText _MandateApplicationText
_MandatePaymentTypeText _MandatePaymentTypeText
_SEPAMandateStatusText _SEPAMandateStatusText
_MandateChangeReasonText _MandateChangeReasonText

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 P_DirectDebitMandate.
-- 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.

CREATE VIEW P_DirectDebitMandate AS
SELECT
  SEPAMandateUUID AS DirectDebitMandateUUID,
  SEPAMandate AS DirectDebitMandate,
  SEPAMandateVersion AS MandateVersion,
  SEPASignatureCityName AS MandateSignatureLocation,
  SEPASignatureDate AS MandateSignatureDate,
  SEPAPaymentType AS MandatePaymentType,
  ValidityStartDate AS MandateValidityDateStartDate,
  ValidityEndDate AS MandateValidityEndDate,
  _SEPAMandateStatus._Text[1:Language =$session.system_language].SEPAMandateStatusName AS MandateStatusName,
  SEPAMandateStatus AS MandateStatus,
  SEPAMandateIsB2BMandate AS MandateIsB2BMandate,
  _MandateChangeReason._Text[1:Language =$session.system_language].SEPAMandateStsChangeReasonName AS MandateStatusChangeReasonName,
  SEPAMandateStatusChangeReason AS MandateStatusChangeReason,
  cast(SEPAMandateCreatedByUser as sepa_cds_ernam preserving type) AS MandateCreatedByUser,
  SEPAMandateCreationDate AS MandateCreationDate,
  SEPAMandateCreationTime AS MandateCreationTime,
  SEPAMandateChangeReason AS DirectDebitMandateChangeReason,
  OriginalSEPAMandateCreditor AS OriginalMandateCreditor,
  OriginalSEPAMandate AS OriginalMandate,
  SEPAMandateIsLocked AS MandateIsLocked,
  SEPAMandateApplication AS MandateApplication,
  SEPAMandateApplication AS TemporaryMandateApplication,
  OriglSEPAMandateCreatedByUser AS IDOriginalMandateCreatedByUser,
  OriglSEPAMandateCreationDate AS OriglMandateCreationDate,
  OriglSEPAMandateCreationTime AS OriglMandateCreationTime,
  SEPAMandateReferenceType AS MandateReferenceType,
  SEPAMandateReference AS MandateReference,
  SEPAMandateReferenceDesc AS MandateReferenceDesc,
  cast( SEPAMandateSenderType as sepa_cds_snd_type preserving type ) AS MandateSenderType,
  SEPAMandateSender AS MandateSender,
  SenderLastName,
  SenderFirstName,
  SenderStreetName,
  SenderHouseNumber,
  SenderPostalCode,
  SenderCityName,
  SenderCountry,
  SEPAMandateSenderIBAN AS MandateSenderIBAN,
  SEPAMandateSenderBankSWIFTCode AS MandateSenderBankSWIFTCode,
  SenderLanguage,
  SEPAMandateAlternativePayer AS MandateAlternativeDebtor,
  SEPAMandateRecipientType AS MandateRecipientType,
  SEPAMandateRecipient AS MandateRecipient,
  RecipientName1,
  RecipientName2,
  SEPAMandateCreditor AS MandateCreditor,
  RecipientStreetName,
  RecipientHouseNumber,
  RecipientPostalCode,
  RecipientCityName,
  RecipientCountry,
  SEPAMandateAlternativePyeName AS MandateAlternativePayeeName,
  SEPAMandateAlternativePayee AS MandateAlternativePayee,
  SEPAMandateFirstUseDate AS MandateFirstUseDate,
  SEPAMandateFirstUseObjTypeCode AS MandateFirstUseObjTypeCode,
  SEPAMandateFirstUsePaymentDoc AS MandateFirstUseInPaymentDoc,
  SEPAMandateLastUseDate AS MandateLastUseDate,
  SEPAMandateLastUseObjTypeCode AS MandateLastUseObjTypeCode,
  SEPAMandateLastUsePaymentDoc AS MandateLastUseInPaymentDoc,
  SEPAMandateFirstUsePaymentRun AS MandateFirstUsePaymentRun,
  SEPAMandateOrganizationalUnit1 AS MandateOrganizationalUnit1,
  SEPAMandateOrganizationalUnit2 AS MandateOrganizationalUnit2,
  SEPAMandateOrganizationalUnit3 AS MandateOrganizationalUnit3,
  SEPAMandateOrganizationalUnit4 AS MandateOrganizationalUnit4,
  SenderCountryOrRegion,
  MandateDirectDebitProcedure,
  BankCountry,
  PayingBankKey,
  BankAccount,
  BankControlKey,
  ReferenceBankDetails,
  ShortKeyHouseBank,
  AccountDetails
FROM I_SEPAMandateBasic
LEFT OUTER JOIN I_SEPAApplication AS _Application ON MandateApplication = _Application.SEPAMandateApplication  -- association [1..1]
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_CompanyCode AS _PayingCompanyCode ON PayingCompanyCode = _PayingCompanyCode.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_CompanyCode AS _CAStandardCompanyCode ON CAStandardCompanyCode = _CAStandardCompanyCode.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_BusinessPartner AS _BusinessPartner ON BusinessPartner = _BusinessPartner.BusinessPartner  -- association [0..1]
LEFT OUTER JOIN I_Customer AS _Customer ON Customer = _Customer.Customer  -- association [0..1]
LEFT OUTER JOIN I_SEPAMandateStatus AS _SEPAMandateStatus ON MandateStatus = _SEPAMandateStatus.SEPAMandateStatus  -- association [1..1]
LEFT OUTER JOIN I_SEPAMandateStatusChgReason AS _MandateChangeReason ON MandateApplication = _MandateChangeReason.SEPAMandateApplication AND MandateStatus = _MandateChangeReason.SEPAMandateStatus AND MandateStatusChangeReason = _MandateChangeReason.SEPAMandateStatusChangeReason  -- association [1..1]
LEFT OUTER JOIN I_SEPAMandateStsChgRsnText AS _MandateChangeReasonText ON MandateApplication = _MandateChangeReasonText.SEPAMandateApplication AND MandateStatus = _MandateChangeReasonText.SEPAMandateStatus AND MandateStatusChangeReason = _MandateChangeReasonText.SEPAMandateStatusChangeReason AND _MandateChangeReasonText.Language = $session.system_language  -- association [1..1]
LEFT OUTER JOIN I_ManageSEPASenderTypeText AS _SenderTypeText ON MandateSenderType = _SenderTypeText.SEPAMandateSenderType  -- association [0..*]
LEFT OUTER JOIN I_BusinessObjTypeText AS _ReferenceTypeText ON MandateReferenceType = _ReferenceTypeText.BusinessObjectType  -- association [0..*]
LEFT OUTER JOIN I_BusinessObjTypeText AS _RecipientTypeText ON MandateRecipientType = _RecipientTypeText.BusinessObjectType  -- association [0..*]
LEFT OUTER JOIN I_SEPAPaymentType AS _PaymentType ON MandatePaymentType = _PaymentType.SEPAPaymentType  -- association [1..1]
LEFT OUTER JOIN I_BusinessObjTypeText AS _FirstUseObjTypeText ON MandateFirstUseObjTypeCode = _FirstUseObjTypeText.BusinessObjectType  -- association [0..*]
LEFT OUTER JOIN I_BusinessObjTypeText AS _LastUseObjTypeText ON MandateLastUseObjTypeCode = _LastUseObjTypeText.BusinessObjectType  -- association [0..*]
LEFT OUTER JOIN I_User AS _CreatedByUser ON MandateCreatedByUser = _CreatedByUser.UserID  -- association [1..1]
LEFT OUTER JOIN I_User AS _OriglCreatedByUser ON IDOriginalMandateCreatedByUser = _OriglCreatedByUser.UserID  -- association [1..1]
LEFT OUTER JOIN I_CountryText AS _PayerBankCountryText ON _PayerBankCountryText.Country = BankCountry AND _PayerBankCountryText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_CountryText AS _SenderCountryText ON _SenderCountryText.Country = SenderCountry AND _SenderCountryText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_CountryText AS _PayerCountryText ON _PayerCountryText.Country = BankCountry AND _PayerCountryText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_CountryText AS _RecipientCountryText ON _RecipientCountryText.Country = RecipientCountry AND _RecipientCountryText.Language = $session.system_language  -- association [0..1]
LEFT OUTER JOIN I_ContractAccountHeader AS _ContractAccountHeader ON _ContractAccountHeader.ContractAccount = ContractAccount  -- association [0..1]
LEFT OUTER JOIN I_ContractAccountPartner AS _ContractAccountText ON _ContractAccountText.ContractAccount = ContractAccount AND _ContractAccountText.BusinessPartner = BusinessPartner  -- association [0..1]
LEFT OUTER JOIN I_ProviderContract AS _ProviderContractText ON _ProviderContractText.ProviderContract = CAContract  -- association [0..1]
LEFT OUTER JOIN I_CASubApplication AS _CASubApplicationText ON _CASubApplicationText.CASubApplication = CASubApplication  -- association [1..1]
LEFT OUTER JOIN I_SEPAApplicationText AS _MandateApplicationText ON MandateApplication = _MandateApplicationText.SEPAMandateApplication AND _MandateApplicationText.Language = $session.system_language  -- association [1..1]
LEFT OUTER JOIN I_SEPAPaymentTypeText AS _MandatePaymentTypeText ON MandatePaymentType = _MandatePaymentTypeText.SEPAPaymentType AND _MandatePaymentTypeText.Language = $session.system_language  -- association [1..1]
LEFT OUTER JOIN I_SEPAMandateStatusText AS _SEPAMandateStatusText ON MandateStatus = _SEPAMandateStatusText.SEPAMandateStatus AND _SEPAMandateStatusText.Language = $session.system_language  -- association [1..1]
;