I_PT_SAFTBillgInvcListProd
Product from Invoice List Document
I_PT_SAFTBillgInvcListProd is a Composite CDS View that provides data about "Product from Invoice List Document" in SAP S/4HANA. It reads from 4 data sources (I_PT_SAFTBillgInvcListItem, I_PT_SAFTBillgDocMatlHist, I_Product, I_PT_BillgDocDgtlSgntr) and exposes 12 fields with key fields CompanyCode, PT_SAFTDocumentNumber, PT_SAFTLineNumber, Product. Part of development package GLO_FIN_IS_SAFT_PT.
Data Sources (4)
| Source | Alias | Join Type |
|---|---|---|
| I_PT_SAFTBillgInvcListItem | InvLDoc | from |
| I_PT_SAFTBillgDocMatlHist | materialHist | inner |
| I_Product | product | inner |
| I_PT_BillgDocDgtlSgntr | Sig | inner |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| AccessControl.authorizationCheck | #MANDATORY | view | |
| VDM.viewType | #COMPOSITE | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_INCLUDED | view | |
| EndUserText.label | Product from Invoice List Document | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ObjectModel.usageType.serviceQuality | #D | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.dataClass | #MIXED | view |
Fields (12)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | I_PT_SAFTBillgInvcListItem | CompanyCode | |
| KEY | PT_SAFTDocumentNumber | I_PT_SAFTBillgInvcListItem | PT_SAFTDocumentNumber | |
| KEY | PT_SAFTLineNumber | I_PT_SAFTBillgInvcListItem | PT_SAFTLineNumber | |
| KEY | Product | I_PT_SAFTBillgInvcListItem | Product | |
| InvoiceDate | I_PT_SAFTBillgInvcListItem | SalesDocumentDate | ||
| ProductGroup | ||||
| PortugueseInvoiceDate | I_PT_BillgDocDgtlSgntr | PortugueseInvoiceDate | ||
| Material | I_PT_SAFTBillgDocMatlHist | Material | ||
| PT_SAFTProductCode | ||||
| ProductDescription | I_PT_SAFTBillgDocMatlHist | MaterialName | ||
| CommodityCode | ||||
| DangerousGoodsIdnNumber | DangerousGoodsIdnNumber | DangerousGoodsIdnNumber |
@Consumption.dbHints: [ 'USE_HEX_PLAN' ]
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #MANDATORY
@VDM.viewType: #COMPOSITE
@AccessControl.personalData.blocking: #BLOCKED_DATA_INCLUDED
@EndUserText.label: 'Product from Invoice List Document'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
serviceQuality: #D,
sizeCategory: #XL,
dataClass: #MIXED
}
define view entity I_PT_SAFTBillgInvcListProd
as select from I_PT_SAFTBillgInvcListItem as InvLDoc
inner join I_PT_BillgDocDgtlSgntr as Sig on Sig.BillingDocument = InvLDoc.BillingDocumentList
and Sig.CompanyCode = InvLDoc.CompanyCode
inner join I_PT_SAFTBillgDocMatlHist as materialHist on InvLDoc.BillingDocument = materialHist.BillingDocument
and InvLDoc.Material = materialHist.Material
and InvLDoc.CompanyCode = materialHist.CompanyCode
inner join I_Product as product on product.Product = InvLDoc.Product
left outer to one join I_PT_SAFTCommodityCode as CommodityCode on InvLDoc.Product = CommodityCode.ProductID
and Sig.PortugueseInvoiceDate between CommodityCode.StartDate and CommodityCode.EndDate
left outer to one join I_PT_SAFTDangerousGoodsCode as DangerousGoodsIdnNumber on InvLDoc.Product = DangerousGoodsIdnNumber.ProductID
left outer to one join I_PT_SAFTProductType as ProductType on InvLDoc.CompanyCode = ProductType.CompanyCode
and product.ProductType = ProductType.MaterialType
{
key InvLDoc.CompanyCode as CompanyCode,
key InvLDoc.PT_SAFTDocumentNumber as PT_SAFTDocumentNumber,
key InvLDoc.PT_SAFTLineNumber as PT_SAFTLineNumber,
key InvLDoc.Product as Product, //Material Number
InvLDoc.SalesDocumentDate as InvoiceDate,
cast(case when ProductType.ProductType is not initial
then ProductType.ProductType
else 'O'
end as producttype ) as ProductType,
coalesce(materialHist._Product.ProductGroup,'') as ProductGroup,
cast(case when InvLDoc._Product.ProductStandardID is not initial
then InvLDoc._Product.ProductStandardID
else materialHist.PortugueseMaterialWithVersion
end as saft_pt_productnumbercode ) as PT_SAFTProductNumberCode,
//Material History
Sig.PortugueseInvoiceDate as PortugueseInvoiceDate,
materialHist.Material,
cast(materialHist.PortugueseMaterialWithVersion as saft_pt_productcode) as PT_SAFTProductCode, //Material Number with version
materialHist.MaterialName as ProductDescription,
cast(CommodityCode.CommodityCode as /sapsll/comco) as CommodityCode,
DangerousGoodsIdnNumber.DangerousGoodsIdnNumber
}
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