P_APLineItem_3

DDL: P_APLINEITEM_3 Type: view_entity COMPOSITE Package: FINS_FIS_APAR_APPS

Created from DDL source P_APLineItem_3

P_APLineItem_3 is a Composite CDS View that provides data about "Created from DDL source P_APLineItem_3" in SAP S/4HANA. It reads from 1 data source (P_APLineItem_4) and exposes 146 fields with key fields CompanyCode, AccountingDocument, FiscalYear, AccountingDocumentItem. Part of development package FINS_FIS_APAR_APPS.

Data Sources (1)

SourceAliasJoin Type
P_APLineItem_4 _Item from

Parameters (1)

NameTypeDefault
P_KeyDate vdm_v_key_date

Annotations (3)

NameValueLevelField
VDM.viewType #COMPOSITE view
VDM.private true view
AccessControl.authorizationCheck #NOT_REQUIRED view

Fields (146)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode P_APLineItem_4 CompanyCode Receiver Company Code
KEY AccountingDocument P_APLineItem_4 AccountingDocument Journal Entry
KEY FiscalYear P_APLineItem_4 FiscalYear G/L Fiscal Year
KEY AccountingDocumentItem P_APLineItem_4 AccountingDocumentItem Posting View Item
KEYDT2
SpecialGLCodeFthenXelseendasDPNOTDUE
PaymentDifferenceReason P_APLineItem_4 PaymentDifferenceReason Reason Code
Supplier P_APLineItem_4 Supplier Supplier
ClearingDate P_APLineItem_4 ClearingDate Clearing Date
ClearingDocFiscalYear P_APLineItem_4 ClearingDocFiscalYear Fiscal Year of Clearing Journal Entry
ClearingAccountingDocument P_APLineItem_4 ClearingAccountingDocument Clearing Journal Entry
PostingKey P_APLineItem_4 PostingKey Posting Key
FinancialAccountType P_APLineItem_4 FinancialAccountType Fin. Account Type
SpecialGLCode P_APLineItem_4 SpecialGLCode Special G/L Ind
SpecialGLTransactionType P_APLineItem_4 SpecialGLTransactionType Transact.Type
DebitCreditCode P_APLineItem_4 DebitCreditCode Single-Character Flag
BusinessArea P_APLineItem_4 BusinessArea Business Area
TaxCode P_APLineItem_4 TaxCode Tax Code
TaxCountry P_APLineItem_4 TaxCountry Tax Ctry/Reg.
TaxReportingDate P_APLineItem_4 TaxReportingDate Tax Reporting Date
AmountInCompanyCodeCurrency P_APLineItem_4 AmountInCompanyCodeCurrency Local Crcy Amt
AmountInTransactionCurrency P_APLineItem_4 AmountInTransactionCurrency Pt Crcy Amt
AmountInBalanceTransacCrcy P_APLineItem_4 AmountInBalanceTransacCrcy Amount in Balance Transaction Currency
BalanceTransactionCurrency P_APLineItem_4 BalanceTransactionCurrency Currency
WithholdingTaxBaseAmount P_APLineItem_4 WithholdingTaxBaseAmount WTax Base Amt
ValuationDiffAmtInCoCodeCrcy P_APLineItem_4 ValuationDiffAmtInCoCodeCrcy
ValuationDiffAmtInAddlCrcy1 P_APLineItem_4 ValuationDiffAmtInAddlCrcy1
ValueDate P_APLineItem_4 ValueDate Value Date
AssignmentReference P_APLineItem_4 AssignmentReference Assignment Reference
DocumentItemText P_APLineItem_4 DocumentItemText Text
PartnerCompany P_APLineItem_4 PartnerCompany Trading Partner
CostCenter P_APLineItem_4 CostCenter Cost Center
OrderID P_APLineItem_4 OrderID Order ID
BillingDocument P_APLineItem_4 BillingDocument SD Document
SalesDocument P_APLineItem_4 SalesDocument SD Document
SalesDocumentItem P_APLineItem_4 SalesDocumentItem Sales Document Item
ScheduleLine P_APLineItem_4 ScheduleLine Schedule Line
MasterFixedAsset P_APLineItem_4 MasterFixedAsset Fixed Asset
FixedAsset P_APLineItem_4 FixedAsset Sub-number
IsUsedInPaymentTransaction P_APLineItem_4 IsUsedInPaymentTransaction Is Used In Payment Transaction
GLAccount P_APLineItem_4 GLAccount General Ledger
Branch P_APLineItem_4 Branch Repository branch
DueCalculationBaseDate P_APLineItem_4 DueCalculationBaseDate Due Calculation Base Date
PaymentTerms P_APLineItem_4 PaymentTerms Pyt Terms
CashDiscount1Days P_APLineItem_4 CashDiscount1Days Days from Baseline Date for Payment
CashDiscount2Days P_APLineItem_4 CashDiscount2Days Days from Baseline Date for Payment
NetPaymentDays P_APLineItem_4 NetPaymentDays Net Pmt Terms Period
CashDiscount1Percent P_APLineItem_4 CashDiscount1Percent Disc. Percent 1
CashDiscount2Percent P_APLineItem_4 CashDiscount2Percent Disc. Percent 2
CashDiscountBaseAmount P_APLineItem_4 CashDiscountBaseAmount Cash Dscnt Base Amt
CashDiscountAmtInCoCodeCrcy P_APLineItem_4 CashDiscountAmtInCoCodeCrcy Discount Amt
CashDiscountAmount P_APLineItem_4 CashDiscountAmount CD Amount
PaymentMethod P_APLineItem_4 PaymentMethod Pymt Meth.
PaymentBlockingReason P_APLineItem_4 PaymentBlockingReason Pmnt block
FixedCashDiscount P_APLineItem_4 FixedCashDiscount Fixed Cash Discount
InvoiceReference P_APLineItem_4 InvoiceReference Invoice Reference
FollowOnDocumentType P_APLineItem_4 FollowOnDocumentType Follow-On Document Type
StateCentralBankPaymentReason P_APLineItem_4 StateCentralBankPaymentReason SCB Ind.
SupplyingCountry P_APLineItem_4 SupplyingCountry Supplying Ctry/Reg.
InvoiceList P_APLineItem_4 InvoiceList Invoice List
BillOfExchangeUsage P_APLineItem_4 BillOfExchangeUsage BoE Usage
DunningKey P_APLineItem_4 DunningKey Dunning Key
DunningBlockingReason P_APLineItem_4 DunningBlockingReason Set Dunning Block
LastDunningDate P_APLineItem_4 LastDunningDate Last Dunned
DunningLevel P_APLineItem_4 DunningLevel Dunning Level
DunningArea P_APLineItem_4 DunningArea Dunning Area
WithholdingTaxAmount P_APLineItem_4 WithholdingTaxAmount Withholding Tax Amt
WithholdingTaxExemptionAmt P_APLineItem_4 WithholdingTaxExemptionAmt WTax-Exempt
Plant P_APLineItem_4 Plant Valuation Area
PurchasingDocument P_APLineItem_4 PurchasingDocument Purchasing Document
PurchasingDocumentItem P_APLineItem_4 PurchasingDocumentItem Purchasing Doc. Item
ProfitCenter P_APLineItem_4 ProfitCenter Profit Center
TreasuryContractType P_APLineItem_4 TreasuryContractType Treasury Contract Type
AssetContract P_APLineItem_4 AssetContract Asset Contract
CashFlowType P_APLineItem_4 CashFlowType Flow Type
WBSElement P_APLineItem_4 WBSElement WBS Internal ID
AlternativeGLAccount P_APLineItem_4 AlternativeGLAccount Group Account
AmountInAdditionalCurrency1 P_APLineItem_4 AmountInAdditionalCurrency1 Amount in Additional Currency 1
AmountInAdditionalCurrency2 P_APLineItem_4 AmountInAdditionalCurrency2 LC2 Amount
AmountInFunctionalCurrency P_APLineItem_4 AmountInFunctionalCurrency Amount in Functional Currency
ValuationDiffAmtInAddlCrcy2 P_APLineItem_4 ValuationDiffAmtInAddlCrcy2
ClearingIsReversed P_APLineItem_4 ClearingIsReversed Clearing Is Reversed
PaymentMethodSupplement P_APLineItem_4 PaymentMethodSupplement Pmnt Meth. Sup.
Reference1IDByBusinessPartner P_APLineItem_4 Reference1IDByBusinessPartner Reference Key 1
Reference2IDByBusinessPartner P_APLineItem_4 Reference2IDByBusinessPartner Reference Key 2
PaymentCardItem P_APLineItem_4 PaymentCardItem Payment Card Item
PaymentCardPaymentSettlement P_APLineItem_4 PaymentCardPaymentSettlement Payment Card Payment Settlement
CreditControlArea P_APLineItem_4 CreditControlArea Credit Control Area
PayableAlternativePayee P_APLineItem_4 PayableAlternativePayee Alternative Payee/Payer
Reference3IDByBusinessPartner P_APLineItem_4 Reference3IDByBusinessPartner Reference Key 3
DataExchangeInstruction1 P_APLineItem_4 DataExchangeInstruction1 Instruction 1
DataExchangeInstruction2 P_APLineItem_4 DataExchangeInstruction2 Instruction 2
DataExchangeInstruction3 P_APLineItem_4 DataExchangeInstruction3 Instruction 3
DataExchangeInstruction4 P_APLineItem_4 DataExchangeInstruction4 Instruction 4
HasPaymentOrder P_APLineItem_4 HasPaymentOrder Payment Sent
PaymentReference P_APLineItem_4 PaymentReference Payment Reference
HedgedAmount P_APLineItem_4 HedgedAmount
PaymentCurrency P_APLineItem_4 PaymentCurrency Payment Currency
AmountInPaymentCurrency P_APLineItem_4 AmountInPaymentCurrency Amount in Payment Currency
BusinessPlace P_APLineItem_4 BusinessPlace Business place
TaxSection P_APLineItem_4 TaxSection Tax Section
AccountsReceivableIsPledged P_APLineItem_4 AccountsReceivableIsPledged Accounts Receivable Is Pledged
RealEstateObject P_APLineItem_4 RealEstateObject Real Estate Key
FundsCenter P_APLineItem_4 FundsCenter Funds Center
SettlementReferenceDate P_APLineItem_4 SettlementReferenceDate Reference date
IsSalesRelated P_APLineItem_4 IsSalesRelated Is Sales Related
PostingDate P_APLineItem_4 PostingDate Posting Date for GR
AccountingDocumentCategory P_APLineItem_4 AccountingDocumentCategory Journal Entry Category
FiscalPeriod P_APLineItem_4 FiscalPeriod Tax period
DocumentDate P_APLineItem_4 DocumentDate Journal Entry Date
AccountingDocumentType P_APLineItem_4 AccountingDocumentType Journal Entry Type
TransactionCurrency P_APLineItem_4 TransactionCurrency Transaction Currency
PlannedAmtInTransactionCrcy P_APLineItem_4 PlannedAmtInTransactionCrcy Plnd Amt Trans. Crcy
NetDueDate P_APLineItem_4 NetDueDate Net Due Date
CashDiscount1DueDate P_APLineItem_4 CashDiscount1DueDate Cash Discount 1
SourceCompanyCode P_APLineItem_4 SourceCompanyCode
DocumentReferenceID P_APLineItem_4 DocumentReferenceID Reference
AccountingDocumentCreationDate P_APLineItem_4 AccountingDocumentCreationDate Journal Entry Date
AccountingDocCreatedByUser P_APLineItem_4 AccountingDocCreatedByUser User which created overhead document
AdditionalCurrency1 P_APLineItem_4 AdditionalCurrency1 Local curr. 2
AdditionalCurrency2 P_APLineItem_4 AdditionalCurrency2 Local curr. 3
FunctionalCurrency P_APLineItem_4 FunctionalCurrency Functional Currency
OffsettingAccount P_APLineItem_4 OffsettingAccount Offsetting Acct
OffsettingAccountType P_APLineItem_4 OffsettingAccountType Offset Acct Type
ITEM_TYPE_BRANCH P_APLineItem_4 ITEM_TYPE_BRANCH
DocumentIsArchived P_APLineItem_4 DocumentIsArchived
CompanyCodeCurrency P_APLineItem_4 CompanyCodeCurrency Local Currency
BPBankAccountInternalID P_APLineItem_4 BPBankAccountInternalID BP Bank Account
TargetTaxCodeelseendasTargetTaxCode
HouseBank P_APLineItem_4 HouseBank House Bank
HouseBankAccount P_APLineItem_4 HouseBankAccount House Bank Account
Debtor P_APLineItem_4 Debtor Debtor
AdditionalCurrency1Role P_APLineItem_4 AdditionalCurrency1Role LC2 Crcy Type
AdditionalCurrency2Role P_APLineItem_4 AdditionalCurrency2Role LC3 Crcy Type
BranchCode P_APLineItem_4 BranchCode Branch Code
ReferenceDocumentType P_APLineItem_4 ReferenceDocumentType Reference Document Type
OriginalReferenceDocument P_APLineItem_4 OriginalReferenceDocument Reference Key
ReferenceDocumentLogicalSystem P_APLineItem_4 ReferenceDocumentLogicalSystem Ref. Doc. Lgcl Syst.
PaymentReason P_APLineItem_4 PaymentReason Payment Reason
BillOfExchangeUsageDocument P_APLineItem_4 BillOfExchangeUsageDocument
BOEUsageDocFiscalYear P_APLineItem_4 BOEUsageDocFiscalYear
BOEUsageDocLineItem P_APLineItem_4 BOEUsageDocLineItem
JointVenture P_APLineItem_4 JointVenture Joint venture
JointVentureCostRecoveryCode P_APLineItem_4 JointVentureCostRecoveryCode Recovery Ind.
JointVentureBillingType P_APLineItem_4 JointVentureBillingType
JointVentureCorporateEquityGrp P_APLineItem_4 JointVentureCorporateEquityGrp

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_3.
-- 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.
-- Parameters: P_KeyDate : vdm_v_key_date

