P_RU_MaterialReceiptDateMM8

DDL: P_RU_MATERIALRECEIPTDATEMM8 SQL: PRUMATRCPTDATE8 Type: view COMPOSITE Package: GLO_FIN_IS_VAT_RU_SPL

FI RU get Material Receipt Date: MM

P_RU_MaterialReceiptDateMM8 is a Composite CDS View that provides data about "FI RU get Material Receipt Date: MM" in SAP S/4HANA. It reads from 3 data sources (I_JournalEntry, I_RU_CompanyCodeVatParam, P_RU_MaterialReceiptMM) and exposes 12 fields. Part of development package GLO_FIN_IS_VAT_RU_SPL.

Data Sources (3)

SourceAliasJoin Type
I_JournalEntry AccDoc from
I_RU_CompanyCodeVatParam CompanyCodeVatParam left_outer
P_RU_MaterialReceiptMM MatRcptMM left_outer

Parameters (1)

NameTypeDefault
P_StatryRptgEntity srf_reporting_entity

Annotations (5)

NameValueLevelField
AbapCatalog.sqlViewName PRUMATRCPTDATE8 view
VDM.viewType #COMPOSITE view
VDM.private true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (12)

KeyFieldSource TableSource FieldDescription
CompanyCode I_JournalEntry CompanyCode
AccountingDocument I_JournalEntry AccountingDocument
FiscalYear I_JournalEntry FiscalYear
DocumentDate I_JournalEntry DocumentDate
PostingDate I_JournalEntry PostingDate
ReferenceDocumentType I_JournalEntry ReferenceDocumentType
GoodsRcptAccountingDocument P_RU_MaterialReceiptMM GoodsRcptAccountingDocument
GoodsRcptFiscalYear P_RU_MaterialReceiptMM GoodsRcptFiscalYear
GoodsRcptDocumentDate P_RU_MaterialReceiptMM GoodsRcptDocumentDate
GoodsRcptPostingDate P_RU_MaterialReceiptMM GoodsRcptPostingDate
MatlRcptMatlMgmtDateType I_RU_CompanyCodeVatParam MatlRcptMatlMgmtDateType
MatlRcptFinDateType I_RU_CompanyCodeVatParam MatlRcptFinDateType
@AbapCatalog.sqlViewName: 'PRUMATRCPTDATE8'
@VDM.viewType: #COMPOSITE
@VDM.private: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_RU_MaterialReceiptDateMM8
  with parameters
    P_StatryRptgEntity : srf_reporting_entity

  as select from    I_JournalEntry           as AccDoc

    left outer join I_RU_CompanyCodeVatParam as CompanyCodeVatParam on StatryRptgEntity = $parameters.P_StatryRptgEntity

    left outer join P_RU_MaterialReceiptMM   as MatRcptMM           on  MatRcptMM.CompanyCode               = AccDoc.CompanyCode
                                                                    and MatRcptMM.InvoiceAccountingDocument = AccDoc.AccountingDocument
                                                                    and MatRcptMM.InvoiceFiscalYear         = AccDoc.FiscalYear
{
  AccDoc.CompanyCode,
  AccDoc.AccountingDocument,
  AccDoc.FiscalYear,
  AccDoc.DocumentDate,
  AccDoc.PostingDate,
  AccDoc.ReferenceDocumentType,
  MatRcptMM.GoodsRcptAccountingDocument,
  MatRcptMM.GoodsRcptFiscalYear,
  MatRcptMM.GoodsRcptDocumentDate,
  MatRcptMM.GoodsRcptPostingDate,

  CompanyCodeVatParam.MatlRcptMatlMgmtDateType,
  CompanyCodeVatParam.MatlRcptFinDateType,

  cast(
  case when AccDoc.ReferenceDocumentType = 'RMRP'
    then case CompanyCodeVatParam.MatlRcptMatlMgmtDateType
             when 'DMIGO'  then MatRcptMM.GoodsRcptPostingDate
             when 'DDMIRO' then AccDoc.DocumentDate
             when 'PDMIRO' then AccDoc.PostingDate
             else MatRcptMM.GoodsRcptPostingDate              //default falue

         end
    else case CompanyCodeVatParam.MatlRcptFinDateType
             when 'DDFI' then AccDoc.DocumentDate
             when 'PDFI' then AccDoc.PostingDate
             else AccDoc.PostingDate                         //default falue

         end
  end                                       as firu_materialreceiptdate)       as MaterialReceiptDate
}