P_EvtBsdRevnRecSalesOrderIss

DDL: P_EVTBSDREVNRECSALESORDERISS SQL: PSDDOCISSJOUR Type: view CONSUMPTION

Event based rev. rec. sales order issue

P_EvtBsdRevnRecSalesOrderIss is a Consumption CDS View that provides data about "Event based rev. rec. sales order issue" in SAP S/4HANA. It reads from 7 data sources and exposes 36 fields with key field ApplicationLog. It has 1 association to related views.

Data Sources (7)

SourceAliasJoin Type
P_EvtBsdRevRecSalesOrderAppLog AppLog from
I_CompanyCode CompanyCode inner
I_EvtBasedRevnRecgnEvalArea EvalAreaUse inner
I_SalesDocument SalesDocument inner
I_SalesDocumentItem SalesDocumentItem inner
I_ARunRequirementDocumentType SalesOrderType inner
P_Trrmonaccprin Trrmonaccprin inner

Associations (1)

CardinalityTargetAliasCondition
[0..1] C_EvtBsdRevnRecgnSlsOrdIssDet _SalesOrderIssDetail _SalesOrderIssDetail.ApplicationLog = $projection.ApplicationLog

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName PSDDOCISSJOUR view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Event based rev. rec. sales order issue view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #CONSUMPTION view
VDM.private true view

Fields (36)

KeyFieldSource TableSource FieldDescription
KEY ApplicationLog P_EvtBsdRevRecSalesOrderAppLog ApplicationLog
SalesDocument I_SalesDocumentItem SalesDocument
SalesDocumentItem I_SalesDocumentItem SalesDocumentItem
Plant I_SalesDocumentItem Plant
SalesDocumentItemType I_SalesDocumentItem SalesDocumentItemType
ResultAnalysisInternalID I_SalesDocumentItem ResultAnalysisInternalID
ControllingObjectendasControllingObject
SalesOffice I_SalesDocument SalesOffice
SalesGroup I_SalesDocument SalesGroup
OrganizationDivision I_SalesDocumentItem Division
DistributionChannel I_SalesDocument DistributionChannel
SalesOrganization I_SalesDocument SalesOrganization
SalesDocumentType I_SalesDocument SalesDocumentType
SalesDocumentTypeName I_ARunRequirementDocumentType SalesDocumentTypeName
Ledger I_EvtBasedRevnRecgnEvalArea Ledger
AccountingPrinciple P_Trrmonaccprin acc_principle
Prefix P_EvtBsdRevRecSalesOrderAppLog Prefix
FiscalYear P_EvtBsdRevRecSalesOrderAppLog FiscalYear
FiscalPeriod P_EvtBsdRevRecSalesOrderAppLog FiscalPeriod
NumberOfOpenErrorMessages P_EvtBsdRevRecSalesOrderAppLog NumberOfOpenErrorMessages
CompanyCode I_CompanyCode CompanyCode
CompanyCodeName I_CompanyCode CompanyCodeName
FiscalYearVariant I_CompanyCode FiscalYearVariant
FiscalYearPeriod
ToFiscalYearPeriod
ProfitCenter I_SalesDocumentItem ProfitCenter
ApplicationLogHandle P_EvtBsdRevRecSalesOrderAppLog ApplicationLogHandle
_SalesDocument I_SalesDocumentItem _SalesDocument
_SalesOffice _SalesOffice
_SalesOrganization _SalesOrganization
_DistributionChannel _DistributionChannel
_SalesGroup _SalesGroup
_SalesDocumentType _SalesDocumentType
_Plant _Plant
_Division _Division
_SalesOrderIssDetail _SalesOrderIssDetail
@AbapCatalog.sqlViewName: 'PSDDOCISSJOUR'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE

@EndUserText.label: 'Event based rev. rec. sales order issue'

@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #MIXED

@VDM.viewType: #CONSUMPTION
@VDM.private: true

