P_BR_ReportingNFExport

DDL: P_BR_REPORTINGNFEXPORT SQL: PBRSPEDNFEXP Type: view CONSUMPTION

EFD - Nota Fiscal References

P_BR_ReportingNFExport is a Consumption CDS View that provides data about "EFD - Nota Fiscal References" in SAP S/4HANA. It reads from 4 data sources (I_BR_NFDocument, I_BR_NFDocument, P_BR_ReportingNFExportKey, P_BR_ReportingNFeActive) and exposes 31 fields.

Data Sources (4)

SourceAliasJoin Type
I_BR_NFDocument doc from
I_BR_NFDocument docRef inner
P_BR_ReportingNFExportKey expkey union
P_BR_ReportingNFeActive nfe inner

Annotations (14)

NameValueLevelField
AbapCatalog.sqlViewName PBRSPEDNFEXP view
EndUserText.label EFD - Nota Fiscal References view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
VDM.viewType #CONSUMPTION view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.personalData.blocking #NOT_REQUIRED view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
VDM.lifecycle.status #DEPRECATED view
VDM.lifecycle.successor view

Fields (31)

KeyFieldSource TableSource FieldDescription
BR_NFReferenceDocument I_BR_NFDocument BR_NFReferenceDocument
BR_NFDirection
BR_NFIssuedBy
BR_NFPartner
BR_NFPartnerType
BR_NFModel I_BR_NFDocument BR_NFModel
BR_NFSeries
BR_NFSubSeries
BR_NFeNumber
BR_NFIssueDate
BR_NFPostingDateasBR_NFPostingDate
BR_NFPartnerasPartnerFieldLength
CompanyCode I_BR_NFDocument CompanyCode
BusinessPlace
BusinessPlaceStateTaxNumber
BR_NotaFiscalasBR_NFReferenceDocument
BR_NFDirection
BR_NFIssuedBy
BR_NFPartner
COD_PARTasBR_NFPartnerType
BR_NFModel P_BR_ReportingNFExportKey BR_NFModel
BR_NFSeries
BR_NFSubSeries
BR_NFeNumber
BR_NFIssueDate
BR_NFPostingDate
DT_E_Srefdocument0asPartnerFieldLength
CompanyCode P_BR_ReportingNFExportKey CompanyCode
BusinessPlace
BusinessPlaceStateTaxNumber
BR_NFeAccessKeyCHV_NFE
@AbapCatalog.sqlViewName: 'PBRSPEDNFEXP'
@EndUserText.label: 'EFD - Nota Fiscal References'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM: { private: true, viewType: #CONSUMPTION }
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.personalData.blocking: #NOT_REQUIRED
@Metadata.ignorePropagatedAnnotations:true
@ObjectModel.usageType: { sizeCategory: #L, serviceQuality: #X, dataClass: #TRANSACTIONAL }
@VDM.lifecycle.status: #DEPRECATED
@VDM.lifecycle.successor: '' 

----------------------------------------------------------------------
-- This CDS is based on U_REF node from NF_DOC_FISCAL_REF ctr view
----------------------------------------------------------------------

define view P_BR_ReportingNFExport
  as select from I_BR_NFDocument as doc
    inner join   I_BR_NFDocument as docRef on doc.BR_NFReferenceDocument = docRef.BR_NotaFiscal
    inner join   P_BR_ReportingNFeActive as nfe on nfe.BR_NotaFiscal = docRef.BR_NotaFiscal

{
  doc.BR_NFReferenceDocument,                                                      -- NF_ID
  docRef.BR_NFDirection,                                                           -- IND_OPER
  docRef.BR_NFIssuedBy,                                                            -- IND_EMIT
  docRef.BR_NFPartner,                                                             -- COD_PART
  docRef.BR_NFPartnerType,
  docRef.BR_NFModel,                                                               -- COD_MOD
  docRef.BR_NFSeries,                                                              -- SER
  docRef.BR_NFSubSeries,                                                           -- SUB
  docRef.BR_NFeNumber,                                                             -- NUM_DOC
  docRef.BR_NFIssueDate,                                                           -- DT_DOC
  docRef.BR_NFPostingDate                                as BR_NFPostingDate,      -- DT_E_S ref document
  length(docRef.BR_NFPartner) as PartnerFieldLength,  
  doc.CompanyCode,                                                                 -- EMPRESA
  doc.BusinessPlace,                                                               -- FILIAL
  docRef.BusinessPlaceStateTaxNumber,                                              -- IE
  nfe.BR_NFeAccessKey                                                              -- CHV_NFE
}
union
  select from P_BR_ReportingNFExportKey as expkey
{
  expkey.BR_NotaFiscal                                 as BR_NFReferenceDocument,     -- NF_ID
  expkey.BR_NFDirection,                                                           -- IND_OPER
  expkey.BR_NFIssuedBy,                                                            -- IND_EMIT
  expkey.BR_NFPartner,                                                             -- COD_PART
  ''                                                as BR_NFPartnerType,
  expkey.BR_NFModel,                                                               -- COD_MOD
  expkey.BR_NFSeries,                                                              -- SER
  expkey.BR_NFSubSeries,                                                           -- SUB
  expkey.BR_NFeNumber,                                                             -- NUM_DOC
  expkey.BR_NFIssueDate,                                                           -- DT_DOC
  expkey.BR_NFPostingDate,                                                         -- DT_E_S ref document
  0                                                 as PartnerFieldLength,  
  expkey.CompanyCode,                                                              -- EMPRESA
  expkey.BusinessPlace,                                                            -- FILIAL
  expkey.BusinessPlaceStateTaxNumber,                                              -- IE
  expkey.BR_NFeAccessKey                                                           -- CHV_NFE
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BR_NFDOCUMENT",
"P_BR_REPORTINGNFEACTIVE",
"P_BR_REPORTINGNFEXPORTKEY"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/