I_DocSingleWorkflowInfo
one document to single workflow
I_DocSingleWorkflowInfo is a Composite CDS View that provides data about "one document to single workflow" in SAP S/4HANA. It reads from 1 data source (I_DocWorkflowInfo) and exposes 33 fields with key fields CompanyCode, AccountingDocument, FiscalYear. It has 3 associations to related views. Part of development package ODATA_GL_JOURNALENTRY_VER.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_DocWorkflowInfo | _DocWorkflowInfo | from |
Associations (3)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_WorkflowToObject | _WorkflowToObject | $projection.ObjectKey = _WorkflowToObject.ObjectKey |
| [1..1] | I_CompanyCode | _CompanyCode | $projection.CompanyCode = _CompanyCode.CompanyCode |
| [0..1] | I_FiscalYearForCompanyCode | _FiscalYear | $projection.FiscalYear = _FiscalYear.FiscalYear and $projection.CompanyCode = _FiscalYear.CompanyCode |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AbapCatalog.sqlViewName | IDOCSINGLEWFINFO | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.representativeKey | AccountingDocument | view | |
| VDM.viewType | #COMPOSITE | view | |
| EndUserText.label | one document to single workflow | view |
Fields (33)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | CompanyCode | ||
| KEY | AccountingDocument | AccountingDocument | ||
| KEY | FiscalYear | FiscalYear | ||
| AccountingDocumentType | AccountingDocumentType | |||
| ReferenceDocument | ReferenceDocument | |||
| DocumentDate | DocumentDate | |||
| FiscalPeriod | FiscalPeriod | |||
| LastChangeDate | LastChangeDate | |||
| LedgerGroup | LedgerGroup | |||
| HeaderDescription | HeaderDescription | |||
| PostingDate | PostingDate | |||
| CreationDateTime | CreationDateTime | |||
| AccountingDocumentCreationDate | AccountingDocumentCreationDate | |||
| ObjectKey | I_DocWorkflowInfo | ObjectKey | ||
| TransactionCode | TransactionCode | |||
| ParkingTransactionCode | ParkingTransactionCode | |||
| Currency | Currency | |||
| CompanyCodeCurrency | CompanyCodeCurrency | |||
| GlobalCurrency | GlobalCurrency | |||
| FreeDefinedCurrency1 | FreeDefinedCurrency1 | |||
| AccountingDocumentCategory | AccountingDocumentCategory | |||
| AccountingDocumentStatus | AccountingDocumentStatus | |||
| Workflow | ||||
| TaskProcessingStatus | TaskProcessingStatus | |||
| ParkedByUserendasParkedByUser | ||||
| CreatedByUserendasCreatedByUser | ||||
| Batch | I_DocWorkflowInfo | Batch | ||
| IntercompanyTransaction | ||||
| ReversalReason | ReversalReason | |||
| PlannedReversalDate | PlannedReversalDate | |||
| _CompanyCode | _CompanyCode | |||
| _FiscalYear | _FiscalYear | |||
| _WorkflowToObject | _WorkflowToObject |
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.sqlViewName: 'IDOCSINGLEWFINFO'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.representativeKey: 'AccountingDocument'
@VDM.viewType: #COMPOSITE
@EndUserText.label: 'one document to single workflow'
@Consumption.dbHints: [ 'USE_HEX_PLAN' ]
define view I_DocSingleWorkflowInfo
as select from I_DocWorkflowInfo as _DocWorkflowInfo
// left outer join I_DocLatestWorkflow as _DocLatestWorkflow on _DocLatestWorkflow.ObjectKey = _DocWorkflowInfo.ObjectKey
// and _DocLatestWorkflow.ReleaseDateTime = _DocWorkflowInfo.ReleaseDateTime
association [0..1] to I_WorkflowToObject as _WorkflowToObject on $projection.ObjectKey = _WorkflowToObject.ObjectKey
association [1..1] to I_CompanyCode as _CompanyCode on $projection.CompanyCode = _CompanyCode.CompanyCode
association [0..1] to I_FiscalYearForCompanyCode as _FiscalYear on $projection.FiscalYear = _FiscalYear.FiscalYear
and $projection.CompanyCode = _FiscalYear.CompanyCode
{
@ObjectModel.foreignKey.association: '_CompanyCode'
key CompanyCode,
key AccountingDocument,
@ObjectModel.foreignKey.association: '_FiscalYear'
key FiscalYear,
AccountingDocumentType,
ReferenceDocument,
DocumentDate,
FiscalPeriod,
LastChangeDate,
LedgerGroup,
HeaderDescription,
PostingDate,
CreationDateTime,
AccountingDocumentCreationDate,
//RequisitionerName,
//Processor,
_DocWorkflowInfo.ObjectKey,
// TCODE(6) = FBDC_P
// PPTCODE(6) = FBDC_P
// can not use tcode directly, maybe in the future we will have more parked documents
TransactionCode,
ParkingTransactionCode,
Currency,
CompanyCodeCurrency,
GlobalCurrency,
FreeDefinedCurrency1,
AccountingDocumentCategory,
AccountingDocumentStatus,
/* comment by i337033
enable currency adjustment workflow
case AccountingDocumentCategory
when 'Z' then 'D'
when '' then 'P'
else AccountingDocumentStatus
end as AccountingDocumentStatus,*/
cast ( _DocWorkflowInfo.Workflow as sww_wiid ) as Workflow,
case AccountingDocumentStatus
when 'P'
then _WorkflowToObject.WorkflowTaskInternalID
else WorkItem
end as WorkItem,
TaskProcessingStatus,
case AccountingDocumentCategory
when 'V' //still a prak
then _DocWorkflowInfo.CreatedByUser
when 'Z' // entry deleted, only parked document can be deleted
// change from CE2008
// new logic
// after parked document deleted, BKPF-USNAM = deleted by
// BKPF-PPNAM = submitted by
then _DocWorkflowInfo.ParkedByUser
// then _DocWorkflowInfo.CreatedByUser
else _DocWorkflowInfo.ParkedByUser //posted dcoument
end as ParkedByUser,
// case AccountingDocumentStatus
// when 'A' then ( case AccountingDocumentCategory
// when 'Z' then _DocWorkflowInfo.CreatedByUser
// else _DocWorkflowInfo.ParkedByUser end )
// else _DocWorkflowInfo.CreatedByUser
// end as ParkedByUser,
case AccountingDocumentCategory
when 'V' then '' //parked document
when 'Z' then ' '
else _DocWorkflowInfo.CreatedByUser
end as CreatedByUser,
// case AccountingDocumentStatus
// when 'A' then (case AccountingDocumentCategory
// when 'Z' then ''
// else _DocWorkflowInfo.CreatedByUser end )
// when 'P' then _DocWorkflowInfo.CreatedByUser
// else ''
// end as CreatedByUser,
_DocWorkflowInfo.Batch,
cast(_DocWorkflowInfo.IntercompanyTransaction as fac_inter_trans) as IntercompanyTransaction,
// auto reversal
ReversalReason,
PlannedReversalDate,
_CompanyCode,
_FiscalYear,
_WorkflowToObject
}
where
_DocWorkflowInfo.ObjectKey is not null
or _DocWorkflowInfo.Workflow is null
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA