@AbapCatalog.sqlViewName: 'CSOWFIN'
@EndUserText.label: 'Sales Order Workflow Inbox'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #REQUIRED
@VDM.viewType: #CONSUMPTION
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #XL
@ClientHandling.algorithm: #SESSION_VARIABLE
@Consumption.semanticObject: 'SalesOrder'
@UI.headerInfo:{
title.value: 'DocumentTitle'
}
define view C_SalesOrderWrkflwInbox as select from I_SalesOrder as SalesOrder
left outer join I_SalesOrderPartner as _Partner on SalesOrder.SalesOrder = _Partner.SalesOrder
and _Partner.PartnerFunction = 'WE' //Ship-to party
association [0..1] to I_Customer as _ShipToParty on _Partner.Customer = _ShipToParty.Customer
association [0..*] to C_SalesOrderItmWrkflwInbox as _WorkflowInItem on $projection.SalesOrder = _WorkflowInItem.SalesOrder
{
@UI.facet: [
{
label:'General Information',
id:'GeneralInformation',
isSummary,
type: #COLLECTION,
position: 10
},
{
label: 'Basic data',
id: 'BasicData',
parentId: 'GeneralInformation',
type: #IDENTIFICATION_REFERENCE,
position: 10
},
{
label: 'Sales Data',
id: 'Sales',
parentId: 'GeneralInformation',
type: #FIELDGROUP_REFERENCE,
position: 20,
targetQualifier: 'SOSales'
},
{
label: 'Administrative Data',
id: 'Administrative',
parentId: 'GeneralInformation',
type: #FIELDGROUP_REFERENCE,
position: 30,
targetQualifier: 'SOAdministrative'
},
{
label: 'Items',
id: 'Items',
type: #LINEITEM_REFERENCE,
position: 30,
targetQualifier: 'SOInItems',
targetElement: '_WorkflowInItem'
}
]
@UI.identification: {position: 10}
@EndUserText.label: 'Order'
@Consumption.semanticObject: 'SalesOrder'
key SalesOrder.SalesOrder,
concat_with_space(concat_with_space(_SalesOrderType._Text[1: Language=$session.system_language].SalesDocumentTypeName, '-', 1),
ltrim(SalesOrder.SalesOrder,'0'), 1) as DocumentTitle,
_SoldToParty.CustomerName as CustomerName,
@UI.identification: {position: 20}
@ObjectModel.text.element: [ 'CustomerName' ]
@Consumption.semanticObject: 'Customer'
SoldToParty,
_ShipToParty.CustomerName as ShipToPartyName,
@UI.identification: {position: 30}
@ObjectModel.text.element: [ 'ShipToPartyName' ]
@Consumption.semanticObject: 'Customer'
@EndUserText.label: 'Ship-To Party'
_Partner.Customer as ShipToParty,
@UI.identification: {position: 40}
@EndUserText.label: 'City'
_DfltAddrRprstn.CityName,
_DfltAddrRprstn._Country._Text[1: Language=$session.system_language ].CountryName,
@UI.identification: { position: 50 }
@EndUserText.label: 'Country or Region'
@ObjectModel.text.element: [ 'CountryName' ]
_DfltAddrRprstn.Country as Country,
@UI.identification: {position: 60}
PurchaseOrderByCustomer,
@Semantics.currencyCode: true
TransactionCurrency,
@UI.dataPoint: { qualifier: 'DataPoint01' }
@UI.identification: {position: 70}
@Semantics.amount.currencyCode: 'TransactionCurrency'
TotalNetAmount,
_SDDocumentReason._Text[1: Language=$session.system_language ].SDDocumentReasonText,
@ObjectModel.text.element: [ 'SDDocumentReasonText' ]
@UI.fieldGroup: { qualifier: 'SOSales', position: 10, importance: #MEDIUM }
SDDocumentReason,
_SalesOrderApprovalReason._SDApprovalReasonT[1: Language=$session.system_language ].SDApprovalReasonName,
@EndUserText.label: 'Approval Request Reason'
@ObjectModel.text.element: [ 'SDApprovalReasonName' ]
@UI.fieldGroup: { qualifier: 'SOSales', position: 20, importance: #MEDIUM }
SalesOrderApprovalReason,
_TotalCreditCheckStatus._Text[1: Language=$session.system_language ].TotalCreditCheckStatusDesc,
@EndUserText.label: 'Overall Credit Status'
@ObjectModel.text.element: [ 'TotalCreditCheckStatusDesc' ]
@UI.fieldGroup: { qualifier: 'SOSales', position: 25, importance: #MEDIUM }
TotalCreditCheckStatus,
_SalesOrganization._Text[1: Language=$session.system_language ].SalesOrganizationName,
@ObjectModel.text.element: [ 'SalesOrganizationName' ]
@UI.fieldGroup: { qualifier: 'SOSales', position: 30, importance: #MEDIUM }
SalesOrganization,
_DistributionChannel._Text[1: Language=$session.system_language ].DistributionChannelName,
@ObjectModel.text.element: [ 'DistributionChannelName' ]
@UI.fieldGroup: { qualifier: 'SOSales', position: 40, importance: #MEDIUM }
DistributionChannel,
_OrganizationDivision._Text[1: Language=$session.system_language ].DivisionName,
@ObjectModel.text.element: [ 'DivisionName' ]
@UI.fieldGroup: { qualifier: 'SOSales', position: 50, importance: #MEDIUM }
OrganizationDivision,
@Semantics.text: true
_CreatedByUser.UserDescription as UserName,
@ObjectModel.text.element: [ 'UserName' ]
@UI.fieldGroup: { qualifier: 'SOAdministrative', position: 80, importance: #MEDIUM }
CreatedByUser,
@UI.fieldGroup: { qualifier: 'SOAdministrative', position: 90, importance: #MEDIUM }
@EndUserText.label: 'Created On'
CreationDate,
@Semantics.text: true
_LastChangedByUser.UserDescription,
@ObjectModel.text.element: [ 'UserDescription' ]
@UI.fieldGroup: { qualifier: 'SOAdministrative', position: 100, importance: #MEDIUM }
LastChangedByUser,
@UI.fieldGroup: { qualifier: 'SOAdministrative', position: 110, importance: #MEDIUM }
@EndUserText.label: 'Last Changed On'
LastChangeDateTime,
SalesOrderType,
//Associations
@ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
_WorkflowInItem,
_SoldToParty,
_TransactionCurrency,
_SalesOrganization,
_DistributionChannel,
_OrganizationDivision,
_SalesOrderApprovalReason,
_TotalCreditCheckStatus,
_SDDocumentReason,
_SalesOrderType,
_CreatedByUser,
_LastChangedByUser
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ADDRESS_2",
"I_COUNTRY",
"I_COUNTRYTEXT",
"I_CUSTOMER",
"I_DISTRIBUTIONCHANNEL",
"I_DISTRIBUTIONCHANNELTEXT",
"I_DIVISION",
"I_DIVISIONTEXT",
"I_SALESDOCUMENTTYPETEXT",
"I_SALESORDER",
"I_SALESORDERAPPROVALREASON",
"I_SALESORDERPARTNER",
"I_SALESORDERTYPE",
"I_SALESORGANIZATION",
"I_SALESORGANIZATIONTEXT",
"I_SDAPPROVALREASONT",
"I_SDDOCUMENTREASON",
"I_SDDOCUMENTREASONTEXT",
"I_TOTALCREDITCHECKSTATUS",
"I_TOTALCREDITCHECKSTATUSTEXT",
"I_USER"
],
"ASSOCIATED":
[
"C_SALESORDERITMWRKFLWINBOX",
"I_CURRENCY",
"I_CUSTOMER",
"I_DISTRIBUTIONCHANNEL",
"I_DIVISION",
"I_SALESORDERAPPROVALREASON",
"I_SALESORDERTYPE",
"I_SALESORGANIZATION",
"I_SDDOCUMENTREASON",
"I_TOTALCREDITCHECKSTATUS",
"I_USER"
],
"BASE":
[
"I_SALESORDER"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/