C_SRVCDOCDOCUMENTFLOW

CDS View

Transac Hist of Orders and Confirmations

C_SRVCDOCDOCUMENTFLOW is a CDS View in S/4HANA. Transac Hist of Orders and Confirmations. It contains 6 fields. 3 CDS views read from this table.

CDS Views using this table (3)

ViewTypeJoinVDMDescription
P_ServiceOrderBpfPrdcssr view_entity from COMPOSITE Process Flow for Predecessor Service Transactions
P_ServiceOrderBpfSuccssr view_entity from COMPOSITE BPF for Succssr Service Transactions
P_ServiceOrderBpfSuccssr view_entity union COMPOSITE BPF for Succssr Service Transactions

Fields (6)

KeyField CDS FieldsUsed in Views
KEY CustMgmtPrdcssrTransactionKey CustMgmtPrdcssrTransactionKey,PrecedingDocument,SubsequentDocument 2
KEY ServiceDocument ServiceDocument 2
KEY ServiceDocumentRelationUUID ServiceDocumentRelationUUID 2
PrdcssrSuccssrDocObjectType SubsequentDocumentCategory 1
ServiceOrder ServiceOrder 2
SrvcMgmtObjectUUID SrvcMgmtObjectUUID 2
@AbapCatalog.sqlViewName: 'CSRVCDOCFLW'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Transac Hist of Orders and Confirmations'
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM: {
  viewType: #CONSUMPTION
}
@Search.searchable: true
@ObjectModel: {
   semanticKey:  [ 'ServiceDocument' ],
   representativeKey: 'ServiceDocument',
   usageType: {
     dataClass:      #TRANSACTIONAL,
     serviceQuality: #C,
     sizeCategory:   #XL
   }
}

@UI.presentationVariant: [{requestAtLeast:['ServiceOrder','PrdcssrSuccssrDocObjectType','ServiceDocumentIsQuotation','PrdcssrSuccssrSemanticObjTxt','PrdcssrSuccssrSemanticActnTxt','ReferenceDocumentFiscalYear']}]
@UI.selectionVariant: [{qualifier: 'Alltems',text: 'Orders' ,filter : 'ServiceObjectType EQ "BUS2000116"' },
{qualifier: 'Confirmations',text: 'Confirmations', filter : 'ServiceObjectType EQ "BUS2000117"' }]

define view C_SrvcDocDocumentFlow
  as select from I_SrvcDocDocumentFlow
  association [1..1] to I_ServiceDocumentEnhcd         as _ServiceDocumentEnhcd         on  $projection.SrvcMgmtObjectUUID          = _ServiceDocumentEnhcd.ServiceDocumentUUID
                                                                                        and _ServiceDocumentEnhcd.ServiceObjectType = $projection.PrdcssrSuccssrDocObjectType
  association [1..1] to I_BusinessObjType              as _BusinessObjType              on  $projection.PrdcssrSuccssrDocObjectType = _BusinessObjType.BusinessObjectType
  
  association [1..1] to I_BusinessObjType              as _PrdcssrBusinessObjType              on  $projection.ServiceDocPrdcssrBusObjType = _PrdcssrBusinessObjType.BusinessObjectType
  
  association [1..1] to I_BusinessObjType              as _SuccssrBusinessObjType              on  $projection.ServiceDocSuccessorBusObjType = _SuccssrBusinessObjType.BusinessObjectType

  association [1..1] to I_SrvcPrdcssrSuccssrBinaryLink as _SrvcPrdcssrSuccssrBinaryLink on  $projection.ServiceDocumentRelationUUID = _SrvcPrdcssrSuccssrBinaryLink.ServiceDocumentRelationUUID

