C_ProjBillingInProcessDetails

DDL: C_PROJBILLINGINPROCESSDETAILS Type: view_entity CONSUMPTION Package: VDM_PROJECTBILLINGELEMENT

Details of Billing in Process

C_ProjBillingInProcessDetails is a Consumption CDS View that provides data about "Details of Billing in Process" in SAP S/4HANA. It reads from 1 data source (P_ProjBillgInProcAggrgdDetails) and exposes 10 fields with key fields ProjectBillingElementUUID, ProjectBillingRequest, BillingDocumentRequest. It has 1 association to related views. It is exposed through 2 OData services (PROJECTBILLINGELEMENT_SD, UI_PROJECTBILLINGELEMENT). Part of development package VDM_PROJECTBILLINGELEMENT.

Data Sources (1)

SourceAliasJoin Type
P_ProjBillgInProcAggrgdDetails P_ProjBillgInProcAggrgdDetails from

Associations (1)

CardinalityTargetAliasCondition
[0..1] I_BillingDocumentTypeText_2 _BillingDocumentTypeText $projection.BillingDocumentType = _BillingDocumentTypeText.BillingDocumentType and _BillingDocumentTypeText.Language = $session.system_language

Annotations (6)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label Details of Billing in Process view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
VDM.viewType #CONSUMPTION view

OData Services (2)

ServiceBindingVersionContractRelease
PROJECTBILLINGELEMENT_SD UI_PROJBILLGELMNT_SB_V2 V2 C1 NOT_TO_BE_RELEASED_STABLE
UI_PROJECTBILLINGELEMENT UI_PROJECTBILLINGELEMENT V4 C1 NOT_RELEASED

Fields (10)

KeyFieldSource TableSource FieldDescription
KEY ProjectBillingElementUUID ProjectBillingElementUUID
KEY ProjectBillingRequest ProjectBillingRequest
KEY BillingDocumentRequest BillingDocumentRequest BDR
BillingDocumentType BillingDocumentType
ProjectBillingRequestUUID ProjectBillingRequestUUID
ProjBillgReqApprovalStatusText ProjBillgReqApprovalStatusText PBR Approval Status
PrjBlgElmEntrDocBillgStsText PrjBlgElmEntrDocBillgStsText
DocumentCurrency DocumentCurrency
BillgReqdRevenueAmtInDocCrcy BillgReqdRevenueAmtInDocCrcy Net Amount
_BillingDocumentTypeText _BillingDocumentTypeText
@AccessControl.authorizationCheck: #MANDATORY
@EndUserText.label: 'Details of Billing in Process'

@ObjectModel.usageType: {
    serviceQuality: #C,
    sizeCategory: #L,
    dataClass: #TRANSACTIONAL
}

@VDM.viewType: #CONSUMPTION

@UI.presentationVariant: [{sortOrder: [{by: 'ProjectBillingRequest' , direction: #DESC}]}]
define view entity C_ProjBillingInProcessDetails
    as select from P_ProjBillgInProcAggrgdDetails
//  as select distinct from P_ProjBillingInProcessDetails

//  association [0..1] to I_ProjectBillingElementEntryTP as _ProjectBillingElementEntryTP on $projection.ProjectBillingElementUUID = _ProjectBillingElementEntryTP.ProjectBillingElementUUID

  association [0..1] to I_BillingDocumentTypeText_2 as _BillingDocumentTypeText on $projection.BillingDocumentType = _BillingDocumentTypeText.BillingDocumentType
                                                                               and _BillingDocumentTypeText.Language = $session.system_language

{
  key     ProjectBillingElementUUID,

          @UI.lineItem: [{position: 10}]
          @ObjectModel.sort.enabled: true
  key     ProjectBillingRequest,

          @UI.lineItem: [{position: 30 }]
          @EndUserText.label: 'BDR'
          @EndUserText.quickInfo: 'Billing Document Request'
  key     BillingDocumentRequest,
              
          @ObjectModel.text.association: '_BillingDocumentTypeText'              
          BillingDocumentType,
    
          ProjectBillingRequestUUID,

          @UI.hidden: true
          case ProjBillgReqApprovalStatus
            when 'P' then 2  // orange for In Approval

            when 'A' then 3  // green for Approved

            when 'R' then 2  // orange for Rejected

            else 0
           end as UICT_PrjBlgReqApprvlStsCritlty,

          @UI.lineItem: [{ position: 20, criticality: 'UICT_PrjBlgReqApprvlStsCritlty', criticalityRepresentation: #WITHOUT_ICON }]
          @EndUserText.label: 'PBR Approval Status'
          @EndUserText.quickInfo: 'PBR Approval Status'
          ProjBillgReqApprovalStatusText,

          @UI.hidden: true
          case PrjBlgElmEntrDocBillgSts
           when 'A' then 2 // orange for To be invoiced

           when 'D' then 2 // orange for Rejected

           when 'C' then 3 // green for Invoiced

          else 0
          end  as UICT_PrjBlgDocBillgStsCritlty,

//          @UI.lineItem: [{ position: 40, criticality: 'UICT_PrjBlgDocBillgStsCritlty', criticalityRepresentation: #WITHOUT_ICON }]

//          @EndUserText.label: 'BDR Status'

//          @EndUserText.quickInfo: 'BDR Status'

          @UI.hidden: true
          PrjBlgElmEntrDocBillgStsText,
          
//          @UI.hidden: true

//        BillingPlanItemUsage,


    
//          case

//          when _ProjectBillingElementEntryTP._PrjBlgElmEntrBillgPlnLink._SalesDocumentBillingPlanItem.BillingPlanItemUsage is initial or _ProjectBillingElementEntryTP._PrjBlgElmEntrBillgPlnLink._SalesDocumentBillingPlanItem.BillingPlanItemUsage is null

//            then ''

//          else

//          _ProjectBillingElementEntryTP._PrjBlgElmEntrBillgPlnLink._SalesDocumentBillingPlanItem.BillingPlanItemUsage

//          end  as BillingPlanItemUsage,




          DocumentCurrency,

          @Semantics: { amount : {currencyCode: 'DocumentCurrency'} }
          @UI.lineItem: [{position: 40 }]
          @EndUserText.label: 'Net Amount'
          @EndUserText.quickInfo: 'Net Amount'
          BillgReqdRevenueAmtInDocCrcy,
          
          _BillingDocumentTypeText

}
//where

//  BillingDocumentType <> ''

//     _ProjectBillingElementEntryTP._PrjBlgElmEntrBillgPlnLink._SalesDocumentBillingPlanItem.BillingPlanItemUsage is null

//  or _ProjectBillingElementEntryTP._PrjBlgElmEntrBillgPlnLink._SalesDocumentBillingPlanItem.BillingPlanItemUsage is initial

//  or _ProjectBillingElementEntryTP._PrjBlgElmEntrBillgPlnLink._SalesDocumentBillingPlanItem.BillingPlanItemUsage = '1'