P_HU_MM_AUDITINVOICE

DDL: P_HU_MM_AUDITINVOICE Type: view_entity COMPOSITE

P_HU_MM_AUDITINVOICE is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_CompanyCode, P_HU_MM_AUDITREPORTAGGR) and exposes 35 fields.

Data Sources (2)

SourceAliasJoin Type
I_CompanyCode _CompanyCode inner
P_HU_MM_AUDITREPORTAGGR P_HU_MM_AUDITREPORTAGGR from

Parameters (1)

NameTypeDefault
P_VAT_number stceg

Annotations (7)

NameValueLevelField
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.dataClass #MIXED view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #COMPOSITE view
VDM.private true view
AccessControl.personalData.blocking #REQUIRED view

Fields (35)

KeyFieldSource TableSource FieldDescription
CompanyCode P_HU_MM_AUDITREPORTAGGR CompanyCode Receiver Company Code
OriginalReferenceDocument P_HU_MM_AUDITREPORTAGGR OriginalReferenceDocument Reference Key
CompanyCodeCurrency P_HU_MM_AUDITREPORTAGGR CompanyCodeCurrency Local Currency
DocumentCurrency P_HU_MM_AUDITREPORTAGGR DocumentCurrency Document Currency
DocumentReferenceID P_HU_MM_AUDITREPORTAGGR DocumentReferenceID Reference
CustomerInvoiceType P_HU_MM_AUDITREPORTAGGR CustomerInvoiceType
ReferenceDocumentType P_HU_MM_AUDITREPORTAGGR ReferenceDocumentType Reference Document Type
DocumentDate P_HU_MM_AUDITREPORTAGGR DocumentDate Journal Entry Date
PostingDate P_HU_MM_AUDITREPORTAGGR PostingDate Posting Date for GR
TaxFulfillmentDate P_HU_MM_AUDITREPORTAGGR TaxFulfillmentDate Tax Settlement Date
CustomerTaxNumber
CustomerVATRegistration I_CompanyCode VATRegistration VAT Registration No.
CustomerFullName _CustomerAddress AddresseeFullName Full Name
CustomerPostalCode _CustomerAddress PostalCode Postal Code
CustomerCityName _CustomerAddress CityName Name
CustomerDistrict _CustomerAddress DistrictName District
CustomerStreetName _CustomerAddress StreetName Text
CustomerHouseNumber _CustomerAddress HouseNumber House Number
CustomerBuilding _CustomerAddress Building Building code
CustomerFloor _CustomerAddress Floor Floor
BusinessPartnerType I_BusinessPartner BusinessPartnerType Undefined range (can be used for patch levels)
TaxNumber3endasstcegasSupplierTaxNumber
SupplierVATRegistration I_Supplier VATRegistration VAT Registration No.
SupplierFullName
SupplierPostalCode
SupplierCityName
SupplierDistrict
SupplierStreetName
SupplierHouseNumber
SupplierBuilding
SupplierFloor
NetPriceAmount P_HU_MM_AUDITREPORTAGGR NetPriceAmount Net Price
TaxAmount P_HU_MM_AUDITREPORTAGGR TaxAmount Tax Amt in Rptg Crcy
GrossAmount P_HU_MM_AUDITREPORTAGGR GrossAmount Gross value
TaxAmountInCoCodeCrcy P_HU_MM_AUDITREPORTAGGR TaxAmountInCoCodeCrcy Tax Amount in Company Code Currency

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view P_HU_MM_AUDITINVOICE.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- Parameters: P_VAT_number : stceg

CREATE VIEW P_HU_MM_AUDITINVOICE AS
SELECT
  P_HU_MM_AUDITREPORTAGGR.CompanyCode AS CompanyCode,
  P_HU_MM_AUDITREPORTAGGR.OriginalReferenceDocument AS OriginalReferenceDocument,
  P_HU_MM_AUDITREPORTAGGR.CompanyCodeCurrency AS CompanyCodeCurrency,
  P_HU_MM_AUDITREPORTAGGR.DocumentCurrency AS DocumentCurrency,
  P_HU_MM_AUDITREPORTAGGR.DocumentReferenceID AS DocumentReferenceID,
  P_HU_MM_AUDITREPORTAGGR.CustomerInvoiceType AS CustomerInvoiceType,
  P_HU_MM_AUDITREPORTAGGR.ReferenceDocumentType AS ReferenceDocumentType,
  P_HU_MM_AUDITREPORTAGGR.DocumentDate AS DocumentDate,
  P_HU_MM_AUDITREPORTAGGR.PostingDate AS PostingDate,
  P_HU_MM_AUDITREPORTAGGR.TaxFulfillmentDate AS TaxFulfillmentDate,
  $parameters.P_VAT_number AS CustomerTaxNumber,
  _CompanyCode.VATRegistration AS CustomerVATRegistration,
  _CustomerAddress.AddresseeFullName AS CustomerFullName,
  _CustomerAddress.PostalCode AS CustomerPostalCode,
  _CustomerAddress.CityName AS CustomerCityName,
  _CustomerAddress.DistrictName AS CustomerDistrict,
  _CustomerAddress.StreetName AS CustomerStreetName,
  _CustomerAddress.HouseNumber AS CustomerHouseNumber,
  _CustomerAddress.Building AS CustomerBuilding,
  _CustomerAddress.Floor AS CustomerFloor,
  I_BusinessPartner.BusinessPartnerType AS BusinessPartnerType,
  cast(case when I_Supplier.TaxNumber3 = '' then I_Supplier.TaxNumber1 else I_Supplier.TaxNumber3 end as stceg) as SupplierTaxNumber AS TaxNumber3endasstcegasSupplierTaxNumber,
  I_Supplier.VATRegistration AS SupplierVATRegistration,
  _SupplierInvoice._Supplier._AddressRepresentation.AddresseeFullName AS SupplierFullName,
  _SupplierInvoice._Supplier._AddressRepresentation.PostalCode AS SupplierPostalCode,
  _SupplierInvoice._Supplier._AddressRepresentation.CityName AS SupplierCityName,
  _SupplierInvoice._Supplier._AddressRepresentation.DistrictName AS SupplierDistrict,
  _SupplierInvoice._Supplier._AddressRepresentation.StreetName AS SupplierStreetName,
  _SupplierInvoice._Supplier._AddressRepresentation.HouseNumber AS SupplierHouseNumber,
  _SupplierInvoice._Supplier._AddressRepresentation.Building AS SupplierBuilding,
  _SupplierInvoice._Supplier._AddressRepresentation.Floor AS SupplierFloor,
  P_HU_MM_AUDITREPORTAGGR.NetPriceAmount AS NetPriceAmount,
  P_HU_MM_AUDITREPORTAGGR.TaxAmount AS TaxAmount,
  P_HU_MM_AUDITREPORTAGGR.GrossAmount AS GrossAmount,
  P_HU_MM_AUDITREPORTAGGR.TaxAmountInCoCodeCrcy AS TaxAmountInCoCodeCrcy
FROM P_HU_MM_AUDITREPORTAGGR
INNER JOIN I_CompanyCode AS _CompanyCode ON /* join condition not captured in parsed metadata */
;