P_APLineItem_7
P_APLineItem_7 is a Basic CDS View in SAP S/4HANA. It reads from 1 data source (bsak_bck) and exposes 105 fields with key fields CompanyCode, Supplier, SpecialGLTransactionType, SpecialGLCode, ClearingDate. It has 2 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| bsak_bck | bsak_bck | from |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_CompanyCode | _CompanyCode | $projection.CompanyCode = _CompanyCode.CompanyCode |
| [0..1] | P_ARPCurRole | _AdditionalCompanyCurrency | $projection.CompanyCode = _AdditionalCompanyCurrency.CompanyCode |
Annotations (5)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PAPLINEITEM7 | view | |
| VDM.viewType | #BASIC | view | |
| VDM.private | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view |
Fields (105)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | bukrs | Value | |
| KEY | Supplier | lifnr | Vendor no. | |
| KEY | SpecialGLTransactionType | umsks | Transact.Type | |
| KEY | SpecialGLCode | umskz | Special G/L Ind | |
| KEY | ClearingDate | augdt | Clearing | |
| KEY | ClearingAccountingDocument | augbl | Clrng doc. | |
| KEY | AssignmentReference | zuonr | Finance Project | |
| KEY | FiscalYear | gjahr | Settlement Year | |
| KEY | AccountingDocument | belnr | SD Document | |
| KEY | AccountingDocumentItem | buzei | Posting View Item | |
| PostingDate | budat | Posting Date | ||
| DocumentDate | bldat | Journal Entry Date | ||
| ClearingDocFiscalYear | auggj | Clrg Fiscal Yr | ||
| TransactionCurrency | waers | Transaction Currency | ||
| AccountingDocumentType | blart | Rep. rec. doc. type | ||
| FiscalPeriod | ||||
| PostingKey | bschl | Posting Key | ||
| BusinessArea | gsber | Business Area | ||
| ProfitCenter | prctr | Profit Centers | ||
| CostCenter | kostl | Substitute CC | ||
| GLAccount | hkont | Transfer acct | ||
| Branch | filkd | Branch | ||
| AccountingDocumentCategory | bstat | Document Status | ||
| DocumentItemText | sgtxt | Text | ||
| IsNegativePosting | xnegp | Reversl Posting Type | ||
| PayableAlternativePayee | empfb | Payer | ||
| CreationDate | cpudt | Imported On | ||
| DocumentIsArchived | xarch | OrglChange archived | ||
| BalanceTransactionCurrency | pswsl | G/L Currency | ||
| curr232endasAmountInTransactionCurrency | Gross Amount | |||
| curr232endasAmountInCompanyCodeCurrency | Loc. amount | |||
| curr232endasAmountInAdditionalCurrency1 | LC2 Amount | |||
| curr232endasAmountInAdditionalCurrency2 | LC3 Amount | |||
| curr232endasValuationDiffAmtInCoCodeCrcy | Valuation Diff. | |||
| curr232endasValuationDiffAmtInAddlCrcy1 | Valuation Diff. 2 | |||
| curr232endasValuationDiffAmtInAddlCrcy2 | Valuation Diff. 3 | |||
| curr232endasAmountInBalanceTransacCrcy | G/L Amount | |||
| DocumentReferenceID | xblnr | Reference | ||
| OrderID | aufnr | SettlementOrder | ||
| MasterFixedAsset | anln1 | Asset | ||
| FixedAsset | anln2 | Sub-number | ||
| InvoiceReference | rebzg | Invoice Ref. | ||
| InvoiceList | samnr | Collect.Inv. | ||
| PartnerCompany | vbund | Trading Partner | ||
| FollowOnDocumentType | rebzt | Follow-On Doc. Type | ||
| StateCentralBankPaymentReason | lzbkz | SCB Ind. | ||
| SupplyingCountry | landl | Supply C/R | ||
| TreasuryContractType | vertt | Contract Type | ||
| AssetContract | vertn | Int. dist. key | ||
| CashFlowType | vbewa | Flow Type | ||
| WBSElement | projk | WBS Element | ||
| Reference1IDByBusinessPartner | xref1 | Reference Key 1 | ||
| Reference2IDByBusinessPartner | xref2 | Reference Key 2 | ||
| Reference3IDByBusinessPartner | xref3 | Third Reference | ||
| RealEstateObject | imkey | Real Estate Key | ||
| FundsCenter | fistl | Funds Center | ||
| BusinessPlace | bupla | Business place | ||
| PurchasingDocument | ebeln | Source PurchDoc | ||
| PurchasingDocumentItem | ebelp | Item pur. doc. | ||
| TaxCode | mwskz | Tax Code | ||
| TaxCountry | tax_country | Tax Ctry/Rgn | ||
| TaxSection | secco | Section Code | ||
| WithholdingTaxBaseAmount | qsshb | WTax Base | ||
| WithholdingTaxAmount | qbshb | Withholding Tax | ||
| WithholdingTaxExemptionAmt | qsfbt | WTax-Exempt | ||
| DueCalculationBaseDate | zfbdt | Payment date | ||
| PaymentTerms | zterm | Terms of Payment | ||
| CashDiscount1Days | zbd1t | Payment in | ||
| CashDiscount2Days | zbd2t | Payment in | ||
| NetPaymentDays | zbd3t | Payment in | ||
| CashDiscount1Percent | zbd1p | Max. Cash Dis. (%) | ||
| CashDiscount2Percent | zbd2p | Nrm. Cash Dis. (%) | ||
| PaymentMethod | zlsch | Pymt Meth. | ||
| PaymentBlockingReason | zlspr | Pymt Lock Rsn | ||
| FixedCashDiscount | zbfix | Fixed | ||
| curr232endasCashDiscountBaseAmount | Disc. base | |||
| curr232endasCashDiscountAmtInCoCodeCrcy | Discount Amt | |||
| curr232endasCashDiscountAmount | CD Amount | |||
| DunningBlockingReason | mansp | DunnLockReason | ||
| DunningKey | mschl | Dunning key | ||
| LastDunningDate | madat | Last Dunned | ||
| DunningLevel | manst | Dunning Level | ||
| DunningArea | maber | Dunning Area | ||
| IsUsedInPaymentTransaction | xzahl | Payt Tran. | ||
| PaymentDifferenceReason | rstgr | Reason Code | ||
| ClearingIsReversed | xragl | Reverse clrg | ||
| PaymentMethodSupplement | uzawe | Pmnt Meth. Sup. | ||
| SettlementReferenceDate | dabrz | Reference date | ||
| DataExchangeInstruction1 | dtws1 | Instruct. Key 1 | ||
| DataExchangeInstruction2 | dtws2 | Instruct. Key 2 | ||
| DataExchangeInstruction3 | dtws3 | Instruct. key 3 | ||
| DataExchangeInstruction4 | dtws4 | Instruct. key 4 | ||
| HasPaymentOrder | xpypr | Payment Sent | ||
| PaymentReference | kidno | Payment Ref. | ||
| PaymentCurrency | pycur | Paymnt Crcy | ||
| BPBankAccountInternalID | bvtyp | Part.bank type | ||
| curr232endasAmountInPaymentCurrency | Pt Crcy Amt | |||
| HouseBank | hbkid | House Bank | ||
| HouseBankAccount | hktid | House Bank Account | ||
| AccountingDocumentItemType | buzid | Line Item ID | ||
| ReferenceDocumentType | ||||
| OriginalReferenceDocument | ||||
| ReferenceDocumentLogicalSystem | ||||
| _AdditionalCompanyCurrency | _AdditionalCompanyCurrency | |||
| _CompanyCode | _CompanyCode |
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_APLineItem_7.
-- 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.
-- SQL view name: PAPLINEITEM7
CREATE VIEW P_APLineItem_7 AS
SELECT
bukrs AS CompanyCode,
lifnr AS Supplier,
umsks AS SpecialGLTransactionType,
umskz AS SpecialGLCode,
augdt AS ClearingDate,
augbl AS ClearingAccountingDocument,
zuonr AS AssignmentReference,
gjahr AS FiscalYear,
belnr AS AccountingDocument,
buzei AS AccountingDocumentItem,
budat AS PostingDate,
bldat AS DocumentDate,
auggj AS ClearingDocFiscalYear,
waers AS TransactionCurrency,
blart AS AccountingDocumentType,
cast( cast( concat( '0', monat ) as abap.numc( 3 ) ) as fins_fiscalperiod ) AS FiscalPeriod,
bschl AS PostingKey,
gsber AS BusinessArea,
prctr AS ProfitCenter,
kostl AS CostCenter,
hkont AS GLAccount,
filkd AS Branch,
bstat AS AccountingDocumentCategory,
sgtxt AS DocumentItemText,
xnegp AS IsNegativePosting,
empfb AS PayableAlternativePayee,
cpudt AS CreationDate,
xarch AS DocumentIsArchived,
pswsl AS BalanceTransactionCurrency,
case shkzg when 'H' then cast(-wrbtr as abap.curr(23,2)) else cast( wrbtr as abap.curr(23,2)) end as AmountInTransactionCurrency AS curr232endasAmountInTransactionCurrency,
case shkzg when 'H' then cast(-dmbtr as abap.curr(23,2)) else cast( dmbtr as abap.curr(23,2)) end as AmountInCompanyCodeCurrency AS curr232endasAmountInCompanyCodeCurrency,
case shkzg when 'H' then cast(-dmbe2 as abap.curr(23,2)) else cast( dmbe2 as abap.curr(23,2)) end as AmountInAdditionalCurrency1 AS curr232endasAmountInAdditionalCurrency1,
case shkzg when 'H' then cast(-dmbe3 as abap.curr(23,2)) else cast( dmbe3 as abap.curr(23,2)) end as AmountInAdditionalCurrency2 AS curr232endasAmountInAdditionalCurrency2,
case shkzg when 'H' then cast(-bdiff as abap.curr(23,2)) else cast( bdiff as abap.curr(23,2)) end as ValuationDiffAmtInCoCodeCrcy AS curr232endasValuationDiffAmtInCoCodeCrcy,
case shkzg when 'H' then cast(-bdif2 as abap.curr(23,2)) else cast( bdif2 as abap.curr(23,2)) end as ValuationDiffAmtInAddlCrcy1 AS curr232endasValuationDiffAmtInAddlCrcy1,
case shkzg when 'H' then cast(-bdif3 as abap.curr(23,2)) else cast( bdif3 as abap.curr(23,2)) end as ValuationDiffAmtInAddlCrcy2 AS curr232endasValuationDiffAmtInAddlCrcy2,
case shkzg when 'H' then cast(-pswbt as abap.curr(23,2)) else cast( pswbt as abap.curr(23,2)) end as AmountInBalanceTransacCrcy AS curr232endasAmountInBalanceTransacCrcy,
xblnr AS DocumentReferenceID,
aufnr AS OrderID,
anln1 AS MasterFixedAsset,
anln2 AS FixedAsset,
rebzg AS InvoiceReference,
samnr AS InvoiceList,
vbund AS PartnerCompany,
rebzt AS FollowOnDocumentType,
lzbkz AS StateCentralBankPaymentReason,
landl AS SupplyingCountry,
vertt AS TreasuryContractType,
vertn AS AssetContract,
vbewa AS CashFlowType,
projk AS WBSElement,
xref1 AS Reference1IDByBusinessPartner,
xref2 AS Reference2IDByBusinessPartner,
xref3 AS Reference3IDByBusinessPartner,
imkey AS RealEstateObject,
fistl AS FundsCenter,
bupla AS BusinessPlace,
ebeln AS PurchasingDocument,
ebelp AS PurchasingDocumentItem,
mwskz AS TaxCode,
tax_country AS TaxCountry,
secco AS TaxSection,
qsshb AS WithholdingTaxBaseAmount,
qbshb AS WithholdingTaxAmount,
qsfbt AS WithholdingTaxExemptionAmt,
zfbdt AS DueCalculationBaseDate,
zterm AS PaymentTerms,
zbd1t AS CashDiscount1Days,
zbd2t AS CashDiscount2Days,
zbd3t AS NetPaymentDays,
zbd1p AS CashDiscount1Percent,
zbd2p AS CashDiscount2Percent,
zlsch AS PaymentMethod,
zlspr AS PaymentBlockingReason,
zbfix AS FixedCashDiscount,
case shkzg when 'H' then cast(-skfbt as abap.curr(23,2)) else cast( skfbt as abap.curr(23,2)) end as CashDiscountBaseAmount AS curr232endasCashDiscountBaseAmount,
case shkzg when 'H' then cast(-sknto as abap.curr(23,2)) else cast( sknto as abap.curr(23,2)) end as CashDiscountAmtInCoCodeCrcy AS curr232endasCashDiscountAmtInCoCodeCrcy,
case shkzg when 'H' then cast(-wskto as abap.curr(23,2)) else cast( wskto as abap.curr(23,2)) end as CashDiscountAmount AS curr232endasCashDiscountAmount,
mansp AS DunningBlockingReason,
mschl AS DunningKey,
madat AS LastDunningDate,
manst AS DunningLevel,
maber AS DunningArea,
xzahl AS IsUsedInPaymentTransaction,
rstgr AS PaymentDifferenceReason,
xragl AS ClearingIsReversed,
uzawe AS PaymentMethodSupplement,
dabrz AS SettlementReferenceDate,
dtws1 AS DataExchangeInstruction1,
dtws2 AS DataExchangeInstruction2,
dtws3 AS DataExchangeInstruction3,
dtws4 AS DataExchangeInstruction4,
xpypr AS HasPaymentOrder,
kidno AS PaymentReference,
pycur AS PaymentCurrency,
bvtyp AS BPBankAccountInternalID,
case shkzg when 'H' then cast(-pyamt as abap.curr(23,2)) else cast( pyamt as abap.curr(23,2)) end as AmountInPaymentCurrency AS curr232endasAmountInPaymentCurrency,
hbkid AS HouseBank,
hktid AS HouseBankAccount,
buzid AS AccountingDocumentItemType,
cast( ' ' as fis_awtyp ) AS ReferenceDocumentType,
cast( ' ' as fac_awkey ) AS OriginalReferenceDocument,
cast( ' ' as fis_awsys ) AS ReferenceDocumentLogicalSystem
FROM bsak_bck
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode -- association [1..1]
LEFT OUTER JOIN P_ARPCurRole AS _AdditionalCompanyCurrency ON CompanyCode = _AdditionalCompanyCurrency.CompanyCode -- association [0..1]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- 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
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA