P_APLineItem_0

DDL: P_APLINEITEM_0 SQL: PAPLINEITEM0 Type: view COMPOSITE

P_APLineItem_0 is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (P_APLineItem_1) and exposes 205 fields with key fields CompanyCode, AccountingDocument, FiscalYear, AccountingDocumentItem. It has 2 associations to related views.

Data Sources (1)

SourceAliasJoin Type
P_APLineItem_1 P_APLineItem_1 from

Parameters (3)

NameTypeDefault
P_KeyDate vdm_v_key_date
P_TodayDate abap.dats
P_Language sylangu

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_TH_SupplierBranchCodeVH _TH_SupplierBranchCodeVH $projection.Supplier = _TH_SupplierBranchCodeVH.Supplier and $projection.BranchCode = _TH_SupplierBranchCodeVH.BranchCode
[0..1] I_ReferenceDocumentTypeText _ReferenceDocumentTypeText _ReferenceDocumentTypeText.ReferenceDocumentType = $projection.ReferenceDocumentType and _ReferenceDocumentTypeText.Language = $session.system_language

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName PAPLINEITEM0 view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
VDM.viewType #COMPOSITE view
VDM.private true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (205)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode CompanyCode Receiver Company Code
KEY AccountingDocument AccountingDocument Journal Entry
KEY FiscalYear FiscalYear G/L Fiscal Year
KEY AccountingDocumentItem AccountingDocumentItem Posting View Item
KEYDT2 P_APLineItem_1 KEYDT2
PaymentDifferenceReason PaymentDifferenceReason Reason Code
Customer Customer Sold-to Party
ClearingDate ClearingDate Clearing Date
ClearingDocFiscalYear ClearingDocFiscalYear Fiscal Year of Clearing Journal Entry
ClearingAccountingDocument ClearingAccountingDocument Clearing Journal Entry
PostingKey PostingKey Posting Key
FinancialAccountType FinancialAccountType Fin. Account Type
SpecialGLCode SpecialGLCode Special G/L Ind
SpecialGLTransactionType SpecialGLTransactionType Transact.Type
DebitCreditCode DebitCreditCode Single-Character Flag
BusinessArea BusinessArea Business Area
TaxCode TaxCode Tax Code
TaxCountry TaxCountry Tax Ctry/Reg.
TaxReportingDate TaxReportingDate Tax Reporting Date
AmountInCompanyCodeCurrency AmountInCompanyCodeCurrency Local Crcy Amt
AmountInTransactionCurrency AmountInTransactionCurrency Pt Crcy Amt
AmountInBalanceTransacCrcy AmountInBalanceTransacCrcy Amount in Balance Transaction Currency
BalanceTransactionCurrency BalanceTransactionCurrency Currency
WithholdingTaxBaseAmount WithholdingTaxBaseAmount WTax Base Amt
ValuationDiffAmtInCoCodeCrcy ValuationDiffAmtInCoCodeCrcy
ValuationDiffAmtInAddlCrcy1 ValuationDiffAmtInAddlCrcy1
ValueDate ValueDate Value Date
AssignmentReference AssignmentReference Assignment Reference
DocumentItemText DocumentItemText Text
PartnerCompany PartnerCompany Trading Partner
CostCenter CostCenter Cost Center
OrderID OrderID Order ID
BillingDocument BillingDocument SD Document
SalesDocument SalesDocument SD Document
SalesDocumentItem SalesDocumentItem Sales Document Item
ScheduleLine ScheduleLine Schedule Line
MasterFixedAsset MasterFixedAsset Fixed Asset
FixedAsset FixedAsset Sub-number
IsUsedInPaymentTransaction IsUsedInPaymentTransaction Is Used In Payment Transaction
GLAccount GLAccount General Ledger
Branch Branch Repository branch
DueCalculationBaseDate DueCalculationBaseDate Due Calculation Base Date
PaymentTerms PaymentTerms Pyt Terms
CashDiscount1Days CashDiscount1Days Days from Baseline Date for Payment
CashDiscount2Days CashDiscount2Days Days from Baseline Date for Payment
NetPaymentDays NetPaymentDays Net Pmt Terms Period
CashDiscount1Percent CashDiscount1Percent Disc. Percent 1
CashDiscount2Percent CashDiscount2Percent Disc. Percent 2
CashDiscountBaseAmount CashDiscountBaseAmount Cash Dscnt Base Amt
CashDiscountAmtInCoCodeCrcy CashDiscountAmtInCoCodeCrcy Discount Amt
CashDiscountAmount CashDiscountAmount CD Amount
PaymentMethod PaymentMethod Pymt Meth.
PaymentBlockingReason PaymentBlockingReason Pmnt block
FixedCashDiscount FixedCashDiscount Fixed Cash Discount
FollowOnDocumentType FollowOnDocumentType Follow-On Document Type
StateCentralBankPaymentReason StateCentralBankPaymentReason SCB Ind.
SupplyingCountry SupplyingCountry Supplying Ctry/Reg.
InvoiceList InvoiceList Invoice List
BillOfExchangeUsage BillOfExchangeUsage BoE Usage
DunningKey DunningKey Dunning Key
DunningBlockingReason DunningBlockingReason Set Dunning Block
LastDunningDate LastDunningDate Last Dunned
DunningLevel DunningLevel Dunning Level
DunningArea DunningArea Dunning Area
WithholdingTaxAmount WithholdingTaxAmount Withholding Tax Amt
WithholdingTaxExemptionAmt WithholdingTaxExemptionAmt WTax-Exempt
Plant Plant Valuation Area
PurchasingDocument PurchasingDocument Purchasing Document
PurchasingDocumentItem PurchasingDocumentItem Purchasing Doc. Item
ProfitCenter ProfitCenter Profit Center
TreasuryContractType TreasuryContractType Treasury Contract Type
AssetContract AssetContract Asset Contract
CashFlowType CashFlowType Flow Type
WBSElement WBSElement WBS Internal ID
AlternativeGLAccount AlternativeGLAccount Group Account
AmountInAdditionalCurrency1 AmountInAdditionalCurrency1 Amount in Additional Currency 1
AmountInAdditionalCurrency2 AmountInAdditionalCurrency2 LC2 Amount
AmountInFunctionalCurrency AmountInFunctionalCurrency Amount in Functional Currency
ValuationDiffAmtInAddlCrcy2 ValuationDiffAmtInAddlCrcy2
ClearingIsReversed ClearingIsReversed Clearing Is Reversed
PaymentMethodSupplement PaymentMethodSupplement Pmnt Meth. Sup.
Reference1IDByBusinessPartner Reference1IDByBusinessPartner Reference Key 1
Reference2IDByBusinessPartner Reference2IDByBusinessPartner Reference Key 2
PaymentCardItem PaymentCardItem Payment Card Item
PaymentCardPaymentSettlement PaymentCardPaymentSettlement Payment Card Payment Settlement
Reference3IDByBusinessPartner Reference3IDByBusinessPartner Reference Key 3
DataExchangeInstruction1 DataExchangeInstruction1 Instruction 1
DataExchangeInstruction2 DataExchangeInstruction2 Instruction 2
DataExchangeInstruction3 DataExchangeInstruction3 Instruction 3
DataExchangeInstruction4 DataExchangeInstruction4 Instruction 4
HasPaymentOrder HasPaymentOrder Payment Sent
PaymentReference PaymentReference Payment Reference
HedgedAmount HedgedAmount
PaymentCurrency PaymentCurrency Payment Currency
AmountInPaymentCurrency AmountInPaymentCurrency Amount in Payment Currency
BusinessPlace BusinessPlace Business place
TaxSection TaxSection Tax Section
AccountsReceivableIsPledged AccountsReceivableIsPledged Accounts Receivable Is Pledged
RealEstateObject RealEstateObject Real Estate Key
FundsCenter FundsCenter Funds Center
SettlementReferenceDate SettlementReferenceDate Reference date
IsSalesRelated IsSalesRelated Is Sales Related
PostingDate PostingDate Posting Date for GR
AccountingDocumentCategory AccountingDocumentCategory Journal Entry Category
FiscalPeriod FiscalPeriod Tax period
DocumentDate DocumentDate Journal Entry Date
AccountingDocumentType AccountingDocumentType Journal Entry Type
TransactionCurrency TransactionCurrency Transaction Currency
PlannedAmtInTransactionCrcy PlannedAmtInTransactionCrcy Plnd Amt Trans. Crcy
NetDueDate NetDueDate Net Due Date
CashDiscount1DueDate CashDiscount1DueDate Cash Discount 1
SourceCompanyCode SourceCompanyCode
DocumentReferenceID DocumentReferenceID Reference
AccountingDocumentCreationDate AccountingDocumentCreationDate Journal Entry Date
AccountingDocCreatedByUser AccountingDocCreatedByUser User which created overhead document
AdditionalCurrency1 AdditionalCurrency1 Local curr. 2
AdditionalCurrency2 AdditionalCurrency2 Local curr. 3
FunctionalCurrency FunctionalCurrency Functional Currency
OffsettingAccount OffsettingAccount Offsetting Acct
OffsettingAccountType OffsettingAccountType Offset Acct Type
ITEM_TYPE_BRANCH ITEM_TYPE_BRANCH
DPNOTDUE DPNOTDUE
Supplier Supplier Supplier
SupplierIndustry SupplierIndustry Industry Sector
SupplierCreationDate SupplierCreationDate Time Stamp
SupplierAccountGroup SupplierAccountGroup Account group
SupplierSearchText SupplierSearchText Sort Field
SupplierTaxID1 SupplierTaxID1 VAT Reg. No.
SupplierTaxID2 SupplierTaxID2 Tax Number 2
SupplierTaxID3 SupplierTaxID3
SupplierTaxID4 SupplierTaxID4
SupplierTaxID5 SupplierTaxID5
SupplierIsOneTimeAccount SupplierIsOneTimeAccount One-time acct
SupplierVATRegistration SupplierVATRegistration VAT Registration No.
SupplierTaxJurisdiction SupplierTaxJurisdiction Tax Jurisdiction
SupplierBasicAuthorizationGrp SupplierBasicAuthorizationGrp AuthorizGroup
SupplierFinsAuthorizationGrp SupplierFinsAuthorizationGrp AuthorizGroup
AlternativePayeeIsAllowed AlternativePayeeIsAllowed Payee in doc.
PostingIsBlockedForSupplier PostingIsBlockedForSupplier Posting Block
SupplierCorporateGroup SupplierCorporateGroup Group
SupplierCountry SupplierCountry
SupplierName SupplierName Supplier Name
SupplierCityName SupplierCityName Supplier City
SupplierPOBox SupplierPOBox
SupplierPOBoxPostalCode SupplierPOBoxPostalCode
SupplierPostalCode SupplierPostalCode Arrival Postal Code
SupplierRegion SupplierRegion
SupplierCreatedByUser SupplierCreatedByUser User Name
AccountingClerk AccountingClerk Clerk Abbrev.
ReconciliationAccount ReconciliationAccount Recon. account
InterestCalculationCode InterestCalculationCode Interest Indic.
SupplierHeadOffice SupplierHeadOffice Head Office
SupplierPaymentBlockingReason SupplierPaymentBlockingReason Pmnt block
InterestCalculationDate InterestCalculationDate Last Key Date
IntrstCalcFrequencyInMonths IntrstCalcFrequencyInMonths Int.Calc.Freq.
APARToleranceGroup APARToleranceGroup Tolerance Group
HouseBank HouseBank House Bank
HouseBankAccount HouseBankAccount House Bank Account
ItemIsToBePaidSeparately ItemIsToBePaidSeparately Individual Payt
PaymentIsToBeSentByEDI PaymentIsToBeSentByEDI Pmt adv. by EDI
SupplierAccountNote SupplierAccountNote Account Memo
CompanyCodeCurrency CompanyCodeCurrency Local Currency
CompanyCodeName CompanyCodeName Company Name
IsDisputed IsDisputed
CustomerSupplierAccount CustomerSupplierAccount
InvoiceReference InvoiceReference Invoice Reference
FiscalYearPeriod FiscalYearPeriod Period/Year
IsCleared IsCleared Integer
PayableAlternativePayee PayableAlternativePayee
CreditControlArea CreditControlArea Credit Control Area
ValuatedAmtInCompanyCodeCrcy ValuatedAmtInCompanyCodeCrcy
ValuatedAmtInAdditionalCrcy1 ValuatedAmtInAdditionalCrcy1
ValuatedAmtInAdditionalCrcy2 ValuatedAmtInAdditionalCrcy2
DueItemType DueItemType
DocumentIsArchived DocumentIsArchived
TargetTaxCode TargetTaxCode
AlternativePayee AlternativePayee Alternat.payee
KeyDate KeyDate Maturity Key Date
AcctgDocTypeAuthorizationGroup AcctgDocTypeAuthorizationGroup
BPBankAccountInternalID BPBankAccountInternalID BP Bank Account
SupplierIndustryName _IndustryName brtxt Industry Key
SupplierRegionName _RegionText RegionName Description
InterestToBePosted
Debtor Debtor Debtor
AdditionalCurrency1Role AdditionalCurrency1Role LC2 Crcy Type
AdditionalCurrency2Role AdditionalCurrency2Role LC3 Crcy Type
BranchCode BranchCode Branch Code
ReferenceDocumentType ReferenceDocumentType Reference Document Type
OriginalReferenceDocument OriginalReferenceDocument Reference Key
ReferenceDocumentLogicalSystem ReferenceDocumentLogicalSystem Ref. Doc. Lgcl Syst.
PaymentReason PaymentReason Payment Reason
BillOfExchangeUsageDocument BillOfExchangeUsageDocument
BOEUsageDocFiscalYear BOEUsageDocFiscalYear
BOEUsageDocLineItem BOEUsageDocLineItem
JointVenture JointVenture Joint venture
JointVentureCostRecoveryCode JointVentureCostRecoveryCode Recovery Ind.
JointVentureBillingType JointVentureBillingType
JointVentureCorporateEquityGrp JointVentureCorporateEquityGrp
_JournalEntry _JournalEntry
_Customer _Customer
_CustomerCompany _CustomerCompany
_Supplier _Supplier
_SupplierCompany _SupplierCompany
_TH_SupplierBranchCodeVH _TH_SupplierBranchCodeVH
_ReferenceDocumentTypeText _ReferenceDocumentTypeText

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_0.
-- 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: PAPLINEITEM0
-- Parameters: P_KeyDate : vdm_v_key_date, P_TodayDate : abap.dats, P_Language : sylangu

