P_Purchaseorders_Fs
Private factsheet - Purchase Orders
P_Purchaseorders_Fs is a Basic CDS View that provides data about "Private factsheet - Purchase Orders" in SAP S/4HANA. It reads from 9 data sources and exposes 26 fields with key field PurchasingDocument. Part of development package VDM_MD_PRODUCT_OBSOLETE.
Data Sources (9)
| Source | Alias | Join Type |
|---|---|---|
| I_CompanyCode | Company | left_outer |
| I_PurchasingDocumentTypeText | DocumentTypeName | left_outer |
| P_PlantAddrDetails_Fs | PlantData | left_outer |
| I_PurchasingDocument | PurchaseDoc | from |
| I_PurchasingDocumentItem | PurchaseDocItem | left_outer |
| I_PurchasingGroup | PurgGroup | left_outer |
| I_PurchasingOrganization | PurgOrg | left_outer |
| P_Prchinforecordslang_Fs | Supplier | left_outer |
| P_Usercontactcard_Fs | UserName | left_outer |
Annotations (5)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PPURORDERSFS | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| VDM.viewType | #BASIC | view | |
| VDM.private | true | view |
Fields (26)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchasingDocument | I_PurchasingDocument | PurchasingDocument | |
| CompanyCode | I_PurchasingDocument | CompanyCode | ||
| Material | I_PurchasingDocumentItem | Material | ||
| CompanyCodeName | I_CompanyCode | CompanyCodeName | ||
| PersonFullName | P_Usercontactcard_Fs | PersonFullName | ||
| IncotermsClassification | I_PurchasingDocument | IncotermsClassification | ||
| IncotermsTransferLocation | I_PurchasingDocument | IncotermsTransferLocation | ||
| PurchasingGroup | I_PurchasingDocument | PurchasingGroup | ||
| PurchasingOrganization | I_PurchasingDocument | PurchasingOrganization | ||
| AdditionalName | P_Prchinforecordslang_Fs | AdditionalName | ||
| Supplier | I_PurchasingDocument | Supplier | ||
| SupplyingPlant | I_PurchasingDocument | SupplyingPlant | ||
| PaymentTerms | I_PurchasingDocument | PaymentTerms | ||
| PurchaseContract | I_PurchasingDocument | PurchaseContract | ||
| CreatedByUser | I_PurchasingDocument | CreatedByUser | ||
| DocumentCurrency | I_PurchasingDocument | DocumentCurrency | ||
| PurchasingDocumentOrderDate | I_PurchasingDocument | PurchasingDocumentOrderDate | ||
| CreationDate | I_PurchasingDocument | CreationDate | ||
| PurchasingDocumentType | I_PurchasingDocument | PurchasingDocumentType | ||
| PurchasingGroupName | I_PurchasingGroup | PurchasingGroupName | ||
| PurchasingOrganizationName | I_PurchasingOrganization | PurchasingOrganizationName | ||
| SupplierName | ||||
| PurchasingDocumentCategory | I_PurchasingDocument | PurchasingDocumentCategory | ||
| Language | I_PurchasingDocument | Language | ||
| PurchasingDocumentTypeName | I_PurchasingDocumentTypeText | PurchasingDocumentTypeName | ||
| PlantName | P_PlantAddrDetails_Fs | PlantName |
@AbapCatalog.sqlViewName: 'PPURORDERSFS'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@VDM.viewType: #BASIC
@VDM.private: true
//@EndUserText.label: 'Private factsheet - Purchase Orders'
define view P_Purchaseorders_Fs
as select from I_PurchasingDocument as PurchaseDoc
left outer join I_PurchasingDocumentItem as PurchaseDocItem on PurchaseDocItem.PurchasingDocument = PurchaseDoc.PurchasingDocument
left outer join I_CompanyCode as Company on PurchaseDoc.CompanyCode = Company.CompanyCode //getting company name
left outer join I_PurchasingGroup as PurgGroup on PurchaseDoc.PurchasingGroup = PurgGroup.PurchasingGroup //group name
left outer join I_PurchasingOrganization as PurgOrg on PurchaseDoc.PurchasingOrganization = PurgOrg.PurchasingOrganization //org name
left outer join P_Usercontactcard_Fs as UserName on UserName.UserID = PurchaseDoc.CreatedByUser //full name
left outer join P_Prchinforecordslang_Fs as Supplier on Supplier.Supplier = PurchaseDoc.Supplier //full name
left outer join I_PurchasingDocumentTypeText as DocumentTypeName on DocumentTypeName.Language = PurchaseDoc.Language
and DocumentTypeName.PurchasingDocumentCategory = PurchaseDoc.PurchasingDocumentCategory
and DocumentTypeName.PurchasingDocumentType = PurchaseDoc.PurchasingDocumentType
left outer join P_PlantAddrDetails_Fs as PlantData on PlantData.Plant = PurchaseDoc.SupplyingPlant
//inner join P_Supplier_Fs as SupName on PurchaseDoc.Supplier = SupName.Supplier //supplier name
//define view P_Purchaseorders_Fs as select from I_PurchasingDocument as PurchaseDoc
//inner join I_PurchasingDocumentItem as PurchaseDocItem on PurchaseDoc.PurchasingDocument = PurchaseDocItem.PurchasingDocument and PurchaseDocItem.CompanyCode = PurchaseDoc.CompanyCode
//left outer join I_CompanyCode as Company on PurchaseDoc.CompanyCode = Company.CompanyCode //getting company name
//left outer join I_PurchasingGroup as PurgGroup on PurchaseDoc.PurchasingGroup = PurgGroup.PurchasingGroup //group name
//left outer join I_PurchasingOrganization as PurgOrg on PurchaseDoc.PurchasingOrganization = PurgOrg.PurchasingOrganization //org name
//left outer join P_Supplier_Fs as SupName on PurchaseDoc.Supplier = SupName.Supplier //supplier name
{
key PurchaseDoc.PurchasingDocument as PurchasingDocument, //check ........
// key PurchaseDocItem.Plant as Plant,
//key PurchaseDocItem.PurchasingDocumentItem as PurchasingDocumentItem,
PurchaseDoc.CompanyCode as CompanyCode,
//PurchaseDocItem.PurchasingDocumentItem as PurchasingDocumentItem,
PurchaseDocItem.Material as Material,
// PurchaseDocItem.PurchasingDocumentItem as PurchasingDocumentItem,
Company.CompanyCodeName as CompanyCodeName,
UserName.PersonFullName,
// Supplier.name1,
case PurchaseDoc.PurchasingDocumentDeletionCode
when 'S' then 'Locked'
when 'L' then 'Yes'
else 'No'
end as PurchasingDocumentDeletionCode,
//PurchaseDoc.PurchasingDocumentDeletionCode as PurchasingDocumentDeletionCode,
PurchaseDoc.IncotermsClassification as IncotermsClassification,
PurchaseDoc.IncotermsTransferLocation as IncotermsTransferLocation,
//cast (PurchaseDoc.PurchasingOrganization as P_PURCHORG preserving type) as PurchasingOrganization,
PurchaseDoc.PurchasingGroup as PurchasingGroup,
PurchaseDoc.PurchasingOrganization as PurchasingOrganization,
Supplier.AdditionalName,
//@Semantics: { name.fullName: true }
// concat_with_space(Supplier.SupplierName, Supplier.AdditionalName, 1) as FormattedName,
//@ObjectModel: { text.element: [ 'FormattedName' ], readOnly: true }
PurchaseDoc.Supplier as Supplier,
PurchaseDoc.SupplyingPlant as SupplyingPlant,
PurchaseDoc.PaymentTerms as PaymentTerms,
PurchaseDoc.PurchaseContract as PurchaseContract,
PurchaseDoc.CreatedByUser as CreatedByUser,
PurchaseDoc.DocumentCurrency as DocumentCurrency,
PurchaseDoc.PurchasingDocumentOrderDate as PurchasingDocumentOrderDate,
PurchaseDoc.CreationDate as CreationDate,
PurchaseDoc.PurchasingDocumentType as PurchasingDocumentType,
PurgGroup.PurchasingGroupName as PurchasingGroupName,
PurgOrg.PurchasingOrganizationName as PurchasingOrganizationName,
Concat(Concat(concat_with_space(Supplier.SupplierName , '(', 1),ltrim(PurchaseDoc.Supplier, '0')),')') as SupplierName,
//SupName.SupplierName as SupplierName
//sum(PurchaseDoc.DocumentCurrency)as doccur
PurchaseDoc.PurchasingDocumentCategory as PurchasingDocumentCategory,
PurchaseDoc.Language as Language,
DocumentTypeName.PurchasingDocumentTypeName as PurchasingDocumentTypeName,
PlantData.PlantName as PlantName
}
group by
PurchaseDoc.PurchasingDocument,
//PurchaseDocItem.PurchasingDocumentItem ,
PurchaseDoc.CompanyCode,
PurchaseDocItem.Material,
Company.CompanyCodeName,
Supplier.SupplierName,
UserName.PersonFullName,
PurchaseDoc.PurchasingDocumentDeletionCode,
PurchaseDoc.IncotermsClassification,
PurchaseDoc.IncotermsTransferLocation,
PurchaseDocItem.Plant,
PurchaseDoc.PurchasingGroup,
PurchaseDoc.PurchasingOrganization,
Supplier.AdditionalName,
PurchaseDoc.Supplier,
PurchaseDoc.SupplyingPlant,
PurchaseDoc.PaymentTerms,
PurchaseDoc.PurchaseContract,
PurchaseDoc.CreatedByUser,
PurchaseDoc.DocumentCurrency,
PurchaseDoc.PurchasingDocumentOrderDate,
PurchaseDoc.CreationDate,
PurchaseDoc.PurchasingDocumentType,
PurgGroup.PurchasingGroupName,
PurgOrg.PurchasingOrganizationName,
PurchaseDoc.PurchasingDocumentCategory,
PurchaseDoc.Language,
DocumentTypeName.PurchasingDocumentTypeName,
PlantData.PlantName
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