{
         @UI.hidden: true
  key    ServiceDocument,
         @UI: {
              lineItem: [ { position: 10,importance: #HIGH } ]
              }
         // @Search: {defaultSearchElement: true , ranking: #HIGH}

         @EndUserText.label: 'Transaction'
         //  key    CustMgmtPrdcssrTransactionKey,

  key    case  PrdcssrSuccssrDocObjectType
         when 'BUS2000117'
         then _ServiceDocumentEnhcd.ServiceDocument
         when 'BUS2000116'
         then _ServiceDocumentEnhcd.ServiceDocument
         when 'BUS2000112'
         then _ServiceDocumentEnhcd.ServiceDocument
         when 'BUS2000172'
         then _ServiceDocumentEnhcd.ServiceDocument
          when 'BUS2017'
           then substring(CustMgmtPrdcssrTransactionKey,  1, 10)
          when 'BUS2081'
           then substring(CustMgmtPrdcssrTransactionKey, 1, 10)
          else CustMgmtPrdcssrTransactionKey     end as CustMgmtPrdcssrTransactionKey,
         @UI.hidden: true
  key    ServiceDocumentRelationUUID,
         @UI: {
          lineItem: [ { position: 60,importance: #HIGH } ]
         }
        @EndUserText.label: 'Successor Reference Object'
        @ObjectModel.foreignKey.association: '_SuccssrBusinessObjType'
        ServiceDocSuccessorBusObjType,
        
        
          @UI: {
          lineItem: [ { position: 50,importance: #HIGH } ],
          textArrangement: #TEXT_FIRST
         }
        @EndUserText.label: 'Predecessor Reference Object'
        @ObjectModel.foreignKey.association: '_PrdcssrBusinessObjType'
        ServiceDocPrdcssrBusObjType,
        
         PrdcssrSuccssrDocObjectType,

         @UI.hidden: true
         _ServiceDocumentEnhcd.ServiceDocumentIsQuotation,
         @UI.hidden: true
         SrvcMgmtObjectUUID,
         ServiceObjectType,
         @UI.hidden: true
         ServiceOrder,
         @UI.hidden: true
         ServiceDocumentUUID,
         //ServiceDocUUID,

         @UI: {
          lineItem: [ { position: 20,importance: #HIGH } ]
         }
         @EndUserText.label: 'Transaction Type'
         @Search: {defaultSearchElement: true , ranking: #HIGH}
         _BusinessObjType._Text[1: Language=$session.system_language].BusinessObjectTypeDescription,

         @ObjectModel.virtualElement
         @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_CRMS4_SRVCDOCFLOW_CALC_EXIT'
         @UI.hidden: true
         cast( '' as abap.char( 30 ) )               as PrdcssrSuccssrSemanticObjTxt,

         @ObjectModel.virtualElement
         @ObjectModel.virtualElementCalculatedBy: 'ABAP:CL_CRMS4_SRVCDOCFLOW_CALC_EXIT'
         @UI.hidden: true
         cast( '' as abap.char( 60 ) )               as PrdcssrSuccssrSemanticActnTxt,

         @UI: {
          lineItem: [ { position: 40,importance: #HIGH } ]
         }
         @EndUserText.label: 'Created On'
         @Semantics.dateTime: true
         tstmp_to_dats(_SrvcPrdcssrSuccssrBinaryLink.ServiceDocCreationDateTime,
         abap_user_timezone($session.user, $session.client,'NULL' ),
         $session.client,
         'NULL' )                                    as InteractionUTCDate,

         //        @UI: {

         //                 lineItem: [ { position: 30 } ]

         //                 }

         //        @EndUserText.label: 'Created Date'

         //        _smzbinrel.utctime,

         @UI.hidden: true
         case  PrdcssrSuccssrDocObjectType
         when 'BUS2017'
         then cast(substring(CustMgmtPrdcssrTransactionKey,  11, 14) as abap.numc(4))
         when 'BUS2081'
         then cast(substring(CustMgmtPrdcssrTransactionKey,  11, 14) as abap.numc(4))
         else cast(  '' as abap.numc(4) )       end  as ReferenceDocumentFiscalYear,
         @UI.hidden: true
         ServiceDocumentType,
         @UI.hidden: true
         ReltdSrvcDocIsPredecessor,


         @UI.hidden: true
         RespEmployeeBusinessPartnerId,
         @UI.hidden: true
         SalesOrganization,
         @UI.hidden: true
         SalesOffice,
         @UI.hidden: true
         SalesGroup,
         @UI.hidden: true
         Division,
         @UI.hidden: true
         DistributionChannel,
         @UI.hidden: true
         SalesOrganizationOrgUnitID,
         @UI.hidden: true
         SalesOfficeOrgUnitID,
         @UI.hidden: true
         SalesGroupOrgUnitID,
         @UI.hidden: true
         ServiceOrganization,
         _ServiceDocumentEnhcd,
         _PrdcssrBusinessObjType,
         _SuccssrBusinessObjType
         
}
where
  CustMgmtPrdcssrTransactionKey != ''