CREATE VIEW P_APLineItem_3 AS
SELECT
  _Item.CompanyCode AS CompanyCode,
  _Item.AccountingDocument AS AccountingDocument,
  _Item.FiscalYear AS FiscalYear,
  _Item.AccountingDocumentItem AS AccountingDocumentItem,
  $parameters.P_KeyDate AS KEYDT2,
  case when _Item.SpecialGLTransactionType = 'A' and _Item.SpecialGLCode != 'F' then 'X' else '' end as DPNOTDUE AS SpecialGLCodeFthenXelseendasDPNOTDUE,
  _Item.PaymentDifferenceReason AS PaymentDifferenceReason,
  _Item.Supplier AS Supplier,
  _Item.ClearingDate AS ClearingDate,
  _Item.ClearingDocFiscalYear AS ClearingDocFiscalYear,
  _Item.ClearingAccountingDocument AS ClearingAccountingDocument,
  _Item.PostingKey AS PostingKey,
  _Item.FinancialAccountType AS FinancialAccountType,
  _Item.SpecialGLCode AS SpecialGLCode,
  _Item.SpecialGLTransactionType AS SpecialGLTransactionType,
  _Item.DebitCreditCode AS DebitCreditCode,
  _Item.BusinessArea AS BusinessArea,
  _Item.TaxCode AS TaxCode,
  _Item.TaxCountry AS TaxCountry,
  _Item.TaxReportingDate AS TaxReportingDate,
  _Item.AmountInCompanyCodeCurrency AS AmountInCompanyCodeCurrency,
  _Item.AmountInTransactionCurrency AS AmountInTransactionCurrency,
  _Item.AmountInBalanceTransacCrcy AS AmountInBalanceTransacCrcy,
  _Item.BalanceTransactionCurrency AS BalanceTransactionCurrency,
  _Item.WithholdingTaxBaseAmount AS WithholdingTaxBaseAmount,
  _Item.ValuationDiffAmtInCoCodeCrcy AS ValuationDiffAmtInCoCodeCrcy,
  _Item.ValuationDiffAmtInAddlCrcy1 AS ValuationDiffAmtInAddlCrcy1,
  _Item.ValueDate AS ValueDate,
  _Item.AssignmentReference AS AssignmentReference,
  _Item.DocumentItemText AS DocumentItemText,
  _Item.PartnerCompany AS PartnerCompany,
  _Item.CostCenter AS CostCenter,
  _Item.OrderID AS OrderID,
  _Item.BillingDocument AS BillingDocument,
  _Item.SalesDocument AS SalesDocument,
  _Item.SalesDocumentItem AS SalesDocumentItem,
  _Item.ScheduleLine AS ScheduleLine,
  _Item.MasterFixedAsset AS MasterFixedAsset,
  _Item.FixedAsset AS FixedAsset,
  _Item.IsUsedInPaymentTransaction AS IsUsedInPaymentTransaction,
  _Item.GLAccount AS GLAccount,
  _Item.Branch AS Branch,
  _Item.DueCalculationBaseDate AS DueCalculationBaseDate,
  _Item.PaymentTerms AS PaymentTerms,
  _Item.CashDiscount1Days AS CashDiscount1Days,
  _Item.CashDiscount2Days AS CashDiscount2Days,
  _Item.NetPaymentDays AS NetPaymentDays,
  _Item.CashDiscount1Percent AS CashDiscount1Percent,
  _Item.CashDiscount2Percent AS CashDiscount2Percent,
  _Item.CashDiscountBaseAmount AS CashDiscountBaseAmount,
  _Item.CashDiscountAmtInCoCodeCrcy AS CashDiscountAmtInCoCodeCrcy,
  _Item.CashDiscountAmount AS CashDiscountAmount,
  _Item.PaymentMethod AS PaymentMethod,
  _Item.PaymentBlockingReason AS PaymentBlockingReason,
  _Item.FixedCashDiscount AS FixedCashDiscount,
  _Item.InvoiceReference AS InvoiceReference,
  _Item.FollowOnDocumentType AS FollowOnDocumentType,
  _Item.StateCentralBankPaymentReason AS StateCentralBankPaymentReason,
  _Item.SupplyingCountry AS SupplyingCountry,
  _Item.InvoiceList AS InvoiceList,
  _Item.BillOfExchangeUsage AS BillOfExchangeUsage,
  _Item.DunningKey AS DunningKey,
  _Item.DunningBlockingReason AS DunningBlockingReason,
  _Item.LastDunningDate AS LastDunningDate,
  _Item.DunningLevel AS DunningLevel,
  _Item.DunningArea AS DunningArea,
  _Item.WithholdingTaxAmount AS WithholdingTaxAmount,
  _Item.WithholdingTaxExemptionAmt AS WithholdingTaxExemptionAmt,
  _Item.Plant AS Plant,
  _Item.PurchasingDocument AS PurchasingDocument,
  _Item.PurchasingDocumentItem AS PurchasingDocumentItem,
  _Item.ProfitCenter AS ProfitCenter,
  _Item.TreasuryContractType AS TreasuryContractType,
  _Item.AssetContract AS AssetContract,
  _Item.CashFlowType AS CashFlowType,
  _Item.WBSElement AS WBSElement,
  _Item.AlternativeGLAccount AS AlternativeGLAccount,
  _Item.AmountInAdditionalCurrency1 AS AmountInAdditionalCurrency1,
  _Item.AmountInAdditionalCurrency2 AS AmountInAdditionalCurrency2,
  _Item.AmountInFunctionalCurrency AS AmountInFunctionalCurrency,
  _Item.ValuationDiffAmtInAddlCrcy2 AS ValuationDiffAmtInAddlCrcy2,
  _Item.ClearingIsReversed AS ClearingIsReversed,
  _Item.PaymentMethodSupplement AS PaymentMethodSupplement,
  _Item.Reference1IDByBusinessPartner AS Reference1IDByBusinessPartner,
  _Item.Reference2IDByBusinessPartner AS Reference2IDByBusinessPartner,
  _Item.PaymentCardItem AS PaymentCardItem,
  _Item.PaymentCardPaymentSettlement AS PaymentCardPaymentSettlement,
  _Item.CreditControlArea AS CreditControlArea,
  _Item.PayableAlternativePayee AS PayableAlternativePayee,
  _Item.Reference3IDByBusinessPartner AS Reference3IDByBusinessPartner,
  _Item.DataExchangeInstruction1 AS DataExchangeInstruction1,
  _Item.DataExchangeInstruction2 AS DataExchangeInstruction2,
  _Item.DataExchangeInstruction3 AS DataExchangeInstruction3,
  _Item.DataExchangeInstruction4 AS DataExchangeInstruction4,
  _Item.HasPaymentOrder AS HasPaymentOrder,
  _Item.PaymentReference AS PaymentReference,
  _Item.HedgedAmount AS HedgedAmount,
  _Item.PaymentCurrency AS PaymentCurrency,
  _Item.AmountInPaymentCurrency AS AmountInPaymentCurrency,
  _Item.BusinessPlace AS BusinessPlace,
  _Item.TaxSection AS TaxSection,
  _Item.AccountsReceivableIsPledged AS AccountsReceivableIsPledged,
  _Item.RealEstateObject AS RealEstateObject,
  _Item.FundsCenter AS FundsCenter,
  _Item.SettlementReferenceDate AS SettlementReferenceDate,
  _Item.IsSalesRelated AS IsSalesRelated,
  _Item.PostingDate AS PostingDate,
  _Item.AccountingDocumentCategory AS AccountingDocumentCategory,
  _Item.FiscalPeriod AS FiscalPeriod,
  _Item.DocumentDate AS DocumentDate,
  _Item.AccountingDocumentType AS AccountingDocumentType,
  _Item.TransactionCurrency AS TransactionCurrency,
  _Item.PlannedAmtInTransactionCrcy AS PlannedAmtInTransactionCrcy,
  _Item.NetDueDate AS NetDueDate,
  _Item.CashDiscount1DueDate AS CashDiscount1DueDate,
  _Item.SourceCompanyCode AS SourceCompanyCode,
  _Item.DocumentReferenceID AS DocumentReferenceID,
  _Item.AccountingDocumentCreationDate AS AccountingDocumentCreationDate,
  _Item.AccountingDocCreatedByUser AS AccountingDocCreatedByUser,
  _Item.AdditionalCurrency1 AS AdditionalCurrency1,
  _Item.AdditionalCurrency2 AS AdditionalCurrency2,
  _Item.FunctionalCurrency AS FunctionalCurrency,
  _Item.OffsettingAccount AS OffsettingAccount,
  _Item.OffsettingAccountType AS OffsettingAccountType,
  _Item.ITEM_TYPE_BRANCH AS ITEM_TYPE_BRANCH,
  _Item.DocumentIsArchived AS DocumentIsArchived,
  _Item.CompanyCodeCurrency AS CompanyCodeCurrency,
  _Item.BPBankAccountInternalID AS BPBankAccountInternalID,
  case when _Item.SpecialGLTransactionType = 'A' then _TaxCode.TargetTaxCode else ' ' end as TargetTaxCode AS TargetTaxCodeelseendasTargetTaxCode,
  _Item.HouseBank AS HouseBank,
  _Item.HouseBankAccount AS HouseBankAccount,
  _Item.Debtor AS Debtor,
  _Item.AdditionalCurrency1Role AS AdditionalCurrency1Role,
  _Item.AdditionalCurrency2Role AS AdditionalCurrency2Role,
  _Item.BranchCode AS BranchCode,
  _Item.ReferenceDocumentType AS ReferenceDocumentType,
  _Item.OriginalReferenceDocument AS OriginalReferenceDocument,
  _Item.ReferenceDocumentLogicalSystem AS ReferenceDocumentLogicalSystem,
  _Item.PaymentReason AS PaymentReason,
  _Item.BillOfExchangeUsageDocument AS BillOfExchangeUsageDocument,
  _Item.BOEUsageDocFiscalYear AS BOEUsageDocFiscalYear,
  _Item.BOEUsageDocLineItem AS BOEUsageDocLineItem,
  _Item.JointVenture AS JointVenture,
  _Item.JointVentureCostRecoveryCode AS JointVentureCostRecoveryCode,
  _Item.JointVentureBillingType AS JointVentureBillingType,
  _Item.JointVentureCorporateEquityGrp AS JointVentureCorporateEquityGrp
FROM P_APLineItem_4 AS _Item
;