I_CAPAYMENTRUNHEADER
Kopfdaten des Zahlprogramms
I_CAPAYMENTRUNHEADER is a CDS View in S/4HANA. Kopfdaten des Zahlprogramms. 10 CDS views read from this table.
CDS Views using this table (10)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| C_CAPaymentRunSearch | view | from | CONSUMPTION | Zahlungen im Zahllauf suchen |
| I_CAPaymentRunDocumentVH | view | from | COMPOSITE | Document of Payment Run |
| I_CAReversalDocOfPaymentDocVH | view | from | COMPOSITE | Reversal Doc auf Payment Document |
| P_CADocumentPaytInfoPaymentRun | view_entity | from | COMPOSITE | Payment Info for Payment Run |
| P_CAPaymentGroupPre | view | from | CONSUMPTION | Company Code for Payment Group |
| P_CAPaymentListGLAccount | view | from | CONSUMPTION | |
| P_CAPaymentListGroup1 | view | from | CONSUMPTION | |
| P_CAPaymentListPayment | view | from | CONSUMPTION | |
| P_CAPaymentRunTotals | view | from | COMPOSITE | |
| P_CAPaymentSearch | view | union_all | CONSUMPTION |
@EndUserText.label: 'Kopfdaten des Zahlprogramms'
@VDM.viewType: #BASIC
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.authorizationCheck: #CHECK
@AbapCatalog.sqlViewName: 'ICAPAYTRUNHEADER'
define view I_CAPaymentRunHeader
as select from dpayh
association [0..1] to I_BusinessPartner as _BusinessPartner on $projection.BusinessPartner = _BusinessPartner.BusinessPartner
association [1..1] to I_CompanyCode as _PaymentCompCode on $projection.CAPaymentCompanyCode = _PaymentCompCode.CompanyCode
association [1..1] to I_CompanyCode as _CompCodeOfPaidItem on $projection.CACompanyCodeOfPaidItem = _CompCodeOfPaidItem.CompanyCode
association [0..1] to I_BusinessArea as _BusinessArea on $projection.CABusinessAreaInPaymentDoc = _BusinessArea.BusinessArea
association [0..1] to I_Country as _PayeeCountry on $projection.PayeeCountry = _PayeeCountry.Country
association [0..1] to I_Country as _PayeeBankCountry on $projection.PayeeBankCountry = _PayeeBankCountry.Country
association [0..1] to I_Country as _BankCountry on $projection.BankCountry = _BankCountry.Country
association [0..1] to I_Region as _Region on $projection.PayeeCountry = _Region.Country
and $projection.Region = _Region.Region
association [0..1] to I_Language as _PayeeLanguage on $projection.PayeeLanguage = _PayeeLanguage.Language
association [0..1] to I_Housebank as _HouseBank on $projection.CAPaymentCompanyCode = _HouseBank.CompanyCode
and $projection.HouseBank = _HouseBank.HouseBank
//association [0..1] to I_ChartOfAccounts as _ChartOfAccounts on $projection.chartofaccounts = _ChartOfAccounts.ChartOfAccounts
//association [1..1] to I_GLAccountInChartOfAccounts as _GLAccount on $projection.chartofaccounts = _GLAccount.ChartOfAccounts
// and $projection.GLAccountForBankAccount = _GLAccount.GLAccount
association [0..1] to I_ContractAccountPartner as _CAPartner on $projection.BusinessPartner = _CAPartner.BusinessPartner
and $projection.ContractAccount = _CAPartner.ContractAccount
association [1..1] to I_ContractAccountHeader as _CAHeader on $projection.ContractAccount = _CAHeader.ContractAccount
association [0..1] to I_CADocumentHeader as _DocHeader on $projection.CADocumentNumber = _DocHeader.CADocumentNumber
association [1..1] to I_Currency as _Currency on $projection.TransactionCurrency = _Currency.Currency
//association [0..1] to I_CAPaymentMethod as _PaymentMethod on $projection.Country = _PaytMethodIncg.Country
// and $projection.CAPaymentMethod = _PaytMethodIncg.CAPaymentMethod
{
key cast(laufd as laufd_kk preserving type ) as CAMassRunDate,
key cast(laufi as laufi_kk) as CAMassRunID,
key payno as CAIntPaymentIdentification,
key subno as CAIntAddlPaymentIdentification,
grpno as CAInternalPaymentGroup,
xavis as CAPaymentAdviceIsCreated,
@ObjectModel.foreignKey.association: '_PaymentCompCode'
cast(substring(org1r,1,4) as pybuk_kk preserving type ) as CAPaymentCompanyCode,
@ObjectModel.foreignKey.association: '_CompCodeOfPaidItem'
cast(substring(org2r,1,4) as bukrs preserving type ) as CACompanyCodeOfPaidItem,
@ObjectModel.foreignKey.association: '_BusinessPartner'
case gpa1t
// when '01' then cast(cast(substring(gpa1r,1,10) as abap.char(10)) as /scdl/dl_partyno)
when '01' then cast(substring(gpa1r,1,10) as bu_partner preserving type )
else ''
end as BusinessPartner,
//case gpa1t
// when '04' then cast(cast(substring(gpa1r,1,10) as abap.char(10)) as nrzaa_kk)
// else ''
//end as CARepaymentRequest,
cast(nrzaa as nrzaa_gfn_kk preserving type ) as CARepaymentRequest,
@ObjectModel.foreignKey.association: '_CAHeader'
cast(substring(acc1r,1,12) as vkont_gfn_kk preserving type ) as ContractAccount,
doc1t as CAPaymentDocumentType,
doc1r as CAPaymentDocumentReference,
@ObjectModel.foreignKey.association: '_DocHeader'
case doc1t
when '02' then cast(substring(doc1r,1,12) as opbel_gfn_kk preserving type )
else ''
end as CADocumentNumber,
case doc1t
when '05' then cast(substring(doc1r, 1, 10) as pyord_kk preserving type )
else ''
end as CAPaymentOrder,
case doc1t
when '06' then cast(substring(doc1r, 1, 16) as pnnum_kk preserving type )
else ''
end as CASEPAPreNotificationNumber,
// payer data (U = Unsere Daten)
@ObjectModel.foreignKey.association: '_BankCountry'
ubnks as BankCountry,
cast(ubnky as farp_bankk preserving type ) as BankInternalID,
cast(ubnkl as farp_ubnkl preserving type ) as BankNumber,
cast(ubknt as farp_ubknt preserving type ) as BankAccount,
cast(ubkon as bkont preserving type ) as BankControlKey,
//@ObjectModel.foreignKey.association: '_GLAccount'
ubhkt as GLAccountForBankAccount,
// payee data (Z = Zahlungsempfänger)
@ObjectModel.foreignKey.association: '_PayeeBankCountry'
cast(zbnks as farp_dzbnks preserving type ) as PayeeBankCountry,
cast(zbnky as farp_dzbnky preserving type ) as PayeeBank,
zbnkl as PayeeBankNumber,
cast(zbnkn as farp_dzbnkn preserving type ) as PayeeBankAccount,
zbkon as PayeeBankControlKey,
cast(ziban as iban preserving type ) as PayeeIBAN,
zbkrf as BankAccountReferenceText,
cast(zbkin as koinh_gfn_kk preserving type ) as CABankAccountHolderName,
zadnr as AddressID,
cast(znme1 as ad_namelas preserving type ) as LastName,
cast(znme2 as ad_namefir preserving type ) as FirstName,
@ObjectModel.foreignKey.association: '_PayeeLanguage'
cast(zspra as farp_dzspra preserving type ) as PayeeLanguage,
@ObjectModel.foreignKey.association: '_PayeeCountry'
cast(zland as dzland preserving type ) as PayeeCountry,
zregi as Region,
zort1 as CityName,
zort2 as District,
zortp as POBoxDeviatingCityName,
zpst1 as AddressPostalCode,
zpst2 as POBoxPostalCode,
zpst3 as CompanyPostalCode,
cast(zpfac as dzpfac preserving type ) as PayeePOBox,
zstra as AddressStreetName,
zstr1 as AddressHouseNumber,
zstr2 as ShipToPtyHouseNmbrSuplmntText,
ztel1 as AddressPhoneNumber,
ztel2 as PhoneNumberExtension,
zfax1 as AddressFaxNumber,
zfax2 as FaxNumberExtension,
cast(zswif as swift preserving type ) as SWIFTCode,
@ObjectModel.foreignKey.association: '_BusinessArea'
bgsbr as CABusinessAreaInPaymentDoc,
@ObjectModel.foreignKey.association: '_Currency'
cast(waers as fis_rwcur preserving type ) as TransactionCurrency,
// we cannot get the CompanyCodeCurrency, because of using _PaymentCompCode is not allowed because of cast(substring(org1r,1,4)... as CAPaymentCompanyCode
rbetr as PaytAmountInCoCodeCurrency,
@Semantics.amount.currencyCode: 'TransactionCurrency'
cast(rwbtr as farp_rwbtr) as PaidAmountInPaytCurrency,
cast(rskon as fis_sknto) as CashDiscountAmtInCoCodeCrcy,
@Semantics.amount.currencyCode: 'TransactionCurrency'
cast(rwskt as fis_wskto) as CashDiscountAmtInTransacCrcy,
zaldt as PaymentDocumentPostingDate,
@Semantics.amount.currencyCode: 'TransactionCurrency'
diffb as CADifferenceAmountInClrgProcg,
ausfd as PaidItemDueDate,
valut as ValueDate,
//@ObjectModel.foreignKey.association: '_PaymentMethod'
rzawe as CAPaymentMethod,
cast(rpost as farp_buzei_count preserving type ) as NumberOfPaidItems,
cast(rtext as farp_rtext_d preserving type ) as NumberOfTextLines,
pygrp as CAGroupingForPayment,
paygr as CAInternalGroupingForPayment,
eigbv as CAHouseBankReference,
cast(hbkid as farp_hbkid preserving type ) as HouseBank,
cast(hktid as fac_hktid preserving type ) as HouseBankAccount,
cast(dtaws as farp_dtaws preserving type ) as DataExchangeInstructionKey,
dtams as DataMediumExchangeIndicator,
ccins as PaymentCardType,
cast(ccnum as bu_ccnum preserving type) as CardNumber,
// Withholding Tax Data
@Semantics.amount.currencyCode: 'TransactionCurrency'
rqstw as CAWhldgTaxForCreditsInPaytCrcy,
rqsth as CAWhldgTaxForCreditsInLoclCrcy,
@Semantics.amount.currencyCode: 'TransactionCurrency'
rqsew as CAWhldgTaxForDebitsInPaytCrcy,
rqseh as CAWhldgTaxForDebitsInLoclCrcy,
oribd as CAOriginOfBPBankData,
pdkey as CAPaymentSpecification,
pdref as CAPaymentSpecificationRef,
ppkey as CAPromiseToPay,
prdat as CAPromisedPaymentDate,
cast(mguid as sepa_mguid preserving type ) as SEPAMandateUUID,
cguid as PaymentCardUUID,
enctp as EncryptionType,
pay_type as SEPAPaymentType,
seq_type as SEPASequenceType,
mndid as SEPAMandate,
b2b as SEPAMandateIsB2BMandate,
cast(inst_code as farp_inst_code preserving type ) as DirectDebitType,
//Added for Search Payments in Payment Runs App
avisg as PaymentAdvicePrintingReason,
//@ObjectModel.foreignKey.association: '_ChartOfAccounts'
// not allowed because of cast(cast(substring(org1r,1,4)... as CAPaymentCompanyCode
//_PaymentCompCode.ChartOfAccounts,
//_PaymentCompCode.Country,
// _association_name // Make association public
_BusinessPartner,
_PaymentCompCode,
_CompCodeOfPaidItem,
_BusinessArea,
_PayeeCountry,
_PayeeBankCountry,
_BankCountry,
_Region,
_PayeeLanguage,
_HouseBank,
_Currency,
//_ChartOfAccounts,
//_GLAccount,
_CAPartner,
_CAHeader,
_DocHeader
//_PaymentMethod,
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"DPAYH"
],
"ASSOCIATED":
[
"I_BUSINESSAREA",
"I_BUSINESSPARTNER",
"I_CADOCUMENTHEADER",
"I_COMPANYCODE",
"I_CONTRACTACCOUNTHEADER",
"I_CONTRACTACCOUNTPARTNER",
"I_COUNTRY",
"I_CURRENCY",
"I_HOUSEBANK",
"I_LANGUAGE",
"I_REGION"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/