define view P_EvtBsdRevnRecSalesOrderIss
  as select from P_EvtBsdRevRecSalesOrderAppLog as AppLog

    inner join   I_SalesDocument                as SalesDocument     on SalesDocument.SalesDocument = AppLog.SDDocument

    inner join   I_SalesDocumentItem            as SalesDocumentItem on  SalesDocumentItem.SalesDocument     = AppLog.SDDocument
                                                                     and SalesDocumentItem.SalesDocumentItem = AppLog.SDDocumentItem

    inner join   I_CompanyCode                  as CompanyCode       on CompanyCode.CompanyCode = AppLog.CompanyCode

  //AppLog.AccountingPrinciple contains EvaluationArea, in future will the field Applog.AccountingPrinciple contain Ledger only

    inner join   I_EvtBasedRevnRecgnEvalArea    as EvalAreaUse       on  EvalAreaUse.CompanyCode        = AppLog.CompanyCode
                                                                     and EvalAreaUse.EvtBsdRevnEvalArea = AppLog.AccountingPrinciple

    inner join   P_Trrmonaccprin                as Trrmonaccprin     on  Trrmonaccprin.rldnr = EvalAreaUse.Ledger
                                                                     and Trrmonaccprin.bukrs = AppLog.CompanyCode
                                                                     and Trrmonaccprin.abgsl = SalesDocumentItem.ResultAnalysisInternalID

    inner join   I_ARunRequirementDocumentType  as SalesOrderType    on SalesOrderType.SalesDocumentType = SalesDocument.SalesDocumentType

  association [0..1] to C_EvtBsdRevnRecgnSlsOrdIssDet as _SalesOrderIssDetail on _SalesOrderIssDetail.ApplicationLog = $projection.ApplicationLog


{
  key  AppLog.ApplicationLog,
       SalesDocumentItem.SalesDocument,
       SalesDocumentItem.SalesDocumentItem,

       SalesDocumentItem.Plant,
       SalesDocumentItem.SalesDocumentItemType,
       SalesDocumentItem.ResultAnalysisInternalID,

       case when SalesDocumentItem.ControllingObject = ''
        then concat('VB', concat(SalesDocumentItem.SalesDocument, SalesDocumentItem.SalesDocumentItem))
        else SalesDocumentItem.ControllingObject end                as ControllingObject,

       SalesDocument.SalesOffice,
       SalesDocument.SalesGroup,
       SalesDocumentItem.Division                                   as OrganizationDivision, 
 
       SalesDocument.DistributionChannel,
       SalesDocument.SalesOrganization,
       SalesDocument.SalesDocumentType,
       SalesOrderType.SalesDocumentTypeName,

       EvalAreaUse.Ledger                                           as Ledger,
       Trrmonaccprin.acc_principle                                  as AccountingPrinciple,

       AppLog.Prefix,
       AppLog.FiscalYear,
       AppLog.FiscalPeriod,
       AppLog.NumberOfOpenErrorMessages,
       CompanyCode.CompanyCode,
       CompanyCode.CompanyCodeName,
       CompanyCode.FiscalYearVariant,
       concat(AppLog.FiscalYear, AppLog.FiscalPeriod)               as FiscalYearPeriod,
       concat(AppLog.FiscalPeriod, concat('.', AppLog.FiscalYear) ) as ToFiscalYearPeriod,
       SalesDocumentItem.ProfitCenter,
       AppLog.ApplicationLogHandle,

       SalesDocumentItem._SalesDocument,
       _SalesOffice,
       _SalesOrganization,
       _DistributionChannel,
       _SalesGroup,
       _SalesDocumentType,
       _Plant,
       _Division,
       _SalesOrderIssDetail

}
where
      AppLog.Prefix     = 'VB'
  and AppLog.SDDocument is not null
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ARUNREQUIREMENTDOCUMENTTYPE",
"I_COMPANYCODE",
"I_EVTBASEDREVNRECGNEVALAREA",
"I_SALESDOCUMENT",
"I_SALESDOCUMENTITEM",
"P_EVTBSDREVRECSALESORDERAPPLOG",
"P_TRRMONACCPRIN"
],
"ASSOCIATED":
[
"C_EVTBSDREVNRECGNSLSORDISSDET",
"I_DISTRIBUTIONCHANNEL",
"I_DIVISION",
"I_PLANT",
"I_SALESDOCUMENT",
"I_SALESDOCUMENTTYPE",
"I_SALESGROUP",
"I_SALESOFFICE",
"I_SALESORGANIZATION"
],
"BASE":
[
"I_SALESDOCUMENT",
"I_SALESDOCUMENTITEM"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/