@AbapCatalog.sqlViewName : 'CSLSDOCBYOBJSTS'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label : 'Sales Documents by Object Status'
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #CONSUMPTION
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #L
@Search.searchable: true
@ObjectModel.semanticKey: [ 'SalesDocument', 'SalesDocumentItem' ]
@UI.headerInfo: {
typeName: 'Sales Document',
typeNamePlural: 'Sales Documents',
title: {
type: #STANDARD,
value: 'SalesDocumentItem'
}
}
define view C_SalesDocumentByObjectStatus
as select from I_SalesDocument as SalesDocument
inner join P_SalesDocumentByMultObjSts( im_clnt : $session.client ) as SalesDocumentByMultObjSts
on SalesDocumentByMultObjSts.SalesDocument = SalesDocument.SalesDocument
association [0..1] to I_SalesDocumentItem as _SalesDocumentItem on $projection.SalesDocument = _SalesDocumentItem.SalesDocument
and $projection.SalesDocumentItem = _SalesDocumentItem.SalesDocumentItem
association [0..1] to C_Incompl_SalesDocCatVH as _SalesDocumentCategory on $projection.SDDocumentCategory = _SalesDocumentCategory.SDDocumentCategory
association [0..1] to C_Incompl_SalesDocTypeVH as _SalesDocumentType on $projection.SDDocumentCategory = _SalesDocumentType.SDDocumentCategory
and $projection.SalesDocumentType = _SalesDocumentType.SalesDocumentType
association [0..1] to C_SoldToValueHelp as _SoldToParty on $projection.SoldToParty = _SoldToParty.Customer
association [0..1] to I_MaterialStdVH as _MaterialVH on $projection.Material = _MaterialVH.Material
association [0..1] to C_SalesDocumentUserVH as _CreatedByUser on $projection.CreatedByUser = _CreatedByUser.UserID
association [0..1] to I_Currency as _TransactionCurrency on $projection.TransactionCurrency = _TransactionCurrency.Currency
association [0..1] to I_SalesOrganization as _SalesOrganization on $projection.SalesOrganization = _SalesOrganization.SalesOrganization
association [0..1] to C_Dischannelvaluehelp as _DistributionChannel on $projection.SalesOrganization = _DistributionChannel.SalesOrganization
and $projection.DistributionChannel = _DistributionChannel.DistributionChannel
association [0..1] to C_OrgDivisionValueHelp as _OrganizationDivision on $projection.SalesOrganization = _OrganizationDivision.SalesOrganization
and $projection.DistributionChannel = _OrganizationDivision.DistributionChannel
and $projection.OrganizationDivision = _OrganizationDivision.Division
association [0..1] to C_SalesOfficeValueHelp as _SalesOffice on $projection.SalesOrganization = _SalesOffice.SalesOrganization
and $projection.DistributionChannel = _SalesOffice.DistributionChannel
and $projection.OrganizationDivision = _SalesOffice.OrganizationDivision
and $projection.SalesOffice = _SalesOffice.SalesOffice
association [0..1] to C_SalesGroupValueHelp as _SalesGroup on $projection.SalesOffice = _SalesGroup.SalesOffice
and $projection.SalesGroup = _SalesGroup.SalesGroup
association [0..1] to I_OverallSDProcessStatus as _OverallSDProcessStatus on $projection.OverallSDProcessStatus = _OverallSDProcessStatus.OverallSDProcessStatus
//Extension Association
association [1] to E_SalesDocumentBasic as _Extension on $projection.SalesDocument = _Extension.SalesDocument
association [1] to E_SalesDocumentItemBasic as _ItemExtension on $projection.SalesDocument = _ItemExtension.SalesDocument
and $projection.SalesDocumentItem = _ItemExtension.SalesDocumentItem
{
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold : 0.8
@Search.ranking: #HIGH
@UI: {
selectionField: [ { position: 10 } ],
lineItem: [ { position: 10, importance: #HIGH } ]
}
key SalesDocument.SalesDocument,
@UI: {
lineItem: [ { position: 11, importance: #HIGH } ]
}
key SalesDocumentByMultObjSts.SalesDocumentItem,
@Consumption.filter .hidden: true
@UI: {
lineItem: [ { position: 40, importance: #HIGH } ]
}
SalesDocumentByMultObjSts.SystemStatusName,
@Consumption.filter .hidden: true
@UI: {
lineItem: [ { position: 50 } ]
}
SalesDocumentByMultObjSts.UserStatusName,
@Consumption.filter .hidden: true
SalesDocumentByMultObjSts.SystemStatusShortName,
@Consumption.filter .hidden: true
SalesDocumentByMultObjSts.UserStatusShortName,
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold : 0.8
@Consumption.valueHelp : '_SalesDocumentCategory'
@ObjectModel.foreignKey.association : '_SalesDocumentCategory'
SalesDocument.SDDocumentCategory,
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold : 0.8
@Consumption.valueHelp : '_SalesDocumentType'
@ObjectModel.foreignKey.association : '_SalesDocumentType'
@UI: {
lineItem: [ { position: 20 } ]
}
SalesDocument.SalesDocumentType,
@Consumption.semanticObject : 'Customer'
@Consumption.valueHelpDefinition: [{association : '_SoldToParty'}]
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold : 0.8
@ObjectModel.foreignKey.association : '_SoldToParty'
@UI: {
selectionField: [ { position: 60 } ],
lineItem: [ { position: 30 } ]
}
SalesDocument.SoldToParty,
@Consumption.semanticObject : 'Material'
@Consumption.valueHelpDefinition: [{ entity : { name: 'I_ProductStdVH', element: 'Product' }}]
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold : 0.8
@ObjectModel.foreignKey.association : '_MaterialVH'
@UI: {
lineItem: [ { position: 60 } ]
}
cast (_SalesDocumentItem.Material as productnumber preserving type ) as Material,
@Consumption.semanticObject : 'UserID'
@Consumption.valueHelp : '_CreatedByUser'
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold : 0.9
@ObjectModel.foreignKey.association : '_CreatedByUser'
@UI: {
selectionField: [ { position: 80 } ]
}
SalesDocument.CreatedByUser,
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold : 0.8
@Consumption.filter .hidden: true
SalesDocument.PurchaseOrderByCustomer,
@Semantics.systemDate.createdAt: true
SalesDocument.CreationDate,
// Pricing
@DefaultAggregation: #NONE
@Semantics.amount.currencyCode : 'TransactionCurrency'
@Consumption.filter .hidden: true
@UI: {
lineItem: [ { position: 70 } ]
}
cast ((case when SalesDocumentByMultObjSts.SalesDocumentItem = '000000' then SalesDocument.TotalNetAmount else _SalesDocumentItem.NetAmount end ) as netwr_ap preserving type) as NetAmount,
@UI.hidden: true
@Semantics.currencyCode: true
@ObjectModel.foreignKey.association : '_TransactionCurrency'
cast ((case when SalesDocumentByMultObjSts.SalesDocumentItem = '000000' then SalesDocument.TransactionCurrency else _SalesDocumentItem.TransactionCurrency end ) as waerk preserving type) as TransactionCurrency,
// Sales Area
@Consumption.valueHelpDefinition: [{entity :{name:'C_SalesDocSalesOrganizationVH', element:'SalesOrganization'} }]
@UI: {
selectionField: [ { position: 40 } ]
}
SalesDocument.SalesOrganization,
@Consumption.valueHelp : '_DistributionChannel'
@UI: {
selectionField: [ { position: 50 } ]
}
SalesDocument.DistributionChannel,
@Consumption.valueHelp : '_OrganizationDivision'
SalesDocument.OrganizationDivision,
@Consumption.valueHelp : '_SalesOffice'
SalesDocument.SalesOffice,
@Consumption.valueHelp : '_SalesGroup'
SalesDocument.SalesGroup,
// Shipping
SalesDocument.RequestedDeliveryDate,
// Status
@UI.textArrangement: #TEXT_ONLY
@UI: {selectionField: [ { position: 95 } ]}
@ObjectModel.foreignKey.association : '_OverallSDProcessStatus'
SalesDocument.OverallSDProcessStatus,
@Consumption.filter .hidden: true
_SalesDocumentCategory,
@Consumption.filter .hidden: true
_SalesDocumentType,
@Consumption.filter .hidden: true
_SoldToParty,
@Consumption.filter .hidden: true
_CreatedByUser,
@Consumption.filter .hidden: true
_TransactionCurrency,
@Consumption.filter .hidden: true
_OverallSDProcessStatus,
@Consumption.filter .hidden: true
_SalesOrganization,
@Consumption.filter .hidden: true
_DistributionChannel,
@Consumption.filter .hidden: true
_OrganizationDivision,
@Consumption.filter .hidden: true
_SalesOffice,
@Consumption.filter .hidden: true
_SalesGroup,
@Consumption.filter .hidden: true
_MaterialVH
} where
SalesDocument.SDDocumentCategory = 'A' // Inquiry
or SalesDocument.SDDocumentCategory = 'B' // Quotation
or SalesDocument.SDDocumentCategory = 'C' // Order
or SalesDocument.SDDocumentCategory = 'D' // Item Proposal
or SalesDocument.SDDocumentCategory = 'G' // Contract
or SalesDocument.SDDocumentCategory = 'H' // Returns
or SalesDocument.SDDocumentCategory = 'I' // Order w/o charge
or SalesDocument.SDDocumentCategory = 'K' // Credit memo request
or SalesDocument.SDDocumentCategory = 'L' // Debit memo request
Depth:
1
2
3
4
5
All
Reload
C_SalesDocumentByObjectStatus view