Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to solve #TO_composition_root in CDS error in custom CDS View

dubbaka
Participant
0 Kudos
376

Hello team,

I am new to CDS views, I have created below CDS View by joining standard CDS views

But I am unable to activate the view due to #TO_composition_root in CDS error

Anyone please suggest a solution for this issue.

@AbapCatalog.sqlViewName: 'ZCACCNTSPAYABLE'

@AbapCatalog.compiler.compareFilter: true

@AbapCatalog.preserveKey: true

@AccessControl.authorizationCheck: #NOT_REQUIRED

@EndUserText.label: 'CDS View Accounts Payable'

define view ZC_ACC_Payable

as select from C_Supplier as A

inner join C_Businesspartnertaxnumber as B

on A.BusinessPartner = B.BusinessPartner

and A.BPTaxType = B.BPTaxType

and A.VATRegistration = B.BPTaxNumber

join C_SupplierUserValueHelp as C

on A.CreatedByUser = C.CreatedByUser

join C_TH_SupplierBranchCodeDefault as d

on A.Supplier = d.Supplier

and A.BranchCode = d.BranchCode

and A.IsDefaultValue = d.IsDefaultValue

join I_BusinessPartnerBank as E

on A.BusinessPartner = E.BusinessPartner

and A.BankName = E.BankName

and A.BankAccount = E.BankAccount

and A.BankCountry = E.BankCountryKey

and A.BankControlKey = E.BankControlKey

and A.BankAccountHolderName = E.BankAccountHolderName

join C_PaymentMethodText as f

on A.PaymentMethodsList = f.PaymentMethod

and A.Country = f.Country

join C_TH_SupplierBranchCodeDefault as g

on A.Supplier = g.Supplier

and A.BranchCode = g.BranchCode

join C_BusinessPartner as h

on A.BusinessPartner = h.BusinessPartner

and A.FullName = h.FullName

{

key B.BusinessPartner,

key B.BPTaxType,

key f.PaymentMethod,

key f.Language,

key f.Country,

key C.CreatedByUser,

key A.Supplier,

key A.CompanyCode,

key A.PurchasingOrganization,

key A.BankCountry,

key A.Bank,

key A.BankAccount,

key d.BranchCode,

key E.BankIdentification,

B.BusinessPartnerForEdit,

B.BPTaxTypeForEdit,

B.BPTaxNumber,

B.TaxTypeName,

h.FullName,

h.BusinessPartnerGrouping,

h.OrganizationFoundationDate,

h.OrganizationLiquidationDate,

h.BusinessPartnerCategory,

h.FormOfAddressPerson,

h.FormOfAddressOrganization,

h.FirstName,

h.LastName,

h.Name,

h.AdditionalName,

h.OrganizationBPName1,

h.OrganizationBPName2,

h.OrganizationBPName3,

h.OrganizationBPName4,

h.LegalForm,

h.Industry,

h.GenderCodeName,

h.AcademicTitle,

h.BirthDate,

h.BusinessPartnerBirthplaceName,

h.Role,

h.CityName,

h.StreetName,

h.CountryName,

h.PostalCode,

h.IndustrySector,

h.HouseNumber,

h.Region,

h.BPLastNameSearchHelp,

h.BPFirstNameSearchHelp,

h.BusinessPartnerUUID,

h.CreationTime,

h.LastChangedByUser,

h.LastChangeDate,

h.LastChangeTime,

h.CreationDate,

h.LastChangedByUserName,

h.CreatedByUserName,

h.SearchTerm1,

h.SearchTerm2,

h.BusinessPartnerIsBlocked,

h.IsNaturalPerson,

h.AuthorizationGroup,

h.IsBusinessPurposeCompleted,

h.BusinessPartnerName,

h.TradingPartner,

h.BusinessPartnerIDByExtSystem,

h.BusinessPartnerImageURL,

h.AddressLine1Text,

h.AddressLine2Text,

h.BPHasEmployeeRoles,

f.PaymentMethodName,

C.Department,

C.EmailAddress,

C.PhoneNumber,

C.MobilePhoneNumber,

A.SupplierName,

A.SupplierCountryName,

A.RegionName,

A.StreetPrefixName,

A.AdditionalStreetPrefixName,

A.StreetSuffixName,

A.AdditionalStreetSuffixName,

A.PhoneNumber1,

A.FaxNumber,

A.PhoneNumber2,

A.TaxNumber1,

A.TaxNumber2,

A.TaxNumber3,

A.TaxNumber4,

A.TaxNumber5,

A.VATRegistration,

A.ResponsibleType,

A.TaxNumberType,

A.TaxNumberResponsible,

A.AddressID,

A.DeletionIndicator,

A.SupplierAccountGroup,

A.AccountGroupName,

A.AccountIsBlockedForPosting,

A.PaymentIsBlockedForSupplier,

A.AlternativePayeeAccountNumber,

A.SearchString,

A.LayoutSortingRule,

A.ReconciliationAccount,

A.PaymentMethodsList,

A.AccountingClerk,

A.AccountingClerkFaxNumber,

A.SupplierClerkURL,

A.AccountingClerkPhoneNumber,

A.SuplrCoCodePaymentTerms,

A.PaymentBlockingReason,

A.SuplrIsDeltdCoCode,

A.CashPlanningGroup,

A.IsToBeCheckedForDuplicates,

A.CompanyCodeName,

A.SupplierIsBlockedForPosting,

A.AlternativePayee,

A.PurOrdAutoGenerationIsAllowed,

A.PurchasingGroup,

A.SupplierPurgOrgPaymentTerms,

A.PurchasingIsBlockedForSupplier,

A.SuplrIsDeltdPurgOrg,

A.InvoiceIsGoodsReceiptBased,

A.PurchaseOrderCurrency,

A.SupplierReleaseGroup,

A.SearchEmailAddress,

A.BankName,

A.BankInternalID,

A.SWIFTCode,

A.IBAN,

A.BankControlKey,

A.BankAccountHolderName,

A.BusPartPOBoxDvtgCityName,

A.VATLiability,

A.WithholdingTaxCountry,

A.MinorityGroup,

A.TH_BranchCodeDescription,

A.IsDefaultValue,

A.PreviousAccountNumber,

E.BankCountryKey,

E.BankNumber,

E.BankAccountName,

E.ValidityStartDate,

E.ValidityEndDate,

E.IBANValidityStartDate,

E.BankAccountReferenceText,

E.CollectionAuthInd,

E.BusinessPartnerExternalBankID,

E.BPBankDetailsChangeDate,

E.BPBankDetailsChangeTargetID,

E.BPBankIsProtected,

/* Associations */

B._BusinessPartner,

B._BusinessPartnerCustomer,

B._BusinessPartnerSupplier,

B._TaxCategoryText,

B._TaxTypeText,

h._AcademicTitleText,

h._AcademicTitleValueHelp,

h._AuthorizationGroupText,

h._BPCatHelpText,

//h._BPCustomerTaxGrouping,

h._BPGenderText,

h._BPGroupingText,

//h._BPIdentificationNumbers,

//h._BPIndustry,

//h._BPSupplierTaxGrouping,

//h._BusinessPartnerAddress,

//h._BusinessPartnerAddrFilter,

//h._BusinessPartnerBank,

//h._BusinessPartnerContact,

//h._BusinessPartnerCustomer,

//h._BusinessPartnerCustomerCo,

//h._BusinessPartnerCustomerTxt,

//h._BusinessPartnerCustRole,

//h._BusinessPartnerPurgOrg,

//h._BusinessPartnerRole,

//h._BusinessPartnerSalesArea,

//h._BusinessPartnerSuplrRole,

//h._BusinessPartnerSupplier,

//h._BusinessPartnerSupplierCo,

//h._BusinessPartnerSupplierTxt,

//h._BusinessPartnerTaxNumber,

//h._BusinessPartnerUnloadingPoint,

h._GenderValueHelp,

h._LegalFormText,

//h._PaymentCard,

C._UserContactCard,

//A._BPTaxNumber,

A._BranchCode,

//A._UserContactCard,

E._Bank

//E._BusinessPartner,

//E._IBAN

//

}

0 REPLIES 0