@AbapCatalog.sqlViewName: 'PAPLINEITEM4'
@AbapCatalog.compiler.compareFilter:true
@AbapCatalog.preserveKey:true
@VDM.viewType: #BASIC
@VDM.private:true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_APLineItem_4
as
// posted credit items
select from I_ReceivablesPayablesItem
{
key I_ReceivablesPayablesItem.CompanyCode as CompanyCode,
key I_ReceivablesPayablesItem.AccountingDocument as AccountingDocument,
key I_ReceivablesPayablesItem.FiscalYear as FiscalYear,
key I_ReceivablesPayablesItem.AccountingDocumentItem as AccountingDocumentItem,
_JournalEntry.AccountingDocCreatedByUser as AccountingDocCreatedByUser,
I_ReceivablesPayablesItem.AccountingDocumentCategory as AccountingDocumentCategory,
I_ReceivablesPayablesItem._JournalEntry.AccountingDocumentCreationDate as AccountingDocumentCreationDate,
I_ReceivablesPayablesItem.AccountingDocumentType as AccountingDocumentType,
I_ReceivablesPayablesItem.AccountsReceivableIsPledged as AccountsReceivableIsPledged,
I_ReceivablesPayablesItem.AdditionalCurrency1 as AdditionalCurrency1,
I_ReceivablesPayablesItem.AdditionalCurrency2 as AdditionalCurrency2,
I_ReceivablesPayablesItem.AlternativeGLAccount as AlternativeGLAccount,
I_ReceivablesPayablesItem.AmountInAdditionalCurrency1 as AmountInAdditionalCurrency1,
I_ReceivablesPayablesItem.AmountInAdditionalCurrency2 as AmountInAdditionalCurrency2,
I_ReceivablesPayablesItem.AmountInBalanceTransacCrcy as AmountInBalanceTransacCrcy,
I_ReceivablesPayablesItem.AmountInCompanyCodeCurrency as AmountInCompanyCodeCurrency,
I_ReceivablesPayablesItem.AmountInFunctionalCurrency as AmountInFunctionalCurrency,
I_ReceivablesPayablesItem.AmountInPaymentCurrency as AmountInPaymentCurrency,
I_ReceivablesPayablesItem.AmountInTransactionCurrency as AmountInTransactionCurrency,
I_ReceivablesPayablesItem.AssetContract as AssetContract,
I_ReceivablesPayablesItem.AssignmentReference as AssignmentReference,
I_ReceivablesPayablesItem.BalanceTransactionCurrency as BalanceTransactionCurrency,
I_ReceivablesPayablesItem.BillingDocument as BillingDocument,
I_ReceivablesPayablesItem.BillOfExchangeUsage as BillOfExchangeUsage,
I_ReceivablesPayablesItem.BranchAccount as Branch,
I_ReceivablesPayablesItem.BusinessArea as BusinessArea,
I_ReceivablesPayablesItem.BusinessPlace as BusinessPlace,
I_ReceivablesPayablesItem.CashDiscount1Days as CashDiscount1Days,
I_ReceivablesPayablesItem.CashDiscount1DueDate as CashDiscount1DueDate,
I_ReceivablesPayablesItem.CashDiscount1Percent as CashDiscount1Percent,
I_ReceivablesPayablesItem.CashDiscount2Days as CashDiscount2Days,
I_ReceivablesPayablesItem.CashDiscount2Percent as CashDiscount2Percent,
I_ReceivablesPayablesItem.CashDiscountAmount as CashDiscountAmount,
I_ReceivablesPayablesItem.CashDiscountAmtInCoCodeCrcy as CashDiscountAmtInCoCodeCrcy,
I_ReceivablesPayablesItem.CashDiscountBaseAmount as CashDiscountBaseAmount,
I_ReceivablesPayablesItem.CashFlowType as CashFlowType,
I_ReceivablesPayablesItem.ClearingAccountingDocument as ClearingAccountingDocument,
I_ReceivablesPayablesItem.ClearingDate as ClearingDate,
I_ReceivablesPayablesItem.ClearingDocFiscalYear as ClearingDocFiscalYear,
I_ReceivablesPayablesItem.ClearingIsReversed as ClearingIsReversed,
I_ReceivablesPayablesItem.CompanyCodeCurrency as CompanyCodeCurrency,
I_ReceivablesPayablesItem.CostCenter as CostCenter,
I_ReceivablesPayablesItem.CreditControlArea as CreditControlArea,
I_ReceivablesPayablesItem.AlternativePayeePayer as PayableAlternativePayee,
I_ReceivablesPayablesItem.DataExchangeInstruction1 as DataExchangeInstruction1,
I_ReceivablesPayablesItem.DataExchangeInstruction2 as DataExchangeInstruction2,
I_ReceivablesPayablesItem.DataExchangeInstruction3 as DataExchangeInstruction3,
I_ReceivablesPayablesItem.DataExchangeInstruction4 as DataExchangeInstruction4,
I_ReceivablesPayablesItem.DebitCreditCode as DebitCreditCode,
I_ReceivablesPayablesItem.DocumentDate as DocumentDate,
' ' as DocumentIsArchived,
I_ReceivablesPayablesItem.DocumentItemText as DocumentItemText,
I_ReceivablesPayablesItem._JournalEntry.DocumentReferenceID as DocumentReferenceID,
I_ReceivablesPayablesItem.DueCalculationBaseDate as DueCalculationBaseDate,
I_ReceivablesPayablesItem.DunningArea as DunningArea,
I_ReceivablesPayablesItem.DunningBlockingReason as DunningBlockingReason,
I_ReceivablesPayablesItem.DunningLevel as DunningLevel,
I_ReceivablesPayablesItem.FinancialAccountType as FinancialAccountType,
I_ReceivablesPayablesItem.FiscalPeriod as FiscalPeriod,
I_ReceivablesPayablesItem.FixedAsset as FixedAsset,
I_ReceivablesPayablesItem.FixedCashDiscount as FixedCashDiscount,
I_ReceivablesPayablesItem.FollowOnDocumentType as FollowOnDocumentType,
I_ReceivablesPayablesItem.StateCentralBankPaymentReason as StateCentralBankPaymentReason,
I_ReceivablesPayablesItem.SupplyingCountry as SupplyingCountry,
I_ReceivablesPayablesItem.FunctionalCurrency as FunctionalCurrency,
I_ReceivablesPayablesItem.FundsCenter as FundsCenter,
I_ReceivablesPayablesItem.GLAccount as GLAccount,
I_ReceivablesPayablesItem.HasPaymentOrder as HasPaymentOrder,
I_ReceivablesPayablesItem.HedgedAmount as HedgedAmount,
I_ReceivablesPayablesItem.HouseBankAccount as HouseBankAccount,
I_ReceivablesPayablesItem.InvoiceList as InvoiceList,
I_ReceivablesPayablesItem.InvoiceReference as InvoiceReference,
I_ReceivablesPayablesItem.IsSalesRelated as IsSalesRelated,
I_ReceivablesPayablesItem.IsUsedInPaymentTransaction as IsUsedInPaymentTransaction,
// Do not use the auxiliary field ITEM_TYPE_BRANCH. It is only for SAP internal usage. It might be removed in the future.
// The field is needed for performance optimization. It specifies the branch of the Union per which a line item was selected.
@Consumption.hidden: true
cast ( 'BSEG_CREDIT_SIDE_BRANCH' as char30 ) as ITEM_TYPE_BRANCH,
I_ReceivablesPayablesItem.LastDunningDate as LastDunningDate,
I_ReceivablesPayablesItem.MasterFixedAsset as MasterFixedAsset,
I_ReceivablesPayablesItem.DunningKey as DunningKey,
I_ReceivablesPayablesItem.NetDueDate as NetDueDate,
I_ReceivablesPayablesItem.NetPaymentDays as NetPaymentDays,
I_ReceivablesPayablesItem.OffsettingAccount as OffsettingAccount,
I_ReceivablesPayablesItem.OffsettingAccountType as OffsettingAccountType,
I_ReceivablesPayablesItem.OrderID as OrderID,
I_ReceivablesPayablesItem.PartnerCompany as PartnerCompany,
I_ReceivablesPayablesItem.PaymentBlockingReason as PaymentBlockingReason,
I_ReceivablesPayablesItem.PaymentCardItem as PaymentCardItem,
I_ReceivablesPayablesItem.PaymentCardPaymentSettlement as PaymentCardPaymentSettlement,
I_ReceivablesPayablesItem.PaymentCurrency as PaymentCurrency,
I_ReceivablesPayablesItem.PaymentDifferenceReason as PaymentDifferenceReason,
I_ReceivablesPayablesItem.PaymentMethod as PaymentMethod,
I_ReceivablesPayablesItem.PaymentMethodSupplement as PaymentMethodSupplement,
I_ReceivablesPayablesItem.PaymentReference as PaymentReference,
I_ReceivablesPayablesItem.PaymentTerms as PaymentTerms,
I_ReceivablesPayablesItem.PlannedAmtInTransactionCrcy as PlannedAmtInTransactionCrcy,
I_ReceivablesPayablesItem.Plant as Plant,
I_ReceivablesPayablesItem.PostingDate as PostingDate,
I_ReceivablesPayablesItem.PostingKey as PostingKey,
I_ReceivablesPayablesItem.ProfitCenter as ProfitCenter,
I_ReceivablesPayablesItem.PurchasingDocument as PurchasingDocument,
I_ReceivablesPayablesItem.PurchasingDocumentItem as PurchasingDocumentItem,
I_ReceivablesPayablesItem.RealEstateObject as RealEstateObject,
I_ReceivablesPayablesItem.Reference1IDByBusinessPartner as Reference1IDByBusinessPartner,
I_ReceivablesPayablesItem.Reference2IDByBusinessPartner as Reference2IDByBusinessPartner,
I_ReceivablesPayablesItem.Reference3IDByBusinessPartner as Reference3IDByBusinessPartner,
I_ReceivablesPayablesItem.SalesDocument as SalesDocument,
I_ReceivablesPayablesItem.SalesDocumentItem as SalesDocumentItem,
I_ReceivablesPayablesItem.ScheduleLine as ScheduleLine,
I_ReceivablesPayablesItem.SettlementReferenceDate as SettlementReferenceDate,
'' as SourceCompanyCode,
I_ReceivablesPayablesItem.SpecialGLCode as SpecialGLCode,
I_ReceivablesPayablesItem.SpecialGLTransactionType as SpecialGLTransactionType,
I_ReceivablesPayablesItem.Creditor as Supplier,
I_ReceivablesPayablesItem._CompanyCode._Country.TaxCalculationProcedure as TaxCalculationProcedure,
I_ReceivablesPayablesItem.TaxCode as TaxCode,
I_ReceivablesPayablesItem.TaxCountry as TaxCountry,
_JournalEntry.TaxReportingDate as TaxReportingDate,
I_ReceivablesPayablesItem.TaxSection as TaxSection,
I_ReceivablesPayablesItem.TransactionCurrency as TransactionCurrency,
I_ReceivablesPayablesItem.TreasuryContractType as TreasuryContractType,
I_ReceivablesPayablesItem.ValuationDiffAmtInAddlCrcy1 as ValuationDiffAmtInAddlCrcy1,
I_ReceivablesPayablesItem.ValuationDiffAmtInAddlCrcy2 as ValuationDiffAmtInAddlCrcy2,
I_ReceivablesPayablesItem.ValuationDiffAmtInCoCodeCrcy as ValuationDiffAmtInCoCodeCrcy,
I_ReceivablesPayablesItem.ValueDate as ValueDate,
I_ReceivablesPayablesItem.WBSElement as WBSElement,
I_ReceivablesPayablesItem.WithholdingTaxAmount as WithholdingTaxAmount,
I_ReceivablesPayablesItem.WithholdingTaxBaseAmount as WithholdingTaxBaseAmount,
I_ReceivablesPayablesItem.WithholdingTaxExemptionAmt as WithholdingTaxExemptionAmt,
I_ReceivablesPayablesItem.BPBankAccountInternalID as BPBankAccountInternalID,
I_ReceivablesPayablesItem.HouseBank as HouseBank,
I_ReceivablesPayablesItem.Debtor as Debtor,
cast( _JournalEntry.AdditionalCurrency1Role as fis_adl1_currole preserving type ) as AdditionalCurrency1Role,
cast( _JournalEntry.AdditionalCurrency2Role as fis_adl2_currole preserving type ) as AdditionalCurrency2Role,
I_ReceivablesPayablesItem.BranchCode as BranchCode,
I_ReceivablesPayablesItem.ReferenceDocumentType as ReferenceDocumentType,
I_ReceivablesPayablesItem.OriginalReferenceDocument as OriginalReferenceDocument,
I_ReceivablesPayablesItem.ReferenceDocumentLogicalSystem as ReferenceDocumentLogicalSystem,
I_ReceivablesPayablesItem.PaymentReason as PaymentReason,
I_ReceivablesPayablesItem.BillOfExchangeUsageDocument as BillOfExchangeUsageDocument,
I_ReceivablesPayablesItem.BOEUsageDocFiscalYear as BOEUsageDocFiscalYear,
I_ReceivablesPayablesItem.BOEUsageDocLineItem as BOEUsageDocLineItem,
I_ReceivablesPayablesItem.JointVenture as JointVenture,
I_ReceivablesPayablesItem.JointVentureCostRecoveryCode as JointVentureCostRecoveryCode,
I_ReceivablesPayablesItem.JointVentureBillingType as JointVentureBillingType,
I_ReceivablesPayablesItem.JointVentureEquityGroup as JointVentureCorporateEquityGrp
}
where
FinancialAccountType = 'K'
and not(
AccountingDocumentCategory = 'D'
) //D = Recurring entry document
and not(
AccountingDocumentCategory = 'M'
) //M = Sample document
union all
// posted debit items of mixed accounts
select from I_ReceivablesPayablesItem
// inner join P_APLineItem_5 as MixAcc1 on I_ReceivablesPayablesItem.Debtor = MixAcc1.Debtor
inner join fap_mult_mix_acc as MixAcc1 on I_ReceivablesPayablesItem.Debtor = MixAcc1.debtor
and I_ReceivablesPayablesItem.CompanyCode = MixAcc1.companycode
{
key I_ReceivablesPayablesItem.CompanyCode as CompanyCode,
key I_ReceivablesPayablesItem.AccountingDocument as AccountingDocument,
key I_ReceivablesPayablesItem.FiscalYear as FiscalYear,
key I_ReceivablesPayablesItem.AccountingDocumentItem as AccountingDocumentItem,
_JournalEntry.AccountingDocCreatedByUser as AccountingDocCreatedByUser,
I_ReceivablesPayablesItem.AccountingDocumentCategory as AccountingDocumentCategory,
I_ReceivablesPayablesItem._JournalEntry.AccountingDocumentCreationDate as AccountingDocumentCreationDate,
I_ReceivablesPayablesItem.AccountingDocumentType as AccountingDocumentType,
I_ReceivablesPayablesItem.AccountsReceivableIsPledged as AccountsReceivableIsPledged,
I_ReceivablesPayablesItem.AdditionalCurrency1 as AdditionalCurrency1,
I_ReceivablesPayablesItem.AdditionalCurrency2 as AdditionalCurrency2,
I_ReceivablesPayablesItem.AlternativeGLAccount as AlternativeGLAccount,
I_ReceivablesPayablesItem.AmountInAdditionalCurrency1 as AmountInAdditionalCurrency1,
I_ReceivablesPayablesItem.AmountInAdditionalCurrency2 as AmountInAdditionalCurrency2,
I_ReceivablesPayablesItem.AmountInBalanceTransacCrcy as AmountInBalanceTransacCrcy,
I_ReceivablesPayablesItem.AmountInCompanyCodeCurrency as AmountInCompanyCodeCurrency,
I_ReceivablesPayablesItem.AmountInFunctionalCurrency as AmountInFunctionalCurrency,
I_ReceivablesPayablesItem.AmountInPaymentCurrency as AmountInPaymentCurrency,
I_ReceivablesPayablesItem.AmountInTransactionCurrency as AmountInTransactionCurrency,
I_ReceivablesPayablesItem.AssetContract as AssetContract,
I_ReceivablesPayablesItem.AssignmentReference as AssignmentReference,
I_ReceivablesPayablesItem.BalanceTransactionCurrency as BalanceTransactionCurrency,
I_ReceivablesPayablesItem.BillingDocument as BillingDocument,
I_ReceivablesPayablesItem.BillOfExchangeUsage as BillOfExchangeUsage,
I_ReceivablesPayablesItem.BranchAccount as Branch,
I_ReceivablesPayablesItem.BusinessArea as BusinessArea,
I_ReceivablesPayablesItem.BusinessPlace as BusinessPlace,
I_ReceivablesPayablesItem.CashDiscount1Days as CashDiscount1Days,
I_ReceivablesPayablesItem.CashDiscount1DueDate as CashDiscount1DueDate,
I_ReceivablesPayablesItem.CashDiscount1Percent as CashDiscount1Percent,
I_ReceivablesPayablesItem.CashDiscount2Days as CashDiscount2Days,
I_ReceivablesPayablesItem.CashDiscount2Percent as CashDiscount2Percent,
I_ReceivablesPayablesItem.CashDiscountAmount as CashDiscountAmount,
I_ReceivablesPayablesItem.CashDiscountAmtInCoCodeCrcy as CashDiscountAmtInCoCodeCrcy,
I_ReceivablesPayablesItem.CashDiscountBaseAmount as CashDiscountBaseAmount,
I_ReceivablesPayablesItem.CashFlowType as CashFlowType,
I_ReceivablesPayablesItem.ClearingAccountingDocument as ClearingAccountingDocument,
I_ReceivablesPayablesItem.ClearingDate as ClearingDate,
I_ReceivablesPayablesItem.ClearingDocFiscalYear as ClearingDocFiscalYear,
I_ReceivablesPayablesItem.ClearingIsReversed as ClearingIsReversed,
I_ReceivablesPayablesItem.CompanyCodeCurrency as CompanyCodeCurrency,
I_ReceivablesPayablesItem.CostCenter as CostCenter,
I_ReceivablesPayablesItem.CreditControlArea as CreditControlArea,
I_ReceivablesPayablesItem.AlternativePayeePayer as PayableAlternativePayee,
I_ReceivablesPayablesItem.DataExchangeInstruction1 as DataExchangeInstruction1,
I_ReceivablesPayablesItem.DataExchangeInstruction2 as DataExchangeInstruction2,
I_ReceivablesPayablesItem.DataExchangeInstruction3 as DataExchangeInstruction3,
I_ReceivablesPayablesItem.DataExchangeInstruction4 as DataExchangeInstruction4,
I_ReceivablesPayablesItem.DebitCreditCode as DebitCreditCode,
I_ReceivablesPayablesItem.DocumentDate as DocumentDate,
' ' as DocumentIsArchived,
I_ReceivablesPayablesItem.DocumentItemText as DocumentItemText,
I_ReceivablesPayablesItem._JournalEntry.DocumentReferenceID as DocumentReferenceID,
I_ReceivablesPayablesItem.DueCalculationBaseDate as DueCalculationBaseDate,
I_ReceivablesPayablesItem.DunningArea as DunningArea,
I_ReceivablesPayablesItem.DunningBlockingReason as DunningBlockingReason,
I_ReceivablesPayablesItem.DunningLevel as DunningLevel,
I_ReceivablesPayablesItem.FinancialAccountType as FinancialAccountType,
I_ReceivablesPayablesItem.FiscalPeriod as FiscalPeriod,
I_ReceivablesPayablesItem.FixedAsset as FixedAsset,
I_ReceivablesPayablesItem.FixedCashDiscount as FixedCashDiscount,
I_ReceivablesPayablesItem.FollowOnDocumentType as FollowOnDocumentType,
I_ReceivablesPayablesItem.StateCentralBankPaymentReason as StateCentralBankPaymentReason,
I_ReceivablesPayablesItem.SupplyingCountry as SupplyingCountry,
I_ReceivablesPayablesItem.FunctionalCurrency as FunctionalCurrency,
I_ReceivablesPayablesItem.FundsCenter as FundsCenter,
I_ReceivablesPayablesItem.GLAccount as GLAccount,
I_ReceivablesPayablesItem.HasPaymentOrder as HasPaymentOrder,
I_ReceivablesPayablesItem.HedgedAmount as HedgedAmount,
I_ReceivablesPayablesItem.HouseBankAccount as HouseBankAccount,
I_ReceivablesPayablesItem.InvoiceList as InvoiceList,
I_ReceivablesPayablesItem.InvoiceReference as InvoiceReference,
I_ReceivablesPayablesItem.IsSalesRelated as IsSalesRelated,
I_ReceivablesPayablesItem.IsUsedInPaymentTransaction as IsUsedInPaymentTransaction,
// Do not use the auxiliary field ITEM_TYPE_BRANCH. It is only for SAP internal usage. It might be removed in the future.
// The field is needed for performance optimization. It specifies the branch of the Union per which a line item was selected.
@Consumption.hidden: true
'BSEG_DEBIT_SIDE_BRANCH' as ITEM_TYPE_BRANCH,
I_ReceivablesPayablesItem.LastDunningDate as LastDunningDate,
I_ReceivablesPayablesItem.MasterFixedAsset as MasterFixedAsset,
I_ReceivablesPayablesItem.DunningKey as DunningKey,
I_ReceivablesPayablesItem.NetDueDate as NetDueDate,
I_ReceivablesPayablesItem.NetPaymentDays as NetPaymentDays,
I_ReceivablesPayablesItem.OffsettingAccount as OffsettingAccount,
I_ReceivablesPayablesItem.OffsettingAccountType as OffsettingAccountType,
I_ReceivablesPayablesItem.OrderID as OrderID,
I_ReceivablesPayablesItem.PartnerCompany as PartnerCompany,
I_ReceivablesPayablesItem.PaymentBlockingReason as PaymentBlockingReason,
I_ReceivablesPayablesItem.PaymentCardItem as PaymentCardItem,
I_ReceivablesPayablesItem.PaymentCardPaymentSettlement as PaymentCardPaymentSettlement,
I_ReceivablesPayablesItem.PaymentCurrency as PaymentCurrency,
I_ReceivablesPayablesItem.PaymentDifferenceReason as PaymentDifferenceReason,
I_ReceivablesPayablesItem.PaymentMethod as PaymentMethod,
I_ReceivablesPayablesItem.PaymentMethodSupplement as PaymentMethodSupplement,
I_ReceivablesPayablesItem.PaymentReference as PaymentReference,
I_ReceivablesPayablesItem.PaymentTerms as PaymentTerms,
I_ReceivablesPayablesItem.PlannedAmtInTransactionCrcy as PlannedAmtInTransactionCrcy,
I_ReceivablesPayablesItem.Plant as Plant,
I_ReceivablesPayablesItem.PostingDate as PostingDate,
I_ReceivablesPayablesItem.PostingKey as PostingKey,
I_ReceivablesPayablesItem.ProfitCenter as ProfitCenter,
I_ReceivablesPayablesItem.PurchasingDocument as PurchasingDocument,
I_ReceivablesPayablesItem.PurchasingDocumentItem as PurchasingDocumentItem,
I_ReceivablesPayablesItem.RealEstateObject as RealEstateObject,
I_ReceivablesPayablesItem.Reference1IDByBusinessPartner as Reference1IDByBusinessPartner,
I_ReceivablesPayablesItem.Reference2IDByBusinessPartner as Reference2IDByBusinessPartner,
I_ReceivablesPayablesItem.Reference3IDByBusinessPartner as Reference3IDByBusinessPartner,
I_ReceivablesPayablesItem.SalesDocument as SalesDocument,
I_ReceivablesPayablesItem.SalesDocumentItem as SalesDocumentItem,
I_ReceivablesPayablesItem.ScheduleLine as ScheduleLine,
I_ReceivablesPayablesItem.SettlementReferenceDate as SettlementReferenceDate,
'' as SourceCompanyCode,
I_ReceivablesPayablesItem.SpecialGLCode as SpecialGLCode,
I_ReceivablesPayablesItem.SpecialGLTransactionType as SpecialGLTransactionType,
MixAcc1.supplier as Supplier,
I_ReceivablesPayablesItem._CompanyCode._Country.TaxCalculationProcedure as TaxCalculationProcedure,
I_ReceivablesPayablesItem.TaxCode as TaxCode,
I_ReceivablesPayablesItem.TaxCountry as TaxCountry,
_JournalEntry.TaxReportingDate as TaxReportingDate,
I_ReceivablesPayablesItem.TaxSection as TaxSection,
I_ReceivablesPayablesItem.TransactionCurrency as TransactionCurrency,
I_ReceivablesPayablesItem.TreasuryContractType as TreasuryContractType,
I_ReceivablesPayablesItem.ValuationDiffAmtInAddlCrcy1 as ValuationDiffAmtInAddlCrcy1,
I_ReceivablesPayablesItem.ValuationDiffAmtInAddlCrcy2 as ValuationDiffAmtInAddlCrcy2,
I_ReceivablesPayablesItem.ValuationDiffAmtInCoCodeCrcy as ValuationDiffAmtInCoCodeCrcy,
I_ReceivablesPayablesItem.ValueDate as ValueDate,
I_ReceivablesPayablesItem.WBSElement as WBSElement,
I_ReceivablesPayablesItem.WithholdingTaxAmount as WithholdingTaxAmount,
I_ReceivablesPayablesItem.WithholdingTaxBaseAmount as WithholdingTaxBaseAmount,
I_ReceivablesPayablesItem.WithholdingTaxExemptionAmt as WithholdingTaxExemptionAmt,
I_ReceivablesPayablesItem.BPBankAccountInternalID as BPBankAccountInternalID,
I_ReceivablesPayablesItem.HouseBank as HouseBank,
I_ReceivablesPayablesItem.Debtor as Debtor,
cast( _JournalEntry.AdditionalCurrency1Role as fis_adl1_currole preserving type ) as AdditionalCurrency1Role,
cast( _JournalEntry.AdditionalCurrency2Role as fis_adl2_currole preserving type ) as AdditionalCurrency2Role,