P_HouseBankAccount
P_HouseBankAccount is a Basic CDS View in SAP S/4HANA. It reads from 4 data sources (fclm_bam_amd, I_BankAccountValidLinkage, fclm_bam_aclink2, t012k) and exposes 23 fields.
Data Sources (4)
| Source | Alias | Join Type |
|---|---|---|
| fclm_bam_amd | acc | inner |
| I_BankAccountValidLinkage | distinct_hba | from |
| fclm_bam_aclink2 | hba | inner |
| t012k | t012k | left_outer |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PHOUSEBANKACCT | view | |
| VDM.private | true | view | |
| VDM.viewType | #BASIC | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view |
Fields (23)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| mandt | fclm_bam_aclink2 | mandt | ||
| bukrs | I_BankAccountValidLinkage | CompanyCode | ||
| hbkid | I_BankAccountValidLinkage | HouseBank | ||
| hktid | I_BankAccountValidLinkage | HouseBankAccount | ||
| bankn | fclm_bam_aclink2 | bankn | ||
| bkont | fclm_bam_amd | control_key | ||
| waers | fclm_bam_amd | waers | ||
| refzl | fclm_bam_aclink2 | refzl | ||
| dtaai | fclm_bam_aclink2 | dtaai | ||
| bnkn2 | fclm_bam_aclink2 | bnkn2 | ||
| fdgrp | fclm_bam_aclink2 | fdgrp | ||
| abwae | fclm_bam_aclink2 | abwae | ||
| hkont | fclm_bam_aclink2 | hkont | ||
| wekon | fclm_bam_aclink2 | wekon | ||
| mindt | fclm_bam_aclink2 | mindt | ||
| hbid1 | fclm_bam_aclink2 | hbid1 | ||
| hkid1 | fclm_bam_aclink2 | hkid1 | ||
| hbid2 | fclm_bam_aclink2 | hbid2 | ||
| hkid2 | fclm_bam_aclink2 | hkid2 | ||
| wkkon | fclm_bam_aclink2 | wkkon | ||
| wikon | fclm_bam_aclink2 | wikon | ||
| acc_id | fclm_bam_aclink2 | acc_id | ||
| acc_num | fclm_bam_amd | acc_num |
@AbapCatalog.sqlViewName: 'PHOUSEBANKACCT'
@VDM.private: true
@VDM.viewType: #BASIC
@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata.ignorePropagatedAnnotations: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
define view P_HouseBankAccount
as select from I_BankAccountValidLinkage as distinct_hba
inner join fclm_bam_aclink2 as hba on hba.acc_id = distinct_hba.BankAccountInternalID
and hba.valid_to = distinct_hba.ValidityEndDate
and hba.bukrs = distinct_hba.CompanyCode
and hba.hbkid = distinct_hba.HouseBank
and hba.hktid = distinct_hba.HouseBankAccount
and hba.is_reused = ''
and hba.herku = ''
and hba.revision = '0000'
inner join fclm_bam_amd as acc on acc.acc_id = hba.acc_id
and acc.revision = '0000'
left outer join t012k as t012k on hba.bukrs = t012k.bukrs
and hba.hbkid = t012k.hbkid
and hba.hktid = t012k.hktid //Just join for extensibility
{
hba.mandt,
distinct_hba.CompanyCode as bukrs,
distinct_hba.HouseBank as hbkid,
distinct_hba.HouseBankAccount as hktid,
hba.bankn,
// case
// when hba.bkont is not null and hba.bkont <> '' then hba.bkont
// else acc.control_key
// end as bkont,
// obsolete ACLINK2-BKONT
acc.control_key as bkont,
@Semantics.currencyCode
// curr.waers,
acc.waers,
hba.refzl,
hba.dtaai,
hba.bnkn2,
hba.fdgrp,
@Semantics.currencyCode
hba.abwae,
hba.hkont,
hba.wekon,
hba.mindt,
hba.hbid1,
hba.hkid1,
hba.hbid2,
hba.hkid2,
hba.wkkon,
hba.wikon,
hba.acc_id,
hba.cash_pooling_flag,
hba.bank_account_auth_group,
hba.netting_group,
acc.acc_num
}
where
hba.herku = ''
and hba.hbkid <> ''
and hba.hktid <> ''
and(
acc.status = '02' //Active
or acc.status = '09' //Marked for Closing
or acc.status = '10' //To Be Closed
or acc.status = '11' //Closed at Bank
or acc.status = '15' //Closed in System
)
// and curr.deleted_flag = ''
and hba.is_reused = ''
and hba.revision = '0000'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BANKACCOUNTVALIDLINKAGE",
"FCLM_BAM_ACLINK2",
"FCLM_BAM_AMD",
"T012K"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA