C_APProcessFlowSupplierInvoice

DDL: C_APPROCESSFLOWSUPPLIERINVOICE SQL: CAPPFLWSINV Type: view CONSUMPTION Package: ODATA_PROCESS_FLOW_AP

AP Process Flow Supplier Invoice

C_APProcessFlowSupplierInvoice is a Consumption CDS View that provides data about "AP Process Flow Supplier Invoice" in SAP S/4HANA. It reads from 3 data sources (I_SupplierInvoice, I_APProcFlwRstrcdSuplrInvc, I_SuplrInvcItemLogsUnion) and exposes 59 fields with key fields SupplierInvoice, FiscalYear, SupplierInvoiceItem, FiscalYear, SupplierInvoiceItem. It has 1 association to related views. Part of development package ODATA_PROCESS_FLOW_AP.

Data Sources (3)

SourceAliasJoin Type
I_SupplierInvoice _SupplierInvoice union_all
I_APProcFlwRstrcdSuplrInvc _SupplierInvoice union_all
I_SuplrInvcItemLogsUnion I_SuplrInvcItemLogsUnion from

Associations (1)

CardinalityTargetAliasCondition
[1..1] I_UserContactCard _UserContactCard _UserContactCard.ContactCardID = $projection.CreatedByUser

Annotations (12)

NameValueLevelField
VDM.viewType #CONSUMPTION view
AbapCatalog.sqlViewName CAPPFLWSINV view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.personalData.blocking #REQUIRED view
DataAging.noAgingRestriction false view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
EndUserText.label AP Process Flow Supplier Invoice view
AbapCatalog.preserveKey true view

Fields (59)

KeyFieldSource TableSource FieldDescription
KEY SupplierInvoice SupplierInvoice
KEY FiscalYear FiscalYear
KEY SupplierInvoiceItem SupplierInvoiceItem
ProcessFlowNodeDocument SupplierInvoice
ProcessFlowNodeDocCategory
ProcessFlowNode
Supplier I_APProcFlwRstrcdSuplrInvc InvoicingParty
SupplierName
PostingDate I_APProcFlwRstrcdSuplrInvc PostingDate
DocumentDate I_APProcFlwRstrcdSuplrInvc DocumentDate
PaymentBlockingReason I_APProcFlwRstrcdSuplrInvc PaymentBlockingReason
SupplierInvoiceIDByInvcgParty I_APProcFlwRstrcdSuplrInvc SupplierInvoiceIDByInvcgParty
DocumentCurrency I_APProcFlwRstrcdSuplrInvc DocumentCurrency
CreatedByUser I_APProcFlwRstrcdSuplrInvc CreatedByUser
SupplierInvoiceStatus I_APProcFlwRstrcdSuplrInvc SupplierInvoiceStatus
FullName
CompanyCode I_APProcFlwRstrcdSuplrInvc CompanyCode
CompanyCodeName
IsEndOfPurposeBlocked I_APProcFlwRstrcdSuplrInvc IsEndOfPurposeBlocked
AuthorizationGroup
KEY FiscalYear FiscalYear
KEY SupplierInvoiceItem
ProcessFlowNodeDocument SupplierInvoice
ProcessFlowNodeDocCategory
ProcessFlowNode
Supplier InvoicingParty
SupplierName _Supplier SupplierName
PostingDate PostingDate
DocumentDate DocumentDate
PaymentBlockingReason PaymentBlockingReason
SupplierInvoiceIDByInvcgParty SupplierInvoiceIDByInvcgParty
DocumentCurrency DocumentCurrency
CreatedByUser CreatedByUser
SupplierInvoiceStatus SupplierInvoiceStatus
FullName _UserContactCard FullName
CompanyCode CompanyCode
CompanyCodeName
IsEndOfPurposeBlocked IsEndOfPurposeBlocked
AuthorizationGroup _Supplier AuthorizationGroup
KEY FiscalYear FiscalYear
KEY SupplierInvoiceItem SupplierInvoiceItem
ProcessFlowNodeDocument SupplierInvoice
ProcessFlowNodeDocCategory
ProcessFlowNode
Supplier InvoicingParty
SupplierName _Supplier SupplierName
PostingDate PostingDate
DocumentDate DocumentDate
PaymentBlockingReason PaymentBlockingReason
SupplierInvoiceIDByInvcgParty SupplierInvoiceIDByInvcgParty
DocumentCurrency DocumentCurrency
CreatedByUser CreatedByUser
SupplierInvoiceStatus SupplierInvoiceStatus
FullName _UserContactCard FullName
CompanyCode CompanyCode
CompanyCodeName
IsEndOfPurposeBlocked IsEndOfPurposeBlocked
AuthorizationGroup _Supplier AuthorizationGroup
Plant
@VDM.viewType: #CONSUMPTION

@AbapCatalog.sqlViewName: 'CAPPFLWSINV'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.personalData.blocking: #REQUIRED
@DataAging.noAgingRestriction: false

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

@EndUserText.label: 'AP Process Flow Supplier Invoice'
@AbapCatalog.preserveKey:true
define view C_APProcessFlowSupplierInvoice
  as select from I_SuplrInvcItemLogsUnion
{

  key SupplierInvoice                                 as SupplierInvoice,
  key FiscalYear                                      as FiscalYear,
  key SupplierInvoiceItem                             as SupplierInvoiceItem,
  //    ProcessFlow

      SupplierInvoice                                 as ProcessFlowNodeDocument,
      cast( '2' as vgabe )                            as ProcessFlowNodeDocCategory,

      concat(SupplierInvoice,concat('00000____',concat(FiscalYear,'1')))
                                                      as ProcessFlowNode,


      //    Additional Info

      _SupplierInvoice.InvoicingParty                 as Supplier,
      _SupplierInvoice._Supplier.SupplierName         as SupplierName,
      _SupplierInvoice.PostingDate                    as PostingDate,
      _SupplierInvoice.DocumentDate                   as DocumentDate,
      _SupplierInvoice.PaymentBlockingReason          as PaymentBlockingReason,
      _SupplierInvoice.SupplierInvoiceIDByInvcgParty  as SupplierInvoiceIDByInvcgParty,
      @Semantics: { amount : {currencyCode: 'DocumentCurrency'} }
      case _SupplierInvoice.IsInvoice
        when 'X' then SupplierInvoiceItemAmount
        else SupplierInvoiceItemAmount * (-1)
      end                                             as InvoiceGrossAmount,
      @Semantics.currencyCode:true
      _SupplierInvoice.DocumentCurrency               as DocumentCurrency,
      _SupplierInvoice.CreatedByUser                  as CreatedByUser,
      _SupplierInvoice.SupplierInvoiceStatus          as SupplierInvoiceStatus,
      _SupplierInvoice._CreatedByUser.UserDescription as FullName,
      @ObjectModel.text.element: ['CompanyCodeName']
      @UI.textArrangement: #TEXT_LAST      
      _SupplierInvoice.CompanyCode                    as CompanyCode,
      @ObjectModel.readOnly
      @Consumption.semanticObject: 'CompanyCode'
      @Semantics.text: true
      _SupplierInvoice._CompanyCode.CompanyCodeName   as CompanyCodeName,
      @Consumption.hidden: true
      _SupplierInvoice.IsEndOfPurposeBlocked,
      @Consumption.hidden: true
      _SupplierInvoice._Supplier.AuthorizationGroup,
      @Consumption.hidden: true
      Plant
}

//invoices w/o items

union all select from I_SupplierInvoice as _SupplierInvoice

association [1..1] to I_UserContactCard as _UserContactCard on _UserContactCard.ContactCardID = $projection.CreatedByUser

{

  key SupplierInvoice                               as SupplierInvoice,
  key FiscalYear                                    as FiscalYear,
  key '000000'                                      as SupplierInvoiceItem,
      //    ProcessFlow

      SupplierInvoice                               as ProcessFlowNodeDocument,
      cast( '2' as vgabe )                          as ProcessFlowNodeDocCategory,

      concat(SupplierInvoice,concat('00000____',concat(FiscalYear,'1')))
                                                    as ProcessFlowNode,


      //    Additional Info

      InvoicingParty                                as Supplier,
      _Supplier.SupplierName                        as SupplierName,
      PostingDate                                   as PostingDate,
      DocumentDate                                  as DocumentDate,
      PaymentBlockingReason                         as PaymentBlockingReason,
      SupplierInvoiceIDByInvcgParty                 as SupplierInvoiceIDByInvcgParty,
      @Semantics: { amount : {currencyCode: 'DocumentCurrency'} }
      case IsInvoice
        when 'X' then InvoiceGrossAmount
        else InvoiceGrossAmount * (-1)
      end                                           as InvoiceGrossAmount,
      @Semantics.currencyCode:true
      DocumentCurrency                              as DocumentCurrency,
      CreatedByUser                                 as CreatedByUser,
      SupplierInvoiceStatus                         as SupplierInvoiceStatus,
      _UserContactCard.FullName                     as FullName,

      @Consumption.hidden: true
      CompanyCode                                   as CompanyCode,
      @Consumption.hidden: true
      @Semantics.text: true
      _SupplierInvoice._CompanyCode.CompanyCodeName as CompanyCodeName,      
      @Consumption.hidden: true
      IsEndOfPurposeBlocked,
      @Consumption.hidden: true
      _Supplier.AuthorizationGroup,
      @Consumption.hidden: true
      ''                                            as Plant
}
//restricted invoices

union all select from I_APProcFlwRstrcdSuplrInvc as _SupplierInvoice

association [1..1] to I_UserContactCard as _UserContactCard on _UserContactCard.ContactCardID = $projection.CreatedByUser

{

  key SupplierInvoice                               as SupplierInvoice,
  key FiscalYear                                    as FiscalYear,
  key SupplierInvoiceItem,
      //    ProcessFlow

      SupplierInvoice                               as ProcessFlowNodeDocument,
      cast( '2' as vgabe )                          as ProcessFlowNodeDocCategory,

      concat(SupplierInvoice,concat('00000____',concat(FiscalYear,'1')))
                                                    as ProcessFlowNode,


      //    Additional Info

      InvoicingParty                                as Supplier,
      _Supplier.SupplierName                        as SupplierName,
      PostingDate                                   as PostingDate,
      DocumentDate                                  as DocumentDate,
      PaymentBlockingReason                         as PaymentBlockingReason,
      SupplierInvoiceIDByInvcgParty                 as SupplierInvoiceIDByInvcgParty,
      @Semantics: { amount : {currencyCode: 'DocumentCurrency'} }
      case IsInvoice
        when 'X' then InvoiceGrossAmount
        else InvoiceGrossAmount * (-1)
      end                                           as InvoiceGrossAmount,
      @Semantics.currencyCode:true
      DocumentCurrency                              as DocumentCurrency,
      CreatedByUser                                 as CreatedByUser,
      SupplierInvoiceStatus                         as SupplierInvoiceStatus,
      _UserContactCard.FullName                     as FullName,

      @Consumption.hidden: true
      CompanyCode                                   as CompanyCode,
      @Consumption.hidden: true
      _SupplierInvoice._CompanyCode.CompanyCodeName as CompanyCodeName,
      @Consumption.hidden: true
      IsEndOfPurposeBlocked,
      @Consumption.hidden: true
      _Supplier.AuthorizationGroup,
      @Consumption.hidden: true
      ''                                            as Plant
}