@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.usageType.serviceQuality: #A
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.representativeKey: 'BillingDocument'
@ObjectModel.compositionRoot: true
@ObjectModel.modelingPattern: #ANALYTICAL_DIMENSION
@ObjectModel.supportedCapabilities: [ #ANALYTICAL_DIMENSION,
#CDS_MODELING_DATA_SOURCE,
#CDS_MODELING_ASSOCIATION_TARGET,
#SQL_DATA_SOURCE,
#EXTRACTION_DATA_SOURCE ]
@Analytics.dataCategory: #DIMENSION
@Analytics: {
dataExtraction: {
enabled: true,
delta.changeDataCapture: {
mapping:[
{
table: 'vbrk', role: #MAIN,
viewElement: ['BillingDocument'],
tableElement: ['vbeln']
}
]
}
}
}
@VDM.viewType: #BASIC
@AccessControl: {
authorizationCheck: #CHECK,
personalData.blocking: #('TRANSACTIONAL_DATA'),
privilegedAssociations: [ '_CreatedByUser', '_DunningAreaText', '_CreditControlAreaText' ]
}
@AbapCatalog.sqlViewName: 'ISDBILLINGDOC'
@AbapCatalog: {
compiler.compareFilter: true,
preserveKey: true
}
@EndUserText.label: 'Billing Document'
@Metadata.allowExtensions: true
@Metadata.ignorePropagatedAnnotations: true
define view I_BillingDocument
as select from I_BillingDocumentBasic
//Association
association [0..*] to I_BillingDocumentItem as _Item on $projection.BillingDocument = _Item.BillingDocument
association [1..*] to I_BillingDocumentPartner as _Partner on $projection.BillingDocument = _Partner.BillingDocument
association [0..*] to I_BillingDocumentPrcgElmnt as _PricingElement on $projection.BillingDocument = _PricingElement.BillingDocument
association [0..1] to I_BillingDocument as _CancelledBillingDocument on $projection.CancelledBillingDocument = _CancelledBillingDocument.BillingDocument
association [1..1] to I_BillingDocEnhancedFields as _EnhancedFields on $projection.BillingDocument = _EnhancedFields.BillingDocument
//Extensibility
association [0..1] to E_BillingDocument as _Extension on $projection.BillingDocument = _Extension.BillingDocument
{
//key
key BillingDocument,
//category
@ObjectModel.foreignKey.association: '_SDDocumentCategory'
SDDocumentCategory,
@ObjectModel.foreignKey.association: '_BillingDocumentCategory'
BillingDocumentCategory,
@ObjectModel.foreignKey.association: '_BillingDocumentType'
BillingDocumentType,
//admin
@Semantics.user.createdBy: true
CreatedByUser,
@Semantics.systemDate.createdAt: true
CreationDate,
@Semantics.systemTime.createdAt
CreationTime,
@Semantics.systemDate.lastChangedAt: true
LastChangeDate,
@Semantics.systemDateTime.lastChangedAt: true
LastChangeDateTime,
@ObjectModel.foreignKey.association: '_LogicalSystem'
LogicalSystem,
//org
@ObjectModel.foreignKey.association: '_SalesOrganization'
SalesOrganization,
@ObjectModel.foreignKey.association: '_DistributionChannel'
DistributionChannel,
@ObjectModel.foreignKey.association: '_Division'
Division,
//billing
BillingDocumentDate,
BillingDocumentIsCancelled,
//--[ GENERATED:012:GlBfhyJl7kY4ufKHo3jjFG
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_BillingDocumentStdVH',
element: 'BillingDocument' }
}]
// ]--GENERATED
@ObjectModel.foreignKey.association: '_CancelledBillingDocument'
CancelledBillingDocument,
BillingDocCombinationCriteria,
ManualInvoiceMaintIsRelevant,
NmbrOfPages,
IsIntrastatReportingRelevant,
IsIntrastatReportingExcluded,
BillingDocumentIsTemporary,
//pricing
@Semantics.amount.currencyCode: 'TransactionCurrency'
TotalNetAmount,
@Semantics.currencyCode: true
@ObjectModel.foreignKey.association: '_TransactionCurrency'
TransactionCurrency,
@Semantics.currencyCode: true
@ObjectModel.foreignKey.association: '_StatisticsCurrency'
StatisticsCurrency,
@Semantics.amount.currencyCode: 'TransactionCurrency'
TotalTaxAmount,
@ObjectModel.foreignKey.association: '_CustomerPriceGroup'
CustomerPriceGroup,
@ObjectModel.foreignKey.association: '_PriceListType'
PriceListType,
@ObjectModel.foreignKey.association: '_TaxDepartureCountry'
TaxDepartureCountry,
VATRegistration,
@ObjectModel.foreignKey.association: '_VATRegistrationOrigin'
VATRegistrationOrigin,
@ObjectModel.foreignKey.association: '_VATRegistrationCountry'
VATRegistrationCountry,
HierarchyTypePricing,
CustomerTaxClassification1,
CustomerTaxClassification2,
CustomerTaxClassification3,
CustomerTaxClassification4,
CustomerTaxClassification5,
CustomerTaxClassification6,
CustomerTaxClassification7,
CustomerTaxClassification8,
CustomerTaxClassification9,
IsEUTriangularDeal,
@ObjectModel.foreignKey.association: '_SDPricingProcedure'
SDPricingProcedure,
//shipping
@ObjectModel.foreignKey.association: '_ShippingCondition'
ShippingCondition,
PlantSupplier,
@ObjectModel.foreignKey.association: '_IncotermsVersion'
IncotermsVersion,
@ObjectModel.foreignKey.association: '_IncotermsClassification'
IncotermsClassification,
IncotermsTransferLocation,
IncotermsLocation1,
IncotermsLocation2,
//payment
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_Customer_VH',
element: 'Customer' }
}]
@ObjectModel.foreignKey.association: '_PayerParty'
PayerParty,
ContractAccount,
@ObjectModel.foreignKey.association: '_CustomerPaymentTerms'
CustomerPaymentTerms,
@ObjectModel.foreignKey.association: '_PaymentMethod'
PaymentMethod,
PaymentReference,
FixedValueDate,
AdditionalValueDays,
SEPAMandate,
//accounting
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_CompanyCodeStdVH',
element: 'CompanyCode' }
}]
@ObjectModel.foreignKey.association: '_CompanyCode'
CompanyCode,
@ObjectModel.foreignKey.association: '_FiscalYear'
FiscalYear,
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_AccountingDocumentStdVH',
element: 'AccountingDocument' },
additionalBinding: [{ localElement: 'CompanyCode',
element: 'CompanyCode' },
{ localElement: 'FiscalYear',
element: 'FiscalYear' }]
}]
@ObjectModel.foreignKey.association: '_AccountingDocument'
AccountingDocument,
FiscalPeriod,
@ObjectModel.foreignKey.association: '_CustomerAccountAssgmtGroup'
CustomerAccountAssignmentGroup,
AccountingExchangeRateIsSet,
AccountingExchangeRate,
ExchangeRateDate,
@ObjectModel.foreignKey.association: '_ExchangeRateType'
ExchangeRateType,
DocumentReferenceID,
AssignmentReference,
@ObjectModel.foreignKey.association: '_ReversalReason'
ReversalReason,
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_DunningAreaStdVH',
element: 'DunningArea' },
additionalBinding: [{ localElement: 'CompanyCode',
element: 'CompanyCode' }]
}]
@ObjectModel.text.association: '_DunningAreaText'
@ObjectModel.foreignKey.association: '_DunningArea'
DunningArea,
@ObjectModel.foreignKey.association: '_DunningBlockingReason'
DunningBlockingReason,
@ObjectModel.foreignKey.association: '_DunningKey'
DunningKey,
InternalFinancialDocument,
IsRelevantForAccrual,
//sales
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_Customer_VH',
element: 'Customer' }
}]
@ObjectModel.foreignKey.association: '_SoldToParty'
SoldToParty,
PartnerCompany,
PurchaseOrderByCustomer,
@ObjectModel.foreignKey.association: '_CustomerGroup'
CustomerGroup,
@ObjectModel.foreignKey.association: '_Country'
Country,
@ObjectModel.foreignKey.association: '_CityCode'
CityCode,
@ObjectModel.foreignKey.association: '_SalesDistrict'
SalesDistrict,
@ObjectModel.foreignKey.association: '_Region'
Region,
@ObjectModel.foreignKey.association: '_County_2'
County,
@Consumption.valueHelpDefinition: [
{ entity: { name: 'I_CreditControlAreaStdVH',
element: 'CreditControlArea' }
}]
@ObjectModel.text.association: '_CreditControlAreaText'
@ObjectModel.foreignKey.association: '_CreditControlArea'
CreditControlArea,
CustomerRebateAgreement,
PricingDocument,
//status
@ObjectModel.foreignKey.association: '_OverallSDProcessStatus'
OverallSDProcessStatus,
@ObjectModel.foreignKey.association: '_OverallBillingStatus'
OverallBillingStatus,
@ObjectModel.foreignKey.association: '_AccountingPostingStatus'
AccountingPostingStatus,
@ObjectModel.foreignKey.association: '_AccountingTransferStatus'
AccountingTransferStatus,
@ObjectModel.foreignKey.association: '_BillingIssueType'
BillingIssueType,
@ObjectModel.foreignKey.association: '_InvoiceListStatus'
InvoiceListStatus,
@ObjectModel.foreignKey.association: '_OvrlItmGeneralIncompletionSts'
OvrlItmGeneralIncompletionSts,
@ObjectModel.foreignKey.association: '_OverallPricingIncompletionSts'
OverallPricingIncompletionSts,
@ObjectModel.foreignKey.association: '_InvoiceClearingStatus'
InvoiceClearingStatus,
//billing document list
@ObjectModel.foreignKey.association: '_InvoiceListType'
InvoiceListType,
InvoiceListBillingDate,
//association
@ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
_Item,
@ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
_Partner,
@ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
_PricingElement,
_SDDocumentCategory,
_BillingDocumentCategory,
_BillingDocumentType,
_CreatedByUser,
_LogicalSystem,
_SalesOrganization,
_DistributionChannel,
_Division,
_CancelledBillingDocument,
_TransactionCurrency,
_StatisticsCurrency,
_CustomerPriceGroup,
_PriceListType,
_TaxDepartureCountry,
_VATRegistrationOrigin,
_VATRegistrationCountry,
_SDPricingProcedure,
_ShippingCondition,
_IncotermsClassification,
_IncotermsVersion,
_PayerParty,
_CustomerPaymentTerms,
_PaymentMethod,
_CompanyCode,
_FiscalYear,
_AccountingDocument,
//_FiscalPeriod,
_CustomerAccountAssgmtGroup,
_ExchangeRateType,
_ReversalReason,
_DunningArea,
_DunningBlockingReason,
_DunningKey,
_InvoiceListType,
_SoldToParty,
_CustomerGroup,
_Country,
_CityCode,
_SalesDistrict,
_Region,
@API.element: { releaseState: #DEPRECATED, successor: '_County_2' }
_County,
_County_2,
_CreditControlArea,
_OverallSDProcessStatus,
_OverallBillingStatus,
_AccountingPostingStatus,
_AccountingTransferStatus,
_BillingIssueType,
_InvoiceListStatus,
_OvrlItmGeneralIncompletionSts,
_OverallPricingIncompletionSts,
_EnhancedFields,
_InvoiceClearingStatus,
@Consumption.hidden: true
_DunningAreaText,
@Consumption.hidden: true
_CreditControlAreaText
}
where
SDDocumentCategory = 'M' // Invoice
or SDDocumentCategory = 'N' // Invoice Canceled
or SDDocumentCategory = 'O' // Credit Memo
or SDDocumentCategory = 'P' // Debit Memo
or SDDocumentCategory = 'S' // Credit Memo Canceled
or SDDocumentCategory = 'U' // Pro Forma Invoice
or SDDocumentCategory = '5' // Intercompany Invoice
or SDDocumentCategory = '6' // Intercompany Credit Memo
or SDDocumentCategory = 'ICPF' // Intercompany Pro Forma Invoice
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BILLINGDOCUMENTBASIC"
],
"ASSOCIATED":
[
"E_BILLINGDOCUMENT",
"I_ACCOUNTINGDOCUMENT",
"I_ACCOUNTINGPOSTINGSTATUS",
"I_ACCOUNTINGTRANSFERSTATUS",
"I_BILLINGDOCENHANCEDFIELDS",
"I_BILLINGDOCUMENTCATEGORY",
"I_BILLINGDOCUMENTITEM",
"I_BILLINGDOCUMENTPARTNER",
"I_BILLINGDOCUMENTPRCGELMNT",
"I_BILLINGDOCUMENTTYPE",
"I_BILLINGISSUETYPE",
"I_CITYCODE",
"I_COMPANYCODE",
"I_COUNTRY",
"I_COUNTYCODE",
"I_CREDITCONTROLAREA",
"I_CREDITCONTROLAREATEXT",
"I_CURRENCY",
"I_CUSTOMER",
"I_CUSTOMERACCOUNTASSGMTGROUP",
"I_CUSTOMERGROUP",
"I_CUSTOMERPAYMENTTERMS",
"I_CUSTOMERPRICEGROUP",
"I_DISTRIBUTIONCHANNEL",
"I_DIVISION",
"I_DUNNINGAREA",
"I_DUNNINGAREATEXT",
"I_DUNNINGBLOCKINGREASONCODE",
"I_DUNNINGKEY",
"I_EXCHANGERATETYPE",
"I_FISCALYEARFORCOMPANYCODE",
"I_INCOTERMSCLASSIFICATION",
"I_INCOTERMSVERSION",
"I_INVOICECLEARINGSTATUS",
"I_INVOICELISTSTATUS",
"I_LOGICALSYSTEM",
"I_OVERALLBILLINGSTATUS",
"I_OVERALLPRCINCOMPLETIONSTS",
"I_OVERALLSDPROCESSSTATUS",
"I_OVRLITMGENINCOMPLETIONSTS",
"I_PAYMENTMETHOD",
"I_PRICELISTTYPE",
"I_REGION",
"I_REVERSALREASON",
"I_SALESDISTRICT",
"I_SALESORGANIZATION",
"I_SDDOCUMENTCATEGORY",
"I_SHIPPINGCONDITION",
"I_SLSPRICINGPROCEDURE",
"I_TAXINGCOUNTY",
"I_USER",
"I_VATREGISTRATIONORIGIN"
],
"BASE":
[
"I_BILLINGDOCUMENTBASIC"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/