P_SI_LineItemsNonResident
BST Line Items - SI Nonresidents
P_SI_LineItemsNonResident is a Composite CDS View that provides data about "BST Line Items - SI Nonresidents" in SAP S/4HANA. It reads from 1 data source (P_SI_AddNonResidentDocument) and exposes 31 fields with key fields CompanyCode, AccountingDocument, FiscalYear, Ledger, LedgerGLLineItem. It has 10 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| P_SI_AddNonResidentDocument | vfd | from |
Associations (10)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_Customer | customer | $projection.Customer = customer.Customer |
| [0..1] | I_ProductText | mak | mak.Language = $session.system_language and $projection.Product = mak.Product |
| [0..1] | I_GLAccountText | ska | ska.Language = $session.system_language and $projection.ChartOfAccounts = ska.ChartOfAccounts and $projection.GLAccount = ska.GLAccount |
| [0..1] | I_SI_TradeIDCodeAssignment | assign | assign.GLAccount is not initial and assign.Material is not initial and $projection.CompanyCode = assign.CompanyCode and $projection.Product = assign.Material and $projection.GLAccount = assign.GLAccount |
| [0..1] | I_SI_TradeIDCodeAssignment | assign2 | assign2.Material is not initial and assign2.GLAccount is initial and $projection.CompanyCode = assign2.CompanyCode and $projection.Product = assign2.Material |
| [0..1] | I_SI_TradeIDCodeAssignment | assign3 | assign3.GLAccount is not initial and assign3.Material is initial and $projection.CompanyCode = assign3.CompanyCode and $projection.GLAccount = assign3.GLAccount |
| [0..1] | I_SI_TradeIdentifierCodeLog | sif | sif.TradeIdentificationCode is not initial and $projection.CompanyCode = sif.CompanyCode and $projection.Ledger = sif.Ledger and $projection.FiscalYear = sif.FiscalYear and $projection.AccountingDocument = sif.AccountingDocument and $projection.LedgerGLLineItem = sif.LedgerGLLineItem |
| [0..1] | I_SI_TradeIdentifierCodeLog | sif_added | vfd.DocumentIsAdded is not initial and sif_added.LedgerGLLineItem is initial and sif_added.TradeIdentificationCode is not initial and $projection.CompanyCode = sif_added.CompanyCode and $projection.Ledger = sif_added.Ledger and $projection.FiscalYear = sif_added.FiscalYear and $projection.AccountingDocument = sif_added.AccountingDocument |
| [0..1] | I_SI_TradeIdentifierCodeLog | country_added | vfd.DocumentIsAdded is not initial and $projection.LedgerGLLineItem = country_added.LedgerGLLineItem and country_added.Country is not initial and $projection.CompanyCode = country_added.CompanyCode and $projection.Ledger = country_added.Ledger and $projection.FiscalYear = country_added.FiscalYear and $projection.AccountingDocument = country_added.AccountingDocument |
| [1..1] | I_OperationalAcctgDocItem | OperAccDocItm | $projection.CompanyCode = OperAccDocItm.CompanyCode and $projection.AccountingDocument = OperAccDocItm.AccountingDocument and $projection.FiscalYear = OperAccDocItm.FiscalYear and $projection.AccountingDocumentItem = OperAccDocItm.AccountingDocumentItem |
Annotations (9)
| Name | Value | Level | Field |
|---|---|---|---|
| EndUserText.label | BST Line Items - SI Nonresidents | view | |
| VDM.viewType | #COMPOSITE | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.serviceQuality | #B | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_INCLUDED | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| VDM.private | true | view |
Fields (31)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | P_SI_AddNonResidentDocument | CompanyCode | Receiver Company Code |
| KEY | AccountingDocument | P_SI_AddNonResidentDocument | AccountingDocument | Journal Entry |
| KEY | FiscalYear | P_SI_AddNonResidentDocument | FiscalYear | G/L Fiscal Year |
| KEY | Ledger | GLAcntIItmRD | SourceLedger | Source Ledger |
| KEY | LedgerGLLineItem | GLAcntIItmRD | LedgerGLLineItem | Journal Entry Item |
| AccountingDocumentItem | GLAcntIItmRD | AccountingDocumentItem | Posting View Item | |
| GLAccount | GLAcntIItmRD | GLAccount | General Ledger | |
| Customer | P_SI_AddNonResidentDocument | Customer | Sold-to Party | |
| CustomerName | customer | CustomerName | Name of Customer | |
| Supplier | P_SI_AddNonResidentDocument | Supplier | Supplier | |
| SupplierName | supplier | SupplierName | Supplier Name | |
| AmountInCompanyCodeCurrency | GLAcntIItmRD | AmountInCompanyCodeCurrency | Local Crcy Amt | |
| AccountingDocumentItemType | OperAccDocItm | AccountingDocumentItemType | Line Item ID | |
| TaxCode | OperAccDocItm | TaxCode | Tax Code | |
| CompanyCodeCurrency | GLAcntIItmRD | CompanyCodeCurrency | Local Currency | |
| ReportingCurrency | ||||
| PostingDate | GLAcntIItmRD | PostingDate | Posting Date for GR | |
| DocumentDate | GLAcntIItmRD | DocumentDate | Journal Entry Date | |
| FinancialAccountType | GLAcntIItmRD | FinancialAccountType | Fin. Account Type | |
| Product | GLAcntIItmRD | Product | Product Sold | |
| ProductName | mak | ProductName | Description | |
| ChartOfAccounts | GLAcntIItmRD | ChartOfAccounts | Node Class | |
| GLAccountName | ska | GLAccountName | Short Text | |
| DocumentItemText | GLAcntIItmRD | DocumentItemText | Text | |
| DebitCreditCode | GLAcntIItmRD | DebitCreditCode | Single-Character Flag | |
| AccountingDocumentHeaderText | ||||
| Country | ||||
| LastChangedAtDateTime | sif | LastChangedAtDateTime | Changed On | |
| LocalLastChangedAtDateTime | sif | LocalLastChangedAtDateTime | ||
| AccountingDocumentType | GLAcntIItmRD | AccountingDocumentType | Journal Entry Type | |
| DocumentIsAdded | P_SI_AddNonResidentDocument | DocumentIsAdded |
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_SI_LineItemsNonResident.
-- 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.
CREATE VIEW P_SI_LineItemsNonResident AS
SELECT
vfd.CompanyCode AS CompanyCode,
vfd.AccountingDocument AS AccountingDocument,
vfd.FiscalYear AS FiscalYear,
GLAcntIItmRD.SourceLedger AS Ledger,
GLAcntIItmRD.LedgerGLLineItem AS LedgerGLLineItem,
GLAcntIItmRD.AccountingDocumentItem AS AccountingDocumentItem,
GLAcntIItmRD.GLAccount AS GLAccount,
vfd.Customer AS Customer,
customer.CustomerName AS CustomerName,
vfd.Supplier AS Supplier,
supplier.SupplierName AS SupplierName,
GLAcntIItmRD.AmountInCompanyCodeCurrency AS AmountInCompanyCodeCurrency,
OperAccDocItm.AccountingDocumentItemType AS AccountingDocumentItemType,
OperAccDocItm.TaxCode AS TaxCode,
GLAcntIItmRD.CompanyCodeCurrency AS CompanyCodeCurrency,
cast( 'EUR' as fis_hwaer ) AS ReportingCurrency,
GLAcntIItmRD.PostingDate AS PostingDate,
GLAcntIItmRD.DocumentDate AS DocumentDate,
GLAcntIItmRD.FinancialAccountType AS FinancialAccountType,
GLAcntIItmRD.Product AS Product,
mak.ProductName AS ProductName,
GLAcntIItmRD.ChartOfAccounts AS ChartOfAccounts,
ska.GLAccountName AS GLAccountName,
GLAcntIItmRD.DocumentItemText AS DocumentItemText,
GLAcntIItmRD.DebitCreditCode AS DebitCreditCode,
GLAcntIItmRD._ClearingAccountingDocument.AccountingDocumentHeaderText AS AccountingDocumentHeaderText,
coalesce( country_added.Country, vfd.Country ) AS Country,
sif.LastChangedAtDateTime AS LastChangedAtDateTime,
sif.LocalLastChangedAtDateTime AS LocalLastChangedAtDateTime,
GLAcntIItmRD.AccountingDocumentType AS AccountingDocumentType,
vfd.DocumentIsAdded AS DocumentIsAdded
FROM P_SI_AddNonResidentDocument AS vfd
LEFT OUTER JOIN I_Customer AS customer ON Customer = customer.Customer -- association [0..1]
LEFT OUTER JOIN I_ProductText AS mak ON mak.Language = $session.system_language AND Product = mak.Product -- association [0..1]
LEFT OUTER JOIN I_GLAccountText AS ska ON ska.Language = $session.system_language AND ChartOfAccounts = ska.ChartOfAccounts AND GLAccount = ska.GLAccount -- association [0..1]
LEFT OUTER JOIN I_SI_TradeIDCodeAssignment AS assign ON assign.GLAccount is not initial AND assign.Material is not initial AND CompanyCode = assign.CompanyCode AND Product = assign.Material AND GLAccount = assign.GLAccount -- association [0..1]
LEFT OUTER JOIN I_SI_TradeIDCodeAssignment AS assign2 ON assign2.Material is not initial AND assign2.GLAccount is initial AND CompanyCode = assign2.CompanyCode AND Product = assign2.Material -- association [0..1]
LEFT OUTER JOIN I_SI_TradeIDCodeAssignment AS assign3 ON assign3.GLAccount is not initial AND assign3.Material is initial AND CompanyCode = assign3.CompanyCode AND GLAccount = assign3.GLAccount -- association [0..1]
LEFT OUTER JOIN I_SI_TradeIdentifierCodeLog AS sif ON sif.TradeIdentificationCode is not initial AND CompanyCode = sif.CompanyCode AND Ledger = sif.Ledger AND FiscalYear = sif.FiscalYear AND AccountingDocument = sif.AccountingDocument AND LedgerGLLineItem = sif.LedgerGLLineItem -- association [0..1]
LEFT OUTER JOIN I_SI_TradeIdentifierCodeLog AS sif_added ON vfd.DocumentIsAdded is not initial AND sif_added.LedgerGLLineItem is initial AND sif_added.TradeIdentificationCode is not initial AND CompanyCode = sif_added.CompanyCode AND Ledger = sif_added.Ledger AND FiscalYear = sif_added.FiscalYear AND AccountingDocument = sif_added.AccountingDocument -- association [0..1]
LEFT OUTER JOIN I_SI_TradeIdentifierCodeLog AS country_added ON vfd.DocumentIsAdded is not initial AND LedgerGLLineItem = country_added.LedgerGLLineItem AND country_added.Country is not initial AND CompanyCode = country_added.CompanyCode AND Ledger = country_added.Ledger AND FiscalYear = country_added.FiscalYear AND AccountingDocument = country_added.AccountingDocument -- association [0..1]
LEFT OUTER JOIN I_OperationalAcctgDocItem AS OperAccDocItm ON CompanyCode = OperAccDocItm.CompanyCode AND AccountingDocument = OperAccDocItm.AccountingDocument AND FiscalYear = OperAccDocItm.FiscalYear AND AccountingDocumentItem = OperAccDocItm.AccountingDocumentItem -- association [1..1]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- 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
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA