P_ARBSITMCLRITEM01

DDL: P_ARBSITMCLRITEM01 SQL: PARBSITMCLRITEM1 Type: view BASIC

P_ARBSITMCLRITEM01 is a Basic CDS View in SAP S/4HANA. It reads from 4 data sources (bkpf, bseg, kna1, lfa1) and exposes 38 fields.

Data Sources (4)

SourceAliasJoin Type
bkpf bkpf from
bseg bseg inner
kna1 kna1 left_outer
lfa1 lfa1 left_outer

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName PARBSITMCLRITEM1 view
VDM.viewType #BASIC view
VDM.private true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.dataClass #MIXED view

Fields (38)

KeyFieldSource TableSource FieldDescription
CompanyCode bkpf bukrs
FiscalYear bkpf gjahr
AccountingDocument bkpf belnr
AccountingDocumentItem bseg buzei
AccountingDocumentType bkpf blart
PostingDate bkpf budat
DocumentReferenceID bkpf xblnr
AssignmentReference bseg zuonr
PaymentReference bseg kidno
BillingDocument bseg vbeln
ClearingDocFiscalYear
ClearingAccountingDocument bseg augbl
ClearingDate bseg augdt
CompanyCodeCurrency bkpf hwaer
TransactionCurrency bkpf waers
AmountInCompanyCodeCurrency bseg dmbtr
AmountInTransactionCurrency bseg wrbtr
TaxAmountInCoCodeCrcy bseg mwsts
TaxAmount bseg wmwst
CashDiscountAmtInCoCodeCrcy bseg sknto
CashDiscountAmount bseg wskto
DebitCreditCode bseg shkzg
DocumentItemText bseg sgtxt
FinancialAccountType bseg koart
InvoiceReference bseg rebzg
InvoiceReferenceFiscalYear bseg rebzj
InvoiceItemReference bseg rebzz
FollowOnDocumentType bseg rebzt
Debtor
OrganizationBPName1
OrganizationBPName2
OrganizationBPName3
OrganizationBPName4
CityName
Country
AccountingDocumentHeaderText
PartnerCompany bseg vbund
Client bseg mandt
@AbapCatalog.sqlViewName: 'PARBSITMCLRITEM1'
@VDM.viewType: #BASIC
@VDM.private:true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE 
@ObjectModel.usageType.sizeCategory: #XXL 
@ObjectModel.usageType.serviceQuality: #X
@ObjectModel.usageType.dataClass: #MIXED
define view P_ARBSITMCLRITEM01 as select from bkpf

    inner join bseg on  bseg.bukrs = bkpf.bukrs 
                    and bseg.belnr = bkpf.belnr 
                    and bseg.gjahr = bkpf.gjahr
                    and bseg.mandt = bkpf.mandt   
                    
    left outer join kna1 on bseg.kunnr = kna1.kunnr
                        and bseg.mandt = kna1.mandt
                        
    left outer join lfa1 on bseg.lifnr = lfa1.lifnr
                        and bseg.mandt = lfa1.mandt
{
    bkpf.bukrs as CompanyCode,
    bkpf.gjahr as FiscalYear,
    bkpf.belnr as AccountingDocument,
    bseg.buzei as AccountingDocumentItem,
    bkpf.blart as AccountingDocumentType,
    bkpf.budat as PostingDate,
    bkpf.xblnr as DocumentReferenceID,
    bseg.zuonr as AssignmentReference,
    bseg.kidno as PaymentReference,
    bseg.vbeln as BillingDocument,
    case when bseg.auggj is not null and bseg.auggj<>'0000' then bseg.auggj else substring(bseg.augdt, 1, 4) end as ClearingDocFiscalYear,
    bseg.augbl as ClearingAccountingDocument,
    bseg.augdt as ClearingDate,
    bkpf.hwaer as CompanyCodeCurrency,
    bkpf.waers as TransactionCurrency,
    @Semantics.amount.currencyCode: 'CompanyCodeCurrency'
    bseg.dmbtr as AmountInCompanyCodeCurrency,
    @Semantics.amount.currencyCode: 'TransactionCurrency'
    bseg.wrbtr as AmountInTransactionCurrency,
    bseg.mwsts as TaxAmountInCoCodeCrcy,
    bseg.wmwst as TaxAmount,
    bseg.sknto as CashDiscountAmtInCoCodeCrcy,
    bseg.wskto as CashDiscountAmount,
    bseg.shkzg as DebitCreditCode,
    bseg.sgtxt as DocumentItemText,
    bseg.koart as FinancialAccountType,
    bseg.rebzg as InvoiceReference,
    bseg.rebzj as InvoiceReferenceFiscalYear,
    bseg.rebzz as InvoiceItemReference,
    bseg.rebzt as FollowOnDocumentType,
    case when bseg.koart='K' then bseg.lifnr else bseg.kunnr end as Debtor,
    case when bseg.koart='K' then lfa1.name1 else kna1.name1 end as OrganizationBPName1,
    case when bseg.koart='K' then lfa1.name2 else kna1.name2 end as OrganizationBPName2,
    case when bseg.koart='K' then lfa1.name3 else kna1.name3 end as OrganizationBPName3,
    case when bseg.koart='K' then lfa1.name4 else kna1.name4 end as OrganizationBPName4,
    case when bseg.koart='K' then lfa1.ort01 else kna1.ort01 end as CityName,
    case when bseg.koart='K' then lfa1.land1 else kna1.land1 end as Country,
    substring(bkpf.bktxt, 1, 13) as AccountingDocumentHeaderText,
    bseg.vbund as PartnerCompany,
    bseg.mandt as Client
}
where bseg.augbl is not null 
and   bseg.augbl <> ''
and   bseg.koart <> 'S'