CREATE VIEW P_APLineItem_0 AS
SELECT
  CompanyCode,
  AccountingDocument,
  FiscalYear,
  AccountingDocumentItem,
  P_APLineItem_1.KEYDT2 AS KEYDT2,
  PaymentDifferenceReason,
  Customer,
  ClearingDate,
  ClearingDocFiscalYear,
  ClearingAccountingDocument,
  PostingKey,
  FinancialAccountType,
  SpecialGLCode,
  SpecialGLTransactionType,
  DebitCreditCode,
  BusinessArea,
  TaxCode,
  TaxCountry,
  TaxReportingDate,
  AmountInCompanyCodeCurrency,
  AmountInTransactionCurrency,
  AmountInBalanceTransacCrcy,
  BalanceTransactionCurrency,
  WithholdingTaxBaseAmount,
  ValuationDiffAmtInCoCodeCrcy,
  ValuationDiffAmtInAddlCrcy1,
  ValueDate,
  AssignmentReference,
  DocumentItemText,
  PartnerCompany,
  CostCenter,
  OrderID,
  BillingDocument,
  SalesDocument,
  SalesDocumentItem,
  ScheduleLine,
  MasterFixedAsset,
  FixedAsset,
  IsUsedInPaymentTransaction,
  GLAccount,
  Branch,
  DueCalculationBaseDate,
  PaymentTerms,
  CashDiscount1Days,
  CashDiscount2Days,
  NetPaymentDays,
  CashDiscount1Percent,
  CashDiscount2Percent,
  CashDiscountBaseAmount,
  CashDiscountAmtInCoCodeCrcy,
  CashDiscountAmount,
  PaymentMethod,
  PaymentBlockingReason,
  FixedCashDiscount,
  FollowOnDocumentType,
  StateCentralBankPaymentReason,
  SupplyingCountry,
  InvoiceList,
  BillOfExchangeUsage,
  DunningKey,
  DunningBlockingReason,
  LastDunningDate,
  DunningLevel,
  DunningArea,
  WithholdingTaxAmount,
  WithholdingTaxExemptionAmt,
  Plant,
  PurchasingDocument,
  PurchasingDocumentItem,
  ProfitCenter,
  TreasuryContractType,
  AssetContract,
  CashFlowType,
  WBSElement,
  AlternativeGLAccount,
  AmountInAdditionalCurrency1,
  AmountInAdditionalCurrency2,
  AmountInFunctionalCurrency,
  ValuationDiffAmtInAddlCrcy2,
  ClearingIsReversed,
  PaymentMethodSupplement,
  Reference1IDByBusinessPartner,
  Reference2IDByBusinessPartner,
  PaymentCardItem,
  PaymentCardPaymentSettlement,
  Reference3IDByBusinessPartner,
  DataExchangeInstruction1,
  DataExchangeInstruction2,
  DataExchangeInstruction3,
  DataExchangeInstruction4,
  HasPaymentOrder,
  PaymentReference,
  HedgedAmount,
  PaymentCurrency,
  AmountInPaymentCurrency,
  BusinessPlace,
  TaxSection,
  AccountsReceivableIsPledged,
  RealEstateObject,
  FundsCenter,
  SettlementReferenceDate,
  IsSalesRelated,
  PostingDate,
  AccountingDocumentCategory,
  FiscalPeriod,
  DocumentDate,
  AccountingDocumentType,
  TransactionCurrency,
  PlannedAmtInTransactionCrcy,
  NetDueDate,
  CashDiscount1DueDate,
  SourceCompanyCode,
  DocumentReferenceID,
  AccountingDocumentCreationDate,
  AccountingDocCreatedByUser,
  AdditionalCurrency1,
  AdditionalCurrency2,
  FunctionalCurrency,
  OffsettingAccount,
  OffsettingAccountType,
  ITEM_TYPE_BRANCH,
  DPNOTDUE,
  Supplier,
  SupplierIndustry,
  SupplierCreationDate,
  SupplierAccountGroup,
  SupplierSearchText,
  SupplierTaxID1,
  SupplierTaxID2,
  SupplierTaxID3,
  SupplierTaxID4,
  SupplierTaxID5,
  SupplierIsOneTimeAccount,
  SupplierVATRegistration,
  SupplierTaxJurisdiction,
  SupplierBasicAuthorizationGrp,
  SupplierFinsAuthorizationGrp,
  AlternativePayeeIsAllowed,
  PostingIsBlockedForSupplier,
  SupplierCorporateGroup,
  SupplierCountry,
  SupplierName,
  SupplierCityName,
  SupplierPOBox,
  SupplierPOBoxPostalCode,
  SupplierPostalCode,
  SupplierRegion,
  SupplierCreatedByUser,
  AccountingClerk,
  ReconciliationAccount,
  InterestCalculationCode,
  SupplierHeadOffice,
  SupplierPaymentBlockingReason,
  InterestCalculationDate,
  IntrstCalcFrequencyInMonths,
  APARToleranceGroup,
  HouseBank,
  HouseBankAccount,
  ItemIsToBePaidSeparately,
  PaymentIsToBeSentByEDI,
  SupplierAccountNote,
  CompanyCodeCurrency,
  CompanyCodeName,
  IsDisputed,
  CustomerSupplierAccount,
  InvoiceReference,
  FiscalYearPeriod,
  IsCleared,
  PayableAlternativePayee,
  CreditControlArea,
  ValuatedAmtInCompanyCodeCrcy,
  ValuatedAmtInAdditionalCrcy1,
  ValuatedAmtInAdditionalCrcy2,
  DueItemType,
  DocumentIsArchived,
  TargetTaxCode,
  AlternativePayee,
  KeyDate,
  AcctgDocTypeAuthorizationGroup,
  BPBankAccountInternalID,
  _IndustryName.brtxt AS SupplierIndustryName,
  _RegionText.RegionName AS SupplierRegionName,
  division( AmountInCompanyCodeCurrency * NetDueArrearsDays, 36500, 2 ) AS InterestToBePosted,
  Debtor,
  AdditionalCurrency1Role,
  AdditionalCurrency2Role,
  BranchCode,
  ReferenceDocumentType,
  OriginalReferenceDocument,
  ReferenceDocumentLogicalSystem,
  PaymentReason,
  BillOfExchangeUsageDocument,
  BOEUsageDocFiscalYear,
  BOEUsageDocLineItem,
  JointVenture,
  JointVentureCostRecoveryCode,
  JointVentureBillingType,
  JointVentureCorporateEquityGrp
FROM P_APLineItem_1
LEFT OUTER JOIN I_TH_SupplierBranchCodeVH AS _TH_SupplierBranchCodeVH ON Supplier = _TH_SupplierBranchCodeVH.Supplier AND BranchCode = _TH_SupplierBranchCodeVH.BranchCode  -- association [0..1]
LEFT OUTER JOIN I_ReferenceDocumentTypeText AS _ReferenceDocumentTypeText ON _ReferenceDocumentTypeText.ReferenceDocumentType = ReferenceDocumentType AND _ReferenceDocumentTypeText.Language = $session.system_language  -- association [0..1]
;