@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM: {
private: true ,
viewType: #CONSUMPTION
}
define view entity P_LogcDocSales
as select from I_SalesDocument as SalesDocument
{
key SalesDocument.SalesDocument,
// map to the defined logistic document categories of pc if_ehfnd_logistic_comn_c
cast (
case
when SalesDocument.SDDocumentCategory = 'C'
then 'SO' // Sales Order (EHFND_LOG_DOC_CATEGORY)
when SalesDocument.SDDocumentCategory = 'I'
then 'OC' // Sales Order Without Charge (EHFND_LOG_DOC_CATEGORY)
when SalesDocument.SDDocumentCategory = 'E' or
SalesDocument.SDDocumentCategory = 'F'
then 'SA' // Scheduling Agreement (EHFND_LOG_DOC_CATEGORY)
end
as ehfnd_log_doc_category) as ProdCmplncLogsDocumentCategory,
//Needed for Authorization check
@ObjectModel.readOnly:true
@Consumption.hidden: true
SalesDocumentType,
@ObjectModel.readOnly:true
@Consumption.hidden: true
OrganizationDivision,
@ObjectModel.readOnly:true
@Consumption.hidden: true
SalesOrganization,
@ObjectModel.readOnly:true
@Consumption.hidden: true
DistributionChannel
}
where
(
SalesDocument.SDDocumentCategory = 'C' // if_ehfnd_sd_integration_c=>gc_vbtypl-order
or SalesDocument.SDDocumentCategory = 'I' // if_ehfnd_sd_integration_c=>gc_vbtypl-order_wo_charge
or SalesDocument.SDDocumentCategory = 'E' // if_ehfnd_sd_integration_c=>gc_vbtypl-scheduling_agreement
or SalesDocument.SDDocumentCategory = 'F' // if_ehfnd_sd_integration_c=>gc_vbtypl-sched_agreement_w_ext_svc_agnt
)
// filter blocked logistic document
// and (
// OverallDangerousGoodsStatus <> 'D' // dom_total_dgsta - Blocked – Dangerous Goods Transport Forbidden
// and OverallDangerousGoodsStatus <> 'C' // dom_total_dgsta - Partially Blocked – Dangerous Goods Transport Forbidden
// )
/*+[internal] {
"BASEINFO":
{
"FROM ":
[
"I_SALESDOCUMENT"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Depth:
1
2
3
4
5
All
Reload
P_LogcDocSales view_entity